Cisco STP – 如何成為 Root Bridge

上一章提及過 Priority 最低的 Switch 會成為 Root Bridge,我們只要輸入一個 Spanning Tree 指令就能夠調較 Priority,大家不要以為太過複雜。筆者亦會教大家如何檢查 Spanning Tree 設定,方便大家維護。

Step 1:因為 Switch0 只有 Vlan 1,所以在 Switch0 輸入以下指令將 Vlan 1 的 priority 調較至 4096。

Switch0

Switch0>ena
Switch0#config t
Switch0(config)#spanning-tree vlan 1 priority 4096

– 檢查 Vlan 1 的 priority 是否已經調較為 4096,Root ID 是指整個網絡那台 Switch 是 Root Bridge 的值,而 Bridge ID 是指自己的值,這台 Switch 的 Root ID 是自己,換言之它就是 Root Bridge。Fa0/1 及 Fa0/2 的網絡介面角色都是「Desg」,這表示成為 Designed Port。

Switch0#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID    Priority    4097
Address     0001.C923.C9C1
This bridge is the root
Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

Bridge ID  Priority    4097  (priority 4096 sys-id-ext 1)
Address     0001.C923.C9C1
Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time  20

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

Step 2:接著檢查 Switch1,它的 Root ID 同樣是 Switch0 的值,因此它不是 Root Bridge。而 Fa0/1 及 Gi1/1 的網絡介面分別為角色「Root」及狀態為「BLK」,後者表示成為 Block 狀態,所以稱為 Block Port。

Switch1

Switch1#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/1            Root FWD 19        128.1    P2p
Gi1/1            Altn BLK 4         128.25   P2p

Step 3:Switch2 同樣不是 Root Bridge,而 Fa0/1 及 Gi1/1 的網絡介面角色分別為「Root」及「Desg」。

Switch2

Switch2#show 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     0030.F2B6.B244
Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time  20

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

在這章清楚地解釋了那台是 Root Bridge,以及每台 Switch 的網絡介面是什麼角色,大家最好返回上一章的網絡圖表再理解一下。筆者會在下一章測試關掉其中一台 Switch 的網絡介面,看看有什麼事情發生。

 

(第一章) Cisco Spanning Tree – 介紹

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

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

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

arrow
arrow
    文章標籤
    CISCO Spanning Tree
    全站熱搜

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