WO2014101453A1 - 基于聚合链路实现ptp时间同步的方法及装置 - Google Patents

基于聚合链路实现ptp时间同步的方法及装置 Download PDF

Info

Publication number
WO2014101453A1
WO2014101453A1 PCT/CN2013/082552 CN2013082552W WO2014101453A1 WO 2014101453 A1 WO2014101453 A1 WO 2014101453A1 CN 2013082552 W CN2013082552 W CN 2013082552W WO 2014101453 A1 WO2014101453 A1 WO 2014101453A1
Authority
WO
WIPO (PCT)
Prior art keywords
delay
line
port
ptp
asymmetric
Prior art date
Application number
PCT/CN2013/082552
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 WO2014101453A1 publication Critical patent/WO2014101453A1/zh

Links

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/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and apparatus for implementing time synchronization of Precision (Precision Time Protocol) based on an aggregated link. Background technique
  • IEEE 1588 The full name of IEEE 1588 is the precision clock synchronization protocol standard for network measurement and control systems. It is a general specification for improving the timing synchronization capability of network systems. It is mainly referenced by Ethernet in the drafting process, so that distributed communication networks can be strictly Timing synchronization.
  • IEEE 1588 V2 protocol the calculation of time is based on a single link, which limits the network deployed by 1588 to a network composed of a single link.
  • LACP link aggregation management protocol
  • a method for implementing PTP time synchronization based on an aggregated link including:
  • the single line average line delay is measured by a P2P delay mechanism or an E2E delay mechanism.
  • the master and slave frequencies are synchronized while measuring the single line average line delay Meandelay.
  • the method for calculating the asymmetric delay value of the link aggregation line according to the single line average line delay Meandelay and the asymmetric delay value Asymmetry is:
  • Asymmetry xy ((Meandelay x -Meandelayy) + (Asymmetry x + Asymmetry y )/2 where PTP packets enter from the X port of the link aggregation line and are sent from the y port.
  • the link aggregation line asymmetric delay value is dynamically updated, and the port switching event is notified to the LACP protocol.
  • the method for calculating the asymmetric delay value of the link aggregation line according to the single line average line delay Meandelay and the asymmetric delay value Asymmetry is:
  • the P2P packet is sent to the lower layer of the LACP protocol, and the asymmetric delay of the link aggregation line is calculated through independent P2P packets on all physical links of the aggregation port.
  • a device for implementing PTP time synchronization based on an aggregated link comprising:
  • Measurement module set to: measure single line average line delay Meandelay, and measure Single line asymmetric delay value Asymmetry;
  • Configure the module as follows: Configure the networking as a link aggregation line and use flow-by-flow to control PTP packets.
  • the monitoring module is configured to: monitor the inbound port of the upstream PTP packet, and monitor the outbound port of the PTP packet;
  • the calculation module is configured to: calculate an asymmetric delay value of the link aggregation line according to a single line average line delay Meandelay and an asymmetric delay value Asymmetry;
  • the correction module is set to: according to the LACP protocol, the time synchronization message sync is added with an asymmetric delay value on the ingress port, and the asymmetric delay value is subtracted from the egress port according to the delay request " ⁇ text delay-req" Correct incoming and outgoing PTP messages.
  • the measurement module measures the single line average line delay Meandelay through a P2P delay mechanism or an E2E delay mechanism.
  • the master device and the slave device keep the frequency synchronized.
  • the calculation module is configured to: ⁇ Calculate the asymmetric delay value of the link aggregation line using the following formula:
  • Asymmetry xy ((Meandelay x -Meandelayy) + (Asymmetry x + Asymmetry y )/2 where PTP packets enter from the X port of the link aggregation line and are sent from the y port.
  • the device for implementing PTP time synchronization based on the aggregated link further includes:
  • the switching module is configured to: switch the ingress and egress ports of the link aggregation line according to the LACP protocol, and notify the LACP protocol of the port switching event, and the calculation module is configured to: when the ingress and egress ports of the link aggregation line switch, the dynamic update chain Asymmetric delay value of the road aggregation line.
  • the calculation module is configured to: when the measurement module measures the single line average line delay Meandelay through the P2P delay mechanism, the P2P packet is sent to the lower layer of the LACP protocol, and the independent P2P is adopted on all physical links under the aggregation port.
  • the message calculates the asymmetric delay of the link aggregation line.
  • a master device includes the apparatus for implementing PTP time synchronization based on an aggregated link as described above, the apparatus comprising:
  • the measurement module is configured to: measure a single line average line delay Meandelay, and measure a single line asymmetric delay value Asymmetry;
  • Configure the module as follows: Configure the networking as a link aggregation line and use flow-by-flow to control PTP packets.
  • the monitoring module is configured to: monitor the inbound port of the upstream PTP packet, and monitor the outbound port of the PTP packet;
  • the calculation module is configured to: calculate an asymmetric delay value of the link aggregation line according to a single line average line delay Meandelay and an asymmetric delay value Asymmetry;
  • the correction module is set to: according to the LACP protocol, the time synchronization message sync is added with an asymmetric delay value on the ingress port, and the asymmetric delay value is subtracted from the egress port according to the delay request " ⁇ text delay-req" Correct incoming and outgoing PTP messages.
  • a slave device comprising the apparatus for implementing PTP time synchronization based on an aggregated link as described above, the apparatus comprising:
  • the measurement module is configured to: measure a single line average line delay Meandelay, and measure a single line asymmetric delay value Asymmetry;
  • Configure the module as follows: Configure the networking as a link aggregation line and use flow-by-flow to control PTP packets.
  • the monitoring module is configured to: monitor the inbound port of the upstream PTP packet, and monitor the outbound port of the PTP packet;
  • the calculation module is configured to: calculate an asymmetric delay value of the link aggregation line according to a single line average line delay Meandelay and an asymmetric delay value Asymmetry;
  • the correction module is set to: according to the LACP protocol, the time synchronization message sync is added with an asymmetric delay value on the ingress port, and the asymmetric delay value is subtracted from the egress port according to the delay request " ⁇ text delay-req" Correct incoming and outgoing PTP messages.
  • the method for calculating the line delay of a single link is pre-measured, and the method for calculating the asymmetric delay value under the link aggregation port is provided, which solves the problem that the prior art cannot correct the asymmetric line delay in the link aggregation port.
  • the problem at the time BRIEF abstract
  • 1 is a schematic diagram of dynamically calculating asymmetrical delay values of ports in an embodiment of the present invention
  • FIG. 2 is a schematic diagram of implementing PTP time synchronization by using an E2E delay synchronization mechanism in a link aggregation network according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of P2P delay synchronization in a link aggregation network according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an apparatus for implementing PTP time synchronization based on an aggregated link according to an embodiment of the present invention.
  • the technical solutions of the present invention are further described in detail below with reference to the accompanying drawings and specific embodiments to enable those skilled in the art to understand the invention. .
  • the method for implementing PTP time synchronization based on an aggregated link provided by the embodiment of the present invention includes the following implementation steps:
  • Step 1 Measure the single line average line delay Meandelay through the P2P delay mechanism or the E2E delay mechanism. In order to obtain accurate delay values, the frequency of the master and slave devices should be kept synchronized during the measurement.
  • Step 2 Measure the asymmetrical delay value of a single line by manual or other existing measurement methods.
  • Step 3 Configure the networking as a link aggregation line and use flow-by-flow to control PTP packets.
  • Step 5 Meandelay for measuring the average line delay of the single line through the E2E delay mechanism: Assume that the current time PTP is entered from the X port of the link aggregation line, and is sent from the y port, which is composed of the X port and the y port.
  • the asymmetric delay value of the link aggregation line can be as follows Calculation:
  • Asymmetry xy ((Meandelay x -Meandelayy) + (Asymmetry x +Asymmetry y ))/2; It is worth noting that this formula is applicable not only to link aggregation protocols, but also to other protocols or transmission methods involving multiple links. This formula is used to calculate the asymmetric delay value.
  • the asymmetric value is added to the ingress port, and the delayed request message delay-req is subtracted from the outbound port to correct the PTP entering and leaving the link aggregation line. Yan Wen.
  • the asymmetric delay value of the link aggregation line is dynamically updated according to the above formula, and the port switching event is notified to the LACP protocol, and the LACP protocol is cleared to introduce the line due to the line switching. Delayed step jumps to prevent jitter.
  • Step 6 For measuring the single line average line delay Meandelay through the P2P delay mechanism, the following two implementation schemes are used:
  • P2P packets are sent to the lower layer of the LACP protocol, and line delays are calculated through independent P2P packets on all physical links of the aggregation port, so that the path of the SYNC packet changes. , will not cause jitter in the delay calculation.
  • Figure 1 shows a schematic diagram of the port dynamic calculation of asymmetric delay values.
  • device A master device
  • device B slave device
  • the P2P delay mechanism is enabled on each link, and the average line delay of the four links is calculated as Meandelay x , Meandelay y , Meandelay z , and Meandelay u .
  • the asymmetric delay of the four links is obtained by measurement.
  • Asymmetry x , Asymmetry y 3 ⁇ 4 Asymmetry z , Asymmetry u then bind 4 links to a smartGroup interface and enable LACP.
  • the port delivery port of the PTP packet is calculated by the LACP protocol: XAB (A to B) and y BA (B to A);
  • Meandelay y -Asymmetry y ;
  • Asymmetryxy ((Meandelay x — Meandelay y )+(Asymmetry x +Asymmetryy))/2.
  • Asymmetry xx Asymmetry x , which is the formula given by the standard protocol.
  • FIG. 2 is a schematic diagram of the PTP time synchronization implemented by the E2E delay synchronization mechanism in the link aggregation network.
  • the method mainly includes the following steps:
  • Step 1 Calculate Meandelay x , Meandelay y , Meandelay z , Meandelay u ;
  • Step 2 Measure Asymmetry x , Asymmetry y , Asymmetry z , Asymmetry u ; Step 3. Bind x, y, z, u to a smartGroup interface, configure the PTP protocol on the smartGroup, and send and receive the device through the announce message.
  • B is configured as a slave device
  • device A is configured as a master device.
  • the device B detects that the SYNC packet of the device is sent through the X link, and detects that the device is configured to use the flow-through port of the PTP packet.
  • y The Asymmetry xy calculated above is configured to the x and y ports respectively.
  • the master/slave device operates according to the legend before the change, and the effect is equivalent to the single link mode; due to the LACP link change, the PTP message
  • the sending port changes, for example, the sending port is changed from y to z.
  • the PTP protocol detects this change, it immediately informs the LACP protocol calculation part to analyze the relevant related group time data, and discards the data with large jitter due to the link change.
  • Asymmetry is calculated according to the above formula and assigned to port X and z, when the protocol is completed Meandelay x ⁇ calculation section calculated, the new link has been established, the protocol can operate normally under It does not introduce the line asymmetric delay.
  • the LACP should use the flow-by-flow method to ensure the line is stable. Otherwise, every PTP packet may have a port change, even if there is no asymmetric delay. , can also cause the calculation to fail.
  • Figure 3 shows a schematic diagram of P2P delay synchronization in a link aggregation network.
  • FIG. 3 it describes a case where a PTP message is transmitted according to a physical port; as shown in FIG. 3, Asymmetry x , Asymmetry y , Asymmetry z , Asymmetry u are first measured, and then four physical chains are in x, y, z, and u.
  • the P2P delay calculation protocol is enabled on the road, and the control sending module does not let LACP control the P2P delay message.
  • Meanp2pdelay x , Meanp2pdelay y , Meanp2pdelay z , Meanp2pdelay u are calculated in real time; It is still controlled by LACP.
  • device B When device B receives SYNC message through X port, it uses 8 111111 ⁇ 2 ⁇ and Meanp2pdelay x to calculate. When SYNC is sent from z port due to LACP change, it uses Asymmetry z and Meanp2pdelay z to calculate. In this case, only the interface is required to control the correction field on the interface, and the protocol-insensitive port is not required.
  • the embodiment of the present invention further provides an apparatus for implementing PTP time synchronization based on an aggregated link.
  • the method includes:
  • the measuring module 100 is configured to measure a single line average line delay Meandelay, and is used for measuring a single line asymmetric delay value Asymmetry;
  • the configuration module 200 is configured to configure the networking into a link aggregation line, and use the flow-by-flow Control PTP packets;
  • the monitoring module 300 is configured to monitor an ingress port of the upstream PTP packet and monitor the outbound port of the PTP packet.
  • the calculation module 400 is configured to calculate an asymmetric delay value of the link aggregation line according to a single line average line delay Meandelay and an asymmetric delay value Asymmetry;
  • the correction module 500 is configured to add an asymmetric delay value to the ingress port according to the time synchronization message given by the LACP protocol, and subtract the asymmetric delay value from the egress port according to the delay request " ⁇ text delay-req" Correct incoming and outgoing PTP messages.
  • the measurement module 100 measures the single line average line delay Meandelay through a P2P delay mechanism or an E2E delay mechanism.
  • the measurement module 100 synchronizes the frequency of the master device with the slave device while measuring the average line delay Meandelay of the single line.
  • the device for implementing PTP time synchronization based on the aggregated link further includes:
  • the switching module 600 is configured to switch the inbound and outbound ports of the link aggregation line according to the LACP protocol, and notify the LACP protocol of the port switching event. Further, the calculating module 400 dynamically updates when the ingress and egress ports of the link aggregation line are switched.
  • the link aggregation line has an asymmetric delay value.
  • the calculation module 400 decentralizes the P2P message to the lower layer of the LACP protocol, and passes the independent P2P report on all physical links under the aggregation port.
  • the text calculates the asymmetric delay of the link aggregation line.
  • the embodiment of the present invention further provides a master device, which includes the device for implementing PTP time synchronization based on the aggregation link as described above.
  • the device includes:
  • the measuring module 100 is configured to measure a single line average line delay Meandelay, and is used for measuring a single line asymmetric delay value Asymmetry;
  • the configuration module 200 is configured to configure the networking into a link aggregation line, and use the flow-by-flow Control PTP packets;
  • the monitoring module 300 is configured to monitor an ingress port of the upstream PTP packet and monitor the outbound port of the PTP packet.
  • the calculation module 400 is configured to calculate an asymmetric delay value of the link aggregation line according to a single line average line delay Meandelay and an asymmetric delay value Asymmetry;
  • the correction module 500 is configured to add an asymmetric delay value to the ingress port according to the time synchronization message given by the LACP protocol, and subtract the asymmetric delay value from the egress port according to the delay request " ⁇ text delay-req" Correct incoming and outgoing PTP messages.
  • the embodiment of the present invention further provides a slave device, including the device for implementing PTP time synchronization based on the aggregation link as described above.
  • the device includes:
  • the measuring module 100 is configured to measure a single line average line delay Meandelay, and is used for measuring A single-line asymmetric delay value Asymmetry;
  • the configuration module 200 is configured to configure the networking as a link aggregation line, and use the flow-by-flow to control the PTP message;
  • the monitoring module 300 is configured to monitor an ingress port of the upstream PTP packet and monitor the outbound port of the PTP packet.
  • the calculation module 400 is configured to calculate an asymmetric delay value of the link aggregation line according to a single line average line delay Meandelay and an asymmetric delay value Asymmetry;
  • the correction module 500 is configured to add an asymmetric delay value to the ingress port according to the time synchronization message given by the LACP protocol, and subtract the asymmetric delay value from the egress port according to the delay request " ⁇ text delay-req" Correct incoming and outgoing PTP messages.
  • the embodiment of the present invention solves the problem that the prior art can not correct the non-corrected delay in the link aggregation port by measuring the line delay method of the single link in advance and the calculation method of the asymmetric delay value under the link aggregation port. Symmetric line delay problem.

Landscapes

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

Abstract

基于聚合链路实现PTP时间同步的方法及装置,所述方法包括:测量单一线路平均线路延时Meandelay;测量单一线路非对称延时值Asymmetry;将组网配置成链路聚合线路,并采用逐流来控制PTP报文;监控上游PTP报文的入端口,并监控PTP报文的出端口;依据单一线路平均线路延时Meandelay及非对称延时值Asymmetry计算链路聚合线路的非对称延时值;并依据LACP协议给出的时间同步报文sync在入端口加上非对称延时值,以及依据延迟请求报文delay-req在出端口减去非对称延时值,以校正进出的PTP报文。本发明实施例通过预先测量单一链路的线路延时方法,并给出链路聚合端口下非对称延时值的计算方法,解决了现有技术在链路聚合端口中不能校正非对称线路延时的问题。

Description

基于聚合链路实现 PTP时间同步的方法及装置
技术领域
本发明涉及通信领域, 具体而言, 涉及一种基于聚合链路实现 ΡΤΡ ( Precision Time Protocol , 精确时间同步协议) 时间同步的方法及装置。 背景技术
随着 3G ( 3rd-generation, 第三代移动通信技术) 网络的高速发展, PTP 时间同步协议在通讯网络中得到越来越多的重视和广泛的应用。 国内外运营 商不断的使用 PTP协议进行时间同步,逐步替换使用 GPS( Global Positioning System, 全球定位系统)进行时间同步的方式。
IEEE 1588的全称是网络测量和控制系统的精密时钟同步协议标准, 其 为通用的提升网络系统定时同步能力的规范, 在起草过程中主要参考以太网 来编制,使分布式通信网络能够具有严格的定时同步。在 IEEE 1588 V2协议 中, 时间的计算都是基于单一链路来推导的,这也就限定了 1588部署的网络 只能为单一链路组成的网络, 但为了增加链路传输能力, 运营商通常釆用多 条链路来分担业务, 此时就用到了链路聚合协议(LACP, Link Aggregation Control Protocol ) , 其用于实现链路动态汇聚。
由于在一段聚合链路中, 报文来回的线路不一定限制在一个接口上, 所 以协议上在单接口测量的非对称延时不能被直接使用, 在这种情况下, 如何 来校正非对称延时, 并且随着链路的变动如何重新设定非对称延时值, 是目 前需要解决的技术问题, 这是因为, 如果在每次变动后都釆用手工消除是不 现实的, 现在亟需一种能够自适应地来消除非对称延时的解决方法。 发明内容
为了动态消除聚合链路中由于线路不对等带来的非对称延时, 本发明的 目的在于提供一种基于聚合链路实现 ΡΤΡ时间同步的方法及系统。
为了达到本发明的目的, 本发明釆用以下技术方案实现: 一种基于聚合链路实现 PTP时间同步的方法, 包括:
测量单一线路平均线路延时 Meandelay;
测量单一线路非对称延时值 Asymmetry;
将组网配置成链路聚合线路, 并釆用逐流来控制 PTP报文;
监控上游 PTP报文的入端口, 并监控 PTP报文的出端口;
依据单一线路平均线路延时 Meandelay及非对称延时值 Asymmetry计算 链路聚合线路的非对称延时值; 并依据 LACP协议给出的时间同步报文 sync 在入端口加上非对称延时值,以及依据延迟请求报文 delay-req在出端口减去 非对称延时值, 以校正进出的 PTP报文。
优选地,通过 P2P延时机制或 E2E延时机制测量单一线路平均线路延时
Meandelay。
优选地, 在测量单一线路平均线路延时 Meandelay的时候, 主设备与从 设备的频率保持同步。
优选地, 依据单一线路平均线路延时 Meandelay 及非对称延时值 Asymmetry计算链路聚合线路的非对称延时值的方法为:
釆用如下公式计算链路聚合线路的非对称延时值:
Asymmetryxy=((Meandelayx-Meandelayy) + (Asymmetryx+Asymmetryy)/2 其中, PTP报文从链路聚合线路的 X端口进入, 从 y端口发出。
优选地, 在依据 LACP协议切换进出端口时, 动态更新链路聚合线路非 对称延时值, 同时把端口切换事件通告给 LACP协议。
优选地 ,当通过 P2P延时机制测量单一线路平均线路延时 Meandelay时 , 依据单一线路平均线路延时 Meandelay及非对称延时值 Asymmetry计算链路 聚合线路的非对称延时值的方法为:
将 P2P报文下放到 LACP协议下层, 并在聚合端口下所有物理链路上通 过独立的 P2P报文计算链路聚合线路非对称延时。
一种基于聚合链路实现 PTP时间同步的装置, 包括:
测量模块, 设置为: 测量单一线路平均线路延时 Meandelay, 以及测量 单一线路非对称延时值 Asymmetry;
配置模块,设置为:将组网配置成链路聚合线路,并釆用逐流来控制 PTP 报文;
监控模块,设置为: 监控上游 PTP报文的入端口, 并监控 PTP报文的出 端口;
计算模块, 设置为: 依据单一线路平均线路延时 Meandelay及非对称延 时值 Asymmetry计算链路聚合线路的非对称延时值;
校正模块,设置为: 依据 LACP协议给出的时间同步报文 sync在入端口 加上非对称延时值,以及依据延迟请求 "^文 delay-req在出端口减去非对称延 时值, 以校正进出的 PTP报文。
优选地,测量模块通过 P2P延时机制或 E2E延时机制测量单一线路平均 线路延时 Meandelay。
优选地, 测量模块在测量单一线路平均线路延时 Meandelay的时候, 主 设备与从设备的频率保持同步。
优选地, 计算模块设置为: 釆用如下公式计算链路聚合线路的非对称延 时值:
Asymmetryxy=((Meandelayx-Meandelayy) + (Asymmetryx+Asymmetryy)/2 其中, PTP报文从链路聚合线路的 X端口进入, 从 y端口发出。
优选地, 所述基于聚合链路实现 PTP时间同步的装置还包括:
切换模块, 设置为: 依据 LACP协议切换链路聚合线路的进出端口, 并 把端口切换事件通告给 LACP协议, 所述计算模块设置为: 在链路聚合线路 的进出端口发生切换时, 动态更新链路聚合线路非对称延时值。
优选地, 计算模块设置为: 当测量模块通过 P2P延时机制测量单一线路 平均线路延时 Meandelay时, 将 P2P报文下放到 LACP协议下层, 并在聚合 端口下所有物理链路上通过独立的 P2P报文计算链路聚合线路非对称延时。
一种主设备,其包括如上所述的基于聚合链路实现 PTP时间同步的装置, 所述装置包括: 测量模块, 设置为: 测量单一线路平均线路延时 Meandelay, 以及测量 单一线路非对称延时值 Asymmetry;
配置模块,设置为:将组网配置成链路聚合线路,并釆用逐流来控制 PTP 报文;
监控模块,设置为: 监控上游 PTP报文的入端口, 并监控 PTP报文的出 端口;
计算模块, 设置为: 依据单一线路平均线路延时 Meandelay及非对称延 时值 Asymmetry计算链路聚合线路的非对称延时值;
校正模块,设置为: 依据 LACP协议给出的时间同步报文 sync在入端口 加上非对称延时值,以及依据延迟请求 "^文 delay-req在出端口减去非对称延 时值, 以校正进出的 PTP报文。
一种从设备,其包括如上所述的基于聚合链路实现 PTP时间同步的装置, 所述装置包括:
测量模块, 设置为: 测量单一线路平均线路延时 Meandelay, 以及测量 单一线路非对称延时值 Asymmetry;
配置模块,设置为:将组网配置成链路聚合线路,并釆用逐流来控制 PTP 报文;
监控模块,设置为: 监控上游 PTP报文的入端口, 并监控 PTP报文的出 端口;
计算模块, 设置为: 依据单一线路平均线路延时 Meandelay及非对称延 时值 Asymmetry计算链路聚合线路的非对称延时值;
校正模块,设置为: 依据 LACP协议给出的时间同步报文 sync在入端口 加上非对称延时值,以及依据延迟请求 "^文 delay-req在出端口减去非对称延 时值, 以校正进出的 PTP报文。
本发明实施例通过预先测量单一链路的线路延时方法, 并给出链路聚合 端口下非对称延时值的计算方法, 解决了现有技术在链路聚合端口中不能校 正非对称线路延时的问题。 附图概述
图 1是本发明实施例中端口动态计算非对称延时值示意图;
图 2是本发明实施例中在链路聚合线络中釆用 E2E延时同步机制实现 PTP时间同步的示意图;
图 3是本发明实施例链路聚合网络中 P2P延时同步示意图;
图 4是本发明实施例提供的基于聚合链路实现 PTP时间同步的装置结构 示意图。
本发明目的的实现、 功能特点及优异效果, 下面将结合具体实施例以及 附图做进一步的说明。
本发明的较佳实施方式
下面结合附图和具体实施例对本发明所述技术方案作进一步的详细描述, 以使本领域的技术人员可以更好的理解本发明并能予以实施, 但所举实施例 不作为对本发明的限定。 本发明实施例提供的基于聚合链路实现 PTP时间同步的方法包括如下实 施步骤:
步骤 1、 通过 P2P延时机制或者 E2E延时机制测量单一线路平均线路延 时 Meandelay, 为了得到精准的延时值, 在测量的时候, 主从两侧设备的频 率最好保持同步。
步骤 2、 通过人工或者其他现有的测量方法测量单一线路非对称延时值
Asymmetry。
步骤 3、 将组网配置成链路聚合线路, 并釆用逐流来控制 PTP报文。 步骤 4、 监控上游 PTP报文入端口, 并监控 LACP协议得到本端 PTP报 文的出端口。
步骤 5、对于通过 E2E延时机制测量单一线路平均线路延时 Meandelay: 假设当前时刻 PTP才艮文从链路聚合线路的 X端口进入, 从 y端口发出, 则由 X端口及 y端口组成的这对链路聚合线路的非对称延时值可通过如下公 式计算:
Asymmetryxy=((Meandelayx-Meandelayy) + (Asymmetryx+Asymmetryy))/2; 值得注意的是, 该公式不仅适用于链路聚合协议, 其他涉及到多链路的 协议或者传送方式都适用该公式, 以计算非对称延时值。
然后按照 LACP协议给出的时间同步报文 sync在入端口加上非对称值, 延迟请求报文 delay-req在出端口减去非对称延时值,以校正链路聚合线路上 进出的 PTP才艮文。
在具体实施时, 并在 LACP协议切换进出端口时, 按照上述公式动态更 新链路聚合线路的非对称延时值, 同时把端口切换事件通告给 LACP协议, 由 LACP协议清除掉由于线路切换引入线路延时的阶跃跳变, 从而防止抖动 产生。
步骤 6、对于通过 P2P延时机制测量单一线路平均线路延时 Meandelay, 釆用如下两种实施方案:
A、 釆用类似于上述 E2E延时机制方案, 通过动态调整进 /出端口的非对 称延时值来消除链路聚合线路的非对称延时偏差, 这里对其不再赘述;
B、对 P2P报文做特殊处理: 把 P2P报文下放到 LACP协议下层, 并在聚合 端口下所有物理链路上通过独立的 P2P报文计算线路延时,这样不论 SYNC报 文的路径如何变化, 都不会引起时延计算的抖动。
图 1示出了端口动态计算非对称延时值示意图。
如图 1所示, 在本实例中, 设备 A (主设备)与设备 B (从设备) 间通 过 4条链路相连, 分别为链路 X 、 y、 z、 u。 分别在各个链路上启用 P2P延 时机制, 计算出 4 个链路的平均线路延时为 Meandelayx、 Meandelayy、 Meandelayz、 Meandelayu,通过测量方式得到 4 条链路的非对称延时为 Asymmetryx、 Asymmetryy ¾ Asymmetryz、 Asymmetryu, 然后绑定 4个链路为 一个 smartGroup接口, 并启用 LACP协议。
假设通过 LACP协议计算出来 PTP报文的端口传递端口: XAB(A到 B ) 与 yBA(B到 A);
则所述链路 X从设备 A到设备 B的延时为: XAB = Meandelayx +Asymmetryx
链路 y从 B到 A的延时为:
ΥΒΑ = Meandelayy -Asymmetryy
则 XAB与 yBA间的非对称延时为:
Figure imgf000009_0001
= ((Meandelayx +Asymmetryx)-(Meandelayy - Asy mmetryy))/ 2;
得到:
Asymmetryxy=((Meandelayx— Meandelayy)+(Asymmetryx+Asymmetryy))/2。
如果 PTP报文来回路径相同, 假设都通过 x链路, 则有:
Asymmetryxx= Asymmetryx, 即为标准协议给出的公式。
图 2示出了链路聚合线络中釆用 E2E延时同步机制实现 PTP时间同步的 示意图, 参考图 2, 其主要包括如下步骤:
步骤 1、 计算 Meandelayx、 Meandelayy、 Meandelayz、 Meandelayu;
步骤 2、 测量 Asymmetryx、 Asymmetryy、 Asymmetryz、 Asymmetryu; 步骤 3、 把 x 、 y、 z、 u绑在一个 smartGroup接口下, 把 PTP协议配置 在 smartGroup上, 通过 announce报文收发决定将设备 B配置为从 ( slave ) 设备, 将设备 A配置为主( master )设备; B设备检测到 A设备的 SYNC报 文通过 X链路发来 , 并检测到本设备 PTP报文的逐流端口为 y; 则把上述计 算得到的 Asymmetryxy分别配置给 x、 y端口, 此时主 /从设备按照变化前的 图例运行, 其效果等同于单链路模式; 由于 LACP链路变动, PTP报文的发 送端口发生变化,例如发送端口由 y改为 z;当 PTP协议检测到这个变化时, 马上通知 LACP协议计算部分让其分析近期相关组时间数据, 丟弃由于链路 变化抖动大的数据, 同时按照上述公式计算出 Asymmetry并配置给 X与 z 端口, 当协议计算部分完成 Meandelayx †算时, 新的链路建立起来, 协议可 以正常运行, 并不会引入线路非对称延时, 需要注意的是, LACP要釆用逐 流方式, 尽量保证线路稳定, 否则每个 PTP报文都存在端口变化的可能时, 即使不存在非对称延时, 也会导致计算失败。 图 3示出了链路聚合网络中 P2P延时同步示意图。
参考图 3 , 其描述了 PTP报文按照物理端口发送的情况; 如图 3所示, 先 测量 Asymmetryx、 Asymmetryy、 Asymmetryz、 Asymmetryu, 然后在 x、 y、 z、 u 4个物理链路上分别启用 P2P延时计算协议, 并且控制发送模块不让 LACP 控制 P2P延时报文, 则在设备 B上会实时计算出 Meanp2pdelayx、 Meanp2pdelayy, Meanp2pdelayz, Meanp2pdelayu;此时 SYNC4艮文还是受 LACP 控制, 当设备 B通过 X口接收 SYNC报文时, 釆用 8 11111½ ^与 Meanp2pdelayx 来计算; 当由于 LACP变化导致 SYNC从 z口上发送时, 釆用 Asymmetryz与 Meanp2pdelayz来计算, 此时只需要接口上按照不通端口来控制校正字段, 不 需要协议感知 ^艮文的入端口。
相应地,本发明实施例还提供了一种基于聚合链路实现 PTP时间同步的 装置, 参考图 4, 其包括:
测量模块 100 ,用于测量单一线路平均线路延时 Meandelay, 以及用于测 量单一线路非对称延时值 Asymmetry; 配置模块 200 ,用于将组网配置成链路聚合线路,并釆用逐流来控制 PTP 报文;
监控模块 300 , 用于监控上游 PTP报文的入端口, 并监控 PTP报文的出 端口;
计算模块 400 , 用于依据单一线路平均线路延时 Meandelay及非对称延 时值 Asymmetry计算链路聚合线路的非对称延时值;
校正模块 500 , 用于依据 LACP协议给出的时间同步报文 sync在入端口 加上非对称延时值,以及依据延迟请求 "^文 delay-req在出端口减去非对称延 时值, 以校正进出的 PTP报文。
具体地,测量模块 100通过 P2P延时机制或 E2E延时机制测量单一线路 平均线路延时 Meandelay。
具体地, 为了得到精准的非对称延时值, 测量模块 100在测量单一线路 平均线路延时 Meandelay的时候, 主设备与从设备的频率保持同步。
具体地,计算模块 400釆用如下公式计算链路聚合线路的非对称延时值: Asymmetryxy=((Meandelayx-Meandelayy) + (Asymmetryx+Asymmetryy)/2 其中, PTP报文从链路聚合线路的 x端口进入, 从 y端口发出。
具体地, 所述基于聚合链路实现 PTP时间同步的装置还包括:
切换模块 600, 用于依据 LACP协议切换链路聚合线路的进出端口, 并 把端口切换事件通告给 LACP协议, 进一步地, 所述计算模块 400在链路聚 合线路的进出端口发生切换时, 动态更新链路聚合线路非对称延时值。
具体地, 当测量模块 100通过 P2P延时机制测量单一线路平均线路延时 Meandelay时, 计算模块 400将 P2P报文下放到 LACP协议下层, 并在聚合端口 下所有物理链路上通过独立的 P2P报文计算链路聚合线路非对称延时。
相应地, 本发明实施例还提供了一种主设备, 其包括如上所述的基于聚 合链路实现 PTP时间同步的装置, 继续参考图 4, 所述装置包括:
测量模块 100 ,用于测量单一线路平均线路延时 Meandelay, 以及用于测 量单一线路非对称延时值 Asymmetry; 配置模块 200 ,用于将组网配置成链路聚合线路,并釆用逐流来控制 PTP 报文;
监控模块 300 , 用于监控上游 PTP报文的入端口, 并监控 PTP报文的出 端口;
计算模块 400 , 用于依据单一线路平均线路延时 Meandelay及非对称延 时值 Asymmetry计算链路聚合线路的非对称延时值;
校正模块 500 , 用于依据 LACP协议给出的时间同步报文 sync在入端口 加上非对称延时值,以及依据延迟请求 "^文 delay-req在出端口减去非对称延 时值, 以校正进出的 PTP报文。
对于所述基于聚合链路实现 PTP时间同步的装置的详细介绍请参考上文 所述, 这里对其不做重复赘述。
相应地, 本发明实施例还提供了一种从设备, 其包括如上所述的基于聚 合链路实现 PTP时间同步的装置, 继续参考图 4, 所述装置包括:
测量模块 100 ,用于测量单一线路平均线路延时 Meandelay, 以及用于测 量单一线路非对称延时值 Asymmetry; 配置模块 200,用于将组网配置成链路聚合线路,并釆用逐流来控制 PTP 报文;
监控模块 300, 用于监控上游 PTP报文的入端口, 并监控 PTP报文的出 端口;
计算模块 400, 用于依据单一线路平均线路延时 Meandelay及非对称延 时值 Asymmetry计算链路聚合线路的非对称延时值;
校正模块 500 , 用于依据 LACP协议给出的时间同步报文 sync在入端口 加上非对称延时值,以及依据延迟请求 "^文 delay-req在出端口减去非对称延 时值, 以校正进出的 PTP报文。
类似的,对于所述基于聚合链路实现 PTP时间同步的装置的详细介绍请 参考上文所述, 这里对其不做重复赘述。
以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换, 或直接 或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
工业实用性 本发明实施例通过预先测量单一链路的线路延时方法, 并给出链路聚合 端口下非对称延时值的计算方法, 解决了现有技术在链路聚合端口中不能校 正非对称线路延时的问题。

Claims

权 利 要 求 书
1、 一种基于聚合链路实现 PTP时间同步的方法, 包括:
测量单一线路平均线路延时 Meandelay;
测量单一线路非对称延时值 Asymmetry;
将组网配置成链路聚合线路, 并釆用逐流来控制 PTP报文;
监控上游 PTP报文的入端口, 并监控 PTP报文的出端口;
依据单一线路平均线路延时 Meandelay及非对称延时值 Asymmetry计算 链路聚合线路的非对称延时值; 并依据 LACP协议给出的时间同步报文 sync 在入端口加上非对称延时值, 以及依据延迟请求报文 delay-req在出端口减去 非对称延时值, 以校正进出的 PTP报文。
2、如权利要求 1所述的基于聚合链路实现 PTP时间同步的方法,其中, 通过 P2P延时机制或 E2E延时机制测量单一线路平均线路延时 Meandelay。
3、如权利要求 2所述的基于聚合链路实现 PTP时间同步的方法,其中, 在测量单一线路平均线路延时 Meandelay的时候, 主设备与从设备的频率保 持同步。
4、如权利要求 2所述的基于聚合链路实现 PTP时间同步的方法,其中, 依据单一线路平均线路延时 Meandelay及非对称延时值 Asymmetry计算链路 聚合线路的非对称延时值的方法为:
釆用如下公式计算链路聚合线路的非对称延时值:
Asymmetryxy=((Meandelayx-Meandelayy) + (Asymmetryx+Asymmetryy)/2 其中, PTP报文从链路聚合线路的 X端口进入, 从 y端口发出。
5、 如权利要求 1-4任一权利要求所述的基于聚合链路实现 PTP时间同 步的方法, 其中, 在依据 LACP协议切换进出端口时, 动态更新链路聚合线 路非对称延时值, 同时把端口切换事件通告给 LACP协议。
6、如权利要求 2所述的基于聚合链路实现 PTP时间同步的方法,其中, 当通过 P2P延时机制测量单一线路平均线路延时 Meandelay时 , 依据单一线 路平均线路延时 Meandelay及非对称延时值 Asymmetry计算链路聚合线路的 非对称延时值的方法为:
将 P2P报文下放到 LACP协议下层, 并在聚合端口下所有物理链路上通 过独立的 P2P报文计算链路聚合线路非对称延时。
7、 一种基于聚合链路实现 PTP时间同步的装置, 包括:
测量模块, 设置为: 测量单一线路平均线路延时 Meandelay, 以及测量 单一线路非对称延时值 Asymmetry;
配置模块,设置为:将组网配置成链路聚合线路,并釆用逐流来控制 PTP 报文;
监控模块,设置为: 监控上游 PTP报文的入端口, 并监控 PTP报文的出 端口;
计算模块, 设置为: 依据单一线路平均线路延时 Meandelay及非对称延 时值 Asymmetry计算链路聚合线路的非对称延时值;
校正模块,设置为: 依据 LACP协议给出的时间同步报文 sync在入端口 加上非对称延时值,以及依据延迟请求 "^文 delay-req在出端口减去非对称延 时值, 以校正进出的 PTP报文。
8、如权利要求 7所述的基于聚合链路实现 PTP时间同步的装置,其中, 测量模块通过 P2P 延时机制或 E2E 延时机制测量单一线路平均线路延时 Meandelay。
9、如权利要求 8所述的基于聚合链路实现 PTP时间同步的装置,其中, 测量模块在测量单一线路平均线路延时 Meandelay的时候, 主设备与从设备 的频率保持同步。
10、如权利要求 8所述的基于聚合链路实现 PTP时间同步的装置,其中, 计算模块设置为: 釆用如下公式计算链路聚合线路的非对称延时值:
Asymmetryxy=((Meandelayx-Meandelayy) + (Asymmetryx+Asymmetryy)/2 其中, PTP报文从链路聚合线路的 X端口进入, 从 y端口发出。
11、 如权利要求 7-10任一权利要求所述的基于聚合链路实现 PTP时间 同步的装置, 其中, 还包括:
切换模块, 设置为: 依据 LACP协议切换链路聚合线路的进出端口, 并 把端口切换事件通告给 LACP协议, 所述计算模块设置为: 在链路聚合线路 的进出端口发生切换时, 动态更新链路聚合线路非对称延时值。
12、如权利要求 8所述的基于聚合链路实现 PTP时间同步的装置,其中, 计算模块设置为: 当测量模块通过 P2P延时机制测量单一线路平均线路延时 Meandelay时, 将 P2P报文下放到 LACP协议下层, 并在聚合端口下所有物 理链路上通过独立的 P2P报文计算链路聚合线路非对称延时。
13、 一种主设备, 包括如权利要求 7-12 任一所述的基于聚合链路实现 PTP时间同步的装置。
14、 一种从设备, 包括如权利要求 7-12 任一所述的基于聚合链路实现 PTP时间同步的装置。
PCT/CN2013/082552 2012-12-24 2013-08-29 基于聚合链路实现ptp时间同步的方法及装置 WO2014101453A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210568196.5A CN103067113B (zh) 2012-12-24 2012-12-24 基于聚合链路实现ptp时间同步的方法及装置
CN201210568196.5 2012-12-24

Publications (1)

Publication Number Publication Date
WO2014101453A1 true WO2014101453A1 (zh) 2014-07-03

Family

ID=48109592

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082552 WO2014101453A1 (zh) 2012-12-24 2013-08-29 基于聚合链路实现ptp时间同步的方法及装置

Country Status (2)

Country Link
CN (1) CN103067113B (zh)
WO (1) WO2014101453A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067113B (zh) * 2012-12-24 2015-08-12 中兴通讯股份有限公司 基于聚合链路实现ptp时间同步的方法及装置
CN105099593B (zh) * 2014-05-05 2018-03-30 深圳市中兴微电子技术有限公司 一种时间同步的方法、设备和系统
CN105827570A (zh) * 2015-01-06 2016-08-03 中兴通讯股份有限公司 聚合网络精确时间协议时间同步方法、装置和系统
CN106375066B (zh) * 2016-09-06 2019-07-23 北京锦鸿希电信息技术股份有限公司 车辆自感知系统的报文生成方法及装置
US11638229B2 (en) 2017-02-28 2023-04-25 Apple Inc. Selective peer synchronization with mutual services
DE102018202787A1 (de) * 2017-02-28 2018-08-30 Apple Inc. Selektive Peer-Synchronisierung mit gegenseitigen Diensten
CN109120392A (zh) * 2017-06-22 2019-01-01 中兴通讯股份有限公司 时间转换方法及装置、设备、存储介质、处理器
CN110417503B (zh) * 2019-07-31 2021-03-05 锐捷网络股份有限公司 一种用于测试时钟网络延时的方法及数字通信设备
CN110740075B (zh) * 2019-09-06 2021-06-22 北京直真科技股份有限公司 一种以太网聚合链路精细化拨测与质量分析的方法
WO2023115403A1 (en) * 2021-12-22 2023-06-29 Telefonaktiebolaget Lm Ericsson (Publ) Methods and network devices for ptp clock synchronization

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080212497A1 (en) * 2007-03-01 2008-09-04 Ciena Corporation Method and system for span-based connection aggregation
CN101771467A (zh) * 2009-01-05 2010-07-07 华为技术有限公司 光纤不对称性测量的方法、装置和系统
CN101867573A (zh) * 2010-05-12 2010-10-20 华为技术有限公司 一种数据发送方法、装置和通信系统
CN102082697A (zh) * 2009-11-27 2011-06-01 华为技术有限公司 通信路径不对称延时测量方法、装置和系统
CN103067113A (zh) * 2012-12-24 2013-04-24 中兴通讯股份有限公司 基于聚合链路实现ptp时间同步的方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8154992B2 (en) * 2009-08-11 2012-04-10 Google Inc. System and method for graceful restart
CN102255633B (zh) * 2010-05-20 2015-08-12 中兴通讯股份有限公司 一种多机架用户备份的方法及系统
CN101984573B (zh) * 2010-11-15 2015-07-22 中兴通讯股份有限公司 分布式实现lacp标准状态机的方法及系统
CN102006157B (zh) * 2010-11-26 2015-01-28 中兴通讯股份有限公司 一种时间同步的方法和系统
CN102185718B (zh) * 2011-05-12 2014-06-25 杭州华三通信技术有限公司 一种系统升级方法及其装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080212497A1 (en) * 2007-03-01 2008-09-04 Ciena Corporation Method and system for span-based connection aggregation
CN101771467A (zh) * 2009-01-05 2010-07-07 华为技术有限公司 光纤不对称性测量的方法、装置和系统
CN102082697A (zh) * 2009-11-27 2011-06-01 华为技术有限公司 通信路径不对称延时测量方法、装置和系统
CN101867573A (zh) * 2010-05-12 2010-10-20 华为技术有限公司 一种数据发送方法、装置和通信系统
CN103067113A (zh) * 2012-12-24 2013-04-24 中兴通讯股份有限公司 基于聚合链路实现ptp时间同步的方法及装置

Also Published As

Publication number Publication date
CN103067113A (zh) 2013-04-24
CN103067113B (zh) 2015-08-12

Similar Documents

Publication Publication Date Title
WO2014101453A1 (zh) 基于聚合链路实现ptp时间同步的方法及装置
Nasrallah et al. Ultra-low latency (ULL) networks: The IEEE TSN and IETF DetNet standards and related 5G ULL research
US11838106B2 (en) Synchronization method and apparatus
EP2530860B1 (en) A method and apparatus for transporting time related information in a packet switched network
US10181919B2 (en) Synchronization method, controller, synchronization node, synchronous network, and storage medium
EP4030731A1 (en) Symmetric path/link over lag interface using lldp for time synchronization between two nodes using ptp
US8571068B2 (en) Network timing distribution and synchronization using virtual network delays
US20130279525A1 (en) Ring Based Precise Time Data Network Clock Phase Adjustments
US20130145041A1 (en) Optimizing Timing Packet Transport
JP5455138B2 (ja) 高精度時間プロトコルメッセージを処理するための方法およびクロックデバイス
US20130163618A1 (en) Method for monitoring and managing data networks
WO2011134371A1 (zh) 一种同步时钟的方法和时钟同步装置
WO2013178148A1 (zh) 通信网络时钟同步方法和装置
US20130336117A1 (en) Distributed processing scheme to support ieee 1588 ptp over multiple ports spanning a lag
CN113424466B (zh) 时钟同步的方法和装置
US9203934B2 (en) Synchronization of clocks between two communication terminals using TCP/IP
WO2013107174A1 (zh) 光纤对称性检测方法及设备
WO2012071851A1 (zh) 根据网络抖动调整bfd发送间隔的方法及装置
WO2014101644A1 (zh) 传输数据的方法、设备和系统
WO2012155557A1 (zh) 一种异构网络中业务流的同步传输方法及系统
WO2020103540A1 (zh) 同步的方法和装置
Garner et al. New simulation and test results for IEEE 802.1 AS timing performance
Ferrari et al. High availability IEEE 1588 nodes over IEEE 802.1 aq shortest path bridging networks
JP5300099B2 (ja) ネットワーク制御装置、通信速度変更方法及びプログラム
WO2016184129A1 (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: 13868054

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

Country of ref document: EP

Kind code of ref document: A1