今天碰到了一个奇怪的问题,情况描述如下:
一台cisco交换机和一台负载均衡设备的多链路互联,启用LACP进行协商成二层port-channel。双设备上都是配置的标准配置,都启用active的形式。在配置完成后,双方的链路都up,一切正常。但是在重启了负载均衡设备后,发现cisco交换机上配置的portchannel显示为notconnect状态,然后出现了port-channel 7A的端口。而负载设备上一切正常。下面是troubleshooting的基本信息:
#sh int port-channel 7 eth   
Port-channel7   (Primary aggregator)
Age of the Port-channel   = 404d:07h:56m:08s
Logical slot/port   = 14/4          Number of ports = 0
HotStandBy port = null
Port state          = Port-channel Ag-Not-Inuse
Protocol            =   LACP
Fast-switchover     = disabled
Direct Load Swap    = disabled
Time since last port bundled:    1d:18h:50m:26s    Gi4/9
Time since last port Un-bundled: 0d:16h:31m:23s    Gi2/19
Port-channel7A
Age of the Port-channel   = 0d:00h:31m:34s
Logical slot/port   = 14/18          Number of ports = 4
HotStandBy port = null
Port state          = Port-channel Ag-Inuse
Protocol            =   LACP
Fast-switchover     = disabled
Direct Load Swap    = disabled
Ports in the Port-channel:
Index   Load   Port     EC state        No of bits
------+------+------+------------------+-----------
  3     11     Gi2/14     Active    2
  2     22     Gi2/19     Active    2
  1     44     Gi4/9      Active    2
  0     88     Gi4/10     Active    2
Time since last port bundled:    0d:00h:31m:32s    Gi2/19
#sh int port-channel 7A
Port-channel7A is up, line protocol is up (connected)
#sh int port-channel 7
Port-channel7 is down, line protocol is down (notconnect)
#sh int g2/14
GigabitEthernet2/14 is up, line protocol is up (connected)
平生第一次碰到这么个奇怪现象,凭经验判定可能是不同品牌设备之间的lacp的某些信令不同步,导致出现了port-channel7A。这个7A的接口是自动生成的,通过show run int port-channel7A查看发现此接口下没有任何配置。于是将该port-channel下的4个物理端口重新shutdown。再查看发现7A端口消失了,然后no shutdown这4个端口,此时port-channel7端口up了。一切恢复正常。
这更加表明了确实是某些lacp信令没有同步才造成了cisco产生了7A的端口。当使用shut/no shutdown物理端口迫使重新协商后,lacp所有信令才协商同步。这可能是不同品牌之间的兼容性问题。
其实一般推荐是不同品牌的portchannel配置可以配制成on的模式,强制不进行协商而将端口up。