生成树、端口聚合实验2010-05-15 10:29:04| 分类:网络设备| 标签:|字号大中小订阅设备:DCS-3950一台,DCRS-5650一台(两台3950也可,不涉及三层功能),PC两台,Console 线1-2根,直通线4根初始准备:将PC1连至3950,3950连5650,5650连PC2,配置IP地址,Ping通实验过程:拿出另一根网线,连接3950与5650,数秒后交换机3个接口灯狂闪,原本ping通的变为不通注:有些交换机默认启用生成树,可以先show spanning-tree查看,是否开启,如果开启,先行关闭。
在3950上输入DCS-3950-26C(config)#spanning-treeMSTP is starting now, please wait.............MSTP is enabled successfully.DCS-3950-26C(config)#可以看到,端口不再狂闪,数秒后网络恢复正常,再等待数秒后,再次狂闪,网络再次瘫痪DCS-3950-26C#show spanning-tree-- MSTP Bridge Config Info --Standard : IEEE 802.1sBridge MAC : 00:03:0f:13:56:3bBridge Times : Max Age 20, Hello Time 2, Forward Delay 15Force Version: 3########################### Instance 0 ###########################Self Bridge Id : 32768 - 00:03:0f:13:56:3bRoot Id : this switchExt.RootPathCost : 0Region Root Id : this switchInt.RootPathCost : 0Root Port ID : 0Current port list in Instance 0:Ethernet0/0/1 Ethernet0/0/6 Ethernet0/0/17 (Total 3)PortName ID ExtRPC IntRPC State Role DsgBridge DsgPort-------------- -------- --------- --------- --- ---- ------------------ -------Ethernet0/0/1 128.001 0 0 FWD DSGN 32768.00030f13563b 128.001 Ethernet0/0/6 128.006 0 0 FWD DSGN 32768.00030f13563b 128.006 Ethernet0/0/17 128.017 0 0 FWD DSGN 32768.00030f13563b 128.017在5650上也开启spanning-tree,再次查看3950DCS-3950-26C#show span-- MSTP Bridge Config Info --Standard : IEEE 802.1sBridge MAC : 00:03:0f:13:56:3bBridge Times : Max Age 20, Hello Time 2, Forward Delay 15Force Version: 3########################### Instance 0 ###########################Self Bridge Id : 32768 - 00:03:0f:13:56:3bRoot Id : this switchExt.RootPathCost : 0Region Root Id : this switchInt.RootPathCost : 0Root Port ID : 0Current port list in Instance 0:Ethernet0/0/1 Ethernet0/0/6 Ethernet0/0/17 (Total 3)PortName ID ExtRPC IntRPC State Role DsgBridge DsgPort -------------- -------- --------- --------- --- ---- ------------------ -------Ethernet0/0/1 128.001 0 0 FWD DSGN 32768.00030f13563b 128.001 Ethernet0/0/6 128.006 0 0 FWD DSGN 32768.00030f13563b 128.006 Ethernet0/0/17 128.017 0 0 FWD DSGN 32768.00030f13563b 128.017在5650上show span查看结果DCRS-5650-28#show span-- MSTP Bridge Config Info --Standard : IEEE 802.1sBridge MAC : 00:03:0f:13:61:6bBridge Times : Max Age 20, Hello Time 2, Forward Delay 15Force Version: 3########################### Instance 0 ###########################Self Bridge Id : 32768 - 00:03:0f:13:61:6bRoot Id : 32768.00:03:0f:13:56:3bExt.RootPathCost : 200000Region Root Id : this switchInt.RootPathCost : 0Root Port ID : 128.15Current port list in Instance 0:Ethernet0/0/3 Ethernet0/0/10 Ethernet0/0/15 (Total 3)PortName ID ExtRPC IntRPC State Role DsgBridge DsgPort-------------- ------- --------- --------- --- ---- ------------------ -------Ethernet0/0/3 128.003 200000 0 FWD DSGN 32768.00030f13616b 128.003 Ethernet0/0/10 128.010 0 0 BLK ALTR 32768.00030f13563b 128.006 Ethernet0/0/15 128.015 0 0 FWD ROOT 32768.00030f13563b 128.001 DCRS-5650-28#可见在5650上,第10个端口变成了阻塞状态查看ping,网络恢复互通,交换机灯不再狂闪生成树运行成功******************************************************************************* ******************************************************************************* ******************************************************************************* ******************************************************************************* ******************************************************************************* **********************端口聚合端口聚合可以使两个或者多个端口逻辑上当作一个端口来使用,与生成树不同的是,生成树是逻辑上阻塞一个或多个端口的工作,保持只有一个端口工作,交换机间的带宽不变;而端口聚合是将多个物理端口逻辑看作一个端口来使用,带宽变为n*端口带宽。
关闭span,不久网络不通,在3950上开启port-groupDCS-3950-26C(config)#port-group 1DCS-3950-26C(config)#int e0/0/1DCS-3950-26C(config-if-ethernet0/0/1)#port-group 1 mode onDCS-3950-26C(config-if-ethernet0/0/1)#int e0/0/5DCS-3950-26C(config-if-ethernet0/0/5)#port-group 1 mode on接下来,在5650上开启port-groupDCRS-5650-28(config)#port-group 1DCRS-5650-28(config)#int e0/0/10DCRS-5650-28(Config-If-Ethernet0/0/10)#port-group 1 mode onDCRS-5650-28(Config-If-Ethernet0/0/10)#int e0/0/15DCRS-5650-28(Config-If-Ethernet0/0/15)#portDCRS-5650-28(Config-If-Ethernet0/0/15)#port-group 1 mo onthe port Ethernet0/0/15 successfully added to the group1 as on modeDCRS-5650-28(Config-If-Ethernet0/0/15)#%Jan 01 00:34:48 2006 %LINK-3-UPDOWN: Interface Port-Channel1, changed state to administratively DOWN%Jan 01 00:34:48 2006 %LINK-5-CHANGED: Interface Port-Channel1, changed state to UP%Jan 01 00:34:48 2006 %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-Channel1, changed state to DOWN%Jan 01 00:34:48 2006 create the trunk group Port-Channel1 successfully.%Jan 01 00:34:49 2006 %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-Channel1, changed state to UP%Jan 01 00:34:49 2006 %DUPLEX-7-CHANGE: Interface Port-Channel1, DUPLEX changed state to FULL%Jan 01 00:34:49 2006 %SPEED-8-CHANGE: Interface Port-Channel1, SPEED changed state to 100MDCRS-5650-28(Config-If-Ethernet0/0/15)#DCRS-5650-28#show port-g bPort-group number : 1the attributes of the port-group are as follows:Number of ports in port-group : 2 Maxports in port-channel = 8Number of port-channels : 1 Max port-channels : 1DCRS-5650-28#show vlanVLAN Name Type Media Ports---- ------------ ---------- --------- ----------------------------------------1 default Static ENET Ethernet0/0/1 Ethernet0/0/2Ethernet0/0/3 Ethernet0/0/4Ethernet0/0/5 Ethernet0/0/6Ethernet0/0/7 Ethernet0/0/8Ethernet0/0/9 Ethernet0/0/11Ethernet0/0/12 Ethernet0/0/13Ethernet0/0/14 Ethernet0/0/16Ethernet0/0/17 Ethernet0/0/18Ethernet0/0/19 Ethernet0/0/20Ethernet0/0/21 Ethernet0/0/22Ethernet0/0/23 Ethernet0/0/24Ethernet0/0/25 Ethernet0/0/26Ethernet0/0/27 Ethernet0/0/28Port-Channel1DCRS-5650-28#此处的端口聚合模式为on,即手动执行,也可以使用LACP协议自动协商即,在一台交换机上,设置为port-group 1 mode active(将on改为active)另一台交换机上,设置为port-group 1 mode passive(将on改为passive)基于IEEE802.3ad标准的LACP(Link Aggregation Control Protocol,链路汇聚控制协议)是一种实现链路动态汇聚的协议。