当前位置:网站首页>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 .
边栏推荐
猜你喜欢
随机推荐
DDoS详解
day12_ Multithreading
What are the advantages of software testing? See how much you know
网站服务器80,443端口一直被恶意攻击怎么办?
Arrays&Object&System&Math&Random&包装类
浅谈缺陷描写样式
Vivado IP核之浮点数乘除法 Floating-point
九、 组网技术
Idea practical shortcut key novice must see
day10_ Exception handling & enumeration
基于FPGA的IIR型滤波器设计
5、 Wireless communication network
如何判断业务被DDoS攻击?又会造成哪些危害?
6898 changing matrix problem solution
day03_2_作业
8、 Network security
day04_数组
案例补充、ATM
Complex floating point division of vivado IP core floating point
Merkle Tree 存在性功能第一次修改