tft每日頭條

 > 圖文

 > 思科ospf介紹

思科ospf介紹

圖文 更新时间:2025-01-13 10:53:54

思科CCNP企業基礎架構交換-Rapid-pvst與mstP的實驗解析

-WOLFLAB網絡實驗室

思科ospf介紹(思科CCNP企業基礎架構交換-Rapid-pvst與MSTP的實驗解析)1

需求描述

1. 實驗室交換機架登陸:

Rack 99 192.168.9.99

Rack 98 192.168.9.98

Rack 100 192.168.9.100

做實驗之前,請重啟設備,做完實驗後,請勿保存。想要通過外網登陸機架,從WOLFLAB獲取登陸方式。

2. 配置sw2成為vlan 1的root。

SW2:

spanning-tree vlan 1 root primary

3. 在sw1上開啟debug spanning-tree events,将F0/1接口shutdown,然後再no shutdown,觀察F0/1接口的狀态。

SW1:

SW3:

interface f0/23

shutdown

02:04:47: STP: VLAN0001 Fa0/13 -> listening

02:05:02: STP: VLAN0001 Fa0/13 -> learning

02:05:17: STP: VLAN0001 Fa0/13 -> forwarding //此接口從Block狀态到RP forwarding狀态需要30s

SW3#show spanning-tree vlan 1

VLAN0001

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/13 Root FWD 19 128.13 P2p

5. 将sw3的F0/23接口no shutdown。然後将sw1的F0/11-12接口shutdown。在sw3上觀察F0/13接口的狀态。

SW3:

interface f0/23

no shutdown

SW1:

interface range f0/11-12

shutdown

SW3:

02:14:10: STP: VLAN0001 heard root 28673-000b.5f01.4380 on Fa0/13

02:14:10: STP: VLAN0001 heard root 28673-000b.5f01.4380 on Fa0/13

….

02:14:28: STP: VLAN0001 heard root 28673-000b.5f01.4380 on Fa0/13

//sw3連續收到SW1發送的次級BPDU,sw3等待之前收到的BPDU老化,才會響應次級BPDU,BPDU的老化時間為20秒。

02:14:28: STP: VLAN0001 Fa0/13 -> listening

02:14:43: STP: VLAN0001 Fa0/13 -> learning

02:14:58: STP: VLAN0001 Fa0/13 -> forwarding //此接口從Block狀态到DP forwarding狀态需要50s

6. 在sw1的F0/1接口開啟端口加速,将F0/1接口shutdown,然後再no shutdown,觀察F0/1接口的狀态。

SW1:

interface FastEthernet0/1

spanning-tree portfast

shutdown

no shutdown

02:21:21: set portid: VLAN0001 Fa0/1: new port id 8001

02:21:21: STP: VLAN0001 Fa0/1 ->jump to forwarding from blocking //直接跳轉到forwarding狀态

7. 在sw3上,開啟uplinkfast,将sw3的F0/23接口shutdown,觀察F0/13接口的狀态。

SW3:

spanning-tree uplinkfast

02:24:41: setting bridge id (which=1) prio 49153 prio cfg 49152 sysid 1 (on) id C001.000c.8577.3240

//開啟uplinkfast以後,priority會增加至49152,接口的cost增加3000。

interface FastEthernet0/23

shutdown

02:26:49: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 FastEthernet0/13 moved to Forwarding (UplinkFast). //F0/13接口跳過listening與learning狀态,直接跳轉到forwarding狀态。

SW3#show spanning-tree vlan 1

VLAN0001

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/13 Root FWD 19 128.13 P2p

8. 在sw1 sw2 sw3上開啟backbonefast特性。将sw1的F0/11-12接口shutdown。在sw3上觀察F0/13接口的狀态。

SW1 SW2 SW3:

spanning-tree backbonefast

02:33:09: STP: VLAN0001 heard root 28673-000b.5f01.4380 on Fa0/13

//收到次級BPDU,會向Root發出RLQ的請求,收到Root回複的RLQ的Reply,立刻響應次級BPDU。

02:14:28: STP: VLAN0001 Fa0/13 -> listening

02:14:43: STP: VLAN0001 Fa0/13 -> learning

02:14:58: STP: VLAN0001 Fa0/13 -> forwarding //此接口從Block狀态到DP forwarding狀态需要30s

Fa0/13 Desg FWD 19 128.13 P2p

9. 在sw1 sw2 sw3上,将STP的類型配置為rapid-pvst。show spanning-tree vlan 1 觀察STP選路。

SW1 SW2 SW3:

spanning-tree mode rapid-pvst

解析:此時在sw1 sw2 sw3上看到rapid-pvst選路的結果,與生成樹類型為pvst選路的結果是一緻。隻是rapid-pvst相對于PVST,可以在拓撲變更的時候在更短的時間内完成收斂。可以重新按照第8題和第9題的需求來操作,觀察現象,比較與之前生成樹類型為PVST時的區别。

10. 在sw1 sw2 sw3上,創建vlan 2-7,将vlan2-4劃入instance 1,将vlan 5-7劃入instance 2,将生成樹類型配置為mst。

SW1 SW2 SW3:

vlan 2-7

spanning-tree mst configuration

name WOLF

revision 10

instance 1 vlan 2-4

instance 2 vlan 5-7

spanning-tree mode mst

感謝關注WOLFLAB網絡實驗室,定期都會更新關于CCNP企業基礎架構相關技術文檔

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关圖文资讯推荐

热门圖文资讯推荐

网友关注

Copyright 2023-2025 - www.tftnews.com All Rights Reserved