资源预览内容
第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
亲,该文档总共3页全部预览完了,如果喜欢就下载吧!
资源描述
生成树协议的配置【实训背景】学校为了开展计算机教学和网络办公,建立了一个计算机教室和一个校办公区,这两处的计算机网络通过两台交换机互连组成内部校园网;为了提高网络的可靠性,作为网络管理员的你要用2条链路将交换机互连,现要求在交换机上做适当配置,使网络避免环路。【实训目的】掌握生成树协议的配置方法,理解生成树协议的作用和特点【技术原理】生成树协议(spanning-tree),作用是在交换网络中提供冗余备份链路,并且解决交换网络中的环路问题。生成树协议是利用SPA算法(生成树算法),在存在交换环路的网络中生成一个没有环路的树形网络。运用该算法将交换网络冗余的备份链路逻辑上断开,当主要链路出现故障时,能够自动的切换到备份链路,保证数据的正常转发。生成树协议的特点是收敛时间长。当主要链路出现故障以后,到切换到备份链路需要50秒的时间。【实训内容】1、根据拓扑将主机和交换机进行连接(未形成环路)2、测试主机之间可以相互ping通3、配置生成树协议4、测试(形成环路)5、测试(断开主要链路)【实现功能】使网络在有冗余链路的情况下避免环路的产生,避免广播风暴等。【实训设备】s3100(2台),PC(2台)、直连线(4条)【主要命令】stp,stpmode,spanning-treePriority,undostp【实训步骤】1、在每台交换机上开启生成树协议对SwitchA做如下配置:system-view!进入全局配置模式H3CsysnameSwitchASwitchAvlan10SwitchA-vlan10quitSwitchAinterfacefastethernet0/24SwitchA-fastethernet0/24portaccvlan10SwitchAinterfacef0/1SwitchA-fastethernetportlink-typetrunkSwitchAinterfacef0/2SwitchA-fastethernetportlink-typetrunkSwitchA-fastethernetquitSwitchA对SwitchB做如下配置:system-view!进入全局配置模式H3CsysnameSwitchBSwitchBvlan10SwitchBvlanlOquitSwitchBinterfacefastethernet0/24SwitchB-fastethernetportaccvlan10SwitchBinterfacef0/1SwitchB-fastetherneportlink-typetrunkSwitchBinterfacef0/2SwitchB-fastetherneportlink-typetrunkSwitchB-fastethernequitSwitchB2、设置生成树模式。stpmodestp!设置生成树模式为STP(802.1D)验证测试:验证生成树协模式为802.1DsysSwitchAstpenable!开启生成树协议SwitchAstpmodestpSwitchAquitsysSwitchBstpenable!开启生成树协议SwitchBstpmodestpSwitchBquit验证测试:验证生成树协议已经开启SwitchA#dispstpCISTGlobalInfoModeSTPCISTBridge:32768.000f-e253-8317本机桥IDBridgeTimes:Hello2sMaxAge20sFwDly15sMaxHop20CISTRoot/ERPC:32768.000f-e249-d546/200根桥ID及路径开销CISTRegRoot/IRPC:32768.000f-e253-8317/0CISTRootPortId:128.1短口IDBPDU-Protection:disabledTC-Protection:enabled/Threshold=6BridgeConfigDigestSnooping:disabledTCorTCNreceived:122TimesincelastTC:0days0h:0m:9sPort1(Ethernet1/0/1)FORWARDING发送状态PortProtocol:enabledPortRole:CISTRootPortPortPriority:128PortCost(Legacy):Config=auto/Active=200Desg.Bridge/Port:32768.000f-e249-d546/128.1PortEdged:Config=disabled/Active=disabledPoint-to-point:Config=auto/Active=trueTransmitLimit:10packets/hello-timeProtectionType:NoneMSTPBPDUformat:Config=legacyPortConfigDigestSnooping:disabledNumofVlansMapped:1PortTimes:Hello2sMaxAge20sFwDly15sMsgAge0sRemHop0BPDUSent:3TCN:1,Config:2,RST:0,MST:0BPDUReceived:39TCN:0,Config:39,RST:0,MST:0Port2(Ethernet1/0/2)DISCARDING阻塞状态PortProtocol:enabledPortRole:CISTAlternatePortPortPriority:128PortCost(Legacy):Config=auto/Active=200Desg.Bridge/Port:32768.000f-e249-d546/128.2PortEdged:Config=disabled/Active=disabledPoint-to-point:Config=auto/Active=trueTransmitLimit:10packets/hello-timeProtectionType:NoneMSTPBPDUformat:Config=legacyPortConfigDigestSnooping:disabledNumofVlansMapped:1PortTimes:Hello2sMaxAge20sFwDly15sMsgAge0sRemHop0BPDUSent:2TCN:0,Config:2,RST:0,MST:0BPDUReceived:59TCN:0,Config:59,RST:0,MST:0SwitchAdispstpintel/0/1显示接口STP信息CISTPort1(Ethernet1/0/1)FORWARDINGPortProtocol:enabledPortRole:CISTRootPortPortPriority:128接口优先级PortCost(Legacy):Config=auto/Active=200Desg.Bridge/Port:32768.000f-e249-d546/128.1PortEdged:Config=disabled/Active=disabledPoint-to-point:Config=auto/Active=trueTransmitLimit:10packets/hello-timeProtectionType:NoneMSTPBPDUformat:Config=legacyPortConfigDigestSnooping:disabledNumofVlansMapped:1PortTimes:Hello2sMaxAge20sFwDly15sMsgAge0sRemHop0BPDUSent:3TCN:1,Config:2,RST:0,MST:0BPDUReceived:195TCN:0,Config:195,RST:0,MST:03、设置交换机的优先级。SwitchAstppriority0!设置交换机SwitchA在生成树实例0中的优先级为0,数值最小的交换机为根交换机(也称根桥),交换机SwitchB的优先级采用默认优先级(32768),因此SwitchA将成为根交换机。验证测试:验证交换机SwitchA的优先级SwitchAdisplaystpStpVersion:STPSysStpStatus:EnabledBaseNumPorts:24MaxAge:20HelloTime:2ForwardDelay:15BridgeMaxAge:20BridgeHelloTime:2BridgeForwardDelay:15MaxHops:20TxHoldCount:3PathCostMethod:LongBPDUGuard:DisabledBPDUFilter:DisabledBridgeAddr:00d0.f88c.1da0Priority:0TimeSinceTopologyChange:0d:0h:7m:21sTopologyChanges:0DesignatedRoot:000000D0F88C1DA0RootCost:0RootPort:0SwitchBdisstpCISTGlobalInfoModeSTPCISTBridge:32768.000f-e249-d546本机桥IDBridgeTimes:Hello2sMaxAge20sFwDly15sMaxHop20CISTRoot/ERPC:32768.000f-e249-d546/0根桥ID及路径开销CISTRegRoot/IRPC:32768.000f-e249-d546/0CISTRootPortId:0.0BPDU-Protection:disabledTC-Protection:enabled/Threshold=6BridgeConfigDigestSnooping:disabledTCorTCNreceived:5TimesincelastTC:0days0h:3m:11sPort1(Ethernet1/0/1)FORWARDINGPortProtocol:enabledPortRole:CISTDesignatedPortPortPriority:128PortCost(Legacy):Config=auto/Active=200Desg.Bridge/Port:32768.000f-e249-d546/128.1PortEdged:Config=disabled/Active=disabledPoint-to-point:Config=auto/Active=trueTransmitLimit:10packets/hello-timeProtectionType:NoneMSTPBPDUformat:Config=legacyPortConfigDigestSnooping:disabledNumofVlansMapped:1PortTimes:Hello2sMaxAge20sFwDly15sMsgAge0sRemHop20BPDUSent:114TCN:0,Config:114,RST:0,MST:0BPDUReceived:1TCN:1,Config:0,RST:0,MST:0Port2(Ethernet1/0/2)FORWARDINGPortProtocol:enabledPortRole:CISTDesignatedPortPortPriority:128PortCost(Legacy):Config=auto/Active=200Desg.Bridge/Port:32768.000f-e2
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号