Spanning tree protocol is simply a layer 2 (OSI Model - Data Link) protocol guards against bridging/switching loops. STP allows administrators to utilize this protocol on a per VLAN (segment) basis. When switches are turned on in a segment, thaey begin communicating to each other through the use of Bridge Protocol Data Units (BPDU). The information contained in these BPDU's allow the switches to work together to elect a root bridge and set port states that will avoid multiple paths to any one destination.
Information in a BPDU
----------------------------------------------------
Root Priority ID - The Root ID will be the Priority ID of the Root Bridge on the VLAN (segment).
Root Physical (MAC) Address - Port MAC address of the Root Bridge
Port Cost to the Root - This is the calculated cost for the switch to reach the root bridge.
Root Bridge
---------------------------------------------------
The Root Bridge is the elected switch which will act at the top of the tree to ensure that there are no multiple paths on the VLAN (segment). The switch is elected through the communication of BPDU's and it is based on the lowest priority set on the switch. When there is a tie on the priority ID's, then the lowest switch MAC address will be elected the root bridge. The priority number can be changed by network administers in order to force a specific root bridge to become the root. The Priority ID can only be changed in increments of 4096.
Port States
---------------------------------------------------
Once a root bridge is elected, the switches then begin assigning port states to each port through the calculation of cost to the root bridge. From any point on the segment, a single lowest cost path to the root bridge will be a preferred path, while any alternate paths will be blocked.
Blocking - The port is processing BPDU,s but is NOT forwarding any data. This port will remain in a blocking state until there is a need for the port to be reconverged if the primary path fails.
Listing - A port in the blocking state does not participate in frame forwarding and also discards frames received from the attached network segment. During blocking state, the port is only listening to and processing BPDUs on its interfaces. After 20 seconds, the switch port changes from the blocking state to the listening state.
Listening State - After blocking state, a root port or a designated port will move to a listening state. All other ports will remain in a blocked state. During the listening state the port discards frames received from the attached network segment and it also discards frames switched from another port for forwarding. At this state, the port receives BPDUs from the network segment and directs them to the switch system module for processing. After 15 seconds, the switch port moves from the listening state to the learning state.
Learning State - A port changes to learning state after listening state. During the learning state, the port is listening for and processing BPDUs. In the listening state, the port begins to process user frames and start updating the MAC address table. But the user frames are not forwarded to the destination. After 15 seconds, the switch port moves from the learning state to the forwarding state.
No comments:
Post a Comment