Cisco端口捆绑etherchannel之LACP
两个捆绑接口都配置为通用捆绑协议lacp,acitve模式又发又收协商信息,以太网最多可以捆绑8条物理链路。
Would you like to enter the initial configuration dialog? [yes/no]: no
Switch>en
Switch#conf t
Switch(config)#hostname SW1
SW1(config)#int range f1/0/12 - 13
SW1(config-if-range)#channel-protocol lacp
创建逻辑接口po12
SW1(config-if-range)#channel-group 12 mode active
Switch(config)#hostname SW2
SW2(config)#int range f2/0/12 - 13
SW2(config-if-range)#channel-protocol lacp
SW2(config-if-range)#channel-group 12 mode active
SW2(config-if-range)#do show etherchannel summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
12 Po12(SU) LACP Fa2/0/12(P) Fa2/0/13(P)
SU表示捆绑状态正常
SW2(config)#do show int status
逻辑接口po12上的设置,覆盖物理接口的配置。如下配置trunk接口。
SW1(config)#int po12
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport nonegotiate
SW2(config)#int po12
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#switchport mode trunk
SW2(config-if)#switchport nonegotiate
配置本帧vlan和排除vlan
SW1(config)#int po12
SW1(config-if)#switchport trunk native vlan 2
SW1(config-if)#switchport trunk allowed vlan except 99
SW2(config)#int po12
SW2(config-if)#switchport trunk native vlan 2
SW2(config-if)#switchport trunk allowed vlan except 99
SW2(config-if)#do show int trunk
SW2(config-if)#do sh run int f2/0/12
默认就是src-mac的负载均衡方式,不需要修改。
SW2(config)#do show port-channel load-balance