<?xml version="1.0" encoding="utf-8"?>
<!-- generator="" -->
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<title type="text">Spanning Tree Protocol (STP)</title>
	<subtitle type="text">Leading Network Security &amp; Cyber Security site. Cisco Routing/Switching, VPN, Microsoft, SASE, SSE, F5, PaloAlto Firewalls, Protocol Analysis, Tips &amp; more.</subtitle>
	<link rel="alternate" type="text/html" href="https://www.firewall.cx"/>
	<id>https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol.feed</id>
	<updated>2026-04-11T12:40:13+10:00</updated>
	<author>
		<name>Firewall.cx Website</name>
	</author>
	<generator uri="https://www.joomla.org"></generator>
	<link rel="self" type="application/atom+xml" href="https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol.feed?type=atom"/>
	<entry>
		<title>Spanning Tree Protocol – Part 3: Bridge ID, Priority, System ID Extension &amp; Root Bridge Election Process</title>
		<link rel="alternate" type="text/html" href="https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-root-bridge-election.html"/>
		<published>2014-07-14T05:00:00+10:00</published>
		<updated>2014-07-14T05:00:00+10:00</updated>
		<id>https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-root-bridge-election.html</id>
		<author>
			<name>Arani Mukherjee</name>
		</author>
		<summary type="html">&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx//images/stories/spanning-tree-protocol-root-bridge-election-intro.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;In this article we will examine the &lt;strong&gt;Spanning Tree Bridge ID&lt;/strong&gt; structure, explain why it has increments of &lt;strong&gt;4096&lt;/strong&gt;, how VLAN information is embedded (for Per-VLAN Spanning Tree &amp;amp; multiple STP instances) via the &lt;strong&gt;System ID Extension&lt;/strong&gt; and show how the &lt;strong&gt;Spanning Tree Protocol Root Bridge Election&lt;/strong&gt; occurs.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Understanding Bridge ID, Bridge Priority &amp;amp; System ID Extension&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In our previous article we discussed about the &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html&quot; target=&quot;_blank&quot; title=&quot;we covered Spanning Tree Protocol, Rapid STP port costs and port states.&quot;&gt;&lt;strong&gt;&lt;strong&gt;Spanning Tree Protocol, Rapid STP port costs and port states&lt;/strong&gt;&lt;/strong&gt;&lt;/a&gt;. Before STP decides which path is the best to the &lt;strong&gt;Root Bridge&lt;/strong&gt;, it needs to first decide which switch has to be elected as the &lt;strong&gt;Root Bridge&lt;/strong&gt;, which is where the &lt;strong&gt;Bridge ID&lt;/strong&gt; comes into play. Readers interested can also read our &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-fundamentals.html&quot; target=&quot;_blank&quot; title=&quot;STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&quot;&gt;STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&lt;/a&gt; article.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Every switch has an identity when they are part of a network. This identity is called the &lt;strong&gt;Bridge ID&lt;/strong&gt; or &lt;strong&gt;BID&lt;/strong&gt;. It is an &lt;strong&gt;8 byte field&lt;/strong&gt; which is divided into two parts. The first part is a &lt;strong&gt;2-byte Bridge Priority&lt;/strong&gt; field (which can be configured) while the second part is the &lt;strong&gt;6-byte MAC address&lt;/strong&gt; of the switch. While the &lt;strong&gt;Bridge Priority&lt;/strong&gt; is configurable, the &lt;strong&gt;MAC address&lt;/strong&gt; is unique amongst all switches and the sum of these two ensures a unique &lt;strong&gt;Bridge ID&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-1.png&quot; alt=&quot;stp-root-bridge-election-1&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol - BPDU Hello Packet - Bridge ID + Priority&quot; /&gt;&lt;/p&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The above &lt;strong&gt;Bridge ID&lt;/strong&gt; assumes there is one Spanning Tree instance for the entire network. This is also called &lt;strong&gt;Common Spanning-Tree&lt;/strong&gt; (&lt;strong&gt;CST&lt;/strong&gt;).&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;As networks begun to grow and become more complex, VLANs were introduced, allowing the creation of multiple logical and physical networks. It was then necessary to run multiple instances of STP in order to accommodate each network - VLAN. These multiple instances are called &lt;strong&gt;Multiple Spanning Tree&lt;/strong&gt; (MST), &lt;strong&gt;Per-VLAN Spanning Tree&lt;/strong&gt; (PVST) and &lt;strong&gt;Per-VLAN Spanning Tree Plus&lt;/strong&gt; (PVST+).&lt;/p&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In order to accommodate the additional VLAN information, the &lt;strong&gt;Extended System ID&lt;/strong&gt; field was introduced, borrowing &lt;strong&gt;12 bits&lt;/strong&gt; from the original &lt;strong&gt;Bridge Priority&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-2.png&quot; alt=&quot;stp-root-bridge-election-2&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol - BPDU Hello Packet - Bridge ID + Priority&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The &lt;strong&gt;Bridge Priority&lt;/strong&gt; value and the &lt;strong&gt;Extended System ID&lt;/strong&gt; extension together make up a 16 bit (2-byte) value. The &lt;strong&gt;Bridge Priority&lt;/strong&gt; making up the left most bits, is a value of &lt;strong&gt;0&lt;/strong&gt; to &lt;strong&gt;61440&lt;/strong&gt;. The &lt;strong&gt;Extended System ID&lt;/strong&gt; is a value of &lt;strong&gt;1&lt;/strong&gt; to &lt;strong&gt;4095&lt;/strong&gt; corresponding to the respective VLAN participating in STP. The &lt;strong&gt;Bridge Priority&lt;/strong&gt; increments in blocks of &lt;strong&gt;4096&lt;/strong&gt; to allow the &lt;strong&gt;System ID Extension&lt;/strong&gt; to squeeze in between each increment. This is clearly shown in the below analysis:&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-3.png&quot; alt=&quot;stp-root-bridge-election-3&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol - BPDU Hello Packet - Bridge ID + Priority&quot; /&gt;We should note that the &lt;strong&gt;Bridge Priority Field&lt;/strong&gt; can only be set in increments of &lt;strong&gt;4096&lt;/strong&gt;. This means that possible values are: &lt;strong&gt;4096&lt;/strong&gt;, &lt;strong&gt;8192&lt;/strong&gt;, &lt;strong&gt;12288&lt;/strong&gt;, &lt;strong&gt;16384&lt;/strong&gt;, &lt;strong&gt;20480&lt;/strong&gt;, &lt;strong&gt;24576&lt;/strong&gt;, &lt;strong&gt;28672&lt;/strong&gt;, &lt;strong&gt;32768 etc&lt;/strong&gt;. By default, Cisco’s &lt;strong&gt;Per-VLAN Spanning-Tree Plus&lt;/strong&gt; (PVST+) adds this &lt;strong&gt;System ID Extension&lt;/strong&gt; (sys-id-ext) to the &lt;strong&gt;Bridge Priority&lt;/strong&gt;.&lt;/p&gt;
&lt;p class=&quot;box-info&quot;&gt;The two values (&lt;strong&gt;Bridge Priority + System ID Extension&lt;/strong&gt;) together make up the &lt;strong&gt;Bridge ID&lt;/strong&gt; used to elect the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;The Root Bridge Election Process&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The election process uses several STP messages sent between switches which help each switch to decide, who is the &lt;strong&gt;Root Bridge&lt;/strong&gt;. These messages are called &lt;strong&gt;Hello BPDU&lt;/strong&gt; where BPDU stands for &lt;strong&gt;Bridge Protocol Data Unit&lt;/strong&gt;. It is important to understand the information these &lt;strong&gt;BPDUs&lt;/strong&gt; carry as it will help understand the election process itself.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Each &lt;strong&gt;BPDU &lt;/strong&gt;carries several fields in it. The following table defines each field:&lt;/p&gt;
&lt;table border=&quot;1&quot; style=&quot;border-collapse: collapse; width: 647px; height: 204px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px; border: 1px solid windowtext; background: repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin: 0cm 0cm 0.0001pt; line-height: normal; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif; color: #000000;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;Field&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: -moz-use-text-color; background: repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin: 0cm 0cm 0.0001pt; line-height: normal; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif; color: #000000;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;Description&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Root Bridge ID or Root BID&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;BID of the switch that the sender of this BPDU believes to be the root switch&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Sender’s Bridge ID&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;BID of the switch sending this Hello BPDU&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Cost to the Root Bridge&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;The STP cost between this switch and the current root&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Timer values on Root Bridge&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;Hello Timer, Max Age Timer, Forward Delay Timer&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;For the purpose of this exercise, we will only concentrate on the first three fields.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now, the election process itself is very simple. The switch with the lowest &lt;strong&gt;BID&lt;/strong&gt; becomes the &lt;strong&gt;Root Bridge&lt;/strong&gt;. Since the &lt;strong&gt;BID&lt;/strong&gt; starts with the &lt;strong&gt;Bridge Priority&lt;/strong&gt; field, essentially, the switch with the lowest &lt;strong&gt;Bridge Priority&lt;/strong&gt; field becomes the &lt;strong&gt;Root Bridge&lt;/strong&gt;. If there is a tie between two switches having the same priority value, then the switch with the &lt;strong&gt;lowest MAC address&lt;/strong&gt; becomes the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The &lt;strong&gt;STP Root Bridge&lt;/strong&gt; election process starts with each switch advertising themselves as the&amp;nbsp;&lt;strong&gt;Root Bridge&lt;/strong&gt; and constructing the &lt;strong&gt;Hello BPDU&lt;/strong&gt; accordingly. So each switch lists its own &lt;strong&gt;BID&lt;/strong&gt; as the &lt;strong&gt;Root BID&lt;/strong&gt;. The &lt;strong&gt;Sender Bridge ID&lt;/strong&gt; is ofcourse the same as the &lt;strong&gt;Root BID&lt;/strong&gt;, as it is again its own &lt;strong&gt;BID&lt;/strong&gt;. With in &lt;strong&gt;BPDU&lt;/strong&gt;, the &lt;strong&gt;Cost&lt;/strong&gt; field is listed with a&lt;strong&gt; value of 0&lt;/strong&gt;, because there is no cost between itself.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The switches send out the &lt;strong&gt;Hello BPDU&lt;/strong&gt; constructed as above, onto the network. They will keep on maintaining their status as &lt;strong&gt;Root Bridge&lt;/strong&gt; by default, until they receive a &lt;strong&gt;Hello BPDU&lt;/strong&gt; which carries a &lt;strong&gt;lower BID&lt;/strong&gt;. This &lt;strong&gt;Hello BPDU&lt;/strong&gt; then becomes a &lt;strong&gt;superior BPDU&lt;/strong&gt;. Now the switch receiving this &lt;strong&gt;superior BPDU&lt;/strong&gt; makes changes to the &lt;strong&gt;Hello BPDU&lt;/strong&gt; it has been sending out. It changes the value of the &lt;strong&gt;Root BID&lt;/strong&gt; to reflect the &lt;strong&gt;Root BID&lt;/strong&gt; from the &lt;strong&gt;superior Hello BPDU&lt;/strong&gt;. This process continues till every switch agrees on which switch has the &lt;strong&gt;lower BID&lt;/strong&gt;, and hence deserves to be the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Root Bridge Election Example&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Let's analyze this process using a network consisting of three switches. To make our example easier to understand, the &lt;strong&gt;MAC address&lt;/strong&gt; of each switch has been changed to a simple value as shown in the below diagram:&lt;/p&gt;
&lt;div&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-4.png&quot; alt=&quot;stp-root-bridge-election-4&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol STP - Root Bridge Election&quot; /&gt;&lt;/div&gt;
&lt;ul class=&quot;check&quot;&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;
&lt;div&gt;&lt;strong&gt;Switch 1 (SW1)&lt;/strong&gt;. Has a &lt;strong&gt;priority&lt;/strong&gt; of &lt;strong&gt;32769&lt;/strong&gt; and &lt;strong&gt;MAC&lt;/strong&gt; address of &lt;strong&gt;1111.1111.1111&lt;/strong&gt;. So its &lt;strong&gt;BID&lt;/strong&gt; becomes &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;. When &lt;strong&gt;SW1&lt;/strong&gt; creates its own &lt;strong&gt;BPDU&lt;/strong&gt;, it sets both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111.&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;_mce_tagged_br&quot;&gt;
&lt;div&gt;&lt;strong&gt;S&lt;/strong&gt;&lt;strong&gt;witch 2 (SW2)&lt;/strong&gt;. Has a &lt;strong&gt;priority&lt;/strong&gt; of &lt;strong&gt;32769&lt;/strong&gt; and &lt;strong&gt;MAC&lt;/strong&gt; address of &lt;strong&gt;2222.2222.2222&lt;/strong&gt;. So its &lt;strong&gt;BID&lt;/strong&gt; becomes &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;. When &lt;strong&gt;SW2&lt;/strong&gt; creates its own &lt;strong&gt;BPDU&lt;/strong&gt;, it sets both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul class=&quot;check&quot;&gt;
&lt;li&gt;
&lt;div&gt;&lt;strong&gt;S&lt;/strong&gt;&lt;strong&gt;witch 3 (SW3)&lt;/strong&gt;. Has a &lt;strong&gt;priority&lt;/strong&gt; of &lt;strong&gt;32769&lt;/strong&gt; and &lt;strong&gt;MAC&lt;/strong&gt; address of &lt;strong&gt;3333.3333.3333&lt;/strong&gt;. So its &lt;strong&gt;BID&lt;/strong&gt; becomes &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt;. When &lt;strong&gt;SW3&lt;/strong&gt; creates its own &lt;strong&gt;BPDU&lt;/strong&gt;, it sets both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now, the election process commences with the advertisement of the individual &lt;strong&gt;Hello BPDU's&lt;/strong&gt; from each switch, as indicated by the arrows in our diagram. These &lt;strong&gt;BPDUs&lt;/strong&gt; originate from each switch and end up at the other switches. Let's take up one switch at a time to see how it reacts to the &lt;strong&gt;BPDUs&lt;/strong&gt; it receives from the other switches.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Switch 1 (SW1)&lt;/strong&gt;: It had sent out its own &lt;strong&gt;Hello BPDU&lt;/strong&gt; with both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;. When it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW2&lt;/strong&gt;, it checks for the &lt;strong&gt;Root BID&lt;/strong&gt; value which is &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;. &lt;strong&gt;SW1&lt;/strong&gt; discards the &lt;strong&gt;BPDU&lt;/strong&gt; sent by &lt;strong&gt;SW2&lt;/strong&gt;, as it still is the switch with the &lt;strong&gt;lowest BID&lt;/strong&gt;. Same situation happens when it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW3&lt;/strong&gt;. &lt;strong&gt;SW1&lt;/strong&gt; is still the switch with the &lt;strong&gt;lowest BID&lt;/strong&gt;. So it discards the &lt;strong&gt;Hello BPDU&lt;/strong&gt; received from &lt;strong&gt;SW3&lt;/strong&gt; and keeps on advertising itself as the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Switch 2 (SW2)&lt;/strong&gt;: Just like SW1, &lt;strong&gt;SW2&lt;/strong&gt; generates and sends its own &lt;strong&gt;Hello BPDU&lt;/strong&gt; with both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;. When it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW1&lt;/strong&gt;, it checks for the &lt;strong&gt;Root BID&lt;/strong&gt; value which &lt;strong&gt;SW1&lt;/strong&gt; has set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;. This being lower than SW2's own &lt;strong&gt;BID&lt;/strong&gt;, makes the &lt;strong&gt;Hello BPDU&lt;/strong&gt; received from &lt;strong&gt;SW1&lt;/strong&gt;, a &lt;strong&gt;superior BPDU&lt;/strong&gt;. So in its own &lt;strong&gt;BPDU&lt;/strong&gt;, &lt;strong&gt;SW2&lt;/strong&gt; changes the value of the&lt;strong&gt; Root BID&lt;/strong&gt; from &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;, to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;, and starts advertising this revised&lt;strong&gt; Hello BPDU&lt;/strong&gt;. &lt;strong&gt;SW2&lt;/strong&gt; now considers &lt;strong&gt;SW1&lt;/strong&gt; as the &lt;strong&gt;Root Bridge&lt;/strong&gt;. Now, when it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW3&lt;/strong&gt;, it will obviously discard the &lt;strong&gt;BPDU&lt;/strong&gt; as it is not superior in &lt;strong&gt;Root BID&lt;/strong&gt; value. So for &lt;strong&gt;SW2&lt;/strong&gt;, &lt;strong&gt;SW1&lt;/strong&gt; remains as &lt;strong&gt;Root Bridge&lt;/strong&gt;, even after receiving the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW3&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-4.png&quot; alt=&quot;stp-root-bridge-election-4&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol STP - Root Bridge Election&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Switch 3 (SW3)&lt;/strong&gt;: &lt;strong&gt;SW3&lt;/strong&gt; will send out its own &lt;strong&gt;Hello BPDU&lt;/strong&gt; with both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt;. Depending on which &lt;strong&gt;Hello BPDU&lt;/strong&gt; it receives first i.e. from &lt;strong&gt;SW1&lt;/strong&gt; or &lt;strong&gt;SW2&lt;/strong&gt;, it will end up changing the &lt;strong&gt;Root BID&lt;/strong&gt; value in its &lt;strong&gt;Hello BPDU&lt;/strong&gt; because both &lt;strong&gt;SW1&lt;/strong&gt; &amp;amp; &lt;strong&gt;SW2&lt;/strong&gt; have lower MAC addresses. So if it received the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW2&lt;/strong&gt; first, then it will change the &lt;strong&gt;Root BID&lt;/strong&gt; from &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt; and consider &lt;strong&gt;SW2&lt;/strong&gt; as new &lt;strong&gt;Root Bridge&lt;/strong&gt;. Once it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW1&lt;/strong&gt;, this &lt;strong&gt;BPDU&lt;/strong&gt; supersedes the &lt;strong&gt;BPDU&lt;/strong&gt; sent by &lt;strong&gt;SW2&lt;/strong&gt;. So &lt;strong&gt;SW3&lt;/strong&gt; changes the &lt;strong&gt;Root BID&lt;/strong&gt; from &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt; and now considers &lt;strong&gt;SW1&lt;/strong&gt; as new &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;At this point, all switches have received each other's &lt;strong&gt;BPDU&lt;/strong&gt; and have agreed that &lt;strong&gt;SW1&lt;/strong&gt; has the &lt;strong&gt;lowerst BID&lt;/strong&gt; address and is therefore the rightful &lt;strong&gt;Root Bridge&lt;/strong&gt; of the network. Both &lt;strong&gt;SW2&lt;/strong&gt;, and &lt;strong&gt;SW3&lt;/strong&gt; now agree that &lt;strong&gt;SW1&lt;/strong&gt; is &lt;strong&gt;Root Bridge&lt;/strong&gt;, and start organizing their respective links into &lt;strong&gt;Root Ports&lt;/strong&gt; and &lt;strong&gt;Designated Ports&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Configuring Switch 3 As The Root Bridge?&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In most real-life cases, we need to configure the &lt;strong&gt;Root Bridge&lt;/strong&gt; to ensure that no matter the switch that joins the network, our initial &lt;strong&gt;Root Bridge&lt;/strong&gt; will remain. To achieve this, we simply configure the &lt;strong&gt;Bridge Priority&lt;/strong&gt; so that it is always smaller than the default value of &lt;strong&gt;32769&lt;/strong&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In our example, if we wanted &lt;strong&gt;Switch 3&lt;/strong&gt; to become the new &lt;strong&gt;Root Bridge&lt;/strong&gt;, we would set its&amp;nbsp;&lt;strong&gt;Bridge Priority&lt;/strong&gt; to &lt;strong&gt;4096 (4096+1 for VLAN 1). &lt;/strong&gt;By doing so, we change its &lt;strong&gt;BID&lt;/strong&gt; to &lt;strong&gt;4097.3333.3333.3333&lt;/strong&gt; making it the lowest amongst our network switches.&lt;/p&gt;
&lt;p class=&quot;box-info&quot; style=&quot;text-align: justify;&quot;&gt;The two values (&lt;strong&gt;Bridge Priority + System ID Extension&lt;/strong&gt;) together make up the &lt;strong&gt;Bridge ID&lt;/strong&gt; used to elect the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Configuring a new &lt;strong&gt;BID&lt;/strong&gt; in a production network is not recommended unless every caution has been taken to ensure network downtime is eliminated. When the &lt;strong&gt;BID&lt;/strong&gt; of a switch changes to make it a &lt;strong&gt;Root Bridge&lt;/strong&gt;, the whole network (switches) will react upon this and begin recomputing the new information. Depending on where the new &lt;strong&gt;Root Bridge&lt;/strong&gt; is located, switch uplinks and redundant links might be blocked.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In this article analysed the &lt;strong&gt;Spanning Tree Protocol Bridge ID&lt;/strong&gt; structure and its importance. We also explained how the &lt;strong&gt;Bridge Priority&lt;/strong&gt; and &lt;strong&gt;System ID Extension&lt;/strong&gt; fields play a primary role in the &lt;strong&gt;Root Bridge&lt;/strong&gt; election process within the network.&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx//images/stories/spanning-tree-protocol-root-bridge-election-intro.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;In this article we will examine the &lt;strong&gt;Spanning Tree Bridge ID&lt;/strong&gt; structure, explain why it has increments of &lt;strong&gt;4096&lt;/strong&gt;, how VLAN information is embedded (for Per-VLAN Spanning Tree &amp;amp; multiple STP instances) via the &lt;strong&gt;System ID Extension&lt;/strong&gt; and show how the &lt;strong&gt;Spanning Tree Protocol Root Bridge Election&lt;/strong&gt; occurs.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Understanding Bridge ID, Bridge Priority &amp;amp; System ID Extension&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In our previous article we discussed about the &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html&quot; target=&quot;_blank&quot; title=&quot;we covered Spanning Tree Protocol, Rapid STP port costs and port states.&quot;&gt;&lt;strong&gt;&lt;strong&gt;Spanning Tree Protocol, Rapid STP port costs and port states&lt;/strong&gt;&lt;/strong&gt;&lt;/a&gt;. Before STP decides which path is the best to the &lt;strong&gt;Root Bridge&lt;/strong&gt;, it needs to first decide which switch has to be elected as the &lt;strong&gt;Root Bridge&lt;/strong&gt;, which is where the &lt;strong&gt;Bridge ID&lt;/strong&gt; comes into play. Readers interested can also read our &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-fundamentals.html&quot; target=&quot;_blank&quot; title=&quot;STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&quot;&gt;STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&lt;/a&gt; article.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Every switch has an identity when they are part of a network. This identity is called the &lt;strong&gt;Bridge ID&lt;/strong&gt; or &lt;strong&gt;BID&lt;/strong&gt;. It is an &lt;strong&gt;8 byte field&lt;/strong&gt; which is divided into two parts. The first part is a &lt;strong&gt;2-byte Bridge Priority&lt;/strong&gt; field (which can be configured) while the second part is the &lt;strong&gt;6-byte MAC address&lt;/strong&gt; of the switch. While the &lt;strong&gt;Bridge Priority&lt;/strong&gt; is configurable, the &lt;strong&gt;MAC address&lt;/strong&gt; is unique amongst all switches and the sum of these two ensures a unique &lt;strong&gt;Bridge ID&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-1.png&quot; alt=&quot;stp-root-bridge-election-1&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol - BPDU Hello Packet - Bridge ID + Priority&quot; /&gt;&lt;/p&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The above &lt;strong&gt;Bridge ID&lt;/strong&gt; assumes there is one Spanning Tree instance for the entire network. This is also called &lt;strong&gt;Common Spanning-Tree&lt;/strong&gt; (&lt;strong&gt;CST&lt;/strong&gt;).&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;As networks begun to grow and become more complex, VLANs were introduced, allowing the creation of multiple logical and physical networks. It was then necessary to run multiple instances of STP in order to accommodate each network - VLAN. These multiple instances are called &lt;strong&gt;Multiple Spanning Tree&lt;/strong&gt; (MST), &lt;strong&gt;Per-VLAN Spanning Tree&lt;/strong&gt; (PVST) and &lt;strong&gt;Per-VLAN Spanning Tree Plus&lt;/strong&gt; (PVST+).&lt;/p&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In order to accommodate the additional VLAN information, the &lt;strong&gt;Extended System ID&lt;/strong&gt; field was introduced, borrowing &lt;strong&gt;12 bits&lt;/strong&gt; from the original &lt;strong&gt;Bridge Priority&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-2.png&quot; alt=&quot;stp-root-bridge-election-2&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol - BPDU Hello Packet - Bridge ID + Priority&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The &lt;strong&gt;Bridge Priority&lt;/strong&gt; value and the &lt;strong&gt;Extended System ID&lt;/strong&gt; extension together make up a 16 bit (2-byte) value. The &lt;strong&gt;Bridge Priority&lt;/strong&gt; making up the left most bits, is a value of &lt;strong&gt;0&lt;/strong&gt; to &lt;strong&gt;61440&lt;/strong&gt;. The &lt;strong&gt;Extended System ID&lt;/strong&gt; is a value of &lt;strong&gt;1&lt;/strong&gt; to &lt;strong&gt;4095&lt;/strong&gt; corresponding to the respective VLAN participating in STP. The &lt;strong&gt;Bridge Priority&lt;/strong&gt; increments in blocks of &lt;strong&gt;4096&lt;/strong&gt; to allow the &lt;strong&gt;System ID Extension&lt;/strong&gt; to squeeze in between each increment. This is clearly shown in the below analysis:&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-3.png&quot; alt=&quot;stp-root-bridge-election-3&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol - BPDU Hello Packet - Bridge ID + Priority&quot; /&gt;We should note that the &lt;strong&gt;Bridge Priority Field&lt;/strong&gt; can only be set in increments of &lt;strong&gt;4096&lt;/strong&gt;. This means that possible values are: &lt;strong&gt;4096&lt;/strong&gt;, &lt;strong&gt;8192&lt;/strong&gt;, &lt;strong&gt;12288&lt;/strong&gt;, &lt;strong&gt;16384&lt;/strong&gt;, &lt;strong&gt;20480&lt;/strong&gt;, &lt;strong&gt;24576&lt;/strong&gt;, &lt;strong&gt;28672&lt;/strong&gt;, &lt;strong&gt;32768 etc&lt;/strong&gt;. By default, Cisco’s &lt;strong&gt;Per-VLAN Spanning-Tree Plus&lt;/strong&gt; (PVST+) adds this &lt;strong&gt;System ID Extension&lt;/strong&gt; (sys-id-ext) to the &lt;strong&gt;Bridge Priority&lt;/strong&gt;.&lt;/p&gt;
&lt;p class=&quot;box-info&quot;&gt;The two values (&lt;strong&gt;Bridge Priority + System ID Extension&lt;/strong&gt;) together make up the &lt;strong&gt;Bridge ID&lt;/strong&gt; used to elect the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;The Root Bridge Election Process&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The election process uses several STP messages sent between switches which help each switch to decide, who is the &lt;strong&gt;Root Bridge&lt;/strong&gt;. These messages are called &lt;strong&gt;Hello BPDU&lt;/strong&gt; where BPDU stands for &lt;strong&gt;Bridge Protocol Data Unit&lt;/strong&gt;. It is important to understand the information these &lt;strong&gt;BPDUs&lt;/strong&gt; carry as it will help understand the election process itself.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Each &lt;strong&gt;BPDU &lt;/strong&gt;carries several fields in it. The following table defines each field:&lt;/p&gt;
&lt;table border=&quot;1&quot; style=&quot;border-collapse: collapse; width: 647px; height: 204px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px; border: 1px solid windowtext; background: repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin: 0cm 0cm 0.0001pt; line-height: normal; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif; color: #000000;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;Field&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: -moz-use-text-color; background: repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin: 0cm 0cm 0.0001pt; line-height: normal; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif; color: #000000;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;Description&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Root Bridge ID or Root BID&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;BID of the switch that the sender of this BPDU believes to be the root switch&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Sender’s Bridge ID&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;BID of the switch sending this Hello BPDU&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Cost to the Root Bridge&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;The STP cost between this switch and the current root&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 353px;&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&lt;strong&gt;Timer values on Root Bridge&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 353px;&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;Hello Timer, Max Age Timer, Forward Delay Timer&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;For the purpose of this exercise, we will only concentrate on the first three fields.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now, the election process itself is very simple. The switch with the lowest &lt;strong&gt;BID&lt;/strong&gt; becomes the &lt;strong&gt;Root Bridge&lt;/strong&gt;. Since the &lt;strong&gt;BID&lt;/strong&gt; starts with the &lt;strong&gt;Bridge Priority&lt;/strong&gt; field, essentially, the switch with the lowest &lt;strong&gt;Bridge Priority&lt;/strong&gt; field becomes the &lt;strong&gt;Root Bridge&lt;/strong&gt;. If there is a tie between two switches having the same priority value, then the switch with the &lt;strong&gt;lowest MAC address&lt;/strong&gt; becomes the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The &lt;strong&gt;STP Root Bridge&lt;/strong&gt; election process starts with each switch advertising themselves as the&amp;nbsp;&lt;strong&gt;Root Bridge&lt;/strong&gt; and constructing the &lt;strong&gt;Hello BPDU&lt;/strong&gt; accordingly. So each switch lists its own &lt;strong&gt;BID&lt;/strong&gt; as the &lt;strong&gt;Root BID&lt;/strong&gt;. The &lt;strong&gt;Sender Bridge ID&lt;/strong&gt; is ofcourse the same as the &lt;strong&gt;Root BID&lt;/strong&gt;, as it is again its own &lt;strong&gt;BID&lt;/strong&gt;. With in &lt;strong&gt;BPDU&lt;/strong&gt;, the &lt;strong&gt;Cost&lt;/strong&gt; field is listed with a&lt;strong&gt; value of 0&lt;/strong&gt;, because there is no cost between itself.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The switches send out the &lt;strong&gt;Hello BPDU&lt;/strong&gt; constructed as above, onto the network. They will keep on maintaining their status as &lt;strong&gt;Root Bridge&lt;/strong&gt; by default, until they receive a &lt;strong&gt;Hello BPDU&lt;/strong&gt; which carries a &lt;strong&gt;lower BID&lt;/strong&gt;. This &lt;strong&gt;Hello BPDU&lt;/strong&gt; then becomes a &lt;strong&gt;superior BPDU&lt;/strong&gt;. Now the switch receiving this &lt;strong&gt;superior BPDU&lt;/strong&gt; makes changes to the &lt;strong&gt;Hello BPDU&lt;/strong&gt; it has been sending out. It changes the value of the &lt;strong&gt;Root BID&lt;/strong&gt; to reflect the &lt;strong&gt;Root BID&lt;/strong&gt; from the &lt;strong&gt;superior Hello BPDU&lt;/strong&gt;. This process continues till every switch agrees on which switch has the &lt;strong&gt;lower BID&lt;/strong&gt;, and hence deserves to be the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Root Bridge Election Example&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Let's analyze this process using a network consisting of three switches. To make our example easier to understand, the &lt;strong&gt;MAC address&lt;/strong&gt; of each switch has been changed to a simple value as shown in the below diagram:&lt;/p&gt;
&lt;div&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-4.png&quot; alt=&quot;stp-root-bridge-election-4&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol STP - Root Bridge Election&quot; /&gt;&lt;/div&gt;
&lt;ul class=&quot;check&quot;&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;
&lt;div&gt;&lt;strong&gt;Switch 1 (SW1)&lt;/strong&gt;. Has a &lt;strong&gt;priority&lt;/strong&gt; of &lt;strong&gt;32769&lt;/strong&gt; and &lt;strong&gt;MAC&lt;/strong&gt; address of &lt;strong&gt;1111.1111.1111&lt;/strong&gt;. So its &lt;strong&gt;BID&lt;/strong&gt; becomes &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;. When &lt;strong&gt;SW1&lt;/strong&gt; creates its own &lt;strong&gt;BPDU&lt;/strong&gt;, it sets both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111.&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;_mce_tagged_br&quot;&gt;
&lt;div&gt;&lt;strong&gt;S&lt;/strong&gt;&lt;strong&gt;witch 2 (SW2)&lt;/strong&gt;. Has a &lt;strong&gt;priority&lt;/strong&gt; of &lt;strong&gt;32769&lt;/strong&gt; and &lt;strong&gt;MAC&lt;/strong&gt; address of &lt;strong&gt;2222.2222.2222&lt;/strong&gt;. So its &lt;strong&gt;BID&lt;/strong&gt; becomes &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;. When &lt;strong&gt;SW2&lt;/strong&gt; creates its own &lt;strong&gt;BPDU&lt;/strong&gt;, it sets both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul class=&quot;check&quot;&gt;
&lt;li&gt;
&lt;div&gt;&lt;strong&gt;S&lt;/strong&gt;&lt;strong&gt;witch 3 (SW3)&lt;/strong&gt;. Has a &lt;strong&gt;priority&lt;/strong&gt; of &lt;strong&gt;32769&lt;/strong&gt; and &lt;strong&gt;MAC&lt;/strong&gt; address of &lt;strong&gt;3333.3333.3333&lt;/strong&gt;. So its &lt;strong&gt;BID&lt;/strong&gt; becomes &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt;. When &lt;strong&gt;SW3&lt;/strong&gt; creates its own &lt;strong&gt;BPDU&lt;/strong&gt;, it sets both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now, the election process commences with the advertisement of the individual &lt;strong&gt;Hello BPDU's&lt;/strong&gt; from each switch, as indicated by the arrows in our diagram. These &lt;strong&gt;BPDUs&lt;/strong&gt; originate from each switch and end up at the other switches. Let's take up one switch at a time to see how it reacts to the &lt;strong&gt;BPDUs&lt;/strong&gt; it receives from the other switches.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Switch 1 (SW1)&lt;/strong&gt;: It had sent out its own &lt;strong&gt;Hello BPDU&lt;/strong&gt; with both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;. When it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW2&lt;/strong&gt;, it checks for the &lt;strong&gt;Root BID&lt;/strong&gt; value which is &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;. &lt;strong&gt;SW1&lt;/strong&gt; discards the &lt;strong&gt;BPDU&lt;/strong&gt; sent by &lt;strong&gt;SW2&lt;/strong&gt;, as it still is the switch with the &lt;strong&gt;lowest BID&lt;/strong&gt;. Same situation happens when it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW3&lt;/strong&gt;. &lt;strong&gt;SW1&lt;/strong&gt; is still the switch with the &lt;strong&gt;lowest BID&lt;/strong&gt;. So it discards the &lt;strong&gt;Hello BPDU&lt;/strong&gt; received from &lt;strong&gt;SW3&lt;/strong&gt; and keeps on advertising itself as the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Switch 2 (SW2)&lt;/strong&gt;: Just like SW1, &lt;strong&gt;SW2&lt;/strong&gt; generates and sends its own &lt;strong&gt;Hello BPDU&lt;/strong&gt; with both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;. When it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW1&lt;/strong&gt;, it checks for the &lt;strong&gt;Root BID&lt;/strong&gt; value which &lt;strong&gt;SW1&lt;/strong&gt; has set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;. This being lower than SW2's own &lt;strong&gt;BID&lt;/strong&gt;, makes the &lt;strong&gt;Hello BPDU&lt;/strong&gt; received from &lt;strong&gt;SW1&lt;/strong&gt;, a &lt;strong&gt;superior BPDU&lt;/strong&gt;. So in its own &lt;strong&gt;BPDU&lt;/strong&gt;, &lt;strong&gt;SW2&lt;/strong&gt; changes the value of the&lt;strong&gt; Root BID&lt;/strong&gt; from &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt;, to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt;, and starts advertising this revised&lt;strong&gt; Hello BPDU&lt;/strong&gt;. &lt;strong&gt;SW2&lt;/strong&gt; now considers &lt;strong&gt;SW1&lt;/strong&gt; as the &lt;strong&gt;Root Bridge&lt;/strong&gt;. Now, when it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW3&lt;/strong&gt;, it will obviously discard the &lt;strong&gt;BPDU&lt;/strong&gt; as it is not superior in &lt;strong&gt;Root BID&lt;/strong&gt; value. So for &lt;strong&gt;SW2&lt;/strong&gt;, &lt;strong&gt;SW1&lt;/strong&gt; remains as &lt;strong&gt;Root Bridge&lt;/strong&gt;, even after receiving the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW3&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-root-bridge-election-4.png&quot; alt=&quot;stp-root-bridge-election-4&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol STP - Root Bridge Election&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Switch 3 (SW3)&lt;/strong&gt;: &lt;strong&gt;SW3&lt;/strong&gt; will send out its own &lt;strong&gt;Hello BPDU&lt;/strong&gt; with both &lt;strong&gt;BID&lt;/strong&gt; and &lt;strong&gt;Root BID&lt;/strong&gt; set to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt;. Depending on which &lt;strong&gt;Hello BPDU&lt;/strong&gt; it receives first i.e. from &lt;strong&gt;SW1&lt;/strong&gt; or &lt;strong&gt;SW2&lt;/strong&gt;, it will end up changing the &lt;strong&gt;Root BID&lt;/strong&gt; value in its &lt;strong&gt;Hello BPDU&lt;/strong&gt; because both &lt;strong&gt;SW1&lt;/strong&gt; &amp;amp; &lt;strong&gt;SW2&lt;/strong&gt; have lower MAC addresses. So if it received the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW2&lt;/strong&gt; first, then it will change the &lt;strong&gt;Root BID&lt;/strong&gt; from &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.3333.3333.3333&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt; and consider &lt;strong&gt;SW2&lt;/strong&gt; as new &lt;strong&gt;Root Bridge&lt;/strong&gt;. Once it receives the &lt;strong&gt;Hello BPDU&lt;/strong&gt; from &lt;strong&gt;SW1&lt;/strong&gt;, this &lt;strong&gt;BPDU&lt;/strong&gt; supersedes the &lt;strong&gt;BPDU&lt;/strong&gt; sent by &lt;strong&gt;SW2&lt;/strong&gt;. So &lt;strong&gt;SW3&lt;/strong&gt; changes the &lt;strong&gt;Root BID&lt;/strong&gt; from &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.2222.2222.2222&lt;/strong&gt; to &lt;strong&gt;&lt;strong&gt;32769&lt;/strong&gt;.1111.1111.1111&lt;/strong&gt; and now considers &lt;strong&gt;SW1&lt;/strong&gt; as new &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;At this point, all switches have received each other's &lt;strong&gt;BPDU&lt;/strong&gt; and have agreed that &lt;strong&gt;SW1&lt;/strong&gt; has the &lt;strong&gt;lowerst BID&lt;/strong&gt; address and is therefore the rightful &lt;strong&gt;Root Bridge&lt;/strong&gt; of the network. Both &lt;strong&gt;SW2&lt;/strong&gt;, and &lt;strong&gt;SW3&lt;/strong&gt; now agree that &lt;strong&gt;SW1&lt;/strong&gt; is &lt;strong&gt;Root Bridge&lt;/strong&gt;, and start organizing their respective links into &lt;strong&gt;Root Ports&lt;/strong&gt; and &lt;strong&gt;Designated Ports&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Configuring Switch 3 As The Root Bridge?&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In most real-life cases, we need to configure the &lt;strong&gt;Root Bridge&lt;/strong&gt; to ensure that no matter the switch that joins the network, our initial &lt;strong&gt;Root Bridge&lt;/strong&gt; will remain. To achieve this, we simply configure the &lt;strong&gt;Bridge Priority&lt;/strong&gt; so that it is always smaller than the default value of &lt;strong&gt;32769&lt;/strong&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In our example, if we wanted &lt;strong&gt;Switch 3&lt;/strong&gt; to become the new &lt;strong&gt;Root Bridge&lt;/strong&gt;, we would set its&amp;nbsp;&lt;strong&gt;Bridge Priority&lt;/strong&gt; to &lt;strong&gt;4096 (4096+1 for VLAN 1). &lt;/strong&gt;By doing so, we change its &lt;strong&gt;BID&lt;/strong&gt; to &lt;strong&gt;4097.3333.3333.3333&lt;/strong&gt; making it the lowest amongst our network switches.&lt;/p&gt;
&lt;p class=&quot;box-info&quot; style=&quot;text-align: justify;&quot;&gt;The two values (&lt;strong&gt;Bridge Priority + System ID Extension&lt;/strong&gt;) together make up the &lt;strong&gt;Bridge ID&lt;/strong&gt; used to elect the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Configuring a new &lt;strong&gt;BID&lt;/strong&gt; in a production network is not recommended unless every caution has been taken to ensure network downtime is eliminated. When the &lt;strong&gt;BID&lt;/strong&gt; of a switch changes to make it a &lt;strong&gt;Root Bridge&lt;/strong&gt;, the whole network (switches) will react upon this and begin recomputing the new information. Depending on where the new &lt;strong&gt;Root Bridge&lt;/strong&gt; is located, switch uplinks and redundant links might be blocked.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In this article analysed the &lt;strong&gt;Spanning Tree Protocol Bridge ID&lt;/strong&gt; structure and its importance. We also explained how the &lt;strong&gt;Bridge Priority&lt;/strong&gt; and &lt;strong&gt;System ID Extension&lt;/strong&gt; fields play a primary role in the &lt;strong&gt;Root Bridge&lt;/strong&gt; election process within the network.&lt;/p&gt;</content>
		<category term="Spanning Tree Protocol (STP)" />
	</entry>
	<entry>
		<title>Spanning Tree Protocol – Part 2: Rapid STP Port Costs - Port States</title>
		<link rel="alternate" type="text/html" href="https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html"/>
		<published>2014-05-18T16:00:00+10:00</published>
		<updated>2014-05-18T16:00:00+10:00</updated>
		<id>https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html</id>
		<author>
			<name>Arani Mukherjee</name>
		</author>
		<summary type="html">&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx//images/stories/spanning-tree-protocol-port-costs-states-intro.webp&quot; alt=&quot;Spanning Tree Protocol, Rapid STP Port Costs - Port States&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-1a.jpg&quot; alt=&quot;stp-ports-costs-states-1a&quot; width=&quot;204&quot; height=&quot;114&quot; style=&quot;margin: 7px; float: left;&quot; title=&quot;Spanning Tree Protocol - Network&quot; /&gt;Spanning Tree Protocol, Rapid STP port costs and port states&lt;/strong&gt; are an essential part of the STP algorithm that affect how STP decides to forward or block a port leading to the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In our previous article, &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-fundamentals.html&quot; target=&quot;_blank&quot; title=&quot;Understand STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&quot;&gt;Understand STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&lt;/a&gt;, we encountered some key issues related to switching that causes degradation in network performance.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Those issues were broadly categorised as follows:&lt;/p&gt;
&lt;ul class=&quot;check-green check&quot;&gt;
&lt;li&gt;Broadcast storm&lt;/li&gt;
&lt;li&gt;Unstable MAC Table in switches&lt;/li&gt;
&lt;li&gt;Multiple duplicate frames arriving at hosts&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In order to avoid the above situations, &lt;strong&gt;Spanning Tree Protocol&lt;/strong&gt; or &lt;strong&gt;STP&lt;/strong&gt; is implemented. The purpose of the STP protocol is to provide a &lt;strong&gt;single path of communication&lt;/strong&gt; between each Ethernet segment (e.g a link between two switches), by avoiding the accidental or intentinal creation of network loops. It is worth noting that both &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/switches-bridges.html&quot; target=&quot;_blank&quot; title=&quot;bridges and switches&quot;&gt;bridges and switches&lt;/a&gt; make use of the STP protocol.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;To create a &lt;strong&gt;single path&lt;/strong&gt; between each &lt;strong&gt;Ethernet segment&lt;/strong&gt;, &lt;strong&gt;STP&lt;/strong&gt; decides on the &lt;strong&gt;state&lt;/strong&gt; of &lt;strong&gt;each Ethernet interface&lt;/strong&gt;. An interface can be in one of the &lt;strong&gt;two following states:&lt;/strong&gt; &lt;strong&gt;Forwarding state&lt;/strong&gt; or &lt;strong&gt;Blocking state&lt;/strong&gt;. STP employs its algorithm and puts certain interfaces in a &lt;strong&gt;Forwarding state &lt;/strong&gt;to allow traffic flow, while all other interfaces are placed in a &lt;strong&gt;Blocking state&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Before we start looking into the criteria used by STP to place a port in a &lt;strong&gt;Forwarding or Blocking state&lt;/strong&gt;, we need to familiarize ourselves with certain terminologies with the help of the network diagram below:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-1.png&quot; alt=&quot;stp-ports-costs-states-1&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Understanding Spanning Tree Protocol Root Ports, Designated Ports, Port States, Port Costs&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Root Bridge:&lt;/strong&gt; A switch with all its ports placed in &lt;strong&gt;Forwarding state&lt;/strong&gt; is a root bridge. The &lt;strong&gt;Root Bridge&lt;/strong&gt; is often called &lt;strong&gt;Root Switch&lt;/strong&gt;. Think of the &lt;strong&gt;Root Bridge&lt;/strong&gt; is as the &lt;strong&gt;Master Switch&lt;/strong&gt; (for loop avoidance matters), for which only one active path must exist from all other switches to avoid any possible network loops.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Root Port (RP): &lt;/strong&gt;For a &lt;strong&gt;non–root switch&lt;/strong&gt;, the &lt;strong&gt;port that connects to the root switch&lt;/strong&gt;, with the least cost. In our example above, all uplink ports are&amp;nbsp;&lt;strong&gt;Root Ports (RP)&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Designated Port (DP): &lt;/strong&gt;A &lt;strong&gt;non – root port&lt;/strong&gt;, is a port that is in a &lt;strong&gt;Forwarding state&lt;/strong&gt; and has the &lt;strong&gt;lowest cost&lt;/strong&gt; in Ethernet segment (physical link between two devices).&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Cost: &lt;/strong&gt;A &lt;strong&gt;port cost&lt;/strong&gt; is defined by the &lt;strong&gt;speed&lt;/strong&gt; at which the port operates. The&amp;nbsp;cost&amp;nbsp;of a&amp;nbsp;port&amp;nbsp;is &lt;strong&gt;inversely related&lt;/strong&gt; to the associated bandwidth and therefore a&amp;nbsp;port&amp;nbsp;with a low&amp;nbsp;cost&amp;nbsp;value (greater bandwidth-speed) is more preferable than a&amp;nbsp;port&amp;nbsp;with &lt;strong&gt;high&amp;nbsp;cost&amp;nbsp;value&lt;/strong&gt; (lower bandwidth-speed).&lt;/p&gt;
&lt;p class=&quot;box-info&quot;&gt;Note: The process of the &lt;strong&gt;Root Bridge&lt;/strong&gt; election, &lt;strong&gt;Designated&lt;/strong&gt; and &lt;strong&gt;Root Ports&lt;/strong&gt; is covered in great detail in our &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-root-bridge-election.html&quot; target=&quot;_blank&quot; title=&quot;Spanning Tree Protocol: Bridge ID, Priority, System ID Extension &amp;amp; Root Bridge Election Process&quot;&gt;Spanning Tree Protocol: Bridge ID, Priority, System ID Extension &amp;amp; Root Bridge Election Process&lt;/a&gt; articles.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The table below was published by the &lt;strong&gt;IEEE group&lt;/strong&gt; in &lt;strong&gt;1998&lt;/strong&gt; and represented the cost against bandwidth:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-2.png&quot; alt=&quot;stp-ports-costs-states-2&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol 802.1D cost against bandwidth&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;The original STP Cost-Bandwidth table - Year 1998&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The &lt;strong&gt;cost value&lt;/strong&gt; (column marked “Range”) supported a &lt;strong&gt;16-bit value&lt;/strong&gt; (1 – 65535) while the &lt;strong&gt;root path cost&lt;/strong&gt; was assigned a &lt;strong&gt;32bit value&lt;/strong&gt; embedded within the &lt;strong&gt;Bridge Protocol Data Unit&lt;/strong&gt; (&lt;strong&gt;BPDU&lt;/strong&gt;) field. BPDU's are special STP packets that contain all necessary information about the network's Spanning Tree topology.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In 2004, the revised&lt;strong&gt; 802.1D&lt;/strong&gt; had its &lt;strong&gt;16- bit&lt;/strong&gt; path cost increased to a &lt;strong&gt;32-bit value&lt;/strong&gt;, providing more granularity:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-3.png&quot; alt=&quot;stp-ports-costs-states-3&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol 802.1D year 2004 - Updated cost against bandwidth&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Spanning Tree Protocol&lt;/strong&gt; uses the following criteria to decide whether to place a port in a &lt;strong&gt;Forwarding&lt;/strong&gt; state or &lt;strong&gt;Blocking&lt;/strong&gt; state:&lt;/p&gt;
&lt;ol style=&quot;text-align: justify;&quot;&gt;
&lt;li&gt;STP elects a &lt;strong&gt;Root Bridge&lt;/strong&gt;, and then puts all its working interfaces in a &lt;strong&gt;Forwarding&lt;/strong&gt; state&lt;/li&gt;
&lt;li&gt;All other switches are now &lt;strong&gt;non–root switches&lt;/strong&gt;. STP now looks at all the &lt;strong&gt;Root Ports&lt;/strong&gt; from these switches, and finds the one with the &lt;strong&gt;Least Cost&lt;/strong&gt;. Once this is found, STP places that interface in a &lt;strong&gt;Forwarding&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Now STP finds all the &lt;strong&gt;Designated&lt;/strong&gt; ports on the &lt;strong&gt;non–root switches&lt;/strong&gt;, and places them in a &lt;strong&gt;Forwarding&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Then STP places all other ports in a &lt;strong&gt;Blocking&lt;/strong&gt; state.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;It is absolutely essential to understand that the process of the &lt;strong&gt;Root Bridge&lt;/strong&gt; and non-root switches election along with the port selection is performed only on working interfaces. Any failed/down interface i.e. no cables connected, or an interface which has been shutdown administratively, is parked into an STP &lt;strong&gt;Disabled&lt;/strong&gt; state. Such ports are not considered during STP algorithm deployment.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now let’s summarise what has been established previously:&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; style=&quot;border-collapse: collapse;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;middle&quot;&gt;
&lt;td style=&quot;width: 235px; border: 1px solid windowtext; background: url('none') repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;Port Description&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: -moz-use-text-color; background: url('none') repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;STP State&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: -moz-use-text-color; background: url('none') repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;Important Observation&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;All ports on root switch&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Forwarding&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;Root switch is always the designation switch on all Ethernet segment&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;Root ports on non – root switches&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Forwarding&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;These are the ports that non – root switches use to reach the root switch&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;Every LAN’s designation port&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Forwarding&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;The non – root port, that forwards away from the root switch, with lowest cost&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;All other working ports&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Blocking&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;These ports are not used for forwarding, and any frames received on these interfaces are not forwarded as well.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The following table shows the available Port states for the&lt;strong&gt; original STP&lt;/strong&gt; (802.1D) and newer &lt;strong&gt;Rapid STP&lt;/strong&gt; (802.1w) designed to provide faster convergenceto topology changes. We should note that the three states &lt;strong&gt;Disabled&lt;/strong&gt;, &lt;strong&gt;Blocking&lt;/strong&gt; &amp;amp; &lt;strong&gt;Listening&lt;/strong&gt; from &lt;strong&gt;STP&lt;/strong&gt; (802.1D) have merged into one state, &lt;strong&gt;Discarding&lt;/strong&gt;, for &lt;strong&gt;Rapid STP&lt;/strong&gt; (802.1w):&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-irow: 0; mso-yfti-firstrow: yes; height: 30.45pt;&quot;&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;STP (802.1D) Port State&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;RSTP (802.1w) Port State&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Is Port Included in Active Topology?&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Is Port Learning MAC Addresses?&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 1; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Disabled&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Discarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 2; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Blocking&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Discarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Listening&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Discarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 4; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Learning&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Learning&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 5; mso-yfti-lastrow: yes; height: 15.6pt;&quot;&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Forwarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Forwarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Support of Rapid STP (RSTP) in Cisco Catalyst Switches&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;This table shows the support of &lt;strong&gt;RSTP&lt;/strong&gt; in Cisco Catalyst switches, and the minimum software required for that support. As a general rule of thumb, all newer Catalyst switches provide support for &lt;strong&gt;RTSP&lt;/strong&gt;.&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; style=&quot;background: none repeat scroll 0% 0% white; width: 766px; height: 491px;&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;Catalyst Platform&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;MST w/ RSTP&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;RPVST+ (also known as PVRST+)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2900 XL / 3500 XL&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2940&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(20)EA2&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(20)EA2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2950/2955/3550&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(9)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(13)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2970/3750&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 3560&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(19)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(19)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 3750 Metro&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)AX&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)AX&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2948G-L3/4908G-L3&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 4000/2948G/2980G (CatOS)&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.5&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 4000/4500 (IOS)&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(12c)EW&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(19)EW&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 5000/5500&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 6000/6500&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.5&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 6000/6500 (IOS)&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(11b)EX, 12.1(13)E, 12.2(14)SX&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(13)E&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 8500&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In this article we covered &lt;strong&gt;&lt;strong&gt;Spanning Tree Protocol, Rapid STP port costs and port state&lt;/strong&gt;&lt;/strong&gt;,&amp;nbsp; with the help of our network diagram. We learn't about the original and revised STP port costs, explained important STP terms such as &lt;strong&gt;Root Bridge&lt;/strong&gt;, &lt;strong&gt;Designated Port&lt;/strong&gt;, &lt;strong&gt;Root Port&lt;/strong&gt;, &lt;strong&gt;Forwarding state&lt;/strong&gt;, &lt;strong&gt;Blocking state&lt;/strong&gt; and more.&lt;strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Our &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-root-bridge-election.html&quot; target=&quot;_blank&quot; title=&quot;Spanning Tree Root Bridge Election Process&quot;&gt;next article&lt;/a&gt; explains how STP decides which switch will be the&lt;strong&gt; Root Bridge &lt;/strong&gt;, how it elects the &lt;strong&gt;Root Ports&lt;/strong&gt; and &lt;strong&gt;Designated Ports&lt;/strong&gt;. We will also investigate how STP reacts to any changes to the network topology and incorporates the changes in its algorithm.&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx//images/stories/spanning-tree-protocol-port-costs-states-intro.webp&quot; alt=&quot;Spanning Tree Protocol, Rapid STP Port Costs - Port States&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-1a.jpg&quot; alt=&quot;stp-ports-costs-states-1a&quot; width=&quot;204&quot; height=&quot;114&quot; style=&quot;margin: 7px; float: left;&quot; title=&quot;Spanning Tree Protocol - Network&quot; /&gt;Spanning Tree Protocol, Rapid STP port costs and port states&lt;/strong&gt; are an essential part of the STP algorithm that affect how STP decides to forward or block a port leading to the &lt;strong&gt;Root Bridge&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In our previous article, &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-fundamentals.html&quot; target=&quot;_blank&quot; title=&quot;Understand STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&quot;&gt;Understand STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&lt;/a&gt;, we encountered some key issues related to switching that causes degradation in network performance.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Those issues were broadly categorised as follows:&lt;/p&gt;
&lt;ul class=&quot;check-green check&quot;&gt;
&lt;li&gt;Broadcast storm&lt;/li&gt;
&lt;li&gt;Unstable MAC Table in switches&lt;/li&gt;
&lt;li&gt;Multiple duplicate frames arriving at hosts&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In order to avoid the above situations, &lt;strong&gt;Spanning Tree Protocol&lt;/strong&gt; or &lt;strong&gt;STP&lt;/strong&gt; is implemented. The purpose of the STP protocol is to provide a &lt;strong&gt;single path of communication&lt;/strong&gt; between each Ethernet segment (e.g a link between two switches), by avoiding the accidental or intentinal creation of network loops. It is worth noting that both &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/switches-bridges.html&quot; target=&quot;_blank&quot; title=&quot;bridges and switches&quot;&gt;bridges and switches&lt;/a&gt; make use of the STP protocol.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;To create a &lt;strong&gt;single path&lt;/strong&gt; between each &lt;strong&gt;Ethernet segment&lt;/strong&gt;, &lt;strong&gt;STP&lt;/strong&gt; decides on the &lt;strong&gt;state&lt;/strong&gt; of &lt;strong&gt;each Ethernet interface&lt;/strong&gt;. An interface can be in one of the &lt;strong&gt;two following states:&lt;/strong&gt; &lt;strong&gt;Forwarding state&lt;/strong&gt; or &lt;strong&gt;Blocking state&lt;/strong&gt;. STP employs its algorithm and puts certain interfaces in a &lt;strong&gt;Forwarding state &lt;/strong&gt;to allow traffic flow, while all other interfaces are placed in a &lt;strong&gt;Blocking state&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Before we start looking into the criteria used by STP to place a port in a &lt;strong&gt;Forwarding or Blocking state&lt;/strong&gt;, we need to familiarize ourselves with certain terminologies with the help of the network diagram below:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-1.png&quot; alt=&quot;stp-ports-costs-states-1&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Understanding Spanning Tree Protocol Root Ports, Designated Ports, Port States, Port Costs&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Root Bridge:&lt;/strong&gt; A switch with all its ports placed in &lt;strong&gt;Forwarding state&lt;/strong&gt; is a root bridge. The &lt;strong&gt;Root Bridge&lt;/strong&gt; is often called &lt;strong&gt;Root Switch&lt;/strong&gt;. Think of the &lt;strong&gt;Root Bridge&lt;/strong&gt; is as the &lt;strong&gt;Master Switch&lt;/strong&gt; (for loop avoidance matters), for which only one active path must exist from all other switches to avoid any possible network loops.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Root Port (RP): &lt;/strong&gt;For a &lt;strong&gt;non–root switch&lt;/strong&gt;, the &lt;strong&gt;port that connects to the root switch&lt;/strong&gt;, with the least cost. In our example above, all uplink ports are&amp;nbsp;&lt;strong&gt;Root Ports (RP)&lt;/strong&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Designated Port (DP): &lt;/strong&gt;A &lt;strong&gt;non – root port&lt;/strong&gt;, is a port that is in a &lt;strong&gt;Forwarding state&lt;/strong&gt; and has the &lt;strong&gt;lowest cost&lt;/strong&gt; in Ethernet segment (physical link between two devices).&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Cost: &lt;/strong&gt;A &lt;strong&gt;port cost&lt;/strong&gt; is defined by the &lt;strong&gt;speed&lt;/strong&gt; at which the port operates. The&amp;nbsp;cost&amp;nbsp;of a&amp;nbsp;port&amp;nbsp;is &lt;strong&gt;inversely related&lt;/strong&gt; to the associated bandwidth and therefore a&amp;nbsp;port&amp;nbsp;with a low&amp;nbsp;cost&amp;nbsp;value (greater bandwidth-speed) is more preferable than a&amp;nbsp;port&amp;nbsp;with &lt;strong&gt;high&amp;nbsp;cost&amp;nbsp;value&lt;/strong&gt; (lower bandwidth-speed).&lt;/p&gt;
&lt;p class=&quot;box-info&quot;&gt;Note: The process of the &lt;strong&gt;Root Bridge&lt;/strong&gt; election, &lt;strong&gt;Designated&lt;/strong&gt; and &lt;strong&gt;Root Ports&lt;/strong&gt; is covered in great detail in our &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-root-bridge-election.html&quot; target=&quot;_blank&quot; title=&quot;Spanning Tree Protocol: Bridge ID, Priority, System ID Extension &amp;amp; Root Bridge Election Process&quot;&gt;Spanning Tree Protocol: Bridge ID, Priority, System ID Extension &amp;amp; Root Bridge Election Process&lt;/a&gt; articles.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The table below was published by the &lt;strong&gt;IEEE group&lt;/strong&gt; in &lt;strong&gt;1998&lt;/strong&gt; and represented the cost against bandwidth:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-2.png&quot; alt=&quot;stp-ports-costs-states-2&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol 802.1D cost against bandwidth&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;The original STP Cost-Bandwidth table - Year 1998&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The &lt;strong&gt;cost value&lt;/strong&gt; (column marked “Range”) supported a &lt;strong&gt;16-bit value&lt;/strong&gt; (1 – 65535) while the &lt;strong&gt;root path cost&lt;/strong&gt; was assigned a &lt;strong&gt;32bit value&lt;/strong&gt; embedded within the &lt;strong&gt;Bridge Protocol Data Unit&lt;/strong&gt; (&lt;strong&gt;BPDU&lt;/strong&gt;) field. BPDU's are special STP packets that contain all necessary information about the network's Spanning Tree topology.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In 2004, the revised&lt;strong&gt; 802.1D&lt;/strong&gt; had its &lt;strong&gt;16- bit&lt;/strong&gt; path cost increased to a &lt;strong&gt;32-bit value&lt;/strong&gt;, providing more granularity:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/stp-ports-costs-states-3.png&quot; alt=&quot;stp-ports-costs-states-3&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol 802.1D year 2004 - Updated cost against bandwidth&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Spanning Tree Protocol&lt;/strong&gt; uses the following criteria to decide whether to place a port in a &lt;strong&gt;Forwarding&lt;/strong&gt; state or &lt;strong&gt;Blocking&lt;/strong&gt; state:&lt;/p&gt;
&lt;ol style=&quot;text-align: justify;&quot;&gt;
&lt;li&gt;STP elects a &lt;strong&gt;Root Bridge&lt;/strong&gt;, and then puts all its working interfaces in a &lt;strong&gt;Forwarding&lt;/strong&gt; state&lt;/li&gt;
&lt;li&gt;All other switches are now &lt;strong&gt;non–root switches&lt;/strong&gt;. STP now looks at all the &lt;strong&gt;Root Ports&lt;/strong&gt; from these switches, and finds the one with the &lt;strong&gt;Least Cost&lt;/strong&gt;. Once this is found, STP places that interface in a &lt;strong&gt;Forwarding&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Now STP finds all the &lt;strong&gt;Designated&lt;/strong&gt; ports on the &lt;strong&gt;non–root switches&lt;/strong&gt;, and places them in a &lt;strong&gt;Forwarding&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Then STP places all other ports in a &lt;strong&gt;Blocking&lt;/strong&gt; state.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;It is absolutely essential to understand that the process of the &lt;strong&gt;Root Bridge&lt;/strong&gt; and non-root switches election along with the port selection is performed only on working interfaces. Any failed/down interface i.e. no cables connected, or an interface which has been shutdown administratively, is parked into an STP &lt;strong&gt;Disabled&lt;/strong&gt; state. Such ports are not considered during STP algorithm deployment.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now let’s summarise what has been established previously:&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; style=&quot;border-collapse: collapse;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;middle&quot;&gt;
&lt;td style=&quot;width: 235px; border: 1px solid windowtext; background: url('none') repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;Port Description&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: -moz-use-text-color; background: url('none') repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;STP State&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: -moz-use-text-color; background: url('none') repeat scroll 0% 0% #ccccff; padding: 0cm 5.4pt;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;Important Observation&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;All ports on root switch&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Forwarding&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;Root switch is always the designation switch on all Ethernet segment&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;Root ports on non – root switches&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Forwarding&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;These are the ports that non – root switches use to reach the root switch&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;Every LAN’s designation port&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Forwarding&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;The non – root port, that forwards away from the root switch, with lowest cost&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt; border-style: none solid solid; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;All other working ports&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; text-align: center; line-height: normal;&quot; align=&quot;center&quot;&gt;Blocking&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 235px; border-width: medium 1pt 1pt medium; border-style: none solid solid none; padding: 0cm 5.4pt; text-align: justify;&quot; valign=&quot;top&quot;&gt;
&lt;p style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;These ports are not used for forwarding, and any frames received on these interfaces are not forwarded as well.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;The following table shows the available Port states for the&lt;strong&gt; original STP&lt;/strong&gt; (802.1D) and newer &lt;strong&gt;Rapid STP&lt;/strong&gt; (802.1w) designed to provide faster convergenceto topology changes. We should note that the three states &lt;strong&gt;Disabled&lt;/strong&gt;, &lt;strong&gt;Blocking&lt;/strong&gt; &amp;amp; &lt;strong&gt;Listening&lt;/strong&gt; from &lt;strong&gt;STP&lt;/strong&gt; (802.1D) have merged into one state, &lt;strong&gt;Discarding&lt;/strong&gt;, for &lt;strong&gt;Rapid STP&lt;/strong&gt; (802.1w):&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-irow: 0; mso-yfti-firstrow: yes; height: 30.45pt;&quot;&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;STP (802.1D) Port State&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;RSTP (802.1w) Port State&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Is Port Included in Active Topology?&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Is Port Learning MAC Addresses?&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 1; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Disabled&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Discarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 2; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Blocking&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Discarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Listening&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Discarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;No&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 4; height: 14.85pt;&quot;&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Learning&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Learning&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 5; mso-yfti-lastrow: yes; height: 15.6pt;&quot;&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Forwarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 157px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Forwarding&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align: center; width: 158px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 158px;&quot;&gt;
&lt;p style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Yes&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;Support of Rapid STP (RSTP) in Cisco Catalyst Switches&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;This table shows the support of &lt;strong&gt;RSTP&lt;/strong&gt; in Cisco Catalyst switches, and the minimum software required for that support. As a general rule of thumb, all newer Catalyst switches provide support for &lt;strong&gt;RTSP&lt;/strong&gt;.&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; style=&quot;background: none repeat scroll 0% 0% white; width: 766px; height: 491px;&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;Catalyst Platform&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;MST w/ RSTP&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;background-color: #ccccff;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;strong&gt;RPVST+ (also known as PVRST+)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2900 XL / 3500 XL&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2940&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(20)EA2&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(20)EA2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2950/2955/3550&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(9)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(13)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2970/3750&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 3560&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(19)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(19)EA1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 3750 Metro&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)AX&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(14)AX&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 2948G-L3/4908G-L3&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 4000/2948G/2980G (CatOS)&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.5&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 4000/4500 (IOS)&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(12c)EW&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(19)EW&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 5000/5500&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 6000/6500&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.1&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;7.5&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 6000/6500 (IOS)&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(11b)EX, 12.1(13)E, 12.2(14)SX&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;12.1(13)E&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Catalyst 8500&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;td style=&quot;width: 0px;&quot;&gt;
&lt;p align=&quot;center&quot;&gt;Not available.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;In this article we covered &lt;strong&gt;&lt;strong&gt;Spanning Tree Protocol, Rapid STP port costs and port state&lt;/strong&gt;&lt;/strong&gt;,&amp;nbsp; with the help of our network diagram. We learn't about the original and revised STP port costs, explained important STP terms such as &lt;strong&gt;Root Bridge&lt;/strong&gt;, &lt;strong&gt;Designated Port&lt;/strong&gt;, &lt;strong&gt;Root Port&lt;/strong&gt;, &lt;strong&gt;Forwarding state&lt;/strong&gt;, &lt;strong&gt;Blocking state&lt;/strong&gt; and more.&lt;strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Our &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-root-bridge-election.html&quot; target=&quot;_blank&quot; title=&quot;Spanning Tree Root Bridge Election Process&quot;&gt;next article&lt;/a&gt; explains how STP decides which switch will be the&lt;strong&gt; Root Bridge &lt;/strong&gt;, how it elects the &lt;strong&gt;Root Ports&lt;/strong&gt; and &lt;strong&gt;Designated Ports&lt;/strong&gt;. We will also investigate how STP reacts to any changes to the network topology and incorporates the changes in its algorithm.&lt;/p&gt;</content>
		<category term="Spanning Tree Protocol (STP)" />
	</entry>
	<entry>
		<title>Spanning Tree Protocol – Part 1: Understand STP Principles, Redundant Network Links &amp; Broadcast Storms</title>
		<link rel="alternate" type="text/html" href="https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-fundamentals.html"/>
		<published>2014-05-01T17:00:00+10:00</published>
		<updated>2014-05-01T17:00:00+10:00</updated>
		<id>https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-fundamentals.html</id>
		<author>
			<name>Arani Mukherjee</name>
		</author>
		<summary type="html">&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx//images/stories/spanning-tree-protocol-fundamentals-intro.webp&quot; alt=&quot;Spanning Tree Protocol – Understand STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/networking-spanning-tree-protocol-p1-1.jpg&quot; alt=&quot;networking-spanning-tree-protocol-p1-1&quot; width=&quot;250&quot; height=&quot;201&quot; style=&quot;margin: 7px; float: left;&quot; title=&quot;Spanning Tree Protocol (STP) - The Reason For STP&quot; /&gt;One of the most used terms in network is LAN (Local Area Network). It’s a form of network that we encounter in our daily lives, at home, at work, study, and in various other areas of life. Unless working specially in the field of Wide Area Networks (WAN), you will come across a LAN pretty much everyday. A key protocol used to maintain efficiency within a LAN is the &lt;strong&gt;Spanning Tree Protocol&lt;/strong&gt; (&lt;strong&gt;STP&lt;/strong&gt;), which is standardized as &lt;a href=&quot;https://en.wikipedia.org/wiki/IEEE_802.1D&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot; title=&quot;IEEE 802.1D&quot;&gt;IEEE 802.1D&lt;/a&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Without this protocol our LANs would rapidly become congested, with frames looping throughout the network infinitely, making network devices unstable. This protocol is implemented on switches, as switches deal with network data at the frame level. But before going ahead with a full blown explanation of what STP is, it is important to understand the ‘problem’ that STP prevents and how it improves a LAN’s performance. Let’s go through some salient features of a LAN first.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;One of the most important devices within a LAN is a &lt;a href=&quot;https://www.firewall.cx/cisco/cisco-switches.html&quot; target=&quot;_blank&quot; title=&quot;network switches&quot;&gt;network switch&lt;/a&gt;. All standard switches are Layer 2 devices i.e. they work at the level of &lt;em&gt;frames.&lt;/em&gt; A &lt;a href=&quot;https://www.firewall.cx/networking/ethernet/ethernet-ii.html&quot; target=&quot;_blank&quot; title=&quot;Ethernet Frame&quot;&gt;frame&lt;/a&gt; is the unit of transmission in a link layer protocol and consists of a link-layer header followed by a packet. Without going into too much detail, a switch communicates in terms of frames. Users interested learning more about frames, can visit our &lt;a href=&quot;https://www.firewall.cx/networking/ethernet.html&quot; target=&quot;_blank&quot; title=&quot;Ethernet Frame Formats&quot;&gt;Ethernet Frame Formats&lt;/a&gt; section where they'll find plenty of useful information and 3D representations of the various Ethernet frames. Apart from the higher layer data encapsulated by the frame, it carries two other important pieces of information, the Source &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/mac-addresses.html&quot; target=&quot;_blank&quot; title=&quot;MAC Addresses&quot;&gt;MAC Address&lt;/a&gt; and the Destination &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/mac-addresses.html&quot; target=&quot;_blank&quot; title=&quot;MAC Addresses&quot;&gt;MAC Address&lt;/a&gt;. It’s important to make a note of this as it becomes vital in our understanding of how a switch works and for STP itself.&lt;/p&gt;
&lt;h2&gt;How Does A Switch Work?&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;It must be noted that, before starting on this tutorial, it is best to have an understanding of how a switch works. If not then all is not lost. Users can always look up existing switch principles covered under the &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/switches-bridges.html&quot; target=&quot;_blank&quot; title=&quot;Network Switches and Bridges&quot;&gt;Switches &amp;amp; Bridges&lt;/a&gt; article.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Understanding of the following topics is essential for STP:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How a switch finds &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/mac-addresses.html&quot; target=&quot;_blank&quot; title=&quot;MAC Address&quot;&gt;MAC Addresses&lt;/a&gt; of new hosts&lt;/li&gt;
&lt;li&gt;How a switch populates its MAC Address tables&lt;/li&gt;
&lt;li&gt;How a switch deals with an incoming frame when it doesn’t know which outgoing interface to switch it to (due to no entry for a destination MAC Address in the switching table)&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;If the above fundamental principles are clear, learning about STP becomes simple.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Within permissible limits it might be said that STP is introduced within the LAN to prevent complications and network related problems caused by the way a switch functions. The flaw does not lie with how a switch works, it lies with the repercussions and manifestations of traffic because of it. Now let us run through some of the major issues encountered within a LAN.&lt;/p&gt;
&lt;h2&gt;Switches &amp;amp; Redundant Links Challenges&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Just like our lives, LANs becomes big and complicated and cater to a huge number of devices. To provide interconnectivity and redundancy, sometimes switches are connected between themselves to ensure data streams are always maintained between network hosts. In an ideal world, a simple network would only have a router, a switch, and ‘n’ number of hosts connected to that switch, depending on how big the switch is. But just like Utopia, this ideal world doesn’t exist and networks have multiple switches, and sometimes these switches have interconnections. It’s done to provide redundant paths to various parts of the network to which these switches provide connectivity.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;But by virtue of how a switch functions, there can be a few rather alarming issues cropping up very quickly when switches have more than one way of connecting various parts of the network. To visualise this concept, here’s a setup that has two hosts connected via two switches. For the sake of simplicity the router has been left out of this equation. Since STP is all about effective switching, let’s not involve ourselves in routing. The switching layout is, then, as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/spanning-tree-protocol-part1-1.jpg&quot; alt=&quot;spanning-tree-protocol-part1-1&quot; width=&quot;579&quot; height=&quot;176&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol Basics - Redundant Network Links&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;To simplify this layout, please consider the following&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There are two switches, &lt;strong&gt;SW1&lt;/strong&gt; and &lt;strong&gt;SW2&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;There are two hosts, PC1 and PC2, connected to &lt;strong&gt;SW1&lt;/strong&gt; and &lt;strong&gt;SW2&lt;/strong&gt; respectively&lt;/li&gt;
&lt;li&gt;MAC Address of PC1 is PC1-MAC1 and that of PC2 is PC2-MAC2&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SW1&lt;/strong&gt; and &lt;strong&gt;SW2&lt;/strong&gt; are connected to each other via 2 links, &lt;strong&gt;LINK 1&lt;/strong&gt; and &lt;strong&gt;LINK 2&lt;/strong&gt;. These are redundant links&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;LINK1&lt;/strong&gt;, the interface used on &lt;strong&gt;SW1&lt;/strong&gt; is SW1-MAC1, and the interface used on SW2 is SW2-MAC1&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;LINK2&lt;/strong&gt;, the interface used on &lt;strong&gt;SW1&lt;/strong&gt; is SW1-MAC2, and the interface used on SW2 is SW2-MAC2&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now let’s look at a condition where both switches have an empty MAC address table. PC1 sends out a frame whose destination is PC2. This frame reaches SW1. Right now SW1 does not know which interface to use to forward this frame to PC2, so it does a broadcast. By virtue of frame forwarding, the source address of this frame now changes. Since this broadcast will go out through both LINK 1 and 2, the outgoing broadcast frames will have different source addresses.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Let us consider the frame from SW1 going out on LINK 1. Its destination address still reads PC2-MAC2. But its source address now reads SW1-MAC1. When this frame reaches SW2, SW2 does not know which interface to use to forward this frame to PC2-MAC2, so it does a broadcast. By virtue of a broadcast from a switch, this frame will not go out on LINK 1 again. This broadcasted frame goes out to PC2 and also goes out on LINK 2. Once PC2 receives this broadcast, it acknowledges receipt and SW2 learns the interface to use to forward a frame whose destination MAC Address says PC2-MAC2. But what about the broadcast frame that went out on LINK 2? This now reaches SW1, and its destination MAC Address still reads PC2-MAC2. SW1, for the second time, does not know which interface to use to forward this frame. So guess what it does? It does a broadcast again, causing PC1 to receive a frame it sent out in the first case.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;So you see, an innocent frame that was destined for just one host on the other end of this simplified network, ended up with the host that sent it out in the first place. This is what is known as a broadcast storm. Now this process will keep on going till the network becomes congested with multiple duplicate frames, thus reducing its performance.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;This is not the only issue on this LAN. What happens in the background is that the MAC table within both switches becomes extremely unstable. This is caused by the effect of the frame with the same destination MAC Address approaching the two switches with different source MAC Address. Hence the MAC table on each switch keeps getting updated without achieving any stable state. Not to mention the fact that due to this broadcast storm the hosts keep receiving multiple duplicate frames.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;So to sum up, the issues encountered in the above situation are now made clear:&lt;/p&gt;
&lt;ul class=&quot;check&quot;&gt;
&lt;li&gt;
&lt;div&gt;Broadcast storm&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Unstable MAC Table in switches&lt;/li&gt;
&lt;li&gt;Multiple duplicate frames arriving at hosts&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;STP is aimed at resolving all the above issues. This is discussed in the &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html&quot; target=&quot;_blank&quot; title=&quot;Spanning Tree Protocol, Rapid STP Port Costs - Port States&quot;&gt;next tutorial&lt;/a&gt;, &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html&quot; title=&quot;Spanning Tree Protocol, Rapid STP Port Costs - Port States&quot;&gt;Spanning Tree Protocol, Rapid STP Port Costs - Port States&lt;/a&gt;, where we will start discovering the working principle of this protocol, along with some key features and associated terms.&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx//images/stories/spanning-tree-protocol-fundamentals-intro.webp&quot; alt=&quot;Spanning Tree Protocol – Understand STP Principles, Redundant Network Links &amp;amp; Broadcast Storms&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/networking-spanning-tree-protocol-p1-1.jpg&quot; alt=&quot;networking-spanning-tree-protocol-p1-1&quot; width=&quot;250&quot; height=&quot;201&quot; style=&quot;margin: 7px; float: left;&quot; title=&quot;Spanning Tree Protocol (STP) - The Reason For STP&quot; /&gt;One of the most used terms in network is LAN (Local Area Network). It’s a form of network that we encounter in our daily lives, at home, at work, study, and in various other areas of life. Unless working specially in the field of Wide Area Networks (WAN), you will come across a LAN pretty much everyday. A key protocol used to maintain efficiency within a LAN is the &lt;strong&gt;Spanning Tree Protocol&lt;/strong&gt; (&lt;strong&gt;STP&lt;/strong&gt;), which is standardized as &lt;a href=&quot;https://en.wikipedia.org/wiki/IEEE_802.1D&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot; title=&quot;IEEE 802.1D&quot;&gt;IEEE 802.1D&lt;/a&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Without this protocol our LANs would rapidly become congested, with frames looping throughout the network infinitely, making network devices unstable. This protocol is implemented on switches, as switches deal with network data at the frame level. But before going ahead with a full blown explanation of what STP is, it is important to understand the ‘problem’ that STP prevents and how it improves a LAN’s performance. Let’s go through some salient features of a LAN first.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;One of the most important devices within a LAN is a &lt;a href=&quot;https://www.firewall.cx/cisco/cisco-switches.html&quot; target=&quot;_blank&quot; title=&quot;network switches&quot;&gt;network switch&lt;/a&gt;. All standard switches are Layer 2 devices i.e. they work at the level of &lt;em&gt;frames.&lt;/em&gt; A &lt;a href=&quot;https://www.firewall.cx/networking/ethernet/ethernet-ii.html&quot; target=&quot;_blank&quot; title=&quot;Ethernet Frame&quot;&gt;frame&lt;/a&gt; is the unit of transmission in a link layer protocol and consists of a link-layer header followed by a packet. Without going into too much detail, a switch communicates in terms of frames. Users interested learning more about frames, can visit our &lt;a href=&quot;https://www.firewall.cx/networking/ethernet.html&quot; target=&quot;_blank&quot; title=&quot;Ethernet Frame Formats&quot;&gt;Ethernet Frame Formats&lt;/a&gt; section where they'll find plenty of useful information and 3D representations of the various Ethernet frames. Apart from the higher layer data encapsulated by the frame, it carries two other important pieces of information, the Source &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/mac-addresses.html&quot; target=&quot;_blank&quot; title=&quot;MAC Addresses&quot;&gt;MAC Address&lt;/a&gt; and the Destination &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/mac-addresses.html&quot; target=&quot;_blank&quot; title=&quot;MAC Addresses&quot;&gt;MAC Address&lt;/a&gt;. It’s important to make a note of this as it becomes vital in our understanding of how a switch works and for STP itself.&lt;/p&gt;
&lt;h2&gt;How Does A Switch Work?&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;It must be noted that, before starting on this tutorial, it is best to have an understanding of how a switch works. If not then all is not lost. Users can always look up existing switch principles covered under the &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/switches-bridges.html&quot; target=&quot;_blank&quot; title=&quot;Network Switches and Bridges&quot;&gt;Switches &amp;amp; Bridges&lt;/a&gt; article.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Understanding of the following topics is essential for STP:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How a switch finds &lt;a href=&quot;https://www.firewall.cx/networking/network-fundamentals/mac-addresses.html&quot; target=&quot;_blank&quot; title=&quot;MAC Address&quot;&gt;MAC Addresses&lt;/a&gt; of new hosts&lt;/li&gt;
&lt;li&gt;How a switch populates its MAC Address tables&lt;/li&gt;
&lt;li&gt;How a switch deals with an incoming frame when it doesn’t know which outgoing interface to switch it to (due to no entry for a destination MAC Address in the switching table)&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;If the above fundamental principles are clear, learning about STP becomes simple.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Within permissible limits it might be said that STP is introduced within the LAN to prevent complications and network related problems caused by the way a switch functions. The flaw does not lie with how a switch works, it lies with the repercussions and manifestations of traffic because of it. Now let us run through some of the major issues encountered within a LAN.&lt;/p&gt;
&lt;h2&gt;Switches &amp;amp; Redundant Links Challenges&lt;/h2&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Just like our lives, LANs becomes big and complicated and cater to a huge number of devices. To provide interconnectivity and redundancy, sometimes switches are connected between themselves to ensure data streams are always maintained between network hosts. In an ideal world, a simple network would only have a router, a switch, and ‘n’ number of hosts connected to that switch, depending on how big the switch is. But just like Utopia, this ideal world doesn’t exist and networks have multiple switches, and sometimes these switches have interconnections. It’s done to provide redundant paths to various parts of the network to which these switches provide connectivity.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;But by virtue of how a switch functions, there can be a few rather alarming issues cropping up very quickly when switches have more than one way of connecting various parts of the network. To visualise this concept, here’s a setup that has two hosts connected via two switches. For the sake of simplicity the router has been left out of this equation. Since STP is all about effective switching, let’s not involve ourselves in routing. The switching layout is, then, as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.firewall.cx/images/stories/spanning-tree-protocol-part1-1.jpg&quot; alt=&quot;spanning-tree-protocol-part1-1&quot; width=&quot;579&quot; height=&quot;176&quot; style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; title=&quot;Spanning Tree Protocol Basics - Redundant Network Links&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;To simplify this layout, please consider the following&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There are two switches, &lt;strong&gt;SW1&lt;/strong&gt; and &lt;strong&gt;SW2&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;There are two hosts, PC1 and PC2, connected to &lt;strong&gt;SW1&lt;/strong&gt; and &lt;strong&gt;SW2&lt;/strong&gt; respectively&lt;/li&gt;
&lt;li&gt;MAC Address of PC1 is PC1-MAC1 and that of PC2 is PC2-MAC2&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SW1&lt;/strong&gt; and &lt;strong&gt;SW2&lt;/strong&gt; are connected to each other via 2 links, &lt;strong&gt;LINK 1&lt;/strong&gt; and &lt;strong&gt;LINK 2&lt;/strong&gt;. These are redundant links&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;LINK1&lt;/strong&gt;, the interface used on &lt;strong&gt;SW1&lt;/strong&gt; is SW1-MAC1, and the interface used on SW2 is SW2-MAC1&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;LINK2&lt;/strong&gt;, the interface used on &lt;strong&gt;SW1&lt;/strong&gt; is SW1-MAC2, and the interface used on SW2 is SW2-MAC2&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Now let’s look at a condition where both switches have an empty MAC address table. PC1 sends out a frame whose destination is PC2. This frame reaches SW1. Right now SW1 does not know which interface to use to forward this frame to PC2, so it does a broadcast. By virtue of frame forwarding, the source address of this frame now changes. Since this broadcast will go out through both LINK 1 and 2, the outgoing broadcast frames will have different source addresses.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Let us consider the frame from SW1 going out on LINK 1. Its destination address still reads PC2-MAC2. But its source address now reads SW1-MAC1. When this frame reaches SW2, SW2 does not know which interface to use to forward this frame to PC2-MAC2, so it does a broadcast. By virtue of a broadcast from a switch, this frame will not go out on LINK 1 again. This broadcasted frame goes out to PC2 and also goes out on LINK 2. Once PC2 receives this broadcast, it acknowledges receipt and SW2 learns the interface to use to forward a frame whose destination MAC Address says PC2-MAC2. But what about the broadcast frame that went out on LINK 2? This now reaches SW1, and its destination MAC Address still reads PC2-MAC2. SW1, for the second time, does not know which interface to use to forward this frame. So guess what it does? It does a broadcast again, causing PC1 to receive a frame it sent out in the first case.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;So you see, an innocent frame that was destined for just one host on the other end of this simplified network, ended up with the host that sent it out in the first place. This is what is known as a broadcast storm. Now this process will keep on going till the network becomes congested with multiple duplicate frames, thus reducing its performance.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;This is not the only issue on this LAN. What happens in the background is that the MAC table within both switches becomes extremely unstable. This is caused by the effect of the frame with the same destination MAC Address approaching the two switches with different source MAC Address. Hence the MAC table on each switch keeps getting updated without achieving any stable state. Not to mention the fact that due to this broadcast storm the hosts keep receiving multiple duplicate frames.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;So to sum up, the issues encountered in the above situation are now made clear:&lt;/p&gt;
&lt;ul class=&quot;check&quot;&gt;
&lt;li&gt;
&lt;div&gt;Broadcast storm&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Unstable MAC Table in switches&lt;/li&gt;
&lt;li&gt;Multiple duplicate frames arriving at hosts&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;STP is aimed at resolving all the above issues. This is discussed in the &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html&quot; target=&quot;_blank&quot; title=&quot;Spanning Tree Protocol, Rapid STP Port Costs - Port States&quot;&gt;next tutorial&lt;/a&gt;, &lt;a href=&quot;https://www.firewall.cx/networking/network-protocols/spanning-tree-protocol/spanning-tree-protocol-port-costs-states.html&quot; title=&quot;Spanning Tree Protocol, Rapid STP Port Costs - Port States&quot;&gt;Spanning Tree Protocol, Rapid STP Port Costs - Port States&lt;/a&gt;, where we will start discovering the working principle of this protocol, along with some key features and associated terms.&lt;/p&gt;</content>
		<category term="Spanning Tree Protocol (STP)" />
	</entry>
</feed>
