computerの日記

Cisco,SHELL,C,Qt,C++,Linux,ネットワーク,Windows Scriptなどの発言です

STPトポロジ-2(ROOT BRIDGE の変更)

このタスクにおいては、あらかじめ設定されたスイッチに対して、802.1d PVST Spanning-Tree パラメータを操って、
特定の VLAN において、Spanning-Tree Root Bridge の役割を持たせます。

(タスク)

Switch-2 が、VLAN-3 において、ブリッジプライオリティ 8192 になるようなコマンドを発行しなさい。
Switch-1 が、VLAN-4 において、ブリッジプライオリティ 8192 になるようなコマンドを発行しなさい。

 

基本設定を、以下のリンクにしたがっておこなう。
http://intrajp-computer.hatenadiary.jp/entry/2017/12/03/231614

 

spanning-tree を確認する。

SW1#show spanning-tree vlan 3 brief

VLAN3
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c201.1621.0000
Cost 19
Port 54 (FastEthernet1/13)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c206.152d.0001
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/13 128.54 128 19 FWD 0 32768 c201.1621.0000 128.54
FastEthernet1/14 128.55 128 19 BLK 0 32768 c201.1621.0000 128.55
FastEthernet1/15 128.56 128 19 BLK 0 32768 c201.1621.0000 128.56
Port-channel1 129.65 128 9 FWD 19 32768 c206.152d.0001 129.65


SW2#show spanning-tree vlan 3 brief

VLAN3
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c201.1621.0000
Cost 28
Port 321 (Port-channel1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c207.153c.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0 128.41 128 19 FWD 28 32768 c207.153c.0000 128.41
Port-channel1 129.65 128 9 FWD 19 32768 c206.152d.0001 129.65


SW3#show spanning-tree vlan 3 brief

VLAN3
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c201.1621.0000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c201.1621.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0 128.41 128 19 FWD 0 32768 c201.1621.0000 128.41
FastEthernet1/6 128.47 128 19 FWD 0 32768 c201.1621.0000 128.47
FastEthernet1/7 128.48 128 19 FWD 0 32768 c201.1621.0000 128.48
FastEthernet1/8 128.49 128 19 FWD 0 32768 c201.1621.0000 128.49
FastEthernet1/13 128.54 128 19 FWD 0 32768 c201.1621.0000 128.54
FastEthernet1/14 128.55 128 19 FWD 0 32768 c201.1621.0000 128.55
FastEthernet1/15 128.56 128 19 FWD 0 32768 c201.1621.0000 128.56

現在のところ、root bridge は、SW3 のようだ。
では、以下のコマンドを発行します。
Switch-2 が、VLAN-3 において、ブリッジプライオリティ 8192 になるようなコマンドを発行しなさい。

SW2(config)#spanning-tree vlan 3 priority 8192
確認します。SW2がルート・ブリッジになったことがわかります。
SW2#show spanning-tree vlan 3 brief

VLAN3
Spanning tree enabled protocol ieee
Root ID Priority 8192
Address c207.153c.0000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 8192
Address c207.153c.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0 128.41 128 19 FWD 0 8192 c207.153c.0000 128.41
Port-channel1 129.65 128 9 FWD 0 8192 c207.153c.0000 129.65

では、トポロジに基づいて、VLAN 4 も作成しましょう。
まず、PC1,PC2を、それぞれ、SW2、SW1に接続します。
それぞれで、dhcp でアドレスを取得してみます。

PC1>dhcp
DDD
Can't find dhcp server

PC2>dhcp
DDD
Can't find dhcp server

できません。
SW1 に vlan 4 を設定して、トランクやスイッチポートを適切に設定して、IP アドレスを取得できました。
PC1> dhcp
DORA IP 4.4.4.2/24 GW 4.4.4.1
PC2> dhcp
DORA IP 4.4.4.3/24 GW 4.4.4.1

では、現在の STP を確認します。

SW1#show spanning-tree vlan 4 brief

VLAN4
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c201.1621.0002
Cost 19
Port 54 (FastEthernet1/13)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c206.152d.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0 128.41 128 19 FWD 19 32768 c206.152d.0002 128.41
FastEthernet1/13 128.54 128 19 FWD 0 32768 c201.1621.0002 128.54
FastEthernet1/14 128.55 128 19 BLK 0 32768 c201.1621.0002 128.55
FastEthernet1/15 128.56 128 19 BLK 0 32768 c201.1621.0002 128.56
Port-channel1 129.65 128 9 FWD 19 32768 c206.152d.0002 129.65

SW2#show spanning-tree vlan 4 brief

VLAN4
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c201.1621.0002
Cost 19
Port 47 (FastEthernet1/6)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c207.153c.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/4 128.45 128 19 FWD 19 32768 c207.153c.0002 128.45
FastEthernet1/6 128.47 128 19 FWD 0 32768 c201.1621.0002 128.47
FastEthernet1/7 128.48 128 19 BLK 0 32768 c201.1621.0002 128.48
FastEthernet1/8 128.49 128 19 BLK 0 32768 c201.1621.0002 128.49
Port-channel1 129.65 128 9 BLK 19 32768 c206.152d.0002 129.65

SW3#show spanning-tree vlan 4 brief

VLAN4
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c201.1621.0002
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c201.1621.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/6 128.47 128 19 FWD 0 32768 c201.1621.0002 128.47
FastEthernet1/7 128.48 128 19 FWD 0 32768 c201.1621.0002 128.48
FastEthernet1/8 128.49 128 19 FWD 0 32768 c201.1621.0002 128.49
FastEthernet1/13 128.54 128 19 FWD 0 32768 c201.1621.0002 128.54
FastEthernet1/14 128.55 128 19 FWD 0 32768 c201.1621.0002 128.55
FastEthernet1/15 128.56 128 19 FWD 0 32768 c201.1621.0002 128.56

ここで、タスクを実行します。

Switch-1 が、VLAN-4 において、ブリッジプライオリティ 8192 になるようなコマンドを発行しなさい。

SW1(config)#spanning-tree vlan 4 priority 8192

SW1#show spanning-tree vlan 4 brief

VLAN4
Spanning tree enabled protocol ieee
Root ID Priority 8192
Address c206.152d.0002
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 8192
Address c206.152d.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0 128.41 128 19 FWD 0 8192 c206.152d.0002 128.41
FastEthernet1/13 128.54 128 19 FWD 0 8192 c206.152d.0002 128.54
FastEthernet1/14 128.55 128 19 FWD 0 8192 c206.152d.0002 128.55
FastEthernet1/15 128.56 128 19 FWD 0 8192 c206.152d.0002 128.56
Port-channel1 129.65 128 9 FWD 0 8192 c206.152d.0002 129.65

SW2#show spanning-tree vlan 4 brief

VLAN4
Spanning tree enabled protocol ieee
Root ID Priority 8192
Address c206.152d.0002
Cost 9
Port 321 (Port-channel1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c207.153c.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/4 128.45 128 19 FWD 9 32768 c207.153c.0002 128.45
FastEthernet1/6 128.47 128 19 FWD 9 32768 c207.153c.0002 128.47
FastEthernet1/7 128.48 128 19 FWD 9 32768 c207.153c.0002 128.48
FastEthernet1/8 128.49 128 19 FWD 9 32768 c207.153c.0002 128.49
Port-channel1 129.65 128 9 FWD 0 8192 c206.152d.0002 129.65

SW3#show spanning-tree vlan 4 brief

VLAN4
Spanning tree enabled protocol ieee
Root ID Priority 8192
Address c206.152d.0002
Cost 19
Port 54 (FastEthernet1/13)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768
Address c201.1621.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/6 128.47 128 19 BLK 9 32768 c207.153c.0002 128.47
FastEthernet1/7 128.48 128 19 BLK 9 32768 c207.153c.0002 128.48
FastEthernet1/8 128.49 128 19 BLK 9 32768 c207.153c.0002 128.49
FastEthernet1/13 128.54 128 19 FWD 0 8192 c206.152d.0002 128.54
FastEthernet1/14 128.55 128 19 BLK 0 8192 c206.152d.0002 128.55
FastEthernet1/15 128.56 128 19 BLK 0 8192 c206.152d.0002 128.56

SW1 が、ROOT BRIDGE になりました。

f:id:intrajp:20171205031220p:plain