スパニング ツリー設定を表示するには、show spanning-tree 特権 EXEC モード コマンドを使用します。
構文
show spanning-tree [interface-id] [{instance instance-id} | {vlan vlan-id}]
show spanning-tree [detail] [active | blockedports] [{instance instance-id} | {vlan vlan-id}]
show spanning-tree inconsistentports
show spanning-tree mst-configuration
show spanning-tree mst-configuration digest
パラメータ
-
interface-id(オプション)インターフェイス ID を指定します。インターフェイス ID には、イーサネット ポートまたはポート チャネルのいずれかのタイプを指定できます。
-
detail:詳細情報を表示します。
-
active:アクティブなポートのみを表示します。アクティブポートは、STP が有効で、動作ステータスが up のポートです。デバイスモードが PVST+ または Rapid PVST+ の場合、ポートも表示された VLAN のメンバーである必要があります。
-
blockedports:ブロックされたポートのみを表示します。
-
instance-id:MST インスタンス(範囲:1 ~ 7)。パラメータは、モード MSTP が有効な場合にのみ定義できます。
-
vlan vlan-id:VLAN ID を指定します。(範囲:1 ~ 4094)パラメータは、モード PVST または RPVST が有効な場合にのみ定義できます。
-
inconsistentports:STP の状態が整合しないポートを表示します。コマンドは、PVST+ モードまたは Rapid PVST モードの場合にのみ適用されます。
-
mst-configuration:MST 設定の情報を表示します。
-
mst-configuration digest:MST 設定のダイジェスト情報を表示します。
デフォルト設定
インターフェイスを指定しない場合、デフォルトはすべてのインターフェイスです。
使用上のガイドライン
このコマンドは、MST が有効の場合にのみ機能します。
例
次の例では、さまざまな設定のスパニングツリー情報を表示します。
Root ID
|
Priority
Address
Cost
Port
|
32768
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Bridge ID
|
Priority
Address
|
36864
00:02:4b:29:7a:00
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
------
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
gi1/0/5
|
State
------
Enabled
Enabled
Disabled
Enabled
Enabled
|
Prio. No
------
128.1
128.2
128.3
128.4
128.5
|
Cost
-----
20000
20000
20000
20000
20000
|
Sts
---
FRW
FRW
-
BLK
DIS
|
Role
----
Root
Desg
-
Altn
-
|
PortFast
-------
No
No
-
No
-
|
Type
----------
P2p (RSTP)
Shared (STP)
-
Shared (STP)
-
|
switchxxxxxx# show spanning-tree
Spanning tree disabled (BPDU filtering) mode RSTP
Default port cost method: long
Loopback guard: Disabled
Interfaces
Name
--------
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
gi1/0/5
|
State
--------
Enabled
Enabled
Disabled
Enabled
Enabled
|
Prio.Nbr
---------
128.1
128.2
128.3
128.4
128.5
|
Cost
-----
20000
20000
20000
20000
20000
|
Sts
---
FRW
FRW
-
FRW
DIS
|
Role
----
Desg
Desg
-
Desg
-
|
PortFast
---------
No
No
-
No
-
|
Type
----------
P2p (RSTP)
Shared (STP)
-
Shared (STP)
-
|
switchxxxxxx# show spanning-tree
Spanning tree disabled (BPDU filtering) mode RSTP
Default port cost method: long
Loopback guard: Disabled
Root ID
|
Priority
Address
Path Cost
Root Port
Hello Time
|
N/A
N/A
N/A
N/A
N/A
|
Max Age N/A
|
Forward Delay N/A
|
Bridge ID
|
Priority
Address
|
36864
00:02:4b:29:7a:00
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
---------
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
gi1/0/5
|
State
--------
Enabled
Enabled
Disabled
Enabled
Enabled
|
Prio.Nb
-------
128.1
128.2
128.3
128.4
128.5
|
Cost
-----
20000
20000
20000
20000
20000
|
Sts
---
-
-
-
-
-
|
Role
----
-
-
-
-
-
|
PortFast
---------
-
-
-
-
-
|
Type
----------
-
-
-
-
-
|
switchxxxxxx# show spanning-tree active
Spanning tree enabled mode RSTP
Default port cost method: long
Loopback guard: Disabled
Root ID
|
Priority
Address
Path Cost
Root Port
|
32768
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Bridge ID
|
Priority
Address
|
36864
00:02:4b:29:7a:00
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
---------
gi1/0/1
gi1/0/2
gi1/0/4
|
State
--------
Enabled
Enabled
Enabled
|
Prio.Nbr
------
128.1
128.2
128.4
|
Cost
-----
20000
20000
20000
|
Sts
---
FRW
FRW
BLK
|
Role
----
Root
Desg
Altn
|
PortFast
---------
No
No
No
|
Type
----------
P2P (RSTP)
Shared (STP)
Shared (STP)
|
switchxxxxxx# show spanning-tree blockedports
Spanning tree enabled mode RSTP
Default port cost method: long
Loopback guard: Disabled
Root ID
|
Priority
Address
Path Cost
Root Port
|
32768
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Bridge ID
|
Priority
|
36864
|
|
Address
|
00:02:4b:29:7a:00
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
---------
gi1/0/4
|
State
-------
Enabled
|
Prio.Nbr
------
128.4
|
Cost
-----
19
|
Sts
---
BLK
|
Role
----
Altn
|
PortFast
--------
No
|
Type
----------
Shared (STP)
|
switchxxxxxx# show spanning-tree detail
Spanning tree enabled mode RSTP
Default port cost method: long
Loopback guard: Disabled
Root ID
|
Priority
Address
Path Cost
Root Port
|
32768
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Bridge ID
|
Priority
Address
|
36864
00:02:4b:29:7a:00
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Number of topology changes 2 last change occurred 2d18h ago
|
Times:
|
hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
|
Port 1 (gi1/0/1) enabled
State: Forwarding
Port id: 128.1
Type: P2p (configured: auto) RSTP
Designated bridge Priority: 32768
Designated port id: 128.25
Guard root: Disabled
|
Role: Root
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:01:42:97:e0:00
Designated path cost: 0
BPDU guard: Disabled
|
Number of transitions to forwarding state: 1
BPDU: sent 2, received 120638
|
Port 2 (gi1/0/2) enabled
State: Forwarding
Port id: 128.2
Type: Shared (configured: auto) STP
Designated bridge Priority: 32768
Designated port id: 128.2
Guard root: Disabled
|
Role: Designated
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:7a:00
Designated path cost: 20000
BPDU guard: Disabled
|
Number of transitions to forwarding state: 1
BPDU: sent 2, received 170638
|
Port 3 (gi1/0/3) disabled
State: N/A
Port id: 128.3
Type: N/A (configured: auto)
Designated bridge Priority: N/A
Designated port id: N/A
Guard root: Disabled
|
Role: N/A
Port cost: 20000
Port Fast: N/A (configured:no)
Address: N/A
Designated path cost: N/A
BPDU guard: Disabled
|
Number of transitions to forwarding state: N/A
BPDU: sent N/A, received N/A
|
Port 4 (gi1/0/4) enabled
State: Blocking
Port id: 128.4
Type: Shared (configured:auto) STP
Designated bridge Priority: 28672
Designated port id:
128.25
Guard root: Disabled
|
Role: Alternate
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:30:94:41:62:c8
Designated path cost: 20000
BPDU guard: Disabled
|
Number of transitions to forwarding state: 1
BPDU: sent 2, received 120638
|
Port 5 (gi1/0/5) enabled
State: Disabled
Port id: 128.5
Type: N/A (configured: auto)
Designated bridge Priority: N/A
Designated port id: N/A
Guard root: Disabled
|
Role: N/A
Port cost: 20000
Port Fast: N/A (configured:no)
Address: N/A
Designated path cost: N/A
BPDU guard: Disabled
|
Number of transitions to forwarding state: N/A
BPDU: sent N/A, received N/A
switchxxxxxx# show spanning-tree ethernet gi1/0/1
Port 1 (gi1/0/1) enabled
State: Forwarding
Port id: 128.1
Type: P2p (configured: auto) RSTP
Designated bridge Priority: 32768
Designated port id: 128.25
Guard root: Disabled
|
Role: Root
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:01:42:97:e0:00
Designated path cost: 0
BPDU guard: Disabled
|
Number of transitions to forwarding state: 1
BPDU: sent 2, received 120638
Root ID
|
Priority
Address
Path Cost
Root Port
|
4096
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Bridge ID
|
Priority
Address
|
36864
00:02:4b:29:7a:00
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
--------
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
gi1/0/5
gi1/0/6
|
State
--------
Enabled
Enabled
Disabled
Enabled
Enabled
Enabled
|
Prio.Nbr
---------
128.1
128.2
128.3
128.4
128.5
128.6
|
Cost
-----
20000
20000
20000
20000
20000
20000
|
Sts
---
Frw
DSCR
-
Dsbl
DSCR
Frw
|
Role
----
Root
Bkup
-
Dsbl
Altn
Desg
|
PortFast
--------No
No
No
No
No
Yes
|
Type
----------
P2P (RPVST)
P2P (RVPST)
-
-
P2P (RPVST)
Shared(PVST)
|
* Port Type or PVID Inconsistency
VLAN 20
Root ID
|
Priority
Address
|
4096
00:02:4b:29:7a:00
|
|
This switch is the root
|
|
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
|
Name
--------
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
gi1/0/5
gi1/0/6
|
State
--------
Enabled
Enabled
Disabled
Enabled
Enabled
Enabled
|
Prio.Nbr
---------
128.1
128.2
128.3
128.4
128.5
128.6
|
Cost
-----
20000
20000
20000
20000
20000
20000
|
Sts
---
FRW
Dscr*
Dsbl
Dsbl
Dsbl
Frw
|
Role
----
Desg
Desg
Dsbl
Dsbl
Dsbl
Desg
|
PortFast
--------No
No
No
No
no
Yes
|
Type
----------
P2p (RPVST)
P2p (RPVST)
-
-
P2P (RPVST)
Shared(PVST)
|
* Port Type or PVID Inconsistency
switchxxxxxx# show spanning-tree active
Spanning tree enabled mode Rapid-PVST
Default port cost method: long
Loopback guard: Disabled
VLAN 1
Root ID
|
Priority
Address
Path Cost
Root Port
|
4096
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Bridge ID
|
Priority
Address
|
36864
00:02:4b:29:7a:00
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
--------
gi1/0/1
gi1/0/2
gi1/0/5
gi1/0/6
|
State
--------
Enabled
Enabled
Enabled
Enabled
|
Prio.Nbr
---------
128.1
128.2
128.5
128.6
|
Cost
-----
20000
20000
20000
20000
|
Sts
---
Frw
DSCR
DSCR
Frw
|
Role
----
Root
Bkup
Altn
Desg
|
PortFast
--------No
No
No
Yes
|
Type
----------
P2p (RPVST)
P2p (RPVST)
P2p (RPVST)
Shared(PVST)
|
* Port Type or PVID Inconsistency
VLAN 20
Root ID
|
Priority
Address
|
4096
00:02:4b:29:7a:00
|
|
This switch is the root
|
|
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
--------
gi1/0/1
gi1/0/2
gi1/0/6
|
State
--------
Enabled
Enabled
Enabled
|
Prio.Nbr
---------
128.1
128.2
128.6
|
Cost
-----
20000
20000
20000
|
Sts
---
FRW
Dscr*
Frw
|
Role
----
Desg
Desg
Desg
|
PortFast
--------No
No
Yes
|
Type
----------
P2p (RPVST)
P2p (RPVST)
Shared(PVST)
|
* Port Type or PVID Inconsistency
switchxxxxxx# show spanning-tree VLAN 20
Spanning tree enabled mode PVST
Default port cost method: long
Loopback guard: Disabled
VLAN 20
Root ID
|
Priority
Address
|
4096
00:02:4b:29:7a:00
|
|
This switch is the root
|
|
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
Name
--------
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
gi1/0/5
gi1/0/6
|
State
--------
Enabled
Enabled
Disabled
Enabled
Enabled
Enabled
|
Prio.Nbr
---------
128.1
128.2
128.3
128.4
128.5
128.6
|
Cost
-----
20000
20000
20000
20000
20000
20000
|
Sts
---
FRW
Dscr*
Dsbl
Dsbl
Dsbl
Frw
|
Role
----
Desg
Desg
Dsbl
Dsbl
Dsbl
Desg
|
PortFast
--------No
No
No
No
no
Yes
|
Type
----------
P2p (RPVST)
P2p (RPVST)
-
-
P2P (RPVST)
Shared(PVST)
|
* Port Type or PVID Inconsistency
switchxxxxxx# show spanning-tree gi1/0/2
VLAN
--------
1
2
3
6
|
State
--------
Enabled
Enabled
Enabled
Enabled
|
Prio.Nbr
---------
128.1
128.2
128.3
128.6
|
Cost
-----
2000
2000
2000
2000
|
Sts
---
FRW
Dscr*
Dscr
Frw
|
Role
----
Root
Desg
Altr
Desg
|
PortFast
--------No
No
No
Yes
|
Type
----------
P2p (RPVST)
P2p (RPVST)
P2p (RPVST)
Shared(PVST)
|
* Port Type or PVID Inconsistency
switchxxxxxx# show spanning-tree gi1/0/2 vlan 3
(gi1/0/2) enabled
State: Discarding
Port id: 128.3
Type: P2p (configured: auto) RPVST
Designated bridge Priority: 32768
Designated port id: 128.22
Guard root: Disabled
|
Role: Alternate
Port cost: 2000
Port Fast: No (configured:Auto)
Address: 00:01:42:97:e0:00
Designated path cost: 0
BPDU guard: Disabled
|
switchxxxxxx# show spanning-tree inconsistentports
name
----
|
interface
---------
|
inconsistency
-------------
|
VLAN 10
|
gi1/0/2
|
Port Type Inconsistency
|
VLAN 10
|
gi1/0/7
|
PVID Inconsistency
|
VLAN 20
|
gi1/0/7
|
PVID Inconsistency
|
VLAN 20
|
gi1/0/8
|
Port Type Inconsistency
|
Number of inconsistent ports (segments) in the system : 4
Instance
--------
1
2
|
Vlans mapped
------------
1-9, 21-4094
10-20
|
State
---------
Enabled
Enabled
|
switchxxxxxx# show spanning-tree mst-configuration digest
Name: Region1
Revision: 1
Format selector: 0
Digest: 0xB41829F9030A054FB74EF7A8587FF58D
Number of instances configured: 3
switchxxxxxx# show spanning-tree
Spanning tree enabled mode MSTP
Default port cost method: long
Loopback guard: Disabled
###### MST 0 Vlans Mapped: 1-9
CST Root ID
|
Priority
Address
Path Cost
Root Port
|
32768
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
IST Master ID
|
Priority
Address
|
32768
00:02:4b:29:7a:00
|
|
This switch is the IST master.
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
|
Max hops 20
|
Name
----
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
|
State
-------
Enabled
Enabled
Enabled
Enabled
|
Prio.Nbr
--------
128.1
128.2
128.3
128.4
|
Cost
-----
20000
20000
20000
20000
|
Sts
---
FRW
FRW
FRW
FRW
|
Role
----
Root
Desg
Desg
Desg
|
PortFast
--------
No
No
No
No
|
Type
-------------
P2p Bound (RSTP)
Shared Bound (STP)
P2p
P2p
|
###### MST 1 Vlans Mapped: 10-20
Root ID
|
Priority
Address
Path Cost
Root Port
Rem hops
|
24576
00:02:4b:29:89:76
20000
gi1/0/4
19
|
Bridge ID
|
Priority
Address
|
32768
00:02:4b:29:7a:00
|
Name
----
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
|
State
-------
Enabled
Enabled
Enabled
Enabled
|
Prio.Nbr
--------
128.1
128.2
128.3
128.4
|
Cost
-----
20000
20000
20000
20000
|
Sts
---
FRW
FRW
BLK
FRW
|
Role
----
Boun
Boun
Altn
Root
|
PortFast
--------
No
No
No
No
|
Type
-------------
P2p Bound (RSTP)
Shared Bound (STP)
P2p
P2p
|
switchxxxxxx# show spanning-tree detail
Spanning tree enabled mode MSTP
Default port cost method: long
Loopback guard: Disabled
###### MST 0 Vlans Mapped: 1-9
CST Root ID
|
Priority
Address
Path Cost
Root Port
|
32768
00:01:42:97:e0:00
20000
gi1/0/1
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
IST Master ID
|
Priority
Address
|
32768
00:02:4b:29:7a:00
|
|
This switch is the IST master.
|
|
Hello Time 2 sec
|
Max Age 20 sec
|
Forward Delay 15 sec
|
|
Max hops 20
Number of topology changes 2 last change occurred 2d18h ago
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
|
Port 1 (gi1/0/1) enabled
State: Forwarding
Port id: 128.1
Type: P2p (configured: auto) Boundary RSTP
Designated bridge Priority: 32768
Designated port id: 128.25
Number of transitions to forwarding state: 1
BPDU: sent 2, received 120638
|
Role: Root
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:01:42:97:e0:00
Designated path cost: 0
|
Port 2 (gi1/0/2) enabled
State: Forwarding
Port id: 128.2
Type: Shared (configured: auto) Boundary STP
Designated bridge Priority: 32768
Designated port id: 128.2
Number of transitions to forwarding state: 1
BPDU: sent 2, received 170638
|
Role: Designated
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:7a:00
Designated path cost: 20000
|
Port 3 (gi1/0/3) enabled
State: Forwarding
Port id: 128.3
Type: Shared (configured: auto) Internal
Designated bridge Priority: 32768
Designated port id: 128.3
Number of transitions to forwarding state: 1
BPDU: sent 2, received 170638
|
Role: Designated
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:7a:00
Designated path cost: 20000
|
Port 4 (gi1/0/4) enabled
State: Forwarding
Port id: 128.4
Type: Shared (configured: auto) Internal
Designated bridge Priority: 32768
Designated port id: 128.2
Number of transitions to forwarding state: 1
BPDU: sent 2, received 170638
|
Role: Designated
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:7a:00
Designated path cost: 20000
|
###### MST 1 Vlans Mapped: 10-20
Root ID
|
Priority
Address
Path Cost
Root Port
|
24576
00:02:4b:29:89:76
20000
gi1/0/4
|
|
Rem hops 19
|
Bridge ID
|
Priority
Address
|
32768
00:02:4b:29:7a:00
|
|
Number of topology changes 2 last change occurred 1d9h ago
|
|
Times: hold 1, topology change 2, notification 2
hello 2, max age 20, forward delay 15
|
Port 1 (gi1/0/1) enabled
State: Forwarding
Port id: 128.1
Type: P2p (configured: auto) Boundary RSTP
Designated bridge Priority: 32768
Designated port id: 128.1
Number of transitions to forwarding state: 1
BPDU: sent 2, received 120638
|
Role: Boundary
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:7a:00
Designated path cost: 20000
|
Port 2 (gi1/0/2) enabled
State: Forwarding
Port id: 128.2
Type: Shared (configured: auto) Boundary STP
Designated bridge Priority: 32768
Designated port id: 128.2
Number of transitions to forwarding state: 1
BPDU: sent 2, received 170638
|
Role: Designated
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:7a:00
Designated path cost: 20000
|
Port 3 (gi1/0/3) disabled
State: Blocking
Port id: 128.3
Type: Shared (configured: auto) Internal
Designated bridge Priority: 32768
Designated port id: 128.78
Number of transitions to forwarding state: 1
BPDU: sent 2, received 170638
|
Role: Alternate
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:1a:19
Designated path cost: 20000
|
Port 4 (gi1/0/4) enabled
State: Forwarding
Port id: 128.4
Type: Shared (configured: auto) Internal
Designated bridge Priority: 32768
Designated port id: 128.2
Number of transitions to forwarding state: 1
BPDU: sent 2, received 170638
|
Role: Designated
Port cost: 20000
Port Fast: No (configured:no)
Address: 00:02:4b:29:7a:00
Designated path cost: 20000
|