付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实验拓扑图:STP及其优化实验步骤:1. 设置 SW1 SW2 SW3主机名分别为 Core1,Core2, ED-SW2. 把Corel与Core2间的两条链路绑定成 etherchannel2,并设置成Trunk modeCorel:支持ISL及dot1Q的交换机必须设置trunk的封装interface range fa0/23 - 24switchport trunk encapsulation dot1q /协议。低端的 C2950, C2960,C2918只支持dot1Q,无此命令。switch mode trunk/channel-group 2 mode on/Creating
2、 a port-channel interface Port-channel 2/interface Port-channel2/接口设置为Trunk模式。接口加入 Etherchannel2 。系统提示自动创建 port-channel2 。Port-channel2接口配置必须同物理接口一致。switchport trunk encapsulation dot1qswitchport mode trunkCore2:interface range fa0/23 - 24switchport trunk encapsulation dot1qswitch mode trunkchannel-
3、group 2 mode onCreating a port-channel interface Port-channel 2 interface Port-channel2switchport trunk encapsulation dot1qswitchport mode trunk3. 验证 etherchannel设置Core1#sh etherchannel summary/Flags: D - down P - in port-channelI - stand-alone s - suspendedH - Hot-standby (LACP only)R - Layer3 S -
4、Layer2U - in use f - failed to allocate aggregatoru - unsuitable for bundlingw - waiting to be aggregatedd - default portNumber of channel-groups in use: 1/Number of aggregators:1显示etherchannel 的详纟细信息目前已经建好1个etherchannel 。Group Port-channel Protocol Ports+2 Po2(SU)faO/23(P) faO/24(P) /S - Layer2 U -
5、 in use P - in port-channel4. Corel , Core2, ED-SW间的所有链路均设置成 TrunkED-SW:int range f0/23-24no shutdownswitchport mode trunkCore1: int fO/21 switch trunk encap dot1q switch mode trunkCore2: int f0/21 switch trunk encap dot1q switch mode trunk5. 验证 etherchannel 设置Core2#show interface trunkPort Mode Enc
6、apsulation 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。因为现在无其他vlanPo2PortFa0/21Vlans in spanning tree forwarding
7、state and not prunedVlan没有被vtp修剪/Po2Vlans allowed and active in management domain6. 添加vian1-10,奇数vlan生成树根选择Corel,偶数vlan生成树根选择Core2Corel , Core2, ED-SW:vlan 2/添加 vian 2name testvlan2/命名 vian 2 为 testvian2vlan 3name testvlan3vlan 4name testvlan4vlan 5name testvlan5vlan 6name testvlan6vlan 7name testvl
8、an7vlan 8name testvlan8vlan 9name testvlan9vlan 10name testvlanlO7. 验证新添加的vlanCore1#sh vlan brief /Vian标号列,vian名字,状态,及对应端口VLAN NameStatus Ports1 defaultactive Fa0/1, FaO/2, FaO/3, FaO/4FaO/5, FaO/6, FaO/7, FaO/8FaO/9, FaO/1O, FaO/11, FaO/12FaO/13, FaO/14, FaO/15, FaO/16FaO/17, FaO/18, FaO/19, FaO/2O
9、FaO/22, GiO/1, GiO/2/这些端口默认划分到vlan1,注意 FaO/21,23,24不在这里,因为这3个端口做成了 Trunk2 testvlan2部分输岀忽略9 testvlan910 testvlan1O1OO2 fddi-defaultactiveactiveactiveact/unsup /这些为特殊vlan,现在基本不用1OO3 token-ring-defaultact/unsup8. 验证新添加的vlanCore1#sh spanning-treeVLAN0001Spanning tree enabled protocol ieee /Spanning-tree
10、为 ieee 标准Root ID Priority 32769 /此交换机 vian 1 的优先级=默认 32728+ vlan的标号,则vlan2为32768 + 2,其他vian类似。Address 000d.65dc.8800/交换机 MACThis bridge is the root /此交换机已经成为valnl的root,默认情况一台交换机成为所有vlan的rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Addr
11、ess 000d.65dc.8800Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300InterfaceRoleStsCostPrio.NIbr TypeFa0/4DesgFWD19128.4P2pFa0/21DesgFWD19128.21P2p /状态,STP Cost 为 19Po2DesgFWD12128.65P2pF0/21为指定端口,处于转发VLAN0002Spanning tree enabled protocol ieeeRoot ID Priority 32770Address 000d.65dc
12、.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 secAging Time 300Interface Role Sts Cost Prio.Nbr TypeFa0/21 Desg FWD 19128.21 P2pPo2Desg FWD 1
13、2128.65 P2p9. 设置 Corel 为 vlan 1 , 3, 5, 7, 9 的主根作为vian2 , 4, 6, 8, 10的次根设置 Core2 为 vian2 , 4, 6, 8, 10 的主根作为vian1 , 3, 5, 7, 9的次根Corel :spanning-tree vlan 1,3,5,7,9 root primary spanning-tree vlan 2,4,6,8,10 root secondaryCore2 :spanning-tree vlan 1,3,5,7,9 root secondaryspanning-tree vlan 2,4,6,8,1
14、0 root primary10. 验证根配置Core1#sh spanning-treeVLAN0001Spanning tree enabled protocol ieeeRoot ID Priority 24577Address 000d.65dc.8800This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 24577 (priority 24576 sys-id-ext 1)Address 000d.65dc.8800Hello Time 2 sec
15、Max Age 20 sec Forward Delay 15 secAging Time 300InterfaceRole Sts CostPrio.Nbr TypeFa0/4Desg FWD 19128.4P2pFa0/21Desg FWD 19128.21P2pPo2Desg FWD 12128.65P2pVLAN0002Spanning tree enabled protocol ieeeRoot ID Priority 24578 /根网桥优先级及 MAC vian2的根已经变成了 Core2Address 0013.80e2.4880Cost12Port65 (Port-chann
16、el2)本网桥优先级及 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 Time 300InterfaceRole Sts CostPrio.Nbr TypeFaO/21Desg FWD 19128.21 P2pPo2Root FWD 12128.65 P2p /指
17、定端口变成了根端口Core1#sh runspanning-tree mode pvst /生成树模式,默认为 PVSTspanning-tree vlan 1,3,5,9 priority 24576spanning-tree vlan 2,4,6,8,10 priority 28672 /命令被自动转换,也可以直接使用此命令11. 把PC接入到ED-SW的FaO/2,并记录端口指示灯转换到绿色的时间_S为了解决交换机端口转发延迟问题,启用FaO/2的portfast功能ED-SW:ed-sw(config-if)# spanning-tree portfast%Warning: portf
18、ast should only be enabled on ports connected to a singlehost. Connecting hubs, concentrators, switches, bridges, etc. to thisinterface when portfast is enabled, can cause temporary bridging loops.Use with CAUTION/告警信息,建议启用了 portfast功能的接口只连接单台主机,接其他设备可 能会发生环路%Portfast has been configured on FastEthe
19、rnetO/2 but will onlyhave effect when the interface is in a non-trunking mode./ Portfast 功能只在非Trunk模式下生效注:也可以在全局模式下输入spanning-tree portfast default启用所有的端口 portfast 功能12. 重新插拔PC与ED-SW勺网线,再次记录端口指示灯转换到绿色的时间_S验证portfast 已经在FaO/2 口上启用ed-sw#sh spanning-tree interface fO/2 portfastVLAN0001 enabled13. 配置 PC
20、 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 shutendCore2 :interface Vlan1ip address 192.168.88.202 255.255.255.0no shutend14. 在PC的DOS命令行下:ping 192.168.88.201 -t / 不停的 Pi ng 192.168
21、.88.201 断掉ED-SV到Core1的连接,记录ping包丢失了 个15. 在 ED-SWt配置 uplinkfasted-sw(config)#spanning-tree uplinkfast16. 验证 uplinkfasted-sw#sh spanning-tree uplinkfastUplinkFast is enabled17. 在PC的DOS命令行下:ping 192.168.88.201 -t / 不停的 Pi ng 192.168.88.201 断掉ED-SV到Core1的连接,记录ping包丢失了 _个18. 取消 ED-SW勺 uplinkfast功能ed-sw(c
22、onfig)#no spanning-tree uplinkfast19. 启用 Core1, Core2, ED-SW勺 RSTP功能Core1, Core2, ED-SW(Config)# spanning-tree mode rapid-pvst20. 验证RSTP是否启用ed-sw#sh spanning-treeVLAN0001Spanning tree enabled protocol rstp /生成树模式Root ID Priority 24577Address 000d.65dc.8800Cost 19Port 23 (FastEthernet0/23)Hello Time
23、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 Delay 15 secAging Time 300InterfaceRole Sts CostPrio.Nbr TypeFa0/2Desg FWD 19128.2 Edge P2p /边缘端口Fa0/4Desg BLK 19128.4 P2pFa0/23Root FWD 19128.
24、23 P2pFa0/24Altn BLK 19128.24 P2p /被阻塞的端口VLAN0002Spanning tree enabled protocol rstpRoot ID Priority 24578Address 0013.80e2.4880Cost19Port24 (FastEthernet0/24)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
25、sec Max Age 20 sec Forward Delay 15 secAging Time 300Interface Role Sts Cost Prio.Nbr TypeFa0/23 Altn BLK 19128.23 P2pFa0/24 Root FWD 19128.24 P2p在PC的DOS命令行下:ping 192.168.88.201 -t /不停的 Pi ng 192.168.88.201断掉ED-SW到Core1的连接,记录ping包丢失了 个21. 配置MSTCore1, Core2,ED-SWt启用两个 MST Instanee 1Vlan1,3,5,7,Vlan2,
26、4,6,8,Core1 in sta nee 19 映射到 Instanee 110 映射到 Instanee 2优先级设为4096In stace n 2优先级设置16384Core2 in sta nee 1In stace n 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 16384spanning-
27、tree mst 2 priority 8192Core2 :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 16384spanning-tree mst 2 priority 8192ED-SWspanning-tree mode mstspanning-tree mst configurationinstance 1 vlan 1,3, 5, 7, 9in
28、stance 2 vlan 2, 4, 6, 8, 1022. 验证MST配置Core2#sh spanning-treeMST0Spanning tree enabled protocol mstpRoot ID Priority 32768Address 000d.65dc.8800Cost0Port65 (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.4880H
29、ello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr TypeFa0/4Desg FWD 200000128.4 P2pFa0/21Desg FWD 200000128.21 P2p Pre-STD-RxPo2Root FWD 100000128.65 P2pMST1Spanning tree enabled protocol mstpRoot ID Priority 16385Address 0013.80e2.4880This bridge is the rootHello T
30、ime 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 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr TypeFa0/4Desg FWD 200000128.4 P2pFaO/21Desg FWD 200000128.21 P2p Pre-STD-RxPo2Desg FWD 1000001
31、28.65 P2pMST2Spanning tree enabled protocol mstpRoot ID Priority 8194Address 0013.80e2.4880This bridge is the rootHello Time 2 sec Max 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 secInterfac
32、e Role Sts Cost Prio.Nbr TypeFa0/21 Desg FWD 200000128.21 P2p Pre-STD-RxPo2Desg FWD 100000128.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 BP
33、DU Guard enabled. Disabling port. /端口启用此功能后,收到任何BPDU言息,则此端口进入err-disable 状态02:51:16: %PM-4-ERR_DISABLE: bpduguard error detected on Fa0/24, putting Fa0/24 in err-disablestate02:51:17: %LINEPROTO-5-UPDOWNne protocol on Interface FastEthernet0/24, changed state to down24. 配置 ED-SW F0/24端口,启用 Guard Roo
34、t 功能ed-sw(config-if)# spanning-tree guard root02: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端口接入了 >=目前根交换机生成树优先级的交换 机,贝U Block此端口25. 验证ED-SW勺STP状态e
35、d-sw#sh spanning-treeMST00Spanning tree enabled protocol mstpRoot ID Priority 32768Address 000d.65dc.8800CostPort 23 (FastEthernetO/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 secInterface Role Sts Cost Prio.Nbr TypeFa0/2Desg FWD 200000128.2Edge P2pFa0/4Desg FWD 200000128.4P2pFa0/23Root FWD 200000128.23P2pFa0/24Desg BKN*20
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 初中心理健康青春期教育说课稿设计
- 初中历史人物2025诸葛亮说课稿
- 初中职业认知2025教师体验说课稿
- 技术合作试点项目实施方案
- 初中生抗挫折心理说课稿2025年
- 2026年宇宙大爆炸测试题及答案
- 2026年湘教版期末测试题及答案
- 2026年凯林制药测试题及答案
- 2026年损益的核算课后测试题及答案
- 2026年院感试题选择测试题及答案
- 北师大版七年级数学下册-第一章-名校检测题【含答案】
- 浙二医院胸外科护士进修汇报
- DGTJ08-2323-2020 退出民防序列工程处置技术标准
- 党支部书记讲廉洁党课讲稿
- 广东省佛山市华英学校2024-2025学年上学期七年级入学分班考试英语试卷
- 猴痘培训课件
- 施工试验送检方案(3篇)
- YY 0267-2025血液净化体外循环系统血液透析器、血液透析滤过器、血液滤过器及血液浓缩器用体外循环血路/液路
- 2025年四川省泸州市中考英语真题 (原卷版)
- 房屋被淹赔偿合同协议书
- 机加检验工试题及答案
评论
0/150
提交评论