ImageVerifierCode 换一换
格式:DOCX , 页数:49 ,大小:194.25KB ,
资源ID:6117117      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6117117.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(生成树.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

生成树.docx

1、生成树BPDU 桥协议数据单元 2sBID、路径开销、端口ID、ROOT IDBID(桥ID)=设备优先级+MAC设备优先级:是一个数字,取值范围0-61440,交换机上默认是32768MAC:show version中间的Base ethernet MAC Address: 000D.BD24.EB8E路径开销cost:用来衡量当前设备到达根桥之间的距离,基于带宽。实际计算当前设备各个端口它到达根桥之间的路径开销之总和。端口ID=端口优先级+端口号端口优先级:是一个数字,取值范围0-240,各个端口默认是128ROOT ID=设备优先级+MAC表示当前网络里的树根那个设备的信息生成树的计算:

2、1 谁是根桥(ROOT)?(全网只有一个根桥)根桥的计算是比较Bridge ID,先比优先级,如果优先级一样,在比较MAC地址,取最小的谁最小谁就是我们的根桥。2 根端口 (各台交换机计算自己的根端口)流量转发端口路径开销:先比各个端口到达根桥的总路径开销,谁的路径开销小谁成为根端口相邻设备的BID:在比较于各个端接口相连设备的BID,谁连接的设备BID小,谁成为根端口。PORT ID:比较链路上各个端口的PORT ID,谁的小,谁成为我们的根端口。3 指定端口计算 (相对于流量的)流量转发端口路径开销:网络中可以帮忙转发流量的各个端口各自到达到根桥的总路径开销,取最小的 哪个端口的路径开销小

3、,哪个端口成为指定端口。BID:比较各端口所在设备的BID,哪个端口所在设备的BID小,哪个端口成为指定端口。端口ID:比较相连端口的端口ID,哪个端口的端口ID小,哪个端口成为指定端口。根桥设备的所有端口都是指定端口。查看根桥:ROOT#show spanning-tree vlan 1VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0001.4359.3E50 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward

4、Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0001.4359.3E50 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/2 Desg FWD 19 128.2 P2pFa0/1 Desg FWD 19 128.1 P2p查看其他设备:Switch#show spanning-tree vlan 1VL

5、AN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0001.4359.3E50 Cost 19 Port 1(FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 00D0.D358.A8DB Hello Time 2 sec Max Age 20 sec Forward Delay 15

6、 sec Aging Time 20Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/2 Desg FWD 19 128.2 ShrFa0/1 Root FWD 19 128.1 P2pFa0/3 Desg FWD 19 128.3 P2pFa0/5 Altn BLK 19 128.5 ShrFa0/4 Desg FWD 19 128.4 P2p公共生成树端口类型:根端口:具备流量转发能力指定端口:具备流量转发能力非指定端口(阻塞):不能转发流量。如果在连续的20秒内没有接收到对端的BPDU,会自动向转发状态过渡(指定端口),会经历三个状态

7、的变化:监听(15秒)、学习(15秒)、转发。公共生成树的五个状态:侦听:15秒,发送和接受BPDU数据包,不会基于当前接口构建MAC地址表,但是不转发流量。(设备刚刚接入,阻塞端口连续20秒没有收到BPDU)学习:15秒,发送和接受BPDU数据包,准备进行流量转发,开始学习MAC地址转发:转发流量,发送和接受BPDU数据包,可以学习和维护CAM表阻塞:可以接收BPDU,最大维持20秒,20秒内每次接收到BPDU则计时器值恢复为0.禁用:不参与生成树公共生成树端口状态切换:测试一:阻塞端口转换到转发端口 测试设备SW3,我们关闭SW3上ROOT PORT直连链路,shutdown SW4的F0

8、/24SW3(config)#service timestamps debug datetime msec localtimeSW3#debug spanning-tree events Spanning Tree event debugging is onSW4(config)#int f0/24SW4(config-if)#shutdownSW4(config-if)#exitSW4(config)#SW3#*Mar 18 19:40:27.637: STP: VLAN0001 new root port Fa0/19, cost 38*Mar 18 19:40:27.637: STP:

9、VLAN0001 Fa0/19 - listening*Mar 18 19:40:29.637: STP: VLAN0001 sent Topology Change Notice on Fa0/19*Mar 18 19:40:42.637: STP: VLAN0001 Fa0/19 - learning*Mar 18 19:40:57.637: STP: VLAN0001 Fa0/19 - forwardingSW3# sh span vlan 1VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Addre

10、ss 000a.8a22.4400 Cost 38 Port 19 (FastEthernet0/19) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0011.bb66.1880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -F

11、a0/19 Root FWD 19 128.19 P2pF0/24接口恢复的日志:2w3d: %LINK-3-UPDOWN: Interface FastEthernet0/24, changed state to up*Mar 18 19:43:11.241: set portid: VLAN0001 Fa0/24: new port id 8018*Mar 18 19:43:11.241: STP: VLAN0001 Fa0/24 - listening*Mar 18 19:43:11.249: STP: VLAN0001 new root port Fa0/24, cost 38*Mar

12、 18 19:43:11.249: STP: VLAN0001 sent Topology Change Notice on Fa0/24*Mar 18 19:43:11.249: STP: VLAN0001 Fa0/19 - blocking2w3d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up*Mar 18 19:43:26.241: STP: VLAN0001 Fa0/24 - learning*Mar 18 19:43:41.241: STP: VLAN000

13、1 Fa0/24 - forwardingSW3#结果:端口状态转换用时30秒优化:SW3(config)#spanning-tree uplinkfast*Mar 18 21:43:09.121: setting bridge id (which=1) prio 49153 prio cfg 49152 sysid 1 (on) id C001.0011.bb66.1880配置在各台设备上的,只对当前设备有效,打开uplinkfast之后,优先级变为49152,当前设备的cost自动向上+3000SW3#show spanning-tree vlan 1VLAN0001 Spanning t

14、ree enabled protocol ieee Root ID Priority 32769 Address 000a.8a22.4400 Cost 3038 Port 24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 49153 (priority 49152 sys-id-ext 1) Address 0011.bb66.1880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging T

15、ime 300 Uplinkfast enabledInterface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/19 Altn BLK 3019 128.19 P2p Fa0/24 Root FWD 3019 128.24 P2p优化测试:SW4(config)#int f0/24SW4(config-if)#shutdownSW4(config-if)#exitSW4(config)#SW3#*Mar 18 21:47:40.837: STP: VLAN0001 new root port Fa0/19, cost 30382w3d: %SPANT

16、REE_FAST-7-PORT_FWD_UPLINK: VLAN0001 FastEthernet0/19 moved to Forwarding (UplinkFast). 2w3d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down*Mar 18 21:47:42.837: STP: VLAN0001 sent Topology Change Notice on Fa0/19 2w3d: %LINK-3-UPDOWN: Interface FastEthernet0

17、/24, changed state to down SW3#SW3#sh span vl 1VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 000a.8a22.4400 Cost 3038 Port 19 (FastEthernet0/19) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 49153 (priority 49152 sys-id-ext 1) Address 0011.bb66

18、.1880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 15 Uplinkfast enabledInterface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/19 Root FWD 3019 128.19 P2pSW3 F0/24端口恢复的过程2w3d: %LINK-3-UPDOWN: Interface FastEthernet0/24, changed state to up*Mar 18 21:49:49.773: set portid: VLAN0001 Fa

19、0/24: new port id 8018*Mar 18 21:49:49.773: STP: VLAN0001 Fa0/24 - listening2w3d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up*Mar 18 21:49:51.157: STP: VLAN0001 Fa0/24: root port delay timer active*Mar 18 21:49:51.157: STP: VLAN0001 Fa0/24 - blockingSW3#SW3#

20、sh span vl 1VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 000a.8a22.4400 Cost 3038 Port 19 (FastEthernet0/19) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 49153 (priority 49152 sys-id-ext 1) Address 0011.bb66.1880 Hello Time 2 sec Max Age 20 s

21、ec Forward Delay 15 sec Aging Time 15 Uplinkfast enabledInterface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/19 Root FWD 3019 128.19 P2p Fa0/24 Altn BLK 3019 128.24 P2p SW3#*Mar 18 21:50:26.157: STP: VLAN0001 new root port Fa0/24, cost 3038*Mar 18 21:50:26.157: STP: VLAN0001 Fa0/19 - blocking (uplink

22、fast)2w3d: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 FastEthernet0/24 moved to Forwarding (UplinkFast).*Mar 18 21:50:26.157: STP: VLAN0001 sent Topology Change Notice on Fa0/24SW3#SW3#sh span vl 1VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 000a.8a22.4400 Cost 3038 Po

23、rt 24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 49153 (priority 49152 sys-id-ext 1) Address 0011.bb66.1880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 15 Uplinkfast enabledInterface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/19 Altn

24、 BLK 3019 128.19 P2p Fa0/24 Root FWD 3019 128.24 P2p测试二:阻塞端口转换到转发端口 测试设备SW3,我们关闭SW3上ROOT PORT相关的非直连链路,shutdown SW2的F0/19SW3# sh span vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 000a.8a22.4400 Cost 38 Port 24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Fo

25、rward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0011.bb66.1880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/19 Altn BLK 19 128.19 P2p Fa0/24 Root FWD 19 128.24 P2pSW2(config)#int f0/19SW2(conf

26、ig-if)#shutdownSW3# *Mar 18 19:46:02.413: STP: VLAN0001 heard root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:04.409: STP: VLAN0001 heard root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:06.409: STP: VLAN0001 heard root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:08.409: STP: VLAN0001 heard root 32

27、769-000e.d785.5300 on Fa0/24*Mar 18 19:46:10.409: STP: VLAN0001 heard root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:12.409: STP: VLAN0001 heard root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:14.409: STP: VLAN0001 heard root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:16.409: STP: VLAN0001 heard

28、 root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:18.409: STP: VLAN0001 heard root 32769-000e.d785.5300 on Fa0/24*Mar 18 19:46:20.245: STP: VLAN0001 new root port Fa0/19, cost 38*Mar 18 19:46:20.245: STP: VLAN0001 Fa0/19 - listening*Mar 18 19:46:20.409: STP: VLAN0001 heard root 32769-000e.d785.5300

29、on Fa0/24*Mar 18 19:46:20.409: STP: VLAN0001 Topology Change rcvd on Fa0/24*Mar 18 19:46:20.409: STP: VLAN0001 sent Topology Change Notice on Fa0/19 *Mar 18 19:46:35.245: STP: VLAN0001 Fa0/19 - learning*Mar 18 19:46:50.245: STP: VLAN0001 sent Topology Change Notice on Fa0/19*Mar 18 19:46:50.245: STP: VLAN0001 Fa0/19 - forwarding结果:端口状态转换用时50秒SW3#show spanning-tree vlSW3#show spanning-tree vlan 1VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 000a.8a22.4400 Cost 38 Port 19 (FastEthernet0/19) Hel

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1