RSTP Basic Configuration

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, resulting network storm, all the switches need to be transported Spanning Tree Protocol. 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

 

Addressing experiment

 

 

 

 

Experimental Procedure

1, Basic Configuration

Substantially corresponding IP address configuration according to the experimental addressing tables, and using the ping command to check the connectivity of the direct link

 

 

 2, the basic functional configuration RSTP

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

 

 

 

 

 

 

 

 

 After the configuration, mode, and view the position of the spanning tree root switch with display stp

 

 

 

 

 

 

 

 

 

 

The above information, CIST Bridge switch is its own ID, and the CIST Root is the root switch's ID. Root switch is a switch ID of switch smallest, so Observe that, S4 is the current root switch.

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

 

 

 

 

 

 

 

 

 It can be observed, stp root primary command modifies the switch ID of switch priority, the default priority of 0 to 32768, the switch ID of S1 becomes a minimum, is Primary root, i.e., the root switch. Observed using the display stp command on S2.

 

 

 Concept to be sacrifice, stp root secondary command to change the ID switch is a switch in priority, the default priority of 4096 to 32768, so that the bridge ID S2 becomes the second smallest, is Secondary root, i.e. times the root switch.

Continue to use the display stp brief command to check the status of the ports on each switch and roles

 No root port root switch S1, all the ports are designated ports

 

 

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

 

 

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

 

 

 交换机S4上E0/0/2是根端口,E0/0/3是替代端口

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

模拟根端口断掉的过程,把S2的GE0/0/1端口使用shutdown关闭,同时,使用display stp brief命令观察S2上其他端口,GE0/0/2端口角色为根端口,处于转发状态(若出现还是指定端口,Discarding状态,则再次使用此命令即可)

 

 观察之后,恢复端口

 

 3、配置边缘端口

降低生成树计算对终端设备的影响,将交换机上连接PC的接口配置为边缘端口

作为对比,在将S4上的E0/0/1配置为边缘端口之前,先把端口关闭再开启,观察端口状态的变化

 

 经过15秒后,接口进入Learning状态

 

 经过15秒后,接口进入Fowarding状态

 

 配置S4上连接PC的端口为边缘端口,此时生成树计算工作依然进行,但端口进入转发状态无需等待30s。

 

再次做同样的模拟过程,关闭E0/0/1接口,再次重新开启,观察到接口即刻进入到Fowarding状态,没有30s延迟

 

 4、查看备份端口状态

网络管理员再S3与S4之间加了一台Hub设备,并将S3的E0/0/4通过Hub与S4相连,在S3上使用display stp brief命令查看生成树信息

 

 可以观察到S3的E0/0/3接口为指定端口,E0/0/4为备份端口,两个接口接到同一台Hub上,当E0/0/3接口关闭之后,E0/0/4会成为新的指定端口。在S3上关闭E0/0/3接口,通过 dispay stp brief命令查看备份端口的状态变化

 

 

 

 相似的过程,在S4上,接口E0/0/2是根接口,接口E0/0/3是替代端口,Discarding状态。当S4的根端口E0/0/2关闭之后,接口E0/0/3会立即替代E0/0/2成为新的根端口

 

 RSTP协议收敛很快,替代端口立即成为根端口

 

Guess you like

Origin www.cnblogs.com/heiwa-0924/p/11999988.html