You are on page 1of 10

STP

Wednesday, January 29, 2020 9:33 AM

STP INTRO

Spanning Tree Protocol (STP) is a loop-prevention network protocol that allows for redu
802.1D is the original IEEE MAC Bridging standard for STP. This is explained in the diagra
which sends it to PC2, PC3, and S1. S1 sends it to PC4 and S3. S3 then sends the packet b
send packets in the case of a network failure, the switch simply changes the path the pa

In a layer 2 s
case of netw
which results
high CPU util
network bec
multicast fra
layer 2 devic

The Spanning Tre


STP was invented by Radia Perlman while working for Digital Equipment Corporation, an
creates a loop-free topology by selecting a single root bridge where all other switches d
blocked ports are the ones that STP determines to be less efficient, and in the case of an
undancy while creating a loop-free Layer 2 topology. IEEE \
am below. Basically, when PC 1 sends a packet, it is sent to S2,
back to S2, which creates a loop that STP avoids. STP can also
acket takes.

switch, redundant networks help the switch function in


work failure, but this redundancy also causes a loop,
s in MAC address table instability, link saturation, and
lization on switches and end-devices, resulting in the
coming unusable. Broadcast, unknown unicast, and
ames are affected by the looping, which can bring down a
ce(known as a broadcast storm).

ee Algorithm
nd it was soon published. Her spanning tree algorithm (STA)
determine a single least-cost path(most efficient path). The
ny interface failing, a blocked path opens.
STP was invented by Radia Perlman while working for Digital Equipment Corporation, an
creates a loop-free topology by selecting a single root bridge where all other switches d
blocked ports are the ones that STP determines to be less efficient, and in the case of an

Steps to a Loop-Free

During STA and STP functions, switches use Bridge Protocol Data Units (BPDUs) to sha
to elect the root bridge, root ports, designated ports, and alternate ports. Each BPDU
The BID is involved in making many of the STA decisions including root bridge and por
the MAC address of the switch, and an extended system ID. The lowest BID value is de
nd it was soon published. Her spanning tree algorithm (STA)
determine a single least-cost path(most efficient path). The
ny interface failing, a blocked path opens.

e Topology

are information about themselves and their connections. BPDUs are used
contains a bridge ID (BID) that identifies which switch sent the BPDU.
rt roles. As shown in the figure below, the BID contains a priority value,
etermined by the combination of these three fields.

• Bridge Priority- All cisco switches have a default value of 32768,


there is a range of 0-61440(increments of 4096). A value of 0 takes
precedence over any other value
• Extended System ID- A decimal value that helps identify the VLAN
• MAC address- The lower the MAC address value, the lower the BID
(When Priority and Extended ID System are the same)
Step 1 - Elect the R

The STA uses one switch as the reference point for all path calculations. All switches in
domain participate in the election process. After a switch boots up, it sends BPDU fram
seconds. These BPDU frames contain the BID of the sending switch and the BID of the
known as the Root ID. Initially, every switch views itself as the root bridge, but they re
of other switches, the real root bridge is determined.

Once a root bridge has been determined, the STA starts to find the optimal paths to ea
with the path information, also known as the internal root path cost, is determined by
individual port costs along the path from the switch to the root bridge(The BPDU inclu
cost). The default cost of a port is configurable, giving the administrator more control

Step 2 - Elect th

Once the root bridge has been established, a root port is decided. The root port is the po
This overall cost is known as the internal root path cost. This is calculated by the sum of all t
precedence over any other value
• Extended System ID- A decimal value that helps identify the VLAN
• MAC address- The lower the MAC address value, the lower the BID
(When Priority and Extended ID System are the same)

Root Bridge

n a broadcast
mes every two
e root bridge,
eceive the BPDU's

each destination
y the sum of all the
udes the root path
over the STA/STP.

he Root Ports

port closest to the root bridge in terms of overall cost (best path) to the root bridge.
the port costs along the path to the root bridge, a lower cost is preferred.
Step 3 - Elect D

• Since the root bridge has the lowest cost, all of the ports attached to it are designated
• When one end of a connection is a root port, the other end is a designated port.
• When neither switch has a connection to the root bridge, the switch with the least-co

Step 4 - Elect A

If a port is neither a root port nor a designated port, then is becomes a backup port (alterna
These ports are in a blocking state to prevent loops.

Elect a Root Port from Multiple Equal-Cost P


Designated Ports

ed ports(most of the time).

ost path to the root bridge is the designated port

Alternate (Blocked) Ports

ate port).

Paths

You might also like