Free CCNA | Spanning Tree Protocol (Part 1) | Day 20 | CCNA 200-301 Complete Course
Welcome to Jeremy’s IT Lab
In this section, Jeremy introduces his IT Lab and the free CCNA course. He emphasizes the importance of subscribing, liking, commenting, and sharing the videos to support the series.
Introduction to STP (Spanning Tree Protocol)
- Introduction to STP: Jeremy explains that STP is an important topic for network engineers and mentions that he will cover both classic STP and rapid STP in separate videos.
- Topics Covered in this Video: Jeremy outlines the topics covered in this video, including redundancy in networks and an introduction to Spanning Tree Protocol.
- Importance of Redundancy: Redundancy is crucial in network design as it ensures continuous operation and minimizes downtime. Network engineers must implement redundancy at every possible point in the network.
- Poorly Designed Network Example: Jeremy presents a poorly designed network with multiple points of failure that can result in connectivity issues if any component fails.
- Better Network Design Example: A better-designed network with redundant paths is shown, ensuring connectivity even if certain components fail.
- Limitations of Redundancy for PCs: Most PCs have a single NIC (network interface card), limiting their ability to connect to multiple switches for redundancy. However, servers typically have multiple NICs for increased redundancy.
- Introduction to Spanning Tree Protocol (STP): Jeremy introduces Spanning Tree Protocol as a Layer 2 protocol that enables redundant layer 2 networks within a LAN.
Broadcast Storms and the Need for Spanning Tree
- The Problem: Broadcast Storms: Jeremy explains the concept of broadcast storms using a simplified network topology example. When broadcast frames are flooded throughout the network, it can lead to network issues.
- Switch Behavior with Broadcast Frames: Switches flood broadcast frames out of all interfaces except the one they were received on, potentially causing network congestion and performance problems.
- The Role of Spanning Tree: Spanning Tree Protocol addresses the problem of broadcast storms by preventing loops in a redundant LAN and ensuring a single active path between switches.
Timestamps may vary slightly depending on the video version.
Broadcast Storm and MAC Address Flapping
This section discusses the issues of broadcast storms and MAC address flapping in a network.
Broadcast Storm
- Ethernet frames without a TTL field can cause broadcast storms, where broadcast frames loop indefinitely in the network.
- Accumulation of looped broadcasts congests the network, preventing legitimate traffic from passing through.
- Network congestion is not the only problem; continuous arrival of frames with the same source MAC address causes MAC address flapping.
MAC Address Flapping
- Switches learn MAC addresses to update their MAC address tables.
- When frames with the same source MAC address repeatedly arrive on different interfaces, switches continuously update their tables, leading to MAC address flapping.
Spanning Tree Protocol (STP)
This section introduces Spanning Tree Protocol (STP) as a solution to prevent Layer 2 loops in networks.
Purpose of STP
- STP prevents Layer 2 loops by placing redundant ports in a blocking state, acting as backups that can enter a forwarding state if an active interface fails.
- All switches from various vendors run STP by default to prevent Layer 2 loops.
Bridge vs. Switch
- Before switches were invented, bridges were used as an intermediate device between hubs and switches.
- STP still uses the term "bridge," but it refers to switches in modern networks.
How STP Works
This section explains how Spanning Tree Protocol (STP) works to determine which ports should be forwarding or blocking.
Port States
- STP-enabled switches send Hello BPDUs (Bridge Protocol Data Units) out of all interfaces every 2 seconds.
- If a switch receives a Hello BPDU on an interface, it knows that interface is connected to another switch.
- STP uses the Bridge ID field in BPDUs to elect a root bridge for the network.
- All ports on the root bridge are put in a forwarding state, while other switches must have a path to reach the root bridge.
Preventing Layer 2 Loops
- STP puts ports in either a blocking or forwarding state to avoid Layer 2 loops.
- The topology is adjusted automatically if an interface fails, ensuring no loops occur.
- STP creates a single path to and from each point in the network, preventing Layer 2 loops.
Conclusion
This section concludes the discussion on Spanning Tree Protocol (STP) and its role in preventing Layer 2 loops.
- STP is crucial for preventing Layer 2 loops in networks.
- Switches use BPDUs to advertise themselves and learn about other switches.
- The lowest Bridge ID determines the root bridge, with all its ports in a forwarding state.
- Other switches must have a path to reach the root bridge, avoiding loops.
New Section
This section discusses the process of selecting the root bridge in a network using Spanning Tree Protocol (STP).
Selecting the Root Bridge
- The switch with the lowest bridge ID becomes the root bridge.
- The bridge ID consists of a priority value and a MAC address.
- The default priority is 32768, and the MAC address is used as a tie-breaker.
- The switch with the lowest MAC address becomes the root bridge.
Bridge Priority and MAC Addresses
- All three switches in the network have a default priority of 32768.
- To determine which switch will be the root bridge, their MAC addresses are compared.
- SW1 has the lowest MAC address among them, making it the root bridge.
Bridge Priority Field
- The bridge ID is updated to include two parts: the bridge priority and an extended system ID (VLAN ID).
- Cisco switches use Per-VLAN Spanning Tree (PVST), running separate STP instances in each VLAN.
- By adding the VLAN ID to the bridge priority, each switch has a different bridge ID in each VLAN.
Default Bridge Priority
- The default bridge priority was 32768 because of a 16-bit field where the most significant bit was set to 1 by default.
- With the addition of extended system ID (VLAN ID), this changed to 32769 for VLAN 1.
Changing Bridge Priority
- The total bridge priority can only be changed in units of 4096, which is determined by changing the least significant bit of the bridge priority portion.
- Valid values for configuring are listed starting from 0 and increasing in units of 4096.
Multiple VLANs and Bridge Priority
- In networks with multiple VLANs, each VLAN can have its own root bridge with different priorities.
- Each switch's priority can be changed for a specific VLAN to determine the root bridge.
Root Bridge and Port Roles
- The root bridge is the switch that assumes its position when powered on.
- It will only give up its position if it receives a superior BPDU from a switch with a lower bridge ID.
- Once the topology has converged, only the root bridge sends BPDUs.
New Section
This section provides additional information about the root bridge and how switches interact in a network using Spanning Tree Protocol (STP).
Root Bridge Selection Process
- When switches are powered on, they assume they are the root bridge until they receive a superior BPDU.
- Superior BPDUs come from switches with lower bridge IDs.
- After convergence, only the root bridge sends BPDUs.
Practice Questions
- In a network of 4 switches, which switch will become the root bridge?
Timestamps were not available for all bullet points.
New Section
In this section, the focus is on determining which switch will become the root bridge in a given scenario.
Root Bridge Selection
- The switch with the lowest priority, in this case SW4 with a priority of 4097, becomes the root bridge.
- All ports on the root bridge are designated ports and in a forwarding state. This is the first step in creating loop-free Layer 2 LANs using spanning-tree protocol.
New Section
This section covers step 2 of spanning-tree's process - selecting root ports for all other switches.
Selecting Root Ports
- Each switch selects one of its ports as its root port, except for the root bridge.
- The interface with the lowest root cost becomes the root port.
- Root ports are also in a forwarding state.
- The root cost is determined by adding up the costs of outgoing interfaces along the path to the root bridge.
- Interface costs vary based on speed: regular Ethernet (10 Mbps) has a cost of 100, Fastethernet (100 Mbps) has a cost of 19, Gigabit Ethernet has a cost of 4, and 10 Gigabit Ethernet has a cost of 2.
New Section
This section explains how switches determine their root port based on received BPDUs.
Determining Root Port
- Switches receive BPDUs from neighboring switches and add their own interface costs to determine total root costs.
- SW2 chooses its root port based on comparing advertised costs and interface costs from SW1 and SW3.
- SW3 follows a similar process to select its root port.
New Section
This section discusses the designation of ports and the importance of not blocking the root port.
Designated Ports
- Ports directly across from each root port are designated ports.
- The port connected to another switch's root port must be designated to ensure a path to the root bridge is not blocked.
- Summary: One switch is elected as the root bridge, all its ports become designated. Each remaining switch selects one interface as its root port, which also becomes a designated port. Ports across from the root ports are always designated.
New Section
This section explains how tiebreakers are used when selecting the root port.
Root Port Selection Tiebreakers
- The first criteria for selecting a root port is the lowest root cost.
- If multiple ports have the same root cost, the interface connected to the neighbor with the lowest bridge ID is selected as the root port.
- An example scenario is provided for practice.
New Section
This section introduces an additional tiebreaker for selecting the root port.
Final Tiebreaker - Port ID
- If two switches have identical root costs and neighbor bridge IDs, then the interface connected to the neighbor switch with the lowest port ID becomes the root port.
- Port IDs can be seen in SHOW SPANNING-TREE output.
New Section
In this section, the speaker explains the concept of port ID in spanning tree protocol and how it is used to select the root port.
Understanding Port ID and Root Port Selection
- The port ID is not usually explained in depth as it is not something that needs to be changed or worried about.
- When looking at the port number, such as G0/0 or G1/0, lower numbers indicate a lower port ID.
- In a scenario with two connections between SW1 and SW3, SW3 will select G0/2 as the root port because it is connected to a lower port ID on SW1.
- The neighbor switch's port ID is used to break ties when selecting the root port.
New Section
This section covers the process of selecting designated ports and blocking ports in spanning tree protocol.
Selecting Designated Ports and Blocking Ports
- The process of selecting designated ports and blocking ports helps prevent Layer 2 loops.
- In a topology with all ports in forwarding state, both root ports and designated ports are always in forwarding state.
- Each collision domain has a single spanning tree designated port.
- Unlike old Ethernet hubs, each link in switches creates a separate collision domain.
- The connection between SW1 and SW2 has one designated port (SW1's G0/0), while the connection between SW1 and SW3 has one designated port (SW1's G0/1).
- The switch with the lowest root cost will make its interface designated. If there is a tie, the bridge ID is compared for tie-breaking.
- The other interface on each switch becomes non-designated (blocking) to prevent Layer 2 loops.
New Section
This section summarizes the process of selecting different port roles and states in spanning tree protocol.
Selecting Port Roles and States
- One switch is selected as the root bridge based on the lowest bridge ID.
- Each remaining switch selects one interface to be a root port based on the lowest root cost. If there is a tie, the interface connected to a neighboring switch with the lowest bridge ID is selected. If there is still a tie, the interface connected to the lowest port ID on the neighbor switch is chosen.
- Each remaining collision domain selects one interface to be a designated port, while the other becomes non-designated (blocking).
- The interface on the switch with the lowest root cost becomes designated. In case of a tie, the interface on the switch with the lowest bridge ID is designated.
New Section
This section mentions that there are more important aspects of spanning tree protocol to cover in part 2 before moving on to rapid spanning tree.
Next Steps and Recap
- There are still many important things left to explain regarding spanning tree protocol.
- Part 2 will cover these topics before moving on to rapid spanning tree.
- Practice questions throughout this video help reinforce understanding of spanning tree protocol.
- A question from Boson ExSim will be featured in an upcoming video for further practice.
New Section
This section presents another practice question about identifying root bridges and determining port roles in a network topology.
Practice Question: Identifying Root Bridge and Port Roles
- The network topology provided requires identifying the root bridge and determining port roles for each interface on each switch.
- SW3 is identified as the root bridge due to having both priority tiebreaker and lower MAC address.
- SW2's G0/2 interface becomes its root port because it connects to SW1's lower-numbered interface, G0/0.
- Interfaces on SW2 are non-designated due to higher root cost.
- Each connection should have one designated port for each collision domain.
New Section
This section presents another practice question about identifying the root bridge and port roles in a network topology with fast Ethernet interfaces.
Practice Question: Identifying Root Bridge and Port Roles (Fast Ethernet)
- The provided network topology includes fast Ethernet interfaces with a spanning tree cost of 19 instead of 4.
- SW4 is identified as the root bridge because it has the lowest priority.
- The root ports and designated ports can be determined based on the lowest root cost and tiebreakers.
- Always ensure that there is one designated port for each connection or collision domain.
PortFast and Boson ExSim
In this section, the speaker discusses PortFast, an optional feature of spanning tree, and introduces a practice question related to it in Boson ExSim.
PortFast Practice Question
- The speaker presents a practice question about PortFast and mentions that the answer will be provided in the next lecture video.
- Viewers are encouraged to share their answers in the comments or do independent research on "spanning tree portfast" to find the answer.
- The question is about enabling PortFast on switchports of Switch A using the "spanning-tree portfast default" command from global configuration mode. Viewers are asked to select the best answer among four options: No ports, All ports, All access ports, or All trunk ports.
- The answer for this question will be revealed in the next video. Viewers are invited to get their own copy of ExSim for further practice.
Supplementary Materials and Acknowledgments
In this section, the speaker provides information about supplementary materials and acknowledges JCNP-level channel members.
Supplementary Materials
- The speaker mentions that there will be supplementary materials available for this video, including a review flashcard deck for use with Anki software and a packet tracer practice lab. Links to download these materials are provided in the video description.
- The packet tracer practice lab will offer additional practice for understanding spanning tree topology and introduce valuable CLI commands not covered in this video.
Acknowledgments
- The speaker expresses gratitude towards JCNP-level channel members for their support and lists their names individually.
- The speaker apologizes if any names were mispronounced and requests feedback if anyone is experiencing issues with the channel loading.
- The list of JCNP-level members mentioned in this video was accurate as of May 10th, and new members will be acknowledged in future videos.
Conclusion
The transcript covers the topics of PortFast and Boson ExSim practice questions related to spanning tree. It also mentions supplementary materials available for further study and acknowledges JCNP-level channel members for their support.