Troubleshooting an RPVST+ configuration
This section describes the show spanning tree commands you can use to monitor, troubleshoot, and debug the operation of a per-VLAN spanning tree configuration in your network.
NOTE: The
| |
Displaying the change history of root bridges
Syntax:
show spanning-tree
root-history vlan
<vlan-id>
Displays the last 10 root bridge changes on a specified VLAN configured with RPVST+. Included are the timestamp and Root Bridge ID recorded at each root bridge change.
Use the show spanning-tree root-history
command
to view the number and dates of changes in the assignment of a root
bridge. Possible intrusion into your VLAN network may occur if an
unauthorized external device gains access to a spanning tree by posing
as the root device in a topology. To prevent a port connected to the
device from being selected as the root port in a topology, use the spanning-tree
root-guard
command.
Displaying the change history of root bridges
switch#: show spanning-tree root-history vlan 20 Status and Counters - RPVST Root Changes History VLAN ID : 20 Root Changes Counter : 53 Current Root Bridge ID : 32768:0024a8-d13a40 Root Bridge ID Date Time ------------------- ---------- -------- 32768:0024a8-d13a40 05/04/2012 21:54:11 0:001185-c6e500 05/04/2012 21:54:07 32768:0024a8-d13a40 05/04/2012 16:41:11 0:001185-c6e500 05/04/2012 16:41:11
Enabling traps and displaying trap configuration
Syntax:
[no] spanning-tree trap [ errant-bpdu | loop-guard | new-root
topology-change [vlan < vid-list | instance [instance-ID] {cstt}
| root-guard ]
Enables or disables SNMP traps for errant-BPDU, loop guard, new root, and root guard event notifications.
errant-bpdu
Enables SNMP notification when an errant BPDU is received. Designed for use with BPDU filtering (seeConfiguring BPDU filtering).
loop-guard
Enables SNMP notification when a loop guard inconsistency is detected. Designed for use with the Loop Guard option (see Configuring STP loop guard).
new-root
Enables SNMP notification when a new root is elected on any VLAN configured for RPVST+ on the switch.
root-guard
Enables SNMP notifications when a root-guard inconsistency is detected.
Default for all of the above options: Disabled
The
no
form of the command disables traps on the switch.
Syntax:
show spanning-tree
traps
Displays the current spanning tree trap configuration on the switch.
Displaying debug counters for all VLAN instances
Syntax:
show spanning-tree
debug-counters
Displays the aggregate values of all RPVST+ debug counters that are maintained on a switch. These aggregate values are a summary of the information collected from all ports and from all spanning tree instances for all switch ports. Use the displayed diagnostic information to globally monitor RPVST+ operation on a per-switch basis.
Displaying debug counters for all VLANs
switch#: show spanning-tree debug-counters Status and Counters - RPVST Debug Counters Information Aggregated Value Counter Name Collected from VLANs ------------------------------ ------------------------- Invalid BPDUs 0 Errant BPDUs 0 Looped-back BPDUs 0 Starved BPDUs 18 Exceeded Max Age BPDUs 3 Topology Changes Detected 9 Topology Changes Tx 9 Topology Changes Rx 4 Topology Change ACKs Tx 0 Topology Change ACKs Rx 6 TCN BPDUs Tx 4 TCN BPDUs Rx 0 CFG BPDUs Tx 0 CFG BPDUs Rx 0 RST BPDUs Tx 0 RST BPDUs Rx 0 RPVST BPDUs Tx 1881 RPVST BPDUs Rx 2617
Displaying debug counters per-VLAN
Syntax:
show spanning-tree
debug vlan
<vlan-id>
Displays the aggregate values of all RPVST+ debug counters maintained on a switch for a specified VLAN.
Displaying debug counters for a specific VLAN
switch(config)#: show spanning-tree debug vlan 20 Status and Counters - RPVST Debug Counters Information VLAN ID : 20 Aggregated Value Counter Name Collected from Ports ------------------------------ -------------------- Invalid BPDUs 5 Errant BPDUs 10 Looped-back BPDUs 0 Starved BPDUs 9 Exceeded Max Age BPDUs 2 Topology Changes Detected 9 Topology Changes Tx 4 Topology Changes Rx 181 Topology Change ACKs Tx 0 Topology Change ACKs Rx 0 TCN BPDUs Tx 0 TCN BPDUs Rx 0 CFG BPDUs Tx 0 CFG BPDUs Rx 0 RST BPDUs Tx 0 RST BPDUs Rx 0 RPVST BPDUs Tx 1531 RPVST BPDUs Rx 1428
Displaying debug counters per-port per-VLAN
Syntax:
show spanning-tree
debug ports
<port-list>
vlan <vlan-id>
Displays the aggregate values of all RPVST+ debug counters maintained on one or more ports used by a specified VLAN.
Displaying debug counters for a specific port on a VLAN
Switch_A(config)#: show spanning-tree debug ports 9 vlan 20 Status and Counters - RPVST Debug Counters Information VLAN ID : 20 Port : 9 Counter Name Value Last Updated ------------------------------ --------------- -------------------- Invalid BPDUs 0 04/16/2012 22:27:15 Errant BPDUs 0 04/16/2012 22:27:15 Looped-back BPDUs 0 04/16/2012 22:27:15 Starved BPDUs 5 05/01/2012 21:48:11 Exceeded Max Age BPDUs 0 04/16/2012 22:27:15 Topology Changes Detected 9 05/04/2012 21:54:05 Topology Changes Tx 5 05/05/2012 22:04:49 Topology Changes Rx 2 05/07/2012 18:08:34 Topology Change ACKs Tx 0 04/16/2012 22:27:15 Topology Change ACKs Rx 0 04/16/2012 22:27:15 TCN BPDUs Tx 0 04/16/2012 22:27:15 TCN BPDUs Rx 0 04/16/2012 22:27:15 CFG BPDUs Tx 0 04/16/2012 22:27:15 CFG BPDUs Rx 0 04/16/2012 22:27:15 RST BPDUs Tx 0 04/16/2012 22:27:15 RST BPDUs Rx 0 04/16/2012 22:27:15 RPVST BPDUs Tx 7812 05/05/2012 22:04:49 RPVST BPDUs Rx 1065 05/08/2012 19:43:11
Field descriptions for RPVST+ debug command output
Field | Shows the number of — |
---|---|
Invalid BPDUs |
Received BPDUs that failed standard RPVST+ (802.1Q-REV/D5.0 14.4) validation checks and were dropped. This counter is maintained on a per-port per-VLAN basis. |
Errant BPDUs |
Received
BPDUs that were dropped on a port that is configured to not expect
BPDU packets. This counter is maintained on a per-port basis and is
incremented each time a BPDU is received on a port configured with
the BPDU filter to ignore incoming BPDU packets (spanning-tree
bpdu-filter command) or the BPDU protection feature to disable
the port when BPDU packets are received (spanning-tree bpdu-protection command). |
Looped-back BPDUs |
Times that a port has received self-sent BPDU packets as the result of an external loop condition in which the BPDUs were looped back to the originating transmission port. The received BPDU is still processed by RPVST+ and the port changes to a blocked state. This counter is maintained on a per-port per-VLAN basis. |
Starved BPDUs |
Times that
no BPDUs are received within the scheduled interval (three times the
Hello Time value configured with the spanning-tree vlan hello-time command)
from a VLAN-designated peer port on the VLAN root, alternate, or backup
port. As a result, the “starved” port triggers a spanning tree topology
regeneration. This counter is maintained on a per-port per-VLAN basis. |
Exceeded Max Age BPDUs |
Times
that a BPDU packet is received from a bridge with a Message Age value
greater than the configured value of the Max Age parameter (spanning-tree
maximum age command). This may occur if the receiving bridge
is located too far from the root bridge (beyond the configured size
of the spanning tree domain on the root bridge) or if a BPDU packet
with invalid root information is continuously circulating between
bridges in a spanning tree domain and needs to be aged out. |
Topology Changes Detected |
Times that a Topology Change event is detected by the port on a given VLAN and the port triggers a topology change propagation throughout the network. A Topology Change event occurs when a non-edge port enters forwarding state. This counter is maintained on a per-VLAN per-port basis. |
Topology Changes Tx |
Times that Topology Change information is propagated (sent out) through the port to the rest of the network. For a VLAN port running PVST (non-rapid), the counter is the number of times that a CFG or RST BPDU with the TC flag set is transmitted out of the port. This counter is maintained on a per-VLAN per-port basis. |
Topology Changes Rx |
Times that Topology Change information is received from the peer port. For a VLAN port running PVST (non-rapid), the counter is the number of times that a CFG or RST BPDU with the TC flag set is received. This counter is maintained on a per-port per-VLAN basis. |
Topology Change ACKs Tx |
Times that the Topology Change acknowledgement is transmitted through the port (number of CFG or RST BPDUs transmitted with the Topology Change Acknowledge flag set). This counter is maintained on a per-port per-VLAN basis. |
Topology Change ACKs Rx |
Times that the Topology Change acknowledgement is received on the port (number of CFG or RST BPDUs received with the Topology Change Acknowledge flag set). This counter is maintained on a per-VLAN basis. |
TCN BPDUs Tx |
Topology Change Notification BPDUs that are transmitted through the port. This counter is maintained on a per-port basis. |
TCN BPDUs Rx |
Topology Change Notification BPDUs that are received on the port. This counter is maintained on a per-port per-VLAN basis. |
CFG BPDUs Tx |
802.1D configuration BPDUs that are transmitted through the port. This counter is maintained on a per-port per-VLAN basis. |
CFG BPDUs Rx |
802.1D configuration BPDUs that are received on the port. This counter maintained on a per-port per-VLAN basis. |
RST BPDUs Tx |
802.1w RST BPDUs that are transmitted through the port. This counter is maintained on a per-port per-VLAN basis. |
RST BPDUs Rx |
802.1w RST BPDUs that are received on the port. This counter is maintained on a per-port per-VLAN basis. |
RPVST+ event log messages
Event | Log message |
---|---|
STP enabled/disabled on a VLAN | Spanning
tree Protocol enabled/disabled on vlan |
Switch does not receive BPDUs from peer on a particular VLAN and port | VLAN |
Switch received BPDU with inconsistent VLAN | Blocking
port-name on vlan |
Inconsistency is restored | Unblocking
port-name on vlan . |
Root port is changed on a VLAN | VLAN |
Switch received a BPDU with invalid TLV | Received
SSTP BPDU with bad TLV on |
The number of vlan-port instances exceeds
the recommended limit |
The number of vlan-port
instances exceeded the recommended limit of |
RADIUS subsystem tries to dynamically change port VLAN assignments when mode is RPVST | RADIUS unable
to assign port to VLAN |
LLDP subsystem tries to dynamically change port VLAN assignments when mode is RPVST | LLDP unable to assign port |
VPORT counts exceed 200 | The number
of vPorts on slot |
Using RPVST+ debug
While the Event Log records switch-level progress, status, and warning messages on the switch, the Debug/System Logging (Syslog) feature provides a way to record Event Log and debug messages on a remote device. For example, you can send messages about routing misconfigurations and other network protocol details to an external device, and later use them to debug network-level problems. The Debug/Syslog feature allows you to specify the types of Event Log and debug messages that you want to send to an external device. The two commands described next affect debug operation for RPVST+.
Syntax:
spanning-tree
clear-debug-counters [ports
<port-list>
][vlan <vid-list>
]
Clears all spanning tree debug counters unless specific ports and/or VLANs are specified.
ports
<port-list>
Clears spanning tree debug counters on the specified ports.
[ethernet]
<port-list>
Clears spanning tree debug counters on an entered list of posts or
all
for theports
command parameter.
vlan
Clears spanning tree debug counters for the VLAN.
vlan
<vlan-id-list>
One or more identifiers for the
VLAN
command parameter.Using the
vlan
andports
options together clears the spanning tree debug counters on the specified ports for the specified VLANs. Counters maintained on the same ports for other VLANs are not cleared.
Syntax:
[no] debug rpvst [event [filter vlan
<vid-list>
]]
[no] debug rpvst [packet [filter port
<port-list>
[vlan <vid-list>
]]]
Displays RPVST+ debug messages on the destination device specified with the
debug destination logging | session | buffer
command.
event
Displays RPVST+ Event Log messages.
filter vlan
<vid-list>
Limits log messages to those generated on the specified VLANs.
packet
Displays RPVST+ packets sent and received.
filter port
<port-list>
[vlan<vid-list>
]Limits packets displayed to those generated on the specified ports. If the
vlan
option is used, then packets displayed are further limited to the ports on the specified VLANs.The
no
form of the command disables display of RPVST+ debug messages on the destination device.