Cisco STP – 測試網絡備援

我們經已完成 STP 的所有設定,大家會否問自己真的成功完成設定?答案是不肯定,所以我們需要測試一下 STP 的備援,而測試的過程十分之簡單,請跟著以下步驟來做就可以了。

我們加入了兩台電腦,PC0 的網絡地址是 192.168.0.1,而 PC1 是 192.168.0.2,這兩台電腦是能夠互相 ping 到對方的,因為 Switch1 的 G1/1 網絡介面是 Block 狀態,當 PC0 與 PC1 溝通時會經過 Switch0 到 Switch2 才能夠溝通。在這個測試是要在 Switch2 模擬 Fa0/1 斷線情況下,即時在 Switch1 的 G0/0 變為 Designed Port,那 PC0 直接到 Switch2 與 PC1 溝通,絕對顯示 STP 的設定是成功的。

Cisco STP Testing Failover

Step 1:請大家輸入以下指令將 Switch2 的 Fa0/1 關閉。

Switch2

Switch2>ena
Switch2#config t
Switch2(config)#int fa0/1
Switch2(config-if)#shutdown

Step 2:我們需要等待 STP 學習時間,然之後 Switch1 的 G1/1 自動變為 Designed Port,其間會有一段很短的時間令 PC1 與 PC2 無法溝通,以下是 ping 的測試。

Cisco STP Testing Failover ping

Step 3:然後使用以下指令檢查 Switch1 G0/0 是否變為 Designed Port。

Switch1

Switch#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID    Priority    4097
Address     0001.C923.C9C1
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     0060.7051.5255
Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
—————- —- — ——— ——– ——————————–
Fa0/2            Desg FWD 19        128.2    P2p
Fa0/1            Root FWD 19        128.1    P2p
Gi1/1            Desg FWD 4         128.25   P2p

Step 4:而在圖表 Switch2 連去 Switch0 兩邊的網絡介面經已變成紅色,而 Switch1 的 G1/1 自動變為綠色。

Cisco STP Testing Failover

Cisco Spanning Tree 教學告一段落,大家可以設計一張更加複雜的圖表學習,筆者只是使用最簡單的方式教大家,希望能拿到概念。

 

(第一章) Cisco Spanning Tree – 介紹

(第二章) Cisco Spanning Tree – 網絡圖表簡單描述

(第三章) Cisco Spanning Tree – 如何成為 Root Bridge

(第四章) Cisco Spanning Tree – 測試網絡備援

 

arrow
arrow
    文章標籤
    CISCO Spanning Tree STP
    全站熱搜
    創作者介紹
    創作者 那個先生 的頭像
    那個先生

    :: I'm Nagg :: 那個先生

    那個先生 發表在 痞客邦 留言(0) 人氣()