www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / TSHOOT / Module 3 / Using the show spanning-tree Command

Using the show spanning-tree Command

In the final section of this chapter, we will be taking a look at the Cisco IOS show spanning-tree command as well as the keywords that can be used in conjunction with this command. We will also discuss the relevant output that is printed by this command and how to interpret this information when validating or troubleshooting Spanning Tree Protocol. The following output shows the keywords that can be used in conjunction with this command:

Cat-3550-1#show spanning-tree ?
WORD               bridge group list, example 1,3-5,7,9
active             Report on active interfaces only
backbonefast       Show spanning tree backbonefast status
blockedports       Show blocked ports
bridge             Status and configuration of this bridge
detail             Detailed information
inconsistentports  Show inconsistent ports
interface          Spanning Tree interface status and configuration
mst                Multiple spanning trees
pathcost           Show Spanning pathcost options
root               Status and configuration of the root bridge
summary            Summary of port states
uplinkfast         Show spanning tree uplinkfast status
vlan               VLAN Switch Spanning Trees
|                  Output modifiers
<cr>

NOTE: Only keywords that are applicable to the TSHOOT certification will be discussed.

The active keyword prints information on active VLANs in the STP domain. This includes the STP timers, priority of the root bridge, active interfaces or ports and their states. The output of this command is illustrated below:

Cat-3550-1#show spanning-tree activeVLAN0001
Spanning tree enabled protocol ieee
Root ID    Priority    1
Address     000f.2303.2d80
This bridge is the root
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 secBridge ID  Priority    1      (priority 0 sys-id-ext 1)
Address     000f.2303.2d80
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– —————————-
Fa0/11              Desg FWD 19        128.11   P2p
Fa0/12              Desg FWD 19        128.12   P2p

 

VLAN0010
Spanning tree enabled protocol ieee
Root ID    Priority    32778
Address     000b.fd67.6500
Cost        19
Port        11 (FastEthernet0/11)
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)
Address     000f.2303.2d80
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– —————————
Fa0/11              Root FWD 19        128.11   P2p
Fa0/12              Altn BLK 19        128.12   P2p

The blockedports keyword prints blocked ports on a per-VLAN basis. If you know which ports should be in a blocking state, you can use this command to verify that they are indeed blocking. The following output shows the information that is printed by this command:

Cat-3550-1#show spanning-tree blockedportsName                 Blocked Interfaces List
——————– ————————————
VLAN0010             Fa0/12
VLAN0020             Fa0/12
VLAN0030             Fa0/12
VLAN0040             Fa0/12Number of blocked ports (segments) in the system : 4

The detail keyword prints detailed STP information on a per-VLAN basis. This information includes information on STP timers and port states amongst other information. Following is a sample output of the information that is printed by this command:

Cat-3550-1#show spanning-tree detailVLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 0, sysid 1, address 000f.2303.2d80
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set
Number of topology changes 5 last change occurred 01:03:37 ago
Times:  hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 1, topology change 0, notification 0, aging 300Port 11 (FastEthernet0/11) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.11.
Designated root has priority 1, address 000f.2303.2d80
Designated bridge has priority 1, address 000f.2303.2d80
Designated port id is 128.11, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 1916, received 69809

Port 12 (FastEthernet0/12) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.12.
Designated root has priority 1, address 000f.2303.2d80
Designated bridge has priority 1, address 000f.2303.2d80
Designated port id is 128.12, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 1914, received 69809

[Truncated Output]

The inconsistentports keyword prints information about ports that have an inconsistent STP state. Cisco IOS software places ports into an inconsistent state so that any misconfigurations do not impact STP and result in a protocol failure which can ultimately lead to a network outage. There are several reasons a port may be placed into an inconsistent state.  Valid reasons for which a port will be placed into this state include the following:

  1. Loop Inconsistency
  2. Port VLAN ID (PVID) Inconsistency
  3. Root Inconsistency
  4. Etherchannel Inconsistency
  5. Type Inconsistency

The port is placed into the loop inconsistent state if Loop Guard detects that a non-designated port has stopped receiving BPDUs. This is used to prevent the port from transitioning from non-designated (blocking) to designated (forwarding) in the absence of BPDUs. A switch port will be placed into a PVID inconsistent state if a PVST+ BPDU is received on a different VLAN than the BPDU was originated. This happens when native VLANs are mismatched.

The Root Guard feature prevents a designated port from becoming a root port. If the port on which the Root Guard feature receives a superior BPDU, it moves the port into a root inconsistent state, thus maintaining the current Root Bridge status quo. The Etherchannel inconsistent state is used to prevent loops in the event of any Etherchannel misconfigurations. Etherchannel guard is enabled on switches using the spanning-tree etherchannel guard misconfig global configuration command. And finally, a port is placed into a type inconsistent state if a PVST+ BPDU is received on a non-802.1Q trunk. Following is the output of the show spanning-tree inconsistentports command following an error message indicating a native VLAN mismatch on the switch:

*Mar  2 16:33:22.709: %SPANTREE-7-RECV_1Q_NON_TRUNK: Received 802.1Q BPDU on non trunk FastEthernet0/11 VLAN1.
*Mar  2 16:33:22.709: %SPANTREE-7-BLOCK_PORT_TYPE: Blocking FastEthernet0/11 on VLAN0001. Inconsistent port type.
Cat-3550-2#
Cat-3550-2#show spanning-tree inconsistentportsName                 Interface                Inconsistency
——————– ———————— ——————
VLAN0001             FastEthernet0/11         Port Type InconsistentNumber of inconsistent ports (segments) in the system : 1

The interface keyword prints STP information on a per-interface basis, which includes the port role and state, port cost and priority as well as the port type. You can append the detailkeyword to view additional information such as the root bridge ID and BPDU statistics. The following output shows the information printed by this command:

Cat-3550-1#show spanning-tree interface fastethernet 0/11Vlan                Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– —————————
VLAN0001            Desg FWD 19        128.11   P2p
VLAN0010            Root FWD 19        128.11   P2p
VLAN0020            Root FWD 19        128.11   P2p
VLAN0030            Root FWD 19        128.11   P2p
VLAN0040            Root FWD 19        128.11   P2p

The root keyword prints information about the root bridge for all active VLANs. This includes the root bridge ID, root priority, root port cost, timers and the root port as shown below:

Cat-3550-1#show spanning-tree rootRoot    Hello Max Fwd
Vlan                   Root ID          Cost    Time  Age Dly  Root Port
—————- ——————– ——— —– — —  ————
VLAN0001             1 000f.2303.2d80         0    2   20  15
VLAN0010         32778 000b.fd67.6500        19    2   20  15  Fa0/11
VLAN0020         32788 000b.fd67.6500        19    2   20  15  Fa0/11
VLAN0030         32798 000b.fd67.6500        19    2   20  15  Fa0/11
VLAN0040         32808 000b.fd67.6500        19    2   20  15  Fa0/11

The summary keyword prints summary information for all VLANs, including STP mode, STP enhancements, e.g. PortFast and Loop Guard configuration, the VLANs for which the local switch is root bridge as well as the state of different ports in different VLANs. Following is the output of the show spanning-tree summary command:

Cat-3550-2#show spanning-tree summary
Switch is in pvst mode
Root bridge for: VLAN0010, VLAN0020, VLAN0030, VLAN0040
Extended system ID           is enabled
Portfast Default             is disabled
PortFast BPDU Guard Default  is disabled
Portfast BPDU Filter Default is disabled
Loopguard Default            is disabled
EtherChannel misconfig guard is enabled
UplinkFast                   is disabled
BackboneFast                 is disabled
Configured Pathcost method used is shortName                   Blocking Listening Learning Forwarding STP Active
———————- ——– ——— ——– ———- ———-
VLAN0001                     1         0        0          1          2
VLAN0010                     0         0        0          2          2
VLAN0020                     0         0        0          2          2
VLAN0030                     0         0        0          2          2
VLAN0040                     0         0        0          2          2
———————- ——– ——— ——– ———- ———-
5 vlans                      1         0        0          9         10

And finally, the vlan keyword prints detailed information on a per-VLAN basis. This is one of the most commonly used STP commands. The information printed by this command includes STP timers set on the root bridge, local STP timers, and information on the root bridge amongst other things. Following is the output of this command on a non-root bridge:

Cat-3550-1#show spanning-tree vlan 10VLAN0010
Spanning tree enabled protocol ieee
Root ID    Priority    32778
Address     000b.fd67.6500
Cost        19
Port        11 (FastEthernet0/11)
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 secBridge ID  Priority    32778  (priority 32768 sys-id-ext 10)
Address     000f.2303.2d80
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– —————————
Fa0/11              Root FWD 19        128.11   P2p
Fa0/12              Altn BLK 19        128.12   P2p

Following is the output of the same command on the root bridge of the specified VLAN:

Cat-3550-2#show spanning-tree vlan 10VLAN0010
Spanning tree enabled protocol ieee
Root ID    Priority    32778
Address     000b.fd67.6500
This bridge is the root
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 secBridge ID  Priority    32778  (priority 32768 sys-id-ext 10)
Address     000b.fd67.6500
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– —————————
Fa0/11              Desg FWD 19        128.11   P2p
Fa0/12              Desg FWD 19        128.12   P2p

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.