CN114389965B - Two-layer network loop detection positioning method - Google Patents

Two-layer network loop detection positioning method Download PDF

Info

Publication number
CN114389965B
CN114389965B CN202210094710.XA CN202210094710A CN114389965B CN 114389965 B CN114389965 B CN 114389965B CN 202210094710 A CN202210094710 A CN 202210094710A CN 114389965 B CN114389965 B CN 114389965B
Authority
CN
China
Prior art keywords
port
loop
loop detection
private
sending
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210094710.XA
Other languages
Chinese (zh)
Other versions
CN114389965A (en
Inventor
武斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingzhou Microelectronics Hangzhou Co ltd
Original Assignee
Xinhe Semiconductor Technology Wuxi Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xinhe Semiconductor Technology Wuxi Co Ltd filed Critical Xinhe Semiconductor Technology Wuxi Co Ltd
Priority to CN202210094710.XA priority Critical patent/CN114389965B/en
Publication of CN114389965A publication Critical patent/CN114389965A/en
Application granted granted Critical
Publication of CN114389965B publication Critical patent/CN114389965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation

Abstract

The invention relates to the technical field of communication, in particular to a two-layer network loop detection positioning method, which comprises the following steps: by periodically sending the private loop detection message, loop judgment and blocking processes are carried out according to the sending port information and the SMAC in the private loop detection message, so that the method not only supports positioning of loop points and blocking of loops on the multi-chip forwarding equipment, but also can reduce forwarding pressure of the detection message on the whole network.

Description

Two-layer network loop detection positioning method
Technical Field
The invention relates to the technical field of communication, in particular to a two-layer network loop detection positioning method.
Background
The loop appears in the two-layer network, which can lead the forwarding equipment to repeatedly send the broadcast, multicast, unknown unicast and other messages, occupy a large amount of network bandwidth, and cause network resource waste and even network paralysis. In order to discover loops in a two-layer network in time and avoid serious influence on the whole network, a loop detection technology needs to be provided, but a spanning tree protocol is common, and the loop network is changed into a loop-free tree network through a certain algorithm, so that repeated transmission of messages in the network is avoided, but the spanning tree protocol cannot be deployed on switch equipment with low requirements on CPU performance and no protocol. In addition to spanning tree protocol, other existing loop detection technologies can detect loop phenomenon, but less consideration is given to how to locate loop forming points of a loop and automatically break the loop, and how to detect on a multi-chip forwarding device, how to reduce the forwarding times of detection messages and reduce network bandwidth consumption.
On the other hand, the basic principle of loop detection is that the forwarding device periodically sends a loop detection message and detects whether the loop detection message returns to the device (the receiving port and the sending port are not required to be the same port) so as to confirm whether a loop exists; if a port receives a loop detection message sent by the device, the port is determined to have a loop on the link where the port is located. Meanwhile, the equipment reports information to the user, and the port is in a controlled state, so that the influence of the loop on the whole network is reduced as much as possible. If a plurality of forwarding chips exist in the device, whether a loop exists or not can be determined by judging whether the receiving and transmitting ports are in the same forwarding chip, and because the loop existence detection message can be repeatedly broadcast in the network, the loop existence detection message needs to be discarded when the forwarding times exceed a certain value, and unnecessary network bandwidth is prevented from being increased.
In order to solve the problems, the invention provides a two-layer network loop detection positioning method which not only supports positioning loop points and blocking loops on multi-chip forwarding equipment, but also reduces the forwarding pressure of detection messages to the whole network.
Disclosure of Invention
In order to realize loop detection and positioning of a two-layer network, the invention provides a loop detection and positioning method of the two-layer network, which is used for periodically sending a private loop detection message, carrying out loop judgment and blocking flow according to sending port information and SMAC in the private loop detection message, supporting positioning loop points and blocking loops on multi-chip forwarding equipment, and reducing forwarding pressure of the detection message to the whole network.
In order to achieve the above purpose, the present invention adopts the following technical scheme.
In the embodiment of the invention, a two-layer network loop detection positioning method is provided, which comprises the following steps:
s1, periodically sending a private loop detection message, wherein the private message carries sending port information;
s2, after receiving the private loop detection message, the equipment carries out loop judgment and determines a block port blocking flow according to SMAC and sending port information in the private message;
s3, in the BFC period, if the block port does not receive the loop detection message, the port state is set to be a forward forwarding state;
s4, in the RLC period, waiting until the RLT timer is finished, prompting user loop release of a block port, wherein the block port is a looping point, and prompting the user to loop-free of a non-block port.
Further, the private message is newly added with a TPID type, transmission port information and total transmission times TFT.
Further, the sending port information includes a port type, a port logic id, and a chip id.
Further, after receiving the private loop detection message, the device determines whether the SMAC is equal to the Local MAC and whether the chip id to which the transmitting port belongs is equal to the receiving port chip id, and if yes, the device considers the SMAC as a loop.
Further, if the device determines that the loop is not established, the TFT field is added with 1, if yes, the device is discarded, and if no, the device continues to forward.
Further, if the device determines that the device is a loop, the device further determines the block port according to the states of the transmitting port and the receiving port.
Further, the newly accessed link results in a loop, and its port is naturally a block port as a looping point.
Further, if any non-block port receives the detection message sent by the chip in the RLC period, the RLT needs to be re-clocked; otherwise, when the timer is finished, namely the whole loop detection is finished, the user loop is released, a block port is used as a looping point, and a non-block port prompts the user to have no loop.
In the embodiment of the invention, a computer device is also provided, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the access method of the special terminal when executing the computer program.
In an embodiment of the present invention, a computer-readable storage medium is also presented, in which a computer program for executing the access method of a specific terminal is stored.
The invention has the beneficial effects that the two-layer network loop detection positioning method is provided for solving the problems existing in the existing communication system, not only supports positioning loop points and blocking loops on the multi-chip forwarding equipment, but also reduces the forwarding pressure of the detection message on the whole network.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic diagram of an implementation flow of the present invention;
FIG. 2 is a diagram illustrating a message format of a private detection message according to the present invention;
FIG. 3 is a diagram illustrating a message format of a private detection message carrying a VLAN according to the present invention;
FIG. 4 is a schematic diagram of a loop detection and loop forming determination process according to a first embodiment of the present invention;
fig. 5 is a schematic diagram of a startup recovery forwarding flow according to a first embodiment of the present invention;
fig. 6 is a schematic diagram of a loop breaking flow according to a first embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The following examples are only used to more clearly illustrate the system method and technical scheme of the present invention, and should not be used to limit the scope of the present application.
According to the embodiment of the invention, a two-layer network loop detection positioning method is provided, and a private loop detection message is periodically sent, and a loop judgment and blocking flow is carried out according to the sending port information and the SMAC in the private loop detection message, so that the loop point positioning and the loop blocking on the multi-chip forwarding equipment are supported, and the forwarding pressure of the detection message to the whole network can be reduced.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments thereof.
Fig. 1 is a schematic process flow diagram of a two-layer network loop detection positioning method. As shown in fig. 1, the method comprises the steps of:
s1, periodically sending a private loop detection message, wherein the private message carries sending port information;
further, the private message is newly added with a TPID type, transmission port information and total transmission times TFT.
Further, the sending port information includes a port type, a port logic id, and a chip id.
S2, after receiving the private loop detection message, the equipment carries out loop judgment and determines a block port blocking flow according to SMAC and sending port information in the private message;
further, after receiving the private loop detection message, the device determines whether the SMAC is equal to the Local MAC and whether the chip id to which the transmitting port belongs is equal to the receiving port chip id, and if yes, the device considers the SMAC as a loop.
Further, if the device determines that the loop is not established, the TFT field is added with 1, if yes, the device is discarded, and if no, the device continues to forward.
Further, if the device determines that the device is a loop, the device further determines the block port according to the states of the transmitting port and the receiving port.
Further, the newly accessed link causes a loop, and the port of the newly accessed link is naturally a block port as a looping point.
S3, in the BFC period, if the block port does not receive the loop detection message, the port state is set to be a forward forwarding state;
s4, in the RLC period, waiting until the RLT timer is finished, prompting user loop release of a block port, wherein the block port is a looping point, and prompting the user to loop-free of a non-block port.
In the preferred embodiment, if any non-block port receives the detection message sent by the chip in the RLC period, the RLT needs to be re-clocked; otherwise, when the timer is finished, namely the whole loop detection is finished, the user loop is released, a block port is used as a looping point, and a non-block port prompts the user to have no loop.
It should be noted that although the operations of the method of the present invention are described in a particular order in the above embodiments and the accompanying drawings, this does not require or imply that the operations must be performed in the particular order or that all of the illustrated operations be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
For a clearer explanation of the above-mentioned two-layer network loop detection positioning method, a specific embodiment is described below, however, it should be noted that this embodiment is only for better explaining the present invention, and is not meant to limit the present invention unduly.
Embodiment one:
a two-layer network loop detection positioning method comprises the following specific implementation steps:
step one: sending private loop detection message
After the loop detection function is started, forwarding equipment such as a switch and the like needs to wait for different times at random according to the priority, then a sending timer of the private detection message is started, the timer sequentially constructs the private loop detection message from all link up ports of the equipment every N periods, and the message is sent to the hardware to be forwarded to the network.
The format of the PRIVATE detection message designed by the method is shown in fig. 2, the message format carrying Vlan tag is shown in fig. 3, wherein the PRIVATE loop detection message is determined by a TPID (tag protocol ID) field, the PRIVATE_ATTRIBUTE field comprises a chip ID (tx_mod_id) to which a transmission port belongs, a transmission port type (tx_port_type), a transmission port ID (tx_port_id) and total forwarding times (tft), the transmission port type can determine whether the transmission message needs to carry Vlan tag, the chip ID to which the port belongs can distinguish multi-chip scenes, and the total forwarding times field is used for reducing the repeated forwarding times of the message.
In this embodiment, the private detection message needs to carry dmac=0xffffff, smac=the MAC of the device, tpid=0x9119, and information such as port type, port logical id, chip id, TFT, etc. of the sending port is carried in the privateate_attribute field, so that detection is convenient, and if the sending port is of the trunk port type, the sending detection message needs to carry allowed Vlan (Virtual Local Area Network ) information.
Step two: detecting loops and determining loop-forming point blocking flow
The process judges whether a loop exists in the network topology, and can identify a typical loop of the network: the TX-RX fiber self-loop, the down-hanging network loop, the self-network loop and the like, and can block the port to break the loop, the flow is shown in fig. 4, and the specific flow is described as follows:
1. when the port receives the loop detection message, the port sends the loop detection message, and parameter information carried by the loop detection message is analyzed: SMAC, transmission PORT id (tx_port), transmission PORT type, chip id to which the transmission PORT belongs, TFT (total number of transmissions); the SMAC and the chip id can determine whether the message is sent by the chip on the device, and the TFT is used for determining whether the message is discarded.
2. Judging whether the SMAC is equal to Local MAC (MAC address of the equipment) and whether the chip id of the sending port is equal to the chip id of the receiving port, namely whether the sending port is a message sent by the same chip on the equipment, if not, adding 1 to a TFT field, judging whether the MFT (maximum sending times) is exceeded, if so, discarding, otherwise, continuing forwarding;
3. if yes, i.e. a loop exists, further judging whether the tx_port (transmitting PORT) is equal to the rx_port (receiving PORT), i.e. whether the same PORT is transceived, if yes, giving a prompt: may be a TX-RX fiber loop or an drop network loop;
4. if the PORTs are not the same PORT, judging whether RX_PORT is block, if the receiving PORT is block and receives a message again, continuing the block, and restarting a recovery flow, namely resetting a recovery Forwarding counter BFT (Back to Forwarding Timer, recovery Forwarding timer) of the block PORT;
5. if the RX_PORT is not blocked, but the TX_PORT is blocked, namely after the sending PORT is blocked preferentially, the receiving PORT does not need to be blocked, and the processing is not performed;
6. otherwise, the sending port and the receiving port are not blocked, and the receiving port is required to be set as a block, so that a recovery forwarding flow is started.
Step three: restoring forwarding flow
In the loop detection and blocking process, in step 6, a block port restoration forwarding process is triggered, and the specific process is shown in fig. 5, and is described in detail as follows:
1. the BFT timer of the block port is firstly set to zero;
2. if the block port does not receive the loop detection message in the BFC (Back to Forwarding Cycle, restoring Forwarding period and sending period M times), setting the port state as Forwarding state;
3. otherwise, the BFT recime is still in a blocking state, and whether the message is received or not is continuously detected.
Step four: loop breaking flow
Clearing an RLT (Remove to Loop Timer, loop release timer) at initial time, and if any non-block port in the RLC (Remove to Loop Cycle, loop release period, transmission period multiple of L) period receives a detection message sent by the chip, then the RLT needs to be re-timed; otherwise, when the RLT timer is ended, namely the whole loop detection is ended, the user loop is released by the prompt of a block port, the block port is a looping point, the user is not loop by the prompt of a non-block port, and the flow is shown in figure 6.
RLT is started when the whole detection flow is started; step three affects the RLT value, because the port forward or block status affects whether the chip can receive the message sent by itself, and further affects whether the RLT clears or continues to time.
In the specific implementation, step 1-3 can only determine that a loop exists in the network originally, a block port can be regarded as a loop forming point, but when a link is newly added to the network topology, the link is regarded as the loop forming point, and the existing detection technology is less concerned about the condition that the loop is newly added, so that the port can be extended by a random value from link down to link up according to the characteristic of the newly added link, BFC (Back to Forwarding Cycle, forwarding period recovery, sending period multiple) is realized, and if the newly accessed link leads to the loop, the port is always slower than the ports on other links in recovery and Forwarding, and the port is naturally a block port to be used as the loop forming point.
The invention has the beneficial effects that aiming at the problems existing in the existing communication system, the invention provides a two-layer network loop detection positioning method, which periodically transmits a private loop detection message, carries out loop judgment and blocking flow according to the transmission port information and SMAC in the private loop detection message, not only supports positioning loop points and blocking loops on multi-chip forwarding equipment, but also reduces the forwarding pressure of the detection message to the whole network.
The applicant has described in detail the embodiments of the present invention with reference to the accompanying drawings of the specification, the above embodiments are only preferred embodiments of the present invention, and the detailed description is only for helping the reader to better understand the spirit of the present invention, but not limiting the scope of the present invention, but any improvements or modifications based on the spirit of the present invention should fall within the scope of the present invention.

Claims (6)

1. A two-layer network loop detection positioning method is characterized by comprising the following steps: s1, periodically sending a private loop detection message, wherein the private loop detection message carries sending port information; s2, after receiving the private loop detection message, the equipment judges a loop and determines a block port blocking flow according to SMAC and sending port information in the private message; after receiving the private loop detection message, the equipment judges whether the SMAC is equal to the LocalMAC and whether the chip id of the sending port is equal to the chip id of the receiving port, if so, the equipment considers the SMAC as a loop; s3, in the BFC period, if the block port does not receive the loop detection message, the port state is set to be a forward forwarding state; s4, in the RLC period, waiting until the RLT timer is finished, prompting user loop release of a block port, wherein the block port is a looping point, and prompting the user to have no loop by a non-block port.
2. The two-layer network loop detection positioning method according to claim 1, wherein: the private loop detection message is newly added with the TPID type, the sending port information and the total sending times TFT.
3. The two-layer network loop detection positioning method according to claim 1, wherein: the sending port information comprises a port type, a port logic id and a chip id.
4. The two-layer network loop detection positioning method according to claim 1, wherein: if the equipment judges that the loop is not established, the TFT field is added with 1, whether the MFT is exceeded or not is judged, if yes, the equipment is discarded, and if not, the equipment continues to transmit.
5. The two-layer network loop detection positioning method according to claim 1, wherein: if the device judges that the device is a loop, the device further judges according to the states of the sending port and the receiving port, and determines the block port.
6. The two-layer network loop detection positioning method according to claim 1, wherein: the newly accessed link results in a loop, the port of which naturally becomes a block port, as a looping point.
CN202210094710.XA 2022-01-26 2022-01-26 Two-layer network loop detection positioning method Active CN114389965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210094710.XA CN114389965B (en) 2022-01-26 2022-01-26 Two-layer network loop detection positioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210094710.XA CN114389965B (en) 2022-01-26 2022-01-26 Two-layer network loop detection positioning method

Publications (2)

Publication Number Publication Date
CN114389965A CN114389965A (en) 2022-04-22
CN114389965B true CN114389965B (en) 2024-03-29

Family

ID=81202845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210094710.XA Active CN114389965B (en) 2022-01-26 2022-01-26 Two-layer network loop detection positioning method

Country Status (1)

Country Link
CN (1) CN114389965B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115333974B (en) * 2022-08-10 2023-08-11 杭州云合智网技术有限公司 Loop detection method and device based on VSI in DRNI network

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007107066A1 (en) * 2006-03-18 2007-09-27 Huawei Technologies Co., Ltd. A method and a communication device of the loopbacked detection based on ethernet
CN101102236A (en) * 2007-08-27 2008-01-09 杭州华三通信技术有限公司 Method and device for detecting loop
CN101562552A (en) * 2009-05-27 2009-10-21 华为技术有限公司 Method, system and device for detecting virtual private LAN loop
CN101707538A (en) * 2009-11-25 2010-05-12 烽火通信科技股份有限公司 Method for detecting and automatically recovering Ethernet loopback
CN103607317A (en) * 2013-10-21 2014-02-26 华为技术有限公司 Two-layer loop detection method, two-layer loop detection device and communication system
CN108933732A (en) * 2017-05-23 2018-12-04 中国电信股份有限公司 loop detecting method, device and system
CN110391957A (en) * 2019-07-26 2019-10-29 新华三技术有限公司合肥分公司 Loop detecting method and device
CN111970201A (en) * 2020-08-28 2020-11-20 迈普通信技术股份有限公司 Multi-chip cascade forwarding system and forwarding control method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007107066A1 (en) * 2006-03-18 2007-09-27 Huawei Technologies Co., Ltd. A method and a communication device of the loopbacked detection based on ethernet
CN101102236A (en) * 2007-08-27 2008-01-09 杭州华三通信技术有限公司 Method and device for detecting loop
CN101562552A (en) * 2009-05-27 2009-10-21 华为技术有限公司 Method, system and device for detecting virtual private LAN loop
CN101707538A (en) * 2009-11-25 2010-05-12 烽火通信科技股份有限公司 Method for detecting and automatically recovering Ethernet loopback
CN103607317A (en) * 2013-10-21 2014-02-26 华为技术有限公司 Two-layer loop detection method, two-layer loop detection device and communication system
CN108933732A (en) * 2017-05-23 2018-12-04 中国电信股份有限公司 loop detecting method, device and system
CN110391957A (en) * 2019-07-26 2019-10-29 新华三技术有限公司合肥分公司 Loop detecting method and device
CN111970201A (en) * 2020-08-28 2020-11-20 迈普通信技术股份有限公司 Multi-chip cascade forwarding system and forwarding control method

Also Published As

Publication number Publication date
CN114389965A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
US8804529B2 (en) Backward congestion notification
WO2009115037A1 (en) Ethernet trunk port allocation method and device
CN101060485B (en) Topology changed messages processing method and processing device
EP2352253A1 (en) Method and apparatus for protecting link aggregation group of ethernet ring
RU2605494C2 (en) METHOD AND DEVICE FOR DETECTING Ethernet PORTS LOOPING
WO2009023996A1 (en) Method for implementing network interconnect via link aggregation
CN114389965B (en) Two-layer network loop detection positioning method
CN102868635A (en) Multi-core and multi-thread method and system for preserving order of messages
CN112367313B (en) Message anti-attack method and device
WO2022057514A1 (en) Link fault detection method and apparatus and computer-readable storage medium
WO2017000861A1 (en) Method and apparatus for learning mac address in virtual local area network of switch
CN107070695B (en) Bus type network load self-adaptive communication method
CN101227372B (en) Ether ring net protection method, transmission node and host node
US20230337266A1 (en) Method, and electronic device for allocating routing resources of wifi6 router
CN110177060B (en) Active defense method for time sequence side channel attack of SDN network
CN112769650A (en) Multi-VLAN loop detection method and system
US20080013565A1 (en) Reverse Polling Algorithm For Shared Resources To Reduce Collisions In A Network
CN115118645A (en) Virtual two-layer network loop detection method
CN107423118A (en) Distributed computational data retransmission method and device
CN111901181B (en) Processing method for error rate detection and related equipment
CN111224803B (en) Multi-master detection method in stacking system and stacking system
CN104052586B (en) Realize the method and device that quick table is synchronous between line card
CN115412456B (en) Loop detection method, device and medium in stacking environment
CN106992878B (en) Multicast detection method and device
CN114039881B (en) Communication connection monitoring method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240320

Address after: Room 37, Room 807, Building 2, No. 217 Wujiang Road, Shangcheng District, Hangzhou City, Zhejiang Province, 310000

Patentee after: Qingzhou Microelectronics (Hangzhou) Co.,Ltd.

Country or region after: Zhong Guo

Address before: 214135 room e1-301, China Sensor Network International Innovation Park, 200 Linghu Avenue, Xinwu District, Wuxi City, Jiangsu Province

Patentee before: Xinhe semiconductor technology (Wuxi) Co.,Ltd.

Country or region before: Zhong Guo