TSN network topology state active monitoring method and device
By actively sending monitoring messages in the TSN network and collecting link information, the real-time and accuracy of TSN network monitoring is solved, and the link status is quickly acquired and fault location is achieved.
Patent Information
- Application Number
- CN202510503411.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-22
AI Technical Summary
The prior art cannot meet the real-time and time synchronization accuracy requirements of TSN network monitoring, and it is difficult to quickly and accurately locate specific fault locations in the TSN network.
The TSN network topology monitoring method based on active measurement is adopted. By actively sending monitoring messages periodically, the monitoring path is calculated and constructed, link information of all ports of each switch is collected, and message forwarding is carried out according to the link status. If an abnormal link is found, it is returned to the monitoring controller for analysis.
It realizes the rapid acquisition of link status in the TSN network and the precise positioning of abnormal links, meets the real-time and time synchronization accuracy requirements of TSN network monitoring, effectively maintains the network status and troubleshoots.
Smart Images

Figure CN120034457A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of TSN (Time-Sensitive Networking) status monitoring, and in particular to a method and device for actively monitoring TSN network topology status. Background Art
[0002] Network measurement is an important part of network management and control. According to different measurement methods, network measurement methods can be divided into active measurement and passive measurement. Active measurement is to evaluate network performance by actively sending detection packets to the network, such as using the Ping message of the ICMP (Internet Control Message Protocol) protocol to measure the round-trip time (RTT). Passive measurement is to measure network status and other information by capturing packets flowing through the measurement point. For example, SNMP (Simple Network Management Protocol) collects device status information (such as interface status and number of packet losses) to achieve network performance monitoring. In-band network telemetry (INT) consists of a telemetry server and a switch with in-band network telemetry function. INT embeds network performance information into user data packets in real time, transmits and collects performance data along with traffic. This type of monitoring method has strong real-time performance and high accuracy, and does not require additional traffic detection, so it is more suitable for large-scale network monitoring.
[0003] For global monitoring of traditional Ethernet, one method in the prior art is to use an end-to-end network fault detection system to monitor path connectivity by sending active detection packets during service, and to locate faults in combination with distributed tracing technology. However, this type of monitoring method cannot locate specific faulty links or faulty devices, and requires a high-coverage detection path to accurately detect problems. Another method is to use an active detection system for data centers, design detection paths through IP-in-IP technology, and accurately locate device and link failures in combination with optimization algorithms. This method is suitable for large-scale data center network detection of gray faults, but this type of monitoring method needs to rely on monitoring data packets and actual application traffic. The above-mentioned traditional real-time monitoring method is usually suitable for highly redundant cloud data center environments, and the monitoring implementation process is usually more complicated, with low real-time and time synchronization accuracy, and it is difficult to quickly and accurately locate the specific fault location.
[0004] TSN can achieve deterministic minimum time delay in non-deterministic Ethernet, and can provide deterministic, low-latency and high-reliability data transmission capabilities. The current industrial Internet also puts forward higher requirements for the autonomous control of TSN. Therefore, in order to obtain sufficient network status information for management and control, TSN needs to be monitored in real time. TSN is a small-scale network that requires millisecond-level fault detection and recovery. Traditional real-time monitoring methods usually cannot obtain enough information to describe the operating status of TSN. Compared with monitoring traditional networks such as data center networks and local area networks, TSN monitoring has higher requirements for real-time and time synchronization accuracy. Traditional real-time monitoring methods cannot meet the real-time and time synchronization accuracy requirements of TSN network monitoring, and it is difficult to quickly and accurately locate the specific fault location in the TSN network.
[0005] Some practitioners have proposed a link monitoring method for software-defined network architecture, which implements link detection by sending detection messages from the starting network device to each network device on the detected link in sequence until the end network device. This type of detection process is relatively complicated and requires all switching nodes to communicate directly with the controller while ensuring that the communication link is normal. Multiple response messages need to be generated during the detection process, which greatly increases the network load. Summary of the invention
[0006] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a TSN network topology status active monitoring method and device with simple implementation method, low cost, strong real-time performance and high time synchronization accuracy, which can be applied to TSN to efficiently obtain the status of all links in the network, and accurately locate abnormal links in the network, and effectively maintain the network status.
[0007] In order to solve the above technical problems, the technical solution proposed by the present invention is: A method for actively monitoring TSN network topology status, comprising the following steps: Obtain the current network topology, and calculate the monitoring path of the monitoring message according to the obtained current network topology, wherein the monitoring path is a path formed by starting from the monitoring controller, traversing all switches under the current network topology and finally returning to the monitoring controller, and each switch corresponds to a node; Constructing a monitoring message according to the monitoring path, and sending the monitoring message to the TSN network according to a preset period, wherein the monitoring message stores the destination address corresponding to each hop of the monitoring path, and the last destination address is the address of the monitoring controller; The monitoring message traverses each switch according to the monitoring path, collects link information of all ports of each switch in the process of traversing each switch and writes it into the corresponding field in the monitoring message, wherein the link information includes link status information, wherein if there is an abnormality in the link between the current node and the next forwarding node, that is, there is an abnormality in the link of the next item to be forwarded by the monitoring message, then the destination address of the monitoring message is modified to return the monitoring message containing the abnormal link information to the monitoring controller, otherwise it is forwarded to the next node according to the monitoring path; The returned monitoring message is received, and the returned monitoring message is parsed to obtain the link status information of all ports of each monitored switch, and the current network topology is updated according to the obtained link status information.
[0008] Furthermore, the monitoring message includes a preamble field and an SDA field of an Ethernet message, the SDA field includes multiple subfields, each subfield corresponds to a hop in the monitoring path, each of the subfields includes a Destination List list and a Switch Bitmap field, wherein the Destination List list stores the destination MAC address of each hop in the monitoring path, and the Switch Bitmap field collects the link status information maintained in each switch, and the preamble field of the Ethernet message includes the destination MAC address, source MAC and Ethernet type field.
[0009] Furthermore, in the process of traversing each switch, the monitoring message parses the SDA field in the monitoring message, obtains the destination address from the Destination List according to the S_Index parsed from the SDA field as the index, and updates the destination address of the monitoring message, and updates the source address to the MAC address of the current switch. The link status information of all ports of the current switch is queried according to the currently updated destination address, and the link status information of all ports of the current switch is stored in the Switch Bitmap field; if there is an abnormality in the link between the current node and the next forwarding node, the destination address of the monitoring message is modified to the MAC address of the monitoring controller by modifying the destination address in the Destination List.
[0010] Furthermore, a mark bit is provided in the monitoring message for marking the status of each node in the network, each bit in the mark bit corresponds to a node in the network, and the initial value of the mark bit is a first mark bit value. During the traversal process, if an abnormal link is detected in the current node, the bit corresponding to the current node in the mark bit is updated to a second flag bit value to mark it as an abnormal message.
[0011] Furthermore, it also includes if all bits in the flag bit of the received returned monitoring message are the first flag bit value, it is determined that all link information of the current network is normal, and the currently maintained network topology is kept unchanged; if there is a second flag bit value in the flag bit of the received returned monitoring message, the returned monitoring message is parsed to obtain the link status information of each switch, and the abnormal link is found according to the obtained link status information and the currently maintained network topology is updated.
[0012] Furthermore, when the switch receives a monitoring message, it first parses the message to obtain the address of the next forwarding node, and then obtains the link status information of the link from the current node to the next forwarding node. If the link status is normal, the link status information of all ports of the current node is encapsulated into a specified field of the monitoring message, and the monitoring message is forwarded to the next forwarding node after encapsulation is completed; if the link status between the current node and the next forwarding node is abnormal, the link status information of all ports of the current node is encapsulated into a specified field of the monitoring message, and the destination address of the monitoring message is modified to the monitoring controller to return the encapsulated monitoring message to the monitoring controller.
[0013] Furthermore, the switch periodically checks whether the links maintained by each port are normal, and stores the link status information of the links maintained by each port.
[0014] A TSN network topology status active monitoring device, comprising: A monitoring path calculation module is used to obtain the current network topology and calculate the monitoring path of the monitoring message according to the obtained current network topology. The monitoring path is a path formed by starting from the monitoring controller, traversing all switches under the current network topology and finally returning to the monitoring controller. Each switch corresponds to a node. A monitoring message construction module, used to construct a monitoring message according to the monitoring path, and send the monitoring message to the TSN network according to a preset period, wherein the monitoring message stores the destination address corresponding to each hop of the monitoring path, and the last destination address is the address of the monitoring controller; A node traversal module, used for the monitoring message to traverse each switch according to the monitoring path, collect link information of all ports of each switch in the process of traversing each switch and write it into the corresponding field in the monitoring message, wherein the link information includes link status information, wherein if there is an abnormality in the link between the current node and the next forwarding node, that is, there is an abnormality in the link of the next item to be forwarded by the monitoring message, then modify the destination address of the monitoring message to return the monitoring message containing the abnormal link information to the monitoring controller, otherwise forward it to the next node according to the monitoring path; The message receiving and parsing module is used to receive the returned monitoring message, parse the returned monitoring message to obtain the link status information of all ports of each monitored switch, and update the current network topology according to the obtained link status information.
[0015] A computer device comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.
[0016] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed by a processor.
[0017] Compared with the prior art, the advantages of the present invention are: the present invention adopts a TSN network topology monitoring method based on active measurement, and actively and periodically sends network monitoring messages that can access the global network. The monitoring path is first calculated according to the network topology. The monitoring path can traverse all switches under the current network topology and then return to the monitoring controller. Then, the monitoring message is constructed according to the monitoring path and sent to the TSN network. During the traversal process, the monitoring message will collect the link information of all ports of each switch, and forward the message according to the collected link status. If there is a link abnormality in the link of the next entry during the forwarding process, it will be returned to the monitoring controller, and the returned monitoring message can be parsed to obtain the link status information of all links of each switch. Not only can the status of all links in the current network be quickly obtained without relying on any message, but also the abnormal link can be quickly located, the network status can be effectively maintained, and network failures can be eliminated. Compared with the traditional link monitoring method that needs to rely on the time synchronization tree, it can effectively meet the monitoring requirements of TSN real-time, network status information accuracy and time synchronization accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the implementation process of the TSN network topology status active monitoring method of this embodiment.
[0019] Figure 2 It is a schematic diagram of a network topology structure applicable to a specific application embodiment of the present invention.
[0020] Figure 3 It is a schematic diagram of the structure of the monitoring message constructed in this embodiment.
[0021] Figure 4 It is a detailed execution flow diagram of the monitoring controller in a specific application embodiment of the present invention.
[0022] Figure 5 It is a schematic diagram of a detailed execution flow of a switch in a specific application embodiment of the present invention. DETAILED DESCRIPTION
[0023] The present invention will be further described below in conjunction with the accompanying drawings of the specification and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0024] As shown in the disclosure of the present invention, unless the context clearly indicates an exceptional situation, words such as "a", "an", "one kind" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "first", "second" and similar terms used in the disclosure of the present invention do not denote any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "comprising" or "including" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms "connected" or "coupled" and the like are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0025] As Figure 1 shown, the steps of the active monitoring method for the TSN network topology status in this embodiment include: Step S01. Obtain the current network topology, and calculate the monitoring path of the monitoring message according to the obtained current network topology. The monitoring path is a path formed by starting from the monitoring controller, traversing all switches under the current network topology, and finally returning to the monitoring controller. Each switch corresponds to a node; Step S02. Construct a monitoring message according to the monitoring path, and send the monitoring message into the TSN network at a preset period. The monitoring message stores the destination address corresponding to each hop of the monitoring path, and the last destination address is the address of the monitoring controller; Step S03. The monitoring message traverses each switch according to the monitoring path, and collects the link information of all ports of each switch and writes it into the corresponding field in the monitoring message during the process of traversing each switch. The link information includes link status information. If there is an abnormality in the link between the current node and the next forwarding node, that is, there is an abnormality in the next destination link to which the monitoring message is to be forwarded, then modify the destination address of the monitoring message to return the monitoring message containing the abnormal link information to the monitoring controller, otherwise forward it to the next node according to the monitoring path; Step S04. Receive the monitoring message returned after traversing the switches, parse the returned monitoring message to obtain the link status information of all ports of the monitored switches, and update the current network topology according to the obtained link status information.
[0026] This embodiment adopts a TSN network topology monitoring method based on active measurement. By actively and periodically sending network monitoring messages that can access the global network, a monitoring path is first calculated according to the network topology. The monitoring path can traverse all switches under the current network topology and then return to the monitoring controller. Then, a monitoring message is constructed according to the monitoring path and sent to the TSN network. The monitoring message traverses each switch according to the monitoring path. During the traversal process, the monitoring message collects link information of all ports of each switch, and forwards the message according to the collected link status. If the link of the next entry to be forwarded has a link abnormality, it is returned to the monitoring controller. When the returned monitoring message is received, the returned monitoring message is parsed to obtain the link status information of all ports of each switch. Not only can the status of all links in the current network be quickly obtained without relying on any message, but also abnormal links can be quickly located, the network status can be effectively maintained, and network failures can be eliminated. Compared with the traditional link monitoring method that needs to rely on the time synchronization tree, it can effectively meet the monitoring requirements of TSN real-time, network status information accuracy and time synchronization accuracy.
[0027] In this embodiment, the monitoring controller is a terminal device for performing monitoring control, and the monitoring controller executes steps S01, S02, and S04, that is, the monitoring controller calculates the monitoring path of the monitoring message according to the current network topology, constructs the monitoring message according to the monitoring path, and sends the monitoring message to the TSN network according to the preset period, receives the monitoring message returned after traversing the switch, and parses the returned monitoring message to obtain the link status information of all ports of each switch, and updates the current network topology according to the obtained link status information. The network topology of the entire TSN network is maintained in the monitoring controller, and because the TSN network has high real-time performance, the status monitoring of the TSN network needs to be performed periodically. When performing network monitoring in this embodiment, the controller will first set a time slice for this round of network monitoring. After the time slice starts, the monitoring controller calculates a monitoring path based on the network topology it maintains. The monitoring path must start from the monitoring controller, traverse all switches in the network, and finally return to the monitoring controller. It cannot return to the monitoring controller midway, and the links connecting the switches can pass through repeatedly. The monitoring controller then generates a monitoring message based on the calculated monitoring path and sends the monitoring message to the TSN network.
[0028] For the monitoring controller, the action of the monitoring message in the TSN network is unknown. Before the end of the time slice, the monitoring controller will wait until it receives the monitoring message that traverses all nodes. The monitoring controller can consider that this round of status monitoring is over, and then analyze the monitoring message that has collected the link information of all switches in the network, and maintain the network topology in the controller based on the link information. Because the network is not static, the monitoring controller may receive a monitoring message containing abnormal link information. The controller parses the link status information carried in the abnormal monitoring message, finds the link where the error occurs, and updates the network topology maintained in the controller. After these steps are completed, the controller will start a new round of message monitoring.
[0029] The monitoring path is the forwarding path of the monitoring message, and the monitoring controller generates the corresponding monitoring message according to the monitoring path. Figure 2 As an example, the network topology shown in the figure includes controller X (monitoring controller) and switches (A, B, C). The links in the network include L XA , L AB , L AC , L BC Controller X first generates a corresponding monitoring path based on the network topology. The monitoring path needs to start from controller X, traverse all switches (A, B, C) in the current network topology, and finally return to the path formed by controller X. Figure 1 The monitoring path calculated by the network topology is from controller X through L XA Link to switch A, switch A through L AB Link to switch B, switch B through L BC Link to switch C, switch C through L AC Link to switch A, switch A through L XA The link goes back to controller X.
[0030] In this embodiment, the monitoring message includes a preamble field and an SDA field of an Ethernet message. The preamble field of the Ethernet message includes a destination MAC address, a source MAC, and an Ethernet type field. The SDA field includes multiple subfields, each of which is arranged in a list form. Each subfield corresponds to a hop in the monitoring path. Each subfield includes a Destination List list and a Switch Bitmap field, wherein each item in the Destination List list stores the destination MAC address of each hop of the monitoring path, and the Switch Bitmap field is used to collect link status information maintained in each switch. In the process of traversing each switch, the monitoring message parses the SDA field in the monitoring message, obtains the destination address from the Destination List list and updates the destination address of the monitoring message, updates the source address to the MAC address of the current switch, queries the link status information of all ports of the current switch (including unconnected ports and ports with connected links) according to the currently updated destination address, and stores the link status information of all ports of the current switch in the SwitchBitmap field; if there is an abnormality in the link between the current switch and the next forwarding node, that is, there is an abnormality in the link of the next entry to be forwarded by the message, then the destination address in the Destination List list is modified to modify the destination address of the monitoring message to the MAC address of the monitoring controller, so that the monitoring message with abnormal link information is returned to the monitoring controller, otherwise the monitoring message continues to be forwarded according to the monitoring path, that is, as long as the link of the next entry to be forwarded by the message is normal, the message can be forwarded, and the remaining links may still have link abnormalities during the forwarding process. In this way, the link status of all ports of all switches to be monitored can be effectively collected.
[0031] Specifically, Figure 3As shown in the figure, the monitoring message is transmitted in the form of a common Ethernet message during the network transmission process. After removing the leading code field (destination MAC address, source MAC and Ethernet type field) of the Ethernet message, the data field also includes the Segment Destination Address (SDA) field to realize the fragmented propagation mode similar to SRH (SegmentRouting Header) in SRv6. The SDA field is divided into multiple subfields (0~N), and the Destination List and Switch Bitmap fields of each subfield are arranged in a list form, where each item in the Destination List list specifically stores a six-byte destination MAC address and a two-byte reserved item. The structure can support the switch that recognizes the monitoring message to parse the monitoring message after receiving it and use S_Index as the index to take out the list item corresponding to the S_Index subscript to modify the destination address of the message as the new destination address, where the S_Index subscript corresponds to a certain hop of the message in the path; using Switch The Bitmap field collects the link status information maintained in each switch. Each switch maintains the link status information of all links connected to it. When the switch modifies the destination address, it also writes the link status information maintained by the current node into this field. Figure 2 Take the network topology in Figure 1 as an example. When controller X generates a monitoring message, the destination address is the MAC address of switch A, the source address is the MAC address of controller X, and the Switch Bitmap field is empty. During the traversal of the monitoring message, the corresponding Destination List in SDA is read to obtain the destination address of the next forwarding node, and the destination address of the message is modified to forward it to the next node. At the same time, the link status information maintained by the current switch is collected and stored in the Switch Bitmap field. Switch[0] ~ Switch[N]'Info represents the summary of the Destination List field information and the Switch Bitmap field information in each subfield of SDA.
[0032] This embodiment constructs a monitoring message of the above structure. Every time the monitoring message passes through a switch, the switch can extract the destination address in the Destination List according to the S_Index parsed from the SDA field as the index and update the destination address of the monitoring message, and forward the message with the new node link information added to the next node. In this way, starting from the monitoring controller, the message can be forwarded and the node information along the way can be collected according to the destination address in the list until it returns to the controller.
[0033] In this embodiment, when the switch receives a monitoring message, it first parses the message to obtain the address of the next forwarding node, and then obtains the link status information of the link from the current node to the next forwarding node. If the link status is normal, the link status information of all ports of the current node is encapsulated into the specified field of the monitoring message (i.e., the Switch Bitmap field in SDA), and the monitoring message is forwarded to the next forwarding node after encapsulation. If the link status between the current node and the next forwarding node is abnormal, the link status information of all ports of the current node is encapsulated into the specified field of the monitoring message (i.e., the Switch Bitmap field in SDA), and the destination address of the monitoring message is modified to the monitoring controller so as to return the encapsulated monitoring message to the monitoring controller.
[0034] In this embodiment, a flag bit is also provided in the monitoring message for the status of each node in the network, each data bit in the flag bit corresponds to a node in the network, and the initial value of each data bit in the flag bit is a first flag bit value. If an abnormal link is detected during the traversal process, the data bit corresponding to the current node in the flag bit is updated to a second flag bit value to mark it as an abnormal message. For example, when the monitoring message is generated, the initial value of the flag bit corresponding to a node is 0. If an abnormality is detected in the link between the node and the next forwarding node during the traversal process, the flag bit corresponding to the node is updated to 1. The first and second flag bit values can be specifically configured according to actual needs.
[0035] In this embodiment, if the flag bit of the received returned monitoring message is the first flag bit value (i.e., 0), it is determined that all link information of the current network is normal, and the currently maintained network topology is kept unchanged; if there is a data bit with a second flag bit value in the flag bit of the received returned monitoring message, the link status information of each switch is obtained by parsing the returned monitoring message, the corresponding abnormal node is located according to the second flag bit value, and the specific abnormal link in the abnormal node is found according to the obtained link status information, and the currently maintained network topology is updated.
[0036] Specifically, Figure 2As shown, a multi-byte mark bit is set in the monitoring message. The mark bit stores the abnormal status of each node according to the monitoring path. The default value is the first mark bit value (that is, the default is 0), indicating that there are no abnormal links in all nodes; if an abnormal link is detected during the traversal process (regardless of the abnormal situation), the mark bit is updated to 1 to mark it as an abnormal message. For example, if there is an abnormal link in the fifth node on the monitoring path, the corresponding position in the mark bit is set to the second mark bit value, that is, the fifth position from right to left is marked as 1 in the form of Bitmap. When the monitoring controller receives the returned monitoring message, all nodes with abnormalities can be obtained according to the mark bit. After parsing, the Switch Bitmap field of the abnormal node is extracted, which can quickly locate the specific link with the abnormality.
[0037] In this embodiment, the switch also periodically checks whether the links maintained by each port are normal, and stores the link status information of the links maintained by each port. Specifically, each switch in the network maintains the link status of each port connection in the form of a bitmap. The monitoring message can effectively monitor the status of all links in the network by collecting the link status of all ports of each node and storing it in the Switch Bitmap field. Then, the monitoring controller can also use the monitoring message of the collected data to quickly locate the abnormal link.
[0038] In a specific application embodiment, the detailed execution process of the monitoring controller is as follows: Figure 4 As shown in the figure, the controller first sets a time slice for the current round of network monitoring. After the time slice starts, the controller calls the pre-designed algorithm (the algorithm for calculating the monitoring path) according to the network topology maintained by itself to calculate a monitoring path; based on the calculated monitoring path, a monitoring path is generated. Figure 3 The controller receives a monitoring message in the format of a TSN network and sends it to the TSN network. Before the time slice ends, the controller continues to wait until it receives monitoring messages that have traversed all nodes, determines that this round of status monitoring is over, analyzes the monitoring messages that have collected link information of all switches in the network, and maintains the network topology in the controller based on the link information. If a monitoring message containing abnormal link information is received, that is, an abnormal message with a mark bit of 1, the controller parses the link status information carried in the abnormal monitoring message, finds the link where the error occurs, and updates the network topology maintained in the controller. After the above steps are completed, the controller starts a new round of message monitoring.
[0039] In a specific application embodiment, the detailed execution process of the switch is as follows: Figure 5As shown in the figure, after power-on, the switch periodically checks whether the links connected to each port are normal. Correspondingly, after power-on, the switch sets a time slice for periodic inspection; after the time slice starts timing, the switch saves the status of the links maintained by each port collected in the form of a bitmap, where a normal link is a link where messages can be forwarded normally, corresponding to the up state, marked as 0; an abnormal link is a link where messages cannot be forwarded normally, corresponding to the down state, marked as 1. The switch periodically collects and updates the bitmap stored in the register; when the switch receives a monitoring message, it reads the corresponding Destination List item in the SDA field of the monitoring message, updates the read destination address to the new destination address of the monitoring message, and the source address is the MAC address of the switch; queries the forwarding port according to the new destination address, and determines whether the port is normal according to the bitmap. If it is normal, it means that the monitoring message can be forwarded to the next node normally, and the bitmap of the node is added as all the link status information of the node to the Switch Bitmap field of the monitoring message, and the monitoring message is forwarded from the corresponding port; if it is abnormal, it means that the monitoring message cannot be forwarded to the next destination node, then the destination address of the monitoring message is modified to the destination address of the controller, and the flag position is set to 1 to distinguish the abnormal message from the normal monitoring message, and finally, after adding the bitmap of the node as all the link status information of the node to the SwitchBitmap field of the monitoring message, the monitoring message is forwarded from the corresponding port. After processing the monitoring message, the switch continues to periodically monitor the link status corresponding to each port and maintain the bitmap.
[0040] The complete steps of this embodiment to realize active monitoring of TSN network topology status by combining the monitoring controller and the switch are as follows: Step 1: The monitoring controller collects the current network topology and calculates the monitoring path of the monitoring message based on the topology; Step 2: The monitoring controller constructs a monitoring message based on the calculated path and stores all destinations in the SDA field in a list form; Step 3: The switch stores the link status of each port of the node in the form of a bitmap in the register of the switch to record abnormal links; Step 4: After the switch receives the monitoring message, it changes the current destination address of the monitoring message to the address corresponding to the S_Index subscript in the Segment List, and checks whether the link connected to the output port of the switch corresponding to the address is normal. If the link of the next forwarding node corresponding to the switch is abnormal, the switch needs to set the flag position in the monitoring message to 1, modify the destination address, and return the monitoring message containing the abnormal link information to the controller. After receiving the monitoring message containing the abnormal link information, the monitoring controller parses the message and updates the topology, and returns to step 1; if the link of the next forwarding node corresponding to the switch is normal, the link status information (bitmap) maintained by the switch is written into the Switch Bitmap field, and the next node is forwarded according to the new destination address; Step 5: After all switches have been accessed, return to the monitoring controller, wait until the next cycle begins, and return to step 1.
[0041] by Figure 2 Taking the network topology shown in the figure as an example, the process of implementing active monitoring of TSN network topology status is as follows: After the monitoring controller sends a monitoring message, it reaches switch A according to the destination address; after switch A is powered on in the TSN network, it periodically maintains the link status (L XA , L AB , L AC Link status), and store each status in the bitmap; after switch A receives the monitoring message, it will first parse the SDA field in the message, find the corresponding next destination address, and find it is the MAC address of switch B. The destination address in the monitoring message is updated to the MAC address of switch B, and the source address is also updated to the MAC address of switch A. According to the port number corresponding to the MAC address of B in the forwarding table, the L corresponding to the port is checked in the bitmap. AC Check whether the link is normal.
[0042] If L AC The link is normal, and the switch uses the bitmap in the register as the L maintained by switch A. XA , L AB , L AC The status information of the link is encapsulated into the Switch Bitmap field of the monitoring message; after encapsulation, the monitoring message is forwarded to L AC The monitoring message is sent to the switch B through the link until the switch B receives the message. The processing flow of the switch B after receiving the monitoring message is the same as that of the switch A.
[0043] If controller X receives a monitoring message with a flag bit of 0, it means that the link information of the entire network has been obtained in this round of detection. Then, the bitmap of each switch in the Switch Bitmap field of each list item is parsed, and the network topology maintained by the controller is updated according to the bitmap. This round of monitoring ends. If all link information is normal, the network topology maintained by the controller remains unchanged after this round of monitoring.
[0044] If L AC The link is abnormal, switch A sets the flag in the monitoring message to 1, and since the link to which the monitoring message is to be forwarded is abnormal, the message cannot reach switch B, and the destination address of the monitoring message is modified to the MAC address of controller X, the source address remains unchanged, that is, it is still A's MAC address, and switch A uses the bitmap in the register as the L maintained by switch A. XA , L AB , L AC The status information of the link is encapsulated into the Switch Bitmap field of the monitoring message. After encapsulation, the monitoring message is sent from the source port to the L XA link, and finally returns to controller X.
[0045] When controller X receives a monitoring message with a flag bit of 1, it knows that the monitoring message contains abnormal link information. It parses the bitmaps of each switch in the Switch Bitmap field and updates the network topology maintained by the controller. This round of monitoring ends. At this time, the controller only has L in the network topology. XA , L AB , L BC Number link.
[0046] Controller X monitors the TSN network periodically. After a round of monitoring, it recalculates the monitoring path based on the new topology and generates corresponding monitoring messages.
[0047] This embodiment also discloses a TSN network topology state active monitoring device, including: A monitoring path calculation module is used to obtain the current network topology and calculate the monitoring path of the monitoring message according to the obtained current network topology. The monitoring path is a path formed by starting from the monitoring controller, traversing all switches under the current network topology and finally returning to the monitoring controller. Each switch corresponds to a node. A monitoring message construction module, used to construct a monitoring message according to the monitoring path, and send the monitoring message to the TSN network according to a preset period, wherein the monitoring message stores the source address and destination address corresponding to each hop of the monitoring path, and the last destination address is the address of the monitoring controller; A node traversal module is used for the monitoring message to traverse each switch according to the monitoring path. In the process of traversing each switch, the link information of all ports of each switch is collected and written into the corresponding field in the monitoring message. The link information includes link status information. If there is an abnormality in the link between the current node and the next forwarding node, that is, there is an abnormality in the link of the next item to be forwarded by the monitoring message, the destination address of the monitoring message is modified to return the monitoring message containing the abnormal link information to the monitoring controller, otherwise it is forwarded to the next node according to the monitoring path; The message receiving and parsing module is used to receive the returned monitoring message, parse the returned monitoring message to obtain the link status information of all ports of each monitored switch, and update the current network topology according to the obtained link status information.
[0048] The TSN network topology status active monitoring device of this embodiment corresponds to the above-mentioned TSN network topology status active monitoring method one by one, and will not be described in detail here.
[0049] This embodiment further provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.
[0050] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices in cooperation with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing related programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other applications. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.
[0051] This embodiment further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0052] Those skilled in the art should understand that the above-mentioned embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0053] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for actively monitoring TSN network topology status, characterized in that the steps include: Obtain the current network topology, and calculate the monitoring path of the monitoring message according to the obtained current network topology, wherein the monitoring path is a path formed by starting from the monitoring controller, traversing all switches under the current network topology and finally returning to the monitoring controller, and each switch corresponds to a node; Constructing a monitoring message according to the monitoring path, and sending the monitoring message to the TSN network according to a preset period, wherein the monitoring message stores the destination address corresponding to each hop of the monitoring path, and the last destination address is the address of the monitoring controller; The monitoring message traverses each switch according to the monitoring path, collects link information of all ports of each switch in the process of traversing each switch and writes it into the corresponding field in the monitoring message, wherein the link information includes link status information, wherein if there is an abnormality in the link between the current node and the next forwarding node, that is, there is an abnormality in the link of the next item to be forwarded by the monitoring message, then the destination address of the monitoring message is modified to return the monitoring message containing the abnormal link information to the monitoring controller, otherwise it is forwarded to the next node according to the monitoring path; The returned monitoring message is received, and the returned monitoring message is parsed to obtain the link status information of all ports of each monitored switch, and the current network topology is updated according to the obtained link status information.
2. The TSN network topology status active monitoring method according to claim 1 is characterized in that: The monitoring message includes a preamble field and an SDA field of an Ethernet message, the SDA field includes multiple subfields, each subfield corresponds to a hop in the monitoring path, each subfield includes a Destination List list and a Switch Bitmap field, wherein the Destination List list stores the destination MAC address of each hop in the monitoring path, and the Switch Bitmap field collects the link status information maintained in each switch, and the preamble field of the Ethernet message includes a destination MAC address, a source MAC and an Ethernet type field.
3. The TSN network topology status active monitoring method according to claim 2 is characterized in that: In the process of traversing each switch, the monitoring message parses the SDA field in the monitoring message, obtains the destination address from the Destination List according to the S_Index parsed from the SDA field as the index, updates the destination address of the monitoring message, updates the source address to the MAC address of the current switch, queries the link status information of all ports of the current switch according to the currently updated destination address, and stores the link status information of all ports of the current switch in the Switch Bitmap field; If there is an abnormality in the link between the current node and the next forwarding node, the destination address of the monitoring message is modified to be the MAC address of the monitoring controller by modifying the destination address in the Destination List.
4. The TSN network topology status active monitoring method according to claim 2 is characterized in that: The monitoring message is also provided with a mark bit for marking the status of each node in the network, each data bit in the mark bit corresponds to a node in the network, and the initial value of each data bit in the mark bit is a first mark bit value. During the traversal process, if an abnormal link is detected in the current node, the data bit corresponding to the current node in the mark bit is updated to a second mark bit value to mark it as an abnormal message.
5. The TSN network topology status active monitoring method according to claim 4 is characterized in that: The method also includes: if all data bits in the flag bit of the received returned monitoring message are the first flag bit value, it is determined that all link information of the current network is normal, and the currently maintained network topology is kept unchanged; if there is a data bit in the flag bit of the received returned monitoring message that is the second flag bit value, the link status information of each switch is obtained by parsing the returned monitoring message, the corresponding abnormal node is located according to the second flag bit value, the specific abnormal link in the abnormal node is found according to the obtained link status information, and the currently maintained network topology is updated.
6. The TSN network topology status active monitoring method according to any one of claims 1 to 5, characterized in that: It also includes that when the switch receives the monitoring message, it first parses the message to obtain the address of the next forwarding node, and then obtains the link status information of the link between the current node and the next forwarding node. If the link status is normal, the link status information of all ports of the current node is encapsulated into the specified field of the monitoring message, and the monitoring message is forwarded to the next forwarding node after the encapsulation is completed; If the link status between the current node and the next forwarding node is abnormal, the link status information of all links of the current node is encapsulated into the specified field of the monitoring message, and the destination address of the monitoring message is modified to the monitoring controller to return the encapsulated monitoring message to the monitoring controller.
7. The TSN network topology status active monitoring method according to any one of claims 1 to 5, characterized in that: The switch also periodically checks whether the links maintained by each port are normal, and stores the link status information of the links maintained by each port.
8. A TSN network topology status active monitoring device, characterized in that: include: A monitoring path calculation module is used to obtain the current network topology and calculate the monitoring path of the monitoring message according to the obtained current network topology. The monitoring path is a path formed by starting from the monitoring controller, traversing all switches under the current network topology and finally returning to the monitoring controller. Each switch corresponds to a node. A monitoring message construction module, used to construct a monitoring message according to the monitoring path, and send the monitoring message to the TSN network according to a preset period, wherein the monitoring message stores the destination address corresponding to each hop of the monitoring path, and the last destination address is the address of the monitoring controller; A node traversal module, used for the monitoring message to traverse each switch according to the monitoring path, collect link information of all ports of each switch in the process of traversing each switch and write it into the corresponding field in the monitoring message, wherein the link information includes link status information, wherein if there is an abnormality in the link between the current node and the next forwarding node, that is, there is an abnormality in the link of the next item to be forwarded by the monitoring message, then modify the destination address of the monitoring message to return the monitoring message containing the abnormal link information to the monitoring controller, otherwise forward it to the next node according to the monitoring path; The message receiving and parsing module is used to receive the returned monitoring message, parse the returned monitoring message to obtain the link status information of all ports of each monitored switch, and update the current network topology according to the obtained link status information.
9. A computer device comprising a processor and a memory, wherein the memory is used to store a computer program, wherein: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Industrial software defined networking architecture for deployment in a software defined automation system
CA3032323A1
Network configuration management method for TSN switch
CN114389946A
Process layer network communication method, device and system based on TSN, and TSN controller
CN115484140A
Dynamic configuration management system and method for time-sensitive network, and medium
CN116471177A
Vehicle DDS and TSN fusion deployment method and system, storage medium and electronic equipment
CN118200128A
Cited By
Method and system for realizing network topology state monitoring based on IP probe
CN120498965A
Switching method of state machine, state machine and system
CN121567728A
Switching method of state machine, state machine and system
CN121567728B