Useful STP Display Commands


Many Spanning Tree show commands have already been discussed. This section mentions some additional show spantree capabilities and introduces some extremely useful commands not discussed earlier.

General show spantree Guidelines

A quick look at the output of show spantree ? provides an overview of the options available for this powerful and useful command. Example 7-19 displays the output of show spantree ? from 4.5.1 Catalyst 5000 code.

Example 7-19 Online Help Listing of show spantree Options
 Cat-D> (enable) show spantree ? Usage: show spantree [vlan] [active]        show spantree <mod_num/port_num>        show spantree backbonefast        show spantree blockedports [vlan]        show spantree portstate <trcrf>        show spantree portvlancost <mod_num/port_num>        show spantree statistics <mod_num/port_num> [vlan]        show spantree statistics <trcrf> <trbrf>        show spantree summary        show spantree uplinkfast 

The primary options are displayed in the following syntax listing:

 show spantree [vlan | mod_num/port_num] [blockedports | active | statistics | summary] 

These options (and more) are described in the following sections.

Using show spantree mod_num/port_num

It is extremely useful to utilize the mod_num/port_num option when analyzing Spanning Tree behavior on trunk links. It only lists port-level information and does not show the global and local timer values displayed with the VLAN parameter. For example, the command output in Example 7-20 looks at Port 1/1 which is configured as a trunk link carrying several VLANs.

Example 7-20 Output of show spantree mod_num/port_num
 Cat-A> (enable) show spantree 1/1 Port      Vlan  Port-State     Cost   Priority  Fast-Start  Group-Method --------- ----  -------------  -----  --------  ----------  ------------  1/1      1     listening         19        32   disabled               1/1      2     listening         16        32   disabled               1/1      3     listening         19        32   disabled               1/1      4     listening         16        32   disabled               1/1      5     listening         19        32   disabled               1/1      6     listening         16        32   disabled               1/1      7     listening         19        32   disabled               1/1      8     listening         19        32   disabled               1/1      9     listening         19        32   disabled               1/1      10    listening         19        32   disabled               1/1      1003  not-connected     19        32   disabled               1/1      1005  not-connected     19         4   disabled 

Using show spantree active

Another useful show spantree option is the active keyword. The active keyword filters out all of the not-connected ports. This feature can be especially useful during deployments where many ports are not yet connected to end stations or on Catalysts with very high port densities. Example 7-21 shows some sample show spantree output using the active keyword.

Example 7-21 Output of show spantree active
 Cat-A> (enable) show spantree 1 active VLAN 1 Spanning tree enabled Spanning tree type          ieee Designated Root             00-90-92-16-18-00 Designated Root Priority    32768 Designated Root Cost        19 Designated Root Port        1/1 Root Max Age   20 sec    Hello Time 2  sec   Forward Delay 15 sec Bridge ID MAC ADDR          00-90-92-1B-CB-00 Bridge ID Priority          32768 Bridge Max Age 20 sec    Hello Time 2  sec   Forward Delay 15 sec Port      Vlan  Port-State     Cost   Priority  Fast-Start  Group-Method --------- ----  -------------  -----  --------  ----------  ------------  1/1      1     forwarding        19        32   disabled               1/2      1     blocking          19        32   disabled               2/10     1     forwarding       100        32   disabled               2/23     1     listening        100        32   disabled              

Although optional, it is best to get into the habit of always specifying the vlan parameter. Otherwise, it is easy to waste crucial time looking at output for VLAN 1 (the default) when you thought you were looking at some other VLAN. The same is also true of showspantree statistics and show spantree blockedports.

Using show spantree summary

The show spantree summary command can be useful for getting an overview of the port states on an entire Catalyst device. As illustrated in the output in Example 7-22, port states are listed for every VLAN along with totals for the entire device listed at the bottom.

Example 7-22 Output of show spantree summary
 Cat-D> (enable) show spantree summary Summary of connected Spanning Tree ports by vlan Uplinkfast disabled for bridge. Vlan  Blocking Listening Learning Forwarding STP Active ----- -------- --------- -------- ---------- ----------    1         1         0        0          2          3    2         0         0        0          2          2    3         0         0        0          2          2    4         0         0        0          2          2    5         0         0        0          2          2    6         0         0        0          2          2    7         0         0        0          2          2    8         0         0        0          2          2 1003         1         0        0          1          2 1005         1         0        0          1          2       Blocking Listening Learning Forwarding STP Active ----- -------- --------- -------- ---------- ---------- Total        3         0        0         20         23 

Using show spantree blockedports

The show spantree blockedports command can be used to quickly list all of the blocked (and therefore looped) ports on a Catalyst. The VLAN, trunk, and EtherChannel information is listed for every port. A total is presented on the last line. Example 7-23 displays some sample output from the show spantree blockedports command.

Example 7-23 Output of show spantree blockedports
 Console> (enable) show spantree blockedports T = trunk g = group Ports       Vlans -----       ----------  1/2        1  2/14       1 Number of blocked ports (segments) in the system : 2 

Using Spanning Tree Logging

In some situations, it is more important to see real-time feedback of Spanning Tree events. This can be enabled with the set logging command, as shown in Example 7-24. For example, set logging level spantree 7 displays STP state transitions. The logging feature was initially released in 2.2 NMP images. Early versions of this feature only show limited information such as when ports enter or leave the Forwarding and Blocking states. Later versions, such as 4.X, show all transitions (such as Listening and Learning mode). This command can also be used to send Spanning Tree transition information to a Syslog server for analysis later or to monitor STP on an ongoing basis.

Example 7-24 Output of Spanning Tree Logging
 06/12/1999,19:33:45:SPANTREE-6: port 3/5 state in vlan 2 changed to blocking. 06/12/1999,19:33:45:SPANTREE-6: port 3/5 state in vlan 2 changed to Listening. 06/12/1999,19:33:51:SPANTREE-6: port 3/5 state in vlan 2 changed to Learning. 06/12/1999,19:33:58:SPANTREE-6: port 3/5 state in vlan 2 changed to forwarding. 
Using show spantree statistics

If you have a yearning for detailed Spanning Tree information, the show spantree statistics command should keep you happy for a while. This command presents several screens full of information for a single VLAN on a single port. For instance, the output in Example 7-25 displays information for VLAN 1 on Port 1/1 of a Catalyst.

Example 7-25 Output of show spantree statistics
 Cat-D> (enable) show spantree statistics 1/1 1 Port  1/1   VLAN 1 SpanningTree enabled for vlanNo = 1                 BPDU-related parameters port Spanning Tree                   enabled state                                forwarding port_id                              0x8001 port number                          0x1 path cost                            19 message age (port/VLAN)              0(20) designated_root                      00-90-92-55-80-00 designated_cost                      0 designated_bridge                    00-90-92-55-80-00 designated_port                      0x8001 top_change_ack                       FALSE config_pending                       FALSE port_inconsistency                   none                 PORT based information & statistics config bpdu's xmitted (port/VLAN)    1(393) config bpdu's received (port/VLAN)   402(804) tcn bpdu's xmitted (port/VLAN)       1(1) tcn bpdu's received (port/VLAN)      0(0) forward trans count                  1 scp failure count                    0                 Status of Port Timers forward delay timer                  INACTIVE forward delay timer value            15 message age timer                    ACTIVE message age timer value              0 topology change timer                INACTIVE topology change timer value          0 hold timer                           INACTIVE hold timer value                     1 delay root port timer                INACTIVE delay root port timer value          0                 VLAN based information & statistics spanningtree type                    ieee spanningtree multicast address       01-80-c2-00-00-00 bridge priority                      32768 bridge mac address                   00-90-92-55-94-00 bridge hello time                    2 sec bridge forward delay                 15 sec topology change initiator:           1/1 last topology change occured:        Fri Dec 11 1998, 14:25:00 topology change                      FALSE topology change time                 35 topology change detected             FALSE topology change count                1 topology change last recvd. from     00-00-00-00-00-00                 Other port-specific info dynamic max age transitions          0 port bpdu ok count                   0 msg age expiry count                 0 link loading                         1 bpdu in processing                   FALSE num of similar bpdus to process      0 received_inferior_bpdu               FALSE next state                           3 src mac count:                       0 total src mac count                  0 curr_src_mac                         00-00-00-00-00-00 next_src_mac                         00-00-00-00-00-00 channel_src_mac                      00-00-00-00-00-00 channel src count                    0 channel ok count                     0 

The output of show spantree statistics is broken into five sections. Several of the more useful fields are discussed here. The message age (port/VLAN) field under the BPDU-related parameters section displays two values. The first value (outside the parentheses) displays the age of the most recently received BPDU plus any time that has elapsed since it arrived. This can be useful to determine if the flow of Configuration BPDUs has stopped arriving from the Root Bridge. The second value (inside the parentheses) displays the Max Age for the VLAN, currently at the default of 20 seconds in the sample output. This is the locally configured value, not the value received from the Root Bridge (and actually in use).

The PORT based information & statistics presents some very useful BPDU counter statistics. The first two lines display the number of Configuration BPDUs transmitted and received. The next two lines display the same information for TCN BPDUs. Each line contains two values. The first value (outside the parentheses) displays the number of BPDUs transmitted or received on that port for the specified VLAN (if it is a trunk). The second value (inside the parentheses) shows the total number of BPDUs received for the entire VLAN (all ports).

If you are experiencing STP problems, this information can be used to verify that BPDUs are flowing. However, notice that both ends of a link generally do not increment both the transmit and the receive counters. During steady state processing, only the Designated Port increments the Configuration BPDU transmit counter, whereas the Root Port (or Ports) at the other end only increments the receive counter. The BPDU counters can be invaluable when troubleshooting situations where a link has failed in such a way that traffic cannot flow in both directions. Without this information, it can take days to narrow down the source of the instability.

Tip

Use the BPDU transmit and receive counters to troubleshoot link failure problems. Also, Cisco's UniDirectional Link Detection (UDLD) can be very useful.


The VLAN based information & statistics section contains helpful information on topology changes. Last topology change occurred shows the time and date that the last change took place. The topology change count field shows the total number of topology changes that have occurred since Spanning Tree initialized on this port. The topology change last recvd. from field shows the port MAC address (the MAC address used in the 802.3 header, not the MAC address used for the BID) of the last bridge or switch to send the current bridge a TCN BPDU. Use these fields to track instability caused by excessive Topology Change Notifications. However, notice that unless you are using PortFast on all of your end-station ports, every time a PC or workstation boots or shuts down it generates a TCN BPDU.

Tip

Use the topology change information in the VLAN based information & statistics section to track down TCN BPDU problems.




Cisco(r) LAN Switching
Cisco Catalyst LAN Switching
ISBN: B00007FYCI
EAN: N/A
Year: 2005
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net