Sharing Ilmu

Sharing for useful things

Spanning Tree Protocol (STP) Concept

Hello Everyone, in this article I’ll discuss about STP. What is STP ?

Spanning Tree Protocol is a Loop-prevention network protocol that allows for redudancy while create a loop-free Layer 2 topology. STP logically block the physical loops in the layer network to preventing frame from cirling the network forvefer. Impact from loops it will be decrease the network performance.  STP also use for redudancy link when the active link are failure, the switch will be recalculate for select other link to backup. The following capture are example for STP concept :


As the following capture we can see for stp recalculating  and opening the previously blocked port when the active port is failure.

How is when there are layer 2 nework like the above capture without spanning tree protocol ? can you imagine what will happen ?

Without STP enabled. Layer 2 loops can form, causing broadcast, multicast and unknown unicast frames to loop endesly and it can bring down the network quickly. When loop is occurs, Mac address table on switch will constantly change with the update from broadcast frames which result MAC table instability and can cause high CPU utilization. It can makes the switch unable to forward frames.


Spanning Tree Algorithm

Spaning Tree use STA for preventing looping on the layer 2 network. This is step how does STA create a loop-free topology :

  • Selection a Root Bridge : When a switch connected each other STA will be start to selection a root bridge. Which  switch that will be a root bridge.
  • Blocking Redundant Paths : STP ensures only one logical path that can active between all destination network by blocking redudant paths that could cause looping.
  • Create a Loop-free topology : STP will be blocking port that efect to non-forwarding link between the two switches. If there are two physical connection between two or more switch these only one link will be forwarding link and other will be blocked.
  • Recalculation Link incase of link failure : If active link are failed or down, STP will be recalculate with select blocked port become active link.

How Spanning Tree Protocol built loop-free topology ? There are two step to build that :

  • Election Root Bridge
  • Election Root Ports
  • Election Designated Ports
  • Election Alternate or Blocked Ports

During STA or STP process, switch use Bridge Protocol Data Units (BPDUs) which use to share infromation about themselves and their conenctions. BPDU also use to make a decision on STP like to select a Root Bridge, Root Port, Designated port and alternate port. Each BPDU are contain a BID (Bridge ID) that identified which switch are send the BPDU. BID are use to making many STA decisions including root bridge and port roles.

The BID contains a priority values, mac address of the switch, and an extended system ID. extended sistem id are used on cisco network but on cisco layer 2 switch are used of PVST (Per VLAN spanning Tree) that means the spanning tree are calculated each vlan id. lowes BID is determined by combination of these three fileds.

  •  Bridge Priority :  The default Bridge priority on all Cisco Switch is a decimal value 32768. Ranges of Bridge ID is 0 to 61440 in increament of 4096. A lowes bridge priority are preferable.
  • Extended System ID : This values is a decimal values are added to Bridge priority value on BID to identified the VLAN for this BPDU
  • Mac Address  : If we don’t change a bridge priority, switch on network are have the same bridge priority. Then switches are calculate and select the mac address with lowes value to have lowes BID.










Leave a Reply

Your email address will not be published. Required fields are marked *.

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>