You can collect specific debug information for a number of items related to Spanning Trunk Protocol (STP). Consider what you might want to see in your debug data.
If you enable debugging for STP or debugging for Bridge Protocol Data Units (BPDU) items, you will see a BPDU frame for each VLAN every two seconds. This can quickly fill your screen so that you will not be able to see to turn debugging off.
Just type the no version of the command that started the debugging. Even if you cannot see it typed, it will work. As a shortcut, you can disable all debugging on your switch with the no debug all command or the shorter u all.
The debug command can be a busy tool if you are not careful. It will fill your screen with output, and you will not be able to see to turn it off. Use u all to disable all available debugging, and be patient.
Switch2#debug spanning-tree ?
all All Spanning Tree debugging messages
backbonefast BackboneFast events
bpdu Spanning tree BPDU
bpdu-opt Optimized BPDU handling
config Spanning tree config changes
csuf/csrt STP CSUF/CSRT
etherchannel EtherChannel support
events Spanning tree topology events
exceptions Spanning tree exceptions
general Spanning tree general
mstp MSTP debug commands
pvst+ PVST+ events
root Spanning tree root events
snmp Spanning Tree SNMP handling
switch Switch Shim debug commands
synchronization STP state sync events
uplinkfast UplinkFast events
debug all and debug BPDU both quickly backlog the display buffer, so even after you disable the debugging, you may be waiting some time for the output to clear. Most of the data in the output is generated from the BPDU information.
Switch2#debug spanning-tree all
01:22:46: STP: VLAN0001 rx BPDU: config protocol = ieee, packet from FastEthernet0/1 , linktype IEEE_SPANNING , enctype 2, encsize 17
01:22:46: STP: enc 01 80 C2 00 00 00 00 06 D6 AB A0 4C 00 26 42 42 03
01:22:46: STP: Data 000000000080010006D6ABA0400000000080010006D6ABA040800C0000140002000F00
01:22:46: STP: VLAN0001 Fa0/1:0000 00 00 00 80010006D6ABA040 00000000 80010006D6ABA040 800C 0000 1400 0200 0F00
01:22:46: STP(1) port Fa0/1 supersedes 0
01:22:46: STP SW: TX: : 0180.c200.0000<-0006.d6ac.46c2 type/len 0026
01:22:46: encap SAP linktype ieee-st vlan 1 len 60 on v1 Fa0/2
01:22:46: 42 42 03 SPAN
01:22:46: CFG P:0000 V:00 T:00 F:00 R:8001 0006.d6ab.a040 00000013
01:22:46: B:8001 0006.d6ac.46c0 80.02 A:0100 M:1400 H:0200 F:0F00
01:22:46: STP: VLAN0001 Fa0/2 tx BPDU: config protocol=ieee
Data : 0000 00 00 00 80010006D6ABA040 00000013 80010006D6AC46C0 8002 0100 1400 0200 0F00
01:22:46: STP SW: PROC RX: 0100.0ccc.cccd<-0006.d6ab.a04c type/len 0032
01:22:46: encap SNAP linktype sstp vlan 2 len 64 on v2 Fa0/1
01:22:46: AA AA 03 00000C 010B SSTP
01:22:46: CFG P:0000 V:00 T:00 F:00 R:8002 0006.d6ab.a040 00000000
01:22:46: B:8002 0006.d6ab.a040 80.0C A:0000 M:1400 H:0200 F:0F00
01:22:46: T:0000 L:0002 D:0002
A much lower throughput item to track, but equally important, is the presence of topology changes. On a stable network, you see these only when switches are being rebooted. In this example, ports were disabled and re-enabled on the ports used in a spanning tree link. Notice how you can see the whole Listening, Learning, and Forwarding transition.
Switch2#debug spanning-tree events
Spanning Tree event debugging is on
Switch2#
3d13h: STP: VLAN0001 new root port Fa0/1, cost 19
3d13h: STP: VLAN0001 Fa0/1 -> listening
3d13h: STP: VLAN0002 new root port Fa0/1, cost 19
3d13h: STP: VLAN0002 Fa0/1 -> listening
3d13h: STP: VLAN0005 new root port Fa0/1, cost 19
3d13h: STP: VLAN0005 Fa0/1 -> listening
3d13h: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
3d13h: STP: VLAN0001 sent Topology Change Notice on Fa0/1
3d13h: STP: VLAN0002 sent Topology Change Notice on Fa0/1
3d13h: STP: VLAN0005 sent Topology Change Notice on Fa0/1
3d13h: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down
3d13h: STP: VLAN0001 Fa0/1 -> learning
3d13h: STP: VLAN0002 Fa0/1 -> learning
3d13h: STP: VLAN0005 Fa0/1 -> learning
3d13h: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up
3d13h: set portid: VLAN0001 Fa0/2: new port id 8002
3d13h: STP: VLAN0001 Fa0/2 -> listening
3d13h: set portid: VLAN0002 Fa0/2: new port id 8002
3d13h: STP: VLAN0002 Fa0/2 -> listening
3d13h: set portid: VLAN0005 Fa0/2: new port id 8002
3d13h: STP: VLAN0005 Fa0/2 -> listening
3d13h: STP: VLAN0001 new root port Fa0/2, cost 19
3d13h: STP: VLAN0001 sent Topology Change Notice on Fa0/2
3d13h: STP: VLAN0001 Fa0/1 -> blocking
3d13h: STP: VLAN0005 new root port Fa0/2, cost 19
3d13h: STP: VLAN0005 sent Topology Change Notice on Fa0/2
3d13h: STP: VLAN0005 Fa0/1 -> blocking
3d13h: STP: VLAN0002 new root port Fa0/2, cost 19
3d13h: STP: VLAN0002 sent Topology Change Notice on Fa0/2
3d13h: STP: VLAN0002 Fa0/1 -> blocking
3d13h: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
3d13h: STP: VLAN0001 Fa0/2 -> learning
3d13h: STP: VLAN0002 Fa0/2 -> learning
3d13h: STP: VLAN0005 Fa0/2 -> learning
3d13h: STP: VLAN0001 sent Topology Change Notice on Fa0/2
3d13h: STP: VLAN0001 Fa0/2 -> forwarding
3d13h: STP: VLAN0002 Fa0/2 -> forwarding
3d13h: STP: VLAN0005 Fa0/2 -> forwarding
Finally, review the following code, which illustrates the terribly chatty BPDU debugging. Note the type of information included in the BPDU frames that steadily crosses your network. In this example, you see where debugging is disabled.
Switch2#debug spanning-tree bpdu
Switch2#
3d13h: STP: VLAN0001 rx BPDU: config protocol = ieee, packet from FastEthernet0/2 , linktype IEEE_SPANNING , enctype 2, encsize 17
3d13h: STP: enc 01 80 C2 00 00 00 00 06 D6 AB A0 4B 00 26 42 42 03
3d13h: STP: Data 000000000080010006D6ABA0400000000080010006D6ABA040800B0000140002000F00
3d13h: STP: VLAN0001 Fa0/2:0000 00 00 00 80010006D6ABA040 00000000 80010006D6ABA040 800B 0000 1400 0200 0F00
3d13h: STP(1) port Fa0/2 supersedes 0
3d13h: STP: VLAN0001 Fa0/3 tx BPDU: config protocol=ieee
Data : 0000 00 00 00 80010006D6ABA040 00000013 80010006D6AC46C0 8003 0100 1400 0200 0F00
3d13h: STP: VLAN0001 rx BPDU: config protocol = ieee, packet from FastEthernet0/1 , linktype IEEE_SPANNING , enctype 2, encsize 17
3d13h: STP: enc 01 80 C2 00 00 00 00 06 D6 AB A0 4C 00 26 42 42 03
3d13h: STP: Data 000000000080010006D6ABA0400000000080010006D6ABA040800C0000140002000F00
3d13h: STP: VLAN0001 Fa0/1:0000 00 00 00 80010006D6ABA040 00000000 80010006D6ABA040 800C 0000 1400 0200 0F00
3d13h: STP(1) port Fa0/1 supersedes 0
3d13h: STP: VLAN0005 rx BPDU: config protocol = ieee, packet from FastEthernet0/2 , linktype SSTP , enctype 3, encsize 22
3d13h: STP: enc 01 00 0C CC CC CD 00 06 D6 AB A0 4B 00 32 AA AA 03 00 00 0C 01 0B
3d13h: STP: Data 000000000080050006D6ABA0400000000080050006D6ABA040800B0000140002000F00
3d13h: STP: VLAN0005 Fa0/2:0000 00 00 00 80050006D6ABA040 00000000 80050006D6ABA040 800B 0000 1400 0200 0F00
3d13h: STP(5) port Fa0/2 supersedes 0
3d13h: STP: VLAN0005 rx BPDU: config pu allrotocol = ieee, packet from FastEthernet0/1 , linktype SSTP , enctype 3, encsize 22
3d13h: STP: enc 01 00 0C CC CC CD 00 06 D6 AB A0 4C 00 32 AA AA 03 00 00 0C 01 0B
3d13h: STP: Data 000000000080050006D6ABA0400000000080050006D6ABA040800C0000140002000F00
3d13h: STP: VLAN0005 Fa0/1:0000 00 00 00 80050006D6ABA040 00000000 80050006D6ABA040 800C 0000 1400 0200 0F00
3d13h: STP(5) port Fa0/1 supersedes 0
3d13h: STP: VLAN0002 rx BPDU: config protocol = ieee, packet from FastEthernet0/2 , linktype SSTP
All possible debugging has been turned off
Switch2# , enctype 3, encsize 22
3d13h: STP: enc 01 00 0C CC CC CD 00 06 D6 AB A0 4B 00 32 AA AA 03 00 00 0C 01 0B
3d13h: STP: Data 000000000080020006D6ABA0400000000080020006D6ABA040800B0000140002000F00
3d13h: STP: VLAN0002 Fa0/2:0000 00 00 00 80020006D6ABA040 00000000 80020006D6ABA040 800B 0000 1400 0200 0F00
3d13h: STP(2) port Fa0/2 supersedes 0
3d13h: STP: VLAN0002 rx BPDU: config protocol = ieee, packet from FastEthernet0/1 , linktype SSTP , enctype 3, encsize 22
3d13h: STP: enc 01 00 0C CC CC CD 00 06 D6 AB A0 4C 00 32 AA AA 03 00 00 0C 01 0B
3d13h: STP: Data 000000000080020006D6ABA0400000000080020006D6ABA040800C0000140002000F00
3d13h: STP: VLAN0002 Fa0/1:0000 00 00 00 80020006D6ABA040 00000000 80020006D6ABA040 800C 0000 1400 0200 0F00
3d13h: STP(2) port Fa0/1 supersedes 0
dummies
Source:http://www.dummies.com/how-to/content/debugging-spanning-trunk-protocol-stp.html
No comments:
Post a Comment