Implementing Spanning Tree Protocol

Similar documents
Maintaining Specific VLAN Identification. Comparing ISL and 802.1Q. VLAN Trunking

STP (Spanning Tree Protocol) - Step by Step Configuration Tutorial

Configuring STP and RSTP

Spanning-Tree Protocol

Understanding and Configuring STP

Configuring Rapid PVST+

Describing the STP. Enhancements to STP. Configuring PortFast. Describing PortFast. Configuring. Verifying

Configuring STP and Prestandard IEEE 802.1s MST

Chapter 3 Lab 3-1, Spanning Tree Protocol (STP) Default Behavior

Spanning Tree Protocol

Transparent Bridging and VLAN

Buy full file at

Table of Contents. (Rapid) Spanning Tree Protocol. A simple bridge loop. An even worse bridge loop. Bridge loops Two bridges Three bridges (R)STP

Implement Spanning Tree Protocols-PART-I. LAN Switching and Wireless Chapter 5 Modified by Tony Chen 05/01/2008

Spanning Tree Protocol(STP)

The multiple spanning-tree (MST) implementation is based on the IEEE 802.1s standard.

Describing the STP. IEEE Documents. Download this file. Enhancements to STP. Download: PT-Topology-STP2.pkt STP

Describing the STP. 2003, Cisco Systems, Inc. All rights reserved. 2-1

Nexus 7000 Peer Switch Configuration (Hybrid Setup)

Table of Contents. (Rapid) Spanning Tree Protocol. An even worse bridge loop. A simple bridge loop. Bridge loops Two bridges Three bridges (R)STP

Configuring Spanning Tree Protocol

CCNA Semester 3 labs. Part 1 of 1 Labs for chapters 1 8

Spanning-Tree Protocol

EIGRP Features and Operation

Configuring Rapid PVST+ Using NX-OS

Spanning Tree Protocol, from a feature CCNA s Perspective.

Configuring STP. Understanding Spanning-Tree Features CHAPTER

RealCiscoLAB.com. Observe what happens when the default spanning tree behavior is modified.

Download: PT-Topology-STP2.pkt

CS IT. Lecture (06) STP (I) Problem statement. By: Dr. Ahmed ElShafee

Chapter 5. Spanning Tree Protocol (STP) Part I

RealCiscoLAB.com. Securing Spanning Tree Protocol. Topology. Objectives. Background. CCNPv6 SWITCH

The Spanning Tree 802.1D (2004) RSTP MSTP

Lecture (08) STP - CDP. Dr. Ahmed M. ElShafee CDP STP. tweak this simple design to make it more resilient by adding

Configuring Spanning Tree Protocol

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

Configuring Rapid PVST+

Question No : 1 Which three of these statements regarding 802.1Q trunking are correct? (Choose three.)

Objectives. 1. Introduction:

Document ID: Contents. Introduction. Prerequisites. Requirements. Components Used. Conventions. Background Information.

CHAPTER 1 Introduction to Scaling Networks

Chapter 5: STP. * What is STP? How does STP work?

Configuring Optional STP Features

Bridging Transmitting Non-IP Traffic or Merging Two Networks

CCNA Semester 3 labs. Labs for chapters 2 10

Lab 5.5.2: Challenge Spanning Tree Protocol

3. INTERCONNECTING NETWORKS WITH SWITCHES. THE SPANNING TREE PROTOCOL (STP)

Agenda. Spanning-Tree Protocol. Spanning Tree Protocol (STP) Introduction Details Convergence Some more details

Copyright 2014 CertificationKits LLC. All Rights Reserved. 2

Understanding Issues Related to Inter VLAN Bridging

Spanning-Tree Protocol

LAN Troubleshooting. Ethernet Troubleshooting

material. For more information on how to get additional questions, please see

Top-Down Network Design, Ch. 7: Selecting Switching and Routing Protocols. Top-Down Network Design. Selecting Switching and Routing Protocols

Lab 8-2 Securing Spanning Tree Protocol

Chapter 3 Lab 3-3, Per-VLAN Spanning Tree Behavior

CCNA Cisco Certified Network Associate CCNA (v3.0)

The following graphic shows a single switch VLAN configuration.

Implement Spanning Tree Protocols PART-II. LAN Switching and Wireless Chapter 5 Modified by Tony Chen 07/01/2009

Packet Switching on L2 (LAN Level)

PrepKing. PrepKing

Configuring Spanning Tree

CCNP Bootcamp. Introduction

2.2 Cisco IOS Commands for the Catalyst 4500 Series Switches snmp ifindex clear. This command has no arguments or keywords.

Packet Switching on L2 (LAN Level)

RealCiscoLAB.com. Observe the behavior of a separate spanning tree instance per VLAN. Change spanning tree mode to rapid spanning tree.

RealCiscoLAB.com. Multiple Spanning Tree. Topology. Objective. Background. CCNPv6 SWITCH. Observe the behavior of multiple spanning tree (MST).

isco Understanding Spanning Tree Protocol Topology Chan

Cisco 4-Port and 8-Port Layer 2 Gigabit EtherSwitch Network Interface Module Configuration Guide for Cisco 4000 Series ISR

Chapter 5. Spanning Tree Protocol (STP) Part II

CIS 83 Lab Assignment

Advanced Computer Networks

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Configuring MST Using Cisco NX-OS

CCNA 3 (v v6.0) Chapter 3 Exam Answers % Full

Catalyst Switch Operations. 2000, Cisco Systems, Inc. 6-1

Chapter 1 Introduction to Scaling Networks

Configuring Optional STP Features

CCIE Foundation. WorkBooks.com. Narbik Kocharians CCIE #12410 R&S, Security, SP. 3550/3560 Switching. Answers

Chapter 2: Layer 2 Technologies

Campus Networking Workshop. Layer 2 engineering Spanning Tree and VLANs

Cisco Exam Interconnecting Cisco Networking Devices Part 2 Version: 10.0 [ Total Questions: 149 ]

Layer 2 Engineering Spanning Tree

Lab 3-2 Modifying Default Spanning Tree Behavior

Implement Spanning Tree Protocols. LAN Switching and Wireless Chapter 5

Managing Network Spanning Trees

CIS 83 Midterm Spring 2004 Answer Sheet Name Score Grade Question Answer Question Answer

Configuring VLANs. Understanding VLANs CHAPTER

Troubleshooting Transparent Bridging Environments

CSCI Computer Networks

Token Ring VLANs and Related Protocols

CS Networks and Distributed Systems. Lecture 5: Bridging. Revised 1/14/13

itexamdump 최고이자최신인 IT 인증시험덤프 일년무료업데이트서비스제공

Chapter 4 Lab 4-2 Multiple Spanning Tree INSTRUCTOR VERSION

Configuring VLANs. Understanding VLANs CHAPTER

Improving network convergence with Multiple Spanning Tree Protocol

Why Packet Switching on LAN? Packet Switching on L2 (LAN Level) Bridge / Router. Agenda

Configuring Port-Based Traffic Control

LAB. Spanning Tree Protocol

CCNA Routing & Switching Lab Workbook - Full-Scale Lab 1

Transcription:

Transparent Bridging Implementing Spanning Tree Protocol A switch has the same characteristics as a transparent bridge., Cisco Systems, Inc. All rights reserved. 2-1, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-2 Redundant Topology Broadcast Storms Server/host X Router Y Server/host X Router Y Segment 1 Segment 1 Broadcast Switch A Switch B Segment 2 Redundant topology eliminates single points of failure Redundant topology causes broadcast storms, multiple frame copies, and MAC address table instability problems Host X sends a Broadcast Segment 2, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-3, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-4

Broadcast Storms Broadcast Storms Server/host X Router Y Server/host X Router Y Segment 1 Segment 1 Broadcast Switch A Switch B Switch A Broadcast Switch B Segment 2 Segment 2 Host X sends a Broadcast Switches continue to propagate broadcast traffic over and over, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-5, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-6 Multiple Frame Copies Multiple Frame Copies Server/host X Unicast Router Y Segment 1 Server/host X Unicast Unicast Router Y Segment 1 Unicast Switch A Switch B Switch A Switch B Segment 2 Host X sends an unicast frame to router Y Router Y MAC address has not been learned by either switch yet, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-7 Segment 2 Host X sends an unicast frame to Router Y Router Y MAC Address has not been learned by either Switch yet Router Y will receive two copies of the same frame, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-8

MAC Database Instability MAC Database Instability Server/host X Router Y Server/host X Router Y Unicast Segment 1 Unicast Unicast Segment 1 Unicast Port Port Port Port Switch A Switch B Switch A Switch B Port 1 Port 1 Port 1 Port 1 Segment 2 Segment 2 Host X sends an unicast frame to Router Y Router Y MAC Address has not been learned by either Switch yet Switch A and B learn Host X MAC address on port Host X sends an unicast frame to Router Y Router Y MAC Address has not been learned by either Switch yet Switch A and B learn Host X MAC address on port Frame to Router Y is flooded Switch A and B incorrectly learn Host X MAC address on port 1, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-9, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-1 Preventing Bridging Loops Spanning Tree Algorithm (STA) Part of 82.1d standard Simple principle: Build a loop-free tree from some identified point known as the root. Redundant paths allowed, but only one active path. Developed by Radia Perlman Bridging loops can be prevented by disabling the redundant path., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-11, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-12

The Spanning Tree Algorhyme by Radia Perlman Bridge Protocol Data Unit I think that I shall never see A graph more lovely than a tree. First, the root must be selected. By ID, it is elected. A tree whose crucial property Is loop-free connectivity. A tree that must be sure to span. So packets can reach every LAN. Least cost paths from root are traced. In the tree, these paths are placed. A mesh is made by folks like me, Then bridges find a spanning tree. s provide for the exchange of information between switches., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-13, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-14 Selection The STP Reference point One root per VLAN Maintains topology Propagates timers, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-15, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-16

Extended System ID in Bridge ID Field Bridge ID (BID) Bridge ID Without the Extended System ID Bridge ID with the Extended System ID Each switch has a unique BID. Original 82.1D standard, the BID = Priority Field +MAC address of the switch. All VLANs were represented by a CST one spanning tree for all vlans (later). PVST requires that a separate instance of spanning tree run for each VLAN BID field is required to carry VLAN ID (VID). Extended system ID to carry a VID., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-17, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-18 82.1D 16-bit Bridge Priority Field Using the Extended System ID What is the Priority of Access1? Only four high-order bits of the 16-bit Bridge Priority field carry actual priority. Therefore, priority can be incremented only in steps of 496, onto which will be added the VLAN number. Example: For VLAN 11: If the priority is left at default, the 16-bit Priority field will hold 32768 + 11 = 32779. 2 15 4 bits 12 bits Priority VLAN Number Priority Values (Hex) Priority Values (Dec) 1 496 2 82.... 8 (default) 32768.... F 6144 2, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-2

Spanning Tree Protocol Selection Spanning-Tree Operation One root bridge per network One root port per nonroot bridge One designated port per segment Nondesignated ports are blocked Which switch has the lowest bridge ID?, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-21, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-22 Four-Step Spanning-Tree Decision Process Spanning Tree Port States Spanning tree transitions each port through several different states. Lowest root BID Lowest path cost to root bridge Lowest sender BID Lowest port ID, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-24

STP Timers STP Timers Hello Time IEEE specifies default of 2 seconds. The interval between Configuration s. The Hello Time value configured at the root bridge determines the Hello Time for all nonroot switches. Locally configured Hello Time is used for the TCN., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-25, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-26 STP Timers STP Timers Forward Delay Timer The default value of the forward delay (15 seconds) Originally derived assuming a maximum network size of seven bridge hops A maximum of three lost s, and a hello-time interval of 2 seconds. See LAN Switching, by Clark, or other resources for this calculation Forward delay is used to determine the length of: Listening state Learning state Max Age Timer Max Age is the time that a bridge stores a before discarding it. Each port saves a copy of the best it has received. If the device sending this best fails, it may take 2 seconds before a switch transitions the connected port to Listening., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-27, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-28

STP Timers Local Switch Root Port Election Modifying Timers Do not change the default timer values without careful consideration. Cisco recommends to modify the STP timers only on the root bridge The s pass these values from the root bridge to all other bridges in the network. It can take 3-5 seconds for a switch to adjust to a change in topology. Switch(config)# spanning-tree vlan vlan-id [forward-time seconds hello-time hello-time max-age seconds priority priority protocol protocol {root {primary secondary} [diameter net-diameter [hello-time hellotime]]}], Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-29, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-3 Spanning-Tree Path Cost Spanning Tree Protocol Root Port Selection Fast Ethernet Ethernet SW X is the root bridge SW Y needs to elect a root port Which port is the root port on SW Y? FastEthernet total cost = + Ethernet total cost = + 1, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-31, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-32

Spanning Tree Protocol Designated Port Selection STP Selection Example DP Fast Ethernet DP Ethernet Switch X is the root bridge. All ports on the root bridge are designated ports. Do all segments have a designated port? Which bridge will be the root bridge?, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-33, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-34 STP Root Port Selection Example STP Designated Port Selection Example Which ports will be root ports? Which port becomes the designated port on segment 3?, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-35, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-36

Example: Layer 2 Topology Negotiation FYI: key concepts key concepts: Bridges save a copy of only the best seen on every port. When making this evaluation, it considers all of the s received on the port, as well as the that would be sent on that port. As every arrives, it is checked against this five-step sequence to see if it is more attractive (lower in value) than the existing saved for that port. Only the lowest value is saved. Bridges send configuration s until a more attractive is received. Okay, lets see how this is used..., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-37, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-38 Elect one Lowest BID wins! Who wins? Case Study, Cisco Systems, Inc. All rights reserved. 2-39, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-4

What is the BID of this switch? Who is the Root? What is the BID of this switch? Who is the Root? Use this command to view the information on the other four switch., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-41, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-42 What is the BID of this switch? Who is the Root? What is the BID of this switch? Who is the Root?, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-43, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-44

What is the BID of this switch? Who is the Root? Elect one Lowest BID wins! My BID is 32768.1.C945.A573 Who wins? My BID is 32768.5.5ED.9315 My BID is 32768.6.47B.585 My BID is 32768.3.E461.46EC My BID is 32768.1.964E.7EBB I win!, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-45, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-46 Elect one Lowest BID wins! s Its all done with s! 82.3 Header Destination: 1:8:C2::: Mcast 82.1d Bridge group Source: :D:C:F5:18:D1 LLC Length: 38 82.2 Logical Link Control (LLC) Header Dest. SAP: x42 82.1 Bridge Spanning Tree Source SAP: x42 82.1 Bridge Spanning Tree Command: x3 Unnumbered Information 82.1 - Bridge Spanning Tree Protocol Identifier: Protocol Version ID: Message Type: Configuration Message Flags: % Root Priority/ID: x8/ :D:C:F5:18:C Cost Of Path To Root: x () Bridge Priority/ID: x8/ :D:C:F5:18:C Port Priority/ID: x8/ x1d Message Age: /256 seconds (exactly seconds) Maximum Age: 512/256 seconds (exactly 2 seconds) Hello Time: 512/256 seconds (exactly 2 seconds) Forward Delay: 384/256 seconds (exactly 15 seconds), Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-47 s sent/relayed every two seconds., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-48

Selection Criteria Elect one Lowest BID wins! My BID is 32768.1.C945.A573 I m the root! My BID is 32768.5.5ED.9315 I m the root! Who wins? My BID is 32768.6.47B.585 I m the root! My BID is 32768.3.E461.46EC I m the root! My BID is 32768.1.964E.7EBB I m the root! I win! At the beginning, all bridges assume and declare themselves as the Root Bridge, by placing its own BID in the Root BID field of the., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-49, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-5 Once all of the switches see that Access2 has the lowest BID, they are all in agreement that Access2 is the. Elect Root Ports STP Convergence Step 1 Elect one Step 2 Elect Root Ports Step 3 Elect Designated Ports I will select one Root Port that is closest, best path to the root bridge. Root Bridge, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-51 Now that the Root War has been won, switches move on to selecting Root Ports. A bridge s Root Port is the port closest to the. Bridges use the cost to determine closeness. Every non- will select one Root Port! Specifically, bridges track the Root Path Cost, the cumulative cost of all links to the., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-52

Determining (Electing) the Root Port, Access2 sends out s, containing a Root Path Cost of. Access1, Distribution1, and Distribution2 receives these s and adds the Path Cost of the FastEthernet interface to the Root Path Cost contained in the. Access1, Distribution1, and Distribution2 add Root Path Cost PLUS its Path (port) cost of =. This value is used internally and used in s to other switches. Path Cost Cost=+= Cost=+= Root Bridge Cost=+= Cost=, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-53, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-54 Difference b/t Path Cost and Root Path Cost Path Cost: The value assigned to each port. Added to s received on that port to calculate Root Path Cost. Root Path Cost Cumulative cost to the. This is the value transmitted in the. Calculated by adding the receiving port s Path Cost to the valued contained in the. What are the Path Costs for Access2? Path Cost Access2# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 1.964E.7EBB This bridge is the root Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Cost=+= Cost=+= Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 1.964E.7EBB Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 2 Cost=+= Cost= Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- ---------------------- - Fa/1 Desg FWD 128.1 P2p Fa/3 Desg FWD 128.3 P2p Fa/5 Desg FWD 128.5 P2p, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-55, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-56

What are the Path Costs for Distribution1? What are the Path Costs for Access1? Distribution1# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 1.964E.7EBB Cost Port 3(FastEthernet/3) Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 5.5ED.9315 Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 2 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------- -- Gi/1 Desg FWD 4 128.25 P2p Gi/2 Altn BLK 4 128.26 P2p Fa/3 Root FWD 128.3 P2p Fa/5 Desg FWD 128.5 P2p, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-57 What are the Path Costs for Distribution2? Distribution2# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 1.964E.7EBB Cost Port 3(FastEthernet/3) Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 6.47B.585 Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 2 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------- Fa/3 Root FWD 128.3 P2p Fa/5 Altn BLK 128.5 P2p Gi/1 Altn BLK 4 128.25 P2p Gi/2 Desg FWD 4 128.26 P2p Access1# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 1.964E.7EBB Cost Port 5(FastEthernet/5) Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 3.E461.46EC Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 2 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------- Fa/5 Root FWD 128.5 P2p Gi1/1 Desg FWD 4 128.25 P2p Gi1/2 Desg FWD 4 128.26 P2p, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-58 show spanning-tree detail Use this command to view the Path Cost of an interface. Distribution1# show spanning-tree detail VLAN1 is executing the ieee compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 5.5ED.9315 Configured hello time 2, max age 2, forward delay 15 Current root has priority 32769 Root port is 3 (FastEthernet/3), cost of root path is Topology change flag not set, detected flag not set Number of topology changes last change occurred :: ago from FastEthernet/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 2, forward delay 15 Timers: hello, topology change, notification, aging 3, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-59, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-6

show spanning-tree detail Use this command to view the Path Cost of an interface. show spanning-tree detail Use this command to view the Path Cost of an interface. Access1# show spanning-tree detail VLAN1 is executing the ieee compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 3.E461.46EC Configured hello time 2, max age 2, forward delay 15 Current root has priority 32769 Root port is 5 (FastEthernet/5), cost of root path is Topology change flag not set, detected flag not set Number of topology changes last change occurred :: ago from FastEthernet/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 2, forward delay 15 Timers: hello, topology change, notification, aging 3 Distribution2# show spanning-tree detail VLAN1 is executing the ieee compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 6.47B.585 Configured hello time 2, max age 2, forward delay 15 Current root has priority 32769 Root port is 3 (FastEthernet/3), cost of root path is Topology change flag not set, detected flag not set Number of topology changes last change occurred :: ago from FastEthernet/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 2, forward delay 15 Timers: hello, topology change, notification, aging 3, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-61, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-62 show spanning-tree detail Use this command to view the Path Cost of an interface. Switches now send s with their Root Path Cost out other interfaces. Access 1 uses this value of internally and sends s with a Root Path Cost of out all other ports. (For simplicity we will not include to root.) Switches receive and add their path cost. Note: STP costs are incremented as s are received on a port, not as they are sent out a port. Access2# show spanning-tree detail VLAN1 is executing the ieee compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 1.964E.7EBB Configured hello time 2, max age 2, forward delay 15 Current root has priority 32769 Topology change flag not set, detected flag not set Number of topology changes last change occurred :: ago from FastEthernet/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 2, forward delay 15 Timers: hello, topology change, notification, aging 3 No Root port This switch is the! Cost=4+= Cost= Cost= Cost=4+=, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-63, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-64

Distribution 1 and Distribution 2 receive the s from Access 1, and adds the Path Cost of 4 to those interfaces, giving a Root Path Cost of. However, both of these switches already have an internal Root Path Cost of that was received on another interface. (Fa/3 for each with a Root Path Cost of.) Distribution 1 and Distribution 2 use the better of when sending out their s to other switches. Distribution 1 now sends s with its Root Path Cost out other interfaces. Again, STP costs are incremented as s are received on a port, not as they are sent out a port. Cost=4+= Cost=4+= Cost=4+= Cost= Cost=+=38 Cost= Cost= Cost=4+=, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-65, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-66 Final Results Ports show Received Root Path Cost + Path Cost = Root Path Cost of Interface, after the best is received on that port from the neighboring switch. This is the cost of reaching the from this interface towards the neighboring switch. Now let s see how this is used! show spanning-tree Which port is the Root Port? +4= +4=27 +4= +4=27 Core# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 1.964E.7EBB Cost 4 Port 25(GigabitEthernet/1) Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec +4= +=38 +=38 +4= Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 1.C945.A573 Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 2 +4= +4= Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Gi/1 Root FWD 4 128.25 P2p Gi/2 Altn BLK 4 128.26 P2p, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-67, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-68

show spanning-tree detail Path Cost Which port is the Root Port? Core# show spanning-tree detail VLAN1 is executing the ieee compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 1.C945.A573 Configured hello time 2, max age 2, forward delay 15 Current root has priority 32769 Root port is 25 (GigabitEthernet/1), cost of root path is 4 Topology change flag not set, detected flag not set Number of topology changes last change occurred :: ago from FastEthernet/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 2, forward delay 15 Timers: hello, topology change, notification, aging 3, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-69, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-7 Elect Root Ports: This is from the switch s perspective. Switch, What is my cost to the? Later we will look at Designated Ports, which is from the Segment s perspective. Distribution 1 thought process If I go through Core it costs 27. If I go through D2 it costs 38. If I go through A1 it costs. If I go through A2 it costs. This is the best path to the Root!, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-71, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-72

Elect Root Ports Every non-root bridge must select one Root Port. A bridge s Root Port is the port closest to the. Bridges use the Root Path Cost to determine closeness.?? Elect Root Ports Core switch has two equal Root Path Costs to the. In this case we need to look at the fivestep decision process.?? Five-Step decision Sequence Step 1 - Lowest BID Step 2 - Lowest Path Cost to Step 3 - Lowest Sender BID Step 4 - Lowest Port Priority Step 5 - Lowest Port ID 27 27 27 27 38 38 38 38, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-73, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-74 Elect Root Ports Distribution 1 switch has a lower Sender BID than Distribution 2. Core chooses the Root Port of G /1. My BID is 32768.5.5ED.9315 Lower BID 27 38?? Five-Step decision Sequence Step 1 - Lowest BID Step 2 - Lowest Path Cost to Step 3 - Lowest Sender BID Step 4 - Lowest Port Priority Step 5 - Lowest Port ID, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-75 27 38 My BID is 32768.6.47B.585 Elect Designated Ports STP Convergence Step 1 Elect one Step 2 Elect Root Ports Step 3 Elect Designated Ports The loop prevention part of STP becomes evident during this step, electing designated ports. A Designated Port functions as the single bridge port that both sends and receives traffic to and from that segment and the. Each segment in a bridged network has one Designated Port, chosen based on cumulative Root Path Cost to the. The switch containing the Designated Port is referred to as the Designated Bridge for that segment. To locate Designated Ports, lets take a look at each segment. Segment s perspective: From a device on this segment, Which switch should I go through to reach the? Root Path Cost, the cumulative cost of all links to the. Obviously, the segment has not ability to make this decision, so the perspective and the decision is that of the switches on that segment., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-76

A Designated Port is elected for every segment. The Designated Port is the only port that sends and receives traffic to/from that segment to the, the best port towards the root bridge. Note: The Root Path Cost shows the Sent Root Path Cost. This is the advertised cost in the, by this switch out that interface, i.e. this is the cost of reaching the through me! A Designated Port is elected for every segment. Segment s perspective: From a device on this segment, Which switch should I go through to reach the? I ll decide using the advertised Root Path Cost from each switch!????????, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-77, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-78 Segment s perspective: Access 2 has a Root Path Cost = (after all it is the ) and Access 1 has a Root Path Cost =. Because Access 2 has the lower Root Path Cost it becomes the Designated Port for that segment. Segment s perspective: The same occurs between Access 2 and Distribution,1 and Access 2 and Distribution 2 switches. Because Access 2 has the lower Root Path Cost it becomes the Designated Port for those segments. My designated What is port my best will be via Access path to 2 the (Fa/5). Root It s the best Bridge, path, lowest via Root Path, to Access the Root 1 or Bridge. via Access 2???? DP DP DP DP, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-79, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-8

Segment s perspective: Segment between Distribution 1 and Access 1 has two equal Root Path Costs of. Using the Lowest Sender ID (first two steps are equal), Access 1 becomes the best path and the Designated Port. Five-Step decision Sequence Step 1 - Lowest BID Step 2 - Lowest Path Cost to Step 3 - Lowest Sender BID Step 4 - Lowest Port Priority Step 5 - Lowest Port ID Access 1 has Lower Sender BID 32768.5.5ED.9315? DP 32768.3.E461.46EC Lower BID What is my best path to the Root Bridge, via Distribution 1 or via Access 1? They are the same! Who has the lowest BID? DP DP DP, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-81, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-82 32768.5.5ED.9315 32768.6.47B.585 Lower BID DP? DP DP DP, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-83, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-84

, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-85, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-86, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-87, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-88

Port Cost/Port ID Five-Step decision Sequence Step 1 - Lowest BID Step 2 - Lowest Path Cost to Step 3 - Lowest Sender BID Step 4 - Lowest Port Priority Step 5 - Lowest Port ID /2 /1 Assume path cost and port priorities are default (32). Port ID used in this case. Port /1 would forward because it s the lowest. If the path cost and bridge IDs are equal (as in the case of parallel links), the switch goes to the port priority as a tiebreaker. Lowest port priority wins (all ports set to 32). You can set the priority from 63. If all ports have the same priority, the port with the lowest port number forwards frames., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-89, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-9 Port Cost/Port ID Distribution1# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 9.7cb.e7c Cost Port 3 (FastEthernet/3) Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address b.fd13.98 Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 3 Interface Port ID Designated Port ID Name Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr ---------------- -------- --------- --- --------- -------------------- -------- Fa/1 128.1 BLK 32769 b.befa.eec 128.1 Fa/2 128.2 BLK 32769 b.befa.eec 128.2 Fa/3 128.3 FWD 32769 9.7cb.e7c 128.1 Fa/4 128.4 BLK 32769 9.7cb.e7c 128.2 Fa/5 128.5 FWD 32769 b.fd13.98 128.5 Gi/1 128.25 4 FWD 32769 b.fd13.98 128.25, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-91, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-92

PVST+ (More later) Distribution1 is the Root for VLAN1 and 1 Per VLAN Spanning Tree Plus (PVST+) maintains a separate spanning-tree instance for each VLAN. PVST Only over ISL PVST+ Includes ISL and 82.1Q Provides for load balancing on a per- VLAN basis. Switches maintain one instance of spanning tree for each VLAN allowed on the trunks. Non-Cisco 82.1Q switches maintain only one instance of spanning tree for all VLANs allowed on the trunks. Root VLANs 1,1 Distribution1(config)# spanning-tree vlan 1, 1 root primary Distribution2(config)# spanning-tree vlan 2 root primary, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-93, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-94 Distribution2 is the Root for VLAN 2 Load Balancing with 2 Root Switches Notice that more links are being used! Root VLAN 2 Root VLANs 1,1 Root VLAN 2, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-95, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-96

STP Convergence: Summary STP Convergence: Summary Recall that switches go through three steps for their initial convergence: STP Convergence Step 1 Elect one Step 2 Elect Root Ports Step 3 Elect Designated Ports Also, all STP decisions are based on a the following predetermined sequence: Five-Step decision Sequence Step 1 - Lowest BID Step 2 - Lowest Path Cost to Step 3 - Lowest Sender BID Step 4 Lowest Port Priority Step 5 - Lowest Port ID Example: A network that contains 15 switches and 146 segments (every switchport is a unique segment) would result in: 1 14 Root Ports 146 Designated Ports, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-97, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-98 Configuring the Configuring the Switch(config)#spanning-tree vlan 1 root primary This command forces this switch to be the root. Switch(config)#spanning-tree vlan 1 root secondary This command configures this switch to be the secondary root. Or Switch(config)#spanning-tree vlan 1 priority priority This command statically configures the priority (in increments of 496). Switch(config)# spanning-tree vlan 1 priority priority This command statically configures the priority (in multiples of 496). Valid values are from to 61,44. Default is 32768. Lowest values becomes., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-99, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-1

Configuring the Configuring the Switch(config)# spanning-tree vlan 1 root primary This command forces this switch to be the root. The spanning-tree root primary command alters this switch's bridge priority to 24,576. If the current root has bridge priority which is more than 24,576, then the current is changed to 4,96 less than of the current root bridge. Switch(config)# spanning-tree vlan 1 root secondary This command configures this switch to be the secondary root in case the root bridge fails. The spanning-tree root secondary command alters this switch's bridge priority to 28,672. If the root switch should fail, this switch becomes the next root switch., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-11, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-12 Change the root bridge Change the root bridge Core(config)# spanning-tree vlan 1-3 root primary Distribution1(config)# spanning-tree vlan 1-3 root secondary Notice the change. Befor e After Current Root Bridge Modify the topology so that the Core switch is the root bridge and Distribution1 is the secondary root bridge for VLAN 1., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-13, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-14

Verify changes Core# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 1.C945.A573 This bridge is the root Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Bridge ID Priority 24577 (priority 24576 sys-id-ext 1) Address 1.C945.A573 Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 2 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- ---------------------- Gi/1 Desg FWD 4 128.25 P2p Gi/2 Desg FWD 4 128.26 P2p Verify changes Distribution2# show spanning-tree VLAN1 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 1.C945.A573 Cost 4 Port 26(GigabitEthernet/2) Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 6.47B.585 Hello Time 2 sec Max Age 2 sec Forward Delay 15 sec Aging Time 2 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa/3 Desg FWD 128.3 P2p Fa/5 Altn BLK 128.5 P2p Gi/1 Desg FWD 4 128.25 P2p Gi/2 Root FWD 4 128.26 P2p, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-15, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-16 Topology Change Notification s TCNs: Direct Topology Change Direct Topology Changes Is a change that can be detected on a switch interface. Insignificant Topology Changes A users PC causes the link to go up or down (normal booting or shutdown process)., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-17 When a bridge needs to signal a topology change, it starts to send TCNs on its root port. Switch A detects link down. Removes best from Root Port (this port is the best path to the ) Can t send TCN out root port to Root bridge. Without Uplinkfast (coming) Switch A not aware of another path to root. Switch C is aware of down link and sends TCN message out to. sends Configuration with TCN bit set to let switches know of configuration change. All switches: Shorten MAC address tables aging time to Forward Delay (15 seconds). This flushes idle entries. Switch A waits to hear from. Receives Config on previously blocked port, new best, this becomes new. This new will go through listening, learning and forwarding states. TCN does not start a STP recalculation. Idle MAC entries are flushed Config, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-18 B C X Root TCN A D NDP (Blocking) New (Blocking, Listening, Learning, Forwarding) E

TCNs Direct Topology Change: Is a change that can be detected on a switch interface. Can can take about 3 seconds on the affected switch (two times forward delay). All switches flush idle entries in MAC table. Solutions: Uplinkfast Insignificant Topology Change: A users PC causes the link to go up or down (normal booting or shutdown process). No significant impact but given enough hosts switches could be in a constant state of flushing MAC address tables. Causes unknown unicast floods. Solution PortFast Idle MAC entries are flushed Idle MAC entries are flushed B Idle MAC entries are flushed Idle MAC entries are flushed Config C TCN A Root Idle MAC entries are flushed D E Idle MAC entries are flushed TCN s Understanding Spanning-Tree Protocol Topology Changes http://www.cisco.com/warp/public/473/17.html Remember that a TCN does not start a STP recalculation. This fear comes from the fact that TCNs are often associated with unstable STP environments; TCNs are a consequence of this, not a cause. The TCN only has an impact on the aging time; it will not change the topology nor create a loop., Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-19, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-11 Example Example, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-111, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-112

Exercise Exercise, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-113, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-114 Exercise Implementing Spanning Tree Protocol The End, Cisco Systems, Inc. All rights reserved. BCMSN v2. 2-115, Cisco Systems, Inc. All rights reserved. 2-116