STP Basics and Concepts 1 — Questions and Answers
Question 1: What is the primary purpose of the Spanning Tree Protocol (STP)?
- To increase network bandwidth
- To prevent broadcast storms
- To prevent loops in a network topology (Correct answer)
- To provide IP address allocation
Correct answer: To prevent loops in a network topology
STP's primary purpose is to prevent switching loops in Ethernet networks, which can occur when redundant paths exist between network devices. Without STP, these loops would cause broadcast storms, MAC address table instability, and network collapse. STP achieves this by logically blocking redundant paths, ensuring only one active path exists between any two network segments.
Question 2: Which device role in STP is responsible for forwarding traffic to all other switches in the network segment?
- Root Bridge
- Designated Port (Correct answer)
- Root Port
- Blocking Port
Correct answer: Designated Port
A Designated Port is a non-root port on a segment that is closest to the Root Bridge in terms of path cost. It is responsible for forwarding traffic to and from that segment towards the Root Bridge and other parts of the network. Every segment in an STP-enabled network must have one and only one Designated Port to ensure efficient traffic flow and prevent loops.
Question 3: In STP, what is a Bridge Protocol Data Unit (BPDU)?
- A type of error message sent during network congestion
- A data frame used for routing decisions in a network
- A message exchanged between switches to share information about network topology (Correct answer)
- A tool used to encrypt data on the network
Correct answer: A message exchanged between switches to share information about network topology
Bridge Protocol Data Units (BPDUs) are special data frames exchanged between switches participating in STP. These messages contain information such as the Bridge ID, Root Bridge ID, and path cost. BPDUs are crucial for switches to elect the Root Bridge, determine port roles, and ultimately build a loop-free logical topology by sharing network topology information.
Question 4: What determines the Root Bridge in STP?
- The switch with the highest MAC address
- The switch with the lowest IP address
- The switch with the lowest Bridge ID (Correct answer)
- The switch with the most number of connected devices
Correct answer: The switch with the lowest Bridge ID
The Root Bridge in an STP topology is the central point of reference for all path calculations and is elected based on its Bridge ID. The Bridge ID consists of a configurable bridge priority (default 32768) and the switch's MAC address. The switch with the numerically lowest Bridge ID (lowest priority, then lowest MAC address as a tie-breaker) becomes the Root Bridge.
Question 5: Which STP state allows a port to forward data and learn MAC addresses?
- Blocking
- Listening
- Learning
- Forwarding (Correct answer)
Correct answer: Forwarding
The Forwarding state is the final and active state for an STP port. In this state, the port can send and receive user data frames, and it actively learns MAC addresses from incoming traffic. Before reaching the Forwarding state, a port typically transitions through Listening and Learning states to prevent temporary loops and ensure network stability.
What is the primary purpose of the Spanning Tree Protocol (STP)?