Spanning Tree Protocol

What are STP and Redundant Links?

STP is a protocol that keeps layer 2 loops from happening. STP lets switches find out about each other so they can agree on a path through the network that doesn’t have any loops.

In practical scenarios, redundant links are set up so that if one link fails, the whole network doesn’t go down.

How Spanning Tree Protocol works?

STP picks a reference point (called the Root Bridge) in the network and figures out all the redundant paths to that point. Then it chooses one path to send frames down and blocks other paths that aren’t needed. Loops are stopped when blocking happens.

How many Different Port States are there?

1. Disabled: A port that is in this state does not take part in STP.

2. Blocking: A port that is blocked does not send frames. Only BPDUs are played. The blocking state is meant to stop looped paths from being used.

3. Listening: A port in the listening state gets ready to send data frames, but the MAC address table is not filled out. The port also sends and receives BPDUs to make sure that the network doesn’t get stuck in a loop.

4. Learning: A port in the learning state adds MAC addresses to the table but doesn’t send data frames. The port still sends and receives BPDUs the same way it always has.

Forwarding: The port can now send and receive data frames, add MAC addresses to its address table, and send and receive BPDUs. In the spanning-tree topology, the port can now be used as a fully functional switch port.

What is a STP timer, and what are the different kinds?

Before a bridging loop can form, STP uses three timers to make sure that a network is properly converged.

Hello timer: How long it takes for the root bridge to send a configuration BPDU. By default, it is set to 2 seconds.

Forward Delay timer: The amount of time that a switch port is both listening and learning. It is set to 15 seconds by default.

Max (Maximum) Age timer: The longest amount of time that a BPDU can be kept without getting an update. It can also be thought of as the amount of time a switch keeps a BPDU before getting rid of it. By default, it is set to 20 seconds.

What are Different Types of STP Port Roles?

Root port: The root port is always the link that is directly connected to the root bridge, or the shortest path to the root bridge. Non-Root Bridge is always where it is.

Designated port: A designated port is one that has been chosen because it has the best price. A port will be marked as a forwarding port if it is chosen. It can be both on the root Bridge and on the other bridges. All of the ports on the root bridge are named.

Forwarding port: A forwarding port is a port that forwards frames.

Blocked port: A blocked port is a port that is used to stop loops from happening. Only BPDUs are played. A blocked port is any port that is not the root port or a designated port.

Explain the importance of BPDU?

All of the switches share information in order to choose the root bridge and set up the network. The Bridge Protocol Data Unit is used for this (BPDU). Each switch compares the parameters in the BPDU it sends to one neighbour with the ones in the BPDU it gets from another neighbour.

What is the destination MAC address used by BPDUs?

Bridge Protocol Data Units (BPDUs) frames are sent to the multicast destination MAC address 01:80:c2:00:00:00.

What are the Types of Bridge Protocol Data Unit (BPDU)?

There are two of BPDU exists:-

Configuration BPDU: This kind of BPDU is used to figure out the spanning tree.

Topology Change Notification (TCN) BPDU: This kind of BPDU is used to tell others about changes in the topology of the network.

How Does Root bridge gets elected?

In a STP domain, the bridge ID is used to elect the root bridge. This ID is 8 bytes long and contains both the device’s priority and its MAC address.

The switch with the lowest Bridge ID is chosen as the root bridge. This means that the switch with the lowest priority will become the root bridge. If two or more switches have the same priority, the switch with the lowest mac address will become the root bridge.

What is the value of the Path Cost or the Spanning Tree Path Cost?

The bandwidth of a link has the opposite effect on the Spanning Tree Cost Value, so a path with a low cost value is better than one with a high cost value.

Link Bandwidth Path Cost Value
10 Gbps    2
1 Gbps    4
100 Gbps    19
10 Mbps    100

What is the Root Port?

Once the Root Switch has been chosen, every other Switch in the network must choose a single port to connect to it. The port with the lowest root path cost (the lowest total cost to reach the root switch) is chosen as the root port and put in the forwarding state. A root port will never be on a root bridge.

Leave a Reply

Your email address will not be published. Required fields are marked *