{"id":77,"date":"2014-06-25T09:14:01","date_gmt":"2014-06-25T09:14:01","guid":{"rendered":"http:\/\/feralpacket.org\/?p=77"},"modified":"2015-01-03T11:17:58","modified_gmt":"2015-01-03T11:17:58","slug":"v5-written-and-lab-spanning-tree-protocol-notes","status":"publish","type":"post","link":"https:\/\/feralpacket.org\/?p=77","title":{"rendered":"v5 Written and Lab:  Spanning-Tree Protocol Notes"},"content":{"rendered":"<p><code>v5 Written:<br \/>\n2.1.f Implement and troubleshoot spanning-tree<br \/>\n2.1.f [i] PVST+ \/ RPVST+ \/ MST<br \/>\n2.1.f [ii] Switch priority, port priority, path cost, STP timers<br \/>\n2.1.f [iii] port fast, BPDUguard, BPDUfilter<br \/>\n2.1.f [iv] loopguard, rootguard<\/code><\/p>\n<p>v5 Lab:<br \/>\n1.1.f Implement and troubleshoot spanning-tree<br \/>\n1.1.f [i] PVST+ \/ RPVST+ \/ MST<br \/>\n1.1.f [ii] switch priority, port priority, path cost, STP timers<br \/>\n1.1.f [iii] port fast, BPDUguard, BPDUfilter<br \/>\n1.1.f [iv] loopguard, rootguard<\/p>\n<p>Documentation:<\/p>\n<p>Catalyst 3750-X and 3560-X Software Configuration Guide, Release 15.0(1)SE,<br \/>\nChapter 20 COnfiguing STP, pgs. 21-1 to 20-24<\/p>\n<p>Books:<\/p>\n<p>CCIE Routing and Switching Exam Certification Guide 4th Ed; Chapter 3: Spanning Tree<\/p>\n<p>Protocol, pgs. 63 &#8211; 103<\/p>\n<p>Cisco LAN Switching; Chapter 6: Understanding Spanning Tree, pgs. 153 &#8211; 200<\/p>\n<p>Cisco LAN Switching; Chapter 7: Advanced Spanning Tree, pgs. 201 &#8211; 290<\/p>\n<p>INE:<\/p>\n<p>Spanning-Tree Protocol (STP<br \/>\n&#8211; per-VLAN spanning-tree plus (PVST+), IEEE 802.1D<br \/>\n&#8211; rapid per-VLAN spanning-tree plus (rapid-PVST+), IEEE 802.1w<br \/>\n&#8211; Multiple Spanning Tree Protocol (MSTP)<br \/>\n&#8211; Layer 2 link management protocol that provides path redundancy while preventing loops in<\/p>\n<p>the network<br \/>\n&#8211; for a Layer 2 Ethernet network to function, only one active path can exist between any<\/p>\n<p>two stations<br \/>\n&#8211; multiple active paths cause loops in the network<br \/>\n&#8211; uses the spanning-tree algorithm to select one switch as the root of the spanning-tree<\/p>\n<p>Port roles<br \/>\n&#8211; root<br \/>\n&#8211; designated<br \/>\n&#8211; alternate<br \/>\n&#8211; backup<\/p>\n<p>Root port<br \/>\n&#8211; forwarding port<\/p>\n<p>Designated port<br \/>\n&#8211; forwarding port elected for every switched LAN segment<br \/>\n&#8211; the switch that has all ports as designated ports is the root switch<\/p>\n<p>Alternate port<br \/>\n&#8211; blocked port providing an alternate path to the root bridge<\/p>\n<p>Backup port<br \/>\n&#8211; blocked port in a loopback configuration<\/p>\n<p>STP forces redundant data paths into a standby (blocked) state<br \/>\n&#8211; if a network segment fails and a redundant path exists, the spanning-tree algorithm<\/p>\n<p>recalculates the spanning-tree topology and activates the standby path<\/p>\n<p>Bridge Protocol Data Units (BPDU)<br \/>\n&#8211; unique bridge ID of the root switch<br \/>\n&#8211; spanning-tree path cost to the root<br \/>\n&#8211; bridge ID of the sending switch<br \/>\n&#8211; message age<br \/>\n&#8211; identifier of the sending interface<br \/>\n&#8211; values for the hello, forward delay, and max-age protocol timers<\/p>\n<p>When two ports on a switch are part of a loop, the spanning-tree port priority and path<\/p>\n<p>cost settings control which port is put in forwarding state and which port is put in the<\/p>\n<p>blocking state<br \/>\n&#8211; the path cost value represents the media speed<\/p>\n<p>By default, the switch sends keepalive messages (to detect loopback conditions) only on<\/p>\n<p>interfaces that do not have SFP modules<\/p>\n<p>The spanning-tree topology is controlled by:<br \/>\n&#8211; unique bridge ID (switch priority and MAC address) associated with each VLAN<br \/>\n&#8211; spanning-tree path cost to the root switch<br \/>\n&#8211; the port identifier (port priority and MAC address) associated with each Layer 2<\/p>\n<p>interface<\/p>\n<p>If a switch receives a configuration BPDU that contains superior information (lower bridge<\/p>\n<p>ID, lower path cost, etc) it stores the information for that port<br \/>\n&#8211; if the BPDU was received on the root port, it is forwarded to every designated port<\/p>\n<p>If a switch receives a configuration BPDU that contains inferior information, the BPDU is<\/p>\n<p>discarded<\/p>\n<p>A BPDU exchange results in:<br \/>\n&#8211; one switch elected as the root switch (the logical center of the spanning-tree topology)<br \/>\n&#8211; a root port is selected for each switch (except the root switch)<br \/>\n&#8211; the shortest distance to the root switch is calculated for each switch<br \/>\n&#8211; a designated switch for each LAN segment is selected<\/p>\n<p>Each switch has a unique bridge ID<br \/>\n&#8211; 2 most-significant bytes are used for the switch priority<br \/>\n&#8211; the remaining 6 bytes are derived from the switch MAC address<\/p>\n<p>Cisco switches support the IEEE 802.1t spanning-tree extensions<\/p>\n<p>Spanning-tree interface states:<br \/>\n&#8211; blocking: the interface does not participate in frame forwarding<br \/>\n&#8211; listening: the first transition state after blocking<br \/>\n&#8211; learning: the interface prepares to participate in frame forwarding<br \/>\n&#8211; forwarding: the interface forwards frames<br \/>\n&#8211; disabled: the interface does not participate in spanning-tree<\/p>\n<p>The default switch priority is 32768<\/p>\n<p>When the spanning-tree topology is calculated based on default parameters, the path between<\/p>\n<p>source and destination end stations in a switched network might not be ideal<\/p>\n<p>IEEE 802.1D specifies 17 multicast addresses to be used by different dridbe protcols<br \/>\n&#8211; 0x00180C2000000 trhough 0x00180C2000010<br \/>\n&#8211; these are static addresses that cannot be removed<br \/>\n&#8211; regardless of the spanning-tree state, each switch in the stack receives but does not<\/p>\n<p>forward packets destined for the addresses between 0x180C2000000 and 0x00180C200000F<\/p>\n<p>&#8211; if spanning-tree is disabled, the switch forwards these packets as unknown multicast<\/p>\n<p>addresses<\/p>\n<p>PVST+<br \/>\n&#8211; IEEE 802.1D<br \/>\n&#8211; runs an spanning-tree instance for each VLAN<br \/>\n&#8211; uses an aging-timer<br \/>\n&#8211; limited to 128 spanning-tree instances<\/p>\n<p>rapid-PVST+<br \/>\n&#8211; IEEE 802.1w<br \/>\n&#8211; to provide rapid convergence, all dynamically learned MAC address entries are deleted<\/p>\n<p>when a topology change is received<br \/>\n&#8211; limited to 128 spanning-tree instances<\/p>\n<p>MSTP<br \/>\n&#8211; IEEE 802.1s<br \/>\n&#8211; can map multiple VLANs to the same spanning-tree instance<br \/>\n&#8211; runs on top of rapid-PVST+<br \/>\n&#8211; limited to 65 MST instances<br \/>\n&#8211; the number of VLANs that can be mapped to an MST instance is unlimited<\/p>\n<p>Cisco VLAN-bridge spanning-tree is used with the fallback bridging feature (bridge groups),<\/p>\n<p>which forwards non-IP protocols such as DECnet between two or more VLAN bridge domains or<\/p>\n<p>routed ports<br \/>\n&#8211; See Chp 51, Configuring Fallback Bridging<\/p>\n<p>Default Spanning-Tree configuration:<br \/>\n&#8211; enable state: enabled on VLAN 1<br \/>\n&#8211; spanning-tree mode: PVST+<br \/>\n&#8211; switch priority: 32768<br \/>\n&#8211; spanning-tree port priority: 128<br \/>\n&#8211; spanning-tree path cost: 1000Mb\/s &#8211; 4, 100Mb\/s &#8211; 19, 10 Mb\/s &#8211; 100<br \/>\n&#8211; spanning-tree VLAN port priority: 128<br \/>\n&#8211; spanning-tree VLAN path cost: 1000Mb\/s &#8211; 4, 100Mb\/s &#8211; 19, 10 Mb\/s &#8211; 100<br \/>\n&#8211; spanning-tree timers:<br \/>\n&#8211; hello time: 2 seconds<br \/>\n&#8211; forward-delay: 15 seconds<br \/>\n&#8211; maximum-aging time: 20 seconds<br \/>\n&#8211; transmit hold count: 6 BPDUs<\/p>\n<p>Switches that are not running spanning-tree still forward BPDUs that they receive so that<\/p>\n<p>the other switches on the VLAN that have a running spanning-tree instance can break loops<br \/>\n&#8211; spanning-tree must be running on enough switches to break all of the loops in the<\/p>\n<p>network<\/p>\n<p>conf t<br \/>\nspanning-tree mode { pvst | mst | rapid-pvst }<br \/>\nint fa0\/1<br \/>\nspanning-tree link-type point-to-point<\/p>\n<p>clear spanning-tree detected-protocols<br \/>\nshow spanning-tree summary<br \/>\nshow spanning-tree interface fa0\/1<br \/>\nshow spanning-tree vlan 1<br \/>\nshow spanning-tree detail<\/p>\n<p>spanning-tree vlan root primary<br \/>\n&#8211; sets the switch priority to 24576<\/p>\n<p>If the network contains switches that both support and do not support the extended system<\/p>\n<p>ID, it is unlikely that a switch with the extended system ID will become the root switch<\/p>\n<p>The root switch should be a backbone or distribution switch<br \/>\n&#8211; do not configure an access switch as the spanning-tree primary root<\/p>\n<p>Use the diameter keyword to specify the Layer 2 network diameter<br \/>\n&#8211; the maximum number of switch hops between any two end stations<br \/>\n&#8211; the switch changes the hello time, forward-delay time, and maximum-age timer<br \/>\n&#8211; can significantly reduce convergence time<\/p>\n<p>conf t<br \/>\nspanning-tree vlan root primary [ diameter &lt; 2 &#8211; 7 &gt; [ hello-time 1 &#8211; 10 ] ]<\/p>\n<p>show spanning-tree detail<\/p>\n<p>A switch configured as a secondary root sets the switch priority to 28672<\/p>\n<p>conf t<br \/>\nspanning-tree vlan root secondary [ diameter &lt; 2 &#8211; 7 &gt; [ hello-time 1 &#8211; 10 ] ]<\/p>\n<p>show spanning-tree detail<\/p>\n<p>If a loop occurs, spanning tree uses the port priority when selecting an interface to put<\/p>\n<p>into forwarding state<br \/>\n&#8211; higher priority values (lower numerical values)<br \/>\n&#8211; if all interfaces have the same priority, spanning tree puts the interface with the<\/p>\n<p>lowest interface number in the forwarding state and blocks all other interfaces<br \/>\n&#8211; range from 0 to 240, in increments of 16<br \/>\n&#8211; default priority is 128<br \/>\n&#8211; 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240<\/p>\n<p>conf t<br \/>\nint fa0\/1<br \/>\nspanning-tree port-priority<\/p>\n<p>conf t<br \/>\nint fa0\/1<br \/>\nspanning-tree vlan port-priority<\/p>\n<p>show spanning-tree interface fa0\/1<br \/>\nshow spanning-tree vlan<\/p>\n<p>The spanning-tree cost default value is derived from the media speed of an interface<br \/>\n&#8211; a lower path cost represents higher-speed transmission<\/p>\n<p>conf t<br \/>\nint fa0\/1<br \/>\nspanning-tree cost<\/p>\n<p>conf t<br \/>\nint fa0\/1<br \/>\nspanning-tree vlan cost<\/p>\n<p>show spanning-tree interface fa0\/1<br \/>\nshow spanning-tree vlan<\/p>\n<p>When configuring switch priority, it is recommended that the following commands are used<br \/>\n&#8211; spanning-tree vlan root primary<br \/>\n&#8211; spanning-tree vlan root secondary<br \/>\n&#8211; priority range is 0 to 61440, in increments of 4096<br \/>\n&#8211; 4096, 8297, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248,<\/p>\n<p>57344, 61440<\/p>\n<p>conf t<br \/>\nint fa0\/1<br \/>\nspanning-tree vlan priority<\/p>\n<p>show spanning-tree vlan<\/p>\n<p>Hello timer<br \/>\n&#8211; controls how often the switch broadcasts hello messages<br \/>\n&#8211; range is 1 to 10 seconds<br \/>\n&#8211; default is 2 seconds<\/p>\n<p>Forward-delay timer<br \/>\n&#8211; controls how long each of the listening and learning states last before the interface<\/p>\n<p>begins forwarding<br \/>\n&#8211; range is 4 to 30 seconds<br \/>\n&#8211; default is 15 seconds<\/p>\n<p>Maximum-age timer<br \/>\n&#8211; controls the amount of time the switch stores protocol information received on an<\/p>\n<p>interface<br \/>\n&#8211; range is 6 to 40 seconds<br \/>\n&#8211; default is 20 seconds<\/p>\n<p>conf t<br \/>\nspanning-tree vlan hello-time<\/p>\n<p>conf t<br \/>\nspanning-tree vlan forward-delay<\/p>\n<p>conf t<br \/>\nspanning-tree vlan max-age<\/p>\n<p>show spanning-tree vlan<\/p>\n<p>Changing transmit to a higher value can have a significant impact on CPU utilization<br \/>\n&#8211; especially in rapid-PVST+<br \/>\n&#8211; lowering the value can slow down convergence in certain scenarios<br \/>\n&#8211; range is 1 to 20<br \/>\n&#8211; default is 6<\/p>\n<p>conf t<br \/>\nspanning-tree transmit hold-count<\/p>\n<p>show spanning-tree detail<\/p>\n<p>show spanning-tree active<br \/>\nshow spanning-tree detail<br \/>\nshow spanning-tree interface fa0\/1<br \/>\nshow spanning-tree summary<br \/>\nshow spanning-tree summary totals<\/p>\n","protected":false},"excerpt":{"rendered":"<p>v5 Written: 2.1.f Implement and troubleshoot spanning-tree 2.1.f [i] PVST+ \/ RPVST+ \/ MST 2.1.f [ii] Switch priority, port priority, path cost, STP timers 2.1.f [iii] port fast, BPDUguard, BPDUfilter 2.1.f [iv] loopguard, rootguard v5 Lab: 1.1.f Implement and troubleshoot spanning-tree 1.1.f [i] PVST+ \/ RPVST+ \/ MST 1.1.f [ii] switch priority, port priority, path [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[30,11,15],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-ccie","tag-ccie","tag-route-switch","tag-stp"],"_links":{"self":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/77","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=77"}],"version-history":[{"count":2,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}