Ensp configure RSTP

Principles outlined

Although the STP loops can solve the problem, but there are some deficiencies, such as STP is not careful to distinguish between port states and port roles; secondly STP port state a total of five kinds, namely Discarding, Blocking Listening, Learning and Forwarding, slow convergence. Also, for users, Listening, Learning and Blocking status makes no difference, does not forward traffic. According lack of STP, RSTP made improvements. RSTP adds two kinds of new port role, the port There are four roles: root port, designated port, Alternate Port and Backup Port.

RSTP fast convergence characteristics.

Experimental Scene

The experimental simulation of the corporate network scenario. S3 and S4 is a switch access layer is responsible for user access, S1, and S2 is the aggregation layer switches, four switches form a ring network. In order to prevent the occurrence of a loop in the network, the network produced a storm, you need to run the Spanning Tree Protocol on all switches. Meanwhile, in order to accelerate the convergence speed of the network, the network administrator selects the RSTP is used, and such a good performance for the root switch S1, S2 for the second root switch, and configure the edge port to further optimize the corporate network.

Lab topology

image

Experimental Procedure

Test connectivity between PC

image

In the aggregation layer switches SI, S2 and the access layer switch S3, the S4, the pattern from the default spanning tree MSTP
to RSTP. Since the default i.e. opened MSTP Huawei switches, you can simply modify the spanning tree model.

image

Similarly other switches

After the configuration, the switch SI, S2, S3 and S4 use the display stp command to view the position of the spanning tree model and root switch.

image

image

image

image

You can see, S4 is the current root switch

RSTP constructed in a tree topology, the network administrator needs to set the primary distribution layer switches switch S1 is the root,
the convergence layer switch S2 is a root switch.

image

image

After the configuration, the same used in the Sl the display STP observe command.

image

可以观察到,stp root primary命令修改的是交换机ID中的交换机优先级,把默认 的优先级由32768改为0 ,所以S1的交换机ID变为最小,是 Primary root,即根交换机。

在 S2上使用display stp命令观察。

image

可以观察到,stp root secondary命令修改的也是交换机ID 中的交换机优先级,把默认的优先级由32768改为4096,使 S2的桥ID变为次小,是 Secondary ro o t,即次根交换机。

用display stp brief命令查看每台交换机上的端口角色及状态

image

根交换机SI上无根端口,所有端口都是指定端口。

image

交换机S2上的GE 0/0/1是根端口。

image

交换机S3上的E 0/0/2是根端口,E 0/0/3是指定端口,而 E 0/0/4是备份端口。

image

目前S2的GE0/0/1端口是根端口,其他所有端口是指定端口。如果S2的根端口断掉了,S2会选择把其他到达根交换机的端口置成根端口。RSTP协议的收敛比较快,端口 GE 0/0/2会快速协商成为新的根端口,协商期间端口是Discarding状态,协商结束后端口为Forwarding状态,这个过程所需要的时间非常短,这就是RSTP收敛快的一个表现。

模拟根端口断掉的过程,把 S2的 GE 0/0/1端口使用shutdown关闭,同时,使用 display stp brief命令观察S2上其他端口的角色及状态的变化。

image

变化之前:

image

可以看到端口GE 0/0/2从之前的指定端口变成了根端口,且处于Forwarding状态

我们再恢复端口:

image

发现S2又变回来了(RSTP使用P/A机制和根端口快速切换机制使端口状态立即从
Discarding进入Forwarding状态,缩短了收敛的时间,减小了对网络通信的影响。)

配置边缘端口

Calculated mainly on the spanning tree links interconnecting the switch, and the port connected to the PC spanning tree calculation is not necessary, in order to optimize the network, reduce the impact on the spanning tree calculation terminal device, the network administrator to now connect to the switch PC interface is configured as an edge port.

PC port on S4 configured as an edge port, this time spanning tree calculations are still carried out, but the port to enter
the forwarding state without waiting for 30s.

image

Close E 0/0/1 interface port on again, to observe a state change of edge port E 0/0/1.

Interface to immediately enter the Forwarding state, there is no delay in the 30simage

RSTP use environment, can be connected to the PC switch, router and firewall interface port configured as an edge, the edge of the port terminal apparatus can reduce the time to wait to access the network, significantly improve the network availability.

View Backup port status

Network administrators between S3 and S4 plus a Hub equipment, and S3 is connected through E 0/0/4 Hub and S4.

View information about spanning tree using the display stp brief command on the S3.

image

It can be observed, S3 of E 0/0/3 interfaces designated port on the same switch E 0/0/4 backup ports, two on the same interfaces to the Hub, the interface when E 0/0/3 after closing, E 0/0/4 will be the new designated port.

Close E 0/0/3 interface on S3, view the status of backup ports by changing display stp brief command.

image

image

image

It can be observed on the specified interface S3 broken, E 0/0/4 role of the interface changes status. Learning to Forwarding state eventually became the interface specified by the Discarding.

Guess you like

Origin www.cnblogs.com/arisskz6/p/12029658.html