Friday, January 8, 2010

802.1d - Spanning Tree

All Networks should be designed to primarily accomplish 2 things.
  1. Efficiently transfer packets or frames.
  2. Provide recoverability from faults in the Network.
To accomplish this goal, routing protocols are used in layer 3(routers).  Layer 3 routing accomodates multiple paths to a network destination to be up and "active" while providing load sharing across those multiple paths.

In contrast, layer 2(switches) does not use routing protocols and active redundant paths.  In fact active redundant paths are not allowed nor desirable.  The question can be asked "How does layer 2 handle redundancy and fault tolerance".  The answer is that Layer 2 uses Spanning-Tree (STP) for its network link redundancy.  Spanning-Tree provides links redundancy so that a switched network can recover from faults without having to provide direct intervention from Network Engineers.  STP is also known as IEEE 802.1d standard.

As Network Engineers we can use Spanning-Tree to avoid bridging loops.  A bridging loop is when a single frame is forwarded back and forth between 2 switches.  This endless loop of forwarding creates unbearable network congestion.  These loops form because the layer 2 devices are unaware of each other.

Spanning-Tree (802.1d) was created to eliminate the possibility of bridging loops while using redundant swithches and swithch paths.  Primarily STP (802.1d) enables all the switches to know of each other so they can negotiate a loop free network.

STP simply discovers all loops in the switched network and then shut downs redundant links before they are made available.  STP informs switches when shut down links should be brought up in order to fix faults in the network.  All connected switches will communicate via STP.  Every switch will run the STP algorithm based on all the information that they receive from the neighboring switches.  STP will create a root bridge and then calculate all redundant links to that root bridge.  Once the redundant paths are known and calculated, STP will choose the best path with the least cost and then begin forwarding frame along that path.  STP will disable and or block forwarding on all of the other redundant paths.

In summary STP creates communication between switches, discovers redundant paths, calculates best single path, blocks and or disables redundant paths, and enable blocked and or disable during network failure to maintain fault tolerance.

0 comments:

Post a Comment