GNS3 活用 - Cisco スイッチ STP 編 その3(path cost の変更による経路変更)
パスコストを変更して、挙動を確認します。 通信の経路を変えることができるはずです。
お疲れさまです。ニックネーム たいちょう です。
前回(GNS3 活用 - Cisco スイッチ STP 編 その2(root bridge の変更))までのトポロジを又変更してみます。
今日は、パスコストを変更してみて、トポロジの変化を観察します。
具体的に言うと、Sw3からSw2 の通信は、Sw3 - Sw2 の経路となっているのを、Sw3 - Sw1 - Sw2 とします。
変更する前の図になります。
タスク(パスコストの変更)
1.path cost の 19 を変更して、トポロジを変えてみる。
1. 今、Sw3からSw2の通信は、path cost 19 であるSw3f1/2-Sw2f1/2による。
これを、Sw3f1/3-Sw1f1/3とSw1f1/1-Sw2f1/1のpath cost を、それぞれ 4
に変更してみる。spanning-treeのデバッグモードで、変化を観察する。図に記入する。
Sw3#conf t
Sw3(config)#int fa1/3
Sw3(config-if)#spanning-tree cost 4
Sw3(config-if)#end
Sw3#sh spanning-tree act | begin FastEthernet1/3
Port 44 (FastEthernet1/3) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.44.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 4096, address c404.60df.0000
Designated port id is 128.44, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 586, received 2
設定できた。
Sw1 を設定する。
Sw1#conf t
Sw1(config)#int fa1/3
Sw1(config-if)#spanning-tree cost 4
Sw1(config)#int fa1/1
Sw1(config-if)#spanning-tree cost 4
Sw1(config-if)#end
Sw1#sh spanning-tree act
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address c402.60c2.0000
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4096, address c404.60df.0000
Root port is 44 (FastEthernet1/3), cost of root path is 4
Topology change flag not set, detected flag not set
Number of topology changes 2 last change occurred 00:05:22 ago
from FastEthernet1/1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 42 (FastEthernet1/1) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.42.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 32768, address c402.60c2.0000
Designated port id is 128.42, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 1000, received 3
Port 44 (FastEthernet1/3) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.44.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 4096, address c404.60df.0000
Designated port id is 128.44, designated path cost 0
Timers: message age 2, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 3, received 999
Sw2を設定する。
Sw2#conf t
Sw2(config)#int fa1/1
Sw2(config-if)#spanning-tree cost 4
Sw2(config-if)#end
Sw2#sh spanning-tree active
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address c403.60d0.0000
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4096, address c404.60df.0000
Root port is 42 (FastEthernet1/1), cost of root path is 8
Topology change flag not set, detected flag not set
Number of topology changes 1 last change occurred 00:07:06 ago
from FastEthernet1/2
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 42 (FastEthernet1/1) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.42.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 32768, address c402.60c2.0000
Designated port id is 128.42, designated path cost 4
Timers: message age 3, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 3, received 1052
デバッグ表示の結果。
Sw3(config-if)#
*Mar 1 00:09:43.303: STP: VLAN1 Topology Change rcvd on Fa1/3
Sw1(config-if)#
*Mar 1 00:09:43.287: STP: VLAN1 Topology Change rcvd on Fa1/1
*Mar 1 00:09:43.287: STP: VLAN1 sent Topology Change Notice on Fa1/3
Sw2#
*Mar 1 00:09:45.335: %SYS-5-CONFIG_I: Configured from console by console
Sw2#
*Mar 1 00:09:58.271: STP: VLAN1 Fa1/1 -> learning
Sw2#
*Mar 1 00:10:13.271: STP: VLAN1 Fa1/1 -> forwarding
----
Sw2#sh spanning-tree active
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address c403.60d0.0000
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4096, address c404.60df.0000
Root port is 42 (FastEthernet1/1), cost of root path is 8
Topology change flag not set, detected flag not set
Number of topology changes 2 last change occurred 00:02:08 ago
from FastEthernet1/2
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 42 (FastEthernet1/1) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.42.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 32768, address c402.60c2.0000
Designated port id is 128.42, designated path cost 4
Timers: message age 2, forward delay 0, hold 0
Number of transitions to forwarding state: 2
BPDU: sent 3, received 358
Port 43 (FastEthernet1/2) of VLAN1 is blocking
Port path cost 19, Port priority 128, Port Identifier 128.43.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 4096, address c404.60df.0000
Designated port id is 128.43, designated path cost 0
Timers: message age 2, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 1, received 354
Sw1#sh spanning-tree active
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address c402.60c2.0000
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4096, address c404.60df.0000
Root port is 44 (FastEthernet1/3), cost of root path is 4
Topology change flag not set, detected flag not set
Number of topology changes 2 last change occurred 00:04:15 ago
from FastEthernet1/1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 42 (FastEthernet1/1) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.42.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 32768, address c402.60c2.0000
Designated port id is 128.42, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 421, received 3
Port 44 (FastEthernet1/3) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.44.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 4096, address c404.60df.0000
Designated port id is 128.44, designated path cost 0
Timers: message age 2, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 3, received 419
Sw2#sh spanning-tree active
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address c403.60d0.0000
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4096, address c404.60df.0000
Root port is 42 (FastEthernet1/1), cost of root path is 8
Topology change flag not set, detected flag not set
Number of topology changes 2 last change occurred 00:05:21 ago
from FastEthernet1/2
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 42 (FastEthernet1/1) of VLAN1 is forwarding
Port path cost 4, Port priority 128, Port Identifier 128.42.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 32768, address c402.60c2.0000
Designated port id is 128.42, designated path cost 4
Timers: message age 2, forward delay 0, hold 0
Number of transitions to forwarding state: 2
BPDU: sent 3, received 454
Port 43 (FastEthernet1/2) of VLAN1 is blocking
Port path cost 19, Port priority 128, Port Identifier 128.43.
Designated root has priority 4096, address c404.60df.0000
Designated bridge has priority 4096, address c404.60df.0000
Designated port id is 128.43, designated path cost 0
Timers: message age 1, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 1, received 451
経路が変わりました。Sw2 の Non Designated Port が入れ替わった感じです。
これにより、Sw3からSw2 の通信は、Sw3 - Sw2 の経路となっていたのが、Sw3 - Sw1 - Sw2 となりました。
図にしてみます。
図に記入した結果です。
お疲れさまです。第3日の終了です。次回は、ポートのプライオリティを変更してみたいです。
ニックネーム たいちょう でした。次回もお楽しみに。