Spanning Tree protocol- Chapter 5 CCNA Exploration Semester 3 Modified by Profs. Ward and Cappellino 1 Topics Redundancy in a converged network How Spanning Tree Protocol (STP) eliminates layer 2 loops The STP algorithm and its 3 steps Rapid spanning tree protocol 2 Semester 3 LAN Design Basic Switch Concepts VLANs VTP Wireless STP- Ch 5 Inter-VLAN routing 3 We want: Redundancy accomplished at the ____________________ _______________________ _______________________ What is redundancy? Multiple ________________ _________________ One link or device fails – another takes over. Redundancy allows flexibility but does have some challenges 4 Issues with Redundancy Multiple ___________________ Create problems when all the links are active: ____________________ _____________________ ____________________ See examples on following slides… 5 Broadcast storm 2. Flooda There’s broadcast switching loop through nonsource ports 1. Send ARP request B A 3. And so on with nothing to stop it C D 6 Duplicate Unicast Frame Transmissions B A is on port 3 Don’t know B So flood A Send frame to B C Frame arrives A B D And again 7 Loops by mistake Even if there are no deliberate loops for redundancy, there can be loops set up by mistake. For example, by improper or no labeling of cables in the wiring closet ____________ ____________ 8 Etherchannel – the exception EtherChannel is a grouping of Ethernet ports on a switch that ____________________ ____________________________ Multiple connections do not make a loop where Etherchannel is used. The _________________________________ with the combined bandwidth. 9 Redundancy without loops There needs to be just ________________ _________________________, but _______ _________________ when they are needed. This must be done quickly and automatically. ______________________ does this. A blocked port does not include bridge protocol data unit (BPDU) frames that are used by STP to prevent loops. 10 What is a spanning tree? A tree (extended star) topology A ______________________ Spanning all devices __________________________ Spanning tree is _____________ immediately __________________ _______________________ 11 Not a spanning tree Not a tree - it has loops. 12 Not a spanning tree Not spanning. Device left out. 13 Spanning tree No loops. Includes all devices. 14 Spanning tree protocol Used by switches to __________________ _________________________________ ________ unwanted links by _____________ STP defined by ________________ _____________ defined by _____________ Switches __________________ – ________________________________ 15 Spanning tree algorithm 1. 2. 3. The switches use this algorithm to configure the ports _______ ____________________ Choose ___________ to be “____________” Choose a “_______” on ______ _____________ closest to the root bridge Choose a “__________” which are all _______________ that are still ___________________________ ___________________________ _____________________ known as “non-designated” ports 16 Example of port designations Root bridge Designated port Root port Root port Designated port Root port Designated port Designated port Nondesignated port 17 1. Choose the Root Bridge Root bridge serves as a __________________ ____________________________ ______________ in the broadcast domain __________________________________ Each switch has a bridge ID (___) containing priority value, extended system ID, followed by the MAC address of the switch- more to come on BID … A switch starts up. It sends out BPDU frames more to come on BPDU … containing the switch BID and the root ID every 2 seconds. At first each switch identifies itself as the root bridge. 18 Choose the root bridge (cont…) ___________ Bridge Protocol Data Units (______) to _______________________ The switch with the __________________________ ________________________ As a switch receives a BPDU, it ___________________ ________________________________________ through which the BPDU was received. It passes on this information in its own BPDUs. Eventually all switches agree that the switch with the lowest BID is the root bridge. Administrator can set the priority to fix the selection 19 BPDU The _______________________________ ________________________________ The BPDU message is encapsulated in an Ethernet frame. The ______________ MAC address in the BPDU frame is a _________________ for the ___________________________ 20 BPDU Frame contains 12 fields: 2 bytes Protocol ID 1 byte Version 1 byte Message type 1 byte Flags 8 bytes Root ID 4 bytes Cost of path 8 bytes Bridge ID 2 bytes Port ID 2 bytes Message age 2 bytes Max age 2 bytes Hello time 2 bytes Forward delay Administrative uses BID and path information- used to identify the root bridge and the cost Timer fields used to determine how frequently BPDU messages are sent 21 Bridge ID Used to ______________________ on a network The bridge ID consists of: ____________________________ Lowest priority- ie. Lowest BID- becomes root bridge By default the priority is 32768 Value range is 1 - 65536 ___________________________________ Identifies the VLAN with which the BPDU is associated ________________________ MAC address used as ___________________________ MAC address with the lowest hexadecimal value has the lower BID Best to configure the desired root bridge and not count on MAC 22 address Configure priority Set a _____________________ if a specific switch is to become the root bridge Method 1: Method 2: SW1#spanning-tree vlan 1 root primary Sets value to 24576 or 4096 less than lowest priority detected. SW1#spanning-tree vlan 1 root secondary Sets value to 28672. This switch should become the root bridge if the primary root bridge fails. SW1#spanning-tree vlan 1 priority 24576 command gives more granular control over the bridge priority value by allowing the NA to configure the priority How would we verify bridge priority? 23 2. Select root ports After root bridge designation _________________________ _________________________________________________ __________________________ in the broadcast domain. Every non-root bridge (Switch) selects a root port Only _________________________________ This is the _____________________________ to the root bridge Path information is determined by _______________________ _________ along the path from the destination to the root bridge. What is cost?... 24 Finding the cost of a link Default port costs are defined by the speed at which the port operates Set by IEEE. Costs may change as newer, faster Ethernet is developed. Port cost is configurable by the NA Link speed 10 Gbps 1 Gbps 100 Mbps 10 Mbps Revised cost 2 4 19 100 Previous cost 1 1 10 100 25 Changing the cost of a link SW1(config)#int fa0/1 SW1(config-if)#spanning-tree cost 25 SW1(config-if)#end To revert back to default value use “no”… SW1(config)#int fa0/1 SW1(config-if)#no spanning-tree cost SW1(config-if)#end 26 What is the best path? In the example, the path cost from switch S2 to the root bridge switch S1, over path 1 is 19, while the path cost over path 2 is 38. Because path 1 has a lower overall path cost to the root bridge, it is the preferred path. STP then configures the redundant path to be blocked, preventing a loop from occurring. 27 What if root ports have the same cost? Switch uses the customizable port priority value. If those are the ____________? _____________________________ The port ID is ________________________________ port. This gives each port a unique number Example: by default F0/1 has port priority value of 128 and .1 as port ID giving: 128.1 F0/2 has 128.2 F0/1 would be the root port… F0/2 X F0/1 28 Configure port priority SW2(config-if)#spanning-tree port-priority 112 Priority values range from 0 - 240, in increments of 16. The ____________________________ ________________________ Becomes ________________________ ____________________________________ _____________________________ by STA to prevent looping 29 3. Select designated/nondesignated ports ____________ ports - All _______________ __________________________________ For _____ bridges, ______________________ ports. For ___________bridges, a designated port is the _______________________________________ ________________________ as needed. Only ___________________________________ ______________ ports - All ports configured to be in a _______________ to prevent loops 30 Select designated/nondesignated ports cont… If two switches are connected to the same LAN segment, which switch port will be the designated and which the non-designated port? Switches on the LAN segment in question exchange BPDU frames, which contain the switch BID. Lowest path cost to the root bridge will be the designated port. If _____________________? Switch with the ____________ has its port configured as a _______________________ Switch with the higher BID- non-designated port See example on next slide… 31 Example… 32 Summary of Port Roles STP makes: Root ports- forwarding Designated ports- forwarding Non-designated ports- shut down or blocked 33 Five Port states in traditional STP Blocking – _______________ BPDU frames. Nondesignated port which _________________ ___________________________________ Listening - ____________________ BPDU frames. Learning - _____________________ BPDU frames. _____________________ in preparation of participating in frame forwarding Forwarding – Fully active, _________________ Disabled – ___________________________ 34 States and timers Amount of time that a port stays in the various port states depends on the ___________ During a topology change A port temporarily _______________ _______________ ____________ for a specified period called the "forward delay interval.“ Possibly forward or remain in blocked state Up to ____________________ __________ again- full convergence 35 BPDU timers Timers are optimised for a 7-switch diameter network. _______________________________________ _______________________ to travel from the ________________ on the broadcast domain The network has __________________ before switches forward user data. Typically timers and the diameter should not be adjusted though they are configurable 36 Cisco PortFast An access port leading to a workstation or server does not need to go through the STP modes because it will not be closed down. If a switch is connected later and the port receives a BPDU, STP can put the port into a blocking state and then through the modes. The switch port can be configured with _____________ ____________________________________________ Feature called ______________________ To configure portfast, enter interface config mode for the port where portfast is going to be used and then the command: spanning-tree portfast 37 Verify spanning tree Root bridge This switch 38 Topology change notification (TCN) After the network converges, the root bridge sends out BPDUs, but the other switches do not normally send BPDUs back. If there is a ______________________________ ______________ called the topology change notification (________) ______________________ Each switch that receives the TCN sends an ____________________ and sends a TCN towards the root bridge until the root bridge receives it. The ____________________________ with the topology change (TC) bit set into the whole network 39 STP developments 40 PVST+ ________________ can be implemented. Separate instance of spanning tree runs for each VLAN 41 PVST+ cont… The VLAN needs to be identified, so each BID has 3 fields: Bridge Priority _____________________________________ MAC address. Original BID just had bridge priority and MAC address PVST+ is the default spanning-tree configuration for a Catalyst 2960 switch. 42 PVST+ cont… When the priority and extended system ID are prepended to the switch MAC address, each VLAN on the switch can be represented by a _________ 43 Rapid Spanning Tree Protocol __________________________________ with it. Much _____________________ ____________________________ 2 in version field indicates it is RSTP Sends BPDUs with its current information every 2 seconds. RSTP (IEEE 802.1w) is an evolution of STP (IEEE 802.1D) Does not use timers in the same way as STP 3 missed BPDUs taken to mean loss of the link. (6 seconds) _____________________________ RSTP does not have a __________________________ 44 _______________ in RSTP A port that will ______________________ __________________________ Immediately goes to forwarding state. Same idea as Cisco’s PortFast. An edge port becomes a normal spanningtree port if it receives a BPDU Configuring an edge port uses the PortFast keyword as before. spanning-tree portfast 45 Link types ___________ are categorized into 2 link types, ____________________________ A _________________ between two switches is regarded as a _________________ A link ____________________ is regarded as a ____________________ Ports on a ________________ are able to _________________________ Designated ports Make the most use of the link type parameter. 46 Port states • There are only _____________ in RSTP that correspond to the three possible operational states. • The 802.1D ________________ states are ________ into a unique 802.1w ________________________ Operational STP RSTP Enabled Blocking Discarding Enabled Listening Discarding Enabled Learning Learning Enabled Forwarding Forwarding Disabled Disabled Discarding 47 RSTP Port Roles ____ - A ___________ that has been elected for the spanning-tree topology _______________ - A ___________________ _________________ Alternate - An _______ ___________________ This path is different than using the root port. Backup - A ___________________ to a segment where ___________________ __________________ _________ - Not strictly part of STP, a network administrator can ___________________ 48 Design considerations Root bridge should be a ______________ in the ______________ of the network. ________ the number of _______________ Use VTP ____________. Use ________________________ _________________ even if no blocked ports or physical redundancy exist 49 Troubleshooting Suggestions Before you troubleshoot a bridging loop, you need to know at least these items: Topology of the bridge network Location of the root bridge Location of the blocked ports and the redundant links How the network looks when it works correctly Use the “_________” command as needed 50