How does spanning tree protocol aid network




















An interface always enters the blocking state when you enable STP. The listening state is the first state. It is an interface that is entered after the blocking state. The interface helps you to determine that the interface that should participate in frame forwarding. Learning state helps to prepare for participating in frame forwarding. The interface allows us to enter the learning state from the listening slate. An interface in the forwarding state form the forward frames.

This interface enters the forwarding state from the learning state which performs the following functions:. This state does not participate in the Spanning Tree loop because the port is administratively disabled, and its timing is also unlimited. It is the bridge that offers an interconnection point for all segments. All the bridges in a LAN have a path to the root. STP allows you to select the root bridge automatically. The port ID helps you to decide the root port.

It consists of a configurable 1-byte priority value and a unique port number of each bridge. Path Cost, which is also known called PC, helps to decide the best topology with regard to forwarding speed. STP uses the concept of Path Cost. A designated port is a disabled port, and it is blocked by a network admin. A non-Designated port is a switch port that is blocked.

It is also known as a blocked port, or sometimes an alternate port. In order for this process to happen, all switches act as if they are the root bridge to start off with, and will send Bridge Protocol Data Unit BPDU packets every 2 seconds, advertising themselves as the root. So how do they decide which wins and which loses?

Above is an image of this concept, now to understand why this is needed. After this is the MAC address of the switch. The switch with the lowest BID wins the election; this means that if default values are used, the switch with the lowest MAC Address will win the election. In order to work out which will have their ports blocked, we need to assign port types to the switches.

In order to work out which will become the root and designated port, we need to know the Root Port Cost RPC of each switch port on a non-root switch. The switch port with the lowest RPC will become the root port, and all of the other ports will become a designated port.

So how do we get this value? In the above table, I have assigned the Root Port Cost to the speed of the cabling type. For example, if the link negotiated a speed of mbps on a gigabit link, it will choose a cost of 19, not 4. Here we have altered the diagram slightly to introduce the RPC values. We now know the root ports for the switches and need to determine the designating and blocking ports. SW1 will have all ports set to designated as no ports will enter blocking mode.

One will be designated, but the other will have to go blocking; this is because there can only be one designated port on a collision domain, and the root port has already been selected on both switches.

With this information, we can quickly work out which will become the designated port, and which will go blocking. First, which has the lowest RPC? Second, which has the lowest BID? This basically ends the function of STP, however there is one last concept to cover which is helpful to understand why it takes a long time for STP to converge reach its final state. Without STP on the bridges and switches, such a failure can result in a loop.

If two connected switches run different flavors of STP, they require different timings to converge. When different flavors are used in the switches, it creates timing issues between Blocking and Forwarding states. Therefore, it is recommended to use the same flavors of STP. Consider this network:. In this network, a redundant link is planned between Switch A and Switch B. However, this setup creates the possibility of a bridging loop. For example, a broadcast or multicast packet that transmits from Station M and is destined for Station N simply continues to circulate between both switches.

In order to provide this desired path redundancy, as well as to avoid a loop condition, STP defines a tree that spans all the switches in an extended network. STP forces certain redundant data paths into a standby blocked state and leaves other paths in a forwarding state.

If a link in the forwarding state becomes unavailable, STP reconfigures the network and reroutes data paths through the activation of the appropriate standby path. With STP, the key is for all the switches in the network to elect a root bridge that becomes the focal point in the network.

All other decisions in the network, such as which port to block and which port to put in forwarding mode, are made from the perspective of this root bridge. A switched environment, which is different from a bridge environment, most likely deals with multiple VLANs.

When you implement a root bridge in a switching network, you usually refer to the root bridge as the root switch. The roots for the different VLANs can all reside in a single switch or in various switches. You can choose the root switch, or you can let the switches decide, which is risky. If you do not control the root selection process, there can be suboptimal paths in your network.

All the switches exchange information for use in the root switch selection and for subsequent configuration of the network. Bridge protocol data units BPDUs carry this information. Each switch compares the parameters in the BPDU that the switch sends to a neighbor with the parameters in the BPDU that the switch receives from the neighbor.

In the STP root selection process, less is better. Before you configure STP, select a switch to be the root of the spanning tree. This switch does not need to be the most powerful switch, but choose the most centralized switch on the network. All data flow across the network is from the perspective of this switch.

Also, choose the least disturbed switch in the network. The backbone switches often serve as the spanning tree root because these switches typically do not connect to end stations. Also, moves and changes within the network are less likely to affect these switches.

After you decide on the root switch, set the appropriate variables to designate the switch as the root switch. The only variable that you must set is the bridge priority. If the switch has a bridge priority that is lower than all the other switches, the other switches automatically select the switch as the root switch.

You can also issue the set spantree portfast command, on a per-port basis. When you enable the portfast variable on a port, the port immediately switches from blocking mode to forwarding mode. However, do not use this command when you have switch-to-switch connection. In this case, the command can result in a loop.

The to second delay that occurs during the transition from blocking to forwarding mode prevents a temporal loop condition in the network when you connect two switches. This section lists rules for how STP works. When the switches first come up, they start the root switch selection process.

The switches then agree on which switch is the root switch. The switch with the lowest bridge ID in the network wins this election process. After the root switch identification, the switches adhere to these rules:.



0コメント

  • 1000 / 1000