STP Flashcards
What is STP?
Spanning Tree Protocol is a protocol that enables switches to become aware of other switches through advertisement and receipt of bridge protocol data units (BPDUs).
What does STP do and how does it operate?
STP builds a Layer 2 loop-free topology in an environment by temporary blocking traffic on redundant ports. It operates by selecting a specific switch as the best switch and running a tree-based algorithm to identify which redundant ports should not forward traffic.
What are the 802.1D Port Types and what do they do?
Root port (RP): A network port that connects to the root bridge or an upstream switch in the spanning-tree topology. There should be only one root port per VLAN on a switch.
Designated port (DP): A network port that receives and forwards BPDU frames to other switches. Designated ports provide connectivity to downstream devices and switches. There should be only one active designated port on a link.
Blocking port: A network port that is not forwarding traffic because of STP calculations.
What is the root bridge?
The root bridge is the switch that is considered the top of the spanning tree for all path calculations by other switches. It is the most important switch in the L2 topology and all ports are in a forwarding state.
What is a BPDU? and how many types of BPDU packets are there?
A bridge protocol data unit is a network packet that is used for network switches to identify a hierarchy and notify of changes in the topology. A BPDU uses the destination MAC address 01:80:c2:00:00:00.
Configuration BPDU: Used to identify the root bridge, root ports, designated ports, and blocking ports. The configuration BPDU consists of the following fields: STP type, root path cost, root bridge identifier, local bridge identifier, max age, hello time, and forward delay.
Topology change notification (TCN) BPDU: Used to communicate
changes in the Layer 2 topology to other switches.
What is the root path cost?
This is the combined cost for a specific path toward the root switch.
What is the STP system priority?
This 4-bit value indicates the preference for a switch to be root
bridge. The default value is 32,768.
What is the STP system ID extension?
This 12-bit value indicates the VLAN that the BPDU correlates to the system priority and system ID extension are combined as part of the switch’s identification of the root bridge.
What is the STP root bridge identifier?
This is a combination of the root bridge system MAC address,
system ID extension, and system priority of the root bridge.
What is the STP local bridge identifier?
This is a combination of the local switch’s bridge system MAC
address, system ID extension, and system priority of the local bridge.
What is the STP Max age?
This is the maximum length of time that passes before a bridge port saves its BPDU information.
The default value is 20 seconds, but the value can be configured
with the command spanning-tree vlan vlan-id max-age maxage.
If a switch loses contact with the BPDU’s source, it assumes that the BPDU information is still valid for the duration of the Max Age timer.
What is the STP hello time?
This is the time that a BPDU is advertised out of a port.
The default value is 2 seconds, but the value can be configured to 1 to 10 seconds with the command spanning-tree vlan vlan-id hello-time hello-time.
What is the STP forward delay?
This is the amount of time that a port stays in a listening and learning
state.
The default value is 15 seconds, but the value can be changed to a value of 4 to 30 seconds with the command spanning-tree vlan vlan-id forward-time forward-time.
How does switch determine is root port?
1) The interface with the lowest path cost is more preferred
2) The interface associated to the lowest system priority of the advertising switch is preferred next
3) The interface associated to the lowest system MAC address of the advertising switch is preferred next
4) When multiple links are associated to the same switch, the lowest port priority from the advertising switch is preferred
5) When multiple links are associated to the same switch, the lowest port number from the advertising switch is preferred
What do the 802.1W P2P, edge and non-edge port, port types mean?
P2P: Any port that connects to another RSTP switch with full duplex.
Full-duplex links do not permit more than two devices on a network segment, so determining whether a link is full duplex is the fastest way to check the feasibility of being connected to a switch.
Edge: A port at the edge of the network where hosts connect to the Layer 2 topology with one interface and cannot form a loop. These ports directly correlate to ports that have the STP portfast feature enabled.
Non-Edge: A port that has received a BPDU.
Describe the process of a STP Topology Change
1) The switch that detects a link status change sends a topology change notification (TCN) BPDU towards the root bridge, out of its RP
If an upstream switch receives the TCN, it sends out an acknowledgement and forwards the TC out of its RP to the root bridge
2) Upon receipt of the TCN, the root bridge creates a new configuration BPDU with the topology change flag set, and it is then flooded to all the switches.
3) When a switch receives the configuration BPDU with the Topology flag set, all switches change their MAC address timer to the forwarding delay timer (15 seconds by default). This flushes out the MAC addresses for devices that have not communicated in that 15-second window but maintains MAC addresses for devices that are actively communicating
What are the effects of Flushing the MAC address table during STP topology change?
It prevents a switch from sending traffic to a host that is no longer reachable by that port.
However, a side of effect is that it temporarily increases the unknown unicast flooding while it is rebuilt. This can impact hosts because of their CSMA/CD behavior.
The MAC address timer is then reset to normal (300 seconds by default) after the second configuration BPDU is received
What is PVST and PVST+? and What improvements do they provide?
Per-VLAN Spanning Tree and PVST+ are cisco proprietary spanning protocols to the IEEE rapid spanning tree protocol (802.1W). These protocols are incorporated with other enhancements to provider faster convergence
What are the RSTP (802.1W) Port States?
Discarding: The switch port is enabled, but the port is not forwarding any traffic to ensure that a loop is not created. This state combines the traditional STP states disabled, blocking, and listening.
Learning: The switch port modifies the MAC address table with any network traffic it receives. The switch still does not forward any other network traffic besides BPDUs.
Forwarding: The switch port forwards all network traffic and updates the MAC address table as expected. This is the final state for a switch port to forward network traffic.
What are the added RSTP (802.1W) Port Roles and what do they do?
Alternate Port: network port that provides alternate connectivity toward the root switch through a different switch.
Backup Port: A network port that provides link redundancy toward the shared segment within the same collision domain, which is typically a network hub.
Describe the process for Building the RSTP Topology
1) When two switches are connected, they verify that they are connected with a p2p link by checking the full-duplex status
Where is the ideally location for the root bridge?
The Core switch
What is the range of STP priority values? and what increments can you use increase/decrease it by?
0-61440
4096
What are the STP value set by the keyword primary and secondary?
Primary: 24,576
Secondary: 28,672