3层的port-channel要首先create port-channel,然后no switchport把port-channel变成L3 interface,加上IP地址。再进入physical interface,必须no ip address去掉physical interface的IP信息,然后直接channel-group加入EtherChannel就行了
example:
For L2 static access EtherChannel:
Switch# configure terminal
Switch(config)# interface range gigabitethernet0/1 -2
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 10
Switch(config-if-range)# channel-group 5 mode desirable
Switch(config-if-range)# end
For L2 trunk EtherChannel:
Switch# configure terminal
Switch(config)# interface range gigabitethernet0/1 -2
Switch(config-if-range)# switchport trunk encapsulation isl
Switch(config-if-range)# switchport mode trunk
Switch(config-if-range)# channel-group 5 mode desirable
Switch(config-if-range)# end
For L3 EtherChannel:
Switch# configure terminal
Switch(config)# interface port-channel 5
Switch(config-if)# no switchport
Switch(config-if)# ip address 172.10.20.10 255.255.255.0
Switch(config-if)# interface range gigabitethernet0/1 -2
Switch(config-if-range)# no ip address
Switch(config-if-range)# channel-group 5 mode desirable
Switch(config-if-range)# end
注意:在配置port-channel的端口上不能陪着端口镜像,否则port-channel端口报notconnect,日志信息:
端口 will not join any port-channel, SPAN source ports are not allowed to be part of an etherchannel
转载于:https://blog.51cto.com/glb323/671463