Home | Mirror | Search |
SwitchA
SwitchA# configure terminal SwitchA (config)# interface range GigabitEthernet1/1-2 SwitchA (config-if-range)# switchport mode access SwitchA (config-if-range)# switchport access vlan 10 SwitchA (config-if-range)# channel-group 5 mode on Switch(config-if-range)# end
SwitchB
SwitchB# configure terminal SwitchB(config)#interface range GigabitEthernet1/0/1-2 SwitchB(config-if-range)#switchport mode access SwitchB(config-if-range)#switchport access vlan 10 SwitchB(config-if-range)#channel-group 1 mode on Creating a port-channel interface Port-channel 1 SwitchB(config-if-range)#int port-channel 1 SwitchB(config-if)#exit SwitchB(config)#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 ------+-------------+-----------+----------------------------------------------- 1 Po1(SU) - Gi1/0/1(P) Gi1/0/2(P)
channel-group 4 mode active 這個命令控制是否用LACP的。
c4506(config)#inter g6/5 c4506(config-if)#channel-group 4 mode ? active Enable LACP unconditionally auto Enable PAgP only if a PAgP device is detected desirable Enable PAgP unconditionally on Enable Etherchannel only passive Enable LACP only if a LACP device is detected c4506(config-if)#channel-group 4 mode active
例 6.1. desirable
switch A
Switch(config)#interface range fa0/1-4 #range配置二個以上的介面 Switch(config-if-range)#channel-group 1 mode desirable #封裝為自動協商模式 Switch(config-if-range)#switchport mode trunk Switch(config-if-range)#switchport trunk encapsulation dot1q Switch(config-if-range)#switchport trunk allowed vlan all #允許所以vlan通過
switch B
Switch(config)#interface range fa0/1-4 Switch(config-if-range)#channel-group 1 mode desirable Switch(config-if-range)#switchport mode trunk Switch(config-if-range)#switchport trunk encapsulation dot1q Switch(config-if-range)#switchport trunk allowed vlan all