
3、思科模拟器链路聚合命令hao.docx
3页思科模拟器命令一、实验拓扑图:fl-PC-PTPCIFei_0/lVLAN 10Fei_0/16Fei_0/16296Cf 2%i_0 15S雌hlFei_0/2\LAN 20PC-PTPC2VLAN 10, 20Fei_0/2MAN 20'24TT h2 Fei_0, 1 VLAN 10 占PC-PTPC3PC-PTPC4二、操作步骤:链路聚合(LinkAggregation)方案1…静态聚合…SW1和SW2交换机配置如下:1、配置vlanZXR10#vlan databaseZXR10(vlan)#vlan 10ZXR10(vlan)#vlan 20ZXRIO(vlan)#exitZXR10#configure terminalZXR10(config)# interface fastethernet 0/1ZXRI O(config-if)#switchport mode accessZXR10(config-if)#switchport access vlan 10-接 PC 机ZXR10(config-if)#exitZXR 10(config)# interface fastethernet 0/2ZXR 10(config-if)#switchport mode accessZXR 10(config-if)#switchport access vlan 20-接 PC 机ZXRIO(config-if)#exit3、将端口加入到链路聚合组中:ZXR10 (config)# interface fastethernet 0/15-接 3228-1 的 15 口ZXR10 (config-if)# channel-group 1 mode on以静态方式将端口成员加入链路聚合组ZXR 10 (config-if)#exitZXR 10 (config)# interface fastethernet 0/16•接 3228-1 的 16 口ZXR 10 (config-if)# channcl-gro叩1 mode on以静态方式将端口成员加入链路聚合组ZXRI0(config-if)#exit4、配置链路聚合组模式:ZXR10 (config)# interface port-channel I进入虚拟链路聚合组 1ZXR10 (config-if)# switchport mode trunk修改虚拟链路聚合组 1 的模式为 TRUNKZXR IO(config-if)#switchport trunk allowed vlan 10,20一-虚拟链路聚合组 1 承载 VLAN 10,20 ZXR10 (config)#exit(SW2交换机配置同SW-1 一样)方案2 -动态链路聚合…SW1和SW2交换机配置如下:/、配置vlanZXRlOMan databaseZXR10(vlan)Man 10ZXR10(vlan)Man 20ZXR10(vlan)#exitZXRl()#configure terminalZXRlO(config)# interface faslethernet 0/1ZXR 10(config-if)#switchport mode accessZXR10(config-if)#swi(chpor( access vlan 10-接 PC 机ZXR 10(config-if)#exitZXR lO(config)# interface fastethernet 0/2ZXR 10(config-if)#switchport mode accessZXR 10(config-if)#s\vitchport access vlan 20-接 PC 机ZXR10(config-if)#exit3、将端口加入到链路聚合组中:ZXR10 (config)# interface fastethernet 0/15-接 3228-1 的 15 口ZXR10 (config-if)# channel-protocol lacp设置端口 聚合模式为动态模式ZXRI0 (config-if)# channel-group I mode active (/passive)以动态方式将端口成员加入链路聚合组ZXRIO(config-if)#exitZXR 10 (config)# interface fastethernet 0/16-接 3228-1 的 16 口ZXR 10 (config-if)# channel-protocol lacp设置端口 聚合模式为动态模式ZXR10 (config-if)# channel-gro叩 1 mode active (/passive)以动态方式将端口成员加入ZXR10 (config-if)#exit4、配置链路聚合组模式:ZXR10 (config)# interface port-channel 1ZXR 10 (config-if)# switchporl mode trunkZXR 10(config-if)#switchport trunk allowed vlan 10,20ZXR10(config)#cxit(SW2交换机配置同SW-1 一样)注:聚合模式设置为on时端口运行静态trunk,参与聚合的两端都需要设置为 on模式。
聚合模式设置为active或passive时端口运行LACP, active指端口为 主动协商模式,passive指端口为被动协商模式配置动态链路聚合时,应当将 一端端口的聚合模式设置为active,另一端设置为passive,或者两端都设置为 active o三、查看配置结果:show etherchannel summary看端 口汇聚状态SD表示关闭,SU表示链路聚合翻开成功Switch#show etherchannel summaryFlags: D - downP - in port-channelI - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3S - Layer2U - in usef - failed to allocate aggregatoru - unsuitable for bundling w - waiting to be aggregated d - default portNumber of channel-groups in use: 2Number of aggregators:2Group Port-channel Protocol Ports+++Pol(SD)PAgPFaO/l(D) FaO/2(D)1 Po2(SU)PAgPFaO/23(P) FaO/24(P)四、验证配置结果:1、不同交换机的相同vlan是否通。
2、不同交换机的不同vlan是否通断掉smarttrunk中的任何一个端口,看看对通讯有没有中断。
