Practice Q's - STP Flashcards

1
Q

Which Cisco component can be enabled on a switch port connected to a workstation to dramatically decrease the time a workstation must wait for spanning tree to converge?

A. PortFast

B. UplinkFast

C. EtherChannel

D. FastEthernet

A

Answer: A

Explanation:

When PortFast is enabled on a port, the attached end station can join the network almost immediately rather than waiting up to 50 seconds for spanning tree to converge. Instead of waiting for STP to cycle through the learning and blocking states, PortFast will place the port in the forwarding state immediately. PortFast does not disable Spanning Tree but instead causes it to skip some of the unnecessary steps. PortFast is also sometimes referred to as fast-start.

The following command enables PortFast:

  • switch(config-if)# spanning-tree portfast

You should only enable PortFast on a port that connects an end station. Enabling PortFast on a port that connects another switch could create a loop.

UplinkFast decreases convergence time to less than five seconds for inter-switch links. With UplinkFast enabled, the switch places the blocked port into the forwarding state once the switch detects a link failure. Without UplinkFast, all ports would stop forwarding during STP convergence.

EtherChannel and Gigabit EtherChannel provide the ability to combine up to eight physical links into one virtual link. When all links are up, traffic is load-balanced across all the links. However, if one link fails, the additional links can still provide connectivity. EtherChannel provides redundant links with bandwidths of from 200 to 800 Mbps. Recovery, in the event of link failure, typically takes place in a few microseconds or milliseconds and is transparent to users.

FastEthernet refers to a type of Ethernet (Fast Ethernet) and does not enhance STP convergence.

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

What is the first step STP performs to establish a loop-free spanning tree in a switched network?

A. Elects a root switch

B. Disables redundant loops in the tree

C. Sets a priority for each redundant link

D. Selects a designated switch for each switched segment

A

Answer: A

Explanation:

The first step taken by the Spanning-Tree Protocol (STP) is to elect a root bridge (switch). The root bridge keeps the STP database. The bridge ID is used to select the root bridge in the network. The bridge ID is a combination of the priority of the bridge (switch) and the MAC address. If two switches or bridges have the same priority value, the switch with the lowest MAC address will have the lowest priority and become the root bridge.

Once the STP process is complete (after switches go through the learning and listening stages), STP disables redundant loops in the network.

STP does not set a priority for each redundant link. The network administrator can manually set the priority of a switch. STP then uses the priority and the switch’s MAC address to calculate the bridge ID, which is used to select the root bridge.

STP does not first select a designated switch for each switched segment. The first goal of STP is to select a root bridge for a switched segment (VLAN).

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

Examine the following partial output of the show run command. The command was executed from Switch A, which is connected to Switch B through both the Fa0/1 interface and the Fa0/2 interface. Switch A is the root bridge.

Only one of the links is being used. Your intention was to load share the traffic using both links.

What commands do you need to execute to accomplish this? (Choose two. Each correct answer is part of the solution.)

A. switchA(config)# interface fa0/2

switchA(config-if)#spanning-tree vlan 1-3 port-priority 16

B. switchA(config)# interface fa0/1

switchA(config-if)#spanning-tree vlan 4-6 port-priority 16

C. switchA(config)# interface fa0/1

switchA(config-if)#spanning-tree vlan 1-3 port-priority 128

D. switchA(config)# interface fa0/2

switchA(config-if)#spanning-tree vlan 4-6 port-priority 128

E. switchA(config)# interface fa0/1

switchA(config-if)#spanning-tree port-priority 20

F. switchA(config)# interface fa0/2

switchA(config-if)#spanning-tree port-priority 20

A

Answer: A,B Explanation:

The correct commands to load share the traffic using both links are:

  • switchA(config)# interface fa0/2
  • switchA(config-if)# spanning-tree vlan 1-3 port-priority 16
  • switchA(config)# interface fa0/1
  • switchA(config-if)# spanning-tree vlan 4-6 port-priority 16

The configuration that was reflected in the exhibit in the show run output indicated that VLANs 1 through 6 were configured under both interfaces. However, the normal operation of STP will block one of the interfaces to prevent a loop. By default, all VLANs are allowed on both trunk links. Load sharing allows you to send some of the VLANs over one of the links and the rest on the other. In this case, the correct option will send VLANs 1-3 over Fa0/1 and VLANs 4-6 over Fa0/2.

By altering the port priority of the VLAN 1-3 on one interface and VLANs 4-6 on the other on the root bridge (Switch A) with the port-priority keyword, the behavior of STP is altered on the other switch. The port priority value must be set in increments of 16. Now Switch A will send VLANs 1-3 over one interface without blocking and 4-6 over the other interface without blocking. The additional benefit to this configuration is that if either link goes down, all VLANs can be sent over the remaining link and until the redundant link comes back up.

The commands below will have no effect because the default port priority is already 128, so the situation will remain the same:

  • switchA(config)# interface fa0/1
  • switchA(config-if)# spanning-tree vlan 1-3 port-priority 128
  • switchA(config)# interface fa0/2
  • switchA(config-if)# spanning-tree vlan 4-6 port-priority 128

The commands below will have no effect because they omit the vlan 1-3 and vlan 4-6 parameters, and therefore change the port priority for all VLANs. Since the port priority is changed equally on both interfaces, there will be no load sharing as a result. More over the priority value is not entered in an increment of 16, which will generate an error message indicating that it must be set in increments of 16.

  • switchA(config)# interface fa0/1
  • switchA(config-if)# spanning-tree port-priority 20
  • switchA(config)# interface fa0/2
  • switchA(config-if)# spanning-tree port-priority 20
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How long does it take for a port to transition from the STP blocking state to the forwarding state by default?

A. 2 seconds

B. 10 seconds

C. 25 seconds

D. 50 seconds

E. 70 seconds

A

Answer: D

Explanation:

It usually takes 50 seconds for a port to transition from the blocking state to the forwarding state in STP. This delay is a function of the default settings for the forward-delay and max-age settings.

The max-age delay is 20 seconds by default, and is used to transition from the blocking to the listening state. The forward-delay setting is 15 seconds by default. This timer is used in the transition from the listening to learning states, and again for the transition from the learning to the forwarding state. These timers give STP time to gather the correct information about the network topology. While they can be modified to make convergence more efficient, the default settings work for most networks. To change the timers on all switches in the VTP domain, change the timer settings on the root bridge and the changes will be forwarded to the other switches.

To prevent switching loops, spanning tree transitions each port through several states whenever there is a change in the network topology. Each state is briefly defined as follows:

NOTE: One of the issues that can adversely affect the operation of STP is a duplex mismatch between the NICs on either end of a link between two switches. While this causes more of a performance problem than a loss of the link, the intermittent nature of the outage can cause one of the other links on the switch to transition into a forwarding state, as it may interpret this as a loss of connectivity. If one of the other links switches to forwarding and the link with the duplex mismatch comes back online (which could happen quickly), it can create a switching loop.

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

Which command produced the following output?

A. switch# show spanning-tree vlan 100

B. switch# show vlan 100

C. switch# show spanning-tree summary

D. switch# show interface vlan 100

E. switch# show spanning-tree inconsistentports

A

Answer: A

Explanation:

The command show spanning-tree vlan 100 was used to provide the output in the exhibit. This output helps to identify the state of each port on the switch that is a member of VLAN 100. It is also used to identify the root bridge in the spanning tree.

The command show vlan 100 will provide basic information about VLAN 100, such as what ports are assigned to it, but will not display the STP information about the VLAN as the exhibit shows.

The command show spanning-tree summary can be used to verify the enabling of the extended system ID. This command is not used to provide the output in the exhibit.

The command show interface vlan 100 displays the same kind of information as would be displayed for any other interface, including the IP address configuration and whether the interface is up. It does not provide STP information about the switch as displayed in the exhibit.

The command show spanning-tree inconsistent port is used to identify inconsistent ports on a switch. This can occur as a result of implementing the Root Guard feature on a switch. Root Guard can be implemented on a port to prevent the reception of superior BPDUs from causing a new root bridge from being elected. This can sometimes occur when a new switch is introduced with an unknown bridge ID. When a port is configured with Root Guard and it receives a superior BPDU, it will block the port, discard the BPDU, and assign a state of inconsistent to the port.

Below is an example of the partial output of the show spanning-tree inconsistent ports command:

The output shows that devices connected to ports Fa0/1 and Fa0/2 are sending superior BPDUs

(perhaps from a new switch). Because of this, no traffic will be forwarded across the ports. Once these superior BPDUs are stopped by changing the priority of the new switch, the interfaces will recover and resume normal operation.

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

Refer to the following partial output of the show spanning-tree command.

Which of the following statements are TRUE for the given output? (Choose all that apply.)

A. SW1 is the root bridge for VLAN0001

B. Fa0/2 is the root port for VLAN0001

C. The switch having the 0A61.0015.4D02 bridge ID is the root bridge for VLAN0001

D. The switch having the 0F2C.08A1.330E bridge ID is the root bridge for VLAN0001

E. The switch connected to the Fa0/6 port of SW1 is using its root port

F. The port Fa0/4 is in a blocking state for VLAN 0121

G. The STP protocol in use is RSTP

A

Answer: B,C,E

Explanation:

The following statements are correct about the given output:

The value in the Role column in the output for VLAN0001 is Root for the Fa0/2 port of SW1. This implies that the Fa0/2 port is a root port. A root port is the port on a non-root bridge that has the least cost to reach the root bridge. Every non-root bridge must elect a root port. A root bridge does not have any root ports.

The output for VLAN0121 specifies Desg in the Role column for the Fa0/6 port of SW1. This implies that the Fa0/6 port is a designated port. This means that the switch on the other end is using its root port.

The switch having the 0A61.0015.4D02 bridge ID is the root bridge for VLAN0001. For VLAN0001, the bridge ID of the root and the local switch are different. The bridge ID of the local switch (SW1) is 0F2C.08A1.330E, while the bridge ID of the root bridge is 0A61.0015.4D02. The text Port 1 (FastEthernet0/2) in the Root ID section for VLAN0001 in the output indicates that the root bridge is connected to the Fa0/2 port of the local switch.

The options stating that SW1 is the root bridge for VLAN0001 and that the switch having the 0F2C.08A1.330E bridge ID is the root bridge for VLAN0001 are incorrect. The Bridge ID section in the output for VLAN0001 and VLAN0121 specifies the bridge ID of the local switch. In this case, the bridge ID of the local switch (SW1) is 0F2C.08A1.330E. SW1 is not the root bridge for VLAN001; however, SW1 is the root bridge for VLAN0121.

You can determine if a local switch is the root bridge by any of the following:

The port Fa0/4 is NOT in a blocking state for VLAN 0121. As indicated in the STS column for Fa0/4 under the section on VLAN 0121, it states that is in an a FWD (forwarding) state.

The STP protocol in use is NOT Rapid Spanning Tree protocol (RSTP). If that were the case, the output would display Spanning tree enabled protocol rstp, rather than Spanning tree enabled protocol ieee. This indicates that IEEE 802.1d is in use.

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

You have three switches connected as shown in the diagram below: S1, S2, and S3.

You instructed your assistant to configure the switches so that the following requirements would be met:

Switch 1 should be the root bridge for VLAN A

VLAN C should forward over the Gig 1/0/1 link between Switch 2 and Switch 3 VLAN B should forward over the Gig 1/0/2 link between Switch 2 and Switch 3

However, after your assistant performs the configuration, you discover that: Switch 2 is the root bridge for VLAN A. VLAN C is forwarding over the Gig 1/0/2 link between Switch 2 and Switch 3 VLAN B is forwarding over the Gig 1/0/1 link between Switch 2 and Switch 3

When you execute the show spanning tree command on Switch 2, you determine that all link costs and priorities are set at the defaults.

Which of the following actions performed on Switch 2 would enable the desired configuration? (Choose three. Each correct answer is part of one solution.)

A. switch2(config)# spanning-tree vlan a priority 61440

B. switch2(config)# spanning-tree vlan a priority 1

C. switch2(config)# int G1/0/2switch2(config-if)# spanning-tree vlan b cost 1

D. switch2(config)# int G1/0/2switch2(config-if)# spanning-tree vlan b cost 19

E. switch2(config)# int G1/0/1switch2(config-if)# spanning-tree vlan c port-priority 64

F. switch2(config)# int G1/0/1switch2(config-if)# spanning-tree vlan c port-priority 128

A

Answer: A,C,E

Explanation:

The commands that will achieve the desired results are:

  • switch2(config)# spanning-tree vlan a priority 61440
  • switch2(config)# interface G1/0/2
  • switch2(config-if)# spanning-tree vlan b cost 1
  • switch2(config)# interface G1/0/1
  • switch2(config-if)# spanning-tree vlan c port-priority 64

The first command raises the bridge priority for Switch 2 with respect to VLAN A, which will cause Switch 1 to be the root bridge for VLAN A. By default, the bridge priorities for Switch 2 and Switch 3 will set to 32769.

The second command will lower the cost of G1/0/2 with respect to VLAN B. Since the cost for G1/0/1 is the default cost of 4, this will cause interface G1/0/2 to become the root port for VLAN B, which will in turn cause it to forward instead of block for VLAN B.

The third command will lower the port priority for G1/0/1 with respect to VLAN C. Since the port priority of G1/0/2 will remain set at the default of 128, this will result in switching the ports that are blocking and forwarding. The end result will be that VLAN C will start forwarding over the Gig 1/0/1 link between Switch 2 and Switch 3.

The other commands will have no effect because they change the cost and port priority to the defaults, which are how the links are currently set.

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

At which OSI layer does STP operate?

A. Physical

B. Network

C. Transport
D. Data Link

A

Answer: D

Explanation:

Spanning Tree Protocol (STP) operates at the Data Link layer (Layer 2) of the OSI model.

Switches and bridges running the spanning-tree algorithm communicate by exchanging multicast messages called bridge protocol data units (BPDUs) at regular intervals. BPDUs are used to build and maintain the spanning tree, ensuring a stable loop-free topology.

BPDU exchange facilitates the following:

STP is implemented on bridges and switches in order to prevent loops in the network. STP should be used in situations where redundant links are used.

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

Which port will the spanning-tree algorithm select as a bridge’s root port?

A. The first port on the root bridge to receive an STP packet

B. The port through which the root bridge can be reached with the lowest-cost path

C. The port through which the root bridge can be reached with the lowest-value interface identifier

D. The port through which the root bridge can be reached with the highest-value interface identifier

A

Answer: B

Explanation:

Root ports are ports that are in the forwarding state and provide connectivity to the root bridge. The port through which the root bridge can be reached with the lowest-cost path is the root port. All the ports on the root bridge (the bridge with the lowest bridge ID) are in the forwarding state and are referred to as designated ports.

Bridges and switches use the Spanning-Tree Protocol (STP) to prevent network loops. Without a loop-avoidance service on the network, Layer 2 devices, in certain situations, will endlessly flood broadcasts. An STP-enabled device recognizes a loop in the topology and blocks one or more redundant paths, preventing the loop. STP allows the switches to continually explore the network so that the loss or addition of a switch or bridge is also quickly discovered. STP is enabled by default on Catalyst switches.

For example, if two switches have an active connection between them that is forwarding traffic and a second link is connected between the same two switches, one of the two switch ports will go into a blocking state when BPDUs are received on the link. This helps to ensure that a loop does not form using the redundant connections. In some situations, heavy traffic may prevent the reception of BPDUs when the second link is put in place, and in that case, a loop may still form.

The root port is not selected based on the first port to receive an STP packet on the root bridge. Neither is it based on the lowest or highest interface identifier values.

Note: In some situations, there may be two ports with equal cost to the root bridge. When this occurs, the port with the lowest port number becomes the root port.

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

During which STP state can ports add information to their address tables, but not send any data?

A. Learning

B. Listening

C. Blocked

D. Forwarding

A

Answer: A

Explanation:

In the learning state, a switch port can add learned information into its address table, but cannot forward data.

Spanning tree transitions each port through several states whenever there is a change in the network topology to prevent switching loops. Each state is briefly defined as follows:

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

Consider the following output of the show spanning-tree command for the SW1 switch:

You need to change the spanning-tree configuration such that the following is true: SW1 is the root bridge for VLAN0001.

SW1 is not the root bridge for VLAN0101

Fa0/2 port of SW1 should be in the forwarding state for VLAN0202 traffic

Which of the following commands should be executed on SW1 to achieve the desired results? (Choose all that apply.)

A. spanning-tree vlan 1 priority 23189 in global configuration mode

B. spanning-tree vlan 1 priority 32768 in global configuration mode

C. spanning-tree vlan 101 priority 32768 in global configuration mode

D. spanning-tree vlan 202 cost 2 in interface configuration mode of Fa0/2

E. spanning-tree vlan 202 cost 252 in interface configuration mode of Fa0/2

A

Answer: A,C,D

Explanation:

The following commands should be executed to achieve the desired results:

  • spanning-tree vlan 1 priority 23189 in global configuration mode
  • spanning-tree vlan 101 priority 32768 in global configuration mode
  • spanning-tree vlan 202 cost 2 in interface configuration mode on Fa0/2

The spanning-tree vlan 1 priority 23189 command changes the bridge priority of SW1 to 23189 for the native VLAN (VLAN0001). According to the show spanning-tree output in the scenario, the root bridge for VLAN0001 has a priority of 23195. Therefore, if SW1 has to become the root bridge for VLAN0001, then SW1 should have the least bridge priority for that VLAN. Setting the bridge priority of SW1 to 23189, which is less than 23195, serves the purpose.

The spanning-tree vlan 101 priority 32768 command changes the bridge priority of SW1 to 32768 for VLAN0101. The maximum priority that can be assigned to a switch is 32768, which implies that the switch cannot be a root bridge for the VLAN provided its MAC address is higher than the other switches. This will ensure that SW1 will NOT be the root bridge for VLAN 101

The spanning-tree vlan 202 cost 2 command sets the port cost to 2 for VLAN0202. The port cost is used by STP to determine a loop-free path. The port with the least cost is selected and placed in Forwarding state. Therefore, as a result of this command, the Fa0/2 port will be in the Forwarding state to pass the VLAN0202 traffic, rather than Fa0/1.

Executing the spanning-tree vlan 1 priority 32768 command in the global configuration mode does not achieve the desired results. This command sets the bridge priority of SW1 to the highest possible value for VLAN0001. As 32768 is greater than 23190, the new bridge priority of SW1 does not affect the root bridge for VLAN0001 and SW1 remains a non-root bridge.

The spanning-tree vlan 202 cost 252 command in the interface configuration mode of Fa0/2 does not achieve the desired results. This command changes the port cost of Fa0/2 for VLAN0202 to 252, which is the maximum cost value. STP selects the port with the least cost as the best loop- free path. Therefore, setting the cost to 252 for Fa0/2 will not put Fa0/2 in the Forwarding state.

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

What is the easiest way to force a specific switch to become the spanning-tree root bridge for a VLAN?

A. Raise the spanning-tree priority value on the switch.

B. Lower the spanning-tree priority value on the switch.

C. Raise the port-cost value of an interface on the switch.

D. Lower the port-cost value of an interface on the switch.

A

Answer: B

Explanation:

The spanning-tree root bridge is the bridge with the lowest bridge ID. The bridge ID is a value calculated from the bridge priority and the bridge MAC address. Therefore, lowering the bridge- priority value lowers the bridge ID, which can force the switch to become the root bridge.

The easiest way to force a specific switch to become the spanning-tree root bridge for a VLAN is to lower its priority using the spanning-tree vlan vlan_id priority priority command. For example, the following command will configure the switch as the root bridge for VLAN 10:

  • switch(config)# spanning-tree vlan 10 priority 4096

The priority value of 4096 is used by convention. It could be set to any value as long as it is lower than any other switch in the VLAN. The priority value 4096 is typically used when forcing the placement of the root bridge, and 8192 is used to force placement of the secondary root bridge. These values work because the default priority value for switches is 32768.

Lowering the port cost of an interface is an effective way to force spanning tree to put the interface into a forwarding state. However, it does not affect the placement of the root bridge.

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