Clock synchronization method and related equipment
By establishing multiple paths for server nodes and client nodes in the communication network and using routing table entries to indicate the next hop node, the problem of poor reliability of clock messages delivered by a single path is solved, and the stability of the clock synchronization process and the improvement of disaster recovery capabilities are achieved.
Patent Information
- Application Number
- CN202410070547.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-17
- Publication Date
- 2025-07-18
AI Technical Summary
In a communication network, the method of transmitting clock messages through a single path between the server node and the client node is poor in reliability, resulting in unstable clock synchronization process.
By establishing multiple paths between the server node and the client node, and using routing table entries to indicate the next hop node, multi-path delivery of clock messages is realized, ensuring the stability and disaster recovery capabilities of the clock synchronization system.
It improves the reliability of the clock message delivery process and the stability of the clock synchronization process, enhances the system's disaster recovery capabilities, and ensures that clock messages can still be transmitted through other paths when a path fails.
Smart Images

Figure CN120342529A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a clock synchronization method and related devices. Background Art
[0002] In a communication network, a network that runs the Precision Time Protocol (PTP) can be referred to as a PTP domain. The node types in the PTP domain include, but are not limited to, ordinary clock (OC) nodes, boundary clock (BC) nodes, transparent clock (TC) nodes, and hybrid nodes (for example, nodes with both TC and BC functions, simply referred to as BC+TC nodes).
[0003] Among the nodes in the PTP domain, there are server nodes and client nodes. The server node and the client node are connected through several TC nodes in the PTP domain. The clock message is forwarded hop by hop through several TC nodes to complete the clock synchronization process between the server node and the client node.
[0004] The path for transmitting the clock message between the server node and the client node is only through one path (including specific several TC nodes), and this way of transmitting the clock message has poor reliability. Summary of the Invention
[0005] This application provides a clock synchronization method and related devices for improving the reliability of clock synchronization.
[0006] In a first aspect, this application provides a clock synchronization method. The clock synchronization system includes M + 1 nodes. The M + 1 nodes at least include a server node and a client node, where M is an integer greater than 1. Optionally, the M + 1 nodes further include several TC nodes. The clock synchronization method of this embodiment of the application is applied to a first node in the clock synchronization system, where the first node is the node in the clock synchronization system that executes the clock synchronization method of this embodiment of the application. Exemplarily, the clock synchronization system can be a 1588 system, a 1588v2 system, or a PTP system. Optionally, the clock synchronization method of this embodiment of the application is applied to all nodes in the clock synchronization system, that is, each node in the clock synchronization system belongs to the first node exemplified in this embodiment of the application. In this embodiment of the application, a node is a communication entity for sending a signal, or receiving a signal, or sending and receiving signals. Optionally, the communication entity can be a router, a switch, a virtual switch, a virtual router, or a smart network card, etc.
[0007] In this method, the first node obtains clock messages. Among them, the clock messages exemplified in the embodiments of the present application include, but are not limited to, sync messages, Signaling messages, Announce messages, follow_Up messages, grant messages, Delay_Req messages, and Delay_Resp messages. The clock messages (such as Sync messages) in the embodiments of the present application may use the server node as the source node and the client node as the destination node; or, the clock messages (such as signaling messages) may use the client node as the source node and the server node as the destination node. The source node sends the clock message, and after being forwarded by several nodes (such as TC nodes) in the clock synchronization system, it reaches the destination node.
[0008] In the clock synchronization system of the embodiments of the present application, there are multiple paths for transmitting clock messages between the server node and the client node. Among them, the first node is the node on N paths. In other words, the first node can sense the N paths between the server node and the client node. Specifically, in the first node, a routing table is stored. The routing table includes N routing table entries, and P of the N routing table entries correspond to the first destination node, where the first destination node may be the server node and / or the client node. Each of the N routing table entries indicates that the next hop is a node in the clock synchronization system (including M + 1 nodes). N is an integer greater than 1. After the first node obtains the clock message, it matches the clock message with the N routing table entries in the routing table. Thus, the target next hop is determined, where the target next hop is the node indicated by the routing table entry that matches the clock message among the N routing table entries.
[0009] In the embodiments of the present application, since the clock messages can be transmitted between the server node and the client node through multiple paths, the reliability during the transmission of the clock messages is improved. As a result, the stability and success rate of the clock synchronization process are improved, and the disaster tolerance of the clock synchronization system is also improved.
[0010] Exemplarily, in practical applications, if a certain path fails, the clock messages can still be transmitted between the server node and the client node through other paths.
[0011] Based on the first aspect, in an alternative embodiment, the first node is a server node (i.e., the clock synchronization method in the embodiments of the present application is applied to the server node). In the routing table of the server node, N is equal to P, and N routing entries correspond to the first destination node, which is a client node. That is, the clock message sent by the server node can reach the client node through N paths. After the server node obtains the clock message, since the N routing entries of the server node respectively indicate a target next hop, the server node can send the clock message to the N target next hops indicated by the N routing entries, so as to transmit the clock message to the client node through N paths simultaneously.
[0012] Based on the first aspect, in an alternative embodiment, the first node is a client node (i.e., the clock synchronization method in the embodiments of the present application is applied to the client node). In the routing table of the client node, N is equal to P, and N routing entries correspond to the first destination node, which is a server node. That is, the clock message sent by the client node can reach the server node through N paths. After the client node obtains the clock message, since the N routing entries of the client node respectively indicate a target next hop, the client node can send the clock message to the N target next hops indicated by the N routing entries, so as to transmit the clock message to the server node through N paths simultaneously.
[0013] Based on the first aspect, in an alternative embodiment, the clock message includes N messages, and the target next hop includes N next hops. Then, the server node or the client node sends N messages to the N next hops respectively according to the routing table, where each of the N messages is transmitted through one of the N next hops.
[0014] Based on the first aspect, in an optional implementation, the first node is a TC node (i.e., the clock synchronization method in the embodiments of the present application is applied to the TC node in the clock synchronization system). Then, this TC node is a forwarding node on N paths between the server node and the client node. The N paths include several paths for the clock message to reach the client node from the server node and / or several paths for the clock message to reach the server node from the client node. This TC node can transmit the clock message from the server node (source node) to the client node (destination node); or, it can also transmit the clock message from the client node (source node) to the server node (destination node). In the routing table of the TC node, the N routing table entries of the TC node include P routing table entries corresponding to the first destination node and Q routing table entries corresponding to the second destination node, that is, N = P + Q. The first destination node is the client node and the second destination node is the server node, or the first destination node is the server node and the second destination node is the client node. Optionally, the nodes on the path for the clock message to reach the client node from the server node are the same as those on the path for the clock message to reach the server node from the client node. Therefore, among the N routing table entries of the TC node, the number of routing table entries corresponding to the first destination node is the same as the number of routing table entries corresponding to the second destination node, that is, P = Q.
[0015] Based on the first aspect, in an optional implementation, during the clock synchronization process of the client node, the number of server nodes is greater than 1, that is, the client node simultaneously tracks multiple server nodes. This client node can receive clock messages from multiple server nodes and can also send clock messages to multiple server nodes. Specifically, the TC node can receive multiple clock messages from different server nodes and with the same client node as the destination node (such as the first destination node or the second destination node), and then send the multiple clock messages to each next hop indicated by the local routing table. On the other hand, the routing table of the client node or the TC node can use multiple server nodes as the destination nodes, then the client node or the TC node can obtain multiple clock messages respectively with multiple server nodes as the destination nodes and transmit the multiple clock messages to each next hop indicated by the local routing table. The client node simultaneously tracks multiple server nodes, so that when a certain server node fails, the client node can still receive clock messages through other server nodes, improving the stability and success rate of clock synchronization, and also improving the disaster tolerance ability of the clock synchronization system.
[0016] Based on the first aspect, in an alternative implementation, among the M + 1 nodes of the clock synchronization system, each node floods its advertisement information to other nodes in the clock synchronization system. Therefore, for a single node (the first node) among the M + 1 nodes, it will receive M advertisement messages from the other M nodes in the clock synchronization system, where each advertisement message comes from a different node other than the node itself (the first node). The first node determines N paths between the server node and the client node based on the M advertisement messages from the other M nodes. After the first node calculates the N paths, it can construct a routing table based on the N paths. The routing table includes N routing table entries with the client node or the server node as the destination node. Among them, the next hop on each of the above paths for the first node is the next hop indicated by a routing table entry in the routing table.
[0017] Based on the first aspect, in an alternative implementation, the M advertisement messages received by the first node include M prefix messages from the M nodes. Each prefix message comes from a different node, and the prefix message includes the IP address of the node in the clock synchronization system. In other words, among the M + 1 nodes of the clock synchronization system, each node floods its prefix information to other nodes in the clock synchronization system.
[0018] Based on the first aspect, in an optional implementation, among the M + 1 nodes of the clock synchronization system, at least one node can send routing algorithm information to other nodes in the clock synchronization system. The routing algorithm information is carried in the advertisement information of this node, that is, the advertisement information of this node includes the routing algorithm information. In other words, among the M + 1 advertisement information of the M + 1 nodes, at least one advertisement information includes the routing algorithm information. Among them, the routing algorithm information indicates the routing algorithm for determining N paths. After receiving the routing algorithm information, other nodes calculate the N paths between the server node and the client node according to the routing algorithm indicated by the routing algorithm information. In practical applications, the routing algorithm information can be sent by one or more nodes (or can be all nodes) among the M + 1 nodes of the clock synchronization system. Specifically, the role responsible for sending the routing algorithm information is not limited to the server node, the client node or the TC node. That is, the routing algorithm information can be carried in the advertisement information of the server node, can also be carried in the advertisement information of the client node, or can also be carried in the advertisement information of the TC node. Then, at least one of the M advertisement information received by the first node includes the routing algorithm information. The routing algorithm information is carried in the advertisement information of at least one of the above M nodes. Therefore, at least one of the M advertisement information received by the first node includes the routing algorithm information. The routing algorithm information is carried in the advertisement information of at least one of the above M nodes.
[0019] Based on the first aspect, in an optional implementation, the server node corresponds to multiple first IP addresses, and the client node corresponds to multiple second IP addresses. Therefore, each first IP address of the server node is configured with a priority, and each second IP address of the client node is configured with a priority. Then, the prefix information of the server node includes the multiple first IP addresses of the server node and the priorities of the multiple first IP addresses. Each first IP address corresponds to a priority respectively. The prefix information of the client node includes the multiple second IP addresses of the client node and the priorities of the multiple second IP addresses. Each second IP address corresponds to a priority respectively. Then, when each node calculates the path between the server node and the client node, the first IP address and the second IP address belonging to the same priority are respectively used as the source address and the destination address of the path, or the second IP address and the first IP address belonging to the same priority are respectively used as the source address and the destination address of the path.
[0020] Based on the first aspect, in an optional implementation, the server node corresponds to a first IP address, and the client node corresponds to a second IP address. Then the prefix information of the server node includes the first IP address of the server node, and the prefix information of the client node includes the second IP address of the client node. Moreover, the routing algorithm information further includes N path identifiers, and each path identifier corresponds to the priority of the path to be calculated. After receiving the routing algorithm information, other nodes calculate N paths between the server node and the client node according to the routing algorithm indicated by the routing algorithm information, and each path corresponds to a path identifier in the routing algorithm information.
[0021] Based on the first aspect, in an optional implementation, the first node sends the advertisement information of the first node to the other M nodes in the clock synchronization system, so that the other M nodes determine N paths between the server node and the client node based on the advertisement information of the first node and construct the routing tables of each node locally.
[0022] Based on the first aspect, in an optional implementation, the advertisement information of the first node sent by the first node to the other M nodes includes the prefix information of the first node.
[0023] Based on the first aspect, in an optional implementation, the advertisement information of the first node sent by the first node to the other M nodes includes the routing algorithm information and the prefix information of the first node.
[0024] Based on the first aspect, in an optional implementation, after receiving the clock message, the first node matches the clock message with N routing table entries in the first node, and then sends the clock message to the next hop indicated by the matching result. In a possible implementation, P different IP addresses are configured for the first destination node, then different paths between the server node and the client node can be distinguished by different IP addresses of the first destination node. At this time, among the P routing table entries of the first node, each routing table entry corresponds to an IP address of the destination node respectively. In other words, the P routing table entries of the first node correspond to different destination addresses respectively. Then after the first node obtains the clock message, it determines the target routing table entry in the routing table, where the IP address of the first destination node corresponding to the target routing table entry matches the destination address of the clock message. Then, the first node sends the clock message to the target next hop indicated by the target routing table entry. The destination address field of the clock message is set to the IP address of the destination node, so as to distinguish the transmission paths of the clock messages through different destination addresses of the clock messages, without modifying or expanding the message format of the clock messages, thus improving the transmission efficiency of the clock messages.
[0025] Based on the first aspect, in an alternative implementation, if the same IP address is configured for the first destination node, different paths between the server node and the client node can be distinguished by different path identifiers. That is, each path between the server node and the client node corresponds to a path identifier. At this time, each routing table entry in the routing table corresponds to a path identifier, which is used to indicate that the routing table entry is a routing table entry for a specific path. The clock message will carry a path identifier. After the first node obtains the clock message, it matches the clock message with the N routing table entries in the first node to determine the target routing table entry in the routing table, where the path identifier corresponding to the target routing table entry matches the path identifier of the clock message. Then, the first node sends the clock message to the target next hop indicated by the target routing table entry. By using different path identifiers to distinguish the transmission paths of the clock messages, it is not necessary to configure multiple second IP addresses for the first destination node, thus improving the management efficiency of the client node.
[0026] Based on the first aspect, in an alternative implementation, among the M + 1 nodes of the clock synchronization system, the advertisement information of any node can be carried in the link state packet (LSP) message of the intermediate system to intermediate system (IS-IS) protocol, or the advertisement information of any node is carried in the link state advertisement (LSA) message of the open shortest path first (OSPF) protocol, or the advertisement information of any node is carried in the node network layer reachable information (Node NLRI) message of the border gateway protocol (BGP) protocol, or the advertisement information of any node is carried in the link network layer reachable information (Link NLRI) message of the BGP protocol, or the advertisement information of any node can also be carried in other network protocol messages, which is not limited in the embodiments of the present application.
[0027] Based on the first aspect, in an optional implementation, the routing algorithm indicated in the routing algorithm information may specifically include: using the Shortest Path First (SPF) algorithm to calculate the shortest path between the server and the client node as one of the paths, and then using the Maximally Redundant Tree (MRT) algorithm to calculate the remaining N-1 paths. The N paths are calculated with the maximum separation between the N paths as the goal. This avoids N paths passing through the same node as much as possible, so that when a node fails, the clock message can still be forwarded through other nodes, thereby improving the stability and success rate of clock synchronization, and also improving the disaster recovery capability of the clock synchronization system.
[0028] Based on the first aspect, in an optional implementation, the routing algorithm indicated in the routing algorithm information may specifically include: using the SPF algorithm to calculate the shortest path between the server and the client node as one of the paths, and then using the K shortest path (K Shortest Path, KSP) algorithm to calculate the remaining N-1 paths.
[0029] In a second aspect, the present application provides a communication device, which is applied to one of the M+1 nodes included in the clock synchronization system, the M+1 nodes include at least a server node and a client node, M is an integer greater than 1, and the communication device includes:
[0030] A transceiver unit, used for obtaining a clock message;
[0031] A processing unit is used to send a clock message to a target next hop according to a routing table, wherein the routing table includes N routing table items, P routing table items among the N routing table items correspond to a first destination node, each routing table item among the N routing table items indicates that the next hop is a node among M+1 nodes, N is an integer greater than 1, and the target next hop is a node indicated by a routing table item among the N routing table items that matches the clock message.
[0032] The information interaction and execution process and other contents of the embodiment shown in this aspect are based on the same concept as the embodiment shown in the first aspect. Therefore, for the description of the beneficial effects shown in this aspect, please refer to the above-mentioned first aspect, and the details will not be repeated here.
[0033] In a third aspect, the present application provides a clock synchronization system, which includes M+1 nodes including a first node, and the M+1 nodes include at least a server node and a client node, M is an integer greater than 1, and the first node is used to execute the method in the above-mentioned first aspect, or any possible implementation of the first aspect.
[0034] Fourthly, the present application provides a communication device, including: a processor, which is coupled to a memory for storing instructions, and when the instructions are executed by the processor, the computing device implements the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0035] Fifthly, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0036] Sixthly, an embodiment of the present application provides a computer program product, in which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the method in the first aspect or any possible implementation manner of the first aspect is implemented.
[0037] Seventhly, an embodiment of the present application provides a chip, including: a processor, which is coupled to a memory for storing instructions, and when the instructions are executed by the processor, the chip implements the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0038] Among them, for the technical effects brought by any implementation manner in the third aspect to the seventh aspect, reference can be made to the technical effects brought by the implementation manner in the above-mentioned first aspect, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0040] Figure 1a It is a schematic diagram of a PTP system involved in the present application;
[0041] Figure 1b It is a schematic diagram of PTP message interaction involved in the present application;
[0042] Figure 1c It is another schematic diagram of PTP message interaction involved in the present application;
[0043] Figure 1d It is another schematic diagram of PTP message interaction involved in the present application;
[0044] Figure 1e It is another schematic diagram of PTP message interaction involved in the present application;
[0045] Figure 2a A schematic diagram of the flexible algorithm message involved in this application;
[0046] Figure 2b Another schematic diagram of the flexible algorithm message involved in this application;
[0047] Figure 3a Another schematic diagram of the PTP message interaction involved in this application;
[0048] Figure 3b Another schematic diagram of the PTP message interaction involved in this application;
[0049] Figure 3c Another schematic diagram of the PTP message interaction involved in this application;
[0050] Figure 4a A schematic flow diagram of the clock synchronization method in the embodiments of this application;
[0051] Figure 4b A schematic diagram of the scenario where the clock synchronization method in the embodiments of this application is applied to the server node;
[0052] Figure 4c A schematic diagram of the scenario where the clock synchronization method in the embodiments of this application is applied to the TC node;
[0053] Figure 4d A schematic diagram of the scenario where the clock synchronization method in the embodiments of this application is applied to the client node;
[0054] Figure 5 A schematic diagram of a possible application scenario of the clock synchronization method in the embodiments of this application;
[0055] Figure 6 A schematic flow diagram of calculating N paths between the server node and the client node in the embodiments of this application;
[0056] Figure 7 A schematic diagram of a possible message structure of the prefix information of the node in the embodiments of this application;
[0057] Figure 8 Another schematic diagram of a possible message structure of the prefix information of the node in the embodiments of this application;
[0058] Figure 9 A schematic diagram of a possible message structure of the routing algorithm information in the embodiments of this application;
[0059] Figure 10 A schematic diagram of a possible N paths in the embodiments of this application;
[0060] Figure 11Another flowchart for calculating N paths between a computing server node and a client node in an embodiment of the present application;
[0061] Figure 12 Schematic diagram of the message structure of a path identifier in an embodiment of the present application;
[0062] Figure 13 Another possible schematic diagram of N paths in an embodiment of the present application;
[0063] Figure 14 Schematic diagram of a message structure of a clock message in an embodiment of the present application;
[0064] Figure 15 Schematic diagram of a structure of a communication device provided in an embodiment of the present application;
[0065] Figure 16 Schematic diagram of a logical structure of a communication device 50 provided in an embodiment of the present application. Detailed implementation manners
[0066] Embodiments of the present application provide a clock synchronization method and related devices for improving the reliability of clock synchronization.
[0067] The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, rather than to limit the embodiments of the present application. Those of ordinary skill in the art will understand that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0068] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. "At least one (item)" or similar expressions thereof refer to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.
[0069] The terms "first", "second", "third", "fourth", etc. (if any) in the description, claims, and the above-mentioned drawings of this application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0070] Some nouns or terms used in the embodiments of this application are explained below to facilitate understanding by those skilled in the art. These nouns or terms also form part of the invention content.
[0071] (1) Clock synchronization: In modern communication networks, the normal operation of most telecommunication services requires that the frequency or time difference between network devices be maintained within a reasonable error level, that is, clock synchronization. Specifically, clock synchronization includes two concepts: frequency synchronization and phase synchronization.
[0072] Frequency synchronization refers to maintaining a certain strict specific relationship between the frequencies or phases of signals, and the signals appear at the same rate at their corresponding effective instants to maintain all devices in the communication network running at the same rate, that is, a constant phase difference is maintained between the signals.
[0073] Phase synchronization, also known as time synchronization, refers to the frequencies and phases of signals being consistent, that is, the phase difference between the signals is constantly zero.
[0074] (2) Precision Time Protocol (PTP). The PTP protocol is a time protocol for network measurement and control systems, which can achieve a relatively high network time synchronization accuracy and realize high-precision time synchronization. The PTP protocol itself can be used for high-precision time synchronization between devices or can be borrowed for frequency synchronization between devices. The PTP protocol establishes a master-slave system among the clocks in the system, and the time of all clocks in the system comes from the Best Master Clock. The Best Master Clock exchanges PTP messages with the Slave Clock, and the Slave Clock calculates the clock deviation and network delay with the Master Clock through the timestamp information carried in the PTP messages, thereby achieving synchronization.
[0075] Generally, compared with various other time synchronization mechanisms, PTP has the following advantages.
[0076] For example, compared with the Network Time Protocol (NTP), PTP can meet the requirements of higher-precision time synchronization: NTP generally can only achieve sub-second time synchronization accuracy, while PTP can reach sub-microsecond level.
[0077] Another example is that compared with the Global Positioning System (GPS), PTP has lower construction and maintenance costs.
[0078] (3) Basic concepts of PTP.
[0079] ① PTP domain: The network applying the PTP protocol can be called a PTP domain.
[0080] Optionally, there is one and only one synchronization clock in the PTP domain, and all devices in the PTP domain are synchronized with this clock.
[0081] ② PTP port: The port running the PTP protocol on a device can be called a PTP port.
[0082] Exemplarily, as Figure 1a shown, the roles of PTP ports can include the following three types:
[0083] Master Port: The port that publishes the synchronization time, which can exist on the BC or OC. In Figure 1a and the following examples, it can be the port "M". For example, in Figure 1a , the port "M" can be the port corresponding to the circular mark on BC1 / BC2 / BC3.
[0084] Slave Port: The port that receives the synchronization time, which can exist on the boundary clock (BC) or ordinary clock (OC). In Figure 1a and the following examples, it can be the port "S". For example, in Figure 1a , the port "S" can be the port corresponding to the rectangular mark on OC1 / OC2 / OC3 / OC4 / OC5 / OC6 / BC2 / BC3.
[0085] Passive Port: The port that neither receives the synchronization time nor publishes the synchronization time externally, which can exist on the BC. In Figure 1a and the following examples, it can be the port "P". For example, in Figure 1aAmong them, the port "P" can be the port corresponding to the triangular mark on BC3.
[0086] (4) Node: A node in the PTP domain is called a node. The PTP protocol defines the following three types of basic nodes:
[0087] OC: This node has only one PTP port participating in time synchronization within the same PTP domain and synchronizes time from the upstream node through this port. In addition, when the node is used as a clock source, it can publish time to the downstream node only through one PTP port, and it is also called OC.
[0088] BC: This node has multiple PTP ports participating in time synchronization within the same PTP domain. It synchronizes time from the upstream node through one of its ports and publishes time to the downstream node through the remaining ports. In addition, when the node is used as a clock source, it can publish time to the downstream node through multiple PTP ports, and it can also be called BC, such as Figure 1a BC 1 in.
[0089] Transparent clock (TC): Compared with BC / OC, BC / OC needs to keep time synchronization with other nodes, while TC can not keep time synchronization with other nodes. Generally, TC has multiple PTP ports, but it only forwards PTP protocol messages between these ports and corrects the forwarding delay, and will not synchronize time through any one port.
[0090] Optionally, TC includes the following two types:
[0091] End-to-End transparent clock (E2E TC): It can forward non-Peer-to-Peer (P2P) type protocol messages in the network and participate in calculating the delay of the entire link.
[0092] Peer-to-Peer transparent clock (P2PTC): It can directly forward messages such as Sync messages, Follow_Up messages, and Announce messages, while terminating other PTP protocol messages and participating in calculating the delay of each segment of the entire link.
[0093] Exemplarily, as Figure 1a shown, is the position of the above three basic nodes in the PTP domain.
[0094] Optionally, in addition to the above three basic nodes, there are also some hybrid nodes, such as TC+OC that combines the characteristics of TC and OC: It has multiple PTP modules within the same PTP domain, where one PTP module is of the OC type and the other PTP modules are of the TC type. On the one hand, it forwards or retransmits PTP protocol messages through the TC-type PTP module and corrects the forwarding delay thereof; on the other hand, it performs time synchronization through the OC-type PTP module. Similar to the classification of TC, TC+OC also includes two types: E2ETC+OC and P2PTC+OC.
[0095] (5) The master-slave relationship between nodes. The nodes within the PTP domain perform clock synchronization according to a certain master-slave relationship. The master-slave relationship between nodes is relative. Specifically, the node device that synchronizes the clock is called the slave node, and the node device that publishes the clock is called the master node. In practical applications, a node may simultaneously synchronize the clock from the upper-level node (in this case, the node is the slave node), and then publish the clock to the lower-level node (in this case, the node is the master node). For a pair of nodes that synchronize with each other, there is the following master-slave relationship. For example, the node that publishes the synchronization time is called the master node, and the node that receives the synchronization time is called the slave node; another example is that the clock on the master node is called the master clock, and the clock on the slave node is called the slave clock; another example is that the port that publishes the synchronization time is called the master port, and the port that receives the synchronization time is called the slave port.
[0096] (6) The request-response mechanism can be used for end-to-end delay measurement. Among them, the delay measurement process can be implemented through the one-step mode or the two-step mode.
[0097] Exemplarily, as Figure 1b shown, the two-step mode includes the following implementation process:
[0098] ① The master clock sends a Sync message to the slave clock and records the sending time (or sending timestamp, sending moment, etc.) t1; after receiving the Sync message, the slave clock records the receiving time (or receiving timestamp, receiving moment, etc.) t2.
[0099] ② After sending the Sync message, the master clock immediately sends a Follow_Up message carrying t1.
[0100] ③ The slave clock sends a Delay_Req message to the master clock to initiate the calculation of the reverse transmission delay and records the sending time t3; after receiving this message, the master clock records the receiving time t4.
[0101] ④ After the master clock receives the Delay_Req message, it replies with a delay response (Delay_Resp) message carrying t4.
[0102] At this time, the slave clock has the four timestamps t1 to t4, from which the total round-trip delay between the master and slave clocks can be calculated to satisfy:
[0103] Total round-trip delay = [(t2 – t1) + (t4 – t3)];
[0104] Generally, since the network is symmetric, the one-way delay between the master and slave clocks satisfies:
[0105] One-way delay = [(t2 – t1) + (t4 – t3)] / 2;
[0106] Therefore, the clock offset (Offset) of the slave clock relative to the master clock satisfies:
[0107] Offset = (t2 – t1) - [(t2 – t1) + (t4 – t3)] / 2 = [(t2 – t1) - (t4 – t3)] / 2.
[0108] In addition, according to whether a Follow_Up message needs to be sent, the request-response mechanism is divided into two types: single-step mode and two-step mode:
[0109] In the above two-step mode, the transmission timestamp t1 of the Sync message is carried by the Follow_Up message. In addition, in the one-step mode, the transmission timestamp t1 of the Sync message is carried by the Sync message itself, and no Follow_Up message is sent. The specific implementation process can refer to the above Figure 1b shown implementation process.
[0110] (7) Link-state routing protocol. Generally, routers running the link-state routing protocol first establish neighbor relationships, and then start to exchange link-state (LS) information, including one or more of device interface addresses, internal reachability information (direct neighbor interface addresses, outbound port cost values), and network segment information where the router is located. In addition, the router stores this link-state information in a link state database (LSDB), and the data in the LSDB helps the router restore the topology of the entire network.
[0111] Exemplarily, taking the number of routers executing the link-state routing protocol as 4, these 4 routers can be respectively denoted as R1, R2, R3, and R4.
[0112] As Figure 1cAs shown, when different routers communicate with each other via OSPF, they can exchange link state announce (LSA) messages (denoted as LSAs in the figure), enabling the flooding of LSA messages.
[0113] Optionally, when different routers communicate with each other via OSPF, the LSA messages can be replaced with LSP messages.
[0114] As Figure 1d shown, each router stores the collected LSAs in its local LSDB. The process of maintaining the LSDB enables the router to master the topology of the entire network.
[0115] As Figure 1e shown, each router calculates based on the LSDB using an algorithm (such as the shortest path first (SPF) algorithm) to obtain a loop-free tree rooted at itself and covering the entire network. Moreover, each router loads the routes into the routing table according to the calculation result of SPF.
[0116] (8) The basic concept of Flex-Algorithm.
[0117] Among them, Flex-Algorithm is defined in the IGP Flexible Algorithm of Request for Comments (RFC) 9350, and the corresponding forwarding plane can be segment routing (SR).
[0118] In addition, draft-ietf-lsr-ip-flexalgo also defines the use of Flex-Algorithm with the IP as the forwarding plane.
[0119] The following concepts are based on RFC9350. Traditionally, IGP protocols calculate the best path on the network based on the IGP metric assigned to the link. Many network deployments use resource reservation protocol traffic engineering (RSVP-TE) or SR-based traffic engineering to force traffic on paths calculated using metrics or constraints different from the shortest IGP path. Flex-Algorithm proposes a solution by defining a combination of a set of constraints to flood within the IGP domain, enabling nodes within the IGP domain to calculate constraint-based paths based on the same constraints, thereby achieving the ability of distributed TE.
[0120] In addition, a flexible algorithm definition (FAD) can be flooded within the IGP domain as the capability information of a node. For example, the FAD can include information such as (a) calculation type (Calc-Type), (b) metric type (Metric-Type), and (c) constraints.
[0121] In one implementation example, for (a) the calculation type (Calc-Type), different values can correspond to different meanings. For example, a value of 0 indicates that the calculation type is SPF. Another example is that a value of 1 indicates that the calculation type is strict SPF.
[0122] In one implementation example, for (b) the metric type (Metric-Type), different values can correspond to different meanings. For example, a value of 0 indicates that the metric type is IGP metric. Another example is that a value of 1 indicates that the metric type is link delay (i.e., the minimum one-way link delay, defined in RFC7810). Another example is that a value of 2 indicates that the metric type is traffic engineering metric (TE metric) (i.e., the default metric value of TE, defined in RFC5305).
[0123] In one implementation example, for (c) the constraints, they can be understood as link constraints. Specifically, they can be described by including / excluding an administrative group (attribute) (include / exclude admin-group (color)).
[0124] Generally, the combination of constraints defined in each Flexible-Algorithm can be represented by a Flexible-Algorithm ID. For example, according to the protocol definition, the Flexible-Algorithm ID can be a numerical identifier in the range of 128 - 255, which is associated with the FAD through configuration.
[0125] Exemplarily, taking the ISIS protocol as an example, as Figure 2a shown, in the ISIS Flexible Algorithm Definition Sub-TLV, one or more of the following fields can be included:
[0126] Type: Indicates the type of the Sub-TLV.
[0127] Length: Indicates the length of the Sub-TLV.
[0128] Flex-Algorithm: Identifies the Flexible-Algorithm ID value.
[0129] Metric-Type: Identifies the Metric type adopted during the calculation process of this Flexible-Algorithm.
[0130] Calc-Type: Defined in the "IGP Algorithm Type" registry. Generally, when used to specify Calc-Type in the FAD Sub-TLV, the calculation type defined for the specified IGP algorithm is used, and metrics / constraints cannot be inherited.
[0131] Sub-TLVs: An optional part, such as Figure 2a the Exclude Admin Group Sub-TLV value of the sub-length type shown, or the Include-Any AdminGroup Sub-TLV or the Include-All Admin Group Sub-TLV, etc. Among them, by configuring different link attributes (color) for different links, different constraints of the Flex-Algorithm can be configured by including different link attributes carried in the Admin Group Sub-TLV in the definition of each Flex-Algorithm.
[0132] Optionally, the flexible algorithm can be defined by the operator. For a free combination of metric-type, calc-type, and link constraints. For example, the device assigns different prefix segment identifiers (prefix-SID) for each Flex-Algo definition (where one flexible-algorithm id can correspond to one or more prefix-ids), generates different adjacent segment identifiers (adj-SID) for different sub-interfaces, and is used to generate forwarding table entries for different flexible algorithms. In addition, each flexible algorithm can be an algorithm with defined constraints, and each device supporting SR capabilities needs to assign different prefix-Sids for this algorithm. Different prefix-Sids can be used to distinguish the forwarding paths calculated by different Flex-Algo algorithms during data forwarding.
[0133] Optionally, when calculating the reachability to other nodes or prefixes, the router may select different algorithms. Different Flex-Algorithm algorithms are assigned to different Prefix-SIDs here. That is, the node assigns different Prefix-SIDs for each Flex-Algo definition. Specifically, it can be defined in the Figure 2a FAD Sub-TLV shown as Figure 2bThe Prefix-SID sub-TLV shown above.
[0134] (9) Network slicing. Network slicing can be customized for services. For example, low-latency slicing can be customized for services with latency requirements, and high-bandwidth slicing can be customized for services with bandwidth requirements. Network slicing requires that the service packets of each slice can only use the forwarding resources of that slice and be forwarded within the topology of that slice, so as to achieve resource isolation for different services.
[0135] Exemplarily, the 5G system is expected to be able to provide different customized optimization capabilities for different services simultaneously. Logically isolated network partition (LINP) becomes a key concept to achieve this goal. A network slice means "in a physical network, organizing relevant service functions and network resources together to form a complete, autonomous, and independently operated logical network to meet specific user and service requirements" (3GPP). For example, one network slice provides video services, one network slice provides M2M services, and one slice provides ultra-low latency (e.g., less than 1 millisecond) autonomous driving services, etc.
[0136] Optionally, network slicing can be implemented based on a flexible algorithm. Use the Flex-Algorithm ID as the identifier for each slice, and one Flex-Algorithm ID represents one network slice. Among all devices in the domain where Flex-Algorithm floods, all nodes that meet the constraint conditions of the Flex-Algorithm algorithm automatically form the topology of the Flex-Algorithm, that is, each slice has its own independent topology. Each node in the topology of the slice calculates the forwarding path based on the constraint conditions defined by the Flex-Algorithm and generates a forwarding table for that slice.
[0137] (10) End-to-end 1588 time synchronization mechanism.
[0138] Among them, the Institute of Electrical and Electronics Engineers (IEEE) 1588 protocol standard defines a message-based synchronization protocol in the technical specifications. By periodically sending packets with timestamps, the time of each node in the network is corrected, so as to achieve the time synchronization of the entire network. Among them, the IEEE 1588 protocol standard can be abbreviated as the Precision Time Protocol (PTP).
[0139] In addition, the International Telecommunication Union - Telecommunication Standardization Sector (ITU-T) has defined a carrier-grade partial network precise time synchronization protocol (such as G.8275.2) based on the 1588v2 protocol, namely end-to-end 1588 time synchronization.
[0140] In addition, 1588 Adaptive Time Recovery (ATR) can further enhance 1588v2.
[0141] Exemplarily, as Figure 3a shown, 1588 ATR can cross devices that do not support the 1588v2 protocol and traverse a third-party network, enabling 1588 packets to be transmitted in a 1588 unaware network. For example, after unicast negotiation between client (Client1 and Client2) nodes and a server (Server) node, the master-slave relationship is determined and 1588 ATR time synchronization is performed, with the client synchronizing to the server. This process can adopt the L3 unicast mode and UDP packet encapsulation. It has a dual-server primary and backup protection mechanism, and the best master clock algorithm (BMC or BMCA) is used to select the server node after unicast negotiation.
[0142] (11) The BMC algorithm can be applicable to BC devices, OC devices, etc. Among them, 1588 can use the BMC algorithm to determine the PTP synchronization path.
[0143] Specifically, BMC is one of the core technologies of IEEE1588. Before performing clock synchronization, each device in the network can determine the master-slave tracking relationship of the entire domain. The device selects the master clock in the system by running the BMC algorithm, and all other clocks use the master clock as a reference for clock synchronization, so that the clocks and times of the entire network are synchronized.
[0144] In addition, BMC can be a method that relies on the gradual transmission of packets between devices and selects the source based on the hop count information in the packets. BMC runs independently on each device, and the 1588 function of the device can be enabled through network management without the need for other data interaction between the network management and the device. From a network perspective, the BMC algorithm establishes a master-slave synchronization system for the entire network's clocks, that is, a tree with the reference clock (which can be called the grandmaster clock, abbreviated as grandmaster or GM) as the root, where the grandmaster is the best clock source for the entire network.
[0145] Optionally, the node where the GM is located can be called a building integrated timing system (BITS).
[0146] In addition, the BMC algorithm process maintains a set of port data sets for each port of the device, and determines the best clock and the master-slave relationship through the data set comparison algorithm and the state decision algorithm. The data set can include information of the master clock, such as one or more items of information such as ID, priority, category, accuracy, offset change, etc. Moreover, OC / BC devices within the clock domain send Announce messages to each other to announce the parameters of the grandmaster clock determined by this device; the devices that receive the Announce message respectively run the BMC algorithm, compare the priorities of the port best messages (denoted as Erbest) reported by each port, and the best one is the best message of this port (denoted as Ebest); then, calculate the port recommended state, compare Ebest and defaultDS between ports to determine the master-slave state of each port, so as to determine the master-slave system of the entire domain. So that the finally selected grandmaster clock device is used as the best clock of this time domain, and at the same time determine the master-slave relationship of each device, and generate the PTP path.
[0147] Optionally, BMC runs independently on each device. Only the network management needs to enable the 1588 function of the device, and there is no need for other data interaction between the network management and the device.
[0148] Optionally, BMC selects the port with the shortest path from all ports of the device as the Slave port. The shorter the path, the higher the performance, but the more ports are enabled, the lower the BMC operation efficiency and the more prone to anomalies.
[0149] Optionally, for two paths with the same number of hops, select the path with the smallest ID as the Slave port.
[0150] Optionally, each device can only see adjacent nodes and cannot see the global view.
[0151] Exemplarily, Figure 3b a network-level source selection schematic diagram is given. In the figure, M represents that the port status is Master, S represents that the port status is Slave, and P represents that the port status is Passive. In other words, based on the implementation process of the BMC algorithm, each node can determine the port status of its own port. For example, Figure 3b the BC-1 device in can determine that the port statuses of its four ports are S / M / M / M respectively. Another example is that the BC-6 device can determine that the port statuses of its three ports are P / S / P respectively.
[0152] Exemplarily,Figure 3c The device source selection flowchart is given, and the source selection process is as follows.
[0153] Step 1. Calculate Erbest, that is, select the dataset with the shortest path according to the dataset comparison algorithm (DCA) from the datasets received by each port.
[0154] Step 2. Calculate Ebest, that is, select the shortest path Ebest from the Erbest of all ports according to the DCA algorithm.
[0155] Step 3. Calculate the port status, that is, determine the port status according to the state decision algorithm (SDA) (that is, determine the port status as M / S / P).
[0156] Step 4. Send down the port status, that is, send down the status of each port of the device.
[0157] Next, the scenarios that may be involved in the embodiments of the present application are introduced.
[0158] In a communication network, a network running the precision time protocol (PTP) can be called a PTP domain. The node types in the PTP domain include, but are not limited to, ordinary clock (OC) nodes, boundary clock (BC) nodes, transparent clock (TC) nodes, and hybrid nodes (such as nodes with both TC and BC functions, simply referred to as BC+TC nodes).
[0159] Among the nodes in the PTP domain, there are server nodes and client nodes. The server node and the client node are connected through several TC nodes in the PTP domain. The clock message is forwarded hop by hop through several TC nodes to complete the clock synchronization process between the server node and the client node.
[0160] The reliability of the way of transmitting clock messages by only one path (including specific several TC nodes) between the server node and the client node is poor.
[0161] In view of this, the embodiments of the present application provide a clock synchronization method and related devices for improving the stability of clock synchronization. Please refer to Figure 4a , Figure 4a which is a schematic flowchart of a clock synchronization method in the embodiments of the present application. As Figure 4aAs shown in the figure, the clock synchronization system includes M + 1 nodes. The M + 1 nodes at least include a server node and a client node, where M is an integer greater than 1. Exemplarily, the clock synchronization system can be a 1588 system, a 1588v2 system, or a PTP system. Optionally, the M + 1 nodes further include several TC nodes. The clock synchronization method of the embodiments of the present application is applied to the first node in the clock synchronization system, where the first node is the node in the clock synchronization system that executes the clock synchronization method of the embodiments of the present application. Optionally, the clock synchronization method of the embodiments of the present application is applied to all nodes in the clock synchronization system, that is, each node in the clock synchronization system belongs to the first node exemplified in the embodiments of the present application. In the embodiments of the present application, a node is a communication entity for sending signals, or receiving signals, or sending and receiving signals. Optionally, the communication entity can be a router, a switch, a virtual switch, a virtual router, or a smart network card, etc. Optionally, each node in the clock synchronization system can execute the clock synchronization process through the PTP protocol. In this scenario, the clock synchronization system can also be referred to as a PTP domain.
[0162] It should be understood that Figure 4a in the following, the first node is taken as an example of the execution subject of the clock synchronization method to illustrate the method, but the present application does not limit the execution subject of this interaction illustration. For example, Figure 4a the first node in the following can also be a chip, a chip system, or a processor that supports the first node to implement this method, and can also be a logical node, a logical module, or software that can implement all or part of the functions of the first node. As Figure 4a shown in the figure, the clock synchronization method in the embodiments of the present application includes, but is not limited to, steps 101 to 102.
[0163] 101. The first node obtains a clock message.
[0164] The clock messages exemplified in the embodiments of the present application include, but are not limited to, Sync messages, Delay_Req messages, Pdelay_Req messages, Pdelay_Resp messages, Signaling messages, and grant messages. The clock messages (such as Sync messages) in the embodiments of the present application can use the server node as the source node and the client node as the destination node, or the clock messages (such as signaling messages) can use the client node as the source node and the server node as the destination node. The source node sends the clock message, and after being forwarded by several nodes (such as TC nodes) in the clock synchronization system, it reaches the destination node.
[0165] The clock synchronization method of the embodiments of the present application can be applied to at least one of the server node, the client node, and the TC node in the clock synchronization system. Exemplarily, please refer to Figure 5 ,Figure 5 This is a schematic diagram of a possible application scenario of the clock synchronization method according to an embodiment of the present application. As Figure 5 shown, there are M + 1 nodes in the clock synchronization system, including 2 BC nodes (i.e., Figure 5 BC1 and BC2 in Figure 5 ), multiple TC nodes (i.e.,
[0166] TC1 to TC8 in Figure 5 ) and 2 hybrid nodes (nodes integrating BC and TC functions). Therefore, in this example, the clock synchronization system includes a total of 12 nodes, that is, M = 11. Optionally, the server nodes and client nodes in the clock synchronization system can be configured according to the networking requirements. Figure 5 In the example of
[0167] , the BC nodes (i.e., Figure 5 BC1 and BC2 in
[0168] ) act as server nodes (server) in the clock synchronization system and are used to send clock messages to client nodes (client). In practical applications, a server node (such as server1) can serve one or more client nodes (such as client1 and client2), that is, the server node (server) can send clock messages to one or more client nodes (client1 and client2). And the server node (server) itself can also track an external clock source (such as BITS).
[0169] In practical applications, a server node can act as a TC node on the transmission path between another server node and a client node to forward the clock messages sent by the other server node; alternatively, a client node can act as a TC node on the transmission path between a server node and another client node to forward the clock messages sent by the server node to the other client node. It can be seen that a node supports multiple roles simultaneously (such as TC + server, or TC + client). The clock synchronization method in the embodiments of this application only describes the clock synchronization process between the client node and at least one server node it tracks from the perspective of the client node.
[0170] Optionally, for other server nodes not tracked by the client node in the clock synchronization system, they are not described as server nodes in the above clock synchronization process. Similarly, the clock synchronization method in the embodiments of this application is also applicable to the clock synchronization process between other client nodes and the server nodes they track.
[0171] Exemplarily, taking Figure 4b the scenario shown as an example, if the first node is a server node (i.e., the clock synchronization method in the embodiments of this application is applied to the server node), the first node can receive clock messages from the building integrated timing system (BITS), or the first node can act as a grandmaster clock (GM) to generate clock messages. Then step 102 is executed: sending the clock messages to the target next hop according to the routing table.
[0172] Exemplarily, taking Figure 4c the scenario shown as an example, if the first node is a TC node (i.e., the clock synchronization method in the embodiments of this application is applied to the TC node), then the first node can receive clock messages from the server node (i.e., the TC node is the slave clock of the server node), or the first node receives clock messages from other nodes (such as another TC node). Then step 102 is executed: sending the clock messages to the target next hop according to the routing table.
[0173] Exemplarily, taking Figure 4d the scenario shown as an example, if the first node is a client node (i.e., the clock synchronization method in the embodiments of this application is applied to the client node), the first node can generate clock messages (such as Signaling messages), and then step 102 is executed: sending the clock messages to the target next hop according to the routing table.
[0174] 102. Send the clock message to the target next hop according to the routing table.
[0175] In the clock synchronization system according to the embodiments of the present application, there are multiple paths for transmitting clock messages between the server node and the client node. Among them, the first node is the node on N paths. In other words, the first node can sense the N paths between the server node and the client node. Specifically, in the first node, a routing table is stored. The routing table includes N routing entries, and P of the N routing entries correspond to the first destination node, where the first destination node may be the server node and / or the client node. Each of the N routing entries indicates that the next hop is a node in the clock synchronization system (M + 1 nodes). N is an integer greater than 1. After the first node obtains the clock message, it matches the clock message with the N routing entries in the routing table. Thereby, the target next hop is determined, where the target next hop is the node indicated by the routing entry that matches the clock message among the N routing entries.
[0176] If the first node is the server node (that is, the clock synchronization method in the embodiments of the present application is applied to the server node), then in the routing table of the server node, N is equal to P, and the N routing entries correspond to the first destination node, and the first destination node is the client node. That is, the clock message sent by the server node can reach the client node through N paths. After the server node obtains the clock message, since the N routing entries of the server node respectively indicate a target next hop, the server node can send the clock message to the N target next hops indicated by the N routing entries, so as to transmit the clock message to the client node through N paths simultaneously.
[0177] If the first node is the client node (that is, the clock synchronization method in the embodiments of the present application is applied to the client node), then in the routing table of the client node, N is equal to P, and the N routing entries correspond to the first destination node, and the first destination node is the server node. That is, the clock message sent by the client node can reach the server node through N paths. After the client node obtains the clock message, since the N routing entries of the client node respectively indicate a target next hop, the client node can send the clock message to the N target next hops indicated by the N routing entries, so as to transmit the clock message to the server node through N paths simultaneously.
[0178] In a possible implementation, the clock message includes N messages, and the target next hop includes N next hops. Then, the server node or the client node sends N messages to the N next hops respectively according to the routing table, where each of the N messages is transmitted through one of the N next hops.
[0179] In a possible implementation, during the clock synchronization process of the client node, the number of server nodes is greater than 1, that is, the client node simultaneously tracks multiple server nodes. The client node can receive clock messages from multiple server nodes and can also send clock messages to multiple server nodes. Specifically, the TC node can receive multiple clock messages from different server nodes and destined for the same client node (such as the first destination node or the second destination node), and then send the multiple clock messages to each next hop indicated by the local routing table. On the other hand, the routing table of the client node or the TC node can use multiple server nodes as destination nodes, then the client node or the TC node can obtain multiple clock messages respectively destined for multiple server nodes and deliver the multiple clock messages to each next hop indicated by the local routing table.
[0180] The client node simultaneously tracks multiple server nodes, so that when a certain server node fails, the client node can still receive clock messages through other server nodes, improving the stability and success rate of clock synchronization, and also improving the disaster tolerance of the clock synchronization system.
[0181] If the first node is a TC node (that is, the clock synchronization method in the embodiment of the present application is applied to the TC node in the clock synchronization system), then the TC node is a forwarding node on N paths between the server node and the client node. The N paths include several paths for the clock message to reach the client node from the server node, and / or several paths for the clock message to reach the server node from the client node. The TC node can deliver the clock message from the server node (source node) to the client node (destination node); or, it can also deliver the clock message from the client node (source node) to the server node (destination node). In the routing table of the TC node, the N routing table entries of the TC node include P routing table entries corresponding to the first destination node and Q routing table entries corresponding to the second destination node, that is, N = P + Q. The first destination node is the client node and the second destination node is the server node, or, the first destination node is the server node and the second destination node is the client node. Optionally, the nodes on the path for the clock message to reach the client node from the server node are the same as those on the path for the clock message to reach the server node from the client node. Therefore, among the N routing table entries of the TC node, the number of routing table entries corresponding to the first destination node is the same as the number of routing table entries corresponding to the second destination node, that is, P = Q.
[0182] In the embodiment of the present application, since the clock message can be transmitted between the server node and the client node through multiple paths, the reliability during the transmission of the clock message is improved, thereby improving the stability and success rate of the clock synchronization process, and also improving the disaster tolerance of the clock synchronization system.
[0183] Exemplarily, in practical applications, if a certain path fails, the clock message can still be transmitted between the server node and the client node through other paths.
[0184] In the embodiment of the present application, after receiving the clock message, the first node matches the clock message with N routing entries in the first node, and then sends the clock message to the next hop indicated by the matching result. In a possible implementation, if the first destination node is configured with P IP addresses, different paths between the server node and the client node can be distinguished by different IP addresses of the first destination node. At this time, among the P routing entries of the first node, each routing entry corresponds to one of the P IP addresses respectively. In other words, the P routing entries of the first node correspond to different destination addresses respectively. After the first node obtains the clock message, it determines the target routing entry in the routing table, where the IP address of the first destination node corresponding to the target routing entry matches the destination address of the clock message. Then, the first node sends the clock message to the target next hop indicated by the target routing entry. The destination address field of the clock message is set to the IP address of the destination node, so as to distinguish the transmission paths of the clock messages through different destination addresses of the clock messages, without modifying or expanding the message format of the clock messages, thereby improving the transmission efficiency of the clock messages.
[0185] Optionally, in practical applications, the IP addresses of the server node and the client node can be configured as loopback addresses.
[0186] Exemplarily, Table 1 shows a schematic diagram of a possible routing table in the first node.
[0187] First destination node Next hop Client node (loopback address 1) CT node 1 Client node (loopback address 2) CT node 2 Client node (loopback address 3) CT node 3
[0188] Table 1
[0189] In the example of Table 1, the client node is configured with 3 loopback addresses (loopback address 1, loopback address 2, and loopback address 3). Among the 3 routing entries of the routing table stored in the first node, the next hop indicated by loopback address 1 of the client node is CT node 1, the next hop indicated by loopback address 2 of the client node is CT node 2, and the next hop indicated by loopback address 3 of the client node is CT node 3. At this time, if the destination address in the clock message is loopback address 2 of the client node, the target next hop is CT node 2.
[0190] In a possible implementation, the same IP address is configured for the first destination node, and different paths between the server node and the client node can be distinguished by different path identifiers. That is, each path between the server node and the client node corresponds to a path identifier. At this time, each routing table entry in the routing table corresponds to a path identifier, which is used to indicate that the routing table entry is the routing table entry of a specific path. The clock message carries a path identifier. After the first node obtains the clock message, it determines the target routing table entry in the routing table, where the path identifier corresponding to the target routing table entry matches the path identifier of the clock message. Then, the first node sends the clock message to the target next hop indicated by the target routing table entry. By using different path identifiers to distinguish the transmission paths of the clock messages, it is not necessary to configure multiple second IP addresses for the destination node, thereby improving the management efficiency of the client node.
[0191] Exemplarily, Table 2 shows a schematic diagram of another possible routing table in the first node.
[0192] First destination node Path identifier Next hop Client node Path identifier 1 CT node 1 Client node Path identifier 2 CT node 2 Client node Path identifier 3 CT node 3
[0193] Table 2
[0194] In the example of Table 2, different path identifiers are configured for different paths between the server node and the client node. Among the three routing table entries of the routing table stored in the first node, it is indicated that for the path corresponding to path identifier 1 between the server node and the client node, the next hop is CT node 1; for the path corresponding to path identifier 2, the next hop is CT node 2; and for the path corresponding to path identifier 3, the next hop is CT node 3. At this time, if the path identifier carried in the clock message is path identifier 3, the target next hop is CT node 3.
[0195] As can be seen from the above, in the embodiments of the present application, different paths between the server node and the client node can be distinguished by configuring different source addresses and destination addresses, or by configuring different path identifiers for different paths. In the embodiments of the present application, the IP address of the server node is defined as the first IP address, and the IP address of the client node is defined as the second IP address. Next, the following two differentiation schemes (Scheme A and Scheme B) will be introduced respectively.
[0196] Scheme A: Configure different source addresses and destination addresses to distinguish N paths between the server node and the client node.
[0197] Please refer to Figure 6 , Figure 6 which is a schematic flowchart for calculating N paths between the server node and the client node in the embodiments of the present application. As Figure 6As shown, a process for calculating N paths between a computing server node and a client node includes steps 201 to 205.
[0198] 201. The client node and the server node are respectively configured with multiple different IP addresses.
[0199] Through pre-configuration, the server node corresponds to multiple first IP addresses, and the client node corresponds to multiple second IP addresses. Among them, each first IP address corresponds to a priority, and each second IP address corresponds to a priority. Then, for the paths calculated subsequently between the server node and the client node, the first IP address and the second IP address with the same priority can be used as the source address and the destination address respectively, or the second IP address and the first IP address with the same priority can be used as the source address and the destination address respectively.
[0200] Optionally, the TC node (excluding the hybrid node of BC + TC) in the clock synchronization system can be configured with only one IP address.
[0201] 202. Flood the announcement information among M + 1 nodes in the clock synchronization system.
[0202] Among the M + 1 nodes in the clock synchronization system, each node floods its announcement information to other nodes in the clock synchronization system. Therefore, a single node (the first node) among the M + 1 nodes receives M announcement information from the other M nodes in the clock synchronization system, where each announcement information comes from a different node other than the first node itself. The first node determines N paths between the server node and the client node based on the M announcement information from the other M nodes. After the first node calculates the N paths, it can build a routing table based on the N paths. The routing table includes N routing table entries with the client node or the server node as the destination node. Among them, the next hop of the first node on each of the above paths is the next hop indicated by a routing table entry in the routing table.
[0203] Similarly, the first node also sends the announcement information of the first node to the other M nodes in the clock synchronization system so that the other M nodes can determine N paths between the server node and the client node based on the announcement information of the first node and build the routing tables local to each node.
[0204] In a possible implementation, the M advertisement messages received by the first node include M prefix messages from M nodes. Each of the prefix messages comes from a respective node, and the prefix message includes the IP address of the node in the clock synchronization system. In other words, among the M + 1 nodes of the clock synchronization system, each node floods its prefix message to the other nodes in the clock synchronization system. Similarly, the first node sends the advertisement message of the first node to the other M nodes, and the advertisement message of the first node includes the prefix message of the first node.
[0205] Since the server node corresponds to multiple first IP addresses and the client node corresponds to multiple second IP addresses, each first IP address of the server node is configured with a priority, and each second IP address of the client node is configured with a priority. Then, the prefix message of the server node includes the multiple first IP addresses of the server node and the priorities of the multiple first IP addresses, with each first IP address corresponding to a respective priority, and the prefix message of the client node includes the multiple second IP addresses of the client node and the priorities of the multiple second IP addresses, with each second IP address corresponding to a respective priority. When calculating the path between the server node and the client node, each node uses the first IP address and the second IP address belonging to the same priority as the source address and the destination address of the path respectively, or uses the second IP address and the first IP address belonging to the same priority as the source address and the destination address of the path respectively.
[0206] Optionally, among the M+1 nodes of the clock synchronization system, the advertisement information of any node can be carried in a link state packet (LSP) message of the intermediate system to intermediate system (IS-IS) protocol, or the advertisement information of any node is carried in a link state advertisement (LSA) message of the open shortest path first (OSPF) protocol, or the advertisement information of any node is carried in a node network layer reachable information (NodeNLRI) message of the border gateway protocol (BGP) protocol, or the advertisement information of any node is carried in a link network layer reachable information (Link NLRI) message of the BGP protocol, or the advertisement information of any node can also be carried in other network protocol messages, and the embodiments of the present application do not limit this. In practical applications, since the clock synchronization system often includes a relatively large number of nodes, multiple different network layer protocols may be running between these nodes (for example, both the BGP protocol and the OSPF protocol are running in the clock synchronization system) to complete communication. For example, between the nodes in the core layer and the aggregation layer of the clock synchronization system, communication is carried out through the BGP protocol, while between the nodes in the aggregation layer, communication is carried out through the OSPF protocol. Therefore, between the M+1 nodes of the clock synchronization system, their prefix information can be transmitted through different network protocol messages (such as the LSP message of the IS-IS protocol, the LSA message of the OSPF protocol, the Node NLRI message of the BGP protocol, and / or the Link NLRI message of the BGP protocol).
[0207] For ease of understanding, in the embodiments of the present application, taking the advertisement information of the node being carried in the LSP message of the IS-IS protocol as an example, an exemplary introduction is made.
[0208] Please refer to Figure 7 , Figure 7 which is a schematic diagram of a possible message structure of the prefix information of the node in the embodiments of the present application. As Figure 7As shown, in the scenario of Segment Routing MPLS (SR-MPLS) based on a multi-protocol label switching forwarding plane, the type length value (TLV) with type = 135 in the LSP message of the IS-IS protocol is an Extended IP reachability TLV. A node can carry a sub-TLV with type = 3 in this Extended IP reachability TLV, that is, a prefix-SID Sub-TLV. Among them, in Figure 7 In the shown prefix-SID Sub-TLV example, the value of the "type" field is 3, the value of the "length" field is the length of the prefix-SID Sub-TLV, the value of the "Algorithm" field is the identifier of the clock network sharding in the embodiments of the present application, and the value of the "Segment identifier / Index / Label (variable)" field, that is, the "SID / Index / Label (variable)" field, is an IP address (or loopback address) of a node. Since the server node corresponds to N first IP addresses, therefore, in the LSP message sent by the server node, N prefix-SID Sub-TLVs as shown in Figure 7 can be carried. The "SID / Index / Label (variable)" field in each prefix-SID Sub-TLV published by the server node is used to carry a first IP address of the server node. Similarly, since the client node corresponds to N second IP addresses, therefore, in the LSP message sent by the client node, N prefix-SID Sub-TLVs as shown in Figure 7 can be carried. The "SID / Index / Label (variable)" field in each prefix-SID Sub-TLV published by the client node is used to carry a second IP address of the client node.
[0209] Furthermore, since the prefix information of the server node includes multiple first IP addresses of the server node and the priorities of the multiple first IP addresses, and the prefix information of the client node includes multiple second IP addresses of the client node and the priorities of the multiple second IP addresses, therefore, Figure 7 priority information should be carried in each prefix-SID Sub-TLV of the server node or the client node shown in Figure 8 . Please refer to Figure 8 which is another possible schematic diagram of the message structure of the prefix information of the node in the embodiments of the present application. As shown in Figure 8As shown, a sub-TLV can be carried in each prefix-SID Sub-TLV, and this sub-TLV is used to carry priority information. Specifically, in the Figure 8 "Priority" field of the sub-TLV shown, the priorities of the IP addresses (the first IP address and the second IP address) in this prefix-SID Sub-TLV are indicated.
[0210] The above Prefix SID is a prefix identifier used to identify nodes in a network. In practical applications, the specific implementation and format of the Prefix SID may vary depending on different devices and operating systems. Therefore, it is necessary to configure and transmit the Prefix SID according to the device and protocol specifications in the actual scenario.
[0211] In the embodiments of this application, among the M + 1 nodes of the clock synchronization system, at least one node can send routing algorithm information to other nodes in the clock synchronization system, and the routing algorithm information is carried in the advertisement information of this node, that is, the advertisement information of this node includes the routing algorithm information. In other words, among the M + 1 advertisement information of the M + 1 nodes, at least one advertisement information includes the routing algorithm information. Among them, the routing algorithm information indicates the routing algorithm used to determine N paths. After receiving the routing algorithm information, other nodes calculate the N paths between the server node and the client node according to the routing algorithm indicated by the routing algorithm information. In practical applications, the routing algorithm information can be sent by one or more nodes (or can be all nodes) among the M + 1 nodes of the clock synchronization system. Specifically, the role responsible for sending the routing algorithm information is not limited to the server node, the client node or the TC node, that is, the routing algorithm information can be carried in the advertisement information of the server node, can also be carried in the advertisement information of the client node, or can also be carried in the advertisement information of the TC node.
[0212] Optionally, at least one of the M advertisement information received by the first node includes the routing algorithm information. This routing algorithm information is carried in the advertisement information of at least one of the above M nodes.
[0213] Optionally, the advertisement information of the first node sent by the first node to the other M nodes includes the routing algorithm information and the prefix information of the first node.
[0214] Through the above method, the routing algorithm information is flooded hop by hop through the M + 1 nodes in the clock synchronization system. After the M + 1 nodes in the clock synchronization system receive the routing algorithm information, they can calculate the N paths between the server node and the client node based on the same routing algorithm, so that the paths calculated by the M + 1 nodes in the clock synchronization system are consistent.
[0215] Please refer to Figure 9 , Figure 9 which is a schematic diagram of a possible message structure for the routing algorithm information in the embodiments of the present application. In the example of Figure 9 , an extended FAD Sub TLV is used as the routing algorithm information in the embodiments of the present application. The routing algorithm for determining N paths between the server node and the client node is defined in the FAD Sub TLV. Specifically, in accordance with the provisions of RFC7981, the FAD Sub-TLV can be carried in the LSP message with Value = 26.
[0216] 203. Each node in the clock synchronization system constructs an LSDB.
[0217] Among the M + 1 nodes of the clock synchronization system, each node has received M prefix information of the other M nodes (for example, carried in the LSP message). The node stores the M prefix information of the other M nodes in the LSDB, and the data in the LSDB is used by the node to determine the topological structure of the M + 1 nodes of the clock synchronization system.
[0218] 204. Each node calculates N paths between the server node and the client node.
[0219] The M + 1 nodes of the clock synchronization system calculate N paths between the server node and the client node according to the routing algorithm indicated by the routing algorithm information. Among them, each path uses a first IP address and a second IP address as the source address and the destination address respectively, or each path uses a second IP address and a first IP address as the source address and the destination address respectively.
[0220] In a possible implementation, the routing algorithm indicated in the routing algorithm information may specifically include: using the Shortest Path First (SPF) algorithm to calculate the shortest path between the server and the client node as the path with the highest priority (the main path), and then using the Maximally Redundant Tree (MRT) algorithm to calculate the remaining N - 1 paths. Taking the maximum separation degree between the N paths as the goal, the N paths are calculated. Thus, it is possible to avoid as much as possible that all N paths pass through the same node, so that when a certain node fails, the clock message can still be forwarded through other nodes, improving the stability and success rate of clock synchronization, and also improving the disaster tolerance ability of the clock synchronization system.
[0221] The Maximally Redundant Tree (MRT) refers to a pair of trees where the paths from a node to the root along the first tree and from the same node to the root along the second tree share the minimum number of nodes and the minimum number of links. Only when there are cut edges or cut points in the graph (a cut edge and a cut point mean that removing the link or the node will result in a situation where two points are unreachable in the topology), there will be duplicate edges or points in these two trees. The low point algorithm is used to calculate the maximally redundant tree, and the algorithm complexity is O(e + n log n); alternatively, an MRT generation algorithm based on Breadth First Search (BFS) and Depth First Search (DFS) can also be used, and the algorithm has a linear complexity.
[0222] In a possible implementation, the routing algorithms indicated in the routing algorithm information may specifically include: using the SPF algorithm to calculate the shortest path between the server and the client node as the path with the highest priority (the primary path), and then using the K Shortest Path (KSP) algorithm to calculate the remaining N - 1 paths.
[0223] As can be seen from the above, among the M + 1 nodes of the clock synchronization system, since each node obtains the prefix information of other nodes, the topological structure of the M + 1 nodes of the clock synchronization system is determined. Then, based on the same routing algorithm and the same topological structure, the results of the paths calculated by each node are also the same. Among them, the M + 1 nodes of the clock synchronization system refer to the nodes that have the ability to execute the clock synchronization method of this application. If the clock synchronization system also includes other nodes that cannot support the ability of this application's clock synchronization method, then when calculating the paths, these nodes that cannot support the clock synchronization method of this application are ignored and excluded.
[0224] Exemplarily, each node calculates the path tree from the server node to other nodes of the clock synchronization system with each first IP address of the server node as the root. Each first IP address corresponds to a path tree. Therefore, N path trees can be calculated. In each path tree, the path from the root node (the first IP address of the server node) to the second IP address of the client node is the path for the clock message to be transmitted from the first IP address of the server node to the second IP address of the client node. Then, calculate the reverse tree of this path tree, and through this reverse tree, obtain the path for the clock message to be transmitted from the second IP address of the client node to the first IP address of the server node.
[0225] Exemplarily, each node may also calculate N path trees from the IP address of this node as the root to the IP addresses of other nodes (including N first IP addresses or second IP addresses). Each path tree includes the path for the clock message to be transmitted from the first IP address of the server node to the second IP address of the client node, and the path for the clock message to be transmitted from the second IP address of the client node to the first IP address of the server node.
[0226] Please refer to Figure 10 , Figure 10 which is a possible schematic diagram of N paths in the embodiments of this application. In Figure 10 the example shown, the clock synchronization system includes two server nodes (server0 and server1), two client nodes (client5 and client6), and three TC nodes (TC2, TC3, and TC4). Among them, server0 is the primary server node tracked by client5 and client6, and server0 corresponds to a first IP address with the highest priority (priority = 1); server1 is the standby server node tracked by client5 and client6, and server1 corresponds to two first IP addresses with lower priorities (priority = 2 and priority = 3); client5 corresponds to 3 second IP addresses with priorities (priority = 1, priority = 2, and priority = 3); client6 corresponds to 3 second IP addresses with priorities (priority = 1, priority = 2, and priority = 3). In practical applications, the primary server nodes tracked by different client nodes may be the same or may not be the same, and specific details are not limited here.
[0227] Through step 204, each computing node can calculate the path tree as shown in Figure 10 . In Figure 10 the example shown, there are three paths between the client node and the two server nodes: Path 1, Path 2, and Path 3. Among them, Figure 10 Path 1 is represented by a solid straight line for direct connection, Path 2 is represented by a dashed straight line for direct connection, and Path 3 is represented by a curved straight line.
[0228] 205. Each node generates a routing table.
[0229] Each node generates a routing table according to the information in the LSDB and the result of route calculation.
[0230] Exemplarily, Table 3 is Figure 10 a schematic diagram of a possible routing table in server0 in the example shown.
[0231] Destination node Next hop client5, priority = 1 CT2 client6, priority = 1 CT2
[0232] Table 3
[0233] Exemplarily, Table 4 is Figure 10 In the example shown, a schematic diagram of a possible routing table in server1.
[0234] Destination node Next hop client5, priority = 2 CT2 Client6, priority = 2 CT2 client5, priority = 3 CT5 Client6, priority = 3 CT5
[0235] Table 4
[0236] As shown in the routing table entries in Table 3 and Table 4, the server0 node generates the routing next hop to the second IP address of the client nodes (including client5 and client6) with priority = 1 according to the shortest path tree of the main path tree; the server1 node generates the routing next hop to the second IP address of the client nodes (including client5 and client6) with priority = 2 according to the first backup path tree; the server1 generates the routing next hop to the second IP address of the client nodes (including client5 and client6) with priority = 3 according to the second backup path tree.
[0237] The Client nodes (including client5 and client6) generate a routing table according to the information in the LSDB and the routing calculation result. Specifically, the routing next hop to server0 is generated according to the reverse tree of the main path tree; the routing next hop to the first IP address of server1 with priority = 2 is generated according to the reverse tree of the first backup path tree; the routing next hop to the first IP address of server1 with priority = 3 is generated according to the reverse tree of the second backup path tree.
[0238] The intermediate TC node generates the next hops to all IP addresses of server0, server1, client5 and client6 according to the information in the LSDB and the routing calculation result.
[0239] After the routing table is constructed, the clock message can be forwarded according to the next hop indicated by the routing entry in the routing table. In a possible implementation, since there are N paths between the server node and the client node, the clock message can be transmitted on N paths simultaneously. Optionally, the clock message includes N messages. If the first node is the server node, the server node sends N messages to the N target next hops indicated by the N routing entries in the routing table, so that the N messages will be transmitted to the client node through N paths. The client node will receive N messages through N paths. If the first node is the client node, the client node sends N messages to the N target next hops indicated by the N routing entries in the routing table, so that the N messages will be transmitted to the server node through N paths. The server node will receive N messages through N paths.
[0240] In a possible implementation, after the routing table is constructed, the client node first sends the signaling message in the clock message to the server node to complete the connection establishment with the server node. Specifically, the signaling message uses the second IP address of the client node as the source address and the first IP address of the server node as the destination address. The client node uses N second IP addresses and sends signaling messages to the N first IP addresses of the server nodes with the same priority according to the next hop indicated by the routing entry. After receiving the signaling message, the server node uses N first IP addresses and sends the grant message in the clock message to the N second IP addresses of the client nodes with the same priority according to the next hop indicated by the routing entry. Among them, the grant message uses the first IP address of the server node as the source address and the second IP address of the client node as the destination address.
[0241] Take Figure 10 the scenario shown as an example. The client node sends a signaling message with the second IP address of priority = 1 to the first IP address of priority = 1 of server0; the client node sends a signaling message with the second IP address of priority = 2 to the first IP address of priority = 2 of server0; the client node sends a signaling message with the second IP address of priority = 3 to the first IP address of priority = 3 of server0.
[0242] After server0 and server1 receive the signaling message, server0 sends the signaling message to the second IP address with priority = 1 of the client node using the first IP address with priority = 1; server1 sends the signaling message to the second IP address with priority = 2 of the client node using the first IP address with priority = 2; server1 sends the signaling message to the second IP address with priority = 3 of the client node using the first IP address with priority = 3.
[0243] After the connection establishment is completed, the server node sends a clock message (including sync message) to the client node according to the indication of the routing entry in the routing table.
[0244] Solution B: Configure different path identifiers for different paths to distinguish N paths between the server node and the client node.
[0245] Please refer to Figure 11 , Figure 11 which is another schematic flow diagram for calculating N paths between the server node and the client node in the embodiment of the present application. As Figure 11 shown, a process for calculating N paths between the server node and the client node includes steps 301 to 305.
[0246] 301. The client node and the server node are respectively configured with corresponding IP addresses and path identifiers.
[0247] Configure the corresponding first IP address for the server node and the corresponding second IP address for the client node. Among them, only one first IP address needs to be configured for the same server node, and the first IP addresses between different server nodes are different. Similarly, only one second IP address needs to be configured for the same client node, and the first IP addresses between different server nodes are different. And, configure (bind) corresponding N path identifiers for the server node and the client node respectively to indicate that the server node or the client node supports communication on N paths corresponding to the N path identifiers. Then, associate the path identifier corresponding to the server node with the path identifier corresponding to the client node.
[0248] 302. Flood and announce information among M + 1 nodes of the clock synchronization system.
[0249] Among the M + 1 nodes of the clock synchronization system, each node floods its announcement information to other nodes in the clock synchronization system. Therefore, for a single node (the first node) among the M + 1 nodes, it will receive M announcement messages from the other M nodes in the clock synchronization system. Among them, each announcement message comes from a different node other than the node itself (the first node). The first node determines N paths between the server node and the client node based on the M announcement messages from the other M nodes. After the first node calculates the N paths, it can build a routing table based on the N paths. The routing table includes N routing table entries with the client node or the server node as the destination node. Among them, the next hop on each of the above paths for the first node is the next hop indicated by a routing table entry in the routing table.
[0250] Similarly, the first node also sends the announcement information of the first node to the other M nodes in the clock synchronization system so that the other M nodes can determine N paths between the server node and the client node based on the announcement information of the first node and build the routing tables local to each node.
[0251] In a possible implementation, the M announcement messages received by the first node include M prefix messages from the M nodes. Among them, each prefix message comes from a different node, and the prefix message includes the IP address of the node in the clock synchronization system. In other words, among the M + 1 nodes of the clock synchronization system, each node floods its prefix information to other nodes in the clock synchronization system. Similarly, the announcement information of the first node sent by the first node to the other M nodes includes the prefix information of the first node. Among them, the prefix information of the server node includes the first IP address corresponding to the server node, and the prefix information of the client node includes the first IP address corresponding to the client node.
[0252] In a possible implementation, among the M + 1 nodes of the clock synchronization system, at least one node can send routing algorithm information to other nodes in the clock synchronization system. The routing algorithm information is carried in the announcement information of the node, that is, the announcement information of the node includes the routing algorithm information. In other words, among the M + 1 announcement messages of the M + 1 nodes, at least one announcement message includes the routing algorithm information. Among them, the routing algorithm information indicates the routing algorithm used to determine the N paths, and the routing algorithm information includes N path identifiers, and each path identifier corresponds to the priority of the path to be calculated. After receiving the routing algorithm information, other nodes calculate the N paths between the server node and the client node according to the routing algorithm indicated by the routing algorithm information, and each path corresponds to a path identifier in the routing algorithm information.
[0253] In practical applications, the routing algorithm information can be sent by one or more nodes (or can be all nodes) among the M+1 nodes of the clock synchronization system. Specifically, the role responsible for sending the routing algorithm information is not limited to the server node, the client node, or the TC node. That is, the routing algorithm information can be carried in the advertisement information of the server node, can also be carried in the advertisement information of the client node, or can also be carried in the advertisement information of the TC node.
[0254] In Solution B, the prefix information in the advertisement information sent by each node is similar to the prefix information in the aforementioned Solution A. For details, refer to Figure 7 the schematic diagram of the prefix information shown. As Figure 7 shown, in the SR-MPL scenario, the TLV with type=135 in the LSP message of the IS-IS protocol is the Extended IP reachability TLV. Nodes can carry the sub-TLV with type=3, that is, the prefix-SID Sub-TLV, in this Extended IP reachability TLV. Among them, in Figure 7 the prefix-SID Sub-TLV example shown, the value of the "type" field is 3, the value of the "length" field is the length of the prefix-SID Sub-TLV, the value of the "Algorithm" field is the identifier of the clock network sharding in the embodiment of the present application, and the value of the "SID / Index / Label(variable)" field is an IP address (or loopback address) of the node.
[0255] The routing algorithm information in Solution B is similar to the routing algorithm information in the aforementioned Solution A. For details, refer to Figure 9 the schematic diagram of the prefix information shown. In Figure 9 the example, an FAD Sub TLV is extended to be used as the routing algorithm information in the embodiment of the present application. The routing algorithm for determining N paths between the server node and the client node is defined in the FAD Sub TLV. Specifically, in accordance with the provisions of RFC7981, the FAD Sub-TLV can be carried in the LSP message with Value=26.
[0256] Furthermore, the routing algorithm information also includes N path identifiers, and each path identifier corresponds to the priority in one of the N paths. Exemplarily, refer to Figure 12 , Figure 12 which is the schematic diagram of the message structure of the path identifier in the embodiment of the present application. As Figure 12 shown, in the above FAD Sub-TLV, N more such as Figure 12The sub-TLVs shown each carry one of the N path identifiers respectively.
[0257] In the above manner, the routing algorithm information is flooded hop by hop through M + 1 nodes in the clock synchronization system. After receiving the routing algorithm information, the M + 1 nodes in the clock synchronization system can calculate N paths between the server node and the client node based on the same routing algorithm, so that the paths calculated by the M + 1 nodes in the clock synchronization system are consistent.
[0258] 303. Each node in the clock synchronization system constructs an LSDB.
[0259] Among the M + 1 nodes of the clock synchronization system, each node has received M prefix information of the other M nodes (such as carried in the LSP packet). The node stores the M prefix information of the other M nodes in the LSDB, and the data in the LSDB is used for the node to determine the topological structure of the M + 1 nodes of the clock synchronization system.
[0260] 304. Each node calculates N paths between the server node and the client node.
[0261] The M + 1 nodes of the clock synchronization system calculate N paths between the server node and the client node according to the routing algorithm and path identifier indicated by the routing algorithm information. Among them, each path corresponds to a path identifier, and the path identifier indicates the priority of the path.
[0262] As can be seen from the above, among the M + 1 nodes of the clock synchronization system, since each node obtains the prefix information of other nodes, the topological structure of the M + 1 nodes of the clock synchronization system is determined. Then, each node calculates the same result of the path based on the same routing algorithm and the same topological structure. Among them, the M + 1 nodes of the clock synchronization system refer to the nodes with the ability to execute the clock synchronization method of the present application. If there are other nodes in the clock synchronization system that do not support the ability of the clock synchronization method of the present application, then when calculating the path, the above M + 1 nodes will ignore and exclude these nodes that do not support the clock synchronization method of the present application.
[0263] Exemplarily, each node can calculate N path trees from the server node to other nodes with the server node as the root, and each path tree corresponds to a path identifier. In each path tree, the path from the root node (server node) to the client node is one path for the clock message to be transmitted from the server node to the client node. Then, calculate the reverse tree of this path tree, and through this reverse tree, obtain the path for the clock message to be transmitted from the client node to the server node.
[0264] Exemplarily, each node can also calculate N path trees from this node to other nodes with this node as the root, and each path tree corresponds to a path identifier. Each path tree includes one path for the clock message to be transmitted from the server node to the client node and one path for the clock message to be transmitted from the client node to the server node.
[0265] Please refer to Figure 13 , Figure 13 which is another possible schematic diagram of the N paths in the embodiment of the present application. In Figure 13 the example shown, the clock synchronization system includes two server nodes (server0 and server1), two client nodes (client4 and client5), and two TC nodes (TC2 and TC3). Among them, server0 is the primary server node tracked by client4 and client5. Server0 corresponds to path identifier 1, path identifier 2, and path identifier 3, indicating that server0 supports communication on the paths corresponding to path identifier 1, path identifier 2, and path identifier 3; server1 is the standby server node tracked by client4 and client5. Server1 corresponds to path identifier 1, path identifier 2, and path identifier 3, indicating that server1 supports communication on the paths corresponding to path identifier 1, path identifier 2, and path identifier 3; client5 corresponds to path identifier 1, path identifier 2, and path identifier 3, indicating that server1 supports communication on the paths corresponding to path identifier 1, path identifier 2, and path identifier 3; client6 corresponds to path identifier 1, path identifier 2, and path identifier 3, indicating that server1 supports communication on the paths corresponding to path identifier 1, path identifier 2, and path identifier 3. In practical applications, the primary server nodes tracked by different client nodes can be the same or different, and specific details are not limited here.
[0266] Through step 304, each computing node can calculate the path tree as Figure 13 shown. In Figure 13 the example shown, there are three path trees in the clock synchronization system: path tree 1, path tree 2, and path tree 3.
[0267] 305. Each node generates a routing table.
[0268] Each node generates a routing table according to the information in the LSDB and the route calculation result.
[0269] In Figure 13In the example, each node calculates the path tree 1 corresponding to path identifier 1 using the SPF algorithm, and determines the next hop of the node on the path tree 1; each node calculates the path tree 2 corresponding to path identifier 2 and the path tree 3 corresponding to path identifier 3 using the MRT algorithm, and determines the next hop of the node on the path tree 2 and the next hop of the node on the path tree 3.
[0270] Exemplarily, Table 5 is Figure 13 a schematic diagram of a possible routing table in server0 in the example shown.
[0271] Destination node Path identifier Next hop client4 1 TC2 client4 2 TC2 client4 3 Server1 client5 1 TC3 client5 2 TC2 client5 3 Server1 TC2 1 TC2 TC2 2 TC2 TC2 3 Server1 TC3 1 TC3 TC3 2 TC2 TC3 3 Server1 server1 1 Server1 server1 2 TC2 server1 3 Server1
[0272] Table 5
[0273] After the routing table is constructed, the clock message can be forwarded according to the next hop indicated by the routing entry in the routing table. As can be seen from the above, different paths between the server node and the client node can be distinguished by different path identifiers. That is, each path between the server node and the client node corresponds to a path identifier. At this time, each routing entry in the routing table corresponds to a path identifier, which is used to indicate that the routing entry is the routing entry of a specific path. Then the clock message will carry a path identifier. After the first node obtains the clock message, it determines the target routing entry in the routing table, where the path identifier corresponding to the target routing entry matches the path identifier of the clock message. Then, the first node sends the clock message to the target next hop indicated by the target routing entry.
[0274] Please refer to Figure 14 , Figure 14 which is a schematic diagram of a message structure of the clock message in an embodiment of the present application. As Figure 14 shown, in the clock message, a Hop-by-hop Header is carried, and the Hop-by-hop Header is used to carry the corresponding path identifier.
[0275] In a possible implementation, the client node first sends a signaling message in the clock message to the server node to complete the establishment of a connection with the server node. Specifically, the client node sends N signaling messages through N paths according to the indication of the routing table, and each signaling message carries a path identifier. After the server node receives the signaling message, it sends N grant messages through N paths according to the indication of the routing table, and each grant message carries a path identifier.
[0276] After establishing the connection, the server node sends a clock message (including a sync message) carrying a path identifier to the client node according to the indication of the routing entry in the routing table.
[0277] Correspondingly, the embodiments of the present application also provide related devices for implementing the above solutions. Specifically, please refer to Figure 15 , Figure 15 which is a schematic structural diagram of a communication device provided by an embodiment of the present application. The device may be Figure 4a the first node shown in Figure 15 , or a component of the first node (such as a processor, a chip, or a chip system, etc.), or a logical node, a logical module, or software that can implement all or part of the functions of the first node. As shown in
[0278] a transceiver unit 401, configured to obtain a clock message;
[0279] a processing unit 402, configured to send the clock message to the target next hop according to the routing table. The routing table includes N routing entries, and P routing entries among the N routing entries correspond to the first destination node. Each routing entry in the N routing entries indicates that the next hop is one of the M + 1 nodes. N is an integer greater than 1, and the target next hop is the node indicated by the routing entry that matches the clock message among the N routing entries.
[0280] It should be noted that the information interaction, execution process, etc. among the modules / units in the communication device are based on the same concept as the corresponding method embodiments in the present application. For specific content, reference can be made to the description in the method embodiments shown above in the present application, and details will not be repeated here. Figure 4a
[0281] Please refer to Figure 16 , Figure 16 which is a schematic logical structure diagram of a communication device 50 provided by an embodiment of the present application. The communication device 50 may be deployed with Figure 14 the communication device described in the corresponding embodiment, for implementing Figure 4a the functions implemented by the first node in the corresponding embodiment. The communication device 50 includes: a memory 501, a processor 502, a communication interface 503, and a bus 504. Among them, the memory 501, the processor 502, and the communication interface 503 are communicatively connected to each other through the bus 504.
[0282] The memory 501 may be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 501 may store a program. When the program stored in the memory 501 is executed by the processor 502, the processor 502 and the communication interface 503 are used to execute steps 101-102 of the above data processing method embodiments.
[0283] The processor 502 may be a central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), a digital signal processing (DSP), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any combination thereof, and is used to execute relevant programs to implement one or more of steps 101-102 of the data processing method embodiments in the present application. The steps of the data processing method disclosed in the embodiments of the present application may be executed by a compiler and an executor, where the compiler and the executor may be executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read only memory, a programmable read only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 501, and the processor 502 reads the information in the memory 501 and combines its hardware to execute one or more of steps 101-102 of the data processing method embodiments in the present application.
[0284] The communication interface 503 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the communication device 50 and other devices or communication networks.
[0285] The bus 504 can implement a path for transmitting information among various components of the computer device 50 (for example, the memory 501, the processor 502, and the communication interface 503). The bus 504 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 16 only a thick line is used to represent it in Figure 16 , but it does not mean that there is only one bus or one type of bus.
[0286] The embodiment of the present application further provides a computer program product including instructions. The computer program product can be software or a program product including instructions that can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computer device, at least one computer device is caused to execute the method described in the foregoing Figure 4a embodiment.
[0287] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store or a data storage device such as a data center including one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state drive), etc. The computer-readable storage medium includes instructions, and the instructions direct the computing device to execute the method described in the foregoing Figure 4a embodiment.
[0288] The communication device provided by the embodiment of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin, or a circuit, etc. The processing unit can execute computer-executable instructions stored in the storage unit to cause the chip to execute the method described in the foregoing Figure 4a embodiment. Optionally, the storage unit is a storage unit inside the chip, such as a register, a cache, etc. The storage unit can also be a storage unit outside the chip and inside the radio access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0289] It should be further noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in the embodiments of the present application, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
[0290] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments of the present application can be implemented by means of software plus necessary general hardware, and of course, can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for the embodiments of the present application, in more cases, software program implementation is a better implementation method. Based on such an understanding, the technical solutions of the embodiments of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disc of a computer, and includes several instructions for causing a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in the various embodiments of the present application.
[0291] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0292] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center by wired (such as coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
Claims
1. A clock synchronization method, characterized in that, The method is applied to a first node, which is one of the M+1 nodes included in the clock synchronization system. The M+1 nodes include at least a server node and a client node, where M is an integer greater than 1. The method includes: Obtain a clock message; Send the clock message to a target next hop according to a routing table. The routing table includes N routing entries, and P of the N routing entries correspond to a first destination node. Each of the N routing entries indicates that the next hop is one of the M+1 nodes. N is an integer greater than 1, and P is an integer greater than 1. The target next hop is the node indicated by the routing entry that matches the clock message among the N routing entries.
2. The method according to claim 1, wherein The first node is the server node, N is equal to P, and the first destination node is the client node.
3. The method according to claim 1, wherein The first node is the client node, N is equal to P, and the first destination node is the server node.
4. The method according to any one of claims 1 to 3, characterized in that The clock message includes N messages, and the target next hop includes N next hops. Sending the clock message to the target next hop according to the routing table includes: Send the N messages to the N next hops respectively according to the routing table.
5. The method according to claim 1, wherein The first node is a transparent clock (TC) node among the M+1 nodes, N is greater than P, and Q of the N routing entries correspond to a second destination node; The first destination node is the client node and the second destination node is the server node, or the first destination node is the server node and the second destination node is the client node. Q is an integer greater than 1.
6. The method according to claim 3 or 5, characterized in that, The number of server nodes is greater than 1.
7. The method according to any one of claims 1 to 6, characterized in that Before obtaining the clock message, the method further includes: Receive M advertisement messages from the other M nodes in the clock synchronization system except the first node; Determine N paths between the server node and the client node according to the M advertisement messages. The N paths are used to determine the routing table.
8. The method according to claim 7, wherein The M advertisement messages include M prefix information of the M nodes, and each prefix information includes the Internet Protocol (IP) address of the node.
9. The method according to claim 8, wherein At least one of the M advertisement messages includes routing algorithm information, and the routing algorithm information indicates the routing algorithm used to determine the N paths.
10. The method according to claim 9, characterized in that, The server node corresponds to multiple first IP addresses, and the client node corresponds to multiple second IP addresses. The prefix information of the server node includes the multiple first IP addresses and the priorities of the multiple first IP addresses. The prefix information of the client node includes the multiple second IP addresses and the priorities of the multiple second IP addresses; The source address and the destination address of each of the N paths are respectively the first IP address and the second IP address of the same priority, or respectively the second IP address and the first IP address of the same priority.
11. The method according to claim 9, wherein The server node corresponds to a first IP address, the client node corresponds to a second IP address, the prefix information of the server node includes the first IP address, the prefix information of the client node includes the second IP address, and the routing algorithm information further includes N path identifiers, and each of the path identifiers corresponds to the priority of one of the N paths.
12. The method according to any one of claims 7 to 11, characterized in that, The method further includes: Sending advertisement information of the first node, where the advertisement information of the first node is used to determine N paths between the server node and the client node.
13. The method according to claim 12, wherein The advertisement information of the first node includes the prefix information of the first node, and the prefix information of the first node includes the IP address of the first node.
14. The method according to claim 13, wherein The advertisement information of the first node further includes routing algorithm information, and the routing algorithm information is used to indicate a routing algorithm, and the routing algorithm is used to determine the N paths.
15. The method according to claim 9, 10, 11 or 14, characterized in that The routing algorithm information indicates that the shortest path first (SPF) algorithm and the maximum redundancy number (MRT) algorithm are used to determine N paths between the server node and the client node.
16. The method according to claim 9, 10, 11 or 14, characterized in that, The routing algorithm information indicates that the SPF algorithm and the K shortest path (KSP) algorithm are used to determine N paths between the server node and the client node.
17. The method according to any one of claims 1 to 10, characterized in that, The first destination node corresponds to P IP addresses, and each of the P routing table entries in the P routing table entries corresponds to one of the P IP addresses; The target next hop is the next hop indicated by the target routing table entry, and the target routing table entry is the routing table entry in the N routing table entries whose IP address is the same as the destination address of the clock message.
18. The method according to any one of claims 1 to 9 or claim 11, characterized in that Each routing table entry in the routing table corresponds to a path identifier, and the clock message includes the path identifier; The target next hop is the next hop indicated by the target routing table entry, and the target routing table entry is the routing table entry in the N routing table entries whose path identifier is the same as the path identifier of the clock message.
19. The method according to any one of claims 7 to 16, characterized in that, The advertisement information of any one of the nodes is carried in a link state packet (LSP) message of the intermediate system to intermediate system (IS-IS) protocol, a link state advertisement (LSA) message of the open shortest path first (OSPF) protocol, a node network layer reachability information (Node NLRI) message of the border gateway protocol (BGP) protocol, or a link network layer reachability information (Link NLRI) message of the BGP protocol.
20. A communication device, characterized in that, The communication device is applied to one of the M + 1 nodes included in the clock synchronization system. The M + 1 nodes at least include a server node and a client node, M is an integer greater than 1, and the communication device includes: An acquisition unit, configured to acquire a clock message; A transceiver unit, configured to send the clock message to a target next hop according to a routing table, where the routing table includes N routing table entries, P of the N routing table entries correspond to a first destination node, and each of the N routing table entries indicates that the next hop is one of the M + 1 nodes. N is an integer greater than 1, and the target next hop is the node indicated by the routing table entry that matches the clock message among the N routing table entries.
21. A clock synchronization system, characterized in that, The clock synchronization system includes M+1 nodes including a first node, and the M+1 nodes include at least a server node and a client node. M is an integer greater than 1, and the first node is configured to execute the method according to any one of claims 1 to 19.
22. A communication device, characterized in that, It includes a processor, and the processor is coupled to a memory. The memory is configured to store instructions. The processor is configured to execute the instructions in the memory, so that the communication device executes the method according to any one of claims 1 to 19.
23. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 19 is implemented.
24. A computer program product, characterized in that, The computer program product stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 19 is implemented.
Citation Information
Cited By
Clock synchronization detection method and related device
CN121691113A