WO2016184129A1 - 一种基于单播的时间同步实现方法、装置及网络设备 - Google Patents

一种基于单播的时间同步实现方法、装置及网络设备 Download PDF

Info

Publication number
WO2016184129A1
WO2016184129A1 PCT/CN2016/070075 CN2016070075W WO2016184129A1 WO 2016184129 A1 WO2016184129 A1 WO 2016184129A1 CN 2016070075 W CN2016070075 W CN 2016070075W WO 2016184129 A1 WO2016184129 A1 WO 2016184129A1
Authority
WO
WIPO (PCT)
Prior art keywords
time synchronization
network device
unicast
network
role
Prior art date
Application number
PCT/CN2016/070075
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 中兴通讯股份有限公司
Publication of WO2016184129A1 publication Critical patent/WO2016184129A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements

Definitions

  • the present invention relates to the field of time synchronization technologies in a network, and in particular, to a unicast-based time synchronization implementation method, apparatus, and network device.
  • time synchronization protocols have received more and more attention and extensive applications in communication networks.
  • PTP Precision Time Protocol
  • time synchronization protocols Most of them exist in the ring network and require time synchronization path backup.
  • the encapsulation format is multicast by default, but multicast has flooding and security control problems.
  • the unicast negotiation mechanism is clearly defined in the IEEE1588v2 standard. It stipulates that any available port can send unicast requests. Any port can answer unicast requests. However, the time synchronization networking topology under unicast is not described. The time synchronization networking topology under multicast is clearly designed, and the BMCA algorithm is defined to control the networking topology.
  • the IEEE1588v2 unicast negotiation mechanism is adopted to specify the behavior of unicast negotiation and the corresponding topology algorithm, so that unicast can be applied in the packet frequency recovery network, but G.
  • the network model defined by the 8265.1 standard is very limited. The model defined by it does not apply to the ring network time synchronization network. How to use unicast to complete time network deployment in the ring network is a problem that needs to be solved.
  • the embodiment of the invention provides a unicast-based time synchronization implementation method, device and network device, which implements a time synchronization networking topology at least in a unicast network.
  • the technical solution adopted by the embodiment of the present invention is the unicast-based time synchronization implementation method, and the process performed by any network device in the network includes:
  • Unicast time synchronization negotiation to neighbor network devices including:
  • A1 The any network device periodically sends a time synchronization request to the neighbor network device, and responds according to the time synchronization request of the other party;
  • step A2 If the other party agrees and replies to the time synchronization information, the negotiation is successful, and step A1 is repeated; otherwise, the negotiation fails. Repeat step A1.
  • the performing the port state selection includes: when the first precision time synchronization protocol PTP port of the any network device is connected to the second PTP port of a neighbor network device, based on the BMC (Best Master Clock, the best) The primary clock) determines the role of the first PTP port and the second PTP port; between any two adjacent network devices, the role of the port represents the role of the network device;
  • the time synchronization with the neighbor network device includes:
  • the time synchronization information is replied based on the received time synchronization request
  • synchronization is performed based on the received time synchronization information.
  • the any network device periodically sends a time synchronization request to the neighbor network device, including:
  • the neighboring network device is periodically requested to send the announce message, the sync message, and the delay response message to the neighboring network device.
  • the neighboring network device When the role of any network device is master, passive, pre-master, or listening, the neighboring network device is periodically requested to send the announce message to the neighboring network device in the set sending mode.
  • the content of the set transmission mode includes: a keep-alive period and a transmission frequency of each type of message.
  • the responding based on the time synchronization request of the other party includes:
  • the method further includes:
  • the set frequency is at least greater than the frequency corresponding to the keep-alive period.
  • the networking form of the network includes: a ring network or a chain network.
  • the set frequency is greater than the sending frequency of the announce message during the time synchronization process.
  • the present invention further provides a unicast-based time synchronization implementation device, which is disposed in any network device in a network, where the device includes: a negotiation module and a synchronization module, respectively, for each neighbor network device of the any network device Perform the following functions:
  • the negotiation module is configured to perform unicast time synchronization negotiation to the neighbor network device.
  • the synchronization module is configured to perform port state selection during negotiation, and when performing with a neighbor network device Synchronized.
  • the negotiation module includes:
  • the processing module is configured to periodically send a time synchronization request to the neighbor network device, and respond according to the time synchronization request of the other party; if the other party agrees and replies to the time synchronization information, the negotiation succeeds; otherwise, the negotiation succeeds; failure;
  • the callback module is set to recall the processing module when the negotiation is successful and the negotiation fails.
  • the synchronization module is set to:
  • the role of the PTP port; between any two adjacent network devices, the role of the port represents the role of the network device;
  • the time synchronization information is replied based on the received time synchronization request of the neighbor network device;
  • synchronization is performed based on the time synchronization information of the received neighbor network device.
  • the present invention also provides a network device, including the above-described unicast-based time synchronization implementation apparatus.
  • the embodiment of the present invention has at least the following advantages:
  • the unicast-based time synchronization implementation method, device, and network device according to the embodiment of the present invention are compared with related technologies.
  • the embodiment of the present invention proposes a unicast mode and requests a unicast request. Interval to control the interworking speed of packets.
  • the unicast encapsulation is connected to the mature multicast topology calculation model, which solves the problem of unicast deployment in the ring network. This solution can not only complete the unicast ring network requirements, but also It also supports the network topology requirements of a single multicast hybrid application.
  • FIG. 1 is a flowchart of a method for implementing time synchronization based on unicast according to a first embodiment of the present invention
  • FIG. 2 is a flowchart of a method for implementing time synchronization based on unicast according to a second embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a unicast-based time synchronization implementation apparatus according to a third embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a unicast topology of a ring network according to a sixth embodiment of the present invention.
  • FIG. 5 is a schematic diagram of topology switching in a ring network unicast when a fault occurs in the sixth embodiment of the present invention.
  • a first embodiment of the present invention is a unicast-based time synchronization implementation method. As shown in FIG. 1 , a process performed by any network device in a network includes:
  • Step S101 Perform unicast time synchronization negotiation to the neighbor network device.
  • step S101 includes:
  • A1 The any network device periodically sends a time synchronization request to the neighbor network device, and responds according to the time synchronization request of the other party;
  • step A2 If the other party agrees and replies to the time synchronization information, the negotiation is successful, and step A1 is repeated; otherwise, the negotiation fails, and step A1 is repeatedly executed.
  • the time synchronization information is specifically an announce message, a sync message, a delay response message, and the like. Time information carried. In practical applications, initially all network devices in the network are in the state of listening for the listening role.
  • the role of the network device is changed to master, so the roles of almost all network devices become The master, at this time, the any network device and the neighbor network device perform each other in the role of the master: sending a time synchronization request and replying the time synchronization information based on the time synchronization request of the other party, if the other party replies with the role of the master If the time synchronization information is used, the negotiation is successful; otherwise, the negotiation fails.
  • the existing unicast negotiation mechanism stipulates that any available port can send a unicast time synchronization request, and any available port can answer the unicast request.
  • the embodiment of the present invention is directed to the current situation that the unicast negotiation mechanism is not clearly defined. The embodiment stipulates that the ports between adjacent network devices can actively initiate time synchronization negotiation in the role of the master, and the port acting as the master must respond to the request of the other party, thereby determining the role represented by each port.
  • the A1 step is based on the other party's time synchronization request, when the role of any network device is master, the other party requests and answers; when the role of any network device is non-master, discard or reject Corresponding to the request.
  • Step S102 in the process of negotiation, performing port state selection and performing time synchronization with the neighbor network device.
  • the performing port state selection includes: determining, according to the BMC algorithm, that the first PTP port of the any network device is connected to the second PTP port of a neighbor network device
  • the role of the first PTP port and the second PTP port include: master, passive, pre-master, listening, slave, and uncalibrated. Among them, slave, master, and passive are steady-state roles, while pre-master, listening, and uncalibrated are transient roles. In order to make the following description more concise, between the roles of any two adjacent network devices, the role of the network device represents the role of the network device.
  • the time synchronization with the neighbor network device includes:
  • the time synchronization information is replied based on the received time synchronization request, so that the neighbor network device is synchronized according to the time synchronization information when the neighbor network device is in the slave role;
  • the received time synchronization information is synchronized.
  • the embodiment of the present invention specifies that any port of any network device needs to periodically send a time synchronization request to the corresponding neighbor network device, requesting to obtain time synchronization information. .
  • the port of the master role is obliged to reply to the time synchronization information based on the request of the neighbor network device.
  • This helps the multicast BMC algorithm to implement the planning topology in unicast mode, which will be applied to the multicast PTP smoothly.
  • the BMC algorithm is applied to unicast. Because the multicast does not have a request mechanism, each port actively sends time synchronization information according to the role of the master.
  • packet unicast encapsulation in addition to packet unicast encapsulation, other behaviors and The multicast situation is basically the same.
  • any network device periodically sends a time synchronization request to the neighbor network device, including:
  • the neighboring network device is periodically requested to send the announce message, the sync message, and the delay response message to the neighboring network device.
  • the neighboring network device When the role of any network device is master, passive, pre-master, or listening, the neighboring network device is periodically requested to send the announce message to the neighboring network device in the set sending mode.
  • the set transmission mode includes: a keep-alive period and a transmission frequency of each type of message. For example, it is set to send a message every 5 seconds within half an hour, wherein the keep-alive period is half an hour, and every 5 seconds is the transmission frequency of the message.
  • the networking form of the network includes: a ring network or a chain network.
  • the second embodiment of the present invention is a unicast-based time synchronization implementation method.
  • the method in this embodiment is substantially the same as the first embodiment. The difference is that, as shown in FIG. 2, the method in this embodiment includes In addition to the steps S201-202 corresponding to the steps S101-S102 of the first embodiment, the flow performed by any of the network devices further includes the following specific steps:
  • step S203 if the negotiation fails, the unicast time synchronization negotiation is re-requested to the neighbor network device at the set frequency; the set frequency is at least greater than the frequency corresponding to the keep-alive period.
  • the keep-alive period is a periodic period of time that the user presets the requesting neighbor network device to reply to the time synchronization information.
  • the set frequency is greater than the sending frequency of the announce message in the time synchronization process.
  • the third embodiment of the present invention corresponding to the first embodiment, the present embodiment introduces a unicast-based time synchronization implementation device, which is disposed in any network device in the network.
  • the device includes The following components: the negotiation module 100 and the synchronization module 200 perform the following functions for each neighbor network device of any one of the network devices:
  • the negotiation module 100 is configured to perform unicast time synchronization negotiation to the neighbor network device.
  • the negotiation module 100 includes:
  • the processing module is configured to periodically send a time synchronization request to the neighbor network device, and respond according to the time synchronization request of the other party; if the other party agrees and replies to the time synchronization information, the negotiation succeeds; otherwise, the negotiation succeeds; failure;
  • the callback module is set to recall the processing module when the negotiation is successful and the negotiation fails.
  • the role of the network device is changed to master, so the roles of almost all network devices become The master, at this time, the any network device is executed by the negotiation module 100 and the neighbor network device to each other in the role of the master: sending a time synchronization request and replying the time synchronization information based on the time synchronization request of the other party, if the other party is master The role replies to the time synchronization information, then the negotiation is successful; otherwise the negotiation fails.
  • the performing the port state selection includes: when the first PTP port of the any network device is connected to the second PTP port of a neighbor network device, based on the BMC (Best Master Clock)
  • the clock determines the roles of the first PTP port and the second PTP port; the types of roles include: master, passive, pre-master, listening, slave, and uncalibrated.
  • the role of the network device represents the role of the network device.
  • the synchronization module 200 is configured to perform port state selection during the negotiation process and perform time synchronization with the neighbor network device.
  • the synchronization module 200 is configured to:
  • the time synchronization information is replied based on the received time synchronization request of the neighbor network device, so that the neighbor network device is synchronized according to the time synchronization information when the neighbor network device is in the slave role.
  • the time synchronization information of the received neighbor network device is synchronized.
  • synchronization module 200 is configured to:
  • the neighboring network device is periodically requested to send the announce message, the sync message, and the delay response message to the neighboring network device.
  • the neighboring network device When the role of any network device is master, passive, pre-master, or listening, the neighboring network device is periodically requested to send the announce message to the neighboring network device in the set sending mode.
  • the set transmission mode includes: a keep-alive period and a transmission frequency of each type of message.
  • the networking form of the network includes: a ring network or a chain network.
  • the fourth embodiment of the present invention introduces a unicast-based time synchronization implementation device.
  • the device in this embodiment is substantially the same as the third embodiment, and the difference is that the negotiation module in this embodiment 100 also needs to complete the following functions when the negotiation fails:
  • the negotiation module 100 is further configured to request the unicast time synchronization negotiation to the neighbor network device at the set frequency in the case that the negotiation fails.
  • the set frequency is at least greater than the frequency corresponding to the keep alive period of the announce message.
  • the set frequency is greater than the sending frequency of the announce message in the time synchronization process.
  • any network device requests the unicast time synchronization negotiation to the neighbor network device through the negotiation module 100 at a higher frequency, in order to complete the topology response, so that the design can be performed in the BMC algorithm.
  • the announce packet is sent out quickly according to the request to prevent network turbulence caused by slow response.
  • the required request frequency is higher, and the sending frequency of the announce message is set, so that a better quick response effect can be achieved.
  • a fifth embodiment of the present invention includes the unicast-based time synchronization implementation device described in the foregoing third embodiment or the fourth embodiment.
  • the sixth embodiment of the present invention is based on the above embodiment, and uses an unicast ring network as an example to describe an application example of the present invention with reference to FIGS. 4-5.
  • ports of various roles of any network device in the ring network need to periodically request unicast request packets (similar to the time synchronization request in the previous embodiment) to request time synchronization negotiation.
  • port role selection and time synchronization In the process of negotiation, port role selection and time synchronization.
  • the master port of the PTP needs to receive and respond to the unicast request message, and needs to send the time synchronization information of the negotiated announce and sync messages.
  • the other port roles reject or not respond to the unicast request of the neighbor network device. Message.
  • any network device and its neighbor network devices perform the following operations:
  • the performing the port role selection includes: when the first PTP port of the any network device is connected to the second PTP port of a neighbor network device, the first PTP port and the first determined by the BMC algorithm
  • the role of the two PTP ports; the types of roles include: master, passive, pre-master, listening, slave, and uncalibrated.
  • the role of the port represents the role of the network device.
  • the following unicast negotiation interval control mode is adopted between any network device and its neighbor network devices:
  • the time synchronization information is periodically requested to the neighbor network device according to the keep-alive period configured by the user.
  • the time synchronization information of the request to the neighbor network device periodically needs to be maintained at a higher frequency. It is the sending frequency of the announce message.
  • the rate of failed master negotiation can be reduced to 60s.
  • a high-frequency request needs to be maintained in the ring network to complete the rapid response of the topology.
  • the announce message is sent out quickly.
  • the external behavior is the same as that of the multicast unicast encapsulation. This facilitates the multicast topology algorithm. Plan the topology to prevent network turbulence due to response speed.
  • the configuration destination address of the network device is configured first, so that each PTP port sends a unicast request packet.
  • the multicast topology algorithm (BMC algorithm) will time out the port as the master.
  • the port is successfully negotiated with each other and sends an announce packet.
  • the topology is generated according to the algorithm.
  • each port state sends a unicast request packet, but the roles are different.
  • the slave port is used to maintain the time from the master.
  • the passive port is used to keep the peer master port sending announce packets and keep the port in the passive state.
  • the request packet sent by the master port is rejected by the peer.
  • the packets sent by the master port are used to monitor the network topology. When the network sends changes, it can respond quickly.
  • the embodiment of the present invention needs to perform the following operations for each network device:
  • Step A Complete neighbor awareness by configuring an IP address of a neighboring port on each PTP port.
  • Step B Enable the ring network unicast mode
  • Step C The PTP port initiates a unicast time synchronization request packet to the configured IP address.
  • Step D The receiving end of the unicast time synchronization request message: if the master port accepts and responds to the request, the other role ports reject or do not respond to the request.
  • Step E After the master port successfully negotiates the issue of the announce packet, you can refer to the multicast mode to complete the topology calculation.
  • the E device cannot receive the F time, and the time information is degraded.
  • the D device changes the passive port to the master port.
  • the device E changes the time of tracking D, thereby completing the topology switching.
  • the unicast-based time synchronization implementation method, device, and network device compared with the prior art, the present invention proposes a unicast mode and limits the unicast request interval according to the actual requirements of the network deployment. To control the interworking speed of packets, and finally connect the unicast encapsulation to the mature multicast topology calculation model, which solves the problem of unicast deployment in the ring network.
  • This solution can not only complete the unicast ring network requirements, but also simultaneously Support network topology requirements for single multicast hybrid applications.
  • a unicast-based time synchronization implementation method, apparatus, and network device provided by the embodiments of the present invention have the following beneficial effects: according to the actual requirements of network deployment, a unicast mode is proposed, and a unicast request is obtained through constraints. The interval is used to control the interworking speed of packets. Finally, the unicast encapsulation is connected to the mature multicast topology calculation model, which solves the problem of unicast deployment in the ring network. This solution can not only complete the unicast ring network requirements. It also supports the network topology requirements of a single multicast hybrid application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

本发明提出了一种基于单播的时间同步实现方法、装置及网络设备,网络中的任一网络设备执行的流程包括:对所述任一网络设备的各邻居网络设备分别执行如下操作:向邻居网络设备进行单播时间同步协商;进行端口状态抉择,并与邻居网络设备进行时间同步。与相关技术相比较,本发明根据网络部署的现实要求,提出了单播模式、并通过约束单播请求的间隔来控制报文的互通速度,最后把单播封装接入已经成熟的组播拓扑计算模型,很好解决了环网中的单播部署问题,此方案不单能完成单播环网需求,也同时支持单组播混合应用的网络拓扑需求。

Description

一种基于单播的时间同步实现方法、装置及网络设备 技术领域
本发明涉及网络中的时间同步技术领域,尤其涉及一种基于单播的时间同步实现方法、装置及网络设备。
背景技术
随着PTP(Precision Time Protocol,精确时间同步协议)协议在电信网络中的大规模部署展开,时间同步协议在通讯网络中得到越来越多的重视和广泛的应用,目前运营商的时间同步网络大都以环网存在,并且要求实现时间同步路径备份,封装形式默认为组播,但组播存在洪泛、安全等控制问题。
单播协商机制在IEEE1588v2标准中有着明确定义,规定任意可用端口都可以发送单播请求,任意端口都可以应答单播请求,但对单播下的时间同步组网拓扑却没有描述,标准中只对组播下的时间同步组网拓扑有明确的设计,并定义了BMCA算法来控制组网拓扑。
由于ITU标准推出的G.8265.1标准来定义PTP的频率同步,采用IEEE1588v2单播协商机制,规定单播协商的行为及相应拓扑算法,使得单播能够在包频率恢复网络中得到应用,但是G.8265.1标准定义的网络模型很有限,其定义的模型不适用于环网时间同步网络,在环网中如何使用单播来完成时间网络部署,是一个需要解决的问题。
发明内容
本发明实施例提供了一种基于单播的时间同步实现方法、装置及网络设备,至少在单播网络中实现时间同步组网拓扑。
本发明实施例采用的技术方案是,所述基于单播的时间同步实现方法,网络中的任一网络设备执行的流程包括:
对所述任一网络设备的各邻居网络设备分别执行如下操作:
向邻居网络设备进行单播时间同步协商;
进行端口状态抉择,并与邻居网络设备进行时间同步。
向邻居网络设备进行单播时间同步协商,包括:
A1:所述任一网络设备周期性的向邻居网络设备发送时间同步请求,以及基于对方的时间同步请求而进行应答;
A2:若对方同意并回复了时间同步信息,则协商成功,重复执行步骤A1;否则协商失败, 重复执行步骤A1。
所述的进行端口状态抉择,包括:在所述任一网络设备的第一精确时间同步协议PTP端口与一邻居网络设备的第二PTP端口相连的情况下,基于BMC(Best Master Clock,最佳主时钟)算法确定出的所述第一PTP端口与第二PTP端口的角色;在任意两个相邻的网络设备之间,由端口的角色代表网络设备的角色;
所述的与邻居网络设备进行时间同步,包括:
当所述任一网络设备的角色为master时,基于接收到的时间同步请求而回复时间同步信息;
当所述任一网络设备的角色为slave时,基于接收到的时间同步信息进行同步。
所述任一网络设备周期性的向邻居网络设备发送时间同步请求,包括:
当任一网络设备的角色为slave或uncalibrated时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文、sync报文以及delay response报文;
当任一网络设备的角色为master、passive、pre-master、或listening时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文;
所述设定的发送方式的内容包含:保活周期和各类型报文的发送频率。
所述基于对方的时间同步请求而进行应答,包括:
当任一网络设备的角色为master时,同意对方请求并应答;当任一网络设备的角色为非master时,丢弃或拒绝对应请求。
在所述协商失败的情况下,还包括:
以设定的频率向邻居网络设备重新请求单播时间同步协商;所述设定的频率至少大于保活周期对应的频率。
所述网络的组网形式包括:环形组网或者链形组网。
当所述网络的组网形式为环形组网时,所述设定的频率大于时间同步过程中的announce报文的发送频率。
本发明还提供一种基于单播的时间同步实现装置,设置于网络中的任一网络设备中,所述装置包括:协商模块和同步模块,针对所述任一网络设备的各邻居网络设备分别执行如下功能:
所述协商模块,设置为向邻居网络设备进行单播时间同步协商;
所述同步模块,设置为在协商的过程中,进行端口状态抉择,并与邻居网络设备进行时 间同步。
所述协商模块,包括:
处理模块,设置为所述任一网络设备周期性的向邻居网络设备发送时间同步请求,以及基于对方的时间同步请求而进行应答;若对方同意并回复了时间同步信息,则协商成功;否则协商失败;
回调模块,设置为在协商成功和协商失败时均重新调用处理模块。
所述同步模块,设置为:
在所述任一网络设备的第一精确时间同步协议PTP端口与一邻居网络设备的第二PTP端口相连的情况下,基于最佳主时钟BMC算法确定出的所述第一PTP端口与第二PTP端口的角色;在任意两个相邻的网络设备之间,由端口的角色代表网络设备的角色;
当所述任一网络设备的角色为master时,基于接收到的邻居网络设备的时间同步请求而回复时间同步信息;
当所述任一网络设备的角色为slave时,基于接收到的邻居网络设备的时间同步信息进行同步。
本发明还提供一种网络设备,包括上述基于单播的时间同步实现装置。
采用上述技术方案,本发明实施例至少具有下列优点:
本发明实施例所述基于单播的时间同步实现方法、装置及网络设备,与相关技术相比较,本发明实施例根据网络部署的现实要求,提出了单播模式、并通过约束单播请求的间隔来控制报文的互通速度,最后把单播封装接入已经成熟的组播拓扑计算模型,很好解决了环网中的单播部署问题,此方案不单能完成单播环网需求,也同时支持单组播混合应用的网络拓扑需求。
附图说明
图1为本发明第一实施例的基于单播的时间同步实现方法流程图;
图2为本发明第二实施例的基于单播的时间同步实现方法流程图;
图3为本发明第三实施例的基于单播的时间同步实现装置组成结构示意图;
图4为本发明第六实施例环网单播拓扑结构示意图;
图5为本发明第六实施例发生故障时环网单播中的拓扑倒换示意图。
具体实施方式
为更进一步阐述本发明为达成预定目的所采取的技术手段及功效,以下结合附图及较佳实施例,对本发明进行详细说明如后。
本发明第一实施例,一种基于单播的时间同步实现方法,如图1所示,网络中的任一网络设备执行的流程,包括:
对所述任一网络设备的各邻居网络设备分别执行如下操作:
步骤S101,向邻居网络设备进行单播时间同步协商;
具体的,步骤S101包括:
A1:所述任一网络设备周期性的向邻居网络设备发送时间同步请求,以及基于对方的时间同步请求而进行应答;
A2:若对方同意并回复了时间同步信息,则协商成功,重复执行步骤A1;否则协商失败,重复执行步骤A1。本领域公知的,只要邻居网络设备回复了时间同步信息,则该邻居网络设备必然同意了该时间同步请求,这里的时间同步信息具体是指announce报文、sync报文、delay response报文等中携带的时间信息。在实际应用中,初始时,网络中的所有网络设备都处于监听listening角色的状态,若超时未收到时间同步信息,则将自身的角色转变为master,因此几乎所有网络设备的角色都变成了master,此时,所述任一网络设备与邻居网络设备互相向对方以master的角色执行:发送时间同步请求以及基于对方的时间同步请求而回复时间同步信息,若对方以master的角色回复了时间同步信息,则协商成功;否则协商失败。现有的单播协商机制规定任意可用端口都可以发送单播时间同步请求,任意可用端口都可以应答单播请求,本发明实施例针对这种当单播协商机制并未明确规定的现状,本实施例规定相邻的网络设备间的端口均可以以master的角色主动发起时间同步协商,并且作为master的端口必须应答对方的请求,从而确定出各端口所代表的角色。
此外,如果A1步骤中是基于对方的时间同步请求而进行应答,则当任一网络设备的角色为master时,同意对方请求并应答;当任一网络设备的角色为非master时,丢弃或拒绝对应请求。
进一步的,
步骤S102,在协商的过程中,进行端口状态抉择,并与邻居网络设备进行时间同步。
具体的,在步骤S102中,所述的进行端口状态抉择,包括:在所述任一网络设备的第一PTP端口与一邻居网络设备的第二PTP端口相连的情况下,基于BMC算法确定出的所述第一PTP端口与第二PTP端口的角色。角色的类型包括:master、passive、pre-master、listening、slave、和uncalibrated等,其中,slave、master、passive为稳态角色,而pre-master、listening、uncalibrated为瞬态角色。为了使下面的描述更加简洁明了,在任意两个相邻的网络设备之间,由端口的角色代表网络设备的角色。
所述与邻居网络设备进行时间同步,包括:
当所述任一网络设备的角色为master时,基于接收到的时间同步请求而回复时间同步信息,以供当时该邻居网络设备作为slave角色的情况下基于该时间同步信息进行同步;
当任一网络设备的角色为slave时,对接收到的时间同步信息进行同步。
实际上,在整个PTP的过程中,本发明实施例规定任一网络设备的端口不论是什么角色,都需要不停的周期性的向相应的邻居网络设备发送时间同步请求,请求获得时间同步信息。且master角色的端口均有义务基于邻居网络设备的请求而向其回复时间同步信息,这样有助于采用组播的BMC算法在单播情况下实现规划拓扑,顺利的将应用于组播PTP的BMC算法应用于单播,因为组播没有请求机制,各端口均是根据角色为master时而主动发送时间同步信息,本发明实施例可以使得对外表现上,除了报文单播封装外,其他行为与组播情况基本一致。
进一步的,所述任一网络设备周期性的向邻居网络设备发送时间同步请求,包括:
当任一网络设备的角色为slave或uncalibrated时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文、sync报文以及delay response报文;
当任一网络设备的角色为master、passive、pre-master、或listening时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文;
所述设定的发送方式中包含:保活周期和各类型报文的发送频率。例如:设定在半小时内每隔5秒发送一次报文,其中,保活周期即为半小时,每隔5秒即为报文的发送频率。
在本实施例中,网络的组网形式包括:环形组网或者链形组网。
本发明第二实施例,一种基于单播的时间同步实现方法,本实施例所述方法与第一实施例大致相同,区别在于,如图2所示,本实施例的所述方法除了包括与第一实施例步骤S101~S102对应的步骤S201~202之外,所述任一网络设备执行的流程还包括以下具体步骤:
步骤S203,在协商失败的情况下,以设定的频率向邻居网络设备重新请求单播时间同步协商;所述设定的频率至少大于保活周期对应的频率。该保活周期为用户预先设定的请求对方邻居网络设备回复时间同步信息的周期性时长。
优选的,当所述网络的组网形式为环形组网时,所述设定的频率大于时间同步过程中的announce报文的发送频率。
本发明第三实施例,与第一实施例对应,本实施例介绍一种基于单播的时间同步实现装置,设置于网络中的任一网络设备中,如图3所示,所述装置包括以下组成部分:协商模块100和同步模块200,针对所述任一网络设备的各邻居网络设备分别执行如下功能:
1)协商模块100,设置为向邻居网络设备进行单播时间同步协商;
具体的,协商模块100,包括:
处理模块,设置为所述任一网络设备周期性的向邻居网络设备发送时间同步请求,以及基于对方的时间同步请求而进行应答;若对方同意并回复了时间同步信息,则协商成功;否则协商失败;
回调模块,设置为在协商成功和协商失败时均重新调用处理模块。
在实际应用中,初始时,网络中的所有网络设备都处于监听listening角色的状态,若超时未收到时间同步信息,则将自身的角色转变为master,因此几乎所有网络设备的角色都变成了master,此时,所述任一网络设备通过协商模块100与邻居网络设备互相向对方以master的角色执行:发送时间同步请求以及基于对方的时间同步请求而回复时间同步信息,若对方以master的角色回复了时间同步信息,则协商成功;否则协商失败。
进一步的,所述的进行端口状态抉择,包括:在所述任一网络设备的第一PTP端口与一邻居网络设备的第二PTP端口相连的情况下,基于BMC(Best Master Clock,最佳主时钟)算法确定出的所述第一PTP端口与第二PTP端口的角色;角色的类型包括:master、passive、pre-master、listening、slave、和uncalibrated等。为了使下面的描述更加简洁明了,在任意两个相邻的网络设备之间,由端口的角色代表网络设备的角色。
2)同步模块200,设置为在协商的过程中,进行端口状态抉择,并与邻居网络设备进行时间同步。
具体的,同步模块200设置为:
当所述任一网络设备的角色为master时,基于接收到的邻居网络设备的时间同步请求而回复时间同步信息,以供当时该邻居网络设备作为slave角色的情况下基于该时间同步信息进行同步;
当所述任一网络设备的角色为slave时,对接收到的邻居网络设备的时间同步信息进行同步。
进一步的,同步模块200设置为:
当任一网络设备的角色为slave或uncalibrated时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文、sync报文以及delay response报文;
当任一网络设备的角色为master、passive、pre-master、或listening时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文;
所述设定的发送方式中包含:保活周期和各类型报文的发送频率。
在本实施例中,网络的组网形式包括:环形组网或者链形组网。
本发明第四实施例,与第二实施例对应,介绍一种基于单播的时间同步实现装置,本实施例所述装置与第三实施例大致相同,区别在于,本实施例中的协商模块100还需完成当协商失败时的如下功能:
协商模块100,还设置为,在协商失败的情况下,以设定的频率向邻居网络设备请求单播时间同步协商;所述设定的频率至少大于announce报文的保活周期对应的频率。
优选的,当所述网络的组网形式为环形组网时,所述设定的频率大于时间同步过程中的announce报文的发送频率。
本实施例中之所以设计当协商失败时,任一网络设备通过协商模块100以较高的频率向邻居网络设备请求单播时间同步协商,是为了完成拓扑的响应,这样设计,可以在BMC算法把PTP端口状态切换为master端口时,快速的依请求而发出announce报文,防止由于响应速度慢引起的网络动荡。在单播环网的情况下,所要求的请求频率更高,设定为announce报文的发送频率,这样能够达到更好的快速响应效果。
本发明第五实施例,一种网络设备,可以作为实体装置来理解,包括上述第三实施例或者第四实施例中所述的基于单播的时间同步实现装置。
本发明第六实施例,本实施例是在上述实施例的基础上,以单播环网形式为例,结合附图4~5介绍一个本发明的应用实例。
一、单播协商机制
本发明实施例最关键的就是规定了以下两个内容:
1)在PTP过程中,环网中的任一网络设备的各种角色的端口均需要通过周期性的发送单播请求报文(类似于前面实施例中的时间同步请求)来请求时间同步协商,在协商的过程中,进行端口角色抉择并进行时间同步。
2)PTP的master端口需要接收并应答该单播请求报文,同时需要发出协商成功的announce、sync报文的时间同步信息,其余的端口角色则拒绝或不响应邻居网络设备的该单播请求报文。
在初始时,任一网络设备与其各邻居网络设备均执行如下操作:
在实际应用中,初始时,网络中的所有网络设备都处于监听listening角色的状态,若超时未收到时间同步信息,则将自身的角色转变为master,因此几乎所有网络设备的角色都变成了master,此时,所述任一网络设备与邻居网络设备互相向对方以master的角色执行:请求时间同步信息以及基于对方的请求而回复时间同步信息,若对方以master的角色回复了时间同步信息,则协商成功;否则协商失败。
所述进行端口角色抉择,包括:在所述任一网络设备的第一PTP端口与一邻居网络设备的第二PTP端口相连的情况下,基于BMC算法确定出的所述第一PTP端口与第二PTP端口的角色;角色的类型包括:master、passive、pre-master、listening、slave、和uncalibrated。
在任意两个相邻的网络设备之间,由端口的角色代表网络设备的角色。
二、单播协商间隔控制
在任一网络设备与其各邻居网络设备之间均遵循以下单播协商的间隔控制方式:
协商成功时,按照用户配置的保活周期向邻居网络设备周期性的请求时间同步信息;协商失败时,需要维持在较高频率向邻居网络设备周期性的请求时间同步信息,该较高频率可以是announce报文的发送频率。
对比G.8265.1的设计,其协商失败时,对失败的master协商速率可以降至60s一次,本实施例在环网中需要维持一个高频请求,是为了完成拓扑的快速响应,这样设计,可以在拓扑算法把PTP端口状态切换为master端口时,快速的发出announce报文,使得对外表现上,除了报文单播封装外,其他行为与组播情况基本一致,这样便于采用组播的拓扑算法来规划拓扑,防止由于响应速度引起网络动荡。
三、具体组网部署说明
如图4所示,先通过配置网络设备的协商目的地址,这样每个PTP端口都会向外发送单播请求报文,由于组播的拓扑算法(BMC算法)会在初始时把端口超时为master端口,所以会相互协商成功,并发送announce报文,然后按照算法生成拓扑,此时网络中,各个端口状态都会发送单播请求报文,但各自作用不同。slave端口是为了维持从master获取时间;passive端口是为了维持对端master端口发送announce报文,使本端口保持在passive状态。master端口发出请求报文会被对端拒绝,其发送的报文起了监控网络拓扑作用,当网络发送变化时,能快速响应。
总结起来,本发明实施例针对每台网络设备均需执行如下操作:
步骤A:通过在每个PTP端口上配置相邻端口的IP地址完成邻居感知;
步骤B:开启环网单播模式;
步骤C:PTP端口向配置的IP地址发起单播时间同步请求报文;
步骤D:单播时间同步请求报文的接收端:若是master端口则接受并应答请求,其他角色端口则拒绝或不响应请求。
步骤E:在master端口协商成功发出announce报文后,就可以参考组播模式完成拓扑计算。具体如图5所示,当设备E与F间发送故障时,此时E设备无法收到F给的时间,其时间信息发生了降质,此时D设备就会把passive端口变为master端口,进而响应设备E的单播请求,设备E检测到D设备后,改成跟踪D的时间,从而完成了拓扑倒换。
本发明实施例所述基于单播的时间同步实现方法、装置及网络设备,与现有技术相比较,本发明根据网络部署的现实要求,提出了单播模式、并通过约束单播请求的间隔来控制报文的互通速度,最后把单播封装接入已经成熟的组播拓扑计算模型,很好解决了环网中的单播部署问题,此方案不单能完成单播环网需求,也同时支持单组播混合应用的网络拓扑需求。
通过具体实施方式的说明,应当可对本发明为达成预定目的所采取的技术手段及功效得以更加深入且具体的了解,然而所附图示仅是提供参考与说明之用,并非用来对本发明加以限制。
工业实用性
如上所述,本发明实施例提供的一种基于单播的时间同步实现方法、装置及网络设备,具有以下有益效果:根据网络部署的现实要求,提出了单播模式、并通过约束单播请求的间隔来控制报文的互通速度,最后把单播封装接入已经成熟的组播拓扑计算模型,很好解决了环网中的单播部署问题,此方案不单能完成单播环网需求,也同时支持单组播混合应用的网络拓扑需求。

Claims (12)

  1. 一种基于单播的时间同步实现方法,网络中的任一网络设备执行的流程包括:
    对所述任一网络设备的各邻居网络设备分别执行如下操作:
    向邻居网络设备进行单播时间同步协商;
    进行端口状态抉择,并与邻居网络设备进行时间同步。
  2. 根据权利要求1所述的基于单播的时间同步实现方法,其中,所述向邻居网络设备进行单播时间同步协商,包括:
    A1:所述任一网络设备周期性的向邻居网络设备发送时间同步请求,以及基于对方的时间同步请求而进行应答;
    A2:若对方同意并回复了时间同步信息,则协商成功,重复执行步骤A1;否则协商失败,重复执行步骤A1。
  3. 根据权利要求1所述的基于单播的时间同步实现方法,其中,所述的进行端口状态抉择,包括:在所述任一网络设备的第一精确时间同步协议PTP端口与一邻居网络设备的第二PTP端口相连的情况下,基于最佳主时钟BMC算法确定出的所述第一PTP端口与第二PTP端口的角色;在任意两个相邻的网络设备之间,由端口的角色代表网络设备的角色;
    所述的与邻居网络设备进行时间同步,包括:
    当所述任一网络设备的角色为master时,基于接收到的时间同步请求而回复时间同步信息;
    当所述任一网络设备的角色为slave时,基于接收到的时间同步信息进行同步。
  4. 根据权利要求2所述的基于单播的时间同步实现方法,其中,所述步骤A1中的任一网络设备周期性的向邻居网络设备发送时间同步请求,包括:
    当任一网络设备的角色为slave或uncalibrated时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文、sync报文以及delay response报文;
    当任一网络设备的角色为master、passive、pre-master、或listening时,周期性的向邻居网络设备请求该邻居网络设备以设定的发送方式回复announce报文;
    所述设定的发送方式的内容包含:保活周期和各类型报文的发送频率。
  5. 根据权利要求2所述的基于单播的时间同步实现方法,其特征在于,所述基于对方的时间同步请求而进行应答,包括:
    当任一网络设备的角色为master时,同意对方请求并应答;当任一网络设备的角色为非master时,丢弃或拒绝对应请求。
  6. 根据权利要求2所述的基于单播的时间同步实现方法,其中,在所述协商失败的情况下,还包括:
    以设定的频率向邻居网络设备重新请求单播时间同步协商;所述设定的频率至少大于保活周期对应的频率。
  7. 根据权利要求6所述的基于单播的时间同步实现方法,其中,所述网络的组网形式包括:环形组网或者链形组网。
  8. 根据权利要求7所述的基于单播的时间同步实现方法,其中,当所述网络的组网形式为环形组网时,所述设定的频率大于时间同步过程中的announce报文的发送频率。
  9. 一种基于单播的时间同步实现装置,设置于网络中的任一网络设备中,所述装置包括:协商模块和同步模块,对所述任一网络设备的各邻居网络设备分别执行如下功能:
    所述协商模块,设置为向邻居网络设备进行单播时间同步协商;
    所述同步模块,设置为进行端口状态抉择,并与邻居网络设备进行时间同步。
  10. 根据权利要求9所述的基于单播的时间同步实现装置,其中,所述协商模块,包括:
    处理模块,设置为所述任一网络设备周期性的向邻居网络设备发送时间同步请求,以及基于对方的时间同步请求而进行应答;若对方同意并回复了时间同步信息,则协商成功;否则协商失败;
    回调模块,设置为在协商成功和协商失败时均重新调用处理模块。
  11. 根据权利要求10所述的基于单播的时间同步实现装置,其中,所述同步模块,设置为:
    在所述任一网络设备的第一精确时间同步协议PTP端口与一邻居网络设备的第二PTP端口相连的情况下,基于最佳主时钟BMC算法确定出的所述第一PTP端口与第二PTP端口的角色;在任意两个相邻的网络设备之间,由端口的角色代表网络设备的角色;
    当所述任一网络设备的角色为master时,基于接收到的邻居网络设备的时间同步请求而回复时间同步信息;
    当所述任一网络设备的角色为slave时,基于接收到的时间同步信息进行同步。
  12. 一种网络设备,包括如权利要求9-11中任一项所述的单播的时间同步实现装置。
PCT/CN2016/070075 2015-05-21 2016-01-04 一种基于单播的时间同步实现方法、装置及网络设备 WO2016184129A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510263983.2 2015-05-21
CN201510263983.2A CN106301645A (zh) 2015-05-21 2015-05-21 一种基于单播的时间同步实现方法、装置及网络设备

Publications (1)

Publication Number Publication Date
WO2016184129A1 true WO2016184129A1 (zh) 2016-11-24

Family

ID=57319299

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/070075 WO2016184129A1 (zh) 2015-05-21 2016-01-04 一种基于单播的时间同步实现方法、装置及网络设备

Country Status (2)

Country Link
CN (1) CN106301645A (zh)
WO (1) WO2016184129A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191088A (zh) * 2020-01-02 2020-05-22 武汉大学 一种跨界服务需求分析方法、***和可读介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221730A (zh) * 2020-09-04 2022-03-22 华为技术有限公司 报文处理方法、装置、设备、***及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667909B (zh) * 2009-09-25 2011-12-07 华为技术有限公司 时钟对接方法、时钟设备及时钟对接***
CN102611546A (zh) * 2011-01-25 2012-07-25 中兴通讯股份有限公司 一种ptp时钟单播组播混合时钟***及时钟同步方法
CN102843205A (zh) * 2012-09-03 2012-12-26 杭州华三通信技术有限公司 一种基于精确时间协议的时间同步收敛的方法和装置
CN104170291A (zh) * 2012-02-22 2014-11-26 瑞典爱立信有限公司 用于处理精确时间协议的方法和网络节点

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789954B (zh) * 2009-01-24 2012-08-29 华为技术有限公司 单播环境下的通信方法、设备及***
US9369224B2 (en) * 2013-01-30 2016-06-14 Huawei Technologies Co., Ltd. Clock synchronization method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667909B (zh) * 2009-09-25 2011-12-07 华为技术有限公司 时钟对接方法、时钟设备及时钟对接***
CN102611546A (zh) * 2011-01-25 2012-07-25 中兴通讯股份有限公司 一种ptp时钟单播组播混合时钟***及时钟同步方法
CN104170291A (zh) * 2012-02-22 2014-11-26 瑞典爱立信有限公司 用于处理精确时间协议的方法和网络节点
CN102843205A (zh) * 2012-09-03 2012-12-26 杭州华三通信技术有限公司 一种基于精确时间协议的时间同步收敛的方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191088A (zh) * 2020-01-02 2020-05-22 武汉大学 一种跨界服务需求分析方法、***和可读介质
CN111191088B (zh) * 2020-01-02 2022-02-01 武汉大学 一种跨界服务需求分析方法、***和可读介质

Also Published As

Publication number Publication date
CN106301645A (zh) 2017-01-04

Similar Documents

Publication Publication Date Title
TWI575917B (zh) 在不進行昂貴的網狀對等操作的情況下建立可靠路線
US9369224B2 (en) Clock synchronization method and device
EP2688307B1 (en) Wireless communication system for offline participation in a display session
CN101616163B (zh) 精确时间传递协议报文处理方法及装置
WO2016095099A1 (zh) 一种时间同步方法及装置
JP2022535385A (ja) TSNおよび5GS QoSマッピング-ユーザプレーンベースの方法
CN103001887A (zh) 一种链路保活方法、控制器及交换机
WO2020081060A1 (en) Synchronization in wireless networks for supporting ieee tsn-based industrial automation
CN103166729B (zh) 时钟同步方法及设备
WO2012068844A1 (zh) 一种主从时钟设备的时钟同步方法及***
TW201422024A (zh) 進行設備至設備通信的方法以及對應的控制方法
TWI700573B (zh) 用於音訊 - 視訊中繼的無線對接系統
CN103067113A (zh) 基于聚合链路实现ptp时间同步的方法及装置
US20130336117A1 (en) Distributed processing scheme to support ieee 1588 ptp over multiple ports spanning a lag
WO2012034330A1 (zh) 汇聚式网络中设备间的同步方法、***和汇聚环设备
WO2012071910A1 (zh) 一种实现时间同步的方法及装置
WO2011134371A1 (zh) 一种同步时钟的方法和时钟同步装置
CN105227393A (zh) 一种双向转发检测方法
WO2016184129A1 (zh) 一种基于单播的时间同步实现方法、装置及网络设备
WO2015035851A1 (zh) 一种传输数据的方法及设备
WO2014168852A1 (en) Network device with tunnel establishment control based on site-type attribute received from other network device
CN106411446B (zh) 一种在单播模式下实现1588时间同步的自适应方法
US9654559B2 (en) Method, apparatus, and system for exchanging data of edge area user on cloud radio access network
US20230199683A1 (en) Clock synchronization mode indication method and communication apparatus
CN102404104B (zh) 基于不同延时机制的自适应同步方法及***

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: 16795616

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16795616

Country of ref document: EP

Kind code of ref document: A1