华为生成树协议配置_第1页
华为生成树协议配置_第2页
华为生成树协议配置_第3页
华为生成树协议配置_第4页
华为生成树协议配置_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、生成树协议的配置 【实训背景】学校为了开展计算机教学和网络办公,建立了一个计算机教室和一个校办公区,这两处的计算机网 络通过两台交换机互连组成内部校园网;为了提高网络的可靠性,作为网络管理员的你要用2条链路 将交换机互连,现要求在交换机上做适当配置,使网络避免环路。【实训目的】掌握生成树协议的配置方法,理解生成树协议的作用和特点【技术原理】生成树协议(spanning-tree),作用是在交换网络中提供冗余备份链路,并且解决交换网络中的 环路问题。生成树协议是利用SPA算法(生成树算法),在存在交换环路的网络中生成一个没有环路的树形网络。 运用该算法将交换网络冗余的备份链路逻辑上断开,当主要链

2、路出现故障时,能够自动的切换到备 份链路,保证数据的正常转发。生成树协议的特点是收敛时间长。当主要链路出现故障以后,到切换到备份链路需要50秒的时间。【实训内容】1、根据拓扑将主机和交换机进行连接(未形成环路)2、测试主机之间可以相互ping通3、配置生成树协议4、测试(形成环路)5、测试(断开主要链路)【实现功能】使网络在有冗余链路的情况下避免环路的产生,避免广播风暴等。【实训设备】s3100(2台),PC(2台)、直连线(4条)【主要命令】stp, stp mode , spanning-tree Priority, undo stp【实训步骤】1、在每台交换机上开启生成树协议.对Swit

3、chA做如下配置: system-view !进入全局配置模式H3Csysname SwitchASwitchAvlan 10SwitchA-vlan10quitSwitchAinterface fastethernet 0/24SwitchA- fastethernet 0/24 port acc vlan 10SwitchA interface f 0/1SwitchA-fastethernetport link-type trunkSwitchA interface f 0/2SwitchA-fastethernetport link-type trunkSwitchA-fastethe

4、rnetquitSwitchA对SwitchB做如下配置: system-view !进入全局配置模式H3Csysname SwitchBSwitchBvlan 10SwitchB vlan10quitSwitchBinterface fastethernet 0/24SwitchB-fastethernet port acc vlan 10SwitchBinterface f 0/1SwitchB-fastetherne port link-type trunkSwitchBinterface f 0/2SwitchB-fastetherne port link-type trunkSwit

5、chB-fastetherne quitSwitchB2、设置生成树模式。stp mode stp!设置生成树模式为STP (802.1D)验证测试:验证生成树协模式为802.1DsysSwitchAstp enable !开启生成树协议SwitchA stp mode stpSwitchAquitsysSwitchBstp enable !开启生成树协议SwitchB stp mode stpSwitchBquit验证测试:验证生成树协议已经开启SwitchA#disp stpCIST Global InfoMode STPCIST Bridge :32768.000f-e253-8317

6、本机桥IDBridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20CIST Root/ERPC :32768.000f-e249-d546 / 200 根桥ID及路径开销CIST RegRoot/IRPC :32768.000f-e253-8317 / 0CIST RootPortId :128.1 短口IDBPDU-Protection :disabledTC-Protection :enabled / Threshold=6Bridge ConfigDigest Snooping :disabledTC or TCN received :1

7、22Time since last TC :0 days 0h:0m:9sPort1(Ethernet1/0/1)FORWARDING 发送状态Port Protocol :enabledPort Role :CIST Root PortPort Priority :128Port Cost(Legacy) :Config=auto / Active=200Desg. Bridge/Port :32768.000f-e249-d546 / 128.1Port Edged :Config=disabled / Active=disabledPoint-to-point :Config=auto

8、/ Active=trueTransmit Limit :10 packets/hello-timeProtection Type :NoneMSTP BPDU format :Config=legacyPort ConfigDigest Snooping :disabledNum of Vlans Mapped :1PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 0BPDU Sent :3TCN: 1, Config: 2, RST: 0, MST: 0BPDU Received :39TCN: 0, Config: 39,

9、 RST: 0, MST: 0Port2(Ethernet1/0/2)DISCARDING 阻塞状态Port Protocol :enabledPort Role :CIST Alternate PortPort Priority :128Port Cost(Legacy) :Config=auto / Active=200Desg. Bridge/Port :32768.000f-e249-d546 / 128.2Port Edged :Config=disabled / Active=disabledPoint-to-point :Config=auto / Active=trueTran

10、smit Limit :10 packets/hello-timeProtection Type :NoneMSTP BPDU format :Config=legacyPort ConfigDigest Snooping :disabledNum of Vlans Mapped :1PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 0BPDU Sent :2TCN: 0, Config: 2, RST: 0, MST: 0BPDU Received :59TCN: 0, Config: 59, RST: 0, MST: 0Sw

11、itchA disp stp int e1/0/1 显示接口 STP 信息CISTPort1(Ethernet1/0/1)FORWARDINGPort Protocol :enabledPort Role :CIST Root PortPort Priority :128 接口优先级Port Cost(Legacy) :Config=auto / Active=200Desg. Bridge/Port :32768.000f-e249-d546 / 128.1Port Edged :Config=disabled / Active=disabledPoint-to-point :Config=

12、auto / Active=trueTransmit Limit :10 packets/hello-timeProtection Type :NoneMSTP BPDU format :Config=legacyPort ConfigDigest Snooping :disabledNum of Vlans Mapped :1PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 0BPDU Sent :3TCN: 1, Config: 2, RST: 0, MST: 0BPDU Received :195TCN: 0, Confi

13、g: 195, RST: 0, MST: 03、设置交换机的优先级。SwitchA stp priority 0 !设置交换机SwitchA在生成树实例0中的优先级为0,数值最小的交 换机为根交换机(也称根桥),交换机SwitchB的优先级采用默认优先级(32768),因此SwitchA 将成为根交换机。验证测试:验证交换机SwitchA的优先级SwitchAdisplay stpStpVersion : STPSysStpStatus : EnabledBaseNumPorts : 24MaxAge : 20HelloTime : 2ForwardDelay : 15BridgeMaxAge

14、 : 20BridgeHelloTime : 2BridgeForwardDelay : 15MaxHops : 20TxHoldCount : 3PathCostMethod : LongBPDUGuard : DisabledBPDUFilter : DisabledBridgeAddr : 00d0.f88c.1da0Priority : 0TimeSinceTopologyChange : 0d:0h:7m:21sTopologyChanges : 0DesignatedRoot : 000000D0F88C1DA0RootCost : 0RootPort : 0SwitchB dis

15、 stpCIST Global InfoMode STPCIST Bridge :32768.000f-e249-d546 本机桥IDBridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20CIST Root/ERPC :32768.000f-e249-d546 / 0 根桥ID及路径开销CIST RegRoot/IRPC :32768.000f-e249-d546 / 0CIST RootPortId :0.0BPDU-Protection :disabledTC-Protection :enabled / Threshold=6Bridge

16、 ConfigDigest Snooping :disabledTC or TCN received :5Time since last TC :0 days 0h:3m:11sPort1(Ethernet1/0/1)FORWARDINGPort Protocol :enabledPort Role :CIST Designated PortPort Priority :128Port Cost(Legacy) :Config=auto / Active=200Desg. Bridge/Port :32768.000f-e249-d546 / 128.1Port Edged :Config=d

17、isabled / Active=disabledPoint-to-point :Config=auto / Active=trueTransmit Limit :10 packets/hello-timeProtection Type :NoneMSTP BPDU format :Config=legacyPort ConfigDigest Snooping :disabledNum of Vlans Mapped :1PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20BPDU Sent :114TCN: 0, Confi

18、g: 114, RST: 0, MST: 0BPDU Received :1TCN: 1, Config: 0, RST: 0, MST: 0Port2(Ethernet1/0/2)FORWARDINGPort Protocol :enabledPort Role :CIST Designated PortPort Priority :128Port Cost(Legacy) :Config=auto / Active=200Desg. Bridge/Port :32768.000f-e249-d546 / 128.2Port Edged :Config=disabled / Active=d

19、isabledPoint-to-point :Config=auto / Active=trueTransmit Limit :10 packets/hello-timeProtection Type :NoneMSTP BPDU format :Config=legacyPort ConfigDigest Snooping :disabledNum of Vlans Mapped :1PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20BPDU Sent :132TCN: 0, Config: 132, RST: 0, MS

20、T: 0BPDU Received :0TCN: 0, Config: 0, RST: 0, MST: 04、综合验证测试。验证交换机SwitchB的端口 F0/ 1和F0/ 2的状态。-Port1(Ethernet1/0/1)FORWARDINGPort Protocol :enabledPort Role :CIST Designated PortPort Priority :128Port Cost(Legacy) :Config=auto / Active=200Desg. Bridge/Port :32768.000f-e249-d546 / 128.1Port Edged :Con

21、fig=disabled / Active=disabledPoint-to-point :Config=auto / Active=trueTransmit Limit :10 packets/hello-timeProtection Type :NoneMSTP BPDU format :Config=legacyPort ConfigDigest Snooping :disabledNum of Vlans Mapped :1PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20BPDU Sent :114TCN: 0,

22、Config: 114, RST: 0, MST: 0BPDU Received :1TCN: 1, Config: 0, RST: 0, MST: 0SwitchBdisplay stp interface ethernet1/ 0/2-Port2(Ethernet1/0/2)FORWARDINGPort Protocol :enabledPort Role :CIST Designated PortPort Priority :128Port Cost(Legacy) :Config=auto / Active=200Desg. Bridge/Port :32768.000f-e249-d

23、546 / 128.2Port Edged :Config=disabled / Active=disabledPoint-to-point :Config=auto / Active=trueTransmit Limit :10 packets/hello-timeProtection Type :NoneMSTP BPDU format :Config=legacyPort ConfigDigest Snooping :disabledNum of Vlans Mapped :1PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHo

24、p 20BPDU Sent :132TCN: 0, Config: 132, RST: 0, MST: 0BPDU Received :0TCN: 0, Config: 0, RST: 0, MST: 0验证网络拓扑发生变化时,ping的丢包情况。C:ping 192.168.10.3 t !从主机 PC1 ping PC2 (用连续 ping),然后拔掉 SwitchA与 SwitchB 的端口 F0/1之间的连线,观察丢包情况。C:ping 192.168.10.3 -tPinging 192.168.10.3 with 32 bytes of data:Reply from 192.16

25、8.10.3: bytes=32 time1ms TTL=128Reply from 192.168.10.3: bytes=32 time1ms TTL=128Reply from 192.168.10.3: bytes=32 time1ms TTL=128Reply from 192.168.10.3: bytes=32 time1ms TTL=128Request timed out.Request timed out.Request timed out.Request timed out.Request timed out.Request timed out.Reply from 192.168.10.3: bytes=32 time1ms TTL=128Reply from 192.168.10.3: bytes=32 time1ms TTL=128Reply from 192.168.10.3: bytes=32 time1ms TTL=128Reply from 192.168.10.3: bytes=32 time1ms TTL=128Reply from 192.168.10.3: bytes=32 time1ms TTL=12

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论