0% found this document useful (0 votes)
5 views

Spanning-Tree-Protocol-STP-Overview

The document provides an overview of Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP), detailing their importance in preventing layer 2 loops and ensuring network redundancy. It explains the STP election process, port states, and roles, as well as the improvements RSTP offers, including faster convergence times and simplified port states. Additionally, it compares STP and RSTP, highlighting their respective port states and roles, and mentions resources for further learning on Meraki switches.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Spanning-Tree-Protocol-STP-Overview

The document provides an overview of Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP), detailing their importance in preventing layer 2 loops and ensuring network redundancy. It explains the STP election process, port states, and roles, as well as the improvements RSTP offers, including faster convergence times and simplified port states. Additionally, it compares STP and RSTP, highlighting their respective port states and roles, and mentions resources for further learning on Meraki switches.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Spanning Tree Protocol (STP) Overview

Spanning tree protocol (STP) (IEEE 802.1D) is STP


predominantly used to prevent layer 2 loops and
Switches within the same network need to be
broadcast storms and is also used for network
enabled for STP before they run the spanning tree
redundancy. It was developed around the time
algorithm so they can accurately determine which
where recovery from an outage that took upwards
of a minute or more was acceptable. Throughout switch should be elected the "root bridge." This
designated root bridge will be responsible for
the years, as technology improved and critical
sending configuration bridge protocol data units
applications relied on stable connections,
(BPDUs) along with other information to its directly
businesses moved away from these long recovery
connected switches that, in turn, forward the
times and looked for faster solutions.
BPDUs to their neighboring switches. Each switch
STP evolved into rapid spanning tree protocol has a bridge ID priority value (BID), which is a
(RSTP) (802.1w), which offers several combination of a priority value (default 32768) and
improvements over STP (802.1D). It has new port the switch's own MAC address. The switch with
states and port roles and, more importantly, faster the lowest BID will become the root bridge.
convergence times. Both STP or RSTP are critical
to having a healthy network and an administrator STP Port States
would benefit from using RSTP over STP. RSTP is There are five STP switchport states; these are:
the answer for businesses that require faster
recovery times. Disabled - The result of an administrative
command that will disable the port.
This document provides an overview of the STP
Blocking- When a device is connected, the
and RSTP standards. You will learn about the
port will first enter the blocking state.
following:
Listening-The switch will listen for and send
How the STP election process works BPDUs.
STP port states and port roles Learning- The switch will receive a superior
RSTP election process BPDU, will stop sending its own BPDUs, and
RSTP port states and port roles will relay the superior BPDUs.
Forwarding- The port is forwarding traffic.
Learn more with this free online training course on
the Meraki Learning Hub: STP Port Roles
Optimizing Meraki-Managed Uplink Root - Ports on non-root switches with the best
Connections cost path to root bridge. These ports forward
data to the root bridge.
Sign in with your Cisco SSO or create a free
account to start training. Designated- Ports on root and designated
switches. All ports on the root bridge will be
designated.
Blocked- All other ports to bridges or switches
are in a blocked state. Access ports going to
workstations or PCs are not affected.

STP Election Process

When switches are first turned on, they will send configuration BPDUs containing their BIDs, with each
switch initially believing themselves to be the root bridge. However, when a switch receives a BPDU with a
superior (lower value) BID, that switch will stop originating configuration BPDUs and will instead relay these
superior BPDUs to its neighboring switches.

Once a root bridge has finally been announced, a second election process begins to determine the "root
port" selection process (the port on a switch that will forward frames to the root bridge). This process will
follow the steps below until a root port is elected:

1. A switch port receives superior BPDUs from another switch and identifies that switch as the root bridge.
2. The port with the lowest root path is selected as the root port, if possible.
3. If the path cost is the same, the switch will select the port with the lowest sender BID as the selected
root port.
4. If the sender BID is the same (usually the same switch), the port with the lowest physical port number
on the sending switch will be selected as the root bridge (as the final tie-breaker).

Election Process Diagrams

Single Switches

Let's follow the process for Switch 2 in the diagram below.

1. A switch port receiving superior BPDUs. Port 1 and 2 receive the same superior BPDU from Switch
1, therefore, further steps are needed to determine the root port. Port 3 on Switch 2 does not qualify
because it's receiving BPDUs from Switch 3.
2. The port with the lowest root path cost. We can see Port 1 and 2 have equal path costs, so we still
have a tie.
3. The port with the lowest sender BID. Again, Port 1 and 2 have the same BID (that of Switch 1), and
therefore the final step will be used to determine the root port.
4. The lowest port number of the sending switch. Port 1 of Switch 2 is connected to the lowest port
number on Switch 1 (Port 1) and is therefore elected the root port for Switch 2.

Stacked Switches (MS Classic)

The outcome of the STP Election Process can be a little different when utilizing Stacking Technology. Let's
follow the process for Switch 2 again below, but with the following in consideration:

A switch stack utilizes one logical control plane


A Meraki switch stack will utilize a generated chassis MAC address (e.g. 00:18:0A:4F:XX:XX) that is
unique to a Meraki Organization
A Meraki switch stack will converge and deterministically elect an Active Switch on boot
Switch Stack Port IDs will increment starting with the Active switch.

1. A switch port receiving superior BPDUs. Port 1 and 2 receive the same superior BPDU from Switch
1, therefore, further steps are needed to determine the root port.
2. The port with the lowest root path cost. We can see Port 1 and 2 have equal path costs, so we still
have a tie.
3. The port with the lowest sender BID. Again, Port 1 and 2 have the same BID (that of Switch 1), and
therefore the final step will be used to determine the root port.
4. The lowest port number of the sending switch. Port 1 of Switch 2 is connected to Port 1 of the
Member switch and Port 2 is connected to Port 1 of the Active switch. As we understand that the Active
switch will send Port IDs lower than that of the Member switch in its BPDUs, Port 2 of Switch 2 is
elected root port.

A Topology Change Notification (TCN) can trigger the STP election process. When a switch detects a
change in the network topology, such as a trunk port transitioning to the forwarding state or going up or
down, it sends a TCN to the root bridge. The root bridge then acknowledges the TCN, prompting all
switches to update their MAC address tables and recalculate the best path to the root bridge.

Stacked Switches (MS390/Catalyst)

For MS390/Catalyst switches, the outcome of the Stack Election process does not influence how Switch
Stack Port IDs are incremented. As such, a Member switch may send BPDU's with a lower Port ID to that
of the Active Switch. It is not unexpected to see ports connected to a Member switch to therefore be elected
root port if reaching the 4th tiebreaker.

Rapid Spanning Tree Protocol (RSTP)

Rapid spanning tree protocol (RSTP) is as its name suggests, a faster transition to a port-forwarding state.
Unlike STP, which has five switchport states, RSTP has only three: discarding, learning, and forwarding.

RSTP Port States

Disabled - The result of an administrative command that will disable the port.
Discarding - When a device is connected, the port will first enter the discarding state.
Learning - The switch will receive a superior BPDU, will stop sending its own BPDUs, and will relay the
superior BPDUs.
Forwarding - The port is forwarding traffic.

RSTP Port Roles

Root - Ports on non-root switches with best cost path to root bridge. These ports forward data to the
root bridge.
Designated- Ports on root and designated switches. All ports on the root bridge will be designated.
Alternate-Receives BPDUs from another switch but remains in a blocked state.
Backup- Receives BPDUs from its own switch but remains in a blocked state. You are not likely to see
this in a production environment unless hubs are used.

Alternate and Backup Ports

In RSTP, the election process is the same as STP, except the blocked port is split into two new port roles:
alternate and backup.

Alternate

An alternate port receives BPDUs from another switch but remains in a blocked state. For example, let's
say a switch has two paths to the root bridge. It will elect one of the two ports as a root port and the other
will become an alternate port. If at any time the root port fails, this redundant path4the alternate port4will
become the new root port.

Backup

A backup port receives BPDUs from its own switch but remains in a blocked state. For example, If a switch
has two ports connecting to different switches, then one port will be elected as a root port and the other will
become the backup port.

Comparing STP and RSTP Port States

Below is a comparison table between STP and RSTP.

STP RSTP

Blocking Discarding

Listening Discarding

Learning Learning

Forwarding Forwarding

RSTP with Meraki Switches

For information on how to configure spanning tree on MS switches, check out our article on Configuring
Spanning Tree on Meraki Switches.

by Farid Ullah Mohammadi

You might also like