关于port-channel的问题...

来源:百度文库 编辑:神马文学网 时间:2024/04/25 08:10:04
EtherChannl要求必须用支持的interface才能组成,不是你随便选interface的。变成黄色你应该用show interface看一下是不是成了error-disabled状态,如果是则需要用(config)#errdisable recovery恢复,光用shutdown是不行的。
还有,你的两个配置方法也不对。
L2 EtherChannel只用配physical interface就行了,可以是static access,也可以使trunk,但是必须一样。不需要create port-channel。
L3 EtherChannel要首先create port-channel,然后no sw把port-channel变成L3 interface,加上IP地址。再进入physical interface,必须no ip add去掉physical interface的IP信息,然后直接channel-group加入EtherChannel就行了。
给你例子:
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