Chapter 9 - Spanning Tree Protocol Concepts Flashcards

1
Q

What is STP?

A
  • 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).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What IEEE standard number is applied to STP and RSTP?

A

STP - 802.1D
RSTP - 802.1w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does a port function when STP/RSTP sets it to blocking or forwarding?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Broadcast Storm?

A
  • 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).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is MAC Table Instability?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Multiple Frame Transmission?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

True or False. Interfaces that block learn MAC addresses of users from received frames but do not forward or process received user frames.

A

False. Interfaces that block will not learn MACs and will not forward user frames. They will receive BPDUs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is STP Convergence?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is STA?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the STP/RSTP-BID?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain the process of electing a Root Bridge

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the terms for a better (lower BID) and worse (higher BID) Hello ?

A
  • A better (Lower BID) Hello is called the Superior Hello
  • A worse (Higher BID) Hello is called the Inferior Hello
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Explain the process of a switch electing a Root Port

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True or False. Root ports and Designated ports can face both towards and away from the root bridge.

A

False. Root ports will always face towards the root bridge and Designated ports will always face away from the root bridge.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define Designated Port

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain the process of a Designated Port being elected on a LAN segment (Link)

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What ways are there for engineers to manually influence STP/RSTP decisions?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are the default port costs for various speeds of interfaces?

A

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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

By default, how often is a BPDU Hello message sent by the root bridge?

A

Every 2 seconds.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Describe how STP acts when nothing is changing in the network topology and it is stable.

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are the three timers used by STP?

A

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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are Roles and States in STP?

A
  • 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What process occurs when a port need to transition from blocking to forwarding?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

List port states and whether data will be forwarded while the port is in this state.

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

List port states and whether MAC addresses will be learnt from received frames while the port is in this state.

A

Blocking - Will not learn
Listening - Will not learn
Learning - Will learn
Forwarding - Will learn
Disabled - Will not learn
Discarding (RSTP Only) - Will not learn

26
Q

True or false. STP and RSTP can be used on different switches in the same network.

A

True. Interfaces on the RSTP switches that are connected to STP switches will operate like standard STP.

27
Q

Why was RSTP developed to replace STP?

A

STP is slower than RSTP. STP takes 50 seconds to complete the STP Convergence process whereas RSTP can take only a few seconds.

28
Q

List improvements RSTP made over STP

A
  • RSTP adds a mechanism by which a switch can replace its root port without waiting to reach a forwarding state. (Alternate port)
  • RSTP adds a mechanism to replace a designated port without waiting to reach a forwarding state. (Backup port)
  • RSTP lowers waiting times.
  • The RSTP MaxAge timer is 3 times Hello timer instead of STP’s 10 times.
  • RSTP can enquire with other switches to find out if an issue has occurred rather than having to wait for timers to elapse to know it.
  • RSTP allows each switch to generate its own Hello BPDU rather than having to wait for the root bridge to generate one so that they can forward it.
29
Q

Define Root Port

A
  • A root port always faces towards the root bridge.
  • It provides the best path for a non-root bridge to follow to reach the root bridge.
  • Hello BPDUs are not forwarded out of root ports.
30
Q

Define Disabled Port

A

A port that has been administratively disabled.

31
Q

True or false. RSTP uses a Listening and Learning state.

A

False. RSTP only uses a Learning state, not a Listening state unlike STP which uses both.

32
Q

Define a Point-to-Point port in relation to RSTP.

A
  • A port that connects two switches.
  • Functions in full duplex.
  • Switches should be able to detect if the link is point-to-point without it being configured.
  • Can be explicitly configured using the ‘spanning-tree link-type point-to-point’ command.
33
Q

Define a Edge Port in relation to RSTP.

A
  • A port that connects a switch to an end point.
  • Moves straight to forwarding without negotiation.
  • Just a port with PortFast enabled.
34
Q

Define a Shared Port in relation to RSTP.

A
  • A port that is connected to a Hub.
  • RSTP forces any shared links to use half duplex.
  • RSTP convergence occurs more slowly on Shared Ports as opposed to Point-to-Point and Edge Ports.
  • Can be explicitly configured using the ‘spanning-tree link-type shared’ command.
35
Q

What is EtherChannel?

A
  • EtherChannel combines multiple parallel links of equal speed (upto 8) between the same pair of switches.
  • An EtherChannel is treated as a single interface in regards to STP. As a result if one side of one of the EtherChannel links fails then convergence is not necessary.
  • If the links were not configured in an EtherChannel then all links would be blocked except one to prevent loops.
  • You can get Layer2 and Layer3 EtherChannels which each use their respective layer’s logic.
36
Q

What is PortFast?

A
  • A function that allows a switch to immediately transition from blocking to forwarding by passing STP Listening and Learning states.
  • This should only be enabled on ports that don’t have other STP responsive devices (e.g. Switches) connected or it could cause loops, so enabling it on ports that connect to end-user devices is the correct way to do this.
  • Will also only function on access ports. If it is enabled on a trunk port it won’t function.
  • Built into RSTP by default
37
Q

What is BPDU Guard?

A

This is a security method used on Cisco switches that disables ports if any BPDUs are received on that port. If BPDU Guard is not enabled it could pose certain security risks to the network such as:
- An attacker could connect a switch to a port without BPDU Guard enabled with a lower BID than any other switch causing it to become the root. This new topology could have performance issues compared to the original. Could also pose a data breach.

  • It makes sense to use this in conjunction with PortFast since PortFast should only be enabled on Edge ports that connect to end user devices. If an STP/RSTP responsive device is connected BPDU Guard could disable the port before it causes a loop.
38
Q

True or False. Hello BPDUs are sent/received out of all interfaces.

A

False. They are only sent out of designated ports.

39
Q

True or False. The Bridge Priority can be whatever number you want.

A

False. It has to be set as a multiple of 4096. The VLAN ID of this STP instance will be added to the priority to makeup the BID.

40
Q

What is the root port cost for ports on the Root Bridge?

A

0

41
Q

How would you find the Port Priority of interfaces on a switch?

A
  • The simples way would be just to see what port ID (e.g. G0/0) is lowest.
  • An alternative would be:
    ‘show spanning-tree’

Found in the prio.nbrs collumn

42
Q

In what order are Root Bridges, Designated Ports, and Root Ports elected?

A
  • Root Bridge
  • The lowest root port cost interface on each switch will become the Root Port
  • All remaining links will decide on a Designated Port determined by the lowest root port cost
  • Any left over interfaces will be put into a Blocking state.
43
Q

True or False. Every link has to have a Designated port.

A

True.

44
Q

True or False. Root ports can be connected to Blocking ports.

A

False.

45
Q

Examples of Stable STP states.

A
  • Blocking
  • Forwarding
46
Q

Examples of transitional STP states.

A
  • Listening
  • Learning
47
Q

True or False. All port roles can enter the Listening and Learning states.

A

False. Only Designated and Root ports enter the Listening and Learning states. Non-Designated ports (Blocking) won’t unless they become designated.

48
Q

Properties of Interfaces in a Listening and Learning state.

A

Listening - Blocking:
- Sends/receives BPDUs
- Does not send/receive regular traffic
- Does not learn MAC addresses from regular traffic
Learning - Blocking:
- Sends/receives BPDUs
- Does not send/receive regular traffic
- Does learn MAC addresses from regular traffic

49
Q

List port states and whether an interface sends/receives BPDUs while in this state

A

Blocking - Send No/Receive Yes
Listening - Send Yes/Receive Yes
Learning - Send Yes/Receive Yes
Forwarding - Send Yes/Receive Yes
Disabled - Send No/Receive No
Discarding (RSTP Only) - Send No/Receive Yes

50
Q

True or False. All switches create BPDUs in STP.

A

False. Only the route bridge creates BPDUs. All other switches will forward them.

51
Q

What destination MAC address does STP use to send BPDUs?

A

01:80:C2:00:00:00

52
Q

What are the two different types of BPDUs?

A
  • Configuration BPDU (Hello BPDU) - Sent by the root bridge and forwarded by non-root bridges to inform of configuration changes.
  • TCN (Topology Change Notification) - Sent by non-root bridges to the root bridge to inform of changes on a link.
53
Q

True or False. STP timers configured on the root bridge determine the timers for the whole network.

A

True. Even if they are configured differently on other switches.

54
Q

How do you reenable an interface that has been disabled by BPDU Guard?

A

Shutdown and then no shutdown on the interface.

55
Q

What is Root Guard?

A
  • An optional STP security feature.
  • When enabled on an interface, even if a superior BPDU is received on that interface, the local switch will not accept the new switch as the root bridge. The interface it has connected into will be put into a root-inconsistent state.
56
Q

What is Loop Guard?

A
  • An optional STP security feature.
  • When enabled on an interface, even if it stops receiving BPDUs, it won’t start forwarding. The interface will be disabled.
57
Q

True or False. In a packet capture, the Port ID is equal to the Port Priority.

A

False. Only the first half is.

It is disaplayed as 0x0000.

58
Q

What does the ‘spanning-tree portfast default’ command do?

A

Enables PortFast on all access interfaces.

59
Q

True or False. BackboneFast and UplinkFast have to be enabled manually on STP.

A

True. They are enabled by default in RSTP.

60
Q

What is the Protocol Version Identifier for STP?

A

0

61
Q

What is a BPDU?

A
  • Bridge Protocol Data Unit
  • A data unit that contains information about an STP topology and are sent by the root bridge.
  • For example, a Hello BPDU includes
    - Root Bridge ID
    - Sender’s Bridge ID
    - Sender’s Root Cost
    - Sender’s timer values