GNS3 活用 - Cisco スイッチ STP 編 その8 (PVSTP で負荷分散)
お疲れさまです。ニックネーム たいちょう です。
今回は、pvstp をやってみます。前回(GNS3 活用 - Cisco スイッチ STP 編 その7 (backbonefast で障害検知と対応) )の続きです。
このようなトポロジで、VLAN 100 を左回り、VLAN200 を右回りにしたいです。
vlan 100,200 を作成しておきます。
PCをぶら下げるポートをアクセスポートとして、それぞれ VLAN 100,200 をぶら下げます。
Sw4(config)#int fa1/0
Sw4(config-if)#switchport mode access
Sw4(config-if)#switchport access vlan 100
Sw4(config)#int fa1/1
Sw4(config-if)#switchport mode access
Sw4(config-if)#switchport access vlan 200
Sw4(config-if)#end
Sw4#sh run interface fa1/0
Building configuration...
Current configuration : 85 bytes
!
interface FastEthernet1/0
switchport access vlan 100
spanning-tree portfast
end
Sw4#sh run interface fa1/1
Building configuration...
Current configuration : 85 bytes
!
interface FastEthernet1/1
switchport access vlan 200
spanning-tree portfast
end
Sw4#sh vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/2, Fa1/3, Fa1/4, Fa1/5
Fa1/6, Fa1/7, Fa1/8, Fa1/9
Fa1/10, Fa1/11, Fa1/12, Fa1/13
Fa1/14, Fa1/15
100 Sales active Fa1/0
200 Tech active Fa1/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
100 enet 100100 1500 - - - - - 0 0
200 enet 100200 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
この段階で、Sw4 の spanning-tree を確認します。
Sw4#sh spanning-tree bri
VLAN1
Spanning tree enabled protocol ieee uplinkfast enabled
Root ID Priority 8192
Address c402.60c2.0000
Cost 3038
Port 55 (FastEthernet1/14)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49152
Address c406.2668.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/14 128.55 128 3019 FWD 19 16384 c403.60d0.0000 128.55
FastEthernet1/15 128.56 128 3019 BLK 19 32768 c404.60df.0000 128.56
VLAN100
Spanning tree enabled protocol ieee uplinkfast enabled
Root ID Priority 49152
Address c406.2668.0001
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49152
Address c406.2668.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/0 128.41 128 3019 FWD 0 49152 c406.2668.0001 128.41
VLAN200
Spanning tree enabled protocol ieee uplinkfast enabled
Root ID Priority 49152
Address c406.2668.0002
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49152
Address c406.2668.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/1 128.42 128 3019 FWD 0 49152 c406.2668.0002 128.42
Sw1,Sw2,Sw3 で sh spanning-tree bri してみたところ、VLAN100,VLAN200はまだ認識されていませんでした。
PCがぶら下がっているポート以外のポートをトランクポートとして、VLAN100,VLAN200を収容します。
Sw4#conf t
Sw4(config)#int range fa1/12 - 15
Sw4(config-if-range)#switchport mode trunk
Sw4(config-if-range)#switchport trunk allowed vlan 100,200,1-2,1002-1005
Sw4#sh interfaces trunk
Port Mode Encapsulation Status Native vlan
Fa1/12 on 802.1q trunking 1
Fa1/13 on 802.1q trunking 1
Fa1/14 on 802.1q trunking 1
Fa1/15 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa1/12 1-2,100,200,1002-1005
Fa1/13 1-2,100,200,1002-1005
Fa1/14 1-2,100,200,1002-1005
Fa1/15 1-2,100,200,1002-1005
Port Vlans allowed and active in management domain
Fa1/12 1,100,200
Fa1/13 1,100,200
Fa1/14 1,100,200
Fa1/15 1,100,200
Port Vlans in spanning tree forwarding state and not pruned
Fa1/12 100,200
Fa1/13 1,100,200
Fa1/14 100,200
Fa1/15 100,200
Sw3(config)#int range fa1/2 -3,fa1/5 -6,fa1/12 ,fa1/15
Sw3(config-if-range)#switchpo
Sw3(config-if-range)#switchport mode trunk
Sw3(config-if-range)#swit
Sw3(config-if-range)#switchport
*Mar 1 00:06:33.907: %DTP-5-TRUNKPORTON: Port Fa1/2-3,Fa1/5-6,Fa1/12 has become dot1q trunk
Sw3(config-if-range)#switchport tru
Sw3(config-if-range)#switchport trunk allo
Sw3(config-if-range)#switchport trunk allowed vlan 100,200,1-2,1002-1005
Sw3#sh int trunk
Port Mode Encapsulation Status Native vlan
Fa1/2 on 802.1q trunking 1
Fa1/3 on 802.1q trunking 1
Fa1/5 on 802.1q trunking 1
Fa1/6 on 802.1q trunking 1
Fa1/12 on 802.1q trunking 1
Fa1/15 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa1/2 1-2,100,200,1002-1005
Fa1/3 1-2,100,200,1002-1005
Fa1/5 1-2,100,200,1002-1005
Fa1/6 1-2,100,200,1002-1005
Fa1/12 1-2,100,200,1002-1005
Fa1/15 1-2,100,200,1002-1005
Port Vlans allowed and active in management domain
Fa1/2 1,100,200
Fa1/3 1,100,200
Fa1/5 1,100,200
Fa1/6 1,100,200
Fa1/12 1,100,200
Fa1/15 1,100,200
Port Vlans in spanning tree forwarding state and not pruned
Fa1/2 100,200
Fa1/3 1,100,200
Fa1/5 100,200
Fa1/6 100,200
Fa1/12 1,100,200
Fa1/15 1,200
Sw2(config)#int range fa1/1 - 2, fa1/4 - 5,fa1/13 - 14
Sw2(config-if-range)#switchport
Sw2(config-if-range)#switchport mode trunk
Sw2(config-if-range)#swit
*Mar 1 00:09:28.999: %DTP-5-TRUNKPORTON: Port Fa1/1-2,Fa1/4-5,Fa1/13 has become dot1q trunk
Sw2(config-if-range)#switchport trunk allow
Sw2(config-if-range)#switchport trunk allowed vlan 100,200,1-2,1002-1005
Sw2(config-if-range)#end
Sw2#sh
*Mar 1 00:09:48.603: %SYS-5-CONFIG_I: Configured from console by console
Sw2#sh int trunk
Port Mode Encapsulation Status Native vlan
Fa1/1 on 802.1q trunking 1
Fa1/2 on 802.1q trunking 1
Fa1/4 on 802.1q trunking 1
Fa1/5 on 802.1q trunking 1
Fa1/13 on 802.1q trunking 1
Fa1/14 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa1/1 1-2,100,200,1002-1005
Fa1/2 1-2,100,200,1002-1005
Fa1/4 1-2,100,200,1002-1005
Fa1/5 1-2,100,200,1002-1005
Fa1/13 1-2,100,200,1002-1005
Fa1/14 1-2,100,200,1002-1005
Port Vlans allowed and active in management domain
Fa1/1 1,100,200
Fa1/2 1,100,200
Fa1/4 1,100,200
Fa1/5 1,100,200
Fa1/13 1,100,200
Fa1/14 1,100,200
Port Vlans in spanning tree forwarding state and not pruned
Fa1/1 none
Fa1/2 none
Fa1/4 none
Fa1/5 none
Fa1/13 1,100,200
Fa1/14 1,100
Sw1(config)#int range fa1/1 ,fa1/3 - 4,fa1/6
Sw1(config-if-range)#switchport mode trunk
Sw1(config-if-range)#switchp
*Mar 1 00:11:29.459: %DTP-5-TRUNKPORTON: Port Fa1/1,Fa1/3-4,Fa1/6 has become dot1q trunk
Sw1(config-if-range)#switchport trunk allow
Sw1(config-if-range)#switchport trunk allowed vlan 100,200,1-2,1002-1005
Sw1(config-if-range)#end
Sw1#sh t
*Mar 1 00:11:51.907: %SYS-5-CONFIG_I: Configured from console by console
Sw1#sh int trunk
Port Mode Encapsulation Status Native vlan
Fa1/1 on 802.1q trunking 1
Fa1/3 on 802.1q trunking 1
Fa1/4 on 802.1q trunking 1
Fa1/6 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa1/1 1-2,100,200,1002-1005
Fa1/3 1-2,100,200,1002-1005
Fa1/4 1-2,100,200,1002-1005
Fa1/6 1-2,100,200,1002-1005
Port Vlans allowed and active in management domain
Fa1/1 1,100,200
Fa1/3 1,100,200
Fa1/4 1,100,200
Fa1/6 1,100,200
Port Vlans in spanning tree forwarding state and not pruned
Fa1/1 none
Fa1/3 none
Fa1/4 none
Fa1/6 1,100,200
Sw1#wr
Sw2#wr
Sw3#wr
Sw4#wr
さて、今、spanning-tree は、同じ設定となっているはずです。これをvpstp にするには、今までSTPの設定を応用していけば、できると思います。
まずは、現在の設定を確認します。
Sw1 の spanning-tree を見ればよいはずです。
Sw1#sh spanning-tree bri
VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 8192
Address c402.60c2.0000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 8192
Address c402.60c2.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/1 128.42 128 19 FWD 0 8192 c402.60c2.0000 128.42
FastEthernet1/3 128.44 128 19 FWD 0 8192 c402.60c2.0000 128.44
FastEthernet1/4 128.45 128 19 FWD 0 8192 c402.60c2.0000 128.45
FastEthernet1/6 128.47 128 19 FWD 0 8192 c402.60c2.0000 128.47
VLAN100
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c402.60c2.0001
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c402.60c2.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/1 128.42 128 19 FWD 0 32768 c402.60c2.0001 128.42
FastEthernet1/3 128.44 128 19 FWD 0 32768 c402.60c2.0001 128.44
FastEthernet1/4 128.45 128 19 FWD 0 32768 c402.60c2.0001 128.45
FastEthernet1/6 128.47 128 19 FWD 0 32768 c402.60c2.0001 128.47
VLAN200
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c402.60c2.0002
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c402.60c2.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/1 128.42 128 19 FWD 0 32768 c402.60c2.0002 128.42
FastEthernet1/3 128.44 128 19 FWD 0 32768 c402.60c2.0002 128.44
FastEthernet1/4 128.45 128 19 FWD 0 32768 c402.60c2.0002 128.45
FastEthernet1/6 128.47 128 19 FWD 0 32768 c402.60c2.0002 128.47
VLAN1,VLAN100,VLAN200とも、Sw1 が ROOT BRIDGE になっています。
この図を見ると、VLAN の番号にかかわらず、Sw4 のトランクポートで FWD になっているのは f1/13 です。
これでは、pvstp になっていないと言えます。VLAN100が左回線とすれば、このままでいいですが、VLAN200
を右にするには、どうしたらいいか。
VLAN200のトポロジで、Sw3 のfa1/12とfa1/15の port priorityを 64 に下げてみよう。
やってみましたが、トポロジの変更がありません。元の 128 に戻しました。
では、Sw1 を VLAN 200 の primary root に、Sw3を VLAN 200 の secondary root にしてみたらどうだろう。
Sw1(config)#spanning-tree vlan 200 root primary
Sw3(config)#spanning-tree vlan 200 root secondary
確認します。
Sw1#sh spanning-tree vlan 200 root
Root ID Priority 8192
Address c402.60c2.0002
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Sw1#sh spanning-tree vlan 100 bri
VLAN100
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c402.60c2.0001
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c402.60c2.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/1 128.42 128 19 FWD 0 32768 c402.60c2.0001 128.42
FastEthernet1/3 128.44 128 19 FWD 0 32768 c402.60c2.0001 128.44
FastEthernet1/4 128.45 128 19 FWD 0 32768 c402.60c2.0001 128.45
FastEthernet1/6 128.47 128 19 FWD 0 32768 c402.60c2.0001 128.47
Sw2#sh spanning-tree vlan 200 bri
VLAN200
Spanning tree enabled protocol ieee
Root ID Priority 8192
Address c402.60c2.0002
Cost 19
Port 42 (FastEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c403.60d0.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/1 128.42 128 19 FWD 0 8192 c402.60c2.0002 128.42
FastEthernet1/2 128.43 128 19 BLK 19 16384 c404.60df.0002 128.43
FastEthernet1/4 128.45 128 19 BLK 0 8192 c402.60c2.0002 128.45
FastEthernet1/5 128.46 128 19 BLK 19 16384 c404.60df.0002 128.46
FastEthernet1/13 128.54 128 19 FWD 19 32768 c403.60d0.0002 128.54
FastEthernet1/14 128.55 128 19 FWD 19 32768 c403.60d0.0002 128.55
Sw3#sh spanning-tree vlan 200 bri
VLAN200
Spanning tree enabled protocol ieee
Root ID Priority 8192
Address c402.60c2.0002
Cost 19
Port 44 (FastEthernet1/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 16384
Address c404.60df.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/2 128.43 128 19 FWD 19 16384 c404.60df.0002 128.43
FastEthernet1/3 128.44 128 19 FWD 0 8192 c402.60c2.0002 128.44
FastEthernet1/5 128.46 128 19 FWD 19 16384 c404.60df.0002 128.46
FastEthernet1/6 128.47 128 19 BLK 0 8192 c402.60c2.0002 128.47
FastEthernet1/12 128.53 128 19 FWD 19 16384 c404.60df.0002 128.53
FastEthernet1/15 128.56 128 19 FWD 19 16384 c404.60df.0002 128.56
Sw4#sh spanning-tree vlan 200 bri
VLAN200
Spanning tree enabled protocol ieee uplinkfast enabled
Root ID Priority 8192
Address c402.60c2.0002
Cost 3038
Port 53 (FastEthernet1/12)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49152
Address c406.2668.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/1 128.42 128 3019 FWD 3038 49152 c406.2668.0001 128.42
FastEthernet1/12 128.53 128 3019 FWD 19 16384 c404.60df.0002 128.53
FastEthernet1/13 128.54 128 3019 BLK 19 32768 c403.60d0.0002 128.54
FastEthernet1/14 128.55 128 3019 BLK 19 32768 c403.60d0.0002 128.55
FastEthernet1/15 128.56 128 3019 BLK 19 16384 c404.60df.0002 128.56
右回りになったので、図に記入しておきました。
VLAN 100 のトポロジを確認します。
Sw1#sh spanning-tree vlan 100 bri
VLAN100
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c402.60c2.0001
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c402.60c2.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/1 128.42 128 19 FWD 0 32768 c402.60c2.0001 128.42
FastEthernet1/3 128.44 128 19 FWD 0 32768 c402.60c2.0001 128.44
FastEthernet1/4 128.45 128 19 FWD 0 32768 c402.60c2.0001 128.45
FastEthernet1/6 128.47 128 19 FWD 0 32768 c402.60c2.0001 128.47
Sw2#sh spanning-tree vlan 100 bri
VLAN100
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c402.60c2.0001
Cost 19
Port 42 (FastEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c403.60d0.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/1 128.42 128 19 FWD 0 32768 c402.60c2.0001 128.42
FastEthernet1/2 128.43 128 19 FWD 19 32768 c403.60d0.0001 128.43
FastEthernet1/4 128.45 128 19 BLK 0 32768 c402.60c2.0001 128.45
FastEthernet1/5 128.46 128 19 FWD 19 32768 c403.60d0.0001 128.46
FastEthernet1/13 128.54 128 19 FWD 19 32768 c403.60d0.0001 128.54
FastEthernet1/14 128.55 128 19 FWD 19 32768 c403.60d0.0001 128.55
Sw3#sh spanning-tree vlan 100 bri
VLAN100
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c402.60c2.0001
Cost 19
Port 44 (FastEthernet1/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c404.60df.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/2 128.43 128 19 BLK 19 32768 c403.60d0.0001 128.43
FastEthernet1/3 128.44 128 19 FWD 0 32768 c402.60c2.0001 128.44
FastEthernet1/5 128.46 128 19 BLK 19 32768 c403.60d0.0001 128.46
FastEthernet1/6 128.47 128 19 BLK 0 32768 c402.60c2.0001 128.47
FastEthernet1/12 128.53 128 19 FWD 19 32768 c404.60df.0001 128.53
FastEthernet1/15 128.56 128 19 FWD 19 32768 c404.60df.0001 128.56
Sw4#sh spanning-tree vlan 100 bri
VLAN100
Spanning tree enabled protocol ieee uplinkfast enabled
Root ID Priority 32768
Address c402.60c2.0001
Cost 3038
Port 54 (FastEthernet1/13)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49152
Address c406.2668.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 3019 FWD 3038 49152 c406.2668.0000 128.41
FastEthernet1/12 128.53 128 3019 BLK 19 32768 c404.60df.0001 128.53
FastEthernet1/13 128.54 128 3019 FWD 19 32768 c403.60d0.0001 128.54
FastEthernet1/14 128.55 128 3019 BLK 19 32768 c403.60d0.0001 128.55
FastEthernet1/15 128.56 128 3019 BLK 19 32768 c404.60df.0001 128.56
特に何もしてないので、左回りのままです。
図に記入します。
お疲れさまです。MST をやりたかったですが、GNS3では無理みたいです。
次は何を実験しようかな。エッジポートにスイッチをぶら下げられないように、要すれば、BPDUを送信できないような設定をやってみたいです。
ニックネーム たいちょう でした。次回をお楽しみに。