Ch 2: Spanning Tree Protocol Flashcards

1
Q

How many different BPDU types are there?

a. One
b. Two
c. Three
d. Four

A

B. There are two BPDU types: the configuration BPDU and topology change notification BPDU.

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

What attribute is used to elect a root bridge?

a. Switch port priority
b. Bridge priority
c. Switch serial number
d. Path cost

A

B. The switch with the lowest bridge priority is elected as the root bridge. In the event of a tie, the bridge MAC address is used to elect a root bridge.

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

The original 802.1D specification assigns what value to a 1 Gbps interface?

a. 1
b. 2
c. 4
d. 19

A

C. The original 802.1D specification set the value of 4 for a 1 Gbps interface.

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

All of the ports on a root bridge are assigned what role?

a. Root port
b. Designated port
c. Superior port
d. Master port

A

B. All of the ports on a root bridge are assigned the designated port role.(forwarding)

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

Using default settings, how long does a port stay in the listening state?

a. 2 seconds
b. 5 seconds
c. 10 seconds
d. 15 seconds

A

D. The default 802.1D specification places a switch port in the listening state for 15 seconds

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

Upon receipt of a configuration BPDU with the topology change flag set, how do the downstream switches react?

a. By moving all ports to a blocking state on all switches
b. By flushing out all MAC addresses from the MAC address table
c. By temporarily moving all non-root ports to a listening state
d. By flushing out all old MAC addresses from the MAC address table
e. By updating the Topology Change version flag on the local switch database

A

D. Upon receipt of a TCN BPDU, a switch sets the age for all MAC addresses to 15 seconds. Non-active/older entries are flushed from the MAC address table.

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

Which of the following is not an RSTP port state? (choose two)

a. Blocking
b. Listening
c. Learning
d. Forwarding

A

A and B. The blocking and listening states have been combined into the discarding state of RSTP.

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

True or false: In a large Layer 2 switch topology, the infrastructure must fully converge before any packets can be forwarded.

a. True
b. False

A

B. False. STP allows for traffic to flow between switches once a root bridge has been elected and the ports have gone through the appropriate listening and learning stages.

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

True or false: In a large Layer 2 switch topology that is running RSTP, the infrastructure must fully converge before any packets can be forwarded.

a. True
b. False

A

B. False. RSTP allows for traffic to flow between switches that have synchronized with each other, while other parts of the Layer 2 topology converge.

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

T/F: PVST+, RSTP, and MST modes are backward compatible with 802.1D

A

Catalyst switches now operate in PVST+, RSTP, and MST modes. All three of these modes are backward compatible with 802.1D.

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

What are 802.1D, 802.1W and 802.1S?

A

STP has multiple iterations:

  • 802.1D, which is the original specification
  • Per-VLAN Spanning Tree (PVST)
  • Per-VLAN Spanning Tree Plus (PVST+)
  • 802.1W Rapid Spanning Tree Protocol (RSTP)
  • 802.1S Multiple Spanning Tree Protocol (MST)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

List and define the 802.1D port states.

A
  • Disabled: The port is in an administratively off position (that is, shut down).
  • Blocking: The switch port is enabled, but the port is not forwarding any traffic to ensure that a loop is not created. The switch does not modify the MAC address table. It can only receive BPDUs from other switches.
  • Listening: The switch port has transitioned from a blocking state and can now send or receive BPDUs. It cannot forward any other network traffic. The duration of the state correlates to the STP forwarding time. The next port state is learning.
  • Learning: The switch port can now modify the MAC address table with any network traffic that it receives. The switch still does not forward any other network traffic besides BPDUs. The duration of the state correlates to the STP forwarding time. The next port state is forwarding.
  • Forwarding: The switch port can forward all network traffic and can update the MAC address table as expected. This is the final state for a switch port to forward network traffic.
  • Broken: The switch has detected a configuration or an operational problem on a port that can have major effects. The port discards packets as long as the problem continues to exist.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

List and define the 802.1D port types.

A
  • 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 that is not forwarding traffic because of STP calculations.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the destination MAC address of a BPDU?

A

Bridge protocol data unit (BPDU): This network packet 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, the multicast address reserved for STP.

There are two types of BPDUs:

Configuration BPDU: This type of BPDU is 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: This type of BPDU is used to communicate changes in the Layer 2 topology to other switches. This is explained in greater detail later in the chapter.

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

What is STP ‘system priority’?

A

System priority: This 4-bit value indicates the preference for a switch to be root bridge. The default value is 32,768. Same as Bridge Priority.

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

What is the STP ‘max age’ timer?

What is the default?

What is the command to change this?

A

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.

The default value is 20 seconds, but the value can be configured with the command:

  • spanning-tree vlan vlan-id max-age maxage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the default Hello time interval in STP?

What is the command to change the hello time?

A

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.

18
Q

What is STP ‘forward delay’?

A

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 15 to 30 seconds with the command spanning-tree vlan vlan-id forward-time forward-time.

19
Q

Define STP cost, both short and long.

A

The interface STP cost is an essential component for root path calculation because the root path is found based on the cumulative interface STP cost to reach the root bridge. The interface STP cost was originally stored as a 16-bit value with a reference value of 20 Gbps. As switches have developed with higher-speed interfaces, 10 Gbps might not be enough. Another method, called long mode, uses a 32-bit value and uses a reference speed of 20 Tbps. The original method, known as short mode, is the default mode.

Table 2-2 displays a list of interface speeds and the correlating interface STP costs.

20
Q

How can devices be configured to us the ‘long-mode interface cost’ with STP?

A

Devices can be configured with the long-mode interface cost with the command spanning-tree pathcost method long. The entire Layer 2 topology should use the same setting for every device in the environment to ensure a consistent topology. Before enabling this setting in an environment, it is important to conduct an audit to ensure that the setting will work.

21
Q

When a switch examines a configuration BPDU to determine the Root Port it uses the following logic. Put them in order!

  • When multiple links are associated to the same switch, the lower port number from the advertising switch is preferred.
  • The interface associated to the lowest system priority of the advertising switch is preferred next.
  • The interface associated to lowest path cost is more preferred.
  • When multiple links are associated to the same switch, the lowest port priority from the advertising switch is preferred.
  • The interface associated to the lowest system MAC address of the advertising switch is preferred next.
A

Locating Root Ports

After the switches have identified the root bridge, they must determine their root port (RP). The root bridge continues to advertise configuration BPDUs out all of its ports. The switch compares the BPDU information to identify the RP. The RP is selected using the following logic (where the next criterion is used in the event of a tie):

  1. The interface associated to lowest path cost is more preferred.
  2. The interface associated to the lowest system priority of the advertising switch is preferred next. (Bridge ID)
  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 lower port number from the advertising switch is preferred.

To simplify:

  1. lowest path cost becomes root port
  2. tie? use lowest system priority of the advertising switch…
  3. Still tied?? use the lowest system MAC address of the advertising switch…
  4. multiple ports? use port-priority.
  5. multiple ports with a tie?? use lower port number.
22
Q

When examining an STP domain what command is useful for locating the root bridge?

A

The root bridge can be identified for a specific VLAN through the use of the command show spanning-tree root and examination of the CDP or LLDP neighbor information to identify the host name of the RP switch. The process can be repeated until the root bridge is located.

23
Q

When the command show spanning-tree root is run on a root bridge what are the values for ‘Root Port’ and ‘Root Cost’?

A

The ‘Root Port’ is empty/null and the ‘Root Cost’ value is 0.

The output of show spanning-tree root includes the VLAN number, root bridge identifier, root path cost, hello time, max age time, and forwarding delay.

Because SW1 is the root bridge, all ports are designated ports, so the Root Port field is empty. This is one way to verify that the connected switch is the root bridge for the VLAN.

The advertised root path cost is always the value calculated on the local switch. As the BPDU is received, the local root path cost is the advertised root path cost plus the local interface port cost. The root path cost is always zero on the root bridge.

24
Q

What is the root bridge priority of VL10 on SW1 in an STP domain with the default bridge priority set on the switch?

A

The root bridge priority on SW1 for VLAN 10 is 32,778 and not 32,768. The priority in the Configuration BPDU packets is actually the priority plus the value of the sys-id-ext (which is the VLAN number). This means that VLAN 10 has a priority of 32,778, which is 10 higher than 32,768.

25
Q

Two ports are connected between two non-root switches. What is the logic to calculate which ports should be blocked between these two switches? Hint: there are 4 steps.

A
  1. The interface is a designated port and must not be considered an RP.
  2. The switch with the lower path cost to the root bridge forwards packets, and the one with the higher path cost blocks. If they tie, they move on to the next step.
  3. The system priority of the local switch is compared to the system priority of the remote switch. The local port is moved to a blocking state if the remote system priority is lower than that of the local switch. If they tie, they move on to the next step.
  4. The system MAC address of the local switch is compared to the system MAC of the remote switch. The local designated port is moved to a blocking state if the remote system MAC address is lower than that of the local switch. If the links are connected to the same switch, they move on to the next step.
26
Q

What command will show the STP port state of a switch port?

A

The command show spanning-tree [vlan vlan-id] provides useful information for locating a port’s STP state. The first portion of the output displays the relevant root bridge’s information, which is followed by the local bridge’s information. The associated interface’s STP port cost, port priority, and port type are displayed as well. All of SW1’s ports are designated ports (DP) because SW1 is the root bridge.

27
Q

T/F: All the interfaces that participate in a VLAN are listed in the output of the command show spanning-tree

A

True.

Using this command can be a daunting task for trunk ports that carry multiple VLANs. The output includes the STP state for every VLAN on an interface for every switch interface. The command show spanning-tree interface interface-id [detail] drastically reduces the output to the STP state for only the specified interface.

The optional detail keyword provides information on port cost, port priority, number of transitions, link type, and count of BPDUs sent or received for every VLAN supported on that interface.

If a VLAN is missing on a trunk port, you can check the trunk port configuration for accuracy.

A common problem is that a VLAN may be missing from the allowed VLANs list for that trunk interface.

28
Q

T/F: In a stable Layer 2 topology, configuration BPDUs always flow to the root bridge from the edge switches.

A

True.

In a stable Layer 2 topology, configuration BPDUs always flow from the root bridge toward the edge switches.

However, changes in the topology (for example, switch failure, link failure, or links becoming active) have an impact on all the switches in the Layer 2 topology. In this case, BPDUs flow from the edge to the root switch.

The switch that detects a link status change sends a topology change notification (TCN) BPDU toward the root bridge, out its RP. If an upstream switch receives the TCN, it sends out an acknowledgment and forwards the TCN out its RP to the root bridge.

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. When a switch receives a configuration BPDU with the Topology Change flag set, all switches change their MAC address timer to the forwarding delay timer (with a default of 15 seconds). This flushes out MAC addresses for devices that have not communicated in that 15-second window but maintains MAC addresses for devices that are actively communicating.

Flushing the MAC address table prevents a switch from sending traffic to a host that is no longer reachable by that port. However, a side effect of flushing the MAC address table is that it temporarily increases the unknown unicast flooding while it is rebuilt. Remember that 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.

29
Q

T/F: TCNs are generated on a VLAN basis.

A

True.

TCNs are generated on a VLAN basis, so the impact of TCNs directly correlates to the number of hosts in a VLAN. As the number of hosts increase, the more likely TCN generation is to occur and the more hosts that are impacted by the broadcasts. Topology changes should be checked as part of the troubleshooting process. Chapter 3 describes mechanisms such as portfast that modify this behavior and reduce the generation of TCNs.

30
Q

What command can be used to show topology changes in an STP domain?

A

Topology changes are seen with the command show spanning-tree [vlan vlan-id] detail on a switch bridge. The output of this command shows the topology change count and time since the last change has occurred. A sudden or continuous increase in TCNs indicates a potential problem and should be investigated further for flapping ports or events on a connected switch. The attached diagram includes the time since the last TCN was detected and the interface from which the TCN originated.

The process of determining why TCNs are occurring involves checking a port to see whether it is connected to a host or to another switch. If it is connected to another switch, you need to connect to that switch and repeat the process of examining the STP details. You might need to examine CDP tables or your network documentation. You can execute the show spanning-tree [vlan vlan-id] detail command again to find the last switch in the topology to identify the problematic port. That port will be the source of your problems.

31
Q

What is 802.1W?

A

802.1W is RSTP, the IEEE standard.

Cisco created Per-VLAN Spanning Tree (PVST) and Per-VLAN Spanning Tree Plus (PVST+) to allow more flexibility.

PVST and PVST+ were proprietary spanning protocols. The concepts in these protocols were incorporated with other enhancements to provide faster convergence into the IEEE 802.1W specification, known as Rapid Spanning Tree Protocol (RSTP).

32
Q

What are the three RSTP port states?

A

RSTP reduces the number of port states to three:

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.

33
Q

T/F: RSTP on a switch can cause a 30 second delay for printers, pcs etc?

A

True.

A switch tries to establish an RSTP handshake with the device connected to the other end of the cable. If a handshake does not occur, the other device is assumed to be non-RSTP compatible, and the port defaults to regular 802.1D behavior. This means that host devices such as computers, printers, and so on still encounter a significant transmission delay (around 30 seconds) after the network link is established.

34
Q

What are the four port roles for RSTP?

A

RSTP defines the following port roles:

  • Root port (RP): A network port that connects to the root switch 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 frames to other switches. Designated ports provide connectivity to downstream devices and switches. There should be only one active designated port on a link.
  • Alternate port: A 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 current root switch. The backup port cannot guarantee connectivity to the root bridge in the event that the upstream switch fails. A backup port exists only when multiple links connect between the same switches.
35
Q

How many DPs should be on a link between switches?

A

There should be only one active designated port on a link.

Designated port (DP): A network port that receives and forwards frames to other switches. Designated ports provide connectivity to downstream devices and switches.

36
Q

What are the three types of RSTP port types?

A

RSTP defines three types of ports that are used for building the STP topology:

  • Edge port: 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.
  • Root port: A port that has the best path cost toward the root bridge. There can be only one root port on a switch.
  • Point-to-point port: 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.
37
Q

With RSTP, switches exchange handshakes with other RSTP switches to transition through the following STP states faster. When two switches first connect, they establish a bidirectional handshake across the shared link to identify the root bridge.

RSTP uses a synchronization process to add a switch to the RSTP topology without introducing a forwarding loop. The synchronization process starts when two switches (such as SW1 and SW2) are first connected.

Put these synchronization steps in order:

  • They establish a handshake with each other to advertise a proposal (in configuration BPDUs) that their interface should be the DP for that port.
  • The inferior switch (SW2) moves its RP (Gi1/0/1) to a forwarding state. The superior switch moves its DP (Gi1/0/2) to a forwarding state, too.
  • There can be only one DP per segment, so each switch identifies whether it is the superior or inferior switch, using the same logic as in 802.1D for the system identifier (that is, the lowest priority and then the lowest MAC address). Using the MAC addresses from Figure 2-1, SW1 (0062.ec9d.c500) is the superior switch to SW2 (0081.c4ff.8b00).
  • The inferior switch (SW2) sends an agreement (configuration BPDU) to the root bridge (SW1), which signifies to the root bridge that synchronization is occurring on that switch.The inferior switch (SW2) repeats the process for any downstream switches connected to it.
  • As the first two switches connect to each other, they verify that they are connected with a point-to-point link by checking the full-duplex status.
  • The inferior switch (SW2) recognizes that it is inferior and marks its local port (Gi1/0/1) as the RP. At that same time, it moves all non-edge ports to a discarding state. At this point in time, the switch has stopped all local switching for non-edge ports.
A
  1. As the first two switches connect to each other, they verify that they are connected with a point-to-point link by checking the full-duplex status.
  2. They establish a handshake with each other to advertise a proposal (in configuration BPDUs) that their interface should be the DP for that port.
  3. There can be only one DP per segment, so each switch identifies whether it is the superior or inferior switch, using the same logic as in 802.1D for the system identifier (that is, the lowest bridge priority and then the lowest MAC address). Using the MAC addresses from Figure 2-1, SW1 (0062.ec9d.c500) is the superior switch to SW2 (0081.c4ff.8b00).
  4. The inferior switch (SW2) recognizes that it is inferior and marks its local port (Gi1/0/1) as the RP. At that same time, it moves all non-edge ports to a discarding state. At this point in time, the switch has stopped all local switching for non-edge ports.
  5. The inferior switch (SW2) sends an agreement (configuration BPDU) to the root bridge (SW1), which signifies to the root bridge that synchronization is occurring on that switch.
  6. The inferior switch (SW2) moves its RP (Gi1/0/1) to a forwarding state. The superior switch moves its DP (Gi1/0/2) to a forwarding state, too.
  7. The inferior switch (SW2) repeats the process for any downstream switches connected to it.
38
Q

What is the command to set the STP max age?

A

spanning-tree vlan vlan-id max-age maxage

39
Q

What is the command to set STP hello timer?

A

spanning-tree vlan vlan-id hello-time hello-time

40
Q

What is the command to set the STP forwarding delay?

A

spanning-tree vlan vlan-id forward-time forward-time