Saturday, April 23, 2016


Hello everyone... Got some time to arrive on few interesting points that can be discussed regarding STP.

1. What is STP protocol ?
It is a protocol that helps in preventing loops in layer 2 and broadcast storms when we have a redundant link. It operates by blocking the redundant paths and normally provides only only one way of communication channel.

2. Is STP layer 3 or layer 2 protocol ?
It is a layer 2 protocol

3. What are the problems due to redundant layer 2 topology ?
i) Broadcast storms
ii) Multiple frame copies
iii) Unstable MAC table

4. What problems does a broadcast storm cause ?
It shall slow down the network and also reduce or block the throughput of the network

5. What is BPDU ?
The BPDU is used by switch for spanning tree algorithm to shutdown the redundant links. The STP protocol operates by exchanging small packets called as BPDU(Bridge Protocol Data Unit) which is exchanged every 2 seconds . BPDU is composed of root Id, root path cost, bridge Id, maximum age and hello timer. The root path cost is based on BW link speed. Bridge Id is based on bridge priority & bridge mac address, max age to intimate the change in root, hello timer (2 seconds). The BPDU uses multicast destination mac address(01:80:c2:00:00:00) as destination mac address.

6. What are the main steps in STP ?
Election of root bridge. Identification of root ports. Identification of designated ports. Moving a port to blocked state in case of existence of loop or activation of port that is in blocked state if the loop is removed.

7. Will there be multiple blocked ports in case of STP ?
If there exists multiple loops , then multiple ports shall be placed in blocking state.

8. How does a switch in a network is selected as root bridge ?
The root bridge is the switch with the lowest bridge identifier (Bridge ID) where the bridge identifier is based on Bridge priority & Mac address.

9. How to determine the root port ?
Once the root bridge is selected, all the switches in network will determine the shortest path to the root bridge based on root path cost. The link or interface(shorted path) that leads to the root bridge is determined as the root port. So, a root bridge cannot have a root port. Whereas, each switch shall have only one root port that always forwards traffic to the root bridge.

10. What are the types of BPDU ?
i) Configuration BPDU
ii) Topology Change Notification BPDU
iii) Topology Change Notification Acknowledgement BPDU

11. How to determine designated port ?
All ports on root bridge are termed as designated port. Normally , once the root port selection is done, the other side of the port of the link is made as the designated port. The designated port shall be in forwarding state.

12. How to determine blocked port ?
Once the link with shortest path cost is termed root port, the other link that leads to the root bridge is blocked . Blocked port(Non-designated port) shall receive information from designated port, but shall not forward the information through it. If one end of every link is designated port , the other end may be termed as either blocked port or root port.

13. How to decide root port in case of ties ?
The tie breaking is achieved based on the root path costs. In case the root path costs are same, then the bridge with the lowest switch id (bridge id based on switch priority & MAC address) is selected.

14. How to decide designated port in case of ties ?
If bridge Ids are equal, then the one with the lowest MAC address is termed as designated port.

15. What are the stages or time taken taken while change in topology ?
20 seconds(max_age) to determine change in topology. 15 seconds in listening stage where it tries to determine the root bridge, designated and blocking ports. 15 seconds in listening stage where it shall learn the mac address from user frames. Following this, it shall be in forwarding state.

16. How is root bridge elected ?
Initially all switch claim themselves as root bridge and start sending BPDUs that are used for exchange of STP information between switches. However, comparison between received BPDU information and that of locally stored information is done. The bridge with lowest bridge ID is selected as root bridge which is achieved by first comparing the priority and later by comparing the MAC addresses. Once the root bridge is selected, it shall trigger topology change and send the configuration messages with its own bridge identifier as root identifier.

17. What are the states in STP ?
Blocking, Listening, Learning, Forwarding and Disabled

18. What happens in Listening state ?
This is the state during which frame forwarding and MAC address learning are disabled. This state is obtained after moving out of blocking state whereby it receives and accepts BPDUs or sends BPDUs. The switch processes the BPDUs and awaits for new information that can cause change of state.

19. What happens in forwarding state ?
In forwarding state, the port shall send or receive data , BPDUs. But also, keeps monitoring the BPDUs for making of possible change in state.

20. What happens in learning state ?
This is the state during which the frame forwarding continues to be disabled. However, it starts MAC learning where the port starts adding entries in MAC address table by looking at the source address of incoming frames.

21. What is configuration BPDU ?
The root bridge sends configuration BPDU at every hello time with information required for calculating spanning tree topology.

22. What is topology change  BPDU ?
Bridges that detect topology change shall send this BPDU towards the root bridge which inturn shall forward to other switches to inform that a topology change has occurred in current topology.  The switches that receive the topology change BPDU (TC flag set), shall reduce the age out timer to age out filtering database entries rapidly.

No comments:

Post a Comment