Spanning Tree Protocol(Networking ) Questions and Answers

Question 1. Which of the following is a layer 2 protocol used to maintain a loop-free network?
  1.    VTP
  2.    STP
  3.    RIP
  4.    CDP
Explanation:-
Answer: Option B. -> STP
The Spanning Tree Protocol is used to stop switching loops in a switched network with redundant paths.

Question 2. What is the result of segmenting a network with a bridge (switch)?
1. It increases the number of collision domains.
2. It decreases the number of collision domains.
3. It increases the number of broadcast domains.
4. It decreases the number of broadcast domains.
5. It makes smaller collision domains.
6. It makes larger collision domains.
  1.    1 and 5
  2.    2, 3 and 5
  3.    3, 4 and 6
  4.    1, 3 and 6
Explanation:-
Answer: Option A. -> 1 and 5
Bridges break up collision domains, which would increase the number of collision domains in a network and also make smaller collision domains.

Question 3. You need to allow one host to be permitted to attach dynamically to each switch interface. Which two commands must you configure on your catalyst switch to meet this policy?
1. Switch (config-if) # ip access-group 10
2. Switch (config-if) # switchport port-security maximum 1
3. Switch (config) # access-list 10 permit ip host 1
4. Switch (config-if) # switchport port-security violation shutdown
5. Switch (config) # mac-address-table secure
  1.    1 and 3
  2.    2 and 4
  3.    2, 3 and 5
  4.    4 and 5
Explanation:-
Answer: Option B. -> 2 and 4
The switchport port-security is an important command, and it's super easy with the CNA; however, from the CLI, you can set the maximum number of MAC addresses allowed into the port, and then set the penalty if this maximum has been passed.

Question 4. If a switch receives a frame and the source MAC address is not in the MAC address table but the destination address is, what will the switch do with the frame?
  1.    Discard it and send an error message back to the originating host
  2.    Flood the network with the frame
  3.    Add the source address and port to the MAC address table and forward the frame out the destination port
  4.    Add the destination to the MAC address table and then forward the frame
Explanation:-
Answer: Option C. -> Add the source address and port to the MAC address table and forward the frame out the destination port
Since the source MAC address is not in the MAC address table, the switch will add the source address and the port it is connected to into the MAC address table and then forward the frame to the outgoing port.

Question 5. What command will display the forward/filter table?
  1.    show mac filter
  2.    show run
  3.    show mac address-table
  4.    show mac filter-table
Explanation:-
Answer: Option C. -> show mac address-table
The command show mac address-table displays the forward/filter table on the switch.

Question 6. Which statement describes a spanning-tree network that has converged?
  1.    All switch and bridge ports are in the forwarding state.
  2.    All switch and bridge ports are assigned as either root or designated ports.
  3.    All switch and bridge ports are in either the forwarding or blocking state.
  4.    All switch and bridge ports are either blocking or looping.
Explanation:-
Answer: Option C. -> All switch and bridge ports are in either the forwarding or blocking state.
Convergence occurs when all ports on bridges and switches have transitioned to either the forwarding or blocking states. No data is forwarded until convergence is complete. Before data can be forwarded again, all devices must be updated.

Question 7. In which circumstance are multiple copies of the same unicast frame likely to be transmitted in a switched LAN?
  1.    During high-traffic periods
  2.    After broken links are reestablished
  3.    When upper-layer protocols require high reliability
  4.    In an improperly implemented redundant topology
Explanation:-
Answer: Option D. -> In an improperly implemented redundant topology
If the Spanning Tree Protocol is not running on your switches and you connect them together with redundant links, you will have broadcast storms and multiple frame copies.

Question 8. What is the purpose of Spanning Tree Protocol in a switched LAN?
  1.    To provide a mechanism for network monitoring in switched environments
  2.    To prevent routing loops in networks with redundant paths
  3.    To prevent switching loops in networks with redundant switched paths
  4.    To manage the VLAN database across multiple switches
  5.    To create collision domains
Explanation:-
Answer: Option C. -> To prevent switching loops in networks with redundant switched paths
The Spanning Tree Protocol (STP) was designed to stop layer 2 loops. All Cisco switches have the STP on by default.

Question 9. What does a switch do when a frame is received on an interface and the destination hardware address is unknown or not in the filter table?
  1.    Forwards the switch to the first available link
  2.    Drops the frame
  3.    Floods the network with the frame looking for the device
  4.    Sends back a message to the originating station asking for a name resolution
Explanation:-
Answer: Option C. -> Floods the network with the frame looking for the device
Switches flood all frames that have an unknown destination address. If a device answers the frame, the switch will update the MAC address table to reflect the location of the device.

Question 10. If you want to disable STP on a port connected to a server, which command would you use?
  1.    disable spanning-tree
  2.    spanning-tree off
  3.    spanning-tree security
  4.    spanning-tree portfast
Explanation:-
Answer: Option D. -> spanning-tree portfast
If you have a server or other devices connected into your switch that you're totally sure won't create a switching loop if STP is disabled, you can use something called portfast on these ports. Using it means the port won't spend the usual 50 seconds to come up while STP is converging.