{"id":824,"date":"2021-08-20T03:09:34","date_gmt":"2021-08-20T03:09:34","guid":{"rendered":"http:\/\/feralpacket.org\/?p=824"},"modified":"2021-08-20T03:09:34","modified_gmt":"2021-08-20T03:09:34","slug":"spanning-tree-protocol-stp-notes","status":"publish","type":"post","link":"https:\/\/feralpacket.org\/?p=824","title":{"rendered":"Spanning Tree Protocol (STP) Notes"},"content":{"rendered":"<p><span style=\"font-weight: bold;\">Spanning Tree Protocol (STP)<\/span><\/p>\n<p>&nbsp;&#8211; 802.1D<\/p>\n<p>&nbsp;&#8211; Used to prevent loops while maintaining redundancy<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/f730367416293f87c14e6161cdcd3fb3.jpeg\" style=\"\" width=\"\" height=\"\"><\/p>\n<p>1. &nbsp;<span style=\"font-weight: bold;\">Reference Point<\/span><\/p>\n<p>&nbsp;&#8211; Root Bridge<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Priority<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; Lower is better<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Base MAC address<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; Lower is better<\/p>\n<p>&nbsp;&#8211; Priority<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 0 &#8211; 61440<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; Default is 32768<\/p>\n<p>2. &nbsp;<span style=\"font-weight: bold;\">Hello messages sent every 2 seconds to other switches<\/span><\/p>\n<p>&nbsp;&#8211; Bridge Protocol Data Unit (BPDU)<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Information about the root bridge<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; -&gt; Bridge-ID<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; -&gt; Timers<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Cost to reach the root bridge<\/p>\n<p>3. &nbsp;<span style=\"font-weight: bold;\">Cost is a property of the interface<\/span><\/p>\n<p>&nbsp;&#8211; 10 Mbps<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 100<\/p>\n<p>&nbsp;&#8211; 100 Mbps<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 19<\/p>\n<p>&nbsp;&#8211; 1 Gbps<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 4<\/p>\n<p>&nbsp;&#8211; 10 Gbps<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 2<\/p>\n<p>4. &nbsp;<span style=\"font-weight: bold;\">Port-id is a property of the interface<\/span><\/p>\n<p>&nbsp;&#8211; Port-priority + Interface-id<\/p>\n<p>&nbsp;&#8211; Port-priority<\/p>\n<p>&nbsp; &nbsp;&nbsp; -&gt; 8 bit variable<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 0 &#8211; 240<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Default is 128<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Changed in intervals of 16<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Lower is better<\/p>\n<p>&nbsp;&#8211; Interface-id<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; fa0\/5 == 5 (generally\u2026)<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Different on switch stacks<\/p>\n<p>5. &nbsp;<span style=\"font-weight: bold;\">Cost is incremented on every incoming port<\/span><\/p>\n<p>6. &nbsp;<span style=\"font-weight: bold;\">By default, the root bridge sends BPDU cost of 0<\/span><\/p>\n<p>7. &nbsp;<span style=\"font-weight: bold;\">Port Roles<\/span><\/p>\n<p>&nbsp;&#8211; Root port<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Upstream port having least cost route (path) towards the root bridge<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Forwarding port<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Does not send BPDUs<\/p>\n<p>&nbsp;&#8211; Designated port<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Downstream port, going further away from the root bridge<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Forwarding port<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Sends BDPUs<\/p>\n<p>&nbsp;&#8211; Non-Designated port<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Downstream port, but least desirable on a network segment<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Blocking port<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Still processes BPDUs<\/p>\n<p>8. &nbsp;<span style=\"font-weight: bold;\">Any port remaining after root port is selected is considered designated port by the switch<\/span><\/p>\n<p>9. &nbsp;<span style=\"font-weight: bold;\">If more than one designated port is on the same segment, only one can remain the designated port<\/span><\/p>\n<p>&nbsp;&#8211; Decided by <span style=\"font-weight: bold;\">STP Conflict Resolution Procedure (CRP)<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp;1. &nbsp;Root Bridge ID<\/p>\n<p>&nbsp; &nbsp; &nbsp;2. &nbsp;Least cost towards root bridge<\/p>\n<p>&nbsp; &nbsp; &nbsp;3. &nbsp;Sender Bridge-ID is compared with local Bridge-ID<\/p>\n<p>&nbsp; &nbsp; &nbsp;4. &nbsp;Sender\u2019s Port-ID is compared<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; Used when multiple ports are connected to the same switch<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/d83ce62a238ab974ad8101aca04e1e89.jpeg\" style=\"\" width=\"\" height=\"\"><\/p>\n<p><span style=\"font-weight: bold;\">STP Reconvergence (1st Scenario)<\/span><\/p>\n<p>&nbsp;&#8211; Direct link failure<\/p>\n<p>&nbsp; &nbsp; &nbsp;1. &nbsp;Listening state<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; 15 seconds (forwarding delay)<\/p>\n<p>&nbsp; &nbsp; &nbsp;2. &nbsp;Learning state<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; 15 seconds (forwarding delay)<\/p>\n<p>&nbsp; &nbsp; &nbsp;3. &nbsp;Forwarding state<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; After 30 seconds<\/p>\n<p><span style=\"font-weight: bold;\">STP Reconvergence (2nd Scenario)<\/span><\/p>\n<p>&nbsp;&#8211; Indirect link failure<\/p>\n<p>&nbsp;&#8211; Link between SW1 &amp; SW3 goes down<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; SW3 sends BPDUs to SW5 claiming to be the root bridge<\/p>\n<p>&nbsp; &nbsp; &nbsp;1. &nbsp;MAX AGE time<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; 20 seconds<\/p>\n<p>&nbsp; &nbsp; &nbsp;2. &nbsp;Listening state<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; 15 seconds (forwarding delay)<\/p>\n<p>&nbsp; &nbsp; &nbsp;3. &nbsp;Learning state<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; 15 seconds (forwarding delay)<\/p>\n<p>&nbsp; &nbsp; &nbsp;4. &nbsp;Forwarding state<\/p>\n<p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;-&gt; After 50 seconds<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spanning Tree Protocol (STP)<\/p>\n","protected":false},"author":1,"featured_media":822,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[31,61,15],"class_list":["post-824","post","type-post","status-publish","format-standard","hentry","category-ccie","tag-published","tag-spanning-tree","tag-stp"],"_links":{"self":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=824"}],"version-history":[{"count":1,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/824\/revisions"}],"predecessor-version":[{"id":975,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/824\/revisions\/975"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/media\/822"}],"wp:attachment":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}