下面是局域网的核心交换机(三层交换)和二层交换之间的端口聚合的操作实例:
PHP?refimg=" + this.src)" alt="" src="http://img.jb51.cc/vcimg/static/loading.png" border="0" src="http://img1.51cto.com/attachment/200912/200912011259645442406.jpg">
2950@H_404_37@
Switch>en@H_404_37@
Switch#conf t@H_404_37@
Enter configuration commands,one per line. End with CNTL/Z.@H_404_37@
Switch(config)#int f0/1@H_404_37@
Switch(config-if)#channel-group 1 mode on@H_404_37@
%LINK-5-CHANGED: Interface Port-channel 1,changed state to up@H_404_37@
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1,changed state to upSwitch(config-if)#int f0/2@H_404_37@
Switch(config-if)#channel-group 1 mode on@H_404_37@
3560@H_404_37@
Switch(config)#int port-channel 1@H_404_37@
Switch(config-if)#exit@H_404_37@ Switch(config)#ip routing(默认已经启用了路由功能
)@H_404_37@
Switch(config)#int port-channel 1@H_404_37@
Switch(config-if)#no switchport@H_404_37@
Switch(config-if)#ip add 1.1.1.1 255.0.0.0@H_404_37@
Switch(config-if)#no shut@H_404_37@
Switch(config-if)#exit@H_404_37@
Switch(config)#int f0/1@H_404_37@
Switch(config-if)#no switchport@H_404_37@
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1,changed state to down@H_404_37@
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1,changed state to upSwitch(config-if)#@H_404_37@
Switch(config-if)#no ip add@H_404_37@
Switch(config-if)#channel-group 1 mode ?@H_404_37@
active Enable LACP unconditionally@H_404_37@
auto Enable PAgP only if a PAgP device is detected@H_404_37@
desirable Enable PAgP unconditionally@H_404_37@
on Enable Etherchannel only@H_404_37@
passive Enable LACP only if a LACP device is detected@H_404_37@
Switch(config-if)#channel-group 1 mode on@H_404_37@
%LINK-5-CHANGED: Interface Port-channel 1,changed state to upSwitch(config-if)#@H_404_37@
Switch(config-if)#int f0/2@H_404_37@
Switch(config-if)#no switchport@H_404_37@
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2,changed state to down@H_404_37@
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2,changed state to upSwitch(config-if)#no ip add@H_404_37@
Switch(config-if)#no ip address@H_404_37@
Switch(config-if)#channel-group 1 mode on@H_404_37@
Switch(config-if)#exit@H_404_37@
Switch(config)#int f0/3@H_404_37@
Switch(config-if)#no switchport@H_404_37@
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3,changed state to down@H_404_37@
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3,changed state to upSwitch(config-if)#ip add 2.2.2.1 255.0.0.0@H_404_37@
Switch(config-if)#no shut@H_404_37@ 端口聚合可使流量在多条物理链路上负载均衡,同时也起到了链路的备份作用。但是在某些设备里,应注意聚合链路两端接口的速率,工作模式,例如在快以中,可将各个端口设置为speed 100,duplex full。