当前位置:网站首页>Using STP spanning tree protocol to solve the problem of two-layer loop in network
Using STP spanning tree protocol to solve the problem of two-layer loop in network
2022-07-29 06:40:00 【Hongke Industrial Communication Division】
The interconnection between switches will produce a closed physical loop , This means that there may be more than one path between the two networks . These loops may be due to the need for redundant paths to ensure reliability , It may also be caused by mistakes . If there is a loop in the switch network , Sent to the host Broadcast 、Unknown Unicast Frame Will not be able to reach the destination , The network will also stop serving . That's what happened , It is mainly determined by two characteristics of transparent switches :
When the destination address is not in its address table , Continue flooding ;
When forwarding frames , The copy cannot be distinguished from the original frame . No fields ( For example, jump counter ) To distinguish consecutive copies
that , How to solve this problem ?
There are two possible solutions , First, it is strictly forbidden to create networks with loops , The second is to enable some mechanism , Allow the switch to detect whether there is a loop in the topology , Thus, the necessary interfaces are disabled to avoid the generation of loops . This is the spanning tree protocol (STP,Spanning Tree Protocol) Where it works . There is only one possible path between any pair of nodes in the spanning tree ( A tree without cycles ). The goal of the spanning tree protocol is to logically disable the interface to always implement the spanning tree .

therefore , In order to understand the topology of the network and disable the interface , A spanning tree message will be sent , These messages are called BPDU( Bridge protocol data unit ).BPDU Use the reserved multicast address 01-80-C2-00-00-00-00, To ensure that non spanning tree switches transparently propagate them .
Operation flow of spanning tree protocol :
- Switches regularly exchange with network topology information BPDU.
- Each switch has an identifier (sw-ID), It is based on its MAC Address creation .
- Besides , Each port has an identifier (port-ID) And the costs associated with it .
- Switch selection has the lowest sw-ID As the root of the tree . They all choose the same .
- Each switch sends BPDUs, It shows that sw-ID、 Root switch sw-ID And the cost of reaching the root switch .BPDU Spread throughout the network , When forwarding information, each switch will add the cost of the interface it passes .
- received BPDU after , Each switch will calculate which port it can pass through to reach the root switch at the lowest cost , Then determine the root port , At the same cost , It will choose the lowest port ID.
- Every LAN There is a designated port , This port is the LAN Access the port of the root switch at the lowest cost .
- Neither the root nor the specified port is the blocking port . These ports are unnecessary for communication , If operation is allowed , They cause a cycle .
Fast spanning tree protocol :RSTP
Traditional spanning tree (IEEE 802.1D) There is a convergence problem , Because topology changes may require 30 Seconds to minutes . In some cases, this cannot meet the requirements of users .1998 year , Fast spanning tree protocol (RSTP,IEEE 802.1w) The standardization work is completed , This is a variant of the original protocol , The convergence time can be reduced to about 6 second . Now , The traditional spanning tree has been declared obsolete .
stay RSTP in , The switch retains information about the second lowest cost path to the root , Therefore, it is better to switch to the new topology in case of failure than STP Faster protocol .

Multiple RSTP:MSTP
RSTP The protocol has become an ideal choice to prevent loops in the layer-2 network in the topology including redundancy . If there are switches in the network , Then it must be able to run RSTP Algorithm .
Another interesting form of redundancy or security for loops is the use of multiple spanning tree protocols (MSTP).MSTP yes RSTP An extension of , Can be VLAN Group into spanning tree instances . It provides multiple forwarding paths for data traffic , And achieve load balancing .

MSTP For each VLAN The group is configured with a separate spanning tree , Allow each VLAN There is a configured root bridge and forwarding topology . It blocks all possible alternate paths in each spanning tree , Keep only one .
Hongke provides RSTP and MSTP Technology of integrating functions into the network , Hongke network management redundant switch (MES). This is a with many configuration options FPGA Of IP Nuclear solutions , Able to support RSTP and MSTP, Switches that can be used in many types of applications . Want to know more about it STP Technology and application of the Protocol , Please feel free to pass [email protected] Contact us .
边栏推荐
- 虹科分享 | 为什么说EtherCAT是提高控制系统性能的最佳解决方案?
- TCP based online dictionary
- FIR滤波器设计(2)——Vivado调用IP核设计FIR滤波器
- 什么是DNS放大攻击
- Thinking about MySQL taking shell through OS shell
- Leetcode question brushing record
- day06_ Classes and objects
- Raw advanced socket experiment
- 软件测试职业发展:软件测试人员该何去何从
- Conversion of fixed-point number to floating-point number of vivado IP core
猜你喜欢

虹科为您分享EtherCAT demo,教您如何从其他协议快速过渡到EtherCAT工业总线

软件测试职业发展:软件测试人员该何去何从

Why are the job requirements for software testing in 2022 getting higher and higher? Is there any secret in it?

day17_ Under collection

网络安全学习(二)

Vivado IP核之浮点数加减法 Floating-point

Vivado IP核之定点数转为浮点数Floating-point

day12_ Multithreading

6、 Network interconnection and Internet

注解(Annotation)
随机推荐
Vivado IP核之定点数转为浮点数Floating-point
TCP socket communication experiment
Raw advanced socket experiment
Online multiplayer chat room based on UDP communication
虹科分享 | 为什么说EtherCAT是提高控制系统性能的最佳解决方案?
Multiple IO usage
IPv6表示方法与配置案例
What is the basic principle of Library collision and library collision attack
IGMP protocol software development experiment
FIR filter design (2) -- vivado calls IP core to design FIR filter
FIR滤波器设计(1)——利用matlab的fdatool工具箱设计FIR滤波器参数
基于FPGA的4位减法器设计及仿真代码
虹科案例 | PAC:一种整合了softPLC控制逻辑、HMI和其他服务功能的集成控制解决方案
钓鱼邮件处置
一文看懂网络安全五年之巨变
网络安全学习(一)
多路IO用法
Sequence list and linked list
Floating point square root of vivado IP core floating point
Those vulnerability attacks on app