| 確認 |
MSTPは,STPツリーを「インスタンス」として定義し,複数のVLANを一つのインスタンスに対応付けられる機能です。
IEEE802.1sとして標準化されています。
●MSTPとは?
STPの「VLANに関係なくSTPツリーが決まる」という欠点を補うために作られたのがPVSTでした。
しかしPVSTを使うと「VLANが多いとBPDUが増えて処理負荷が高くなる」のが欠点です。
そこで作られたのがMSTP(Multiple Spanning
Tree Protocol)です。
複数のVLANで一つのVLANツリーを使うことができます。
また,MSTPではRSTPが自動的に使われます。
【MSTPで使われる用語】
MSTPで使われる用語は独特です。最低限のものだけ最初に挙げときます。
・インスタンス…STPツリーのこと
・MSTリージョン…MSTPが動作する範囲の単位。リージョン名とリビジョン番号で区別される
・IST(Internal Spanning Tree)…MSTリージョン内で動作するSTPのこと。MSTインスタンス0番としてやりとりされる
・CST(Common Spanning Tree)…ネットワーク全体で動作するSTPのこと
ちょっと概念がわかりにくいですが,これは,「MSTリージョンを一つのスイッチと見立てて,ほかのMSTPリージョンやリージョン外にあるスイッチと連携してSTPを動作させるようにする」という考え方があるからです。
こうしたMSTPの考え方については,Catalystのマニュアルに書いてある解説が参考になります。
●設定の概要
このラボでは大きなことは考えずに,MSTPを使って「一つのインスタンスに複数のVLANを対応付ける」ということを実践してみます。
作戦は,以下のようにしましょう。
・インスタンス1にVLAN10とVLAN20をマッピングする
・インスタンス2にVLAN30とVLAN40をマッピングする
・インスタンス1とインスタンス2で使うリンクを別々にして,トラフィックが負荷分散されるようにする
図にすると,以下のようになります。
インスタンス1では,SwitchAをルート・ブリッジにして,上側のリンクを使うようにします。
【VLAN10とVLAN20はインスタンス1のSTPツリーを使う】

一方のインスタンス2では,SwitchBをルート・ブリッジにして,下側のリンクを使うようにします。
【VLAN30とVLAN40はインスタンス2のSTPツリーを使う】

●MSTPの設定の
MSTPの設定は,大きく二つあります。
@インスタンスを作る作業
A作ったインスタンスにVLANを対応付ける作業
です。
SwitchAにMSTPを設定してみましょう。
SwitchAはインスタンス1のルート・ブリッジにするので,そのように設定します。
MSTPを有効にして(1行目),インスタンス1のブリッジ・プライオリティを0に設定します(2行目)。
インスタンス1の設定は以上です。
SwitchA(config)#spanning-tree mode mst
SwitchA(config)#spanning-tree mst 1 priority 0
次に,インスタンスにVLANを対応付けます。
最初に,spanning-tree mst configurationと入力すると,MSTPの設定モードに入ります。
そこで,リージョン名,リビジョン番号を入力します。
どちらもMSTリージョンを区別するために必要な情報で,同一MSTPリージョンのすべてのスイッチで一致させる必要があります。
そして,instance 1 vlan 10,20で,VLAN10とVLAN20をインスタンス1に対応付けています。
さらに,instance 2 vlan 30,40で,VLAN30とVLAN40をインスタンス2に対応付けています。
設定内容を見るには,show pendingです。
exitでMSTPの設定モードから抜けると,設定が反映されます。
SwitchA(config)#spanning-tree mst configuration
SwitchA(config-mst)#name region1
SwitchA(config-mst)#revision 1
SwitchA(config-mst)#instance 1 vlan 10,20
SwitchA(config-mst)#instance 2 vlan 30,40
SwitchA(config-mst)#show pending
Pending MST configuration
Name [region1]
Revision 1
Instance Vlans mapped
-------- -------------------------------------------------------
0 1-9,11-19,21-29,31-39,41-4094
1 10,20
2 30,40
----------------------------------------------------------------
SwitchA(config-mst)#exit
SwitchBの設定も見てみましょう。
SwitchBは,インスタンス2のルート・ブリッジにします。
そして,Fa0/2のパス・コストを(デフォルトの128から)64に変更して,対向ポート(SwitchAのFa0/2)がルート・ポートになるようにします。
(こうして,インスタンス1とインスタンス2で別々のリンクを使うようにします。このしくみはPVSTラボで実践した内容と同じなので,PVSTラボを参照してください。)
SwitchB(config)#spanning-tree mst configuration
SwitchB(config)#spanning-tree mst 2 priority 0
SwitchB(config)#interface fastEthernet 0/2
SwitchB(config-if)#spanning-tree mst 2 port-priority 64
VLANとのマッピングの設定は,SwitchAに設定した内容とまったく同じです。
●トランクを設定
この時点では,まだ思い通りのMSTPの構成にはなっていません。
というのも,SwitchAとSwitchBにトランクの設定をしていないからです。
ということで,SwitchAにトランクの設定をします。
SwitchA(config)#interface range
fastEthernet
0/1 - 2
SwitchA(config-if-range)#switchport
mode
trunk
SwitchA(config-if-range)#switchport
trunk
allowed vlan 10,20,30,40
SwitchBにもトランク設定をします。
SwitchB(config)#interface range
fastEthernet
0/1 - 2
SwitchB(config-if-range)#switchport trunk
encapsulation dot1q
SwitchB(config-if-range)#switchport
trunk
allowed vlan 10,20,30,40
SwitchB(config-if-range)#switchport
mode
trunk
ちなみに,SwitchAはトランク方式にIEEE802.1Qしかサポートしていない(Catalyst2950)ので,switchport
trunk encapsulation dot1qコマンドを入れる必要はありません(そもそもコマンドがありません)。
以上で,設定は完了です。
●MSTPの動作を確認
設定が正しく反映されているか確認しましょう。
まずはSwitchAです。
MST00(デフォルトのインスタンス0),MST01(インスタンス1),MST02(インスタンス2)というインスタンスごとにポートの状態が表示されます。
SwitchA#show spanning-tree
MST00
Spanning tree enabled protocol
mstp
Root ID Priority 32768
Address 000a.8a0d.4180
This bridge is the root
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Bridge ID Priority 32768 (priority
32768 sys-id-ext 0)
Address 000a.8a0d.4180
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr
Type
---------------- ---- --- --------- --------
-----------------
Fa0/1 Desg FWD 200000 128.1 P2p
Fa0/2 Desg FWD 200000 128.2 P2p
MST01
Spanning tree enabled protocol
mstp
Root ID Priority 1
Address 000a.8a0d.4180
This bridge is the root
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Bridge ID Priority 1 (priority
0 sys-id-ext 1)
Address 000a.8a0d.4180
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr
Type
---------------- ---- --- --------- --------
------------------
Fa0/1 Desg FWD 200000 128.1 P2p
Fa0/2 Desg FWD 200000 128.2 P2p
MST02
Spanning tree enabled protocol
mstp
Root ID Priority 2
Address 000e.d7f6.9180
Cost 200000
Port 2
(FastEthernet0/2)
Hello Time 2
sec Max Age
20 sec Forward Delay 15 sec
Bridge ID Priority 32770 (priority
32768 sys-id-ext 2)
Address 000a.8a0d.4180
Hello Time 2
sec Max Age
20 sec Forward Delay 15 sec
Interface Role
Sts Cost Prio.Nbr
Type
---------------- ---- --- ---------
--------
--------------------
Fa0/1 Altn BLK 200000 128.1 P2p
Fa0/2 Root
FWD 200000 128.2 P2p
SwitchAでは,MST02(インスタンス2)のFa0/2がブロッキングになっているのがわかります(青字の部分)。
ちなみにMSTPにおけるBPDUは,インスタンス0のSTPツリーを使ってやりとりされます。
またデフォルトでは,すべてのVLANがインスタンス0にマッピングされています。
それから,パス・コスト値が「200000」となっているのは,MSTPではコストを32ビットで表す方式(long値)を採用しているためです。
SwitchBの状態も見てみましょう。
SwitchB#show spanning-tree
MST00
Spanning tree enabled protocol
mstp
Root ID Priority 32768
Address 000a.8a0d.4180
Cost 0
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Bridge ID Priority 32768 (priority
32768 sys-id-ext 0)
Address 000e.d7f6.9180
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr
Type
---------------- ---- --- --------- --------
----------------------
Fa0/1 Root FWD 200000 128.1 P2p
Fa0/2 Altn BLK 200000 128.2 P2p
MST01
Spanning tree enabled protocol
mstp
Root ID Priority 1
Address 000a.8a0d.4180
Cost 200000
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 000e.d7f6.9180
Hello Time 2
sec Max Age
20 sec Forward Delay 15 sec
Interface Role
Sts Cost
Prio.Nbr Type
---------------- ---- --- ---------
--------
-----------------------
Fa0/1 Root
FWD 200000 128.1 P2p
Fa0/2 Altn BLK 200000 128.2 P2p
MST02
Spanning tree enabled protocol
mstp
Root ID Priority 2
Address 000e.d7f6.9180
This bridge is the root
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Bridge ID Priority 2 (priority
0 sys-id-ext 2)
Address 000e.d7f6.9180
Hello Time 2 sec Max Age
20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr
Type
---------------- ---- --- --------- --------
-----------------------
Fa0/1 Desg FWD 200000 128.1 P2p
Fa0/2 Desg FWD 200000
64.2 P2p
SwitchBは,インスタンス1(MST01)のFa0/2がブロッキングになってるのがわかります(青字の部分)。
これで,解説冒頭の図にあるようにブロッキング・ポートが定まり,インスタンス1とインスタンス2で別々のリンクが使われるようになったことが確認できました。
show spanning-tree mstと入力すると,インスタンス1(MST01)がVLAN10とVLAN20に,インスタンス2(MST02)がVLAN30とVLAN40にマッピングされていることが確認できます(下の赤字の部分)。
SwitchB#show spanning-tree mst
###### MST00 vlans mapped:
1-9,11-19,21-29,31-39,41-4094
Bridge address 000e.d7f6.9180 priority 32768
(32768 sysid 0)
Root address 000a.8a0d.4180 priority 32768
(32768 sysid 0)
port Fa0/1 path
cost 0
IST master address 000a.8a0d.4180 priority 32768
(32768 sysid 0)
path
cost 200000 rem hops 19
Operational hello time 2, forward
delay 15,
max age 20
Configured hello time 2, forward
delay 15,
max age 20, max hops 20
Interface Role Sts Cost
Prio.Nbr Type
---------------- ---- --- --------- --------
---------------
Fa0/1 Root FWD 200000 128.1 P2p
Fa0/2 Altn BLK 200000 128.2 P2p
###### MST01 vlans mapped:
10,20
Bridge address 000e.d7f6.9180 priority 32769
(32768 sysid 1)
Root address 000a.8a0d.4180 priority 1
(0 sysid 1)
port Fa0/1 cost 200000
rem hops 19
Interface Role Sts Cost Prio.Nbr
Type
---------------- ---- --- --------- --------
----------------
Fa0/1 Root FWD 200000 128.1 P2p
Fa0/2 Altn BLK 200000 128.2 P2p
###### MST02 vlans mapped:
30,40
Bridge address 000e.d7f6.9180 priority 2
(0 sysid 2)
Root this switch for MST02
Interface Role Sts Cost Prio.Nbr
Type
---------------- ---- --- --------- --------
-----------------
Fa0/1 Desg FWD 200000 128.1 P2p
Fa0/2 Desg FWD 200000
64.2 P2p
●おまけ(SwitchAとSwitchBのアクセス・ポートの設定例)
スイッチのアクセス・ポートの設定例も確認しておきましょう。
SwitchAのFa0/11にVLAN10,Fa0/12にVLAN20,Fa0/13にVLAN30,Fa0/14にVLAN40のマシンがつながっているとすると,設定は以下のようになります。
MSTPではRSTPが使われるので,アクセス・ポートにPortFastのコマンドを入れるのを忘れずに。
■SwitchAの設定
interface FastEthernet0/11
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/13
switchport access vlan 30
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/14
switchport access vlan 40
switchport mode access
spanning-tree portfast
SwitchBも同様です。
SwitchBのFa0/11にVLAN10,Fa0/12にVLAN20,Fa0/13にVLAN30,Fa0/14にVLAN40のマシンがつながっているとすると,設定は以下のようになります。
■SwitchBの設定
interface FastEthernet0/11
switchport access vlan 10
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 20
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
switchport access vlan 30
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
switchport access vlan 40
switchport mode access
no ip address
spanning-tree portfast
●Multiple Spanning Tree Protocol(802.1s)の概要
http://www.cisco.com/japanese/warp/public/3/jp/service/tac/473/147-j.shtml
|
|