4.2 Configure stp timer


Principle overview

Ordinary spanning tree cannot achieve fast convergence, but there are multiple timers in stp. The timeout period for restarting spanning tree calculation without receiving upstream bpdu will affect the convergence speed. The fastest topology convergence can be achieved by configuring appropriate parameters. .

hello timer: send bpdu periodically to maintain the stable time of the spanning tree, the default is 2s. If it is not received within 2 seconds, it will be considered that a failure has occurred, and the spanning tree calculation will be restarted. The hello time configured on the root switch will be used as the hello time in the entire spanning tree

max age timer, the maximum survival time of bpdu, the default is 20s. The switch compares the message age picked up by the bpdu received from the upstream switch. If the bpdu is sent by the root bridge, the message age is 0. It increases by 1 every time a switch passes, and the max age is used to determine whether it has timed out. If it times out. It will age the bpdu and block the receiving interface. Start to issue bpdu with itself as the root bridge. The radius of the spanning tree can be effectively controlled.

forward delay timer: 15 seconds by default. A link failure will cause a recalculation of the spanning tree, but the new configuration obtained by the recalculation cannot be spread across the entire network at once. If the newly selected root port and designated port start data forwarding immediately, it may cause a temporary loop.

Therefore, stp adopts a commodity state transition mechanism, and the newly selected port role can only enter forwarding after a delay of 2 times the forward delay. Prevent loops.

The default spanning tree mode of Huawei switches is mstp, after changing it to spanning tree. The port status of stp is only discarding learning forwarding.

In order to increase network stability, the timer configuration should follow the following formula:

2*(forward delay -1s)>=max age
max age >=2(hello time +1s)


1. Experiment purpose and addressing

Understand the role of stp timer, master the effective method of stp configuration command configuration method

Analog enterprise network, the internal network is a large local area network, a ring network composed of 4 switches connected in pairs. Each switch uses tp, s1 is the root, and s2 is the backup root switch. In order to speed up the convergence speed of stp, each timer needs to be adjusted.

Insert picture description here

2. Experimental topology

Insert picture description here

2. Experimental content

1. Configure ip address for ping test

success

2. Configure stp timer

4 switches are configured to use stp s1 as the root and s2 as the backup root. Check the default value of the stp timer


Summary and reflection

When the switch port status changes, which status will experience a forward delay

In stp, the normal port will experience the transition delay of listening and learning when the state transitions.

The special port portfast does not need to wait to directly enter the fwarding.

Guess you like

Origin blog.csdn.net/weixin_45821358/article/details/115258978