Spanning Tree Protocol

from Wikipedia, the free encyclopedia
STP (Spanning Tree Protocol)
Family: Inter-switch communication
Operation area: Management of logical Ethernet connections
STP in the protocol stack :
Network access STP
Ethernet
Standards: IEEE standards 802.1D, 802.1w, 802.1s, IEEE 802.1aq IEEE 802.1Q
An example of a spanning tree topology

The Spanning Tree Protocol ( STP , German: Spannbaum Protocol) is a central part of switch infrastructures. Computer networks can be set up with a large number of switches as coupling elements. However, Ethernet technology must ensure that there is only one data path between two computers in order to be able to forward packets clearly.

Effects such as broadcast storms can only be avoided if an algorithm exists that ensures that the topology is free of loops . The spanning tree algorithm now ensures that there are no unwanted circulating packets. It identifies multiple paths by converting topologies with redundant paths into a tree topology that does not have any loops by logically blocking certain paths. For this purpose, all but one connection are blocked on switches with multiple connections to other switches. If the primary connection fails, they can be activated immediately, thus creating a high level of fault tolerance.

The Spanning Tree Algorithm was designed by Radia Perlman and standardized in 1990 as IEEE 802 .1D. The prerequisite for the functionality of this concept is that the spanning tree can be created completely transparently for the user. The only action that has to be activated on the switches is the spanning tree algorithm. A Bridge Protocol Data Unit (BPDU) is used as a multicast packet to exchange configuration messages , which is sent every two seconds by default and thus causes a not inconsiderable network load.

functionality

To get to know the logical spanning tree, each switch goes through a sequence of port states that are influenced by three timers. If a switch port were immediately moved from a blocking to a forwarding state, there would be a risk of losing topology information and creating a loop. This is the reason why five port states are distinguished:

Port state description
Disabled Discards frames; does not learn addresses; does not receive or process any BPDUs
Blocking Discards frames; does not learn addresses; receives and processes BPDUs
Listening Discards frames; does not learn addresses; receives, processes and transmits BPDUs
Learning Discards frames; learns addresses; receives, processes and transmits BPDUs
Forwarding Forwards frames, learns addresses; receives, processes and transmits BPDUs

The length of time that a port remains in a state is determined by timers. Only the root bridge can change the settings. Three timers influence the state change and thus the execution speed of the algorithm:

  • The hello timer indicates the time span between two BPDUs. By default, it is two seconds.
  • Forward delay is the time that is spent in the listening and learning states. 15 seconds are allotted for this, for a total of 30 seconds.
  • Maximum Age controls how long a switch port keeps configuration information. The default is 20 seconds.

When STP is activated, each port on each switch passes the states in the following order: Blocking - Listening - Learning - Forwarding. In the standard configuration, this state transition takes 50 seconds - a relatively long period of time in the network area. The convergence, i.e. the time that is required to recalculate the spanning tree in the event of a connection failure, is therefore not insignificant and a point of criticism of this method.

As the first activity in a network, a so-called root bridge is selected from the Spanning Tree-enabled switches , which becomes the root of the tree to be spanned and is the "boss" of the network. This is done by all switches or bridges communicating their bridge ID (short: BID; each bridge is identified by its own BID) to a specific multicast group. The bridge ID is 8 bytes long (2 byte bridge priority , 6 byte MAC address ). The bridge with the "lowest" priority becomes the root bridge. If the bridge priority is identical, the MAC address of the components is used as a supplementary criterion (here, too, the bridge with the lower value wins again).

From the root bridge, paths are now defined via which the other bridges in the network can be reached. If redundant paths are available, the bridges there must deactivate the corresponding port. The paths that can be used for communication are determined on the basis of path costs transmitted by the bridge there.

These path costs depend on the distance to the root bridge and the available data connection ("uplink") to the destination. A 10 Mbit / s uplink has higher path costs than a 100 Mbit / s uplink to the same destination; the 10 Mbit / s connection would therefore be blocked as a redundant path. The path costs are standardized according to IEEE specifications, but can be set manually differently, for example to select a preferred uplink at the same speed in order to reflect the real costs of WAN connections. In this way, each subnet in the "switched" LAN can only be reached via a single one, the designated bridge . In the graphical representation, there is a tree of network paths that gave the algorithm and the protocol its name.

The root bridge informs the designated bridges one level below in the hierarchy every two seconds that it is still there, whereupon the receiving designated bridge can also send the corresponding information to the following bridges. If these hello packets are missing, something has changed in the topology of the network and the network has to reorganize itself. This recalculation of the tree takes up to 30 seconds in the worst case. During this time, the bridges with Spanning Tree capability are not allowed to forward any packets in the network other than Spanning Tree information. This is one of the biggest points of criticism of the classic Spanning Tree Protocol, as it is possible to use forged Spanning Tree packets to signal a topology change and to paralyze the entire network for up to 30 seconds. In order to remedy this potential security deficiency, but also to quickly bring the network back into a usable state in the event of real topology changes, improvements to the implementation of the Spanning Tree Protocol and the algorithms used for it were developed early on by various manufacturers. One of them, the Rapid Spanning Tree Protocol (RSTP) , has now become the official IEEE 802.1w standard.

RSTP

The idea behind the Rapid Spanning Tree Protocol (RSTP) is that when the topology changes are signaled, the network structure is not immediately deleted, but instead work continues as usual and alternative paths are calculated. Only then is a new tree put together. The network downtime can be reduced from 30 seconds to less than 1 second. In the revision of the 802.1d standard passed in 2003, the old STP was replaced in favor of RSTP (IEEE 802.1w). This has since been replaced by IEEE 802.1D-2004.

MSTP

The Multiple Spanning Tree Protocol (MSTP) is an extension of the RSTP. In connection with Virtual Local Area Networks (VLANs), it enables different instances of the Spanning Tree. For a VLAN or a group of VLANs, STP instances that are independent of one another can be created that each use their own different spanning trees within a LAN. The MSTP was also defined for the first time in the revision of the 802.1D standard adopted in 2003 under IEEE 802.1s and later incorporated under IEEE 802.1Q.

Shortest Path Bridging (SPB)

To overcome the limitations of the Spanning Tree Protocol, Shortest Path Bridging was developed and standardized in IEEE 802.1aq .

Gradual construction of the tree

  1. Switch on ("Power up") all bridges.
  2. All bridges set their ports to "Blocked".
  3. Each bridge is believed to be the root bridge and sends BPDUs ( B ridge P rotocol D ata U nit) from.
  4. The bridge with the smallest bridge ID (= priority & MAC address) becomes the root bridge.
  5. The root bridge sends configuration BPDUs.
  6. Each bridge determines the port with the lowest path costs to the root bridge as the root port. For ports with the same costs, the smaller port ID wins.
  7. The designated bridge is determined by the LAN; this is the bridge with the root port into the LAN with the lowest path costs.

Trivia

The inventor Radia Perlman also dedicated a poem to the "Spanning Tree Protocol", which was later set to music.

Web links

Commons : Spanning tree protocol  - collection of images, videos and audio files

Individual evidence

  1. http://standards.ieee.org/getieee802/download/802.1D-2004.pdf
  2. IEEE Approves New IEEE 802.1aq Shortest Path Bridging Standard , Tech Power Up. May 7, 2012. Retrieved May 11, 2012.  
  3. Algoryhme by Radia Perlman - EtherealMind. Retrieved June 1, 2018 (UK English).
  4. muhammed elnahas: spanning tree song. October 26, 2007, accessed May 7, 2018 .