GNS3 活用 - Cisco スイッチ STP 編 その10 (rapid spanning-tree 、rapid-pvst で素早いコンバージェンス)
お疲れさまです。ニックネーム たいちょう です。
今日は、rapid spanning-tree (802.1w)をやってみます。前回(GNS3 活用 - Cisco スイッチ STP 編 その9 (portfast BPDU Guard でセキュリティを考慮した運用を) )の続きです。
ieee (802.1d)よりも、素早いコンバージョンを実感できるはずなんです。
このようなトポロジを 802.1d で作成しました。
トポロジ
ここで、Sw2 の e0/3 ポートに注目します。
BLOCK ポートとなっています。
この属性を変更するのをテストするために、Sw2 のe0/2 ポートをダウンさせてみます。
これにより、Sw2 の e0/3 ポートの役割が、Root になるはずです。
その時の、時間を計測します。
では、やってみます。
デバッグモードにするのを忘れずに。
#debug spanning-tree events
Sw2 における spanning-tree を確認しておきます。
Sw2#sh spanning-tree vlan 100
VLAN0100
Spanning tree enabled protocol ieee
Root ID Priority 32868
Address aabb.cc00.0100
Cost 200
Port 3 (Ethernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32868 (priority 32768 sys-id-ext 100)
Address aabb.cc00.0300
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Desg FWD 100 128.1 P2p
Et0/2 Root FWD 100 128.3 P2p
Et0/3 Altn BLK 100 128.4 P2p
実行結果です。Sw2 のe0/2 ポートをダウンさせました。
----------------------
Sw2(config)#int e0/2
Sw2(config-if)#shut
Sw2(config-if)#
*Jan 13 23:54:00.287: STP: VLAN0100 new root port Et0/3, cost 300
*Jan 13 23:54:00.287: STP: VLAN0100 Et0/3 -> listening
*Jan 13 23:54:00.287: STP[100]: Generating TC trap for port Ethernet0/2
Sw2(config-if)#
*Jan 13 23:54:02.294: %LINK-5-CHANGED: Interface Ethernet0/2, changed state to administratively down
Sw2(config-if)#
*Jan 13 23:54:02.294: STP: VLAN0100 sent Topology Change Notice on Et0/3
*Jan 13 23:54:03.297: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down
Sw2(config-if)#
*Jan 13 23:54:15.291: STP: VLAN0100 Et0/3 -> learning
Sw2(config-if)#
*Jan 13 23:54:18.266: STP: VLAN0100 heard root 32868-aabb.cc00.0500 on Et0/0
*Jan 13 23:54:18.266: STP: VLAN0100 Topology Change rcvd on Et0/0
*Jan 13 23:54:18.267: STP: VLAN0100 sent Topology Change Notice on Et0/3
Sw2(config-if)#
*Jan 13 23:54:30.291: STP[100]: Generating TC trap for port Ethernet0/3
*Jan 13 23:54:30.292: STP: VLAN0100 sent Topology Change Notice on Et0/3
*Jan 13 23:54:30.292: STP: VLAN0100 Et0/3 -> forwarding
----
Sw1#
*Jan 13 23:54:02.294: STP: VLAN0100 Topology Change rcvd on Et0/3
*Jan 13 23:54:02.294: STP: VLAN0100 sent Topology Change Notice on Et0/1
Sw1#
*Jan 13 23:54:18.267: STP: VLAN0100 Topology Change rcvd on Et0/3
*Jan 13 23:54:18.267: STP: VLAN0100 sent Topology Change Notice on Et0/1
Sw1#
*Jan 13 23:54:30.292: STP: VLAN0100 Topology Change rcvd on Et0/3
*Jan 13 23:54:30.292: STP: VLAN0100 sent Topology Change Notice on Et0/1
----
Sw3#
*Jan 13 23:54:02.294: STP: VLAN0100 Topology Change rcvd on Et0/1
*Jan 13 23:54:02.294: STP: VLAN0100 sent Topology Change Notice on Et1/0
Sw3#
*Jan 13 23:54:18.267: STP: VLAN0100 Topology Change rcvd on Et0/1
*Jan 13 23:54:18.267: STP: VLAN0100 sent Topology Change Notice on Et1/0
Sw3#
*Jan 13 23:54:30.292: STP: VLAN0100 Topology Change rcvd on Et0/1
*Jan 13 23:54:30.292: STP: VLAN0100 sent Topology Change Notice on Et1/0
----
Sw5#
*Jan 13 23:54:02.294: STP: VLAN0100 Topology Change rcvd on Et1/0
Sw5#
*Jan 13 23:54:18.267: STP: VLAN0100 Topology Change rcvd on Et1/0
Sw5#
*Jan 13 23:54:30.292: STP: VLAN0100 Topology Change rcvd on Et1/0
----
Sw4#
*Jan 13 23:54:18.266: STP: VLAN0100 we are the spanning tree root
*Jan 13 23:54:18.266: STP: VLAN0100 heard root 32868-aabb.cc00.0100 on Et0/0
*Jan 13 23:54:18.266: supersedes 32868-aabb.cc00.0500
*Jan 13 23:54:18.266: STP: VLAN0100 new root is 32868, aabb.cc00.0100 on port Et0/0, cost 400
*Jan 13 23:54:18.267: STP: VLAN0100 sent Topology Change Notice on Et0/0
----
結果を図に記入します。
Sw2 の e0/3 の役割が、Root になり、状態はFWDになりました。
時間は、30秒かかっています。Sw2の記録を確認してくださいね。
では、本番に入ります。
Rapid Spanning Tree の設定では、この30秒が何秒で完了するでしょうか。
まず、Sw2 の e0/2 を起動します。そうすると、こちらのパスコストが低いので、ポートの役割は、Root になるはずです。
Sw2 のポート e0/2は立ち上げておきます。
全てのスイッチで、次のコマンドを実行します(一例)
Sw1(config)#spanning-tree mode rapid-pvst
では、Sw2 のe0/2 ポートをダウンさせます。
Sw2 のspanning-tree の状態を確認しておきます。
実行結果です。
----
Sw2(config-if)#shut
Sw2(config-if)#
*Jan 14 00:45:40.586: RSTP(100): updt roles, root port Et0/2 going down
*Jan 14 00:45:40.586: RSTP(100): Et0/3 is now root port
*Jan 14 00:45:40.586: RSTP(100): syncing port Et0/0
*Jan 14 00:45:40.592: STP[100]: Generating TC trap for port Ethernet0/3
*Jan 14 00:45:40.592: RSTP(100): transmitting a proposal on Et0/0
*Jan 14 00:45:40.596: RSTP(100): received an agreement on Et0/0
Sw2(config-if)#
*Jan 14 00:45:42.591: %LINK-5-CHANGED: Interface Ethernet0/2, changed state to administratively down
*Jan 14 00:45:43.596: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down
----
Sw1#
----
Sw3#
----
Sw5#
----
Sw4#
*Jan 14 00:45:40.592: RSTP(100): updt roles, received superior bpdu on Et0/0
*Jan 14 00:45:40.592: RSTP(100): synced Et0/0
*Jan 14 00:45:40.596: RSTP(100): transmitting an agreement on Et0/0 as a response to a proposal
----
Sw2 の結果からわかるように、e0/3 ポートが瞬時に root port となています。802.1dでは30秒かかっていたのですから、
まさしく、802.1wは rapid ですね。
Sw2#sh spanning-tree vlan 100
VLAN0100
Spanning tree enabled protocol rstp
Root ID Priority 32868
Address aabb.cc00.0100
Cost 300
Port 4 (Ethernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32868 (priority 32768 sys-id-ext 100)
Address aabb.cc00.0300
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Desg FWD 100 128.1 P2p
Et0/3 Root FWD 100 128.4 P2p
ポートは又、上げておきます。
Sw2(config)#int e0/2
Sw2(config-if)#no shut
Sw2(config-if)#
*Jan 14 00:58:51.567: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up
*Jan 14 00:58:52.575: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up
*Jan 14 00:58:52.575: RSTP(100): initializing port Et0/2
*Jan 14 00:58:52.575: RSTP(100): Et0/2 is now designated
*Jan 14 00:58:52.584: RSTP(100): transmitting a proposal on Et0/2
Sw2(config-if)#
*Jan 14 00:58:53.213: RSTP(100): transmitting a proposal on Et0/2
Sw2(config-if)#
*Jan 14 00:58:54.352: RSTP(100): updt roles, received superior bpdu on Et0/2
*Jan 14 00:58:54.352: RSTP(100): Et0/2 is now root port
*Jan 14 00:58:54.352: RSTP(100): Et0/3 blocked by re-root
*Jan 14 00:58:54.352: RSTP(100): syncing port Et0/0
*Jan 14 00:58:54.352: RSTP(100): Et0/3 is now alternate
*Jan 14 00:58:54.352: STP[100]: Generating TC trap for port Ethernet0/2
*Jan 14 00:58:54.361: RSTP(100): transmitting a proposal on Et0/0
*Jan 14 00:58:54.370: RSTP(100): received an agreement on Et0/0
確認します。
Sw2#sho spanning-tree vlan 100
VLAN0100
Spanning tree enabled protocol rstp
Root ID Priority 32868
Address aabb.cc00.0100
Cost 200
Port 3 (Ethernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32868 (priority 32768 sys-id-ext 100)
Address aabb.cc00.0300
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Desg FWD 100 128.1 P2p
Et0/2 Root FWD 100 128.3 P2p
Et0/3 Altn BLK 100 128.4 P2p
お疲れさまです。次回は、MST をやってみようと思います。
ニックネーム たいちょう でした。次回をお楽しみに。