1 / 36

Implement Spanning Tree Protocols

Implement Spanning Tree Protocols. LAN Switching and Wireless – Chapter 5. Objectives. Explain the role of redundancy in a converged network Summarize how STP works to eliminate Layer 2 loops in a converged network

torgny
Télécharger la présentation

Implement Spanning Tree Protocols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Implement Spanning Tree Protocols LAN Switching and Wireless– Chapter 5

  2. Objectives • Explain the role of redundancy in a converged network • Summarize how STP works to eliminate Layer 2 loops in a converged network • Explain how the STP algorithm uses three steps to converge on a loop-free topology • Implement rapid per VLAN spanning tree (rapid PVST+) in a LAN to prevent loops between redundant switches.

  3. Redundancy in a hierarchical network • The hierarchical design model addresses issues found in the flat model network topologies. • One of the issues is redundancy. Layer 2 redundancy improves the availability of the network by implementing alternate network paths by adding equipment and cabling. • Having multiple paths for data to traverse the network allows for a single path to be disrupted without impacting the connectivity of devices on the network. • In a hierarchical design, redundancy is achieved at the distribution and core layers through additional hardware and alternate paths through the additional hardware.

  4. Role of Redundancy in a Converged Switched Network • Redundancy in a hierarchical network

  5. Issues with Redundancy • Layer 2 Loops • When multiple paths exist between two devices on the network and STP has been disabled on those switches, a Layer 2 loop can occur. • Ethernet frames do not have a time to live (TTL) like IP packets traversing routers. • If they are not terminated properly on a switched network, they continue to bounce from switch to switch endlessly or until a link is disrupted and breaks the loop. • Broadcast frames are forwarded out all switch ports, except the originating port. • If there is more than one path for the frame to be forwarded out, it can result in an endless loop.

  6. Conti… • Broadcast Storms • A broadcast storm occurs when there are so many broadcast frames caught in a Layer 2 loop that all available bandwidth is consumed. • A broadcast storm is inevitable on a looped network. As more devices send broadcasts out on the network, more and more traffic gets caught in the loop, eventually creating a broadcast storm that causes the network to fail. • broadcast traffic that is being flooded endlessly around the looped network can cause the end device to malfunction because of the high processing requirements for sustaining such a high traffic load onnetwork interface card

  7. Conti… • Duplicate Unicast Frames • Unicast frames sent onto a looped network can result in duplicate frames arriving at the destination device. • Most upper layer protocols are not designed to recognize or cope with duplicate transmissions. • In general, protocols that make use of a sequence-numbering mechanism assume that the transmission has failed and that the sequence number has recycled for another communication session. • Fortunately, switches are capable of detecting loops on a network. The Spanning Tree Protocol (STP) eliminates these loop issues. You will learn about STP in the next section.

  8. Real-world Redundancy Issues • Loops in the wiring closet • If the network cables are not properly labeled when they are terminated in the patch panel in the wiring closet, it is difficult to determine where the destination is for the patch panel port on the network. • Network loops that are a result of accidental duplicate connections in the wiring closets are a common occurrence.

  9. Conti… • Loops in the Cubicles • Because of insufficient network data connections, some end users have a personal hub or switch located in their working environment. • Allowing all devices connected to the personal hub or switch to gain access to the network. • So the end user can accidentally interconnect the switches or hubs.

  10. Spanning Tree Algorithm • STP Topology • Loops and duplicate frames can have severe consequences on a network. The Spanning Tree Protocol (STP) was developed to address these issues. • STP ensures that there is only one logical path between all destinations on the network by intentionally blocking redundant paths that could cause a loop. • his does not include bridge protocol data unit (BPDU) frames that are used by STP to prevent loops. • If the path is ever needed to compensate for a network cable or switch failure, STP recalculates the paths and unblocks the necessary ports to allow the redundant path to become active.

  11. Conti… • STP Algorithm • STP uses the Spanning Tree Algorithm (STA) to determine which switch ports on a network need to be blocked to prevent loops. • The STA designates a single switch as the root bridge as a reference point for all calculations • After the root bridge has been determined, the STA calculates the shortest path to the root bridge. • The path costs are calculated using port cost values associated with port speeds for each switch port along a given path. The sum of the port cost values determines the overall path cost to the root bridge.

  12. Conti… • Port roles • Port can be in any of the following: • Root ports - Switch ports closest to the root bridge. • Designated ports - All non-root ports that are still permitted to forward traffic on the network. • Non-designated ports - All ports configured to be in a blocking state to prevent loops. • Disabled Port • The disabled port is a switch port that is administratively shut down.

  13. Configure Port Priority • You can configure the port priority value using the spanning-tree port-priority value interface configuration mode command. • The port priority values range from 0 - 240, in increments of 16. • The default port priority value is 128. • As with bridge priority, lower port priority values give the port higher priority. • Verifying Port Roles and Port Priority • To verify the port roles and port priorities for the switch ports, use the show spanning-tree privileged EXEC mode command.

  14. Port States • Blocking – The port is a non-designated port and does not participate in frame forwarding. The port receives BPDU frames to determine the location and root ID of the root bridge switch • Listening –At this point, the switch port is not only receiving BPDU frames, it is also transmitting its own BPDU frames and informing adjacent switches • Learning –The port prepares to participate in frame forwarding and begins to populate the MAC address table. • Forwarding – The port is considered part of the active topology and forwards frames and also sends and receives BPDU frames. • Disabled - The Layer 2 port does not participate in spanning tree and does not forward frames.

  15. BPDU Timers • The amount of time that a port stays in the various port states depends on the BPDU timers. The following timers determine STP performance and state changes: • Hello time - 2 Seconds by default but can be tuned between 1 to 10 • Forward delay –The forward delay is the time spent in the listening and learning state. 15 Seconds by default but can be tuned between 4 to 30 • Maximum age - The max age timer controls the maximum length of time a switch port saves configuration BPDU information. This is 20 seconds by default, but can be tuned to be between 6 and 40 seconds.

  16. Cisco PortFast Technology • PortFast is a Cisco technology. When a switch port configured with PortFast is configured as an access port, that port transitions from blocking to forwarding state immediately, bypassing the typical STP listening and learning states. • PortFast is disabled on all interfaces by default. • To configure PortFast on a switch port, enter the spanning-tree portfast interface configuration mode command on each interface that PortFast is to be enabled. • Edge Ports • An RSTP edge port is a switch port that is never intended to be connected to another switch device. It immediately transitions to the forwarding state when enabled.

  17. STP Convergence Steps • Step 1. Elect a root bridge • Step 2. Elect root ports • Step 3. Elect designated and non-designated ports • Verification • Show spanning-tree

  18. Cisco and STP variants • Cisco Proprietary • Per-VLAN spanning tree protocol (PVST) - Maintains a spanning-tree instance for each VLAN configured in the network. It uses the Cisco proprietary ISL trunking protocol • Per-VLAN spanning tree protocol plus (PVST+) - Cisco developed PVST+ to provide support for IEEE 802.1Q trunking. PVST+ provides the same functionality as PVST, including the Cisco proprietary STP extensions. PVST+ is not supported on non-Cisco devices.

  19. Conti… • IEEE Standards • Rapid spanning tree protocol (RSTP) - Implements the Cisco-proprietary STP extensions • Multiple STP (MSTP) - Enables multiple VLANs to be mapped to the same spanning-tree instance

  20. Final Points • Keep STP Even If It Is Unnecessary • Do not disable STP. • STP is not very processor-intensive. • The few BPDUs sent on each link do not reduce bandwidth. • But a bridge network without STP can go down in a fraction of a second. • Keep Traffic off the Administrative VLAN. • A high rate of broadcast or multicast traffic on the administrative VLAN adversely effects the CPU’s ability to process vital BPDUs.

  21. Conti… • Keep user traffic off the administrative VLAN. • Do Not Have a Single VLAN Span the Entire Network. • VLAN 1 serves as an administrative VLAN, where all switches are accessible in the same IP subnet. • A bridging loop on VLAN 1 affects all trunks and can bring down the network. • Segment the bridging domains using high-speed Layer 3 switches.

  22. Troubleshoot a Failure • Unfortunately, there is no systematic procedure to troubleshoot an STP issue. This section summarizes some of the actions that are available to you. • Topology of the bridge network • Location of the root bridge • Location of the blocked ports and the redundant links • PortFast Configuration Error • Network Diameter Issues • Another issue that is not well known relates to the diameter of the switched network. The conservative default values for the STP timers impose a maximum network diameter of seven.

  23. Conti… • STP algorithm

  24. Root Bridge • Every spanning-tree instance (switched LAN or broadcast domain) has a switch designated as the root bridge. • All switches in the broadcast domain participate in the election process • After a switch boots, it sends out BPDU frames containing the switch BID and the root ID every 2 seconds. • If the root ID from the BPDU received is lower than the root ID on the receiving switch, the receiving switch updates its root ID identifying the adjacent switch as the root bridge.

  25. Conti… • Role of the BID in STP

  26. Best Paths to the Root Bridge • After root bridge selection, the STA starts the process of determining the best paths to the root bridge from all destinations in the broadcast domain. • The default port costs are defined by the speed at which the port operates. • 10-Gb/s Ethernet ports have a port cost of 2, • 1-Gb/s Ethernet ports have a port cost of 4, • 100-Mb/s Fast Ethernet ports have a port cost of 19, and • 10-Mb/s Ethernet ports have a port cost of 100. • show spanning-tree ,show spanning-tree details • Note: These cost are revised ones by IEEE.

  27. The BPDU Fields • The BPDU frame contains 12 distinct fields that are used to convey path and priority information that STP uses to determine the root bridge and paths to the root bridge. • The first four fields identify the protocol, version, message type, and status flags. • The next four fields are used to identify the root bridge and the cost of the path to the root bridge. • The last four fields are all timer fields that determine how frequently BPDU messages are sent, and how long the information received through the BPDU process (next topic) is retained. • Note:-The role of the timer fields will be covered in more detail later in this course.

  28. Conti… • Role of the BPDU in STP

  29. The BPDU Process • Each switch in the broadcast domain initially assumes that it is the root bridge for the spanning-tree instance, so the BPDU frames sent contain the BID of the local switch as the root ID. • By default, BPDU frames are sent every 2 seconds after a switch is booted; that is, the default value of the hello timer specified in the BPDU frame is 2 seconds. • Each switch maintains local information about its own BID, the root ID, and the path cost to the root.

  30. BID • The BID field of a BPDU frame contains three separate fields: • bridge priority, • extended system ID, and • MAC address. Each field is used during the root bridge election.

  31. Conti… • Bridge Priority • The bridge priority is a customizable value that you can use to influence which switch becomes the root bridge. • The default value for the priority of all Cisco switches is 32768. The priority range is between 1 and 65536; therefore, 1 is the highest priority. • Extended System ID • Extended system ID field contains the ID of the VLAN with which the BPDU is associated. • The increment for the bridge priority value changes from 1 to 4096. Therefore, bridge priority values can only be multiples of 4096.

  32. Conti… • MAC Address • When two switches are configured with the same priority. The MAC address is then the deciding factor on which switch is going to become the root bridge. • The MAC address with the lowest hexadecimal value is considered to be the preferred root bridge.

  33. Configure and Verify the BID • Method 1 • To ensure that the switch has the lowest bridge priority value, use the spanning-tree vlan vlan-id root primary command in global configuration mode. • If an alternate root bridge is desired, use the spanning-tree vlan vlan-id root secondary global configuration mode command. • Method 2 • Another method for configuring the bridge priority value is using the spanning-tree vlan vlan-id priority value global configuration mode command.

  34. Summary • Spanning Tree Protocol (STP) is used to prevent loops from being formed on redundant networks • STP uses different port states & timers to logically prevent loops • There is at least one switch in a network that serves as the root bridge • Root bridge is elected using information found in BPDU frames • Root ports are determined by the spanning tree algorithm and are closest to the root bridge

  35. Summary • STP lengthy convergence time (50 seconds) facilitated the development of: • RSTP • convergence time is slightly over 6 seconds • Rapid PVST+ • adds VLAN support to RSTP • is the preferred spanning-tree protocol on a Cisco switch • netowrk

More Related