




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实验拓扑图:STP 及其优化实验步骤:1. 设置 SW1,SW2, SW3主机名分别为 Core1,Core2, ED-SW2. 把 Core1与 Core2 间的两条链路绑定成 etherchannel2 ,并设置成 Trunk modeCore1:支持 ISL 及 dot1Q 的交换机必须设置 trunk 的封装interface range fa0/23 - 24switchport trunk encapsulation dot1q /协议。低端的 C2950,C2960,C2918 只支持 dot1Q,无此命令。switch mode trunk / channel-group 2
2、mode on /Creating a port-channel interface Port-channel 2/interface Port-channel2 /接口设置为 Trunk 模式。接口加入 Etherchannel2 。系统提示自动创建 port-channel2 。Port-channel2 接口配置必须同物理接口一致。switchport trunk encapsulation dot1q switchport mode trunkCore2:interface range fa0/23 - 24 switchport trunk encapsulation dot1q s
3、witch mode trunk channel-group 2 mode onCreating a port-channel interface Port-channel 2 interface Port-channel2switchport trunk encapsulation dot1q switchport mode trunk3. 验证 etherchannel 设置显示 etherchannel 的详细信息Core1#sh etherchannel summary / Flags: D - downP - in port-channelI - stand-alone s - su
4、spended H - Hot-standby (LACP only)R - Layer3 S - Layer2U - in use f - failed to allocate aggregator u - unsuitable for bundlingw - waiting to be aggregatedd - default port目前已经建好 1 个 etherchannel 。Number of channel-groups in use: 1/Number of aggregators:1Group Port-channel Protocol Ports+2 Po2(SU)fa
5、0/23(P) fa0/24(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#sh
6、ow interface trunkPort Mode Encapsulation Status Native vlanFa0/21 on 802.1q trunking 1 / 式为 ON,封装为 802.1q ,目前已经形成 Po2on802.1q trunking 1F0/21 ,Trunk 模Trunking ,native vlan 为 vlan 1 。PortVlans allowed on trunkFa0/211-4094/此 Trunk 允许所有的 vlan 流量通过。Po21-4094PortFa0/21/此交换域只有vlan 1 是活动的 vlan 。因为现在无其他 vl
7、anPo2PortFa0/21Vlans in spanning tree forwarding state and not prunedVlan 没有被 vtp 修剪/Po2Vlans allowed and active in management domain6. 添加 vlan1-10, 奇数 vlan 生成树根选择 Core1,偶数 vlan 生成树根选择 Core2Core1 , Core2, ED-SW:vlan 2 / 添加 vlan 2name testvlan2/ 命名 vlan 2 为 testvlan2vlan 3name testvlan3vlan 4name tes
8、tvlan4 vlan 5name testvlan5vlan 6name testvlan6vlan 7name testvlan7vlan 8name testvlan8 vlan 9name testvlan9vlan 10name testvlan107. 验证新添加的 vlanCore1#sh vlan brief/ Vlan 标号列, vlan 名字,状态,及对应端口VLAN Name Status Ports1 defaultactive Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa
9、0/11, Fa0/12Fa0/13, Fa0/14, Fa0/15, Fa0/16Fa0/17, Fa0/18, Fa0/19, Fa0/20Fa0/22, Gi0/1, Gi0/2/ 这些端口默认划分到vlan1 ,注意 Fa0/21,23,24不在这里,因为这 3 个端口做成了 Trunk2 testvlan2 部分输出忽略9 testvlan910 testvlan101002 fddi-defaultactiveactiveactive act/unsup /这些为特殊 vlan ,现在基本不用1003 token-ring-defaultact/unsup8. 验证新添加的 vla
10、nCore1#sh spanning-treeVLAN0001Spanning tree enabled protocol ieee/ Spanning-tree 为 ieee 标准Root ID Priority 32769 / 此交换机 vlan 1 的优先级默认 32728 vlan 的标号,则 vlan2 为 327682,其他 vlan 类似。Address 000d.65dc.8800 / 交换机 MACThis bridge is the root/ 此交换机已经成为 valn1 的 root ,默认情况一台交换机成为所有 vlan 的 rootHello Time 2 sec
11、Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Address 000d.65dc.8800Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300InterfaceRoleStsCostPrio.Nbr TypeFa0/4DesgFWD19128.4P2pFa0/21DesgFWD19128.21P2p /状态,STP Cost 为 19Po2DesgFWD12128.65P2pF0/2
12、1 为指定端口, 处于转发VLAN0002Spanning tree enabled protocol ieeeRoot ID Priority 32770Address 000d.65dc.8800This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32770 (priority 32768 sys-id-ext 2)Address 000d.65dc.8800Hello Time 2 sec Max Age 20 sec Forward Delay 15
13、secAging Time 300InterfaceRole Sts Cost Prio.Nbr TypeFa0/21 Desg FWD 19 128.21 P2pPo2Desg 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 primary spanning-tree vlan 2,4,6,8,10 root
14、secondaryCore2 :spanning-tree vlan 1,3,5,7,9 root secondaryspanning-tree vlan 2,4,6,8,10 root primary10. 验证根配置Core1#sh spanning-treeVLAN0001Spanning tree enabled protocol ieee Root ID Priority 24577Address 000d.65dc.8800 This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBrid
15、ge ID Priority 24577 (priority 24576 sys-id-ext 1) Address 000d.65dc.8800Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300InterfaceRole Sts CostPrio.Nbr TypeFa0/4Desg FWD 19128.4P2pFa0/21Desg FWD 19128.21P2pPo2Desg FWD 12128.65P2pVLAN0002Spanning tree enabled protocol ieeeRoot ID P
16、riority 24578 / 根网桥优先级及 MAC,vlan2 的根已经变成了 Core2 Address 0013.80e2.4880Cost 12Port 65 (Port-channel2)本网桥优先级及 MAC地址Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 28674 (priority 28672 sys-id-ext 2)Address 000d.65dc.8800Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging T
17、ime 300InterfaceRole Sts CostPrio.Nbr TypeFa0/21Desg FWD 19128.21 P2pPo2Root FWD 12128.65 P2p /指定端口变成了根端口Core1#sh runspanning-tree mode pvst / 生成树模式,默认为 PVST spanning-tree vlan 1,3,5,9 priority 24576spanning-tree vlan 2,4,6,8,10 priority 28672 /命令被自动转换,也可以直接使用此命令11. 把 PC接入到 ED-SW的 Fa0/2 ,并记录端口指示灯转换到
18、绿色的时间 _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 enabled, can cause temporary bridgi
19、ng 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 启用所有的端口 portfast 功能12. 重新插拔 PC与
20、 ED-SW的网线,再次记录端口指示灯转换到绿色的时间 _S 验证 portfast 已经在 Fa0/2 口上启用ed-sw#sh spanning-tree interface f0/2 portfastVLAN0001 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 Vlan1ip address 192.168.88.201 255.255.255.0no shut
21、endCore2 :interface Vlan1ip address 192.168.88.202 255.255.255.0no 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 uplinkfastUplinkFast is
22、 enabled17. 在 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 uplinkfast19. 启用 Core1,Core2,ED-SW的 RSTP功能Core1,Core2,ED-SW:(Config)# spanning-tree mode rapid-pvst20. 验证 RSTP是否启用ed-sw#sh spanning-tr
23、eeVLAN0001Spanning tree enabled protocol rstp / 生成树模式Root ID Priority 24577Address 000d.65dc.8800Cost 19Port 23 (FastEthernet0/23)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Address 000d.bdbb.7480Hello Time 2 sec Max Age 20 sec Forward De
24、lay 15 secAging Time 300InterfaceRole Sts CostPrio.Nbr TypeFa0/2Desg FWD 19128.2 Edge P2p /边缘端口Fa0/4Desg BLK 19128.4 P2pFa0/23Root FWD 19128.23 P2pFa0/24Altn BLK 19128.24 P2p /被阻塞的端口VLAN0002Spanning tree enabled protocol rstpRoot ID Priority 24578Address 0013.80e2.4880Cost 19Port 24 (FastEthernet0/2
25、4)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32770 (priority 32768 sys-id-ext 2)Address 000d.bdbb.7480Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300InterfaceRole Sts CostPrio.Nbr TypeFa0/23Altn BLK 19128.23 P2pFa0/24 Root FWD 19 128.24 P2p在 PC 的 DOS命令行
26、下:ping 192.168.88.201 -t /不停的 Ping 192.168.88.201断掉 ED-SW到 Core1 的连接,记录 ping 包丢失了 _个21. 配置 MST,2Core1,Core2,ED-SW上启用两个 MST Instance 1Vlan1,3,5,7,Vlan2 ,4,6,8,Core1 instance 19 映射到 Instance 110映射到 Instance 2优先级设为 4096Instacen 2 优先级设置 16384 spanning-tree mst 1 priority 16384 spanning-tree mst 2 priori
27、ty 8192Core2 instance 1Instacen 2优先级设为 16384优先级设置 4096Core1:spanning-tree mode mst spanning-tree mst configuration instance 1 vlan 1, 3, 5, 7, 9 instance 2 vlan 2, 4, 6, 8, 10spanning-tree mst 1 priority 16384 spanning-tree mst 2 priority 8192Core2 :spanning-tree mode mst spanning-tree mst configura
28、tion instance 1 vlan 1, 3, 5, 7, 9 instance 2 vlan 2, 4, 6, 8, 10ED-SW: spanning-tree mode mst spanning-tree mst configuration instance 1 vlan 1, 3, 5, 7, 9 instance 2 vlan 2, 4, 6, 8, 1022. 验证 MST配置Core2#sh spanning-treeMST0Spanning tree enabled protocol mstpRoot ID Priority 32768Address 000d.65dc.
29、8800Cost 0Port 65 (Port-channel2)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32768 (priority 32768 sys-id-ext 0)Address 0013.80e2.4880Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterfaceRole Sts Cost Prio.Nbr TypeFa0/4Desg FWD 200000 128.4 P2pFa0/21Desg FWD 200000
30、 128.21 P2p Pre-STD-RxPo2Root FWD 100000 128.65 P2pMST1Spanning tree enabled protocol mstpRoot ID Priority 16385Address 0013.80e2.4880This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 16385 (priority 16384 sys-id-ext 1)Address 0013.80e2.4880Hello Time 2 se
31、c Max Age 20 sec Forward Delay 15 secFa0/4InterfaceRole Sts Cost Prio.Nbr TypeDesg FWD 200000 128.4 P2pFa0/21Desg FWD 200000 128.21 P2p Pre-STD-RxPo2 Desg FWD 100000 128.65 P2pMST2Spanning tree enabled protocol mstpRoot ID Priority 8194Address 0013.80e2.4880This bridge is the rootHello Time 2 sec Ma
32、x Age 20 sec Forward Delay 15 secBridge ID Priority 8194 (priority 8192 sys-id-ext 2)Address 0013.80e2.4880Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr TypeFa0/21 Desg FWD 200000 128.21 P2p Pre-STD-RxPo2Desg FWD 100000 128.65 P2p23. 配置 ED-SW BPDU Guarded-sw(co
33、nfig-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. /端口启用此功能后,收到任何BPDU信息,则此端口进入err-disable 状态02:51:16: %PM-4-ERR_DISABLE: bpduguard error detected on
34、Fa0/24, putting Fa0/24 in err-disable state02:51:17: %LINEPROTO-5-UPDOWLNin: e protocol on Interface FastEthernet0/24, changed state to down24. 配置 ED-SW F0/24端口,启用 Guard Root 功能ed-sw(config-if)# spanning-tree guard root02:54:56: %SPANTREE-2-ROOTGUARD_CONFIG_CHANGE: Root guard enabled on port FastEth
35、ernet0/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-treeMST00Spanning tree enabled protocol mstpRoot ID Priority 32768Address 000d.65dc.8800CostPort 23 (FastEth
36、ernet0/23)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32768 (priority 32768 sys-id-ext 0)Address 000d.bdbb.7480Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterfaceRole Sts CostPrio.Nbr TypeFa0/2Desg FWD 200000128.2Edge P2pFa0/4Desg FWD 200000128.4P2pFa0/23Root FWD 200000128.23P2pFa0/24Desg BKN*2
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年初级卫生职称-初级技师-营养(士)代码:108历年参考题库含答案解析
- 学校保安服务方案(3篇)
- 会展服务租赁采购方案(3篇)
- 中餐企业文化方案(3篇)
- 工厂岗位评测方案模板(3篇)
- 施工公司纪律整顿方案(3篇)
- 消防员培训方案(3篇)
- 路基施工沉降观测方案(3篇)
- 农村房子顶棚改造方案(3篇)
- 农田机井修复方案(3篇)
- IInterlib区域图书馆集群管理系统-用户手册
- EnglishDrama英语戏剧写作及表演技巧课件
- DB11T 827-2019 废旧爆炸物品销毁处置安全管理规程
- 社会组织管理概论全套ppt课件(完整版)
- 轧机设备安装施工方案
- DB31∕T 926-2015 城镇供水管道水力冲洗技术规范
- (完整版)IATF16949新版过程乌龟图的编制与详解课件
- 制药企业仓库温湿度分布的验证
- 满堂脚手架工程施工方案
- LY∕T 2705-2016 樟脑磺酸
- GB∕T 3099.4-2021 紧固件术语 控制、检查、交付、接收和质量
评论
0/150
提交评论