Spanning Tree Protocol BPDU
Published: 01/07/2010
Reference trace file:
cisco_default_2950_bpdu.cap
cisco_default_2950_bpdu_rstp.cap
Cisco switches don't like switching loops. You shouldn't either, unless you like living on the edge with a management team who needs an excuse to fire you. This is why Spanning Tree Protocol (STP), also known as 802.1D, exists so IT workers everywhere can rest a little easier at night.
To add more delightful acronyms to networking jargon, Spanning Tree uses a data blob known as a Bridge Protocol Data Unit (BPDU) so two or more switches connected in redundant configuration (that is, two or more connections between each other) can determine which port to keep in a forwarding state while setting the others to block. This way, packets that can't find a resting place will not endlessly circle the earth forever and ever, chewing up precious bandwidth, causing users to open up Sev 1 tickets, and in general making that expensive switch feel more like a cheap hub.
A BPDU is a layer 2 frame containing information such as the root bridge, timer information, etc.. Every 2 seconds (as shown in the Hello Time field) one of these gets sent out of every interface like a noisy mob of mosquitos.
Spanning Tree Protocol Protocol Identifier: Spanning Tree Protocol (0x0000) Protocol Version Identifier: Spanning Tree (0) BPDU Type: Configuration (0x00) BPDU flags: 0x00 0... .... = Topology Change Acknowledgment: No .... ...0 = Topology Change: No Root Identifier: 32768 / 1 / 00:0e:84:cb:c7:c0 Root Bridge Priority: 32768 Root Bridge System ID Extension: 1 Root Bridge System ID: 00:0e:84:cb:c7:c0 Root Path Cost: 0 Bridge Identifier: 32768 / 1 / 00:0e:84:cb:c7:c0 Bridge Priority: 32768 Bridge System ID Extension: 1 Bridge System ID: 00:0e:84:cb:c7:c0 Port identifier: 0x8001 Message Age: 0 Max Age: 20 Hello Time: 2 Forward Delay: 15 |
These are default values. Cisco switches have a default bridge priority number of 32768 which is used as a first step in determining which one in the group of connected switches is considered the root bridge. If everyone has the same priority number, then the MAC address of the switch is used (in this case, 00:0e:84:cb:c7:c0). This MAC address is typically the first value shown in the output of the show mac-address-table
command (as part of the "CPU" port).
Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- All 000e.84cb.c7c0 STATIC CPU All 0100.0ccc.cccc STATIC CPU All 0100.0ccc.cccd STATIC CPU All 0100.0cdd.dddd STATIC CPU 1 00f0.1d00.0810 DYNAMIC Fa0/9 Total Mac Addresses for this criterion: 5 |
By the way, what would happen if you enabled Rapid Spanning Tree (802.1w)? In global config if we run the command spanning-tree mode rapid-pvst
the BPDU frames change to look like this:
Spanning Tree Protocol Protocol Identifier: Spanning Tree Protocol (0x0000) Protocol Version Identifier: Rapid Spanning Tree (2) BPDU Type: Rapid/Multiple Spanning Tree (0x02) BPDU flags: 0x0e (Port Role: Designated, Proposal) 0... .... = Topology Change Acknowledgment: No .0.. .... = Agreement: No ..0. .... = Forwarding: No ...0 .... = Learning: No .... 11.. = Port Role: Designated (3) .... ..1. = Proposal: Yes .... ...0 = Topology Change: No Root Identifier: 32768 / 1 / 00:0e:84:cb:c7:c0 Root Bridge Priority: 32768 Root Bridge System ID Extension: 1 Root Bridge System ID: 00:0e:84:cb:c7:c0 Root Path Cost: 0 Bridge Identifier: 32768 / 1 / 00:0e:84:cb:c7:c0 Bridge Priority: 32768 Bridge System ID Extension: 1 Bridge System ID: 00:0e:84:cb:c7:c0 Port identifier: 0x8003 Message Age: 0 Max Age: 20 Hello Time: 2 Forward Delay: 15 Version 1 Length: 0 |
For more information on Spanning Tree, see http://www.cisco.com/univercd/cc/td/doc/product/rtrmgmt/sw_ntman/cwsimain/cwsi2/cwsiug2/vlan2/stpapp.htm
Go back to the main articles list.