Chapter 9: Spanning Tree Protocol Concepts
STP leaves the interface in each interim state for a time equal to the ___, which defaults to 15 seconds.
forward delay timer
A better Hello, meaning that the listed root's BID is better (numerically lower), is called a ___ Hello; a worse Hello, meaning that the listed root's BID is not as good (numerically higher), is called an ___ Hello.
superior, inferior
STP convergence
the process by which the switches collectively realize that something has changed in the LAN topology and determine whether they need to change which ports block and which ports forward.
STP states relate to whether ___ .
to block or forward
RSTP, compared to STP, defines more cases in which the switch can avoid waiting for a timer to expire, such as the following:
1. RSTP adds a mechanism by which a switch can replace its root port, without any waiting to reach a forwarding state (in some conditions). 2. RSTP adds a new mechanism to replace a designated port, without any waiting to reach a forwarding state (in some conditions). 3. RSTP lowers waiting times for cases in which RSTP must wait for a timer.
Summarize the steady-state operation when nothing is currently changing in the STP topology:
Step 1. The root creates and sends a Hello BPDU, with a root cost of 0, out all its working interfaces (those in a forwarding state). Step 2. The nonroot switches receive the Hello on their root ports. After changing the Hello to list their own BID as the sender's BID and listing that switch's root cost, the switch forwards the Hello out all designated ports. Step 3. Steps 1 and 2 repeat until something changes.
The following steps summarize the steady-state operation when nothing is currently changing in the STP topology:
Step 1. The root creates and sends a Hello BPDU, with a root cost of 0, out all its working interfaces (those in a forwarding state). Step 2. The nonroot switches receive the Hello on their root ports. After changing the Hello to list their own BID as the sender's BID and listing that switch's root cost, the switch forwards the Hello out all designated ports. Step 3. Steps 1 and 2 repeat until something changes.
What is the name of the new RSTP port state that replaces the STP disabled and blocking states? a. Dropping b. Null c. Discarding d. Monitoring
c. Discarding - When implementing the Rapid Spanning Tree Protocol (RSTP), one of the changes is that the previous disabled and blocking states are replaced by a single discarding state.
Spanning Tree Algorithm (STA)
chooses the interfaces that should be placed into a forwarding state. For any interfaces not chosen to be in a forwarding state, STP/RSTP places the interfaces in blocking state.
An STP topology with three switches has one link between each pair of switches. Which answer best describes the primary decision point as to which non-root switch has a designated port on the link between switches, and which does not? a. The device with the lowest BID would always become designated, and the other switch would block. b. The switch with the lowest priority setting would become designated, and the other switch would block. c. The device with the highest BID would become designated, and the other switch would block. d. The switch with the lowest root cost would become designated, and the other switch would block. e. The switch with the highest root cost would become designated, and the other switch would block.
d. The device with the lowest root cost becomes the designated port for a segment, and the other switch then moves to blocking state for that link. The lowest cost to root is the leading factor in determining who will be designated and who will block. If the costs were equal, the lowest BID between the two nonroot switches would be used to determine who would be designated for that link.
In a layer 2 switched LAN, all links are running at 100 Mbps. STP uses all default port cost configuration. Non-root switch SW2 receives a Hello on its root port, with that Hello listing a root cost of 38. If SW2 then forwards a Hello out some other port, what root cost will SW2 list in that Hello? a. 42 b. None of these are correct c. 19 d. 57 e. 38
d. With all default settings related to STP costs, a Cisco IOS switch uses a port cost of 19 on ports running at 100-Mbps. Note that the cost could be confingured statically. Additionally, the port cost defaults could be updated per the 802.1D 2004 standard. That said, as described in the question stem, all ports will have a cost of 19. In the Hello SW2 would send, SW2 would advertise its own root cost. SW2 calculates its root cost as the sum of the root cost in the BPDU it received on its root port (38), plus the cost of associated with that interface (19), for a total of 57.
STP and RSTP intelligently choose which ports block, with two goals in mind:
1. All devices in a VLAN can send frames to all other devices. In other words, STP or RSTP does not block too many ports, cutting off some parts of the LAN from other parts. 2. Frames have a short life and do not loop around the network indefinitely.
Three classes of problems caused by not using STP in redundant LANs
1. Broadcast storms - The forwarding of a frame repeatedly on the same links, consuming significant parts of the links' capacities 2. MAC table instability - The continual updating of a switch's MAC address table with incorrect entries, in reaction to looping frames, resulting in frames being sent to the wrong locations 3. Multiple rams transmission - A side effect of looping frames in which multiple copies of one frame are delivered to the intended host, confusing the host
Switches need a tiebreaker to use in case the best root cost ties for two or more paths. If a tie occurs, the switch applies these three tiebreakers to the paths that tie, in order, as follows:
1. Choose based on the lowest neighbor bridge ID. 2. Choose based on the lowest neighbor port priority. 3. Choose based on the lowest neighbor internal port number.
Fields in the STP Hello BPDU
1. Root bridge ID - The bridge ID of the switch the sender of this Hello currently believes to be the root switch. 2. Sender's bridge ID - The bridge ID of the switch sending this Hello BPDU. 3. Sender's root cost - The STP/RSTP cost between this switch and the current root. 4. Timer values on the root switch - Includes the Hello timer, MaxAge timer, and forward delay timer.
STP/RSTP uses three criteria to choose whether to put an interface in forwarding state:
1. STP/RSTP elects a root switch. STP puts all working interfaces on the root switch in forwarding state. 2. Each nonroot switch considers one of its ports to have the least administrative cost between itself and the root switch. The cost is called that switch's root cost. STP/RSTP places its port that is part of the least root cost path, called that switch's root port (RP), in forwarding state. 3. Many switches can attach to the same Ethernet segment, but due to the fact that links connect two devices, a link would have at most two switches. With two switches on a link, the switch with the lowest root cost, as compared with the other switches attached to the same link, is placed in forwarding state. That switch is the designated switch, and that switch's interface, attached to that segment, is called the designated port (DP).
Default port cost - 10 Mbps
1998 and before: 100 2004 and after: 2,000,000
Default port cost - 100 Mbps
1998 and before: 19 2004 and after: 200,000
Default port cost - 10 Gbps
1998 and before: 2 2004 and after: 2,000
Default port cost - 1 Gbps
1998 and before: 4 2004 and after: 20,000
Default port cost - 1 Tbps
1998 and before: N/A 2004 and after: 20
Default port cost. - 100 Gbps
1998 and before: N/A 2004 and after: 200
An STP root switch sends a new Hello BPDU every ___ by default.
2 seconds
Disabled port
In STP, a port role for nonworking interfaces—in other words, interfaces that are not in a connect or up/up interface state.
BPDU Guard
A Cisco switch feature that listens for incoming STP BPDU messages, disabling the interface if any are received. The goal is to prevent loops when a switch connects to a port expected to only have a host connected to it.
1. Which of the following port states are stable states used when STP has completed convergence? (Choose two answers.) a. Blocking b. Forwarding c. Listening d. Learning e. Discarding
A and B. Listening and learning are transitory port states, used only when moving from the blocking to the forwarding state. Discarding is not an STP port state.
6. RSTP adds features beyond STP that enable ports to be used for a role if another port on the same switch fails. Which of the following statements correctly describe a port role that is waiting to take over for another port role? (Choose two answers.) a. An alternate port waits to become a root port. b. A backup port waits to become a root port. c. An alternate port waits to become a designated port. d. A backup port waits to become a designated port.
A and D. With RSTP, an alternate port is an alternate to the root port when a switch's root port fails. A backup port takes over for a designated port if the designated port fails.
Blocking state
In STP, a port state in which no received frames are processed and the switch forwards no frames out the interface, with the exception of STP messages.
EtherChannel
A feature in which up to eight parallel Ethernet segments exist between the same two devices, each using the same speed. May be a Layer 2 EtherChannel, which acts like a single link for forwarding and Spanning Tree Protocol logic, or a Layer 3 EtherChannel, which acts like a single link for the switch's Layer 3 routing logic.
Spanning Tree Protocol (STP)
A protocol defined by IEEE standard 802.ID. Allows switches and bridges to create a redundant LAN, with the protocol dynamically causing some ports to block traffic, so that the bridge/switch forwarding logic will not cause frames to loop indefinitely around the LAN.
Multiple frame transmission
A side effect of looping frames in which multiple copies of one frame are delivered to the intended host, confusing the host
PortFast
A switch STP feature in which a port is placed in an STP forwarding state as soon as the interface comes up, bypassing the listening and learning states. This feature is meant for ports connected to end-user devices.
Listening state
A temporary STP port state that occurs immediately when a blocking interface must be moved to a forwarding state. The switch times out MAC table entries during this state. It also ignores frames received on the interface and doesn't forward any frames out the interface.
Learning state
In STP, a temporary port state in which the interface does not forward frames, but it can begin to learn MAC addresses from frames received on the interface.
Bridge ID
An 8-byte identifier for bridges and switches used by STP and RSTP. It is composed of a 2-byte priority field followed by a 6-byte System ID field that is usually filled with a MAC address.
Discarding state
An RSTP interface state in which no received frames are processed and the switch forwards no frames out the interface, with the exception of RSTP messages.
Forward delay
An STP timer, defaulting to 15 seconds, used to dictate how long an interface stays in the listening state and the time spent in learning state. Also called the forward delay timer.
STP roles relate to how STP ___ .
Analyzes the topology
MaxAge
In STP, a timer that states how long a switch should wait when it no longer receives Hellos from the root switch before acting to reconverge the STP topology. Also called the MaxAge timer. Default value is 10 times Hello timer, or 20 seconds by default.
5. Which of the following RSTP port states have the same name and purpose as a port state in traditional STP? (Choose two answers.) a. Blocking b. Forwarding c. Listening d. Learning e. Discarding
B and D. RSTP uses port state forwarding, learning, and discarding. Forwarding and learning perform the same functions as the port states used by traditional STP.
4. Which of the following facts determines how often a nonroot bridge or switch sends an STP Hello BPDU message? a. The Hello timer as configured on that switch. b. The Hello timer as configured on the root switch. c. It is always every 2 seconds. d. The switch reacts to BPDUs received from the root switch by e. sending another BPDU 2 seconds after receiving the root BPDU.
B. Nonroot switches forward Hellos received from the root; the root sends these Hellos based on the root's configured Hello timer.
Bridge protocol data unit (BPDU)
Bridge protocol data unit. The generic name for Spanning Tree Protocol messages.
Broadcast storm
Broadcast storms happen when any kind of Ethernet frames—broadcast frames, multicast frames, or unknown-destination unicast frames—loop around a LAN indefinitely
Designated port
In both STP and RSTP, a port role used to determine which of multiple interfaces on multiple switches, each connected to the same segment or collision domain, should forward frames to the segment. The switch advertising the lowest-cost Hello BPDU onto the segment becomes the DP.
3. Which of the following are transitory port states used only during the process of STP convergence? (Choose two answers.) a. Blocking b. Forwarding c. Listening d. Learning e. Discarding
C and D. Listening and learning are transitory port states used only when moving from the blocking to the forwarding state. Discarding is not an STP port state. Forwarding and blocking are stable states.
2. Which of the following bridge IDs wins election as root, assuming that the switches with these bridge IDs are in the same network? a. 32769:0200.1111.1111 b. 32769:0200.2222.2222 c. 4097:0200.1111.1111 d. 4097:0200.2222.2222 e. 40961:0200.1111.1111
C. The smallest numeric bridge ID wins the election.
7. What STP feature causes an interface to be placed in the forwarding state as soon as the interface is physically active? a. STP b. EtherChannel c. Root Guard d. PortFast
D. The PortFast feature allows STP to move a port from blocking to forwarding without going through the interim listening and learning states. STP allows this exception when the link is known to have no switch on the other end of the link, removing the risk of a switching loop. BPDU Guard is a common feature to use at the same time as PortFast because it watches for incoming bridge protocol data units (BPDU), which should not happen on an access port, and prevents the loops from a rogue switch by disabling the port.
Rapid STP (RSTP)
Defined in IEEE 802.lw. Defines an improved version of STP that converges much more quickly and consistently than STP (802.Id).
Forwarding state
From one host's perspective, the route over which a packet travels from that host to some other host.
Root port
In STP and RSTP, the one port on a nonroot switch in which the least-cost Hello is received. Switches put root ports in a forwarding state.
Root switch
In STP and RSTP, the switch that wins the election by virtue of having the lowest bridge ID and, as a result, sends periodic Hello BPDUs (default, 2 seconds).
These temporary STP states help prevent temporary loops:
Listening: Like the blocking state, the interface does not forward frames. The switch removes old stale (unused) MAC table entries for which no frames are received from each MAC address during this period. These stale MAC table entries could be the cause of the temporary loops. Learning: Interfaces in this state still do not forward frames, but the switch begins to learn the MAC addresses of frames received on the interface.
MAC table instability
MAC table instability means that the switches' MAC address tables keep changing because frames with the same source MAC arrive on different ports.
Hello BPDU
The STP and RSTP message used for the majority of STP communications, listing the root's bridge ID, the sending device's bridge ID, and the sending device's cost with which to reach the root.
Root cost
The STP cost from a nonroot switch to reach the root switch, as the sum of all STP costs for all ports out which a frame would exit to reach the root.
STP moves an interface from ___ to ___, then to ___, and then to ___ state.
blocking, listening, learning, forwarding
Point-to-edge port
With 802.1w RSTP, a port type in which the switch believes the port is connected to a single endpoint device at the edge of the network. Also called an edge port.
Point-to-point port
With 802.1w RSTP, a port type in which the switch believes the port is connected to a single other device, specifically another switch.
Shared port
With 802.1w RSTP, a port type that is determined by the fact that the port uses half duplex, which could then imply a shared LAN as created by a LAN hub.
Backup port
With RSTP, a port role in which the port acts as a backup to one of the switch's ports acting as a designated port. If the switch's designated port fails, the switch will use the backup port to immediately take over as the designated port.
Alternate port
With RSTP, a port role in which the port acts as an alternative to a switch's root port, so that when the switch's root port fails, the alternate port can immediately take over as the root port.
Which of the following are functions provided by Spanning Tree Protocol? a. Prevents MAC table instability b. Uses TTL to control loops in the network c. Places a Layer 3 port into blocking state if it is a parallel (redundant) path that would cause a loop d. Prevents broadcast storms e. Prevents multiple copies of a single frame from being forwarded
a., d., e. By blocking on specific ports that would otherwise be parallel Layer 2 paths, STP prevents Layer 2 loops, thus preventing broadcast storms, preventing MAC table instability due to the a single-source Layer 2 address showing up on multiple different ports, and preventing multiple copies of a single frame from being forwarded (because spanning tree is blocking on enough ports to stop the forwarding of frames on parallel paths). STP does not use any TTL mechanism in a frame header (there is not one there); that is why it must do blocking on Layer 2 ports where an otherwise parallel path would be. STP performs blocking on Layer 2 ports, not Layer 3 ports.