An active monitoring method and device for TSN network topology status

Through actively measured monitoring messages, traversing the switch in the TSN network, collecting link information and updating the topology, the problem of positioning fault locations in traditional methods is solved, and fast and accurate network status monitoring is achieved, meeting the real-time and accuracy requirements of the TSN network.

CN120034457BActive Publication Date: 2025-07-22NAT UNIV OF DEFENSE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510503411.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-07-22
Estimated Expiration
2045-04-22

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately locate fault locations in TSN networks, and cannot meet the requirements of real-time and time synchronization accuracy. The traditional monitoring methods are complex and costly.

Method used

Through active measurement, the monitoring message is sent to traverse all switches in the TSN network, collect link information and update the network topology, and use the SDA field and mark bits in the monitoring message to identify the abnormal link to achieve rapid positioning and maintenance of network status.

Benefits of technology

It realizes fast acquisition of link status in the TSN network and precise positioning of abnormal links, meets the monitoring requirements of real-time and time synchronization accuracy, and reduces monitoring complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034457B_ABST
    Figure CN120034457B_ABST
Patent Text Reader

Abstract

The present invention discloses an active monitoring method and device for the topology state of a TSN network. The steps of the method include: obtaining the current network topology and calculating the monitoring path of the monitoring message; constructing the monitoring message according to the monitoring path and sending the monitoring message to the TSN network at a preset period; collecting the link information of all ports of each switch during the process of the monitoring message traversing each switch. If there is an abnormality in the next destination link to which the message is to be forwarded, the destination address of the monitoring message is modified to return the monitoring message containing the abnormal link information, otherwise it is forwarded to the next node according to the monitoring path; receiving the returned monitoring message, parsing it to obtain the link state information of all ports of each switch, and updating the current network topology according to the obtained link state information. The present invention can efficiently obtain the states of all links in the TSN network, accurately locate abnormal links at the same time, and effectively maintain the network state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of TSN (Time-Sensitive Networking) status monitoring, and particularly to an active monitoring method and device for the topology status of a TSN network. 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. Among them, active measurement is to evaluate network performance by actively sending probe packets into the network. For example, the round-trip time (RTT) is measured using the Ping packet of the ICMP (Internet Control Message Protocol) protocol. Passive measurement is to measure network status information such as by capturing packets flowing through the measurement point. For example, SNMP (Simple Network Management Protocol) realizes network performance monitoring by collecting device status information (such as interface status, packet loss count). In-band Network Telemetry (INT) consists of a telemetry server and a switch with in-band network telemetry capabilities. INT embeds network performance information into user data packets in real time, transmits it along with the traffic, and collects performance data. This type of monitoring method has strong real-time performance and high accuracy, and does not require additional probing traffic, making it more suitable for large-scale network monitoring.

[0003] For the 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 probe packets during service and combine distributed tracing technology for fault location. However, this type of monitoring method cannot locate the specific faulty link or device, and requires a high-coverage probing path to accurately detect problems. Another method is to adopt an active probing system for data centers, design probing paths through IP-in-IP technology, and combine optimization algorithms to accurately locate device and link faults, which is suitable for detecting gray faults in large-scale data center networks. However, this type of monitoring method depends on monitoring data packets and actual application traffic. The above traditional real-time monitoring methods are usually applicable to high-redundancy cloud data center environments, and the implementation process of monitoring is usually relatively complex, with low real-time performance 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 provide the ability to transmit data with determinism, low latency, and high reliability. Currently, the 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, it is necessary to monitor TSN in real time. TSN belongs to a small-scale network and requires millisecond-level fault detection and recovery. Traditional real-time monitoring methods usually cannot obtain enough information to describe the operating status of TSN. Moreover, compared with traditional networks such as monitoring data center networks and local area networks, the real-time monitoring and time synchronization accuracy requirements of TSN monitoring are higher. Traditional real-time monitoring methods cannot meet the real-time monitoring and time synchronization accuracy requirements of TSN networks, and it is also difficult to quickly and accurately locate the specific fault location in the TSN network.

[0005] Some practitioners have proposed using a link monitoring method for software-defined network architectures. By sequentially sending detection messages from the starting network device to each network device on the detected link until the end network device, link detection can be achieved. The detection process of this type of method is relatively complex, and it requires all switching nodes and the controller to be able to communicate directly, while ensuring that the communication link is normal. Multiple response messages also need to be generated during the detection process, which will greatly increase the network load. Summary of the Invention

[0006] The technical problem to be solved by the present invention is that, aiming at the technical problems existing in the prior art, the present invention provides an active monitoring method and device for the topology state of a TSN network with simple implementation method, low cost, strong real-time performance, and high time synchronization accuracy. It can be applied to TSN to efficiently obtain the status of all links in the network, while accurately locating abnormal links in the network and effectively maintaining the network status.

[0007] To solve the above technical problems, the technical solution proposed by the present invention is as follows:

[0008] An active monitoring method for the topology state of a TSN network, the steps include:

[0009] 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;

[0010] Construct a monitoring message according to the monitoring path, and send the monitoring message to 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;

[0011] The monitoring message traverses each switch according to the monitoring path. During the process of traversing each switch, the link information of all ports of each switch is collected and written into the corresponding fields 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, the next destination link to which the monitoring message is to be forwarded is abnormal, 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;

[0012] 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.

[0013] Further, the monitoring message includes a preamble field of an Ethernet message and an SDA field. The SDA field includes multiple sub-fields. Each sub-field corresponds to one hop in the monitoring path. Each sub-field includes a Destination List list and a Switch Bitmap field. The Destination List list stores the destination MAC addresses of each hop in the monitoring path correspondingly, and the Switch Bitmap field collects the link status information maintained in each switch. The preamble field of the Ethernet message includes a destination MAC address, a source MAC, and an Ethernet type field.

[0014] Further, during the process of the monitoring message traversing each switch, by parsing the SDA field in the monitoring message, the destination address is obtained from the Destination List list using the S_Index parsed from the SDA field as an index and the destination address of the monitoring message is updated. The source address is updated 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 in the Destination List list is modified to modify the destination address of the monitoring message to the MAC address of the monitoring controller.

[0015] Further, a flag bit is also set in the monitoring message to mark the status of each node in the network. Each bit in the flag bit corresponds to a node in the network. The initial value of the flag bit is the first flag bit value. If an abnormal link is detected for the current node during the traversal process, the bit corresponding to the current node in the flag bit is updated to the second flag bit value to mark it as an abnormal message.

[0016] Further, it also includes that when all bits in the flag bits 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 then the currently maintained network topology remains unchanged; when there is a second flag bit value in the flag bits of the received returned monitoring message, the link status information of each switch is obtained by parsing the returned monitoring message, and the abnormal link is found according to the obtained link status information and the currently maintained network topology is updated.

[0017] Further, it also includes that 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 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 after encapsulation, the monitoring message is forwarded to the next forwarding node; 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, and the destination address of the monitoring message is modified to the monitoring controller to return the encapsulated monitoring message to the monitoring controller.

[0018] Further, it also includes that 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.

[0019] An active monitoring device for the TSN network topology state, including:

[0020] A monitoring path calculation module, configured 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.

[0021] A monitoring message construction module, configured to construct a monitoring message according to the monitoring path and send the monitoring message to 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.

[0022] The node traversal module is used to traverse each switch according to the monitoring path for the monitoring message, collect the link information of all ports of each switch during the traversal of each switch, and write it 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 next destination link to which the monitoring message is to be forwarded, 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;

[0023] 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.

[0024] A computer device includes a processor and a memory. The memory is used to store a computer program, and the processor is used to execute the computer program to execute the method as described above.

[0025] A computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the method as described above.

[0026] Compared with the prior art, the advantages of the present invention are as follows: The present invention adopts an active measurement-based TSN network topology monitoring method. By actively and periodically sending network monitoring messages that can access the global network, first calculate the monitoring path according to the network topology. This monitoring path can traverse all switches under the current network topology and then return to the monitoring controller. Then, construct a monitoring message according to the monitoring path and send it 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 next destination link during the forwarding process, it will be returned to the monitoring controller. By parsing the returned monitoring message, the link status information of all links of each switch can be obtained. It can not only quickly obtain the status of all links in the current network without relying on any messages, but also quickly locate abnormal links, effectively maintain the network status, and eliminate network faults. Compared with the traditional link monitoring method that relies on the time synchronization tree, it can effectively meet the monitoring requirements of TSN real-time performance, network status information accuracy, and time synchronization accuracy. Description of the Drawings

[0027] Figure 1 It is a schematic flow chart of the implementation of the active monitoring method for the TSN network topology status in this embodiment.

[0028] Figure 2 It is a schematic diagram of the network topology structure applicable in the specific application embodiment of the present invention.

[0029] Figure 3 It is a schematic structural diagram of the monitoring message constructed in this embodiment.

[0030] Figure 4 It is a schematic diagram of the detailed execution process of the monitoring controller in the specific application embodiment of the present invention.

[0031] Figure 5 It is a schematic diagram of the detailed execution process of the switch in the specific application embodiment of the present invention. Specific Embodiments

[0032] 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.

[0033] As shown in the disclosure of the present invention, unless the context clearly indicates an exceptional situation, words such as "a", "one", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The "first", "second" and similar words used in the disclosure of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "include" or "comprise" 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. "Connection" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0034] As Figure 1 shown, the steps of the active monitoring method for the TSN network topology status in this embodiment include:

[0035] 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;

[0036] Step S02. Construct a monitoring message according to the monitoring path, and send the monitoring message to 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;

[0037] Step S03. The monitoring message traverses each switch according to the monitoring path, and collects the link information of all ports of each switch during the traversal of each switch and writes it 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 next destination link to which the monitoring message is to be forwarded, 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.

[0038] Step S04. Receive the monitoring message returned after traversing the switch, 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.

[0039] This embodiment adopts an active measurement-based TSN network topology monitoring method. By actively and periodically sending network monitoring messages that can access the global network, first calculate the monitoring path based on the network topology. This monitoring path can traverse all switches under the current network topology and then return to the monitoring controller. Then, construct a monitoring message according to the monitoring path and send it to the TSN network. The monitoring message traverses each switch according to the monitoring path. During the traversal, 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 next destination link to be forwarded, it is returned to the monitoring controller. When receiving the returned monitoring message, parsing the returned monitoring message can obtain the link status information of all ports of each switch. It can not only quickly obtain the status of all links in the current network without relying on any message, but also quickly locate the abnormal link, effectively maintain the network status, and eliminate network faults. Compared with the traditional link monitoring method that relies on the time synchronization tree, it can effectively meet the monitoring requirements of TSN real-time performance, network status information accuracy, and time synchronization accuracy.

[0040] In this embodiment, the monitoring controller is the terminal device for performing monitoring and control. The monitoring controller executes step S01, step S02, and step 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 at a preset period, receives the monitoring message returned after traversing the switches, 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 due to the high real-time performance of the TSN network, the status monitoring of the TSN network needs to be performed periodically. When performing network monitoring in this embodiment, the controller first sets a time slice for this round of network monitoring. After the time slice starts timing, the monitoring controller calculates a monitoring path according to the network topology maintained by itself. The monitoring path needs to 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 halfway, and the links connected between switches can be passed repeatedly. The monitoring controller then generates a monitoring message according to the calculated monitoring path and sends the monitoring message to the TSN network.

[0041] For the monitoring controller, the actions of the monitoring message in the TSN network are unknown. Before the end of the time slice, the monitoring controller will keep waiting until it receives the monitoring message that has traversed all nodes. Only then can the monitoring controller consider the status monitoring of this round to be 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 according to the link information. Since the network is not static, the monitoring controller may receive a monitoring message containing abnormal link information. The controller then 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.

[0042] The monitoring path is the forwarding path of the monitoring message, and the monitoring controller then generates a corresponding monitoring message according to the monitoring path. Taking Figure 2 the shown network topology structure as an example, it includes controller X (monitoring controller) and switches (A, B, C). The links in the network include L XA 、L AB 、L AC 、L BC four links. Controller X first generates a corresponding monitoring path according to the network topology. The monitoring path needs to start from controller X and traverse all switches (A, B, C) under the current network topology and finally return to controller X to form a path. For Figure 1 the calculated monitoring path of the network topology is from controller X through LXA Link to Switch A, and Switch A passes through L AB Link to Switch B, and Switch B passes through L BC Link to Switch C, and Switch C passes through L AC Link to Switch A, and Switch A passes through L XA Link returns to Controller X.

[0043] In this embodiment, the monitoring message includes the preamble field and the SDA field of the Ethernet message. The preamble field of the Ethernet message includes the destination MAC address, the source MAC, and the Ethernet type field. The SDA field includes multiple sub-fields, and each sub-field is arranged in a list form. Each sub-field corresponds to one hop in the monitoring path. Each sub-field includes a Destination List list and a Switch Bitmap field. Each item in the Destination List list stores the destination MAC address of each hop in the monitoring path, and the Switch Bitmap field is used to collect the link status information maintained in each switch. During the process of the monitoring message traversing each switch, by parsing the SDA field in the monitoring message, the destination address is obtained from the Destination List list and the destination address of the monitoring message is updated, and the source address is updated to the MAC address of the current switch. According to the currently updated destination address, the link status information of all ports of the current switch (including unconnected ports and ports of connected links) is queried, 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 switch and the next forwarding node, that is, there is an abnormality in the next destination link to which the message is to be forwarded, 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 is continued to be forwarded according to the monitoring path, that is, as long as the next destination link to which the message is to be forwarded is normal, the message can be forwarded. There may still be link abnormalities in the remaining links during the forwarding process. In this way, the link status information of all ports of all switches to be monitored can be effectively collected.

[0044] Specifically, such as Figure 3As shown, the monitoring message is transmitted in the form of a common Ethernet message during network transmission. After removing the preamble field of the Ethernet message (destination MAC address, source MAC, and Ethernet type field), the data field also includes the Segment Destination Address (SDA) field to implement a fragmentation propagation method similar to the SRH (Segment Routing Header) in SRv6. Multiple sub-fields (0 to N) are defined in the SDA field, and the Destination List and Switch Bitmap fields of each sub-field are arranged in a list form. Each item in the Destination List stores a six-byte destination MAC address and a two-byte reserved item. Using this structure, the switch that can identify the monitoring message can parse it after receiving the monitoring message and use the S_Index as an index to extract the list item corresponding to the S_Index subscript as the new destination address to modify the destination address of the message. The S_Index subscript corresponds to a certain hop in the path of the message; the Switch Bitmap field is used to collect 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. Taking Figure 2 the network topology in as an example, when the 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 destination address of the next forwarding node is obtained by reading the corresponding Destination List in the SDA, and the destination address of the message is modified to be forwarded 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 Switch Bitmap field information in each sub-field of the SDA.

[0045] In this embodiment, by constructing a monitoring message with the above structure, every time the monitoring message passes through a switch, the switch can extract the destination address in the Destination List by using the S_Index parsed from the SDA field as an 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. Thus, starting from the monitoring controller, it can be forwarded according to the destination address in the list and collect the node information along the way until it returns to the controller.

[0046] In this embodiment, it further includes that 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 between the current node and the next forwarding node. If the link status is normal, it encapsulates the link status information of all ports of the current node into the specified field of the monitoring message (i.e., the Switch Bitmap field in SDA). After encapsulation, it forwards the monitoring message to the next forwarding node; if the link status between the current node and the next forwarding node is abnormal, it encapsulates the link status information of all ports of the current node into the specified field of the monitoring message (i.e., the Switch Bitmap field in SDA), and modifies the destination address of the monitoring message to the monitoring controller to return the encapsulated monitoring message to the monitoring controller.

[0047] In this embodiment, a flag bit is also set 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 the first flag bit value. If an abnormal link is detected during the traversal, the data bit corresponding to the current node in the flag bit is updated to the 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 certain node is 0. If it is detected during the traversal that the link between the node and the next forwarding node is abnormal, 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 requirements.

[0048] In this embodiment, it further includes that when the flag bit of the returned monitoring message received is the first flag bit value (i.e., 0), it is determined that all link information in the current network is normal, and the currently maintained network topology remains unchanged; if there is a data bit in the flag bit of the returned monitoring message that is the second flag bit value, it parses the returned monitoring message to obtain the link status information of each switch, locates the corresponding abnormal node according to the second flag bit value, and finds the specific abnormal link in the abnormal node according to the obtained link status information and updates the currently maintained network topology.

[0049] Specifically, such as Figure 2As shown, a flag bit composed of multiple bytes is set in the monitoring message. This flag bit stores the abnormal status of each node according to the monitoring path, and the default value is the first flag bit value (i.e., default is 0) to indicate that there is no abnormal link for all nodes; when an abnormal link is detected during the traversal process (regardless of the abnormal situation), this flag 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, then the corresponding position in the flag bit is set to the second flag 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, it can obtain all the nodes with abnormalities according to the flag bit, and extract the Switch Bitmap field of the abnormal node after parsing, so as to quickly locate the specific link with abnormalities.

[0050] In this embodiment, it also includes that 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. Specifically, each switch in the network maintains the link status of the links connected to each port in the form of bitmap (bitmap). The monitoring message can effectively monitor the link status of all networks by collecting the link status of all ports of each node and storing it in the Switch Bitmap field. Furthermore, the monitoring controller can also quickly locate the abnormal link by using the monitoring message of the collected data.

[0051] In a specific application embodiment, the detailed execution process of the monitoring controller is as Figure 4 shown. First, the controller sets a time slice for the current round of network monitoring. After the time slice starts timing, the controller calls a pre-designed algorithm (the algorithm for calculating the monitoring path) according to the network topology it maintains, and calculates a monitoring path; generates a monitoring message in the Figure 3 format according to the calculated monitoring path, and sends this monitoring message to the TSN network; before the end of the time slice, the controller continuously waits until it receives the monitoring message that has traversed all nodes, determines that the current round of status monitoring is over, analyzes the monitoring message that has collected the link information of all switches in the network, and maintains the network topology in the controller according to the link information. If it receives a monitoring message containing abnormal link information, that is, an abnormal message with a flag bit of 1, the controller parses the link status information carried in this abnormal monitoring message, finds the link with an error, and updates the network topology maintained in the controller. After the above steps are completed, the controller starts a new round of message monitoring.

[0052] In a specific application embodiment, the detailed execution process of the switch is as Figure 5As shown, after the switch is powered on, it periodically checks whether the links connected to each port are normal. After power-on, the switch sets a time slice for periodic checking. After the time slice starts timing, the switch saves the status of the links maintained by each port it has collected in the form of a bitmap. Among them, a normal link is a link through which packets can be normally forwarded, corresponding to the up state and marked as 0; an abnormal link is a link through which packets cannot be normally forwarded, corresponding to the down state and marked as 1. The switch periodically collects and updates the bitmap stored in the register. When the switch receives a monitoring packet, it reads the corresponding Destination List entry in the SDA field of the monitoring packet, updates the read destination address to the new destination address of the monitoring packet, and the source address is the MAC address of the switch. It queries the forwarding port according to the new destination address, and judges whether the port is normal according to the bitmap. If it is normal, it means that the monitoring packet can be normally forwarded to the next node. The bitmap of this node is added to the Switch Bitmap field of the monitoring packet as all the link status information of this node, and the monitoring packet is forwarded out from the corresponding port. If it is abnormal, it means that the monitoring packet cannot be forwarded to the next destination node. Then the destination address of the monitoring packet is modified to the destination address of the controller, and the flag bit is set to 1 to distinguish the abnormal packet from the normal monitoring packet. Finally, after adding the bitmap of this node to the SwitchBitmap field of the monitoring packet as all the link status information of this node, the monitoring packet is forwarded out from the corresponding port. After processing the monitoring packet, the switch continues to periodically monitor the link status corresponding to each port and maintains the bitmap.

[0053] The complete steps for actively monitoring the TSN network topology status by combining the monitoring controller and the switch in this embodiment are as follows:

[0054] Step 1: The monitoring controller collects the current network topology and calculates the monitoring path of the monitoring packet according to the topology.

[0055] Step 2: The monitoring controller constructs a monitoring packet that saves all destinations in the form of a list into the SDA field according to the calculated path.

[0056] Step 3: The switch stores the link status of each port of this node in the form of a bitmap in the register of the switch to record abnormal links.

[0057] Step 4: When the switch receives the monitoring message, change the current destination address of the monitoring message to the address corresponding to the S_Index subscript in the Segment List, and check whether the link connected to the output port of the switch corresponding to this address is normal. If the link of the next forwarding node corresponding to the switch is abnormal, the switch needs to set the flag bit 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, then returns to Step 1; if the link of the next forwarding node corresponding to the switch is normal, write the link status information (bitmap) maintained by the switch into the Switch Bitmap field and go to the next node according to the new destination address.

[0058] Step 5: When all switches have been accessed and return to the monitoring controller, wait until the next cycle starts and then return to Step 1.

[0059] Take Figure 2 the network topology shown as an example, and the process of actively monitoring the TSN network topology status is specifically as follows:

[0060] After the monitoring controller sends out the monitoring message, it reaches switch A according to the destination address; after the TSN network is powered on, switch A periodically maintains the link status (L XA 、L AB 、L AC link status) corresponding to each port, stores 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 that it is the MAC address of switch B. Update the destination address in the monitoring message to the MAC address of switch B, and also update the source address to the MAC address of switch A. According to the port number corresponding to the MAC address of B in the forwarding table, check whether the L AC -number link corresponding to this port is normal.

[0061] If the L AC -number link is normal, the switch encapsulates the bitmap in the register as the link status information of L XA 、L AB 、L AC -number links maintained by switch A into the Switch Bitmap field of the monitoring message; after encapsulation, forward the monitoring message to the L AC -number link until switch B receives it. The processing process of switch B after receiving this monitoring message is the same as that of switch A.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] This embodiment also discloses a TSN network topology state active monitoring device, including:

[0067] 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.

[0068] The monitoring message construction module is used to construct a monitoring message according to the monitoring path and send the monitoring message to the TSN network at a preset period. 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.

[0069] The node traversal module is used to traverse each switch by the monitoring message along the monitoring path. During the process of traversing each switch, it collects the link information of all ports of each switch and writes it 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 next destination link to which the monitoring message is to be forwarded, 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.

[0070] 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.

[0071] The active monitoring device for the TSN network topology status in this embodiment corresponds one-to-one with the above-mentioned active monitoring method for the TSN network topology status, and will not be elaborated here one by one.

[0072] This embodiment further provides a computer device, including a processor and a memory. The memory is used to store a computer program, and the processor is used to execute the computer program to execute the method as described above.

[0073] It can be understood that the above method in this embodiment can be executed by a single device, such as a computer or a server, etc., or can also be applied to a distributed scenario where multiple devices cooperate with each other to complete. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps of the above method in this embodiment, and the multiple devices interact with each other to complete the above method. The processor can be implemented in ways such as a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., and is used to execute relevant programs to implement the above method in this embodiment. The memory can be implemented in forms such as a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device, etc. The memory can store an operating system and other application programs. When implementing the above method in this embodiment through software or firmware, the relevant program codes are stored in the memory and are called and executed by the processor.

[0074] This embodiment further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it implements the method as described above.

[0075] Those skilled in the art should understand that the above embodiments of the present invention can be provided as a method, a system, or a computer program product. 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 methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks in the specified function. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks in the specified function. 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 generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks in the specified function.

[0076] The above are only the preferred embodiments of the present invention and do not impose any formal restrictions on the present invention. Although the present invention has been disclosed above with the preferred embodiments, it is not intended to limit the present invention. Therefore, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.

Claims

1. An active monitoring method for the topology state of a TSN network, characterized in that the steps Including: 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; Construct a monitoring message according to the monitoring path, and send the monitoring message to 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; 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; Receive the returned monitoring message, 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; The monitoring message includes the preamble field of the Ethernet message and the SDA field. The SDA field includes multiple sub-fields. Each sub-field corresponds to one hop in the monitoring path. Each sub-field includes a Destination List list and a Switch Bitmap field. The Destination List list stores the destination MAC address corresponding to each hop in the monitoring path, and the Switch Bitmap field collects the link status information maintained in each switch. The preamble field of the Ethernet message includes the destination MAC address, the source MAC, and the Ethernet type field; 2. The active monitoring method for the TSN network topology state according to claim 1, characterized in that, During the process of the monitoring message traversing each switch, by parsing the SDA field in the monitoring message, obtain the destination address from the Destination List list according to the S_Index parsed from the SDA field as an index and update the destination address of the monitoring message. The source address is updated to the MAC address of the current switch, query the link status information of all ports of the current switch according to the currently updated destination address, and store the link status information of all ports of the current switch into the Switch Bitmap field; If there is an abnormality in the link between the current node and the next forwarding node, then modify the destination address in the Destination List list to modify the destination address of the monitoring message to the MAC address of the monitoring controller.

3. The active monitoring method for the TSN network topology status according to claim 1, wherein The monitoring message is also provided with a flag bit for marking the status of each node in the network. Each data bit in the flag bit corresponds to a node in the network. The initial value of each data bit in the flag bit is the first flag bit value. During the traversal process, if an abnormal link is detected at the current node, the data bit corresponding to the current node in the flag bit is updated to the second flag bit value to mark it as an abnormal message.

4. The active monitoring method for the TSN network topology status according to claim 3, wherein It also includes that when all data bits in the flag bit of the returned monitoring message received 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 remains unchanged; if there is a data bit in the flag bit of the 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, 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.

5. The active monitoring method for the TSN network topology state according to any one of claims 1 to 4, 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 after encapsulation, the monitoring message is forwarded to the next forwarding node; 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.

6. The active monitoring method for the TSN network topology state according to any one of claims 1 to 4, characterized in that, It also includes that 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.

7. An active monitoring device for the topology state of a TSN network, characterized in that It includes: A monitoring path calculation module, which 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, which is used to construct a monitoring message according to the monitoring path and send the monitoring message to 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; A node traversal module, which is used to traverse each switch according to the monitoring path by the monitoring message, collect the link information of all ports of each switch during the traversal of each switch and write it into the corresponding field in the monitoring message. The link information includes link status information. If the link between the current node and the next forwarding node is abnormal, that is, the next destination link to which the monitoring message is to be forwarded is abnormal, 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; A message receiving and parsing module, which 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; The monitoring message includes a preamble field of an Ethernet message and an SDA field. The SDA field includes a plurality of sub-fields. Each sub-field corresponds to one hop in the monitoring path. Each sub-field includes a Destination List list and a Switch Bitmap field. The Destination List list stores the destination MAC address of each hop in the monitoring path correspondingly, and the Switch Bitmap field collects the link status information maintained in each switch. The preamble field of the Ethernet message includes a destination MAC address, a source MAC, and an Ethernet type field.

8. A computer device, comprising a processor and a memory, the memory being used for storing a computer program, characterized in that, The processor is used to execute the computer program to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Vehicle DDS and TSN fusion deployment method and system, storage medium and electronic equipment

    CN118200128A