Therefore, STP (Spanning Tree Protocol) evacuates the layer 2 switching circle by closing redundant connections. The duplicate connection is an additional connection between two switches. Usually, redundant connections are made for enhancement purposes.
The different aspects of each coin are almost the same, and the repeated connections and some points of interest also have some disadvantages. The biggest obstacle to over-connection is that it forms a circle between the switches. If there is a circle between the two switches, they will not work properly.
This instructive exercise is the second and final article of the article “Layer 2 Exchange Circle:-Reasons and Arrangements”. The initial part of this tutorial exercise is attached.
Description of the layer 2 switching loop in the network
For this tutorial exercise, I hope you understand what a layer 2 swap circle is and what problems it causes in the system. If you are unlikely to know what a layer 2 swap circle is and how it works, then I suggest that you make an interruption here, first check the first one in this guided exercise.
What is STP?
STP is a convention. It effectively shields all connections of the system. In order to find redundant connections, it uses a calculation method called STA (Spanning Tree Calculation). STA calculation first creates a topology database, then finds and loses the ability to connect repeatedly. When repeated connections weaken, only the connection selected by STP remains dynamic. If another connection is included or the current connection is excluded, STP will rerun the STA calculation and change all connections again to reflect the change.
The following section clarifies how it happened and the wording and segmentation used by STP in its activities.
BPDU (Bridge Protocol Data Unit) is an overview of multicast. These changes are used to share data about itself and its association. In addition to sharing data, switches also use BPDUs to master the system topology to understand which switch is associated with which switch, and whether there are any Layer 2 switching rings in the educated topology.
The root bridge is the beginning of the STP arrangement topology. To select a root bridge from all switches in the system, STP uses two parameters. The variable is called the MAC position of the extended demand and interest switching. The switch with the least scaffolding requirements will be selected as the root connection. If the bracket needs to respect that all switches are equivalent, then select the switch with the least MAC address as the root bridge.
Of course, in all Cisco switches, the rack needs assessment is set to 32768.
Unless you change this value, the switch with the lowest MAC address will be selected as the root bridge. If you need to select a specific change as the root bridge, you can set the estimated estimate of the rack requirement to 32768 or less.
Each time a system change occurs, the selection process of the root bridge occurs. For example, the system topology includes another switch, or the current switch is evicted, or the current root bridge is confused. If different switches of the system do not get BPDUs from the root bridge within 20 seconds, they hope that the root bridge has failed. If the current root bridge is unavailable, you need to make an excellent switch to start the political contest process to select another root bridge again.
But for the root bridge, every excellent switch in the system is considered a non-root bridge. The non-root bridge gets refresh from the root bridge and updates its STP database moderately.
Considering the relevant media connections, STP assigns incentives to each part of the system. This value is called the port cost value. When various connections can be accessed between the two switches, STP uses this incentive to choose the absolute best method. It selects the port with the lowest estimated port cost.
The mode cost is a summary estimate of the port costs from the root bridge to different switches in the system. It is constantly determined based on the root bridge. The default mode cost of the root bridge is 0. BPDU contains mode cost data.
The moment the root bridge promotes the BPDU from its interface, it sets the path cost to 0. The switch that obtained this BPDU increases the path cost by including the port cost estimate of the port displaying the BPDU. For example, when the switch has little chance of obtaining BPDUs on the Gigabit interface, the collected overhead is 4 at this time.
0 (value obtained from the root bridge) + 4 (port cost estimate of the interface that obtained the BPDU) = 4
Currently, the switch sets the collected path cost (4) in the BPDU and advances it. The following switches associated with this switch follow similar standards. For example, if the following switch obtains this BPDU on a Fast Ethernet port, the cumulative mode cost for this switch is 23.
4 (value obtained) + 19 (port cost estimate close to the port) = 23.
The root port is the port legally associated with Root Bridge, or the easiest way to get to Root Bridge. The simplest method is the method with the lowest cost. Remember, the switch may undergo many different changes to establish the root connection. Therefore, this is usually not the simplest method, but the fastest method.
Compared to the different ports on this segment, the assigned ports are the ports with the smallest port cost, with the motivation to jump on a given system. STP represents the assigned port as the sending port. The transmit port is used to advance the housing.
Unallocated ports are ports with higher port costs than allocated ports. STP indicates that the unassigned port is a blocked port. Block ports are used to evacuate circles.
STP port status
All ports on the STP running switch go through four different states; block, adjust, learn, and send. Through these states, the switch can understand the system topology and calculate the cost estimate, and select the allocated and unassigned ports based on this value. After these states, the switch will be regarded as an STP centralized switch. We should understand each state in detail.
STP blocking status
When the switch is powered on, the switch puts all its ports in this state. In this expression, the switch only tunes in and forms BPDUs. But the BPDU discards every other edge. From the close BPDU, it learns the system topology and determines the filled port as the root port, assigned port, and blocked port.
All ports remain in this state for twenty seconds. After 20 seconds, only the root port and the assigned port enter the following state. The remaining ports remain in this state.
STP listening status
In this state, although everything is normal, the port can still process and only process BPDUs. Except for BPDUs, every other edge is discarded. The switch double-checks the layer 2 topologies to ensure that no circles appear in the system before processing the information overview. The port remains in this state for 15 seconds.
STP learning status
Only the root port and the assigned port go from the listening state to the receiving state. In this state, all ports will call in and process BPDUs. In any case, in this state, the port starts to prepare the client profile. The switch checks the source address of the client shell and updates its CAM table, but does not push any client shell to the target port. The port remains in this state for 15 seconds.
STP forwarding status
In this expression, the switch calls in and forms the BPDU and client profile. It uses BPDU to screen the system topology. By carefully reading the source address field at the edge of the client, it can also assemble and refresh the CAM table part. This state is also implied as a combination.
Union hinted that all ports of the switch have been changed to send or block mode. In the process of joining STP, the switch will not advance any client overview. In most cases, the assembly is completed within fifty seconds (blocking state is 20 seconds + release state is 15 seconds + learning state is 15 seconds).
STP disabled state
This state applies to all ports physically closed by the chairman or evicted from STP. All unplugged ports are still in this state. Any port in this state will not be interested in STP activities.
In short, STP activities
For all switches in the STP area, first, select a root connection. The root connection is a perspective view of every other switch in the system. All ports of the root connection are in send mode.
When the root connection is selected, each excellent switch selects a separate port with the simplest method cost to establish the root connection and marks it as the root port.
After selecting the root port, the switch determines a separately assigned port for each association.
If various ports are associated with similar switches or LAN segments, the switch selects only the port with the lowest cost in one way and checks it as the assigned port.
After selecting the root port and the assigned port, the switch will prevent each individual resident port from evacuating any possible or existing loops from the system.
The attached picture shows how STP changes the truly circled topology to a free topology circled for all intents and purposes.
Show through tree order
To view data about STP activity, you can take advantage of the order of traversing the tree from a favorable execution mode. The revenue of this order can be divided into three subsets. The main set contains data about the root bridge. Subsequent collections contain data about the switch itself. The third group records the status of dynamic interfaces participating in STP activities.
The attached picture shows an example of output from this sequence of root-connected switches and partial switches.
Show stp status sequence
On the root bridge, the first and second subsets show similar data.
On non-root bridges, the main subset shows data about the root bridge, while the subsequent subset shows data about the switch itself.
The rack needs assessment is the sum of the default needs assessment and the VLAN ID.
The STP convention has two different implementation methods: DEC and 802.1d. These two usages are not good for each other. When purchasing another switch of the system, make sure that it supports the similar STP that the current switch is using. Do not mix gadgets running 802.1d STP with gadgets running DEC STP, otherwise, you may encounter Layer 2 loop problems. Cisco’s entire switch uses 802.1d STP.
This supports guided exercise. If you do n’t like this guided exercise, remember to share it with others through your interpersonal organization.
What is Spanning Tree Protocol and how it works?
Spanning Tree Protocol (STP) is a link management protocol that provides path redundancy while preventing unnecessary loops in the network. When it comes to the Ethernet network, there can only be one active path between the two stations to allow it to operate normally. For various reasons, loops can occur in the network.
What is the Spanning Tree protocol used for?
Spanning Tree Protocol (STP) is a network protocol that can establish a loop-free logical topology for Ethernet. The basic function of STP is to prevent the bridge ring and the resulting broadcast radiation.
Should spanning-tree be enabled on all ports?
You can configure the command “spanning-tree portfast” on all ports connected to terminal devices (such as workstations). … However, it is important to configure this command only on the port connected to the terminal device. Ports connected to other switches need to exchange spanning tree information.
Incoming search terms:
- spanning tree protocol