Chapter 9 - Spanning Tree Protocol Concepts Flashcards
What is STP?
- Spanning Tree Protocol
- Allows LANs to have redundancy by adding extra links, without also introducing looping into the network.
- Places redundant ports into a blocking state until required (e.g. because an active link has gone down).
What IEEE standard number is applied to STP and RSTP?
STP - 802.1D
RSTP - 802.1w
How does a port function when STP/RSTP sets it to blocking or forwarding?
- Forwarding - If a port is in forwarding mode then it will forward traffic as normal and will send/receive BPDUs.
- Blocking - If a port is in blocking mode then it will not send or receive traffic over that interface.
- It won’t even forward BPDUs, it will only listen for them amongst other overheads.
- It also won’t learn MAC addresses.
What is a Broadcast Storm?
- When any Ethernet frames (not just broadcast frames) loop around a LAN indefinitely. This can saturate all links of a LAN causing poor performance.
- The only thing that can stop this once it has started is if a link were to fail (e.g. an interface is shutdown).
What is MAC Table Instability?
- This can be caused by a broadcast storm.
- It is when the switches’ MAC address table constantly changes because frames with the same source MAC arrive on different ports.
- This will cause frames to be sent to the incorrect destination.
- Also known as MAC Address Flapping
What is Multiple Frame Transmission?
- Caused by a broadcast storm and looping frames.
- This is when multiple copies of a frame are forwarded to the intended host. The reason this happens is if SW1 doesn’t know the destination’s MAC, it will flood it to SW2 and SW3 (Behind which the destination resides). The destination will be reached by SW1 but SW2 will also flood the frame which SW3 will also receive and send to the end user destination.
True or False. Interfaces that block learn MAC addresses of users from received frames but do not forward or process received user frames.
False. Interfaces that block will not learn MACs and will not forward user frames. They will receive BPDUs.
What is STP Convergence?
The process by which switches collectively realise something has changed in the LAN topology (e.g. a link has dropped) and determines whether they need to change which ports block and which ports forward.
What is STA?
Spanning Tree Algorithm Is the logic that a switches use to determine a root bridge, the root ports, designated and non-designated ports for an STP topology. The process of this is.
- Electing a root bridge in which all interfaces are placed in a forwarding state (Designated Ports).
- Each connected switch (that isn’t a root bridge) considers one of its ports to have the least administrative cost between itsself and the root bridge (called the root cost). This port is then called the switch’s Root Port and is placed in a forwarding state.
- With two designated interfaces on a link the interface on the switch with the lowest root cost is placed in a forwarding state and is a designated port. This switch is a designated switch.
- Any other interfaces are placed in a blocking state.
What is the STP/RSTP-BID?
- The Bridge ID is a 64 bit value unique to each switch.
- It is used to identify the switch in an STP topology. The original formate for the BID consisted of:
- A 16 bit priority field
- A 48 bit system ID based off of the MAC address of the switch
Explain the process of electing a Root Bridge
- A root bridge is elected based on the switch’s BIDs.
- The switch with the lowest numerical value for its BID is elected as the root bridge. If one switch has a lower priority value than all other switches this will become the root bridge.
- If there is a tie between multiple switches for their priority values then the switch with the lowest MAC address portion of the BID will become the root.
- At the beginning of this process, all switches consider themselves as the root, so they send a BPDU listing their BID as the root BID.
- If a switch receives a Hello that lists a lower BID, that switch stops advertising itsself as the root and will instead forward the Hello with the lower BID.
- Once the Root Bridge has been elected, only the Root Bridge sends BPDUs
- Other switches will forward BPDUs but not generate their own
What are the terms for a better (lower BID) and worse (higher BID) Hello ?
- A better (Lower BID) Hello is called the Superior Hello
- A worse (Higher BID) Hello is called the Inferior Hello
Explain the process of a switch electing a Root Port
- A switch elects its root port based on the lowest root cost. This cost is defined as the sum of costs of all the switch ports that a frame would exit if it flowed over a particular path (outbound).
- In order to work this out a switch will add their local interface cost to the root cost received in each other switch’s Hello BPDU.
- If a tie occurs between multiple potential root ports then the tie is broken based off of the below criteria:
- Firstly the switch’s neighbors BID will be checked to see which is lowest.
- If the above doesn’t work they will choose based on the switch’s neighbors lowest port priority.
True or False. Root ports and Designated ports can face both towards and away from the root bridge.
False. Root ports will always face towards the root bridge and Designated ports will always face away from the root bridge.
Define Designated Port
- A Designated Port is a port that forward traffic onto a LAN segment.
- All Designated Ports are placed into a Forwarding state by default.
- All ports on a switch that connect to end devices are Designated Ports but should be made Edge ports so that they don’t forward BPDUs and go through the STP port states.
Explain the process of a Designated Port being elected on a LAN segment (Link)
- When a non-root bridge forwards a Hello, this switch sets the root cost field in the Hello to that switch’s cost to reach the root.
- The port on the switch with the lowest cost to reach the root becomes the Designated Port for that segment.
- If a tie occurs between the two switches on the segment then the tie is broken by choosing the switch with the lowest
What ways are there for engineers to manually influence STP/RSTP decisions?
- The engineer could change the BID of a switch by amending the Priority. The MAC part of the BID will stay the same but setting the priority to lower than all other switches in a topology will cause this switch to become the root bridge. The System ID Extension can also not be changed as it is determined by the VLAN but this is added on top of the Bridge Priority.
- The engineer could change the port cost of a port connected to a link.
What are the default port costs for various speeds of interfaces?
These costs are based on the actual operating speed of the interface, not the maximum speed (e.g. a 10/100/1000 interface running at 100 mbps would have a cost of 19). Costs on the left are based on STP, costs on the left are based on RSTP.
- 10 mbps - 100 (According to 1998 802.1D standard) 2,000,000 (According to 2004 802.1Q standard)
- 100 mbps - 19 (According to 1998 802.1D standard) 200,000 (According to 2004 802.1Q standard)
- 1 gbps - 4 (According to 1998 802.1D standard) 20,000 (According to 2004 802.1Q standard)
- 10 gbps - 2 (According to 1998 802.1D standard) 2000 (According to 2004 802.1Q standard)
- 100 gbps - N/A (According to 1998 802.1D standard) 200 (According to 2004 802.1Q standard)
- 1 tbps - N/A (According to 1998 802.1D standard) 20 (According to 2004 802.1Q standard)
By default, how often is a BPDU Hello message sent by the root bridge?
Every 2 seconds.
Describe how STP acts when nothing is changing in the network topology and it is stable.
- The root bridge creates and send Hello BPDUs every 2 seconds with a root cost of 0 out of all of its working interfaces that are in a forwarding state.
- The non-root bridges receive these BPDUs and amend the sender’s BID to their own BID and the root cost to their own root cost. This will then be forwarded out all designated ports.
- The first two steps will repeat until something changes in the topology.
What are the three timers used by STP?
The below three timers are defined by the root bridge and are listed in the root bridge’s Hello BPDUs.
- Hello - 2 seconds (by default) - The interval at which Hellos are sent by the root bridge.
- MaxAge - 10 times Hello timer (by default) - How long a switch will wait after ceasing to hear Hellos before trying to change the STP topology. When MaxAge expires the switch makes all of its STP decisions again based off the information received in any Hellos sent by other switches. (e.g. Root Bridge, Root Port, Designated Port decisions).
- Forward delay - 15 seconds (by default) - How long an interface stays in the Listening/Learning states. 15 seconds each.
What are Roles and States in STP?
- Roles (E.g. Root port and Designated port) relate to how STP analyzes the LAN topology.
- States (E.g. Forwarding and Blocking) determine how a port will process traffic.
When STP convergence occurs, switches choose new port roles and the port roles determine the port states.
What process occurs when a port need to transition from blocking to forwarding?
- When a port moves from forwarding to blocking, this is done instananeously.
- To move from blocking to forwarding, this can take upto 50 seconds.
- The interface will be put into a Listening state (for the duration of the Forward delay timer) so that the switch can remove stale MAC address entries for which no frames are received from during this period.
- These stale entries could be causing loops.
- The interface is then put into a Learning state (for the duration of the Forward delay timer) but in this state the switch will begin to learn the MAC addresses of frames received on the interface.
- It then moves to the forwarding state
List port states and whether data will be forwarded while the port is in this state.
Blocking - Will not forward
Listening - Will not forward
Learning - Will not forward
Forwarding - Will forward
Disabled - Will not forward
Discarding (RSTP Only) - Will not forward