WO2022083537A1 - 时间同步的方法、第一节点、第二节点以及网络 - Google Patents

时间同步的方法、第一节点、第二节点以及网络 Download PDF

Info

Publication number
WO2022083537A1
WO2022083537A1 PCT/CN2021/124361 CN2021124361W WO2022083537A1 WO 2022083537 A1 WO2022083537 A1 WO 2022083537A1 CN 2021124361 W CN2021124361 W CN 2021124361W WO 2022083537 A1 WO2022083537 A1 WO 2022083537A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
band
time
synchronization information
link
Prior art date
Application number
PCT/CN2021/124361
Other languages
English (en)
French (fr)
Inventor
陈广
李蕾
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to US18/032,837 priority Critical patent/US20230388949A1/en
Priority to EP21881954.8A priority patent/EP4220997A1/en
Publication of WO2022083537A1 publication Critical patent/WO2022083537A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0679Clock or time synchronisation in a network by determining clock distribution path in a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0641Change of the master or reference, e.g. take-over or failure of the master
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays

Definitions

  • the embodiments of the present disclosure relate to the field of communication technologies.
  • Time synchronization is divided into two methods: in-band synchronization and out-of-band synchronization.
  • in-band synchronization As the network becomes more and more complex, there are network devices in the network that can use both in-band and out-of-band methods for time synchronization, resulting in the existence of time in the network.
  • Loop (Timing Loop).
  • a first aspect of the embodiments of the present disclosure provides a time synchronization method for a first node.
  • the first node has at least one output port connected to an input port of a second node through an out-of-band synchronization link, and has at least one output port.
  • the other output ports are connected to the third node through an in-band synchronization link.
  • the method includes: sending out-of-band time synchronization information to the second node through an out-of-band synchronization link, where the out-of-band time synchronization information includes a grandfather clock identifier of the first node.
  • a second aspect of the embodiments of the present disclosure provides a time synchronization method for a second node.
  • the second node has at least one input port connected to an output port of the first node through an out-of-band synchronization link, and has at least one input port.
  • the other input ports are connected to the third node through an in-band synchronization link.
  • the method includes: receiving out-of-band time synchronization information sent by the first node and in-band synchronization information sent by at least one third node, where the out-of-band time synchronization information includes the first node.
  • the grandfather clock identifier of a node in response to the grandfather clock identifier of the first node being the identifier of the second node, determine a preferred node from all third nodes according to the in-band time synchronization information, and synchronize the time of the second node with the preferred node and, in response to the grandfather clock identification of the first node not being the identification of the second node, determine a preferred node from the first node and all third nodes according to the out-of-band time synchronization information and the in-band time synchronization information, The time of the two nodes is synchronized with the time of the preferred node.
  • a third aspect of the embodiments of the present disclosure provides a first node.
  • the first node has at least one output port connected to an input port of the second node through an out-of-band synchronization link, and has at least one other output port through an in-band synchronization link.
  • the link is connected to the third node, and the first node includes: a sending module configured to send out-of-band time synchronization information to the second node through the out-of-band synchronization link; the out-of-band time synchronization information includes the grandfather clock identifier of the first node.
  • a fourth aspect of the embodiments of the present disclosure provides a second node, the second node has at least one input port connected to an output port of the first node through an out-of-band synchronization link, and has at least one other input port through an in-band synchronization link
  • the link is connected to a third node
  • the second node includes: a receiving module configured to receive out-of-band time synchronization information sent by the first node and in-band synchronization information sent by at least one third node, where the out-of-band time synchronization information includes the first The grandfather clock identifier of a node;
  • the first processing module is configured to, in response to the grandfather clock identifier of the first node being the identifier of the second node, determine a preferred node from all the third nodes according to the in-band time synchronization information, and assign the first node The time of the two nodes is synchronized with the time of the preferred node; and the second processing module is configured to, in response to the grandfather clock
  • a fifth aspect of the embodiments of the present disclosure provides a network, including: at least one first node; at least one second node; at least one third node; the first node has at least one output port that communicates with the second node through an out-of-band synchronization link The input port of the node is connected; the first node has at least one other output port connected with the third node through the in-band synchronization link; and the second node has at least one other input port with the third node through the in-band synchronization link connect.
  • Fig. 1 is a flowchart of a time synchronization method for a first node according to an embodiment of the present disclosure.
  • FIG. 2 is a flowchart of a time synchronization method for a second node according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of the relationship between network devices in the network.
  • FIG. 4 is a schematic diagram of the structure of a TOD frame of a 1PPS+TOD message.
  • FIG. 5 is a block diagram of the composition of a first node according to an embodiment of the present disclosure.
  • FIG. 6 is a block diagram of the composition of a second node according to an embodiment of the present disclosure.
  • FIG. 7 is a block diagram of the composition of a network provided by an embodiment of the present disclosure.
  • Embodiments of the present disclosure may be described with reference to plan views and/or cross-sectional views with the aid of idealized schematic illustrations of the present disclosure. Accordingly, example illustrations may be modified according to manufacturing techniques and/or tolerances.
  • Embodiments of the present disclosure are not limited to the embodiments shown in the drawings, but include modifications of configurations formed based on manufacturing processes.
  • the regions illustrated in the figures have schematic properties and the shapes of regions illustrated in the figures are illustrative of the specific shapes of regions of elements and are not intended to be limiting.
  • network device (or node) 1 NE1 in FIG. 3
  • network device 2 NE2 in FIG. 3
  • network device 3 NE3 in Figure 3
  • An out-of-band synchronization link exists between NE1 and NE2.
  • NE1 is the input end of the out-of-band synchronization link
  • NE2 is the output end of the out-of-band synchronization link.
  • the in-band synchronization link refers to the link established by the network equipment in the network for time synchronization in the in-band mode.
  • Protocol standard such as PTP (Precision Time Protocol, Precision Time Protocol) link.
  • the out-of-band synchronization link refers to a link established by network devices in the network for time synchronization in an out-of-band manner.
  • the ports at both ends of the link are generally GPS (Global Positioning System, global positioning system) interfaces, running NEMA (National Marine Electronics Association, National Marine Electronics Association), UBX (a protocol message developed by U-blox), CMTOD (China Mobile Time of Day, China Mobile Time) and other protocols, such as 1PPS (Pulse Per Second, second pulse) +TOD (Time of Day, time of day) synchronous link.
  • GPS Global Positioning System, global positioning system
  • NEMA National Marine Electronics Association
  • UBX a protocol message developed by U-blox
  • CMTOD China Mobile Time of Day, China Mobile Time
  • 1PPS Pulse Per Second, second pulse
  • TOD Time of Day, time of day
  • the clock parameters mainly include: clock identification (ID), priority 1 (priority 1), priority 2 (priority 2), clock class (Clock Class) Wait.
  • the in-band time synchronization information includes the information required by the BMC (Best Master Clock) algorithm in the IEEE1588 protocol (a standard for precision clock synchronization protocol for network measurement and control systems), specifically: Grandmaster Identity, Priority 1 (priority 1), priority 2 (priority 2), clock class (Clock Class), time stability (offsetScaledLogVariance), hop count (stepRemoved), clock accuracy (clockAccuracy), time source type (timeSource), etc.
  • BMC Best Master Clock
  • IEEE1588 protocol a standard for precision clock synchronization protocol for network measurement and control systems
  • the in-band time synchronization information is carried in the announce message (announcement message).
  • announce message announcement message
  • the grandfather clock identifier in the internal time synchronization information is the configured clock identifier of the network device, and the priority 1 and the priority 2 are also the configured priority 1 and priority 2 of the network device.
  • the network device After receiving the in-band time synchronization information, the network device establishes a reference source data set according to the specific information in the in-band time synchronization information.
  • the reference source data set includes the grandfather clock identifier, priority 1, priority in the in-band time synchronization information 2 and other information.
  • Two network devices connected through an out-of-band synchronization link can only send out-of-band time synchronization information from the input end of the out-of-band synchronization link to the output end.
  • NE1 can send out-of-band time synchronization information to NE2, but NE2 cannot Send out-of-band time synchronization information to NE1.
  • the out-of-band time synchronization information carries the time offset (leaps) between GPS and UTC (Coordinated Universal Time), the second pulse status, etc., but cannot carry the grandfather clock logo, priority 1, priority 2, clock level, and time stability.
  • the information required by the BMC algorithm in the IEEE1588 protocol such as degree, number of hops, clock accuracy, and time source type.
  • the network device After receiving the out-of-band time synchronization information, the network device establishes a reference source data set according to the out-of-band time synchronization information. There is no such information in the synchronization information, so the reference source data set uses the configured clock ID of NE2 as the grandfather clock ID, and the configured priority 1 and priority 2 as priority 1 and priority 2.
  • NE1, NE2, and NE3 are identified as their respective MAC (Media Access Control Address, media access control address) addresses;
  • NE1 and NE3 Priority 1 (priority 1) and priority 2 (priority 2) are configured as 128 and 30 respectively (the priority is represented by A/B in the figure, where A is priority 1 and B is priority 2), and
  • the priority 1 and priority 2 of NE2 are configured as 128 and 20, respectively.
  • NE2 After NE2 receives the out-of-band time synchronization information from NE1 through the out-of-band synchronization link, it needs to map the port connected with the out-of-band synchronization link or NE1 to the port connected with the in-band synchronization link. Since the out-of-band time synchronization information does not carry information such as priority 1 and priority 2, NE2 creates a reference source data set for the out-of-band time synchronization information from NE1. , the grandfather clock of the reference source data set is represented as the MAC address of NE2, and priority 1 and priority 2 use NE2's priority 1 and priority 2, that is, 128 and 20, respectively.
  • the NE2 receives the in-band time synchronization information from NE3 through the in-band time synchronization link.
  • the in-band time synchronization information carries information such as the grandfather clock ID, priority 1, priority 2, and clock level. Since it is the first time During the synchronization process, NE3 does not synchronize the time of other network devices. Therefore, the grandfather clock identifier in the in-band time synchronization information from NE3 is the MAC address of NE3, and the priority 1 and priority 2 are the priority 1 and priority 2 of NE3. , i.e. 128 and 30, respectively.
  • NE2 selects the network device connected to the out-of-band synchronization according to the BMC algorithm As a time source, that is, NE2 synchronizes the time of NE1, and sets the port connected to NE1 to the slave state (slave port state), and the port connected to NE3 to the master state (master port state).
  • NE2 sends the in-band time synchronization information to NE3 through the in-band time synchronization link.
  • the grandfather clock identifier of the in-band time synchronization information sent by NE2 to NE3 is the MAC address of NE2, priority 1 is 128, and priority 2 is 20.
  • NE3 not only receives the in-band time synchronization information from NE2, but also receives the in-band time synchronization information from NE1.
  • NE1 does not synchronize the time of other network devices, so the grandfather clock in the in-band time synchronization information from NE1
  • the MAC address identified as NE1, priority 1 and priority 2 are the priority 1 and priority 2 of NE3, namely 128 and 30 respectively.
  • NE3 sends the in-band time synchronization information to NE1 through the in-band time synchronization link.
  • the grandfather clock identifier of the in-band time synchronization information sent by NE3 to NE1 It is the grandfather clock identifier in the in-band time synchronization information sent by NE2 to NE3, that is, the MAC address of NE2.
  • priority 1 is 128, and priority 2 is 20.
  • NE1 After NE1 receives the in-band time synchronization information from NE3, since the current clock parameter of NE3 is better than that of NE1 (the value of priority 2 of NE3 is lower than that of NE1), NE1 selects the time source of NE3 as its own according to the BMC algorithm. NE1 synchronizes the time of NE3, and NE3 synchronizes with NE2, so NE1 also synchronizes with NE2. As mentioned above, the time of NE2 is essentially synchronized with NE1, but because the out-of-band time link cannot carry The grandfather clock identification information makes NE2 "think" that it is its own time source, thus forming a time loop of NE1-NE2-NE3-NE1.
  • NE1 and its upstream nodes are divided into the first layer, and the downstream nodes of NE1 are divided into the first layer.
  • NE2 is divided into the second layer, in which the first layer priority of the first layer is higher than the second layer priority of the second layer.
  • Time source selection is completed through different layer priorities, and the loop is broken, but due to New parameters are introduced, which are not easily compatible with related technologies.
  • an embodiment of the present disclosure provides a time synchronization method for a first node, where the first node has at least one output port connected to an input port of the second node through an out-of-band synchronization link, and There is also at least one other output port connected to the third node via an in-band synchronization link.
  • the first node refers to a network device in the network, which is connected to at least one other network device (ie, the third node) in the network through an in-band synchronization link.
  • the out-of-band synchronization link is connected to a network device (ie, the second node) in the network as the output end of the out-of-band synchronization link.
  • the first node may be different network devices that satisfy the conditions.
  • the time synchronization method specifically includes step S101.
  • step S101 out-of-band time synchronization information is sent to the second node through the out-of-band synchronization link, where the out-of-band time synchronization information includes a grandfather clock identifier of the first node.
  • the first node sends out-of-band time synchronization information to the second node in the network through the out-of-band synchronization link.
  • the out-of-band time synchronization information in this embodiment of the present disclosure carries the information of the first node. Grandfather clock logotype.
  • the grandfather clock identifier of the first node is the clock identifier of the first node, which may be the MAC address of the first node;
  • the grandfather clock ID of the first node is the clock ID of the time source to which the first node is synchronized. As shown in Figure 3, the time source of NE1 is NE2, then the grandfather clock ID of NE1 is the clock ID of NE2. MAC address.
  • the grandfather clock identifier of the first node is added to the out-of-band time synchronization information and sent to the second node, so that after the second node receives the out-of-band time synchronization information of the first node, If it is found that the identifier of the grandfather clock of the first node is the identifier of the second node, time synchronization is performed only according to the received in-band time synchronization information of the third node.
  • the grandfather clock of the first node is identified as the second node, it means that the first node, the second node and other nodes in the network have formed a time loop.
  • the second node only uses the in-band time sent by the third node
  • the synchronization information is time-synchronized, that is, the time of the second node will not be synchronized with the first node, as shown in Figure 3, that is, the time of NE2 will not be synchronized with NE1 again, and NE1-NE2-NE3 will not be formed.
  • the time loop of NE1 achieves the effect of breaking the loop.
  • the grandfather clock of the first node is identified as an existing parameter, there is no need to add a new parameter, which facilitates compatibility with related technologies.
  • the out-of-band synchronization link is a 1PPS+TOD synchronization link.
  • the out-of-band synchronization link may specifically be a 1PPS+TOD synchronization link, and the in-band synchronization link may specifically be a PTP link.
  • the pulse-per-second state of the TOD frame carrying the time information message in the 1PPS+TOD message sent from the input end of the 1PPS+TOD synchronous link to the output end in the network can be corresponding to the clock level of the PTP.
  • the corresponding relationship is shown in the following table.
  • the second pulse state of the TOD frame carrying the time message in the 1PPS+TOD message corresponds to the clock level of the PTP.
  • the clock can be obtained according to the 1PPS+TOD message.
  • the level as the clock level of the constructed reference source dataset, solves the problem that the clock level cannot be carried in the out-of-band time synchronization information.
  • the out-of-band time synchronization information further includes the priority 1, the priority 2 and the hop number of the first node.
  • the out-of-band time synchronization information sent by the first node may also include the priority 1, priority 2, and hop number of the first node. Of course, it may also include time stability and clock precision. and other information.
  • the priority 1 and priority 2 of the first node are the priority 1 and priority 2 of the first node. Referring to FIG. 3, it is 128 and 30; when the first node has synchronized the time of other network devices in the network, the priority 1 and priority 2 of the first node are the in-band corresponding to the time at which the first node is synchronized
  • the priority 1 and priority 2 carried in the time synchronization information that is, the priority 1 and priority 2 of the time source of the first node, as shown in Figure 3, the time source of NE1 is NE2, then the priority of NE1 1.
  • Priority 2 is the priority 1 and priority 2 of NE2, that is, 128 and 20.
  • the number of hops refers to the number of other network devices that the current network device needs to pass through to connect its time source through the in-band synchronization link.
  • the time sources of NE3 and NE1 are both NE2, and NE3 is directly connected to NE2.
  • the in-band synchronization link is connected, and NE1 is connected to NE2 through the in-band synchronization link.
  • the hop count of NE3 is naturally lower than that of NE1.
  • the accuracy of the second node's construction of the reference source data set based on the priority 1, priority 2 and hop count is improved, and it is convenient for the second node to construct the reference source data set according to the constructed Refer to the source dataset to select the correct time source.
  • NE2 receives the out-of-band time synchronization information from NE1 through the out-of-band synchronization link.
  • NE2 maps the port connected to the out-of-band synchronization link or NE1 to the port connected to the in-band synchronization link, that is, when a reference source data set is established based on the out-of-band time synchronization information from NE1, the grandfather of the reference source data set is The clock, priority 1, and priority 2 can directly use the grandfather clock ID, priority 1, and priority 2 in the out-of-band time synchronization information, that is, the priority 1 and priority 2 of NE1, instead of using the default configuration of NE2.
  • NE2 may choose NE3 as its own data source, which can also avoid looping to a certain extent.
  • the grandfather clock identifier, priority 1, priority 2, and hop count of the first node in the out-of-band time synchronization information are carried in a 1PPS+TOD packet and sent to the second node.
  • the specific structure of the TOD frame of the 1PPS+TOD message refers to FIG. 4, which includes a frame header composed of two bytes SYNCCHAR1 and SYNCCHAR2, and a message composed of two bytes CLASS (message class) and ID (message ID). Header, LENGTH BIG Endian (message length field), Payload (load field), and FCS (frame check sequence field) occupying two bytes.
  • SYNCCHAR1 occupies one byte, which is a fixed value of 0X43, which represents the "C" character in ASCII code
  • SYNCCHAR2 occupies one byte, which is a fixed value of 0X4D, which represents the "M" character in ASCII code.
  • the message class occupies one byte, which specifies the basic classification of the TOD message
  • the message ID occupies one byte, which defines the number of the specific TOD message.
  • the valid range of the message length field calculation only includes the payload of the message (that is, the payload field), and does not include the frame header, the message header, the message length field itself and the frame check sequence field.
  • the payload field is the specific message content. Currently, this field has 16 bytes.
  • 1PPS+TOD packets There are two types of 1PPS+TOD packets, one carrying time information message and one carrying time status message.
  • the following table shows the specific structure of the payload field of the TOD frame of the 1PPS+TOD message carrying the time information message.
  • the payload field of the TOD frame of the 1PPS+TOD message carrying the time information message has 7 reserved bytes.
  • the following table shows the specific composition of the payload field of the TOD frame of the 1PPS+TOD message carrying the time status message.
  • the payload field of the TOD frame of the 1PPS+TOD message carrying the time status message has 11 reserved bytes.
  • the grandfather clock ID needs to occupy 8 bytes, priority 1, priority 2, and hop count each need to occupy 1 byte, so the grandfather clock ID, priority 1, priority 2, and hop count occupy a total of 11 words Section, the grandfather clock identifier, priority 1, priority 2, and hop count can be placed in the reserved field of the payload field of the TOD frame of the 1PPS+TOD message carrying the time status message and sent to the second node.
  • the following table shows the specific composition of the payload field of the TOD frame of an extended 1PPS+TOD message carrying the time status message, which is carried in the bytes whose last byte offsets are 5, 6, 7, and 8. Grandfather Clock ID, Priority 1, Priority 2, Hop Count.
  • an embodiment of the present disclosure provides a time synchronization method for a second node, wherein at least one input port is connected to an output port of the first node through an out-of-band synchronization link, and there are at least one input port connected to an output port of the first node through an out-of-band synchronization link.
  • One other input port is connected to the third node through an in-band synchronization link.
  • the second node refers to a network device in the network, which is connected to at least one other network device (ie, the third node) in the network through an in-band synchronization link.
  • the out-of-band synchronization link is connected to a network device (ie, the first node) in the network as the input end of the out-of-band synchronization link.
  • the network device that meets the condition of the network device at the input end of the link is connected, and in different time synchronization processes, the second node may be a different network device that satisfies the condition.
  • the time synchronization method specifically includes steps S201, S202 and S203.
  • step S201 receive out-of-band time synchronization information sent by the first node and in-band synchronization information sent by at least one third node, where the out-of-band time synchronization information includes the grandfather clock identifier of the first node.
  • the second node receives the out-of-band time synchronization information sent by the first node connected to it through the out-of-band synchronization link, and at the same time, receives the in-band time synchronization information sent by at least one third node connected to it through the in-band synchronization link.
  • the out-of-band time synchronization information includes not only the time offset between GPS and UTC, the second pulse state, etc., but also the grandfather clock identifier of the first node; the in-band time synchronization information includes the grandfather clock identifier of the third node, priority 1 , priority 2, hop count and other information.
  • step S202 when the grandfather clock identifier of the first node is the identifier of the second node, a preferred node is determined from all the third nodes according to the in-band time synchronization information, and the time of the second node is synchronized with the preferred node time.
  • the second node After the second node receives the out-of-band time synchronization information of the first node, if it finds that the grandfather clock identifier of the first node in the out-of-band time synchronization information is the identifier of the second node, such as the MAC address of the second node, the first node The second node constructs the reference source data set of each third node according to the in-band time synchronization information sent by the third node connected to the second node, and the reference source data set corresponding to each third node should include the band sent by the third node. Information such as the grandfather clock ID, priority 1, priority 2, and hop count in the internal time synchronization information.
  • the second node uses the BMC algorithm to determine a third node as the preferred node from the third nodes corresponding to the received in-band time synchronization information according to the reference source data set corresponding to each third node, and compares the time of the second node with the time of the second node. Time synchronization of priority nodes.
  • step S203 when the grandfather clock identifier of the first node is not the identifier of the second node, a preferred node is determined from the first node and all the third nodes according to the out-of-band time synchronization information and the in-band time synchronization information, The time of the second node is synchronized with the time of the preferred node.
  • the second node After the second node receives the out-of-band time synchronization information of the first node, if it finds that the grandfather clock identifier of the first node in the out-of-band time synchronization information is not the identifier of the second node, the second node connects to the second node according to the The in-band time synchronization information sent by the third node constructs the reference source data set of each third node, and the reference source data set corresponding to each third node should include the grandfather clock identifier in the in-band time synchronization information sent by the third node. , priority 1, priority 2, hop count and other information.
  • the input port connected to the first node is mapped to the port of the in-band synchronization link, that is, the reference source data set of the first node is constructed according to the out-of-band time synchronization information sent by the first node, and the reference source corresponding to the first node is used.
  • the dataset should include the first node grandfather clock id. If there is no information such as priority 1, priority 2, and hop count in the out-of-band synchronization information, the reference source data set corresponding to the first node uses the priority 1 and priority 2 of the second node as priority 1 and priority 2. .
  • the second node uses the BMC algorithm to determine a third node as a preferred node from the third node and the first node corresponding to the received in-band time synchronization information according to the reference source data set corresponding to the first node and each third node, Synchronize the time of the second node with the time of the priority node.
  • time synchronization method by adding the grandfather clock identifier of the first node to the out-of-band time synchronization information and sending it to the second node, after receiving the out-of-band time synchronization information of the first node, the second node, if When it is found that the identifier of the grandfather clock of the first node is the identifier of the second node, time synchronization is performed only according to the received in-band time synchronization information of the third node.
  • the grandfather clock of the first node is identified as the second node, it means that the first node, the second node and other nodes in the network have formed a time loop.
  • the second node only uses the in-band time sent by the third node
  • the synchronization information is time-synchronized, that is, the time of the second node will not be synchronized with the first node, as shown in Figure 3, that is, the time of NE2 will not be synchronized with NE1 again, and NE1-NE2-NE3 will not be formed.
  • the time loop of NE1 achieves the effect of breaking the loop.
  • the grandfather clock of the first node is identified as an existing parameter, there is no need to add a new parameter, which facilitates compatibility with related technologies.
  • the in-band synchronization link is a PTP link.
  • the out-of-band synchronization link is a 1PPS+TOD synchronization link.
  • the out-of-band synchronization link may specifically be a 1PPS+TOD synchronization link, and the in-band synchronization link may specifically be a PTP link.
  • the pulse-per-second state of the TOD frame carrying the time information message in the 1PPS+TOD packet sent from the input end of the 1PPS+TOD synchronization link to the output end in the network may correspond to the clock level of the PTP.
  • the second pulse state of the TOD frame carrying the time message in the 1PPS+TOD message corresponds to the clock level of the PTP.
  • the clock can be obtained according to the 1PPS+TOD message.
  • the level as the clock level of the constructed reference source dataset, solves the problem that the clock level cannot be carried in the out-of-band time synchronization information.
  • the method may further include: mapping the input port of the 1PPS+TOD synchronization link of the second node to the input port of the PTP link.
  • mapping the input port of the 1PPS+TOD synchronization link of the second node to the input port of the PTP link includes: establishing a 1PPS+TOD reference source data set according to the out-of-band time synchronization information, the 1PPS+TOD reference
  • the grandfather clock id of the source dataset is the grandfather clock id of the first node.
  • the second node After the second node receives the out-of-band time synchronization information of the first node, if it finds that the grandfather clock identifier of the first node in the out-of-band time synchronization information is not the identifier of the second node, the second node connects to the second node according to the The in-band time synchronization information sent by the third node constructs the reference source data set of each third node, and the reference source data set corresponding to each third node should include the grandfather clock identifier in the in-band time synchronization information sent by the third node. , priority 1, priority 2, hop count and other information.
  • the input port connected to the first node (that is, the port of the 1PPS+TOD synchronization link) is mapped to the input port of the PTP link, and the specific mapping process may be: constructing the structure according to the out-of-band time synchronization information sent by the first node
  • the reference source data set of the first node, the reference source data set corresponding to the first node should include the grandfather clock identifier of the first node. If there is no information such as priority 1, priority 2, and hop count in the out-of-band synchronization information, the reference source data set corresponding to the first node uses the priority 1 and priority 2 of the second node as priority 1 and priority 2. .
  • the out-of-band time synchronization information further includes priority 1, priority 2 and hop count of the first node; the 1PPS+TOD reference source data set further includes priority 1, priority 2 and Hop count.
  • the out-of-band time synchronization information sent by the first node to the second node further includes the priority 1, priority 2 and hop number of the first node, and the priority 1, priority 2 and hop number of the first node are the time at which they are synchronized The source's priority 1, priority 2, and hop count.
  • the second node After the second node receives the out-of-band time synchronization information of the first node, if it finds that the grandfather clock identifier of the first node in the out-of-band time synchronization information is not the identifier of the second node, it will be sent according to the first node.
  • the out-of-band time synchronization information constructs the reference source data set of the first node
  • the reference source data set corresponding to the first node should include the grandfather clock identifier of the first node, priority 1, Priority 2, hop count and other information.
  • the second node uses the BMC algorithm to determine a third node as a preferred node from the third node and the first node corresponding to the received in-band time synchronization information according to the reference source data set corresponding to the first node and each third node, Synchronize the time of the second node with the time of the priority node.
  • the second node By receiving the priority 1, priority 2 and hop count of the first node, the second node improves the accuracy of the reference source dataset of the first node constructed by the second node according to the priority 1, priority 2 and hop count ( Because the priority 1, priority 2 and hop count of the first node are used instead of the priority 1 and priority 2 of the second node, it is convenient for the second node to select the correct reference source data set according to the construction. time source.
  • the specific process of the time synchronization method may be: if the time source of NE1 is optimal, after NE2 receives the out-of-band time synchronization information sent by NE1 and the in-band time synchronization information sent by NE3 , it recovers the reference source data set of NE3 from the in-band time synchronization information received from NE3, the reference source data set includes the grandfather clock identifier, priority 1, priority 2, Hop count, etc. After receiving the out-of-band time synchronization information sent by NE1, port mapping is performed and a reference source data set corresponding to NE1 is constructed. The grandfather clock ID, priority 1, priority 2, hop count and other information are extracted from the out-of-band time synchronization information. The clock level can be mapped from the received second pulse state. The clock accuracy and time stability are filled in by default.
  • the grandfather clock in the reference source data set corresponding to NE1 is identified as the MAC of NE1, which is inconsistent with the MAC of NE2.
  • Mixed source selection is performed based on the reference source data set corresponding to NE1 and the reference source data set corresponding to NE3: according to the BMC algorithm, the hop count of the reference source data set corresponding to NE1 is less than the hop count from the reference source data set corresponding to NE3, and the time source of NE1 Better than the time source of NE3, the time of NE2 is synchronized with that of NE1.
  • the time source of NE3 is optimal, after NE2 receives the out-of-band time synchronization information sent by NE1 and the in-band time synchronization information sent by NE3, it recovers the information from the in-band time synchronization information received from NE3.
  • Port mapping is performed from the received GPS synchronization message sent by NE1 and a GPS time source data set (that is, a reference source data set corresponding to NE1) is constructed.
  • the grandfather clock in the reference source data set corresponding to NE1 is identified as the MAC of NE3, which is inconsistent with the MAC of NE2.
  • Mixed source selection is performed according to the reference source data set corresponding to NE1 and the reference source data set corresponding to NE3: According to the BMC algorithm, the hop count of the reference source data set corresponding to NE1 is greater than the hop count of the reference source data set corresponding to NE3, and the time source of NE3 Better than the time source of NE1, the time of NE2 is synchronized with that of NE3.
  • NE2 recovers the reference of NE3 from the in-band time synchronization information received from NE3.
  • the reference source data set includes information such as the grandfather clock ID, priority 1, priority 2, and hop count in the in-band time synchronization information sent by the NE3.
  • the GPS time source data set is recovered from the GPS synchronization message sent by NE1.
  • the grandfather clock in the reference source data set corresponding to NE1 is identified as the MAC of NE2, which is consistent with the MAC of NE2 itself. This indicates that there may be a time loop, so only the reference source data set corresponding to NE3 can participate in the source selection:
  • NE2 is used as the time source
  • the port connecting NE2 and NE3 is set as the primary port
  • the port corresponding to NE3 and NE2 The connected port is set as the slave port.
  • an embodiment of the present disclosure provides a first node, the first node has at least one output port connected to an input port of the second node through an out-of-band synchronization link, and has at least one other output port
  • the first node is connected to the third node through an in-band synchronization link.
  • the first node includes a sending module configured to send out-of-band time synchronization information to the second node through the out-of-band synchronization link, where the out-of-band time synchronization information includes the grandfather of the first node. Clock logo.
  • the grandfather clock identifier of the first node is added to the out-of-band time synchronization information and sent to the second node, so that after the second node receives the out-of-band time synchronization information of the first node, If it is found that the identifier of the grandfather clock of the first node is the identifier of the second node, time synchronization is performed only according to the received in-band time synchronization information of the third node.
  • the grandfather clock of the first node is identified as the second node, it means that the first node, the second node and other nodes in the network have formed a time loop.
  • the second node only uses the in-band time sent by the third node
  • the synchronization information is time-synchronized, that is, the time of the second node will not be synchronized with the first node, as shown in Figure 3, that is, the time of NE2 will not be synchronized with NE1 again, and NE1-NE2-NE3 will not be formed.
  • the time loop of NE1 achieves the effect of breaking the loop.
  • the grandfather clock of the first node is identified as an existing parameter, there is no need to add a new parameter, which facilitates compatibility with related technologies.
  • an embodiment of the present disclosure provides a second node, the second node has at least one input port connected to the output port of the first node through an out-of-band synchronization link, and has at least one other input port It is connected to the third node through an in-band synchronization link, and the second node includes: a receiving module, a first processing module and a second processing module.
  • the receiving module is configured to receive out-of-band time synchronization information sent by the first node and in-band synchronization information sent by at least one third node, where the out-of-band time synchronization information includes the grandfather clock identifier of the first node.
  • the first processing module is configured to determine a preferred node from all the third nodes according to the in-band time synchronization information when the grandfather clock of the first node is identified as the identification of the second node, and synchronize the time of the second node to the second node. The time of the preferred node.
  • the second processing module is configured to determine a preferred one from the first node and all the third nodes according to the out-of-band time synchronization information and the in-band time synchronization information when the grandfather clock identifier of the first node is not the identifier of the second node node, and synchronize the time of the second node with the time of the preferred node.
  • the grandfather clock identifier of the first node is added to the out-of-band time synchronization information and sent to the second node.
  • the second node may When it is found that the identifier of the grandfather clock of the first node is the identifier of the second node, time synchronization is performed only according to the received in-band time synchronization information of the third node.
  • the grandfather clock of the first node is identified as the second node, it means that the first node, the second node and other nodes in the network have formed a time loop.
  • the second node only uses the in-band time sent by the third node
  • the synchronization information is time-synchronized, that is, the time of the second node will not be synchronized with the first node, as shown in Figure 3, that is, the time of NE2 will not be synchronized with NE1 again, and NE1-NE2-NE3 will not be formed.
  • the time loop of NE1 achieves the effect of breaking the loop.
  • the grandfather clock of the first node is identified as an existing parameter, there is no need to add a new parameter, which facilitates compatibility with related technologies.
  • an embodiment of the present disclosure provides a network, including: a first node has at least one output port connected to an input port of a second node through an out-of-band synchronization link; the first node has at least one other The output port is connected to the third node through an in-band synchronization link; and the second node has at least one other input port connected to the third node through the in-band synchronization link.
  • the grandfather clock identifier of the first node is added to the out-of-band time synchronization information and sent to the second node, after receiving the out-of-band time synchronization information of the first node, if the second node finds the first node
  • time synchronization is performed only according to the received in-band time synchronization information of the third node.
  • the second node only uses the in-band time sent by the third node
  • the synchronization information is time-synchronized, that is, the time of the second node will not be synchronized with the first node, as shown in Figure 3, that is, the time of NE2 will not be synchronized with NE1 again, and NE1-NE2-NE3 will not be formed.
  • the time loop of NE1 achieves the effect of breaking the loop.
  • the grandfather clock of the first node is identified as an existing parameter, there is no need to add a new parameter, which facilitates compatibility with related technologies.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components Components execute cooperatively.
  • Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor or microprocessor, or as hardware, or as an integrated circuit such as Application-specific integrated circuits.
  • a processor such as a central processing unit (CPU), digital signal processor or microprocessor, or as hardware, or as an integrated circuit such as Application-specific integrated circuits.
  • Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data flexible, removable and non-removable media.
  • Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory (FLASH), or other disk storage ; compact disk read only (CD-ROM), digital versatile disk (DVD), or other optical disk storage; magnetic cartridge, tape, magnetic disk storage, or other magnetic storage; any other storage that can be used to store desired information and that can be accessed by a computer medium.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery media, as is well known to those of ordinary skill in the art .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

本公开实施例涉及通信技术领域,并提供了一种时间同步的方法,该方法用于第一节点,第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接,且还有至少一个其它输出端口通过带内同步链路与第三节点连接,该方法包括:通过带外同步链路向第二节点发送带外时间同步信息,带外时间同步信息包括第一节点的祖父时钟标识。本公开实施例还提供了一种用于第二节点的时间同步的方法、第一节点、第二节点和网络。

Description

时间同步的方法、第一节点、第二节点以及网络
本公开要求在2020年10月21日提交中国专利局、申请号为202011132601.X的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及通信技术领域。
背景技术
随着通信技术的发展,特别是5G(5th Generation Mobile Communication Technology,第五代移动通信技术)技术的发展,对网络中网络设备之间时间同步的要求越来越高。
时间同步分为带内同步和带外同步两种方式,随着网络越来越复杂,网络中存在可以同时使用带内和带外两种方式进行时间同步的网络设备,导致网络中容易存在时间环路(Timing Loop)。
发明内容
本公开实施例的第一方面提供一种时间同步的方法,用于第一节点,第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接,且还有至少一个其它输出端口通过带内同步链路与第三节点连接,该方法包括:通过带外同步链路向第二节点发送带外时间同步信息,带外时间同步信息包括第一节点的祖父时钟标识。
本公开实施例的第二方面提供一种时间同步的方法,用于第二节点,第二节点有至少一个输入端口通过带外同步链路与第一节点的输出端口连接,且还有至少一个其它输入端口通过带内同步链路与第三节点连接,该方法包括:接收第一节点发送的带外时间同步信息和至少一个第三节点发送的带内同步信息,带外时间同步信息包括第一节点的祖父时钟标识;响应于第一节点的祖父时钟标识为第二节点的标识,根据带内时间同步信息从所有第三节点中确定一个优选节点, 将第二节点的时间同步于优选节点的时间;以及,响应于第一节点的祖父时钟标识不是第二节点的标识,根据带外时间同步信息和带内时间同步信息从第一节点和所有第三节点中确定一个优选节点,将第二节点的时间同步于优选节点的时间。
本公开实施例的第三方面提供一种第一节点,第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接,且还有至少一个其它输出端口通过带内同步链路与第三节点连接,第一节点包括:发送模块,被配置为通过带外同步链路向第二节点发送带外时间同步信息;带外时间同步信息包括第一节点的祖父时钟标识。
本公开实施例的第四方面提供一种第二节点,第二节点有至少一个输入端口通过带外同步链路与第一节点的输出端口连接,且还有至少一个其它输入端口通过带内同步链路与第三节点连接,第二节点包括:接收模块,被配置为接收第一节点发送的带外时间同步信息和至少一个第三节点发送的带内同步信息,带外时间同步信息包括第一节点的祖父时钟标识;第一处理模块,被配置为响应于第一节点的祖父时钟标识为第二节点的标识,根据带内时间同步信息从所有第三节点中确定一个优选节点,将第二节点的时间同步于优选节点的时间;以及,第二处理模块,被配置为响应于第一节点的祖父时钟标识不是第二节点的标识,根据带外时间同步信息和带内时间同步信息从第一节点和所有第三节点中确定一个优选节点,将第二节点的时间同步于优选节点的时间。
本公开实施例的第五方面提供一种网络,包括:至少一个第一节点;至少一个第二节;至少一个第三节点;第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接;第一节点还有至少一个其它输出端口通过带内同步链路与第三节点连接;以及,第二节点还有至少一个其它输入端口通过带内同步链路与第三节点连接。
附图说明
图1为本公开实施例提供的用于第一节点的时间同步方法的流 程图。
图2为本公开实施例提供的用于第二节点的时间同步方法的流程图。
图3为网络中网络设备之间的关系示意图。
图4为1PPS+TOD报文的TOD帧的结构的示意图。
图5为本公开实施例提供的第一节点的组成框图。
图6为本公开实施例提供的第二节点的组成框图。
图7为本公开实施例提供的网络的组成框图。
具体实施方式
为使本领域的技术人员更好地理解本公开实施例的技术方案,下面结合附图对本公开实施例提供的时间同步的方法、第一节点、第二节点、网络进行详细描述。
在下文中将参考附图更充分地描述本公开实施例,但是所示的实施例可以以不同形式来体现,且不应当被解释为限于本公开阐述的实施例。反之,提供这些实施例的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。
本公开实施例的附图用来提供对本公开实施例的进一步理解,并且构成说明书的一部分,与本公开实施例一起用于解释本公开,并不构成对本公开的限制。通过参考附图对详细示例实施例进行描述,以上和其它特征和优点对本领域技术人员将变得更加显而易见。
本公开实施例可借助本公开的理想示意图而参考平面图和/或截面图进行描述。因此,可根据制造技术和/或容限来修改示例图示。
在不冲突的情况下,本公开各实施例及实施例中的各特征可相互组合。
本公开所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本公开所使用的术语“和/或”包括一个或多个相关列举条目的任何和所有组合。如本公开所使用的单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。如本公开所使用的术语“包括”、“由……制成”,指定存在所述特征、整体、步骤、 操作、元件和/或组件,但不排除存在或添加一个或多个其它特征、整体、步骤、操作、元件、组件和/或其群组。
除非另外限定,否则本公开所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本公开明确如此限定。
本公开实施例不限于附图中所示的实施例,而是包括基于制造工艺而形成的配置的修改。因此,附图中例示的区具有示意性属性,并且图中所示区的形状例示了元件的区的具体形状,但并不是旨在限制性的。
在一些相关技术中,参照图3,网络中同时存在多个网络设备,即网络设备(或称为节点)1(图3中NE1)、网络设备2(图3中NE2)以及网络设备3(图3中NE3)。NE1和NE2之间存在一条带外同步链路,NE1为该带外同步链路的输入端,NE2为该带外同步链路的输出端;其它相邻网络设备之间(即NE1与NE3以及NE2与NE3之间)存在带内同步链路。
带内同步链路是指,网络中网络设备通过带内方式进行时间同步而建立的链路,该链路两端的端口一般是以太网端口,运行IEEE1588协议(网络测量和控制系统的精密时钟同步协议标准),如PTP(Precision Time Protocol,精确时间同步协议)链路。
带外同步链路是指,网络中网络设备通过带外方式进行时间同步而建立的链路,该链路两端的端口一般是GPS(Global Positioning System,全球定位系统)接口,运行NEMA(National Marine Electronics Association,美国国家海洋电子协会)、UBX(U-blox公司制定的一种协议报文)、CMTOD(China Mobile Time of Day,中国移动时间)等协议,如1PPS(Pulse Per Second,秒脉冲)+TOD(Time of Day,日时间)同步链路。
在时间同步之前,需要为网络中每个网络设备配置时钟参数,时钟参数主要包括:时钟标识(ID)、优先级1(priority 1)、优 先级2(priority 2)、时钟等级(Clock Class)等。
在时间同步过程中,通过带内同步链路连接的两个网络设备之间可以互相向对方发送带内时间同步信息,如NE1和NE3之间可以向对方发送带内时间同步信息。带内时间同步信息包括IEEE1588协议(网络测量和控制系统的精密时钟同步协议标准)中BMC(Best Master Clock,最佳主时钟)算法所需要的信息,具体为:祖父时钟标识(Grandmaster Identity)、优先级1(priority 1)、优先级2(priority 2)、时钟等级(Clock Class)、时间稳定度(offsetScaledLogVariance)、跳数(stepRemoved)、时钟精度(clockAccuracy)、时间源类型(timeSource)等。
带内时间同步信息被携带在announce报文(通告报文)中,在时间同步过程的最开始,即网络中的网络设备的时间并没有同步其它网络设备,依然是自己的时间的时候,带内时间同步信息中的祖父时钟标识就是该网络设备被配置的时钟标识,优先级1、优先级2也是该网络设备被配置的优先级1、优先级2。
网络设备在接收到带内时间同步信息之后,根据带内时间同步信息中的具体信息建立参考源数据集,该参考源数据集包括带内时间同步信息中祖父时钟标识、优先级1、优先级2等信息。
通过带外同步链路连接的两个网络设备则只能由带外同步链路的输入端向输出端发送带外时间同步信息,如NE1可以向NE2发送带外时间同步信息,但NE2并不能向NE1发送带外时间同步信息。带外时间同步信息携带GPS与UTC(协调世界时)的时间偏移量(leaps)、秒脉冲状态等信息,但并不能携带祖父时钟标识、优先级1、优先级2、时钟等级、时间稳定度、跳数、时钟精度、时间源类型等IEEE1588协议中BMC算法所需要的信息。
网络设备在接收到带外时间同步信息之后,根据带外时间同步信息建立参考源数据集,该参考源数据集也应该包括祖父时钟标识、优先级1、优先级2等信息,但由于带外同步信息中并没有这些信息,因此该参考源数据集就使用NE2被配置的时钟标识作为祖父时钟标识,被配置的优先级1、优先级2作为优先级1、优先级2。
参照图3,假设在为网络中的网络设备配置时钟参数的过程中,NE1、NE2、NE3的时钟标识为各自的MAC(Media Access Control Address,媒体存取控制位址)地址;NE1和NE3的优先级1(priority 1)和优先级2(priority 2)分别被配置为128和30(图中用A/B的形式表示优先级,其中A为优先级1,B为优先级2),而NE2的优先级1和优先级2则被分别配置为128和20。
NE2通过带外同步链路接收到的来自NE1的带外时间同步信息后,需要将与带外同步链路或者说NE1连接的端口映射为与带内同步链路连接的端口,即根据来自NE1的带外时间同步信息建立参考源数据集,由于带外时间同步信息中并没有携带优先级1、优先级2等信息,因此NE2在为来自NE1的带外时间同步信息建立参考源数据集时,该参考源数据集的祖父时钟表示为NE2的MAC地址,优先级1、优先级2使用NE2的优先级1、优先级2,即分别为128和20。
NE2通过带内时间同步链路接收到来自NE3的带内时间同步信息,该带内时间同步信息携带着祖父时钟标识、优先级1、优先级2、时钟等级等信息,由于是最开始的时间同步过程,NE3并未同步其它网络设备的时间,因此来自NE3的带内时间同步信息中的祖父时钟标识为NE3的MAC地址,优先级1和优先级2为NE3的优先级1和优先级2,即分别为128和30。
由于根据带外时间同步信息构建的参考源数据集的优先级2的数值低于根据带内时间同步信息构建的参考源数据集的优先级2,NE2根据BMC算法选择带外同步连接的网络设备作为时间源,即NE2同步NE1的时间,并将其与NE1连接的端口置为Slave状态(从端口状态),将其与NE3连接的端口置为Master状态(主端口状态)。
NE2通过带内时间同步链路向NE3发送带内时间同步信息,此时,由于NE2已经选择带外同步连接的网络设备作为时间源,因此NE2向NE3发送的带内时间同步信息的祖父时钟标识为NE2的MAC地址,优先级1为128,优先级2为20。
NE3不仅会收到来自NE2的带内时间同步信息,也会收到来自NE1的带内时间同步信息,NE1并未同步其它网络设备的时间,因此 来自NE1的带内时间同步信息中的祖父时钟标识为NE1的MAC地址,优先级1和优先级2为NE3的优先级1和优先级2,即分别为128和30。显然,由于根据来自NE2的带内时间同步信息构建的参考源数据集的优先级2的数值低于根据来自NE1的带内时间同步信息构建的参考源数据集的优先级2,NE3根据BMC算法选择NE2作为时间源,即NE3同步NE2的时间。
NE3通过带内时间同步链路向NE1发送带内时间同步信息,此时,由于N3已经选择带外同步连接的网络设备作为时间源,因此NE3向NE1发送的带内时间同步信息的祖父时钟标识为NE2向NE3发送的带内时间同步信息中的祖父时钟标识,也就是NE2的MAC地址,同样的,优先级1为128,优先级2为20。
NE1收到来自NE3的带内时间同步信息后,由于NE3当前的时钟参数优于NE1(NE3的优先级2的数值低于NE1的优先级2),NE1根据BMC算法选择NE3的时间源作为自己的时间源,即NE1同步NE3的时间,而NE3同步的是NE2,因此NE1也同步的是NE2,而如上所述,本质上NE2的时间同步的是NE1,只是由于带外时间链路不能携带祖父时钟标识信息,使得NE2“认为”自己是自己的时间源,这样就形成了NEl-NE2-NE3-NE1的时间环路。
在一些相关技术中,通过对网络设备进行分层,对不同层次的网络设备设置不同优先级,参照图3,将NE1和其上游节点(如NE3)划分为第一层次,将NE1的下游节点(如NE2)划分为第二层次,其中,第一层次的第一层优先级高于第二层次的第二层优先级,通过不同层次优先级来完成时间选源,进行破环,但由于引入了新的参数,与相关技术不容易兼容。
第一方面,参照图1,本公开实施例提供一种时间同步的方法,用于第一节点,第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接,且还有至少一个其它输出端口通过带内同步链路与第三节点连接。
第一节点是指网络中的一个网络设备,其通过带内同步链路与网络中至少一个其它网络设备(即第三节点)连接,同时,其作为带 外同步链路的输入端,通过带外同步链路与网络中作为该带外同步链路的输出端的网络设备(即第二节点)连接。
一个网络中可能存在多个,满足通过带内同步链路与至少一个网络中其它网络设备连接、并作为带外同步链路的输入端,通过带外同步链路与网络中作为该带外同步链路的输出端的网络设备连接的条件的网络设备,在不同的时间同步过程中,第一节点可以是不同的满足该条件的网络设备。
如图1所示,该时间同步方法具体包括步骤S101。
在步骤S101中,通过带外同步链路向第二节点发送带外时间同步信息,带外时间同步信息包括第一节点的祖父时钟标识。
第一节点通过带外同步链路向网络中的第二节点发送带外时间同步信息,与上述带外时间同步信息不同的是,本公开实施例的带外时间同步信息中携带第一节点的祖父时钟标识。
当第一节点未同步网络中其它网络设备的时间时,第一节点的祖父时钟标识即为第一节点的时钟标识,具体可以是第一节点的MAC地址;当第一节点已经同步了网络中其它网络设备的时间时,第一节点的祖父时钟标识为第一节点同步于的时间源的时钟标识,如参照图3,NE1的时间源为NE2,那么,NE1的祖父时钟标识即为NE2的MAC地址。
根据本公开实施例提供的时间同步方法,通过将第一节点的祖父时钟标识加入带外时间同步信息发送至第二节点,供第二节点在接收到第一节点的带外时间同步信息之后,若发现第一节点的祖父时钟标识为第二节点的标识时,只根据接收到的第三节点的带内时间同步信息进行时间同步。当第一节点的祖父时钟标识为第二节点时,说明第一节点、第二节点以及网络中其它节点已经组成了时间环路,此时,第二节点只根据第三节点发送的带内时间同步信息进行时间同步,也就是说,第二节点的时间不会再同步于第一节点,如参照图3,也就是NE2的时间不会再同步于NE1,就不会形成NEl-NE2-NE3-NE1的时间环路,达到了破环的效果。同时,由于第一节点的祖父时钟标识为已经存在的参数,不需要在增加新的参数,便于与相关技术兼容。
在一种实施方式中,带外同步链路为1PPS+TOD同步链路。
带外同步链路具体可以是1PPS+TOD同步链路,带内同步链路具体可以是PTP链路。
在一些相关技术中,可以将网络中1PPS+TOD同步链路的输入端向输出端发送的1PPS+TOD报文中携带时间信息消息的TOD帧的秒脉冲状态与PTP的时钟等级对应,具体的对应关系如下表所示。
Figure PCTCN2021124361-appb-000001
通过1PPS+TOD报文中携带时间消息的TOD帧的秒脉冲状态与PTP的时钟等级对应,在根据带外时间同步信息构建的参考源数据集的过程中,可以根据1PPS+TOD报文获取时钟等级,作为构建的参考源数据集的时钟等级,解决了带外时间同步信息中无法携带时钟等级的问题。
在一种实施方式中,带外时间同步信息还包括第一节点的优先级1、优先级2以及跳数。
第一节点发送的带外时间同步信息除了第一节点的祖父时钟标识之外,还可以包括第一节点的优先级1、优先级2以及跳数,当然,也可以包括时间稳定度、时钟精度等其它信息。
和第一节点的祖父时钟标识一样,当第一节点未同步网络中其它网络设备的时间时,第一节点的优先级1、优先级2即为第一节点的优先级1、优先级2,如参照图3,即为128和30;当第一节点已经同步了网络中其它网络设备的时间时,第一节点的优先级1、优先级2为第一节点同步于的时间对应的带内时间同步信息中携带的优 先级1、优先级2,也就是,第一节点的时间源的优先级1、优先级2,如参照图3,NE1的时间源为NE2,那么,NE1的优先级1、优先级2即为NE2的优先级1、优先级2,也就是128和20。
跳数是指当前的网络设备距离其时间源通过带内同步链路连接需要经过的其它网络设备的数量,如参照图3,NE3和NE1的时间源都是NE2,而NE3是直接与NE2通过带内同步链路连接,而NE1通过NE3与NE2通过带内同步链路连接,NE3的跳数自然比NE1低。
通过将优先级1、优先级2以及跳数发送至第二节点,提高了第二节点根据优先级1、优先级2以及跳数构建参考源数据集的准确性,方便第二节点根据构建的参考源数据集选择正确的时间源。
如参照图3,NE2通过带外同步链路接收到的来自NE1的带外时间同步信息,若带外时间同步信息中携带祖父时钟标识、优先级1、优先级2、跳数等信息,在NE2将与带外同步链路或者说NE1连接的端口映射为与带内同步链路连接的端口,即根据来自NE1的带外时间同步信息建立参考源数据集时,该参考源数据集的祖父时钟、优先级1、优先级2就可以直接使用带外时间同步信息中的祖父时钟标识、优先级1、优先级2,即NE1的优先级1和优先级2,而不用使用NE2默认配置的优先级1、优先级2,此时由于根据带外时间同步信息构建的参考源数据集的优先级1、优先级2的数值与根据带内时间同步信息构建的参考源数据集的优先级1、优先级2的数值是相同的,此时NE2可能选择NE3作为自己的数据源,在一定程度上也可以避免成环。
具体地,带外时间同步信息中的第一节点的祖父时钟标识、优先级1、优先级2、跳数携带在1PPS+TOD报文中发送至第二节点。
具体的1PPS+TOD报文的TOD帧的结构参照图4,其包括由SYNCCHAR1和SYNCCHAR2两个字节组成的帧头、由CLASS(消息类)和ID(消息ID)两个字节组成的消息头、占用两个字节的LENGTH BIG Endian(消息长度域)、Payload(载荷域)、FCS(帧校验序列域)。
其中,SYNCCHAR1占用一个字节,其为固定数值0X43,表示ASCII码中“C”字符;SYNCCHAR2占用一个字节,其为固定数值0X4D,表 示ASCII码中“M”字符。消息类占用一个字节,其规定了TOD消息的基本分类,消息ID占用一个字节,其定义了具体TOD消息的编号。消息长度域计算的有效范围只包括消息的净载荷(即载荷域),不包含帧头,消息头,消息长度域本身和帧校验序列域。载荷域为具体的消息内容,目前该字段有16个字节。帧校验序列域用于帧校验,帧校验序列的生成多项式为:G(x)=x 8+x 5+x 4+1。
1PPS+TOD报文具体有两种,一种携带时间信息消息,一种携带时间状态消息。下表为携带时间信息消息的1PPS+TOD报文的TOD帧的载荷域的具体构成。携带时间信息消息的1PPS+TOD报文的TOD帧的载荷域具有7个保留字节。
Figure PCTCN2021124361-appb-000002
下表为携带时间状态消息的1PPS+TOD报文的TOD帧的载荷域的具体构成。携带时间状态消息的1PPS+TOD报文的TOD帧的载荷域具 有11个保留字节。
Figure PCTCN2021124361-appb-000003
由于祖父时钟标识需要占用8个字节、优先级1、优先级2以及 跳数各需要占用1个字节、因此祖父时钟标识、优先级1、优先级2、跳数一共占用11个字节,可以将祖父时钟标识、优先级1、优先级2、跳数放在携带时间状态消息的1PPS+TOD报文的TOD帧的载荷域的保留字段中发送至第二节点。下表为一种扩展后的携带时间状态消息的1PPS+TOD报文的TOD帧的载荷域的具体构成,其在最后的字节偏移量为5、6、7、8的字节中携带祖父时钟标识、优先级1、优先级2、跳数。
Figure PCTCN2021124361-appb-000004
Figure PCTCN2021124361-appb-000005
使用相关的报文发送祖父时钟标识、优先级1、优先级2、跳数等信息,容易与相关技术兼容,且由于不需要发送新的报文,也节省了传输的资源。当然也可以采用其它方式发送祖父时钟标识、优先级1、优先级2、跳数,如携带时间状态消息的1PPS+TOD报文的TOD帧的载荷域的保留字段和携带时间信息消息的1PPS+TOD报文的TOD帧的载荷域的保留字段一起携带。
第二方面,参照图2,本公开实施例提供一种时间同步的方法,用于第二节点,有至少一个输入端口通过带外同步链路与第一节点的输出端口连接,且还有至少一个其它输入端口通过带内同步链路与第三节点连接。
第二节点是指网络中的一个网络设备,其通过带内同步链路与至少一个网络中其它网络设备(即第三节点)连接,同时,其作为带外同步链路的输出端,通过带外同步链路与网络中作为该带外同步链路的输入端的网络设备(即第一节点)连接。
一个网络中可能存在多个,满足通过带内同步链路与至少一个网络中其它网络设备连接、并作为带外同步链路的输出端,通过带外同步链路与网络中作为该带外同步链路的输入端的网络设备连接的条件的网络设备,在不同的时间同步过程中,第二节点可以是不同的满足该条件的网络设备。
如图2所示,该时间同步方法具体包括步骤S201、步骤S202和S203。
在步骤S201中,接收第一节点发送的带外时间同步信息和至少一个第三节点发送的带内同步信息,带外时间同步信息包括第一节点的祖父时钟标识。
第二节点接收与其通过带外同步链路连接的第一节点发送的带 外时间同步信息,同时,接收至少一个与其通过带内同步链路连接的第三节点发送的带内时间同步信息。
带外时间同步信息不仅包括GPS与UTC的时间偏移量、秒脉冲状态等信息,还包括第一节点的祖父时钟标识;带内时间同步信息则包括第三节点的祖父时钟标识、优先级1、优先级2、跳数等信息。
在步骤S202中,在第一节点的祖父时钟标识为第二节点的标识的情况下,根据带内时间同步信息从所有第三节点中确定一个优选节点,将第二节点的时间同步于优选节点的时间。
第二节点在接收到第一节点的带外时间同步信息后,若发现带外时间同步信息中的第一节点的祖父时钟标识为第二节点的标识,如第二节点的MAC地址,则第二节点根据与第二节点连接的第三节点发送的带内时间同步信息构建各个第三节点的参考源数据集,每个第三节点对应的参考源数据集应该包括该第三节点发送的带内时间同步信息中祖父时钟标识、优先级1、优先级2、跳数等信息。
第二节点使用BMC算法根据各个第三节点对应的参考源数据集从接收到的带内时间同步信息对应的第三节点中确定出一个第三节点为优选节点,将第二节点的时间与该优先节点的时间同步。
在步骤S203中,在第一节点的祖父时钟标识不是第二节点的标识的情况下,根据带外时间同步信息和带内时间同步信息从第一节点和所有第三节点中确定一个优选节点,将第二节点的时间同步于优选节点的时间。
第二节点在接收到第一节点的带外时间同步信息后,若发现带外时间同步信息中的第一节点的祖父时钟标识不是第二节点的标识,则第二节点根据与第二节点连接的第三节点发送的带内时间同步信息构建各个第三节点的参考源数据集,每个第三节点对应的参考源数据集应该包括该第三节点发送的带内时间同步信息中祖父时钟标识、优先级1、优先级2、跳数等信息。同时,将与第一节点连接的输入端口映射为带内同步链路的端口,即根据第一节点发送的带外时间同步信息构建第一节点的参考源数据集,第一节点对应的参考源数据集应该包括第一节点祖父时钟标识。若带外同步信息中没有优先级1、 优先级2、跳数等信息,第一节点对应的参考源数据集就使用第二节点的优先级1、优先级2作为优先级1、优先级2。
第二节点使用BMC算法根据第一节点以及各个第三节点对应的参考源数据集从接收到的带内时间同步信息对应的第三节点以及第一节点中确定出一个第三节点为优选节点,将第二节点的时间与该优先节点的时间同步。
根据本公开实施例提供的时间同步方法,通过将第一节点的祖父时钟标识加入带外时间同步信息发送至第二节点,第二节点在接收到第一节点的带外时间同步信息之后,若发现第一节点的祖父时钟标识为第二节点的标识时,只根据接收到的第三节点的带内时间同步信息进行时间同步。当第一节点的祖父时钟标识为第二节点时,说明第一节点、第二节点以及网络中其它节点已经组成了时间环路,此时,第二节点只根据第三节点发送的带内时间同步信息进行时间同步,也就是说,第二节点的时间不会再同步于第一节点,如参照图3,也就是NE2的时间不会再同步于NE1,就不会形成NEl-NE2-NE3-NE1的时间环路,达到了破环的效果。同时,由于第一节点的祖父时钟标识为已经存在的参数,不需要在增加新的参数,便于与相关技术兼容。
在一种实施方式中,带内同步链路为PTP链路。
在一种实施方式中,带外同步链路为1PPS+TOD同步链路。
带外同步链路具体可以是1PPS+TOD同步链路,带内同步链路具体可以是PTP链路。
在一些相关技术中,可以将网络中1PPS+TOD同步链路的输入端向输出端发送的1PPS+TOD报文中携带时间信息消息的TOD帧的秒脉冲状态与PTP的时钟等级对应。
通过1PPS+TOD报文中携带时间消息的TOD帧的秒脉冲状态与PTP的时钟等级对应,在根据带外时间同步信息构建的参考源数据集的过程中,可以根据1PPS+TOD报文获取时钟等级,作为构建的参考源数据集的时钟等级,解决了带外时间同步信息中无法携带时钟等级的问题。
在一种实施方式中,在接收第一节点发送的带外时间同步信息 和至少一个第三节点发送的带内同步信息和根据带外时间同步信息和带内时间同步信息从第一节点和所有第三节点中确定一个优选节点之间,该方法还可包括:将第二节点的1PPS+TOD同步链路的输入端口映射为PTP链路的输入端口。
在一种实施方式中,将第二节点的1PPS+TOD同步链路的输入端口映射为PTP链路的输入端口包括:根据带外时间同步信息建立1PPS+TOD参考源数据集,1PPS+TOD参考源数据集的祖父时钟标识为第一节点的祖父时钟标识。
第二节点在接收到第一节点的带外时间同步信息后,若发现带外时间同步信息中的第一节点的祖父时钟标识不是第二节点的标识,则第二节点根据与第二节点连接的第三节点发送的带内时间同步信息构建各个第三节点的参考源数据集,每个第三节点对应的参考源数据集应该包括该第三节点发送的带内时间同步信息中祖父时钟标识、优先级1、优先级2、跳数等信息。
同时,将与第一节点连接的输入端口(即1PPS+TOD同步链路的端口)映射为PTP链路的输入端口,具体的映射过程可以是:根据第一节点发送的带外时间同步信息构建第一节点的参考源数据集,第一节点对应的参考源数据集应该包括第一节点祖父时钟标识。若带外同步信息中没有优先级1、优先级2、跳数等信息,第一节点对应的参考源数据集就使用第二节点的优先级1、优先级2作为优先级1、优先级2。
在一种实施方式中,带外时间同步信息还包括第一节点的优先级1、优先级2以及跳数;1PPS+TOD参考源数据集还包括第一节点的优先级1、优先级2以及跳数。
第一节点向第二节点发送的带外时间同步信息还包括第一节点的优先级1、优先级2以及跳数,第一节点的优先级1、优先级2以及跳数为其同步的时间源的优先级1、优先级2以及跳数。
相应地,第二节点在接收到第一节点的带外时间同步信息后,若发现带外时间同步信息中的第一节点的祖父时钟标识不是第二节点的标识,在根据第一节点发送的带外时间同步信息构建第一节点的 参考源数据集时,第一节点对应的参考源数据集应该包括第一节点发送的带外时间同步信息中第一节点的祖父时钟标识、优先级1、优先级2、跳数等信息。
第二节点使用BMC算法根据第一节点以及各个第三节点对应的参考源数据集从接收到的带内时间同步信息对应的第三节点以及第一节点中确定出一个第三节点为优选节点,将第二节点的时间与该优先节点的时间同步。
第二节点通过接收第一节点的优先级1、优先级2以及跳数,提高了第二节点根据优先级1、优先级2以及跳数构建的第一节点的参考源数据集的准确性(因为使用的是第一节点的优先级1、优先级2以及跳数,而不是使用第二节点第的优先级1、优先级2),方便第二节点根据构建的参考源数据集选择正确的时间源。
参照图3,本公开实施例提供的时间同步方法具体的过程可以是:如果NE1的时间源最优,NE2在收到NE1发送过来的带外时间同步信息和NE3发送的带内时间同步信息后,其从收到来自NE3的带内时间同步信息中恢复出NE3的参考源数据集,该参考源数据集包括NE3发送的带内时间同步信息中祖父时钟标识、优先级1、优先级2、跳数等信息。从收到NE1发送过来的带外时间同步信息进行端口映射并构建NE1对应的参考源数据集。其中祖父时钟标识、优先级1、优先级2、跳数等信息从带外时间同步信息中提取,时钟等级可以从收到的秒脉冲状态映射得到,时钟精度、时间稳定度默认填写。
此时,NE1对应的参考源数据集中的祖父时钟标识为NE1的MAC,与NE2自身MAC不一致。根据NE1对应的参考源数据集以及NE3对应的参考源数据集进行混合选源:根据BMC算法NE1对应的参考源数据集的跳数小于来自NE3对应的参考源数据集的跳数,NE1时间源优于NE3时间源,NE2的时间同步于NE1。
类似地,如果NE3的时间源最优,NE2在收到NE1发送过来的带外时间同步信息和NE3发送的带内时间同步信息后,其从收到来自NE3的带内时间同步信息中恢复出NE3的参考源数据集,该参考源数据集包括NE3发送的带内时间同步信息中祖父时钟标识、优先级1、 优先级2、跳数等信息。从收到NE1发送过来的GPS同步报文中进行端口映射并构建GPS时间源数据集(即NE1对应的参考源数据集)。
此时,NE1对应的参考源数据集中的祖父时钟标识为NE3的MAC,与NE2自身MAC不一致。根据NE1对应的参考源数据集以及NE3对应的参考源数据集进行混合选源:根据BMC算法NE1对应的参考源数据集的跳数大于来自NE3对应的参考源数据集的跳数,NE3时间源优于NE1时间源,NE2的时间同步于NE3。
如果NE2的时间源最优,NE2在收到NE1发送过来的带外时间同步信息和NE3发送的带内时间同步信息后,其从收到来自NE3的带内时间同步信息中恢复出NE3的参考源数据集,该参考源数据集包括NE3发送的带内时间同步信息中祖父时钟标识、优先级1、优先级2、跳数等信息。从收到NE1发送过来的GPS同步报文中恢复出GPS时间源数据集。
此时,NE1对应的参考源数据集中的祖父时钟标识为NE2的MAC,与NE2自身MAC一致。说明可能存在时间环路,因此只有NE3对应的参考源数据集可以参与选源:根据BMC算法,根据BMC算法,NE2作为时间源,NE2与NE3连接的端口置为主端口,NE3对应的与NE2连接的端口置为从端口。
第三方面,参照图5,本公开实施例提供一种第一节点,第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接,且还有至少一个其它输出端口通过带内同步链路与第三节点连接,第一节点包括:发送模块,用于通过带外同步链路向第二节点发送带外时间同步信息,带外时间同步信息包括第一节点的祖父时钟标识。
根据本公开实施例提供的第一节点,通过将第一节点的祖父时钟标识加入带外时间同步信息发送至第二节点,供第二节点在接收到第一节点的带外时间同步信息之后,若发现第一节点的祖父时钟标识为第二节点的标识时,只根据接收到的第三节点的带内时间同步信息进行时间同步。当第一节点的祖父时钟标识为第二节点时,说明第一节点、第二节点以及网络中其它节点已经组成了时间环路,此时,第二节点只根据第三节点发送的带内时间同步信息进行时间同步,也就 是说,第二节点的时间不会再同步于第一节点,如参照图3,也就是NE2的时间不会再同步于NE1,就不会形成NEl-NE2-NE3-NE1的时间环路,达到了破环的效果。同时,由于第一节点的祖父时钟标识为已经存在的参数,不需要在增加新的参数,便于与相关技术兼容。
第四方面,参照图6,本公开实施例提供一种第二节点,第二节点有至少一个输入端口通过带外同步链路与第一节点的输出端口连接,且还有至少一个其它输入端口通过带内同步链路与第三节点连接,第二节点包括:接收模块、第一处理模块和第二处理模块。
接收模块,用于接收第一节点发送的带外时间同步信息和至少一个第三节点发送的带内同步信息,带外时间同步信息包括第一节点的祖父时钟标识。
第一处理模块,用于在第一节点的祖父时钟标识为第二节点的标识的情况下,根据带内时间同步信息从所有第三节点中确定一个优选节点,将第二节点的时间同步于优选节点的时间。
第二处理模块,用于在第一节点的祖父时钟标识不是第二节点的标识的情况下,根据带外时间同步信息和带内时间同步信息从第一节点和所有第三节点中确定一个优选节点,将第二节点的时间同步于优选节点的时间。
根据本公开实施例提供的第二节点,通过将第一节点的祖父时钟标识加入带外时间同步信息发送至第二节点,第二节点在接收到第一节点的带外时间同步信息之后,若发现第一节点的祖父时钟标识为第二节点的标识时,只根据接收到的第三节点的带内时间同步信息进行时间同步。当第一节点的祖父时钟标识为第二节点时,说明第一节点、第二节点以及网络中其它节点已经组成了时间环路,此时,第二节点只根据第三节点发送的带内时间同步信息进行时间同步,也就是说,第二节点的时间不会再同步于第一节点,如参照图3,也就是NE2的时间不会再同步于NE1,就不会形成NEl-NE2-NE3-NE1的时间环路,达到了破环的效果。同时,由于第一节点的祖父时钟标识为已经存在的参数,不需要在增加新的参数,便于与相关技术兼容。
第五方面,参照图7,本公开实施例提供一种网络,包括:第一 节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接;第一节点还有至少一个其它输出端口通过带内同步链路与第三节点连接;以及,第二节点还有至少一个其它输入端口通过带内同步链路与第三节点连接。
根据本公开实施例提供的网络,通过将第一节点的祖父时钟标识加入带外时间同步信息发送至第二节点,第二节点在接收到第一节点的带外时间同步信息之后,若发现第一节点的祖父时钟标识为第二节点的标识时,只根据接收到的第三节点的带内时间同步信息进行时间同步。当第一节点的祖父时钟标识为第二节点时,说明第一节点、第二节点以及网络中其它节点已经组成了时间环路,此时,第二节点只根据第三节点发送的带内时间同步信息进行时间同步,也就是说,第二节点的时间不会再同步于第一节点,如参照图3,也就是NE2的时间不会再同步于NE1,就不会形成NEl-NE2-NE3-NE1的时间环路,达到了破环的效果。同时,由于第一节点的祖父时钟标识为已经存在的参数,不需要在增加新的参数,便于与相关技术兼容。
本领域普通技术人员可以理解,上文中所公开的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。
在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。
某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器(CPU)、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其它数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM,更具体如SDRAM、DDR等)、 只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH)或其它磁盘存储器;只读光盘(CD-ROM)、数字多功能盘(DVD)或其它光盘存储器;磁盒、磁带、磁盘存储或其它磁存储器;可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其它传输机制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。
本公开已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其它实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。

Claims (12)

  1. 一种时间同步的方法,用于第一节点,所述第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接,且还有至少一个其它输出端口通过带内同步链路与第三节点连接,所述方法包括:
    通过所述带外同步链路向所述第二节点发送带外时间同步信息,所述带外时间同步信息包括所述第一节点的祖父时钟标识。
  2. 根据权利要求1所述的方法,其中,所述带外同步链路为1PPS+TOD同步链路。
  3. 根据权利要求1所述的方法,其中,所述带外时间同步信息还包括所述第一节点的优先级1、优先级2以及跳数。
  4. 一种时间同步的方法,用于第二节点,所述第二节点有至少一个输入端口通过带外同步链路与第一节点的输出端口连接,且还有至少一个其它输入端口通过带内同步链路与第三节点连接,所述方法包括:
    接收所述第一节点发送的带外时间同步信息和至少一个所述第三节点发送的带内同步信息,所述带外时间同步信息包括所述第一节点的祖父时钟标识;
    响应于所述第一节点的祖父时钟标识为所述第二节点的标识,根据所述带内时间同步信息从所有第三节点中确定一个优选节点,将所述第二节点的时间同步于所述优选节点的时间;以及
    响应于所述第一节点的祖父时钟标识不是所述第二节点的标识,根据所述带外时间同步信息和所述带内时间同步信息从第一节点和所有第三节点中确定一个优选节点,将所述第二节点的时间同步于所述优选节点的时间。
  5. 根据权利要求4所述的方法,其中,所述带内同步链路为精 确时间同步协议链路。
  6. 根据权利要求5所述的方法,其中,所述带外同步链路为1PPS+TOD同步链路。
  7. 根据权利要求6所述的方法,在所述接收所述第一节点发送的带外时间同步信息和至少一个所述第三节点发送的带内同步信息之后,所述根据所述带外时间同步信息和所述带内时间同步信息从第一节点和所有第三节点中确定一个优选节点之前,还包括:
    将所述第二节点的1PPS+TOD同步链路的输入端口映射为所述精确时间同步协议链路的输入端口。
  8. 根据权利要求7所述的方法,其中,所述将所述第二节点的1PPS+TOD同步链路的输入端口映射为所述精确时间同步协议链路的输入端口包括:
    根据所述带外时间同步信息建立1PPS+TOD参考源数据集;其中,所述1PPS+TOD参考源数据集的祖父时钟标识为所述第一节点的祖父时钟标识。
  9. 根据权利要求8所述的方法,其中,所述带外时间同步信息还包括所述第一节点的优先级1、优先级2以及跳数;所述1PPS+TOD参考源数据集还包括所述第一节点的优先级1、优先级2以及跳数。
  10. 一种第一节点,所述第一节点有至少一个输出端口通过带外同步链路与第二节点的输入端口连接,且还有至少一个其它输出端口通过带内同步链路与第三节点连接,所述第一节点包括:
    发送模块,被配置为通过所述带外同步链路向所述第二节点发送带外时间同步信息;其中,所述带外时间同步信息包括所述第一节点的祖父时钟标识。
  11. 一种第二节点,所述第二节点有至少一个输入端口通过带外同步链路与第一节点的输出端口连接,且还有至少一个其它输入端口通过带内同步链路与第三节点连接,所述第二节点包括:
    接收模块,被配置为接收所述第一节点发送的带外时间同步信息和至少一个所述第三节点发送的带内同步信息;其中,所述带外时间同步信息包括所述第一节点的祖父时钟标识;
    第一处理模块,被配置为响应于所述第一节点的祖父时钟标识为所述第二节点的标识,根据所述带内时间同步信息从所有第三节点中确定一个优选节点,将所述第二节点的时间同步于所述优选节点的时间;以及
    第二处理模块,被配置为响应于所述第一节点的祖父时钟标识不是所述第二节点的标识,根据所述带外时间同步信息和所述带内时间同步信息从第一节点和所有第三节点中确定一个优选节点,将所述第二节点的时间同步于所述优选节点的时间。
  12. 一种网络,包括:
    至少一个第一节点;至少一个第二节;至少一个第三节点;
    第一节点有至少一个输出端口通过带外同步链路与所述第二节点的输入端口连接;
    所述第一节点还有至少一个其它输出端口通过带内同步链路与所述第三节点连接;以及
    所述第二节点还有至少一个其它输入端口通过带内同步链路与第三节点连接。
PCT/CN2021/124361 2020-10-21 2021-10-18 时间同步的方法、第一节点、第二节点以及网络 WO2022083537A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/032,837 US20230388949A1 (en) 2020-10-21 2021-10-18 Time synchronization method, first node, second node, and network
EP21881954.8A EP4220997A1 (en) 2020-10-21 2021-10-18 Time synchronisation method, first node, second node, and network

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011132601.X 2020-10-21
CN202011132601.XA CN114389734A (zh) 2020-10-21 2020-10-21 时间同步的方法、第一节点、第二节点、网络

Publications (1)

Publication Number Publication Date
WO2022083537A1 true WO2022083537A1 (zh) 2022-04-28

Family

ID=81194206

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/124361 WO2022083537A1 (zh) 2020-10-21 2021-10-18 时间同步的方法、第一节点、第二节点以及网络

Country Status (4)

Country Link
US (1) US20230388949A1 (zh)
EP (1) EP4220997A1 (zh)
CN (1) CN114389734A (zh)
WO (1) WO2022083537A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1187272A (zh) * 1995-06-06 1998-07-08 Gpt有限公司 一种sdh网络中的同步
CN102208958A (zh) * 2011-07-04 2011-10-05 瑞斯康达科技发展股份有限公司 同步以太网的时钟同步及同步信息收发方法、装置和设备
CN102820941A (zh) * 2012-08-09 2012-12-12 中兴通讯股份有限公司 通信网络时钟同步方法和装置
US20140348181A1 (en) * 2013-05-22 2014-11-27 Calxeda, Inc. Time synchronization between nodes of a switched interconnect fabric
CN106301647A (zh) * 2015-06-05 2017-01-04 中兴通讯股份有限公司 一种实现交替bmc的方法及装置
CN109194435A (zh) * 2018-09-07 2019-01-11 瑞斯康达科技发展股份有限公司 一种避免数字同步网时钟成环的方法、系统和终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1187272A (zh) * 1995-06-06 1998-07-08 Gpt有限公司 一种sdh网络中的同步
CN102208958A (zh) * 2011-07-04 2011-10-05 瑞斯康达科技发展股份有限公司 同步以太网的时钟同步及同步信息收发方法、装置和设备
CN102820941A (zh) * 2012-08-09 2012-12-12 中兴通讯股份有限公司 通信网络时钟同步方法和装置
US20140348181A1 (en) * 2013-05-22 2014-11-27 Calxeda, Inc. Time synchronization between nodes of a switched interconnect fabric
CN106301647A (zh) * 2015-06-05 2017-01-04 中兴通讯股份有限公司 一种实现交替bmc的方法及装置
CN109194435A (zh) * 2018-09-07 2019-01-11 瑞斯康达科技发展股份有限公司 一种避免数字同步网时钟成环的方法、系统和终端

Also Published As

Publication number Publication date
CN114389734A (zh) 2022-04-22
US20230388949A1 (en) 2023-11-30
EP4220997A1 (en) 2023-08-02

Similar Documents

Publication Publication Date Title
WO2014101669A1 (zh) 时间同步方法及系统
US9749073B2 (en) Clock recovery in a packet based network
WO2020135857A1 (zh) 时间同步方法、系统、设备及存储介质
JP2018528702A (ja) 同期方法、ユーザ機器および基地局
WO2018041228A1 (zh) 一种传输同步信息的方法、装置和系统
WO2013071807A1 (zh) 一种多时钟同步技术混合组网的实现方法、系统和装置
WO2012034330A1 (zh) 汇聚式网络中设备间的同步方法、系统和汇聚环设备
WO2013152700A1 (zh) 微波网元的时钟源选择方法及装置
CN102457346A (zh) 时间同步实现方法及时钟节点
EP3626004B1 (en) Method and apparatus for provision of timing for a communication network
WO2022027666A1 (zh) 一种时间同步方法及装置
WO2023273241A1 (zh) 组网通信方法、系统、节点设备、存储介质和电子设备
CN102342051B (zh) 用于通过经由至少一个时间分发协议分开传输第一和第二数据来同步时钟的方法和相关的系统及模块
WO2021129578A1 (zh) 同步信息的配置方法、装置、网络设备和存储介质
WO2022083537A1 (zh) 时间同步的方法、第一节点、第二节点以及网络
WO2021233313A1 (zh) 配置端口状态的方法、装置、系统及存储介质
CN106533597B (zh) 一种时间源的选择方法及网元节点
CN109194435A (zh) 一种避免数字同步网时钟成环的方法、系统和终端
WO2012136085A1 (zh) 以太网同步中的同步状态信息的传输方法和系统
CN114389733A (zh) Ptp主时钟设备、时钟同步方法及存储介质
JP2023538335A (ja) クロック同期モード指示方法および通信装置
US20240172153A1 (en) Network device and method of preventing timing loop
CN102332997B (zh) 一种网络设备及其进行链路容量调整的方法
WO2019104522A1 (en) Methods and devices for flexe network
WO2020207210A1 (zh) 一种fec模式的同步方法、系统、主节点及从节点

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21881954

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18032837

Country of ref document: US

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112023007653

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2021881954

Country of ref document: EP

Effective date: 20230427

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 112023007653

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20230424