A topology discovery method based on HSR protocol network

The HSR ring network topology discovery method uses monitoring frames to update hop counts and port numbers, enabling self-discovery and efficient fault management in HSR ring networks.

CN115883378BActive Publication Date: 2024-12-31BEIJING AEROSPACE CHENXIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211323253.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2024-12-31
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

Existing topology discovery methods are not applicable to HSR ring networks, as they are based on network protocols above the third layer of OSI, while the HSR protocol operates at the physical layer and has a ring network attribute.

Method used

A ring network topology discovery method that utilizes monitoring frames based on the HSR protocol, updating hop count and receiving port numbers, and identifying network topology at the MAC layer using source physical addresses, proxy physical addresses, and link establishment status.

Benefits of technology

Enables self-discovery of HSR ring network topology without additional protocols, facilitating quick fault location and scope determination for network administrators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883378B_ABST
    Figure CN115883378B_ABST
Patent Text Reader

Abstract

The present invention discloses a ring network topology discovery method, which receives a monitoring frame based on the HSR protocol issued by a second network node through a first redundant port of a lower physical layer supporting the HSR protocol, updates the number of hops and the receiving port number in the monitoring frame, obtains an updated monitoring frame, sends the updated monitoring frame to an adjacent network node through a second redundant port of a lower physical layer supporting the HSR protocol, and uploads the updated monitoring frame to a MAC layer through a network link interface; and identifies the topology of the ring network according to each monitoring frame uploaded to the MAC layer by each network link interface. The self-discovery of the HSR ring network topology structure can be completed with the help of certain fields in the HSR protocol monitoring frame, and the discovery of the physical layer HSR ring network topology structure can be realized without adding other network topology discovery protocols.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of computer networks, and in particular to a topology discovery method. Background Art

[0002] The HSR (High-availability Seamless Redundancy) protocol is a physical layer redundancy protocol with high-reliability seamless switching. The protocol complies with the IEC 62439-3 standard. The protocol can implement zero-packet-loss technology for redundant link switching in ring network topology. Topology discovery refers to discovering network elements and determining the interconnection relationship between network elements. It is an important function in configuration management and fault management, and is also an important part of network management. The network topology map generated by topology discovery can help network administrators understand the network topology structure, quickly locate the location of the fault, and determine the scope of the fault. It can also become a common starting point for discovering network elements and calling other management function modules, and occupies an important position in the development of the entire network management system.

[0003] Topology discovery is generally done through network management information protocols, such as SNMP (Simple Network Management Protocol) or general protocols, such as ARP (Address Resolution Protocol) and ICMP (Internet Control Message Protocol).

[0004] During the research process, the inventor found that the topology discovery methods in the related technologies are all based on network protocols above the third layer of OSI (Open System Interconnection), while the HSR network protocol is applied to the physical layer and the network has a ring network attribute. The topology discovery methods in the related technologies cannot be applied to the topology discovery of the HSR ring network. In view of the ring network attributes of the HSR network, a new topology discovery method needs to be adopted to realize the discovery of physical connections between network device ports. This method is specially proposed. Summary of the invention

[0005] The technical problem to be solved by the embodiments of the present invention is to provide a topology discovery method to realize topology discovery of an HSR ring network structure based on the HSR protocol.

[0006] In order to solve the above problem, the present invention discloses a ring network topology discovery method, which is applied to a first network node and includes:

[0007] Receiving a monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer supporting the HSR protocol; the monitoring frame includes a source physical address, a first proxy physical address, a hop count, a receiving port number, and a link establishment status of the lower physical layer redundant port;

[0008] Updating the hop count and the receiving port number in the monitoring frame to obtain an updated monitoring frame;

[0009] Sending the updated monitoring frame to an adjacent network node through a second redundant port of the lower physical layer supporting the HSR protocol, and uploading the updated monitoring frame to the MAC layer through a network link interface;

[0010] Based on the first network node, the topology of the ring network is identified according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded to the MAC layer by each network link interface.

[0011] Preferably, the monitoring frame includes an idle field, the hop count is stored in a byte of the idle field, the link establishment status of the first redundant port of the lower physical layer supporting the HSR protocol and the link establishment status of the second redundant port of the lower physical layer supporting the HSR protocol are stored in the same byte of the idle field, and the receiving port number is stored in a byte of the idle field.

[0012] Preferably, updating the hop count and the receiving port number in the monitoring frame to obtain an updated monitoring frame includes:

[0013] Increasing the hop number field of the monitoring frame by 1;

[0014] The receiving port number of the monitoring frame is changed to the port number of the physical layer redundant port of the first network node that receives the monitoring frame, to obtain the updated monitoring frame.

[0015] Preferably, the monitoring frame based on the HSR protocol sent by the second network node is:

[0016] When the monitoring frame sending conditions specified in the HSR protocol are met, the second network node generates a monitoring frame based on the proxy physical address and HSR tag recorded in the node list, and sends the monitoring frame through the first redundant port of the lower physical layer that supports the HSR protocol or the second redundant port of the lower physical layer that supports the HSR protocol, and uploads the monitoring frame to the MAC layer through the network link interface.

[0017] Preferably, the monitoring frame sending conditions include:

[0018] After a preset interval time has passed for the second network node, or the link establishment state of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol of the second network node changes.

[0019] Preferably, before receiving the monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer supporting the HSR protocol, the method further includes:

[0020] When receiving a common Ethernet data frame sent by the MAC layer, converting the common Ethernet data frame into an HSR data frame based on the HSR protocol;

[0021] The source physical address is proxied based on the source physical address of the HSR data frame to obtain a first proxy physical address.

[0022] Preferably, the proxying the source physical address based on the source physical address of the HSR data frame to obtain a first proxy physical address includes:

[0023] Searching the source physical address in the proxy physical address of the node list;

[0024] If the source physical address is found in the proxy physical addresses in the node list, the serial number of the HSR tag of the first proxy physical address corresponding to the source physical address in the node list is increased by 1 and stored;

[0025] If the source physical address is not found in the proxy physical addresses in the node list, a first proxy address corresponding to the source physical address is registered in the node list and a serial number of the HSR tag of the first proxy address is increased by 1 and stored.

[0026] Preferably, the updating of the hop count and the receiving port number in the monitoring frame, after obtaining the updated monitoring frame, further comprises:

[0027] Obtaining the source physical address of the updated monitoring frame;

[0028] Find out whether the source physical address exists in the node list;

[0029] If the source physical address exists in the node list, discarding the updated monitoring frame;

[0030] If the source physical address does not exist in the node list, the steps of sending the updated monitoring frame to the adjacent network node through the second redundant port of the lower physical layer supporting the HSR protocol and uploading the updated monitoring frame to the MAC layer through the network link interface are performed.

[0031] Preferably, the monitoring frame also includes a sending port number;

[0032] The method of identifying the topology of the ring network based on the first network node according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded to the MAC layer by each network link interface includes:

[0033] Establishing a connection between the first network node and a monitoring device at the MAC layer through a network link interface;

[0034] Parsing monitoring frames local to the first network node and monitoring frames of nodes not located at the first network node;

[0035] Obtaining the link establishment status of the lower physical layer redundant port of each monitoring frame to determine the open and closed loop status of the ring network;

[0036] Determining a device type of each network node based on the source physical address and the first proxy physical address of each monitoring frame;

[0037] Based on the receiving port number and the sending port number of each monitoring frame, determine the interconnection status of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol between each network node;

[0038] Based on the hop count of each monitoring frame, the number of network nodes in the ring network and the relative position relationship of each network node in the ring network are determined.

[0039] In order to solve the above problem, the present invention further discloses a ring network topology discovery device, which is applied to a first network node and includes:

[0040] A receiving module, configured to receive a monitoring frame based on the HSR protocol sent by a second network node through a first redundant port of a lower physical layer supporting the HSR protocol; the monitoring frame includes a source physical address, a first proxy physical address, a hop count, a receiving port number, and a link establishment status of the lower physical layer redundant port;

[0041] An updating module, used for updating the hop count and receiving port number in the monitoring frame to obtain an updated monitoring frame;

[0042] A sending module, used to send the updated monitoring frame to an adjacent network node through a second redundant port of the lower physical layer supporting the HSR protocol, and upload the updated monitoring frame to the MAC layer through a network link interface;

[0043] A topology discovery module is used to identify the topology structure of the ring network based on the first network node, according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded to the MAC layer by each network link interface.

[0044] Compared with the related art, the embodiments of the present invention have the following advantages:

[0045] The embodiment of the present invention introduces a ring network topology discovery method, in which each network node in the ring network receives a monitoring frame sent by an adjacent network node through the first redundant port of the lower physical layer supporting the HSR protocol, updates the monitoring frame, sends the updated monitoring frame to the adjacent network node through the second redundant port of the lower physical layer supporting the HSR protocol, and uploads the updated monitoring frame to the MAC layer through the network link interface, and identifies the topology of the ring network at the MAC layer based on each monitoring frame uploaded to the MAC layer by each network link interface. The technical solution of the embodiment of the present invention can complete the self-discovery of the HSR ring network topology structure with the help of certain fields in the HSR protocol monitoring frame, and can realize the discovery of the physical layer HSR ring network topology structure without adding other network topology discovery protocols, which is convenient for network administrators to grasp the topology of the HSR ring network, quickly locate the location of the fault, and determine the scope of the fault. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flowchart of the steps of a ring network topology discovery method of the present invention;

[0047] Figure 2 It is a logic block diagram of an HSR ring network of the present invention;

[0048] Figure 3 It is a block diagram of a ring network topology discovery device of the present invention.

[0049] Reference numerals:

[0050] 211: SAN1 node; 212: SAN2 node; 221: RedBox device; 222: DANH2 node; 223: DANH1 node; 224: DANH5 node; 225: DANH4 node; 226: DANH3 node; 231: network link interface; 232: the first redundant port of the lower physical layer supporting the HSR protocol; 233: the second redundant port of the lower physical layer supporting the HSR protocol. DETAILED DESCRIPTION

[0051] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0052] One of the core concepts of the embodiments of the present invention is: based on the inherent characteristics of the high-reliability seamless redundant HSR protocol ring network and the inherent attributes of the HSR monitoring frame, a ring network topology discovery method based on the HSR protocol is proposed. Only by using certain idle fields of the HSR protocol monitoring frame can the topology structure of the HSR ring network be monitored at the MAC (Media Access Control) layer, thereby realizing the topology discovery of the HSR ring network.

[0053] Therefore, the embodiment of the present invention introduces a ring network topology discovery method, which is applied to a first network node, referring to Figure 1 , Figure 1 A flowchart of a ring network topology discovery method of the present invention is shown, comprising:

[0054] Step S110: receiving a monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer that supports the HSR protocol.

[0055] In an embodiment of the present invention, the ring network is a ring network formed by interconnecting multiple DANH nodes (Doubly Attached Node with HSR protocal) or RedBox devices (Redundancy Box) supporting the HSR protocol. Both the DANH node and the RedBox device can convert the ordinary Ethernet data frame sent by the SAN node (Singly Attached Node) into an HSR data frame and proxy the physical address (MAC address) of the HSR data frame. Among them, the DANH node is a communication network device running the HSR protocol, each DANH node can only connect to a single SAN node, and each DANH node can only proxy the ordinary Ethernet data frame sent by a single SAN node; the RedBox device is a gateway device running the HSR protocol, each RedBox device can connect to multiple SAN nodes, and each RedBox device can proxy the MAC address of the ordinary Ethernet data frame sent by multiple SAN nodes.

[0056] In the embodiment of the present invention, the DANH node or RedBox device supporting the HSR protocol includes a first redundant port of the lower physical layer supporting the HSR protocol and a second redundant port of the lower physical layer supporting the HSR protocol (PortA port and PortB port) and one network link interface (interlink port, PortC port). Specifically, the multiple DANH nodes or RedBox devices supporting the HSR protocol are interconnected to form a ring network through the first redundant port of the lower physical layer supporting the HSR protocol and the second redundant port of the lower physical layer supporting the HSR protocol.

[0057] In the embodiment of the present invention, the first network node and the second network node are any node or device among a plurality of DANH nodes or RedBox devices supporting the HSR protocol constituting the ring network.

[0058] Specifically, the first network node is interconnected with the left and right adjacent network nodes through the first redundant port of the lower physical layer supporting the HSR protocol and the second redundant port of the lower physical layer supporting the HSR protocol to form a ring network; the first network node establishes a connection with the MAC layer through the network link interface.

[0059] In the embodiment of the present invention, the monitoring frame includes a source physical address, a first proxy physical address, a hop count, a receiving port number, and a link establishment status to a lower physical layer redundant port.

[0060] Preferably, the monitoring frame includes an idle field, the hop count is stored in a byte of the idle field, the link establishment status of the first redundant port of the lower physical layer supporting the HSR protocol and the link establishment status of the second redundant port of the lower physical layer supporting the HSR protocol are stored in the same byte of the idle field, and the receiving port number is stored in a byte of the idle field.

[0061] In an embodiment of the present invention, the monitoring frame is an HSR monitoring frame. Referring to Table 1, Table 1 shows the position structure of an HSR monitoring frame of the present invention. The destination MAC is located at bytes 0 to 5 of the HSR monitoring frame; the source MAC is located at bytes 6 to 11 of the HSR monitoring frame. For a RedBox device, the source MAC is the local MAC address of the RedBox device. For a DANH node, because the DANH node does not have a local MAC address, the source MAC is the MAC address of the data frame proxied by the DANH node. That is to say, for an HSR monitoring frame generated by a DANH node, the source MAC address of the HSR monitoring frame is the same as the proxy MAC address; the HSR tag is when the ring network node converts an ordinary Ethernet data frame into an HSR data frame, and an HSR tag is added after the source MAC of the ordinary Ethernet data frame. The HSR tag is 6 bytes in total and is located at bytes 12 to 17 of the HSR monitoring frame. The HSR tag includes: HSR_Ethertype (HSR_ET, HSR protocol type), a total of 2 bytes; Tx_PathID (redundant port sending port number), a total of 1 byte; LSDUsize (HSR data frame length), a total of 1 byte; SeqNr (Sequence Number, HSR data frame sequence number), a total of 2 bytes. The proxy MAC is located at the 26th to 31st bytes of the HSR monitoring frame, and the proxy MAC is the MAC address of the ordinary Ethernet data frame sent by the SAN node of the ring network node; the idle field is located at the 63rd to 65th bytes of the HSR monitoring frame, and the present invention fills the hop number field, Rx_PathID (receiving port number of the lower physical layer redundant port) and the link establishment status of the lower physical layer redundant port in the idle field. Specifically, the hop count is located at the 63rd byte of the HSR monitoring frame, and the hop count represents the number of network nodes that the HSR monitoring frame passes through from the generating node to the monitoring node; the Rx_PathID is located at the 64th byte of the HSR monitoring frame, and the Rx_PathID is the port number of the lower physical layer redundant port of the local network node receiving the HSR monitoring frame; the lower physical layer redundant port link establishment status is located at the 65th byte of the HSR monitoring frame, and the redundant port link establishment status is specifically: when the first network node does not establish a connection with the adjacent network node through the lower physical layer redundant port, the lower physical layer redundant port link establishment status is a disconnected state; when the first network node establishes a connection with the adjacent network node through the lower physical layer redundant port, the redundant port link establishment status is a link establishment state.

[0062]

[0063] Table 1

[0064] In the embodiment of the present invention, the link establishment status of the lower physical layer redundant port is filled in the 65th byte of the HSR monitoring frame. Specifically, the link establishment status of the lower physical layer first redundant port supporting the HSR protocol is filled in bit0 of the 65 bytes. When bit0 is set to 0, it indicates that the link establishment status of the lower physical layer first redundant port supporting the HSR protocol is broken. When bit0 is set to 1, it indicates that the link establishment status of the lower physical layer first redundant port supporting the HSR protocol is established. The link establishment status of the lower physical layer second redundant port supporting the HSR protocol is filled in bit1 of the 65 bytes. Similarly, when bit1 is set to 0, it indicates that the link establishment status of the lower physical layer second redundant port supporting the HSR protocol is broken. When bit1 is set to 1, it indicates that the link establishment status of the lower physical layer redundant port is established.

[0065] Step S120: updating the hop count and receiving port number in the monitoring frame to obtain an updated monitoring frame.

[0066] Preferably, updating the hop count and the receiving port number in the monitoring frame to obtain an updated monitoring frame further includes the following sub-steps:

[0067] Step S121: adding 1 to the hop count field of the monitoring frame.

[0068] Step S122: changing the receiving port number of the monitoring frame to the port number of the physical layer redundant port of the first network node that receives the monitoring frame, to obtain the updated monitoring frame.

[0069] Specifically, after the first network node receives a monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer that supports the HSR protocol, the first network node adds 1 to the hop number field in the monitoring frame on the original basis, and changes the receiving port number in the monitoring frame to the port number of the first redundant port of the lower physical layer that supports the HSR protocol of the first network node according to the port number of the redundant port of the physical layer that the first network node receives the monitoring frame. After updating the hop number field and the receiving port number in the monitoring frame, the updated monitoring frame is obtained.

[0070] Preferably, the monitoring frame based on the HSR protocol issued by the second network node is: when the monitoring frame sending conditions specified in the HSR protocol are met, the second network node generates a monitoring frame based on the proxy physical address and HSR tag recorded in the node list, and sends the monitoring frame through the first redundant port of the lower physical layer that supports the HSR protocol or the second redundant port of the lower physical layer that supports the HSR protocol, and uploads the monitoring frame to the MAC layer through the network link interface.

[0071] Preferably, the monitoring frame sending conditions include: after a preset interval time of the second network node, or the link establishment status of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol of the second network node changes.

[0072] Specifically, the node list may be a ProxyNodeTable table. The ProxyNodeTable table has at least 1024 proxy entries, and the table stores both the proxy physical address and the serial number of the HSR tag.

[0073] Furthermore, the monitoring frame sending conditions in the embodiment of the present invention include two situations:

[0074] Case 1 is that after a preset interval time has passed, the second network node automatically generates and sends the monitoring frame. The preset time interval may be 2 seconds, which may be set according to actual application scenarios, and is not limited in this embodiment of the present invention.

[0075] Case 2 is that when the link status of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol of the second network node changes and the network link interface is in the link state, the second network node automatically generates and sends the monitoring frame.

[0076] Step S130: Send the updated monitoring frame to the adjacent network node through the lower physical layer second redundant port supporting the HSR protocol, and upload the updated monitoring frame to the MAC layer through the network link interface.

[0077] In an embodiment of the present invention, the first network node includes a first redundant port of the lower physical layer supporting the HSR protocol, a second redundant port of the lower physical layer supporting the HSR protocol, and a network link interface, wherein the first network node receives monitoring frames sent by adjacent network nodes in the ring network through a pair of lower physical layer redundant ports, and sends updated monitoring frames to adjacent network nodes in the ring network through the second redundant port of the lower physical layer supporting the HSR protocol. At the same time, the first network node also uploads the updated monitoring frames to the MAC layer through the network link interface, so that the monitoring device in the MAC layer can perform topology discovery of the ring network topology structure.

[0078] S140: Identify the topology of the ring network according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded by each network link interface to the MAC layer.

[0079] In the embodiment of the present invention, the topology structure of the ring network is identified by taking the first network node as an example. Specifically, when topology discovery is performed based on the first network node, a monitoring device located at the MAC layer first establishes a connection with the first network node, and the monitoring device identifies the topology structure of the ring network according to the source physical address, the first proxy physical address, the number of hops, the receiving port number, and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded by each network link interface to the MAC layer.

[0080] Specifically, the monitoring frames uploaded to the MAC layer by each network link interface may include local monitoring frames uploaded to the MAC layer by a local network node (ie, the first network node) and non-local monitoring frames uploaded to the MAC layer by a non-local node.

[0081] Preferably, the monitoring frame further includes a sending port number; the first network node is based on the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment state of the lower physical layer redundant port in each monitoring frame uploaded by each network link interface to the MAC layer, and the topology structure of the ring network can also include the following sub-steps:

[0082] Step S141: Establish a connection between the first network node and a monitoring device at the MAC layer through a network link interface.

[0083] In the embodiment of the present invention, the monitoring device at the MAC layer establishes a connection with the first network node through a network link interface.

[0084] Step S142: Parse the monitoring frames local to the first network node and the monitoring frames of nodes other than the first network node.

[0085] In an embodiment of the present invention, the monitoring device parses the monitoring frames local to the first network node and the monitoring frames of nodes other than the first network node to obtain the source physical address, the first proxy physical address, the number of hops, the receiving port number, the sending port number and the link establishment status of the lower physical layer redundant port in the monitoring frames.

[0086] Step S143: Acquire the link establishment status of the lower physical layer redundant interface of each monitoring frame to determine the open and closed loop status of the ring network.

[0087] In an embodiment of the present invention, the monitoring device obtains the link establishment status of each network node in the ring network to the lower physical layer redundant port by parsing the local monitoring frames of the first network node and the monitoring frames of the nodes other than the first network node, and determines the open and closed loop status of the ring network based on the link establishment status of the lower physical layer redundant port.

[0088] Specifically, when the monitoring device obtains that the link establishment status of the lower physical layer redundant ports of all network nodes in the ring network is all established, the ring network is determined to be in a closed-loop state; when the monitoring device obtains that the link establishment status of the lower physical layer redundant ports of a network node in the ring network is all broken, the ring network is determined to be in an open-loop state.

[0089] Step S144: Determine the device type of each network node based on the source physical address and the first proxy physical address of each monitoring frame.

[0090] In an embodiment of the present invention, the monitoring device parses the local monitoring frame of the first network node to obtain the source physical address and the first proxy physical address in the monitoring frame. When the source physical address and the first proxy physical address are the same, it is determined that the node generating the monitoring frame is a DANH node; when the source physical address and the first proxy physical address are different, it is determined that the node generating the monitoring frame is a RedBox device.

[0091] Step S145: Based on the receiving port number and the sending port number of each monitoring frame, determine the interconnection status of the lower physical layer first redundant port supporting the HSR protocol and / or the lower physical layer second redundant port supporting the HSR protocol between each network node.

[0092] In the embodiment of the present invention, the monitoring device parses the monitoring frames local to the first network node and the monitoring frames of nodes other than the first network node to obtain the receiving port number and the sending port number in the monitoring frames, wherein the receiving port number and the sending port number respectively correspond to the lower physical layer redundant port of the network node that receives and sends the monitoring frame, specifically the lower physical layer first redundant port that supports the HSR protocol or the lower physical layer second redundant port that supports the HSR protocol, thereby determining the interconnection status of the lower physical layer first redundant port that supports the HSR protocol and / or the lower physical layer second redundant port that supports the HSR protocol between the ring network nodes.

[0093] Step S146: Based on the hop count of each monitoring frame, determine the number of network nodes in the ring network and the relative position relationship of each network node in the ring network.

[0094] In an embodiment of the present invention, the monitoring device obtains the number of hops in the monitoring frame received by the first network node by parsing the monitoring frame local to the first network node and the monitoring frame not located at the first network node, and based on the receiving port number and the sending port number of the monitoring frame, it can be determined whether the monitoring frame is received by the first redundant port of the first network node supporting the HSR protocol or the second redundant port of the first network node supporting the HSR protocol, thereby determining whether the monitoring frame is sent from the left side or the right side of the first network node; further, according to the number of hops of the monitoring frame, it can be determined that the network node generating the monitoring is on the left side of the first network node and is interconnected with the first redundant port of the first network node supporting the HSR protocol at the lower physical layer by a specific number of nodes (corresponding to the number of hops); similarly, it can also be determined that the network node generating the monitoring is on the right side of the first network node and is interconnected with the second redundant port of the first network node supporting the HSR protocol at the lower physical layer by a specific number of nodes (corresponding to the number of hops).

[0095] In the embodiment of the present invention, the RedBox device can be connected to multiple SAN nodes, receive and proxy ordinary Ethernet data frames sent by multiple SAN nodes. When the monitoring device performs topology discovery based on the first network node, it can obtain multiple monitoring frames with different proxy physical addresses, and the number of left hops or right hops in the monitoring frames is exactly the same. At this time, it can be determined that the device type of the network node that generates the multiple monitoring frames with different proxy physical addresses is a Redbox device, and the number of proxy physical addresses is the number of SAN nodes proxied by the RedBox device.

[0096] Preferably, before receiving the monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer supporting the HSR protocol, the method may further include the following steps:

[0097] Step S151: when receiving a common Ethernet data frame sent by the MAC layer, convert the common Ethernet data frame into an HSR data frame based on the HSR protocol.

[0098] In the embodiment of the present invention, the common Ethernet data frame is sent by a SAN node located at the MAC layer. The SAN node is a common standard Ethernet device, and the data frame sent by the SAN node is a common Ethernet data frame. The network nodes constituting the ring network receive the common Ethernet data frame sent by the SAN node through a network link interface.

[0099] Specifically, the HSR data frame has 6 more bytes of HSR tag than a common Ethernet data frame.

[0100] Further, in the embodiment of the present invention, converting the ordinary Ethernet data frame into an HSR data frame based on the HSR protocol means that any network node supporting the HSR protocol in the ring network converts the received ordinary Ethernet data frame into an HSR data frame. Specifically, a 6-byte HSR tag is created after the source physical address of the ordinary Ethernet data frame. The HSR tag has been described in detail above and will not be repeated here.

[0101] Step S512: Based on the source physical address of the HSR data frame, the source physical address is proxied to obtain a first proxy physical address.

[0102] Preferably, the proxying the source physical address based on the source physical address of the HSR data frame to obtain a first proxy physical address may also include:

[0103] Step S1511: Search the source physical address in the proxy physical address of the node list.

[0104] In the embodiment of the present invention, all nodes constituting the ring network have a local node list, and the node list may be a ProxyNodeTable table.

[0105] Specifically, searching for the source physical address in the proxy physical address of the node list may include: obtaining the source physical address in the monitoring frame, and performing hash indexing with the source physical address as a key value to search for the proxy physical address stored in the node list.

[0106] Step S1512: if the source physical address is found in the proxy physical addresses in the node list, the serial number of the HSR tag of the first proxy physical address corresponding to the source physical address in the node list is increased by 1 and stored.

[0107] In the embodiment of the present invention, if the source physical address is found in the proxy physical address of the node list, it indicates that the network node has previously acted as an agent for the ordinary Ethernet data frame sent by this SAN node, and has previously registered the first proxy physical address corresponding to the source physical address of the ordinary Ethernet data frame sent by this SAN node in the node list. Therefore, when the ordinary Ethernet data frame sent by the SAN node is received again for proxy of the physical address, it is only necessary to increase the serial number of the HSR tag of the first proxy physical address corresponding to the source physical address in the local node list by 1 and store it.

[0108] Step S1513: If the source physical address is not found in the proxy physical addresses in the node list, register a first proxy address corresponding to the source physical address in the node list and increase the serial number of the HSR tag of the first proxy address by 1 and store it.

[0109] In an embodiment of the present invention, if the source physical address is not found in the proxy physical address of the node list, it indicates that the network node has not previously proxied the ordinary Ethernet data frame sent by this SAN node. Therefore, it is necessary to register the first proxy address corresponding to the source physical address in the local node list and increase the serial number of the HSR tag of the first proxy address by 1 and store it.

[0110] Preferably, in the embodiment of the present invention, after the updating of the hop count and the receiving port number in the monitoring frame and the obtaining of the updated monitoring frame, the following sub-steps may be further included:

[0111] Step S161: Obtain the source physical address of the updated monitoring frame.

[0112] Specifically, the first network node receives the monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer supporting the HSR protocol, and updates the hop count and the receiving port number in the monitoring frame. After obtaining the updated monitoring frame, before forwarding and uploading the updated monitoring frame, it is also necessary to perform redundancy removal on the updated monitoring frame. Specifically, the source physical address in the updated monitoring frame is obtained.

[0113] Step S162: Check whether the source physical address exists in the node list.

[0114] In an embodiment of the present invention, the source physical address may be used as a key value to perform a hash index, search the local node list of the first network node, and determine whether the source physical address in the monitoring frame is the same as the source physical address in the local node list.

[0115] Step S163: If the source physical address exists in the node list, discard the updated monitoring frame.

[0116] In an embodiment of the present invention, if the source physical address in the monitoring frame is used as the key value for hash indexing, and the source physical address is found in the local node list of the first network node, it indicates that the monitoring frame is generated and sent locally, and the monitoring frame sent locally needs to be de-redundanted, so the updated monitoring frame needs to be discarded.

[0117] Step S164: If the source physical address does not exist in the node list, the step of sending the updated monitoring frame to the adjacent network node through the second redundant port of the lower physical layer supporting the HSR protocol, and uploading the updated monitoring frame to the MAC layer through the network link interface is executed.

[0118] In an embodiment of the present invention, if the source physical address in the monitoring frame is used as a key value for hash indexing, and the source physical address does not exist in the local node list of the first network node, it indicates that the monitoring frame is not generated and sent locally, and there is no need to perform de-redundancy processing on the updated monitoring frame. Therefore, it is necessary to execute the steps of sending the updated monitoring frame to the adjacent network node through the second redundant port of the lower physical layer that supports the HSR protocol, uploading the updated monitoring frame to the MAC layer through the network link interface, forwarding the updated monitoring frame to the adjacent network node and uploading it to the MAC layer.

[0119] Reference Figure 2 , Figure 2 The logical block diagram of a HSR ring network of the present invention is shown. The HSR ring network includes: SAN nodes: SAN1 node 211 and SAN2 node 212; DANH nodes: DANH1 node 223, DANH2 node 222, DANH3 node 226, DANH4 node 225 and DANH5 node 224; RedBox device 221; network link interface (PortC port) 231; lower physical layer redundant ports supporting HSR protocol: lower physical layer first redundant port (PortA port) 232 supporting HSR protocol and lower physical layer second redundant port (PortB port) 233 supporting HSR protocol.

[0120] Specifically, SAN1 node 211 and SAN2 node 212 are located at the MAC layer; DANH1 node 223, DANH2 node 222, DANH3 node 226, DANH4 node 225, DANH5 node 224 and RedBox device 221 are located at the physical layer, that is, the HSR ring network is located at the physical layer.

[0121] Furthermore, in the embodiment of the present invention, the DANH1 node 223, the DANH2 node 222, the DANH3 node 226, the DANH4 node 225, the DANH5 node 224 and the RedBox device 221 are interconnected through the PortA port 232 and the PortB port 233 to form a ring network; a connection is established with the MAC layer through the DANH1 node 223, the DANH2 node 222, the DANH3 node 226, the DANH4 node 225, the DANH5 node 224 and the PortC port 231 of the RedBox device 221, so as to monitor the topology of the ring network at the MAC layer and receive ordinary Ethernet data frames sent by the MAC layer through the SAN node; the RedBox device 221 located at the physical layer establishes a connection with the SAN1 node 211 and the SAN2 node 212 located at the MAC layer through the PortC port 231, so as to receive ordinary Ethernet data frames sent by the SAN1 node 211 and the SAN2 node 212.

[0122] Specifically, Figure 2 In the example, the RedBox device 221 sends an HSR monitoring frame and the DANH1 node 223 is connected to the monitoring device through the PortC port 231 to perform topology discovery of the ring network and identify the topology structure of the ring network. Assume that the MAC address of the SAN1 node 211 is 0x101112131415, and the local MAC address of the RedBox device 221 is 0x000102030405. If the monitoring device connected to the DANH1 node 223 parses the HSR monitoring frames uploaded by the local node and the sub-local node on the ring network, and the link establishment status of the lower physical layer redundant port is both established, it is determined that the topology of the ring network is a closed loop topology.

[0123] Specifically, after the RedBox device 221 acts as a proxy for the common Ethernet data frame sent by the SAN1 node 211, the RedBox device 221 generates a first monitoring frame and sends the first monitoring frame through the PortA port 232. The source MAC, Tx_PathID, proxy MAC, hop count and Rx_PathId in the first monitoring frame are {48'h000102030405,4'b0000,48'h101112131415,8'd0,4'b0000} respectively. When the first monitoring frame passes through the DANH2 node 222, the DANH2 node 222 passes The first monitoring frame is received through PortB port 233, and the Rx_PathID in the first monitoring frame is set to PortB, and the hop count is increased by 1 to obtain the second monitoring frame, and the source MAC address of the second monitoring frame is obtained. The local ProxyNodeTable table is searched for a hash index with the source MAC address as the key value to know that the second monitoring frame is not sent locally, and the second monitoring frame is uploaded to the MAC layer through PortC port 231 of DANH2 node 222, and the second monitoring frame is forwarded to DANH1 node 223 through PortA port 232 of DANH2 node 222. At this time, the information of the second monitoring frame is { 48'h000102030405,4'b0000,48'h101112131415,8'd1,4'b0001}; Similarly, after receiving the second monitoring frame, DANH1 node 223 adds 1 to the number of hops in the second monitoring frame, sets Rx_PathID to PortB to obtain the third monitoring frame, obtains the source MAC address of the third monitoring frame, uses the source MAC address as the key value to perform a hash index to search the local ProxyNodeTable table, and knows that the third monitoring frame is not sent locally. The third monitoring frame is uploaded to the MAC layer through PortC port 231 of DANH1 node 223, and at the same time, The third monitoring frame is forwarded to the DANH5 node 224 through the PortA port 232 of the DANH1 node 223. At this time, the information of the third monitoring frame is {48'h000102030405,4'b0000,48'h101112131415,8'd2,4'b0001}; at this time, the monitoring device connected to the DANH1 node 223 can know through parsing the third monitoring frame that the portA port 232 of the node (RedBox device 221) with the proxy MAC address of 48'h101112131415 is connected to the portB port 233 of the DANH1 node 223 with 2 hops to the left.

[0124] Further, after the RedBox device 221 proxies the common Ethernet data frame sent by the SAN1 node 211, the RedBox device 221 generates a first monitoring frame and simultaneously sends the first monitoring frame through the PortB port 233. The first monitoring frame information is {48'h000102030405,4'b0001,48'h101112131415,8'd0,4'b0000}. Similarly, the first monitoring frame is sent through the DANH3 node 226, the DANH4 node 225, and the DANH5 node 224. and DANH1 node 223, the information of the fourth monitoring frame obtained is {48'h000102030405,4'b0001,48'h101112131415,8'd4,4'b0000}; at this time, the monitoring device connected to DANH1 node 223 can know through parsing the fourth monitoring frame that the portB port 233 of the node (RedBox device 221) with the proxy MAC address of 48'h101112131415 is connected to the portA port 232 of DANH1 node 223 with 4 hops to the right.

[0125] Further, after the RedBox device 221 proxies the ordinary Ethernet data frame sent by the SAN2 node 212, the RedBox device 221 generates the first monitoring frame, and through the monitoring method similar to the above-mentioned proxy SAN1 node 211, it is learned through the monitoring device connected to the DANH1 node 223 that the monitoring frame corresponding to the SAN2 node 212 has the same number of left and right hops as the monitoring frame corresponding to the SAN1 node. Therefore, it can be determined that the HSR ring network is composed of 6 interconnected node devices, and the 2 SAN nodes (SAN1 node 211 and SAN2 node 212 have the same number of left and right hops for monitoring frames, and have a common source MAC address) proxied by the RedBox device 221, so far it can be known that the RedBox device 221 is located at the specific location of the DANH1 node 223, and the interconnection relationship between the lower physical layer redundant ports of the adjacent nodes of the PortA port 232 and the PortB port 233 of the DANH1 node 223, and the number of proxy SAN nodes is 2.

[0126] In the embodiment of the present invention, since all nodes on the network can generate and send HSR monitoring frames, the positions and connection relationships of other devices on the network relative to the DANH1 node 223 can be known by analogy.

[0127] If the ring network is broken, the above method can still be used to complete the topology self-discovery of the HSR network. Figure 2For example, if the link between DANH2 node 222 and RedBox device 221 is broken, the monitoring frame sent by RedBox device 221 and DANH2 node 222 and obtained by the monitoring device connected to DANH1 node 223 has the following link establishment status for the lower physical layer redundant port: one link is established for the lower physical layer redundant port, and the other link is broken for the lower physical layer redundant port. It can be seen from this that the HSR ring network topology is an open-loop topology. Similarly, the monitoring device can parse local HSR monitoring frames and non-local HSR monitoring frames to find out that the maximum left hop count of the HSR monitoring frame is 4 (the monitoring frame is sent from PortB port 233 on the right side of RedBox device 221, and after passing through DANH3 node 226, DANH4 node 225, DANH5 node 224 and DANH1 node 223, the hop count of the monitoring frame is 4), and the maximum right hop count is 1 (the monitoring frame is sent from PortA port on the left side of DANH2 node 222). 232, after passing through DANH1 node 223, the hop number of the monitoring frame is 1), plus the local network node (DANH1 node 223), it can be known that the HSR ring network is composed of 6 interconnected network nodes, and according to the above method, the relative position relationship between each network node on the HSR ring network and the DANH1 node 223, as well as the adjacent pair of lower physical layer redundant ports of PortA port 232 and PortB port 233 of DANH1 node 223 and the number of SAN nodes represented by the RedBox device 221 can also be known.

[0128] At this point, the topology discovery of the HSR ring network is completed.

[0129] Reference Figure 3 , Figure 3 A block diagram of a ring network topology discovery device of the present invention is shown. The ring network topology discovery device comprises:

[0130] The receiving module 310 is used to receive a monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer supporting the HSR protocol; the monitoring frame includes a source physical address, a first proxy physical address, a hop count, a receiving port number, and a link establishment state of the lower physical layer redundant port;

[0131] An updating module 320, configured to update the hop count and receiving port number in the monitoring frame to obtain an updated monitoring frame;

[0132] The sending module 330 is used to send the updated monitoring frame to the adjacent network node through the second redundant port of the lower physical layer supporting the HSR protocol, and upload the updated monitoring frame to the MAC layer through the network link interface;

[0133] The topology discovery module 340 is used to identify the topology structure of the ring network based on the first network node, according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded to the MAC layer by each network link interface.

[0134] Preferably, the receiving module 310 further includes:

[0135] A first receiving submodule, configured to receive a monitoring frame based on the HSR protocol sent by a second network node through a first redundant port of a lower physical layer supporting the HSR protocol;

[0136] The second receiving submodule is used to receive common Ethernet data frames sent by the MAC layer.

[0137] Preferably, the updating module 320 further includes:

[0138] A first updating submodule, used for adding 1 to the hop number field of the monitoring frame;

[0139] The second updating submodule is used to change the receiving port number of the monitoring frame to the port number of the physical layer redundant port of the first network node for receiving the monitoring frame, so as to obtain the updated monitoring frame.

[0140] Preferably, the sending module 330 further includes:

[0141] A first sending submodule, used for sending the updated monitoring frame to an adjacent network node through a lower physical layer second redundant port supporting the HSR protocol;

[0142] The second sending submodule is used to upload the updated monitoring frame to the MAC layer through the network link interface.

[0143] Preferably, the topology discovery module 340 further includes:

[0144] A first topology discovery submodule, configured to establish a connection between the first network node and a monitoring device at the MAC layer through a network link interface;

[0145] A second topology discovery submodule, configured to parse monitoring frames local to the first network node and monitoring frames of nodes other than the first network node;

[0146] The third topology discovery submodule is used to obtain the link establishment status of the lower physical layer redundant port of each monitoring frame and determine the open and closed loop status of the ring network;

[0147] a fourth topology discovery submodule, configured to determine a device type of each network node based on the source physical address and the first proxy physical address of each monitoring frame;

[0148] A fifth topology discovery submodule, for determining the interconnection status of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol between each network node based on the receiving port number and the sending port number of each monitoring frame;

[0149] The sixth topology discovery submodule is used to determine the number of network nodes in the ring network and the relative position relationship of each network node in the ring network based on the hop count of each monitoring frame.

[0150] Preferably, the ring network topology discovery device further includes:

[0151] A storage module is used to store the hop count in a byte of the idle field, store the link establishment status of the first redundant port of the lower physical layer supporting the HSR protocol and the link establishment status of the second redundant port of the lower physical layer supporting the HSR protocol in the same byte of the idle field, and store the receiving port number in a byte of the idle field.

[0152] Preferably, the ring network topology discovery device further includes:

[0153] A monitoring frame generation module is used for the second network node to generate a monitoring frame based on the proxy physical address and HSR tag recorded in the node list when the monitoring frame sending conditions specified in the HSR protocol are met, and to send the monitoring frame through the first redundant port of the lower physical layer that supports the HSR protocol or the second redundant port of the lower physical layer that supports the HSR protocol, and to upload the monitoring frame to the MAC layer through the network link interface.

[0154] Specifically, the monitoring frame generation module also includes:

[0155] A determination module is used to determine that after a preset interval time has passed for the second network node, or when the link establishment state of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol of the second network node changes, the monitoring frame is generated by the monitoring frame generation module.

[0156] Preferably, the ring network topology discovery device further includes:

[0157] A de-redundancy module is used for, after the hop count and the receiving port number in the monitoring frame are updated and the updated monitoring frame is obtained, obtaining the source physical address of the updated monitoring frame, and searching whether the source physical address exists in the node list; if the source physical address exists in the node list, discarding the updated monitoring frame; if the source physical address does not exist in the node list, executing the steps of sending the updated monitoring frame to an adjacent network node through a second redundant port of the lower physical layer supporting the HSR protocol, and uploading the updated monitoring frame to the MAC layer through a network link interface.

[0158] In an embodiment of the present invention, each network node in the ring network receives a monitoring frame sent by an adjacent network node through the first redundant port of the lower physical layer supporting the HSR protocol, and updates the monitoring frame, sends the updated monitoring frame to the adjacent network node through the second redundant port of the lower physical layer supporting the HSR protocol, and uploads the updated monitoring frame to the MAC layer through the network link interface, and identifies the topology of the ring network at the MAC layer based on each monitoring frame uploaded to the MAC layer by each network link interface. The technical solution of the embodiment of the present invention can complete the self-discovery of the HSR ring network topology structure with the help of certain fields in the HSR protocol monitoring frame, and can realize the discovery of the physical layer HSR ring network topology structure without adding other network topology discovery protocols, which is convenient for network administrators to grasp the topology of the HSR ring network, quickly locate the location of the fault, and determine the scope of the fault.

[0159] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0160] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0161] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0162] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0163] The above is a detailed introduction to a method for manufacturing a shelter and a system for shelter provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A ring network topology discovery method, characterized in that: Applied to a first network node, comprising: Receiving a monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer supporting the HSR protocol; the monitoring frame includes a source physical address, a first proxy physical address, a hop count, a receiving port number and a link establishment state of the lower physical layer redundant port, and the monitoring frame includes an idle field; Updating the hop count and the receiving port number in the monitoring frame to obtain an updated monitoring frame; Sending the updated monitoring frame to an adjacent network node through a second redundant port of the lower physical layer supporting the HSR protocol, and uploading the updated monitoring frame to the MAC layer through a network link interface; Based on the first network node, the topology of the ring network is identified according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded to the MAC layer by each network link interface.

2. The method according to claim 1, characterized in that The hop count is stored in a byte of the idle field, the link establishment status of the first redundant port of the lower physical layer supporting the HSR protocol and the link establishment status of the second redundant port of the lower physical layer supporting the HSR protocol are stored in the same byte of the idle field, and the receiving port number is stored in a byte of the idle field.

3. The method according to claim 1, characterized in that Updating the hop count and the receiving port number in the monitoring frame to obtain an updated monitoring frame includes: Increasing the hop count field of the monitoring frame by 1; The receiving port number of the monitoring frame is changed to the port number of the physical layer redundant port of the first network node that receives the monitoring frame, to obtain the updated monitoring frame.

4. The method according to any one of claims 1 to 3, characterized in that: The monitoring frame based on the HSR protocol sent by the second network node is: When the monitoring frame sending conditions specified in the HSR protocol are met, the second network node generates a monitoring frame based on the proxy physical address and HSR tag recorded in the node list, and sends the monitoring frame through the first redundant port of the lower physical layer that supports the HSR protocol or the second redundant port of the lower physical layer that supports the HSR protocol, and uploads the monitoring frame to the MAC layer through the network link interface.

5. The method according to claim 4, characterized in that The monitoring frame sending conditions include: After a preset interval time has passed for the second network node, or the link establishment state of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol of the second network node changes.

6. The method according to claim 4, characterized in that Before receiving the monitoring frame based on the HSR protocol sent by the second network node through the first redundant port of the lower physical layer supporting the HSR protocol, the method further includes: When receiving a common Ethernet data frame sent by the MAC layer, converting the common Ethernet data frame into an HSR data frame based on the HSR protocol; The source physical address is proxied based on the source physical address of the HSR data frame to obtain a first proxy physical address.

7. The method according to claim 6, characterized in that The proxying the source physical address based on the source physical address of the HSR data frame to obtain a first proxy physical address includes: Searching the source physical address in the proxy physical address of the node list; If the source physical address is found in the proxy physical addresses in the node list, the serial number of the HSR tag of the first proxy physical address corresponding to the source physical address in the node list is increased by 1 and stored; If the source physical address is not found in the proxy physical addresses in the node list, a first proxy address corresponding to the source physical address is registered in the node list and the serial number of the HSR tag of the first proxy address is increased by 1 and stored.

8. The method according to claim 5, characterized in that After updating the hop count and the receiving port number in the monitoring frame and obtaining the updated monitoring frame, the method further includes: Obtaining the source physical address of the updated monitoring frame; Find out whether the source physical address exists in the node list; If the source physical address exists in the node list, discarding the updated monitoring frame; If the source physical address does not exist in the node list, the steps of sending the updated monitoring frame to the adjacent network node through the second redundant port of the lower physical layer supporting the HSR protocol and uploading the updated monitoring frame to the MAC layer through the network link interface are performed.

9. The method according to claim 1, characterized in that: The monitoring frame also includes a sending port number; The method of identifying the topology of the ring network based on the first network node according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded to the MAC layer by each network link interface includes: Establishing a connection between the first network node and a monitoring device at the MAC layer through a network link interface; Parsing monitoring frames local to the first network node and monitoring frames not at the first network node; Obtaining the link establishment status of the lower physical layer redundant port of each monitoring frame to determine the open and closed loop status of the ring network; Determining a device type of each network node based on the source physical address and the first proxy physical address of each monitoring frame; Based on the receiving port number and the sending port number of each monitoring frame, determine the interconnection status of the first redundant port of the lower physical layer supporting the HSR protocol and / or the second redundant port of the lower physical layer supporting the HSR protocol between each network node; Based on the hop count of each monitoring frame, the number of network nodes in the ring network and the relative position relationship of each network node in the ring network are determined.

10. A ring network topology discovery device, characterized in that: Applied to a first network node, comprising: A receiving module, configured to receive a monitoring frame based on the HSR protocol sent by a second network node through a first redundant port of a lower physical layer supporting the HSR protocol; the monitoring frame includes a source physical address, a first proxy physical address, a hop count, a receiving port number, and a link establishment status of the lower physical layer redundant port; An updating module, used for updating the hop count and receiving port number in the monitoring frame to obtain an updated monitoring frame; A sending module, used to send the updated monitoring frame to an adjacent network node through a second redundant port of the lower physical layer supporting the HSR protocol, and upload the updated monitoring frame to the MAC layer through a network link interface; A topology discovery module is used to identify the topology structure of the ring network based on the first network node, according to the source physical address, the first proxy physical address, the number of hops, the receiving port number and the link establishment status of the lower physical layer redundant port in each monitoring frame uploaded to the MAC layer by each network link interface.