Wednesday, August 28, 2019

Preventing Loops with Spanning Tree Protocol


Preventing Loops with Spanning Tree Protocol

Switching loops form because parallel switches are unaware of each other. STP was developed to overcome the possibility of switching loops so that redundant switches and switch paths could be used for their benefits. Basically, the protocol enables switches to become aware of each other so they can negotiate a loop-free path through the network.


STP is communicated among all connected switches on a network. Each switch executes the spanning-tree algorithm based on information received from other neighboring switches. The algorithm chooses a reference point in the network and calculates all the redundant paths to that reference point. When redundant paths are found, the spanning-tree algorithm picks one path by which to forward frames and disables, or blocks, forwarding on the other redundant paths.

As its name implies, STP computes a tree structure that spans all switches in a subnet or network. Redundant paths are placed in a Blocking or Standby state to prevent frame forwarding. The switched network is then in a loop-free condition. However, if a forwarding port fails or becomes disconnected, the spanning-tree algorithm recomputes the spanning-tree topology so that the appropriate blocked links can be reactivated.

Spanning-Tree Communication: Bridge Protocol Data Units

STP operates as switches communicate with one another. Data messages are exchanged in the form of bridge protocol data units (BPDUs). A switch sends a BPDU frame out a port, using the unique MAC address of the port itself as a source address. The switch is unaware of the other switches around it, so BPDU frames are sent with a destination address of the well-known STP multicast address 01-80-c2-00-00-00.


Two types of BPDU exist:

Configuration BPDU, used for spanning-tree computation

Topology Change Notification (TCN) BPDU, used to announce changes in the network topology

The Configuration BPDU message contains the fields are shown in Table 2.3.

Table 2.2 Configuration BPDU Message Content
                                                                                                                                               
Field Description                                                       Number of Bytes                              
Protocol ID (always 0)                                                2                                                         
Version                                                                        1                                                         
Message Type (Configuration or TCN BPDU)          1                                                          
Flags                                                                           1                                                          
Root Bridge ID                                                           8                                                          
Root Path Cost                                                            4                                                          
Sender Bridge ID                                                        8                                                          
Port ID                                                                        2                                                          
Message age (in 256ths of a second)                          2                                                          
Maximum age (in 256ths of a second)                       2                                                          
Hello time (in 256ths of a second)                             2                                                          
Forward delay (in 256ths of a second)                       2                                                          


The exchange of BPDU messages work toward the goal of electing reference points as a foundation for a stable spanning-tree topology. Also, loops can be identified and removed by placing specific redundant ports in a Blocking or Standby state. Notice that several key fields in the BPDU are related to switch identification, path costs, and timer values. These all work together so that the network of switches can converge on a common spanning-tree topology and select the same reference points within the network.

By default, BPDUs are sent out all switch ports every 2 seconds so that current topology information is exchanged, and loops are identified quickly.

“Next, we will discuss about Root Bridge Selection Process”


Related Links 



No comments:

Post a Comment

Tables Used in Switching

Tables Used in Switching Catalyst switches maintain several types of tables to be used in the switching process. The tables are tailo...