Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Spanning Tree Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Bridge protocol data units== The above rules describe one way of determining what spanning tree will be computed by the algorithm, but the rules as written require knowledge of the entire network. The [[network bridge|bridges]] have to determine the root bridge and compute the port roles (root, designated, or blocked) with only the information that they have. To ensure that each bridge has enough information, the bridges use special data [[Frame (networking)|frames]] called bridge protocol data units (BPDUs) to exchange information about the Spanning Tree Protocol, bridge IDs, and root path costs. {{APHD|start|title=Example [[IEEE 802.3|802.3 Ethernet]] frame<ref>{{Cite web|title=The IEEE 802.3 Frame Format|url=https://www.firewall.cx/networking/ethernet/ieee-8023-frame.html|access-date=31 October 2024|website=firewall.cx}}</ref> with a Spanning Tree BPDU}} {{APHD|0|bits1=32|border1=bottom|field1=Source MAC|value1={{MACaddr|5C:A4:7D:1A:52:10}}}} {{APHD|4|bits1=16|border1=top|field1={{nbsp}}|bits2=16|border2=bottom|field2={{nbsp}}}} {{APHD|8|bits1=32|border1=top|field1=Destination MAC|value1={{MACaddr|01:80:C2:00:00:00}}|hint1=Destination MAC (STP multicast address)}} {{APHD|12|bits1=16|field1=Length|bits2=16|border2=right|field2=Logical Link Control Header}} {{APHD|16|bits1=8|border1=left|field1=LLC (cont.)|bits2=24|border2=bottom|background2=mistyrose|field2={{nbsp}}}} {{APHD|20|bits1=0|border1=top|background1=mistyrose|field1=BPDU payload}} {{APHD|999|bits1=32|field1=Frame Check Sequence}} {{APHD|end}} ;{{APHD|def|name=Source MAC|length=48 bits|text=A bridge sends a BPDU frame using the unique MAC address of the port itself as a source address. Address {{MACaddr|5C:A4:7D:1A:52:10}} is an example.}} ;{{APHD|def|name=Destination MAC|length=48 bits|text=The destination MAC address is an STP [[multicast address]]. The [[IEEE 802]] standard ''Bridge Group Address'' is {{MACaddr|01:80:C2:00:00:00}}.<ref>{{cite web |last1=Finn |first1=Norman |title=Provider Bridge Layer 2 Protocols |url=http://www.ieee802.org/1/files/public/docs2003/provider-bridge-l2-protocols-2.pdf |access-date=20 October 2017 |website=IEEE 802 LAN/MAN Standards Committee}}</ref> However, several proprietary destination MAC addresses for STP exist, like the [[#Per-VLAN Spanning Tree and Per-VLAN Spanning Tree Plus|Cisco proprietary Per-VLAN Spanning Tree]] address {{MACaddr|01:00:0C:CC:CC:CD}}<ref>{{cite web |date=1 August 2017 |title=Understanding Rapid Spanning Tree Protocol (802.1w) |url=https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html#anc5 |access-date=20 March 2020 |publisher=Cisco Systems |language=English}}</ref> or the [[Extreme Networks]] address {{MACaddr|03:04:08:00:07:00}}, and may be used instead of the standard.}} ;{{APHD|def|name=Length|length=16 bits|text=Combined length of the LLC Header, BPDU payload, and FCS.}} ;{{APHD|def|name=Logical Link Control|short=LLC|length=24 bits|text=Logical Link Control Header.}} ;{{APHD|def|name=BPDU Payload|length=Variable|text=The BPDU itself.}} ;{{APHD|def|name=Frame Check Sequence|short=FCS|length=32 bits|text=Checksum of the frame.}} BPDUs are exchanged regularly (every 2 seconds by default) and enable switches to keep track of network changes and to start and stop forwarding at ports as required. To prevent the delay when connecting hosts to a switch and during some topology changes, [[#Rapid Spanning Tree Protocol|Rapid STP]] was developed, which allows a switch port to rapidly transition into the forwarding state during these situations. ===BPDU types=== There are two types of BPDUs in the original STP specification (802.1D)<ref name="802.1D-2004"/>{{rp|63}} (the Rapid Spanning Tree (RSTP) extension uses a specific RSTP BPDU). IEEE 802.1D and [[IEEE 802.1aq]] BPDUs have the following format: {{APHD|start|title=Topology Change Notificatation BPDU}} {{APHD|0|bits1=16|field1=Protocol ID|value1={{Mono|0x0000}}|bits2=8|field2=Version ID|value2={{Mono|0x00}}|bits3=8|field3=BPDU Type|value3={{Mono|0x80}}}} {{APHD|end}} ;{{APHD|def|name=Protocol ID|length=16 bits|text=Protocol ID value. This is set to {{Mono|0x0000}} for all BPDUs.}} ;{{APHD|def|name=Version ID|length=8 bits|text=Version ID. Set to {{Mono|0x00}} for TCN BPDUs.}} ;{{APHD|def|name=BPDU Type|length=8 bits|text=BPDU Type is set to {{Mono|0x80}} for TCN BPDUs.}} Topology change notification (TCN) BPDU, used to announce changes in the network topology, such as port up or port down. {{APHD|start|title=Configuration BPDU}} {{APHD|0|bits1=16|field1=Protocol ID|value1={{Mono|0x0000}}|bits2=8|field2=Version ID|bits3=8|field3=BPDU Type}} {{APHD|4|bits1=8|field1=Flags|bits2=24|border2=bottom|field2={{Nbsp}}}} {{APHD|8|bits1=32|border1=top-bottom|field1=Root ID}} {{APHD|12|bits1=8|border1=top|field1={{Nbsp}}|bits2=24|border2=right|field2=Root Path Cost}} {{APHD|16|bits1=8|border1=left|field1=Root Path Cost (cont.)|bits2=24|border2=bottom|field2={{Nbsp}}}} {{APHD|20|bits1=32|border1=top-bottom|field1=Bridge ID}} {{APHD|24|bits1=8|border1=top|field1={{Nbsp}}|bits2=16|field2=Port ID|bits3=8|border3=right|field3=Message Age}} {{APHD|28|bits1=8|border1=left|field1=Message Age (cont.)|bits2=16|field2=Max Age|bits3=8|border3=right|field3=Hello Time}} {{APHD|32|bits1=8|border1=left|field1=Hello Time (cont.)|bits2=16|field2=Forward Delay|bits3=8|field3=Version 1 Length}} {{APHD|36|bits1=16|background1=linen|field1=(Version 3 Length)}} {{APHD|end}} ;{{APHD|def|name=Protocol ID|length=16 bits|text=Protocol ID value. This is set to {{Mono|0x0000}} for all BPDUs and represents 802.1D.}} ;{{APHD|def|name=Version ID|length=8 bits|text=Version ID. Set to {{Mono|0x00}} for Config and TCN BPDUs; {{Mono|0x02}} indicates a RST BPDU; {{Mono|0x03}} indicates an MST BPDU; and {{Mono|0x04}} indicates an STP BPDU.}} ;{{APHD|def|name=BPDU Type|length=8 bits|text=BPDU Type is set to {{Mono|0x80}} for TCN BPDUs.}} ;{{APHD|def|name=Flags|length=8 bits|text=Flags.}} :;{{APHD|def|name=Topology Change|length=1 bit|text=0 or 1 for Topology Change.}} :;{{APHD|def|name=Proposal|length=1 bit|text=0 (unused) or 1 for Proposal in RST/MST/SPT BPDU.}} :;{{APHD|def|name=Port Role|length=2 bits|text=00 (unused) or{{Break}}01 for Port Role Alternate/Backup in RST/MST/SPT BPDU.{{Break}}10 for Port Role Root in RST/MST/SPT BPDU.{{Break}}11 for Port Role Designated in RST/MST/SPT BPD.}} :;{{APHD|def|name=Learning|length=1 bit|text=0 (unused) or 1 for Learning in RST/MST/SPT BPDU.}} :;{{APHD|def|name=Forwarding|length=1 bit|text=0 (unused) or 1 for Forwarding in RST/MST/SPT BPDU.}} :;{{APHD|def|name=Agreement|length=1 bit|text=0 (unused) or 1 for Agreement in RST/MST/SPT BPDU.}} :;{{APHD|def|name=TCA|length=1 bit|text=0 or 1 for Topology Change Acknowledgement.}} ;{{APHD|def|name=Root ID|length=64 bits|text=CIST Root ID in MST/SPT BPDU.{{Break}}This field is divided into three parts:}} :;{{APHD|def|name=Priority|length=4 bits|text=Root Bridge Priority.}} :;{{APHD|def|name=System ID Extension|length=12 bits|text=Root Bridge System ID Extension.}} :;{{APHD|def|name=MAC Address|length=48 bits|text=Root Bridge MAC Address.}} ;{{APHD|def|name=Root Path Cost|length=32 bits|text=CIST External Path Cost in MST/SPT BPDU}} ;{{APHD|def|name=Bridge ID|length=64 bits|text=CIST Regional Root ID in MST/SPT BPDU.{{Break}}This field is divided into three parts:}} :;{{APHD|def|name=Priority|length=4 bits|text=Bridge Priority.}} :;{{APHD|def|name=System ID Extension|length=12 bits|text=Bridge System ID Extension.}} :;{{APHD|def|name=MAC Address|length=48 bits|text=Bridge MAC Address.}} ;{{APHD|def|name=Port ID|length=2 bytes|text=Port ID.}} ;{{APHD|def|name=Message Age|length=2 bytes|text=In 1/256 secs.}} ;{{APHD|def|name=Max Age|length=2 bytes|text=In 1/256 secs.}} ;{{APHD|def|name=Hello Time|length=2 bytes|text=In 1/256 secs.}} ;{{APHD|def|name=Forward Delay|length=2 bytes|text=In 1/256 secs.}} ;{{APHD|def|name=Version 1 Length|length=1 byte|text={{Mono|0x00}} no ver 1 protocol info present. RST, MST, SPT BPDU only.}} ;{{APHD|def|name=Version 3 Length|length=2 bytes|text=Version 3 only; MST, SPT BPDU only.}} Configuration BPDU (CBPDU), used for spanning tree computation and sent by root bridges to provide information to all switches.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)