Regularly Placed Spanning Tree Protocol (STP) Interview Questions
Hello friends, welcome back to my Networking Interview Questions Blog series. This is my sixth and the last blog in this series. Before this, I covered interview questions on Basic Networking, Routing Part-I and Part-II, and Subnetting. In the last blog, I covered another domain of CCNA, the Switching, and VLAN. Now, in this last blog of series, I am going to cover another most important topic of the Switching, STP interview questions and answers. With this, I am also covering questions on a very interesting and useful topic in this switching domain i.e. VTP and EtherChannel.
So let’s start with STP – Spanning Tree Protocol
What are Redundant Links?
Redundancy provides backup in runtime. In switched networks, Redundant links are created to avoid complete network failure in an event of failure of one link.
These redundant links will create switching loops.
What is STP?
Spanning Tree Protocol (STP) is a switching protocol that prevents layer 2 loops created by the redundant links. STP enables switches to become well-informed of each other so that they can negotiate a Loop-Free path through the network.
How Spanning Tree Protocol (STP) works?
STP chooses one of the switches in the network as a Root Bridge, which will be used as a reference point. Then calculates all the redundant paths to that root bridge, picks one path which is best to forward frames, and blocks other redundant paths.
Due to this redundant path blocking happens, switching Loops are prevented.
What are the different port states in STP?
1. Disabled – A port in the disabled state does not take part in the STP.
2. Listening – A port in the listening state sends and listens to BPDU messages to make sure no loops occur on the switched network. The port also arranges to forward data frames without populating the MAT – MAC address table.
3. Learning– A port in the learning state populates the MAC address table (MAT) but doesn’t forward data frames. The port still sends and receives BPDU messages as in the listening state.
4. Forwarding – The port in the forwarding state can send and receive data frames, collect MAC addresses in its address table, send and receive BPDU messages. This port is now a fully functioning switch port within the spanning-tree topology.
5. Blocking – A port in the blocking state does not forward frames. It only listens to BPDU messages. The function of the blocking state is to prevent the use of looped paths.
What are BPDU messages?
All the switches switch over information to select the root bridge and for configuration of the network. This is done through the messages called Bridge Protocol Data Unit (BPDU). Each switch compares the parameters in the BPDU messages that it sends to one neighbor switch with the one that it receives from another neighbor switch.
Explain different types of STP Timers?
STP uses three timers – 1) Hello 2) Forward Delay 3) Maximum Age timer. These timers make sure that a switched network converges properly before a bridging loop can form due to redundant links.
Hello timer – The time interval between configuration BPDU messages sent by the root bridge. It is 2 seconds by default.
Forward Delay timer – This is the time interval that a switch port spends in both the Listening and Learning states before going to forward state. The default value is 15 seconds.
Max (Maximum) Age timer – Maximum length of time a BPDU information can be stored before discarding it. It can also be defined as a time interval that a switch stores BPDU information without receiving an update. By default, it is 20 seconds.
Explain different types of STP Port Roles?
Root port – The root port is always on Non-Root Bridge. It is always the port on the link directly connected to the root bridge, or the port on the link which is the shortest path to the root bridge. It is always in the forward state.
Designated port – A designated port can be on both the root Bridge & non-root Bridge. Also, all ports of the root bridge are designated port. A designated port is one that has the best (lowest) cost to the root bridge. It will be marked as a forwarding port.
Forwarding port – A forwarding port can send and receive i.e. forwards frames.
Blocked port – A blocked port is the port that is used to avoid the switching loops. It is also called a Non-designated port. It only listens to BPDU messages. Any port other than root & designated port is a blocked port.
What is the destination MAC address used by BPDUs (Bridge Protocol Data Units)?
BPDUs (Bridge Protocol Data Units) frames are sent out as multicast frames. The destination MAC address for BPDUs is 01:80:c2:00:00:00.
What are the Types of BPDU?
There are two types of BPDUs as below:-
1) Configuration – This Configuration BPDU is used for spanning-tree protocol (STP) assessment.
2) Topology Change Notification (TCN) – This TCN BPDU is used to state the changes in the network topology.
What are the steps of STP working?
Following are the steps of STP working:
- Elect Root Bridge in the Network Topology.
- Calculate Path cost and Root Path cost for every bridge. (Optional)
- Assign the Root Ports on Non-Root Bridges.
- Assign the Designated Ports on all the bridges.
- Assign the Non-Designated Ports.
What is the Bridge ID?
Bridge ID is 8 bytes long. It includes both the priority and the MAC address of the device. In the STP domain, this bridge ID is used to elect the root bridge.
How Root bridge is elected in the STP domain?
In the STP domain, the bridge with the lowest Bridge ID is elected as the root bridge. This means a switch with the lowest priority will elect as the root bridge, and if two or more switches have the same priority then switch with the lowest mac address will elect as the Root Bridge.
What is Path or Link or STP Path Cost value?
The Spanning Tree Path Cost Value is inversely correlated to the bandwidth of the link means low cost represents high bandwidth. Therefore a path with a low cost value is superior than a path with high cost value.
What is Root Port?
After the Root bridge is elected, every other Switch i.e. Non-Root bridge in the STP domain must select its single port to reach the Root bridge. The port with the lowest Root path cost is assigned as the root port. It is always in the forwarding state.
Only Non-Root bridges have a Root port and Root bridge will never have a root port.
What is VLAN Trunking Protocol (VTP)?
To exchange VLAN information, Cisco switches uses their proprietary protocol called VTP (VLAN Trunking Protocol). This protocol is used to coordinate VLAN information like VLAN ID, VLAN Name, new VLAN creation, deletion of existing VLAN with switches inside the same VTP domain.
What are the different VTP (VLAN Trunking Protocol) working modes?
VLAN Trunking Protocol (VTP) has the following 3 working modes:
- Server mode – This is the default mode of every Cisco switch even when VTP domain is not configured. In VTP Server Mode, the switch can create, delete VLANs, and will broadcast VLAN changes in VTP domain.
- Client mode – We need to configure Switch for Client mode in VTP domain. Client mode switches cannot create or delete VLANs. The client switch only listens and forwards updates. In this client mode switches listen to VLAN updates from Server switches and change their VLAN configurations accordingly.
- Transparent mode – We need to configure Switch for Transparent mode in the VTP domain. Same as in Sever mode, we can create and delete VLANs in this transparent mode switch but these changes are not transmitted to other switches. Switch in VTP Transparent mode listen to VLAN updates from Server switches and just forwards them to other switches in the VTP domain, it will not make changes in its VLAN configuration.
What are the requirements to exchange VTP messages between multiple switches?
1. VTP domain name must be the same on all the switches.
2. A switch should be configured in either a VTP server or client or transparent mode.
3. VTP versions should match on all the switches in the VTP domain.
4. VTP password should be the same on all the switches in the VTP domain.
5. The link between the switches should be configured as a trunk link.
What is VTP Pruning?
For any switch, if VLAN updates are not needed, then the VTP pruning feature of Cisco switches will use to stops sending VLAN update information traffic to that particular switch’s trunk link. This prevents unnecessary flooding of frames. As VLAN 1 (default VLAN) is administrative VLAN, we cannot prune it.
What is EtherChannel?
The EtherChannel is a port link accretion technology or port-channel structural design used primarily on Cisco switches. EtherChannel allows assemblage of a number of real Ethernet links. By assembling them, it establishes a logical Ethernet link for the assurance of providing fault-tolerance and high-speed links. EtherChannel can be established between switches, routers and servers. A maximum of 8 Fast Ethernet or 8 Giga Ethernet ports can be assembled together when forming an EtherChannel.
What are the available mechanisms for configuring EtherChannel?
There are 3 mechanisms you can choose to configure EtherChannel:
- Port Aggregation Protocol (PAgP): This is the Cisco Proprietary Protocol. PAgP working modes are – Auto and Desirable.
- Link Aggregation Control Protocol (LACP): This is the IEEE protocol with Standard 3ad. LACP working modes are – Passive and Active
- Static (On)
For detailed information on EtherChannel go through my blog on EtherChannel.
So, friends, this is the end of my Networking Interview Questions Blog series. I hope that now you have lots of questions with their answers with you so that you can face any Networking profile interview full of confidence.
In SevenMentor, one of the Best Networking Training institute in Pune, you can get trained on all latest networking technologies from basic CCNA to CCIE and also the latest one like SDWAN, Juniper and Palo Alto. Also, you can get different training options like Microsoft, AWS, Azure, VMware and so many. So come, visit once SevenMentor to give your career the right direction!
Author:- Sumaiyya Suhail Bagwan
Department Name:- Networking
Designation:- Technical Trainer
Call the Trainer and Book your free demo Class for now!!!