![生成树的详细配置及实验[1]_第1页](http://file2.renrendoc.com/fileroot_temp3/2021-10/17/5e55d442-d986-4902-8087-290c4e9a110c/5e55d442-d986-4902-8087-290c4e9a110c1.gif)
![生成树的详细配置及实验[1]_第2页](http://file2.renrendoc.com/fileroot_temp3/2021-10/17/5e55d442-d986-4902-8087-290c4e9a110c/5e55d442-d986-4902-8087-290c4e9a110c2.gif)
![生成树的详细配置及实验[1]_第3页](http://file2.renrendoc.com/fileroot_temp3/2021-10/17/5e55d442-d986-4902-8087-290c4e9a110c/5e55d442-d986-4902-8087-290c4e9a110c3.gif)
![生成树的详细配置及实验[1]_第4页](http://file2.renrendoc.com/fileroot_temp3/2021-10/17/5e55d442-d986-4902-8087-290c4e9a110c/5e55d442-d986-4902-8087-290c4e9a110c4.gif)
![生成树的详细配置及实验[1]_第5页](http://file2.renrendoc.com/fileroot_temp3/2021-10/17/5e55d442-d986-4902-8087-290c4e9a110c/5e55d442-d986-4902-8087-290c4e9a110c5.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、STP及其优化实验拓扑图:实验步骤:1. 设置SW1,SW2,SW3主机名分别为Core1,Core2, ED-SW2. 把Core1与Core2间的两条链路绑定成etherchannel2,并设置成Trunk modeCore1:interface range fa0/23 - 24 switchport trunk encapsulation dot1q /支持ISL及dot1Q的交换机必须设置trunk的封装协议。低端的C2950,C2960,C2918只支持dot1Q,无此命令。 switch mode trunk /接口设置为Trunk模式。 channel-group 2 mode
2、 on /接口加入Etherchannel2。Creating a port-channel interface Port-channel 2 /系统提示自动创建port-channel2。interface Port-channel2 / Port-channel2接口配置必须同物理接口一致。 switchport trunk encapsulation dot1q switchport mode trunkCore2:interface range fa0/23 - 24 switchport trunk encapsulation dot1q switch mode trunk chan
3、nel-group 2 mode onCreating a port-channel interface Port-channel 2interface Port-channel2 switchport trunk encapsulation dot1q switchport mode trunk3. 验证etherchannel设置Core1#sh etherchannel summary /显示etherchannel的详细信息Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby
4、(LACP only) R - Layer3 S - Layer2 U - in use f - failed to allocate aggregator u - unsuitable for bundling w - waiting to be aggregated d - default portNumber of channel-groups in use: 1 /目前已经建好1个etherchannel。Number of aggregators: 1Group Port-channel Protocol Ports-+-+-+-2 Po2(SU) - fa0/23(P) fa0/2
5、4(P) / S - Layer2 U - in use P - in port-channel4. Core1,Core2,ED-SW间的所有链路均设置成TrunkED-SW:int range f0/23 24no shutdownswitchport mode trunkCore1:int f0/21 switch trunk encap dot1q switch mode trunkCore2:int f0/21 switch trunk encap dot1q switch mode trunk5. 验证etherchannel设置Core2#show interface trunk
6、 Port Mode Encapsulation Status Native vlanFa0/21 on 802.1q trunking 1 / F0/21,Trunk模式为ON,封装为802.1q,目前已经形成Trunking,native vlan为vlan 1。Po2 on 802.1q trunking 1Port Vlans allowed on trunkFa0/21 1-4094 /此Trunk允许所有的vlan流量通过。Po2 1-4094Port Vlans allowed and active in management domainFa0/21 1 /此交换域只有vlan
7、 1是活动的vlan。因为现在无其他vlanPo2 1Port Vlans in spanning tree forwarding state and not prunedFa0/21 1 /Vlan没有被vtp修剪Po2 16. 添加vlan1-10,奇数vlan生成树根选择Core1,偶数vlan生成树根选择Core2Core1,Core2,ED-SW:vlan 2 /添加vlan 2 name testvlan2 /命名vlan 2为testvlan2vlan 3 name testvlan3vlan 4 name testvlan4vlan 5 name testvlan5vlan 6
8、 name testvlan6vlan 7 name testvlan7vlan 8 name testvlan8vlan 9 name testvlan9vlan 10 name testvlan107. 验证新添加的vlanCore1#sh vlan brief / Vlan标号列,vlan名字,状态,及对应端口VLAN Name Status Ports- -1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14,
9、 Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/22, Gi0/1, Gi0/2 /这些端口默认划分到vlan1,注意Fa0/21,23,24不在这里,因为这3个端口做成了Trunk2 testvlan2 active 部分输出忽略 9 testvlan9 active 10 testvlan10 active 1002 fddi-default act/unsup /这些为特殊vlan,现在基本不用1003 token-ring-default act/unsup8. 验证新添加的vlanCore1#sh spanning-tree VL
10、AN0001 Spanning tree enabled protocol ieee /Spanning-tree为ieee标准 Root ID Priority 32769 /此交换机vlan 1的优先级默认32728vlan的标号,则vlan2为327682,其他vlan类似。 Address 000d.65dc.8800 /交换机MAC This bridge is the root /此交换机已经成为valn1的root,默认情况一台交换机成为所有vlan的root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge
11、ID Priority 32769 (priority 32768 sys-id-ext 1) Address 000d.65dc.8800 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/4 Desg FWD 19 128.4 P2p Fa0/21 Desg FWD 19 128.21 P2p / F0/21为指定端口,处于转发状态,STP Cost为19Po2 Desg FWD 12 128.65 P2
12、p VLAN0002 Spanning tree enabled protocol ieee Root ID Priority 32770 Address 000d.65dc.8800 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32770 (priority 32768 sys-id-ext 2) Address 000d.65dc.8800 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
13、 Aging Time 300 Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/21 Desg FWD 19 128.21 P2p Po2 Desg FWD 12 128.65 P2p9. 设置Core1为vlan 1,3,5,7,9的主根作为vlan2,4,6,8,10的次根设置Core2为vlan2,4,6,8,10的主根作为vlan1,3,5,7,9的次根Core1:spanning-tree vlan 1,3,5,7,9 root primaryspanning-tree vlan 2,4,6,8,10 root secondar
14、yCore2:spanning-tree vlan 1,3,5,7,9 root secondaryspanning-tree vlan 2,4,6,8,10 root primary10. 验证根配置Core1#sh spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 000d.65dc.8800 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge I
15、D Priority 24577 (priority 24576 sys-id-ext 1) Address 000d.65dc.8800 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/4 Desg FWD 19 128.4 P2p Fa0/21 Desg FWD 19 128.21 P2p Po2 Desg FWD 12 128.65 P2p VLAN0002 Spanning tree enabled
16、 protocol ieee Root ID Priority 24578 /根网桥优先级及MAC,vlan2的根已经变成了Core2 Address 0013.80e2.4880 Cost 12 Port 65 (Port-channel2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 28674 (priority 28672 sys-id-ext 2) 本网桥优先级及MAC地址 Address 000d.65dc.8800 Hello Time 2 sec Max Age 20 sec F
17、orward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/21 Desg FWD 19 128.21 P2p Po2 Root FWD 12 128.65 P2p /指定端口变成了根端口Core1#sh runspanning-tree mode pvst /生成树模式,默认为PVSTspanning-tree vlan 1,3,5,9 priority 24576spanning-tree vlan 2,4,6,8,10 priority 28672 /命令被自动转换,也可以直接
18、使用此命令11. 把PC接入到ED-SW的Fa0/2,并记录端口指示灯转换到绿色的时间_S为了解决交换机端口转发延迟问题,启用Fa0/2的portfast功能ED-SW:ed-sw(config-if)#spanning-tree portfast %Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc. to this interface when portfast is enabl
19、ed, can cause temporary bridging loops. Use with CAUTION /告警信息,建议启用了portfast功能的接口只连接单台主机,接其他设备可能会发生环路%Portfast has been configured on FastEthernet0/2 but will only have effect when the interface is in a non-trunking mode. / Portfast功能只在非Trunk模式下生效注:也可以在全局模式下输入spanning-tree portfast default启用所有的端口por
20、tfast功能12. 重新插拔PC与ED-SW的网线,再次记录端口指示灯转换到绿色的时间_S验证portfast已经在Fa0/2口上启用ed-sw#sh spanning-tree interface f0/2 portfast VLAN0001 enabled13. 配置PC IP地址:192.168.88.203/24配置Core1 Vlan1 IP地址:192.168.88.201/24配置Core2 Vlan1 IP地址:192.168.88.202/24Core1:interface Vlan1 ip address 192.168.88.201 255.255.255.0 no s
21、hutendCore2:interface Vlan1 ip address 192.168.88.202 255.255.255.0 no shutend14. 在PC的DOS命令行下: ping 192.168.88.201 -t /不停的Ping 192.168.88.201断掉ED-SW到Core1的连接,记录ping包丢失了_个15. 在ED-SW上配置uplinkfasted-sw(config)#spanning-tree uplinkfast16. 验证uplinkfasted-sw#sh spanning-tree uplinkfast UplinkFast is enabl
22、ed17. 在PC的DOS命令行下: ping 192.168.88.201 -t /不停的Ping 192.168.88.201断掉ED-SW到Core1的连接,记录ping包丢失了_个18. 取消ED-SW的uplinkfast功能ed-sw(config)#no spanning-tree uplinkfast 19. 启用Core1,Core2,ED-SW的RSTP功能Core1,Core2,ED-SW:(Config)#spanning-tree mode rapid-pvst20. 验证RSTP是否启用ed-sw#sh spanning-tree VLAN0001 Spanning
23、 tree enabled protocol rstp /生成树模式 Root ID Priority 24577 Address 000d.65dc.8800 Cost 19 Port 23 (FastEthernet0/23) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 000d.bdbb.7480 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
24、Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/2 Desg FWD 19 128.2 Edge P2p /边缘端口Fa0/4 Desg BLK 19 128.4 P2p Fa0/23 Root FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p /被阻塞的端口 VLAN0002 Spanning tree enabled protocol rstp Root ID Priority 24578 Address 0013.80e2.4880 Cost 19 Port
25、24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32770 (priority 32768 sys-id-ext 2) Address 000d.bdbb.7480 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/23 Altn BLK 19 128.23 P2p Fa
26、0/24 Root FWD 19 128.24 P2p在PC的DOS命令行下:ping 192.168.88.201 -t /不停的Ping 192.168.88.201断掉ED-SW到Core1的连接,记录ping包丢失了_个21. 配置MSTCore1,Core2,ED-SW上启用两个MST Instance 1,2Vlan1,3,5,7,9映射到Instance 1Vlan2,4,6,8,10映射到Instance 2Core1 instance 1优先级设为 4096 Instacen 2优先级设置 16384Core2 instance 1优先级设为 16384 Instacen 2
27、优先级设置 4096Core1:spanning-tree mode mstspanning-tree mst configuration instance 1 vlan 1, 3, 5, 7, 9 instance 2 vlan 2, 4, 6, 8, 10spanning-tree mst 1 priority 16384spanning-tree mst 2 priority 8192Core2:spanning-tree mode mstspanning-tree mst configuration instance 1 vlan 1, 3, 5, 7, 9 instance 2 vl
28、an 2, 4, 6, 8, 10spanning-tree mst 1 priority 16384spanning-tree mst 2 priority 8192ED-SW:spanning-tree mode mstspanning-tree mst configuration instance 1 vlan 1, 3, 5, 7, 9 instance 2 vlan 2, 4, 6, 8, 1022. 验证MST配置Core2#sh spanning-tree MST0 Spanning tree enabled protocol mstp Root ID Priority 3276
29、8 Address 000d.65dc.8800 Cost 0 Port 65 (Port-channel2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 0) Address 0013.80e2.4880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/4 Desg FW
30、D 200000 128.4 P2p Fa0/21 Desg FWD 200000 128.21 P2p Pre-STD-Rx Po2 Root FWD 100000 128.65 P2p MST1 Spanning tree enabled protocol mstp Root ID Priority 16385 Address 0013.80e2.4880 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 16385 (priority 16384
31、sys-id-ext 1) Address 0013.80e2.4880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/4 Desg FWD 200000 128.4 P2p Fa0/21 Desg FWD 200000 128.21 P2p Pre-STD-Rx Po2 Desg FWD 100000 128.65 P2p MST2 Spanning tree enabled protocol mstp Root ID Prior
32、ity 8194 Address 0013.80e2.4880 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 8194 (priority 8192 sys-id-ext 2) Address 0013.80e2.4880 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/21 Desg FW
33、D 200000 128.21 P2p Pre-STD-Rx Po2 Desg FWD 100000 128.65 P2p23. 配置ED-SW BPDU Guarded-sw(config-if)#int f0/24ed-sw(config-if)#spanning-tree bpduguard enableed-sw(config-if)#02:51:16: %SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port FastEthernet0/24 with BPDU Guard enabled. Disabling port. /端口启用此功能
34、后,收到任何BPDU信息,则此端口进入err-disable状态02:51:16: %PM-4-ERR_DISABLE: bpduguard error detected on Fa0/24, putting Fa0/24 in err-disable state02:51:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down24. 配置ED-SW F0/24端口,启用Guard Root功能ed-sw(config-if)#spanning-tree guard
35、root 02:54:56: %SPANTREE-2-ROOTGUARD_CONFIG_CHANGE: Root guard enabled on port FastEthernet0/24.02:54:56: %SPANTREE-2-ROOTGUARD_BLOCK: Root guard blocking port FastEthernet0/24 on MST00. /启用此功能后, 如果F0/24端口接入了=目前根交换机生成树优先级的交换机,则Block此端口25. 验证ED-SW的STP状态ed-sw#sh spanning-tree MST00 Spanning tree enabl
36、ed protocol mstp Root ID Priority 32768 Address 000d.65dc.8800 Cost 0 Port 23 (FastEthernet0/23) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 0) Address 000d.bdbb.7480 Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/2 Desg FWD 200000 128.2 Edge P2p Fa0/4 Desg FWD 200000 128.4 P2p Fa0/23 Root FWD 200000 128.23 P2p Fa0/24 Desg BKN*200000 128.24 P2p *
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 统编版语文五年级下册第13课《人物描写一组》精美课件
- 江苏省苏州市园区2025年初三下学期2月月考生物试题含解析
- 全国18名校2025年(高三一模文)生物试题检测试题试卷含解析
- 景德镇学院《中药与生药学》2023-2024学年第一学期期末试卷
- 吉林省“五地六校”2025年高考数学试题考前模拟试题含解析
- 山西机电职业技术学院《建筑工程土建预算编制》2023-2024学年第二学期期末试卷
- 拉萨师范高等专科学校《植物组织培养学》2023-2024学年第二学期期末试卷
- 上海行健职业学院《中国现代通俗文学》2023-2024学年第二学期期末试卷
- 江苏护理职业学院《混凝土结构基本》2023-2024学年第二学期期末试卷
- 西藏那曲地区2025届三下数学期末质量检测试题含解析
- 项目2自动售货机的PLC控制
- 药品研发合作协议书
- ANPQP概要-主要表单介绍及4M变更流程
- 2023年山东司法警官职业学院招聘考试真题
- 氯乙酸安全技术说明书MSDS
- 农村集体土地租赁合同范本村集体土地房屋租
- 电焊烟尘职业危害培训课件
- 2024年内蒙古通辽新正电工技术服务有限公司招聘笔试参考题库附带答案详解
- 《公司法培训》课件
- 印章可疑情况管理制度
- 基于单片机的汽车超载控制系统的设计
评论
0/150
提交评论