WO2014187369A1 - 时间同步处理方法及装置 - Google Patents

时间同步处理方法及装置 Download PDF

Info

Publication number
WO2014187369A1
WO2014187369A1 PCT/CN2014/078350 CN2014078350W WO2014187369A1 WO 2014187369 A1 WO2014187369 A1 WO 2014187369A1 CN 2014078350 W CN2014078350 W CN 2014078350W WO 2014187369 A1 WO2014187369 A1 WO 2014187369A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
instruction
time synchronization
timestamp
sending
Prior art date
Application number
PCT/CN2014/078350
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 US14/907,561 priority Critical patent/US20160173267A1/en
Priority to EP14801499.6A priority patent/EP3026861B1/en
Publication of WO2014187369A1 publication Critical patent/WO2014187369A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0008Synchronisation information channels, e.g. clock distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • 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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0864Round trip delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps

Definitions

  • the present invention relates to the field of communications, and in particular to a time synchronization processing method and apparatus.
  • OSPF Open Shortest Path First
  • Border Gateway Protocol Border Gateway Protocol
  • BGP Border Gateway Protocol
  • NAT Network Address Translation
  • MPLS Multi-Protocol Label Switching
  • OpenFlow Software Defined Network
  • the OpenFlow protocol is used to describe the standards used for the interaction between controllers and switches, as well as the interface standards for controllers and switches.
  • the core part of the protocol is the collection of information structures used in the OpenFlow protocol.
  • Table 1 is a schematic diagram of the FlowTable in the related art. As shown in Table 1, it consists of matching fields, counters, and the following fields of the instruction set:
  • Match Fields is the information taken from the header of the message, used to match a flow table; Counters are various statistical information for management; Instruction set refers to the operation of the message Commands, including discarding, forwarding packets to the specified port, setting the packet header field value, adding package tags, and so on.
  • the Action Set is associated with each message. It is passed between multiple flow tables in the pipeline and modified by the instructions of each flow table until the pipeline processing ends, forming the final action set.
  • the current latest OpenFlow 1.3.2 specifies 11 actions, namely: copy TTL inwards: the action of copying the TTL to the inner layer for the message; pop: the operation of applying the pop-up label to the message; push-vlan: The operation of the packet is applied to the vlan tag.
  • the push-mpls applies the mpls label to the packet.
  • the copy TTL outwards applies the TTL to the outer layer.
  • the decrement TTL the TTL of the packet is reduced.
  • the processing of the 1588 synchronization device timestamp in the related art includes: (1) For the 1588 Boundary Clock (BC) device, when the 1588 message is sent from the egress port, the current synchronization device needs to be recorded in the packet. Timestamp information; when receiving from the ingress port, it also needs to record the timestamp information of the current synchronization device in the message;
  • BC Boundary Clock
  • the time synchronization accuracy of the 1588 is very high.
  • the 1588 packet must be identified and timestamped at the location closest to the physical port.
  • the identification and timestamp processing of the 1588 packet must be performed simultaneously. , will introduce an uncertain delay, affecting the accuracy of time synchronization.
  • the 1588 time synchronization is implemented in the OpenFlow network.
  • the OpenFlow flow table configuration message is used to identify 1588 packets, and the corresponding timestamp processing instructions need to be supported.
  • the existing OpenFlow instruction and action can encapsulate and modify Ethemet, IP/MPLS, and PBB messages, but lack the processing instructions for 1588 synchronization messages, thus failing to achieve correct time synchronization.
  • a time synchronization processing method including: an instruction set extending the OpenFlow protocol, wherein the extended instruction set is used to implement time synchronization of the 1588 protocol; and the flow table configuration message is sent to the time synchronization device.
  • the flow table configuration message includes an extended instruction set, and the time synchronization device completes time synchronization processing according to the expanded instruction set.
  • the instruction set of the extended OpenFlow protocol includes at least one of the following: adding a timestamp instruction, where the timestamp generating instruction is used by the time synchronization device to receive a message at an ingress and/or to send a message at an egress.
  • a time synchronization processing method including: receiving a flow table configuration message sent by a software-defined network SDN controller, where the flow table configuration message includes an instruction set of an extended OpenFlow protocol.
  • the instruction set, the extended instruction set is used to implement time synchronization of the 1588 protocol; and the time synchronization processing is completed according to the extended instruction set.
  • the extended instruction set includes at least one of the following: generating a timestamp instruction, where the generating a timestamp instruction is used by the time synchronization device to receive a message at an ingress and/or generate a message when an egress sends a message
  • the time stamp of the message is sent, wherein the message to be sent is used for at least one of the following: sending a follow message while the master clock device sends the synchronization message, and receiving the synchronization message at the slave clock device Simultaneously sending a delay request message, sending a delay request response message while receiving the delay request message by the master clock device; expanding the metadata length instruction, wherein the extended metadata length instruction is used to expand the number of bytes of the metadata Writing a metadata instruction, wherein the write metadata instruction is for writing metadata; changing a correction field instruction, wherein the change correction field instruction is for modifying a correction field in the message; and copying the timestamp instruction, wherein , when copying The interstitial instruction is used to copy the time synchronization
  • a time synchronization processing apparatus including: an extension module, configured to extend an instruction set of an OpenFlow protocol, where the extended instruction set is used to implement time synchronization of the 1588 protocol; The module is configured to send a flow table configuration message to the time synchronization device, where the flow table configuration message includes an extended instruction set, and the time synchronization device completes time synchronization processing according to the extended instruction set.
  • the expansion module includes at least one of the following: a first adding unit, configured to add a timestamp instruction, where the generating a timestamp instruction is used by the time synchronization device to receive a message at an ingress and/or When the egress sends a message, the timestamp is generated; the second adding unit is configured to increase the sending message instruction, where the sending message instruction is used for at least one of the following: when the primary clock device sends the synchronization message Sending a follow message, sending a delay request message while receiving the synchronization message from the clock device, and transmitting a delay request response message while receiving the delay request message from the master clock device; the third adding unit is set to increase and expand a metadata length instruction, wherein the extended metadata length instruction is used to expand a number of bytes of metadata; and a fourth adding unit is configured to increase a write metadata instruction, wherein the write metadata instruction is used to write a meta Data; a fifth incrementing unit, configured to add a change correction field instruction, wherein the change correction field instruction is
  • the device further includes: a first receiving module, configured to receive a time synchronization parameter for calculating time synchronization fed back by the time synchronization device.
  • a time synchronization processing apparatus including: a second receiving module, configured to receive a flow table configuration message sent by a software defined network SDN controller, wherein the flow table configuration message includes an extension The instruction set obtained after the instruction set of the OpenFlow protocol, the extended instruction set is used to implement time synchronization of the 1588 protocol; and the processing module is configured to complete time synchronization processing according to the extended instruction set.
  • the extended instruction set includes at least one of the following: generating a timestamp instruction, where the generating a timestamp instruction is used by the time synchronization device to receive a message at an ingress and/or generate a message when an egress sends a message
  • the time stamp of the message is sent, wherein the message to be sent is used for at least one of the following: sending a follow message while the master clock device sends the synchronization message, and receiving the synchronization message at the slave clock device Simultaneous transmission delay Sending a delay request response message while the main clock device receives the delay request message; and expanding the metadata length instruction, wherein the extended metadata length instruction is used to expand the number of bytes of the metadata; a metadata instruction, wherein the write metadata instruction is used to write metadata; a change correction field instruction, wherein the change correction field instruction is used to change a correction field in a message; and copy a timestamp instruction, where The copy timestamp instruction is used to copy the time synchronization information of the field included in
  • the device further includes: a second sending module, configured to send a time synchronization parameter for calculating time synchronization to the SDN controller.
  • a second sending module configured to send a time synchronization parameter for calculating time synchronization to the SDN controller.
  • an instruction set that extends the OpenFlow protocol is used, wherein the extended instruction set is used to implement time synchronization of the 1588 protocol; and the flow table configuration message is sent to the time synchronization device, where the flow table configuration message includes the extended
  • the instruction set of the time synchronization device completes the time synchronization process according to the extended instruction set, and solves the problem that the OpenFlow protocol in the related art cannot achieve accurate time synchronization, thereby enabling the OpenFlow protocol to support accurate time synchronization. Expanded the effects of OpenFlow's application areas.
  • FIG. 1 is a flowchart of a time synchronization processing method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a time synchronization processing method according to an embodiment of the present invention
  • FIG. 3 is a time synchronization according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing a preferred structure of an expansion module 32 in a time synchronization processing device 1 according to an embodiment of the present invention
  • FIG. 5 is a block diagram showing a preferred structure of a time synchronization processing device according to an embodiment of the present invention
  • 6 is a structural block diagram of a time synchronization processing apparatus 2 according to an embodiment of the present invention
  • FIG. 7 is a block diagram showing a preferred structure of a time synchronization processing apparatus 2 according to an embodiment of the present invention
  • FIG. 8 is an OpenFlow based embodiment according to a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a time synchronization processing method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps: Step S102, extending the OpenFlow protocol An instruction set, where the extended instruction set is used to implement time synchronization of the 1588 protocol; Step S104, sending a flow table configuration message to the time synchronization device, where the flow table configuration message includes the extended instruction set, and the time synchronization device Time synchronization processing is completed according to the expanded instruction set.
  • the processing instruction of the 1588 protocol synchronization message is added, which not only solves the problem that the OpenFlow protocol in the related art cannot achieve accurate time synchronization, but also achieves the problem.
  • This enables OpenFlow to support accurate 1588 time synchronization and expands the application of OpenFlow.
  • a plurality of different instructions in the instruction set of the OpenFlow protocol may be extended.
  • the extended instruction set may include at least one of the following: adding a timestamp instruction, where Generating a timestamp instruction for the time synchronization device to generate a timestamp when the message is received at the ingress and/or when the message is sent by the egress; adding a message to send the message, wherein the message to be sent is used for at least one of the following: Sending a follow message when the master clock device sends the synchronization message, sending the delay request message while receiving the synchronization message from the clock device, and sending the delay request response message when the master clock device receives the delay request message.
  • the expanded metadata length instruction is for expanding the number of bytes of the metadata
  • adding a write metadata instruction wherein the write metadata instruction is for writing metadata
  • adding a change correction a field instruction wherein the change correction field instruction is used to change a correction field in the message
  • adding a copy timestamp instruction where the copy timestamp instruction is used to copy the time synchronization information of the field included in the delayed request message into a corresponding field in the delayed request response message.
  • the time synchronization parameter for calculating the time synchronization fed back by the time synchronization device may also be received, and then the received time synchronization parameter is saved and processed by such processing.
  • FIG. 2 is a flowchart of a time synchronization processing method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps: Step S202: Receive software Defining a flow table configuration message sent by the network SDN controller, where the flow table configuration message includes an instruction set obtained by extending an instruction set of the OpenFlow protocol, and the extended instruction set is used to implement time synchronization of the 1588 protocol; Step S204, The extended instruction set completes the time synchronization process.
  • the extension of the existing OpenFlow protocol instruction set is implemented in the SDN, so that the extended instruction set can implement the time synchronization of the 1588 protocol, and for the time synchronization device, the stream including the extended instruction set is received.
  • the table configuration message is completed, the time synchronization process is completed according to the extended instruction set included in the flow table configuration message, and the problem of accurate time synchronization cannot be achieved compared to the OpenFlow protocol in the related art, so that OpenFlow can support accurate 1588 time synchronization.
  • expanded the application field of OpenFlow it should be noted that, for implementing accurate 1588 protocol time synchronization, the extended instruction set may include multiple instructions.
  • the extended instruction set may include at least one of the following: generating a timestamp instruction, where the generation timestamp The instruction is used by the time synchronization device to generate a timestamp when the message is received at the ingress and/or when the message is sent at the egress; the message instruction is sent, wherein the message is sent to at least one of the following: Sending the following message while sending the synchronization message, sending the delay request message while receiving the synchronization message from the clock device, and sending the delay request response message while receiving the delay request message from the master clock device; a data length instruction, wherein the expanded metadata length instruction is for expanding a number of bytes of metadata; a write metadata instruction, wherein the write metadata instruction is for writing metadata; and a correction field instruction, wherein the change The correction field instruction is used to change the correction field in the message; the copy time stamp instruction, wherein the copy time The stamp instruction is used to copy the time synchronization information of the field included in the delay request message into the corresponding field in the delayed request response message.
  • the time synchronization device may further send a time synchronization parameter for calculating time synchronization to the SDN controller before the time synchronization processing is completed according to the expanded instruction set.
  • a time synchronization processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term "module" may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
  • FIG. 3 is a structural block diagram of a time synchronization processing apparatus 1 according to an embodiment of the present invention. As shown in FIG.
  • the apparatus includes an expansion module 32 and a first transmission module 34, which will be described below.
  • the expansion module 32 is configured to extend the instruction set of the OpenFlow protocol, where the extended instruction set is used to implement time synchronization of the 1588 protocol; the first sending module 34 is connected to the extension module 32, and configured to send the flow to the time synchronization device.
  • a table configuration message where the flow table configuration message includes an extended instruction set, and the time synchronization device completes time synchronization processing according to the expanded instruction set.
  • FIG. 4 is a block diagram showing a preferred structure of the expansion module 32 in the time synchronization processing apparatus 1 according to an embodiment of the present invention. As shown in FIG. 4, the expansion module 32 includes at least one of the following: a first adding unit 41 and a second adding unit 42.
  • the third increasing unit 43, the fourth increasing unit 44, the fifth increasing unit 45, and the sixth adding unit 46 The expansion module 32 will be described below.
  • the first adding unit 41 is configured to generate a timestamp instruction, where the timestamp generating instruction is used by the time synchronization device to generate a timestamp when the message is received at the ingress and/or when the message is sent out at the egress;
  • the unit 42 is configured to increase the sending message instruction, where the sending message instruction is used for at least one of: sending a follow message while the master clock device sends the synchronization message, and receiving the synchronization message at the slave clock device At the same time, the delay request message is sent, and the delay request message is sent while the master clock device receives the delay request message;
  • the third adding unit 43 is configured to increase the extended metadata length command, wherein the extended metadata length instruction a number of bytes for expanding the metadata;
  • a fourth adding unit 44 configured to add a write metadata command, wherein the write metadata command is used to write metadata; and a
  • FIG. 5 is a block diagram of a preferred structure of a time synchronization processing apparatus according to an embodiment of the present invention.
  • the apparatus includes a first receiving module 52 in addition to all the modules shown in FIG. The first receiving module 52 is described.
  • the first receiving module 52 is connected to the first sending module 34, and is configured to receive a time synchronization parameter for calculating time synchronization fed back by the time synchronization device.
  • a time synchronization processing device is also provided.
  • FIG. 6 is a structural block diagram of a time synchronization processing device 2 according to an embodiment of the present invention. As shown in FIG. 6, the device includes a second receiving module 62 and a processing module. 64. The device will be described below.
  • the second receiving module 62 is configured to receive a flow table configuration message sent by the software-defined network SDN controller, where the flow table configuration message includes an instruction set obtained by extending an instruction set of the OpenFlow protocol, and the extended instruction set is used to implement The time synchronization of the 1588 protocol; the processing module 64, connected to the second receiving module 62, is configured to complete the time synchronization processing according to the expanded instruction set.
  • the expanded instruction set may comprise a variety of different instructions for the time synchronization device to process different messages and timestamps
  • the different instructions may comprise at least one of the following: Generating a timestamp instruction, wherein the generating timestamp instruction is used by the time synchronization device to generate a timestamp when the message is received at the ingress and/or when the message is sent out at the egress; sending a message instruction, where the message is sent It is used in at least one of the following: sending a follow message when the master clock device sends the synchronization message, sending the delay request message while receiving the synchronization message from the clock device, and receiving the delay request message on the master clock device Simultaneously transmitting a delay request response message; expanding the metadata length instruction, wherein the expanded metadata length instruction is for expanding the number of bytes of the metadata; and writing the metadata instruction, wherein the write metadata instruction is for writing the element Data; a correction correction field instruction, wherein the change correction field instruction is used to change a correction
  • FIG. 7 is a block diagram showing a preferred structure of a time synchronization processing apparatus 2 according to an embodiment of the present invention.
  • the apparatus includes a second transmission module 72 in addition to all the modules shown in FIG.
  • the second transmitting module 72 will be described.
  • the second sending module 72 is connected to the second receiving module 62 and the processing module 64, and is configured to send a time synchronization parameter for calculating time synchronization to the SDN controller.
  • the processing instructions for the 1588 synchronization message are added, so that the OpenFlow protocol can support 1588 time synchronization and expand the application range of the OpenFlow.
  • the added OpenFlow instruction may include at least one of the following:
  • Generate timestamp which generates a precise time synchronization protocol (PTP) timestamp when receiving or exporting PTP packets from the ingress; the generated timestamp is used for subsequent calculations.
  • PTP time synchronization protocol
  • Push timestamp in the TC device, needs to generate an inbound timestamp and carry it in the tail of the ptp message;
  • the length of the metadata is expanded.
  • the time stamp is carried in the metadata, it is necessary to support a larger number of bytes.
  • the extended metadata length is 32 bytes.
  • Copy timestamp after receiving the Delay_req message, generate the timestamp T4 by using the generate timestamp.
  • FIG. 8 is a schematic diagram of time synchronization based on OpenFlow according to a preferred embodiment of the present invention.
  • the device involved in the process includes: SDN control And the OpenFlow synchronization device, wherein the OpenFlow synchronization device includes a master clock device, a master transparent device TC1, a transparent device TC2, a transparent device TC3, and a slave clock device, as shown in FIG. 8.
  • the OpenFlow-based 1588 time synchronization process includes The following steps are performed: Step S1, the OpenFlow synchronization device establishes a connection with the controller, and the controller queries the OpenFlow Switch for basic configuration information of the synchronization device and configures the basic parameters of the OpenFlow synchronization device. In step S2, the controller sends a Layer 2 neighboring device to the OpenFlow synchronization device.
  • the command message may be a Link Layer Discovery Protocol (LLDP), which is used to discover the topology of the OpenFlow synchronization network.
  • LLDP Link Layer Discovery Protocol
  • the controller sends a flow table (FlowTable) (or a flow table). Configure the message) to each OpenFlow synchronization device, The time synchronization is performed on the forwarding and time stamp processing of the 1588 packet; the processing instruction of the timestamp is added to the flow table configuration message; Step S4, on the primary clock device, the Sync (synchronization) message is sent to the downstream synchronization device at time T1.
  • FlowTable flow table
  • DMAC Distribution Media Access Control
  • EtherType EtherType
  • UDP User Data Protocol
  • the correctionField for example, can be handled as follows:
  • the extended Push timestamp command is used to record the incoming timestamp TS1 of the Sync message.
  • the TS1 timestamp can be carried in the Sync message (added at the end of the message, and cannot change the originTimestamp field of the Sync message body) ), you can also write metadata through the write-metadata command (metadata needs to be expanded to more than 10 bytes), and carry it to the lower-level flow table configuration message processing;
  • Step S6 the Sync message arrives at the TC2 and the TC3 device, and the processing flow is the same as that of the TC1;
  • the correction field of the Sync message will record the total dwell time of the three devices.
  • the device will obtain the sending timestamp T1 of the Sync message, the arrival timestamp T2, and the dwell time CFs of the intermediate device; these parameters will be sent to the SDN controller for saving and processing.
  • the slave slave immediately sends a Delay_req (delay request) message to the master device; at the egress, the flow table configuration message matches the 1588 message, and the Generate timestamp command records the timestamp T3;
  • the correction field in Delay_req is set to 0; in step S8, the Delay_req message passes through TC3, TC2, and P TC1, and the processing flow is the same as step S5; Step S9, the Delay_req message (delay request message) arrives at the master clock entry of the master clock, and the flow table The configuration message will match the 1588 packet.
  • the Generate timestamp command records the Delay_req entry timestamp T4.
  • the master clock device learns the arrival time of the Delay_req message and the resident time of the intermediate devices TC1, TC2 and TC3.
  • the parameters will be saved in the metadata (may be sent to the controller when the length is insufficient); then, the master clock master will send a Delay_resp message (delay request response message) to the slave device; at the exit, the flow table configuration message will match Delay_resp message, and copy the arrival time T4 and the dwell time of Delay_req to the Delay_resp message respectively.
  • Step S10 the Delay_resp message will be transparent when passing TC1, TC2 and TC3 Transmit, that is, there is no need to modify the correctionField field; Step S11, After the Delay_resp message arrives at the slave device, the Slave device will be able to learn the four timestamps (T1, T2, T3 and ⁇ 4) and learn the resident direction of the message.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
  • Industrial Applicability The above technical solution not only solves the problem that the OpenFlow protocol in the related art cannot achieve accurate time synchronization, but also enables the OpenFlow protocol to support accurate time synchronization and expand the application field of OpenFlow.

Landscapes

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

Abstract

本发明提供了一种时间同步处理方法及装置,该方法包括:扩展OpenFlow协议的指令集,其中,扩展后的指令集用于实现1588协议的时间同步;向时间同步设备发送流表配置消息,其中,该流表配置消息中包括扩展后的指令集,时间同步设备依据扩展后的指令集完成时间同步处理,通过本发明,解决了相关技术中的OpenFlow协议无法实现精确的时间同步的问题,进而达到了使OpenFlow协议能够支持精确的时间同步,扩大了OpenFlow的应用领域的效果。

Description

时间同步处理方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种时间同步处理方法及装置。 背景技术 对网络性能需求的不断提高, 使得不得不把很多复杂功能加入到路由器的体系结 构当中, 例如, 开放式最短路径优先 (Open Shortest Path First, 简称为 OSPF), 边界 网关协议 (Border Gateway Protocol, 简称为 BGP), 组播, 区分服务, 流量工程, 网 络地址转换 (Network Address Translation, 简称为 NAT), 防火墙, 多协议标签交换 (Multi-Protocol Label Switching, 简称为 MPLS) 等等。 这就使得路由器等交换设备 越来越臃肿而且性能提升的空间越来越小。 与网络领域的困境截然不同的是, 计算机领域实现了日新月异的发展。 回顾计算 机领域的发展, 不难发现其关键在于计算机领域找到了一个简单可用的硬件底层(x86 指令集)。 由于有了这样一个公用的硬件底层, 所以在软件方面, 不论是应用程序还是 操作系统都取得了飞速的发展。 现在很多主张重新设计计算机网络体系结构的人士认 为: 网络可以复制计算机领域的成功来解决现在网络所遇到的所有问题。 在这种思想 的指导下, 将来的网络必将是这样的: 底层的数据通路 (交换机、 路由器) 是"哑的、 简单的、 最小的", 并定义一个对外开放的关于流表的公用的应用程序编程接口 (Application Programming Interface, 简称为 API), 同时采用控制器来控制整个网络。 从而可以在控制器上自由的调用底层的 API来编程, 从而实现网络的创新。 基于上述的理念,出现了软件定义网络( Software Defined Network, 简称为 SDN), 其最初是由美国斯坦福大学 clean slate研究组提出的一种新型网络创新架构。 目前, 其核心技术 OpenFlow协议通过将网络设备控制面与数据面分离开来, 从而实现了网 络流量的灵活控制, 为核心网络及应用的创新提供了良好的平台。 OpenFlow协议用来 描述控制器和交换机之间交互所用信息的标准, 以及控制器和交换机的接口标准。 协 议的核心部分是用于 OpenFlow协议信息结构的集合。
OpenFlow FlowTable用来配置交换机转发路径, 表 1是相关技术中 FlowTable的 示意图, 如表 1所示, 它由匹配字段、 计数器和指令集以下几个字段构成:
Match Fields Priority Counters Instructions Timeouts Cookie 其中, Match Fields 是从报文的头部中取出的信息, 用于匹配一条流表; 计数器 (Counters)是用于管理用的各种统计信息; 指令集(Instructions)是指对报文的操作 指令, 包括丢弃、 转发报文到指定端口、 设置报文头部字段值、 增加封装标签等。 动 作集(Action Set)和每个报文相关联, 它在流水线的多个流表之间传递并被各流表的 指令所修改, 直到流水线处理结束, 形成最终的动作集。 例如, 当前最新的 OpenFlow 1.3.2规定了 11种动作, 分别是: copy TTL inwards: 对报文应用向内层复制 TTL的动 作; pop: 对报文应用弹出标签的操作; push-vlan: 对报文应用压入 vlan标签的操作; push-mpls: 对报文应用压入 mpls标签的操作; copy TTL outwards: 对报文应用向外层 复制 TTL的动作; decrement TTL: 报文的 TTL值减 1 ; set: apply all set- eld actions to the packet; qos: apply all QoS actions, such as set queue to the packet; group: if a group action is specified, apply the actions of the relevant group bucket ( s) in the order specified by this list; output: if no group action is specified, forward the packet on the port specified by the output action; push PBB, apply PBB tag push action to the packet。 在相关技术中对 1588同步设备时间戳的处理包括: ( 1 ) 对 1588边界时钟 (Boundary Clock, 简称为 BC) 设备, 当 1588报文从出 端口发出时, 需要在报文中记录当前同步设备的时间戳信息; 当从入端口收到时, 也 需要在报文中记录当前同步设备的时间戳信息;
(2)对 1588透明时钟(Transparent Clock,简称为 TC)设备, 当入端口收到 1588 报文时, 需要记录下入口时间戳; 当从出端口发出时, 需要记录下出口时间戳, 计算 出驻留时间(等于出口时间戳减去入口时间戳),并修正 1588报文中的 CorrectionField 字段 ( CF_new=CF_old+驻留时间);
1588对时间的同步精度要求极高, 要求 1588报文必须在最靠近物理端口的位置 进行报文识别和时间戳处理; 另外,还要求 1588报文的识别和时间戳处理必须同时进 行, 如果分开, 则会引入不确定时延, 影响时间同步精度。 基于以上两点要求, 在 OpenFlow网络内实现 1588时间同步, 则要求采用 OpenFlow流表配置消息进行 1588 报文的识别,并需要支持相应的时间戳处理指令。但现有的 OpenFlow指令 (instruction) 及动作 (action) 可以实现 Ethemet、 IP/MPLS及 PBB报文的封装和修改, 但缺乏对 1588同步报文处理指令, 从而无法实现正确的时间同步。 因此, 在相关技术中的 OpenFlow协议无法实现精确的时间同步。 发明内容 本发明提供了一种时间同步处理方法及装置,以至少解决相关技术中的 OpenFlow 协议无法实现精确的时间同步的问题。 根据本发明的一个方面, 提供了一种时间同步处理方法, 包括: 扩展 OpenFlow 协议的指令集, 其中, 扩展后的指令集用于实现 1588协议的时间同步; 向时间同步设 备发送流表配置消息, 其中, 所述流表配置消息中包括扩展后的指令集, 所述时间同 步设备依据扩展后的指令集完成时间同步处理。 其中, 扩展 OpenFlow协议的指令集包括以下至少之一: 增加产生时间戳指令, 其中,所述产生时间戳指令用于所述时间同步设备在入口接收到报文和 /或在出口发出 报文时产生当时的时间戳; 增加发送报文指令, 其中, 所述发送报文指令用于以下至 少之一: 在主时钟设备发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同 步报文的同时发送延迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟 请求响应报文; 增加扩大元数据长度指令, 其中, 所述扩大元数据长度指令用于扩大 元数据的字节数; 增加写元数据指令, 其中, 所述写元数据指令用于写入元数据; 增 加更改校正字段指令, 其中, 所述更改校正字段指令用于更改报文中的校正字段; 增 加复制时间戳指令, 其中, 所述复制时间戳指令用于将延迟请求报文中所包括的字段 的时间同步信息复制到延迟请求响应报文中的对应字段中。 其中, 在向所述时间同步设备发送流表配置消息之后, 还包括: 接收时间同步设 备反馈的用于计算时间同步的时间同步参数。 根据本发明的另一方面, 提供了一种时间同步处理方法, 包括: 接收软件定义网 络 SDN控制器发送的流表配置消息, 其中, 所述流表配置消息包括扩展 OpenFlow协 议的指令集后获得的指令集,扩展后的指令集用于实现 1588协议的时间同步; 依据所 述扩展后的指令集完成时间同步处理。 其中, 扩展后的指令集包括以下至少之一: 产生时间戳指令, 其中, 所述产生时 间戳指令用于所述时间同步设备在入口接收到报文和 /或在出口发出报文时产生当时 的时间戳; 发送报文指令, 其中, 所述发送报文指令用于以下至少之一: 在主时钟设 备发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同步报文的同时发送延 迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟请求响应报文; 扩大 元数据长度指令, 其中, 所述扩大元数据长度指令用于扩大元数据的字节数; 写元数 据指令, 其中, 所述写元数据指令用于写入元数据; 更改校正字段指令, 其中, 所述 更改校正字段指令用于更改报文中的校正字段; 复制时间戳指令, 其中, 所述复制时 间戳指令用于将延迟请求报文中所包括的字段的时间同步信息复制到延迟请求响应报 文中的对应字段中。 其中, 在依据所述扩展后的指令集完成时间同步处理之前, 还包括: 向所述 SDN 控制器发送用于计算时间同步的时间同步参数。 根据本发明的又一方面, 提供了一种时间同步处理装置, 包括: 扩展模块, 设置 为扩展 OpenFlow协议的指令集, 其中, 扩展后的指令集用于实现 1588协议的时间同 步; 第一发送模块, 设置为向时间同步设备发送流表配置消息, 其中, 所述流表配置 消息中包括扩展后的指令集, 所述时间同步设备依据扩展后的指令集完成时间同步处 理。 其中, 所述扩展模块包括以下至少之一: 第一增加单元, 设置为增加产生时间戳 指令, 其中, 所述产生时间戳指令用于所述时间同步设备在入口接收到报文和 /或在出 口发出报文时产生当时的时间戳; 第二增加单元, 设置为增加发送报文指令, 其中, 所述发送报文指令用于以下至少之一: 在主时钟设备发送完同步报文的同时发送跟随 报文、 在从时钟设备接收到同步报文的同时发送延迟请求报文、 在主时钟设备接收到 延迟请求报文的同时发送延迟请求响应报文; 第三增加单元, 设置为增加扩大元数据 长度指令, 其中, 所述扩大元数据长度指令用于扩大元数据的字节数; 第四增加单元, 设置为增加写元数据指令, 其中, 所述写元数据指令用于写入元数据; 第五增加单元, 设置为增加更改校正字段指令, 其中, 所述更改校正字段指令用于更改报文中的校正 字段; 第六增加单元, 设置为增加复制时间戳指令, 其中, 所述复制时间戳指令用于 将延迟请求报文中所包括的字段的时间同步信息复制到延迟请求响应报文中的对应字 段中。 其中, 该装置还包括: 第一接收模块, 设置为接收时间同步设备反馈的用于计算 时间同步的时间同步参数。 根据本发明的再一方面, 提供了一种时间同步处理装置, 包括: 第二接收模块, 设置为接收软件定义网络 SDN控制器发送的流表配置消息,其中,所述流表配置消息 包括扩展 OpenFlow协议的指令集后获得的指令集, 扩展后的指令集用于实现 1588协 议的时间同步; 处理模块, 设置为依据所述扩展后的指令集完成时间同步处理。 其中, 扩展后的指令集包括以下至少之一: 产生时间戳指令, 其中, 所述产生时 间戳指令用于所述时间同步设备在入口接收到报文和 /或在出口发出报文时产生当时 的时间戳; 发送报文指令, 其中, 所述发送报文指令用于以下至少之一: 在主时钟设 备发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同步报文的同时发送延 迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟请求响应报文; 扩大 元数据长度指令, 其中, 所述扩大元数据长度指令用于扩大元数据的字节数; 写元数 据指令, 其中, 所述写元数据指令用于写入元数据; 更改校正字段指令, 其中, 所述 更改校正字段指令用于更改报文中的校正字段; 复制时间戳指令, 其中, 所述复制时 间戳指令用于将延迟请求报文中所包括的字段的时间同步信息复制到延迟请求响应报 文中的对应字段中。 其中, 该装置还包括: 第二发送模块, 设置为向所述 SDN控制器发送用于计算时 间同步的时间同步参数。 通过本发明, 采用扩展 OpenFlow协议的指令集, 其中, 扩展后的指令集用于实 现 1588协议的时间同步; 向时间同步设备发送流表配置消息, 其中, 所述流表配置消 息中包括扩展后的指令集,所述时间同步设备依据扩展后的指令集完成时间同步处理, 解决了相关技术中的 OpenFlow协议无法实现精确的时间同步的问题, 进而达到了使 OpenFlow协议能够支持精确的时间同步, 扩大了 OpenFlow的应用领域的效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的时间同步处理方法的流程图; 图 2是根据本发明实施例的时间同步处理方法的流程图; 图 3是根据本发明实施例的时间同步处理装置一的结构框图; 图 4是根据本发明实施例的时间同步处理装置一中扩展模块 32的优选结构框图; 图 5是根据本发明实施例的时间同步处理装置一的优选结构框图; 图 6是根据本发明实施例的时间同步处理装置二的结构框图; 图 7是是根据本发明实施例的时间同步处理装置二的优选结构框图; 图 8是根据本发明优选实施例的基于 OpenFlow的时间同步示意图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在本实施例中提供了一种时间同步处理方法, 图 1是根据本发明实施例的时间同 步处理方法的流程图, 如图 1所示, 该流程包括如下步骤: 步骤 S102, 扩展 OpenFlow协议的指令集, 其中, 扩展后的指令集用于实现 1588 协议的时间同步; 步骤 S104, 向时间同步设备发送流表配置消息, 其中, 该流表配置消息中包括扩 展后的指令集, 时间同步设备依据扩展后的指令集完成时间同步处理。 通过上述步骤, 通过对现有的 OpenFlow协议的指令集进行扩展, 增加了对 1588 协议同步报文的处理指令, 不仅解决了相关技术中的 OpenFlow协议无法实现精确的 时间同步的问题, 进而达到了使得 OpenFlow能支持精确的 1588 时间同步, 扩大了 OpenFlow的应用领域的效果。 优选地, 针对时间同步设备对不同时间同步报文的处理, 可以扩展 OpenFlow协 议的指令集中多种不同的指令, 例如, 扩展指令集可以包括以下至少之一: 增加产生 时间戳指令, 其中, 该产生时间戳指令用于时间同步设备在入口接收到报文和 /或在出 口发出报文时产生当时的时间戳; 增加发送报文指令, 其中, 该发送报文指令用于以 下至少之一: 在主时钟设备发送完同步报文的同时发送跟随报文、 在从时钟设备接收 到同步报文的同时发送延迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送 延迟请求响应报文; 增加扩大元数据长度指令, 其中, 该扩大元数据长度指令用于扩 大元数据的字节数; 增加写元数据指令, 其中, 该写元数据指令用于写入元数据; 增 加更改校正字段指令, 其中, 该更改校正字段指令用于更改报文中的校正字段; 增加 复制时间戳指令, 其中, 该复制时间戳指令用于将延迟请求报文中所包括的字段的时 间同步信息复制到延迟请求响应报文中的对应字段中。 优选地, 在向时间同步设备发送流表配置消息之后, 还可以接收时间同步设备反 馈的用于计算时间同步的时间同步参数, 而后对接收的该时间同步参数进行保存和处 理, 通过这样的处理, 一方面, 可以对用于计算时间同步的时间同步参数进行备份, 另一方面, 可以使得 SDN控制器对时间同步设备进行时间同步处理进行控制。 在本实施例中, 还提供了一种时间同步处理方法, 图 2是根据本发明实施例的时 间同步处理方法的流程图, 如图 2所示, 该流程包括如下步骤: 步骤 S202, 接收软件定义网络 SDN控制器发送的流表配置消息, 其中, 该流表 配置消息包括扩展 OpenFlow协议的指令集后获得的指令集, 扩展后的指令集用于实 现 1588协议的时间同步; 步骤 S204, 依据扩展后的指令集完成时间同步处理。 通过上述步骤, 通过在 SDN实现对现有 OpenFlow协议指令集的扩展, 使得扩展 后的指令集能够实现 1588协议的时间同步,对于时间同步设备而言,在接收到包括扩 展后的指令集的流表配置消息时, 依据流表配置消息中所包括的扩展后的指令集完成 时间同步处理, 相对于相关技术中的 OpenFlow协议无法实现精确的时间同步的问题, 使得 OpenFlow能支持精确的 1588时间同步, 扩大了 OpenFlow的应用领域。 需要说明的是,用于实现精确的 1588协议时间同步,扩展的指令集可以包括多种 指令, 例如, 扩展后的指令集可以包括以下至少之一: 产生时间戳指令, 其中, 该产 生时间戳指令用于时间同步设备在入口接收到报文和 /或在出口发出报文时产生当时 的时间戳; 发送报文指令, 其中, 该发送报文指令用于以下至少之一: 在主时钟设备 发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同步报文的同时发送延迟 请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟请求响应报文; 扩大元 数据长度指令, 其中, 该扩大元数据长度指令用于扩大元数据的字节数; 写元数据指 令, 其中, 该写元数据指令用于写入元数据; 更改校正字段指令, 其中, 该更改校正 字段指令用于更改报文中的校正字段; 复制时间戳指令, 其中, 该复制时间戳指令用 于将延迟请求报文中所包括的字段的时间同步信息复制到延迟请求响应报文中的对应 字段中。 优选地, 在依据扩展后的指令集完成时间同步处理之前, 时间同步设备还可以向 SDN控制器发送用于计算时间同步的时间同步参数。 在本实施例中还提供了一种时间同步处理装置, 该装置用于实现上述实施例及优 选实施方式, 已经进行过说明的不再赘述。 如以下所使用的, 术语 "模块"可以实现 预定功能的软件和 /或硬件的组合。 尽管以下实施例所描述的装置较佳地以软件来实 现, 但是硬件, 或者软件和硬件的组合的实现也是可能并被构想的。 图 3是根据本发明实施例的时间同步处理装置一的结构框图, 如图 3所示, 该装 置包括扩展模块 32和第一发送模块 34, 下面对该装置进行说明。 扩展模块 32, 设置为扩展 OpenFlow协议的指令集, 其中, 扩展后的指令集用于 实现 1588协议的时间同步; 第一发送模块 34, 连接至上述扩展模块 32, 设置为向时 间同步设备发送流表配置消息, 其中, 该流表配置消息中包括扩展后的指令集, 时间 同步设备依据扩展后的指令集完成时间同步处理。 图 4是根据本发明实施例的时间同步处理装置一中扩展模块 32的优选结构框图, 如图 4所示, 该扩展模块 32包括以下至少之一: 第一增加单元 41、第二增加单元 42、 第三增加单元 43、 第四增加单元 44、 第五增加单元 45、 第六增加单元 46。 下面对该 扩展模块 32进行说明。 第一增加单元 41, 设置为增加产生时间戳指令, 其中, 该产生时间戳指令用于时 间同步设备在入口接收到报文和 /或在出口发出报文时产生当时的时间戳; 第二增加单 元 42, 设置为增加发送报文指令, 其中, 该发送报文指令用于以下至少之一: 在主时 钟设备发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同步报文的同时发 送延迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟请求响应报文; 第三增加单元 43, 设置为增加扩大元数据长度指令, 其中, 该扩大元数据长度指令用 于扩大元数据的字节数; 第四增加单元 44, 设置为增加写元数据指令, 其中, 该写元 数据指令用于写入元数据; 第五增加单元 45, 设置为增加更改校正字段指令, 其中, 该更改校正字段指令用于更改报文中的校正字段; 第六增加单元 46, 设置为增加复制 时间戳指令, 其中, 该复制时间戳指令用于将延迟请求报文中所包括的字段的时间同 步信息复制到延迟请求响应报文中的对应字段中。 图 5是根据本发明实施例的时间同步处理装置一的优选结构框图, 如图 5所示, 该装置除包括图 3所示的所有模块外, 还包括第一接收模块 52, 下面对该第一接收模 块 52进行说明。 第一接收模块 52,连接至上述第一发送模块 34,设置为接收时间同步设备反馈的 用于计算时间同步的时间同步参数。 在本实施例中还提供了一种时间同步处理装置, 图 6是根据本发明实施例的时间 同步处理装置二的结构框图, 如图 6所示, 该装置包括第二接收模块 62和处理模块 64, 下面对该装置进行说明。 第二接收模块 62, 设置为接收软件定义网络 SDN控制器发送的流表配置消息, 其中, 该流表配置消息包括扩展 OpenFlow协议的指令集后获得的指令集, 扩展后的 指令集用于实现 1588协议的时间同步; 处理模块 64, 连接至上述第二接收模块 62, 设置为依据扩展后的指令集完成时间同步处理。 优选地, 该扩展后的指令集可以包括各种不同的指令, 该各种不同的指令用于时 间同步设备处理不同的报文以及时间戳,例如,该不同的指令可以包括以下至少之一: 产生时间戳指令, 其中, 该产生时间戳指令用于时间同步设备在入口接收到报文和 / 或在出口发出报文时产生当时的时间戳; 发送报文指令, 其中, 该发送报文指令用于 以下至少之一: 在主时钟设备发送完同步报文的同时发送跟随报文、 在从时钟设备接 收到同步报文的同时发送延迟请求报文、 在主时钟设备接收到延迟请求报文的同时发 送延迟请求响应报文; 扩大元数据长度指令, 其中, 该扩大元数据长度指令用于扩大 元数据的字节数; 写元数据指令, 其中, 该写元数据指令用于写入元数据; 更改校正 字段指令, 其中, 该更改校正字段指令用于更改报文中的校正字段; 复制时间戳指令, 其中, 该复制时间戳指令用于将延迟请求报文中所包括的字段的时间同步信息复制到 延迟请求响应报文中的对应字段中。 图 7是是根据本发明实施例的时间同步处理装置二的优选结构框图,如图 7所示, 该装置除包括图 6所示的所有模块外, 还包括第二发送模块 72, 下面对该第二发送模 块 72进行说明。 第二发送模块 72,连接至上述第二接收模块 62和处理模块 64,设置为向 SDN控 制器发送用于计算时间同步的时间同步参数。 下面结合附图,以及扩展的指令集对报文的处理对本发明的优选实施例进行说明。 在本优选实施例中通过扩展现有 OpenFlow的 Action Set (指令集),增加了对 1588 同步报文的处理指令,从而使得 OpenFlow协议能支持 1588时间同步,扩大了 OpenFlow 的应用范围。 其中, 增加的 OpenFlow指令可以包括以下至少之一:
Generate timestamp (产生时间戳), 当从入口收到或出口发送 PTP报文时, 将采 用这个指令产生精确时钟同步协议 (Precision Time Protocol, 简称为 PTP) 时间戳; 产生的时间戳用于后续计算链路延迟和时间偏移;
Send packet (发送报文), 在 two-step模式下, 当 Master主时钟设备发送完 Sync 报文, 需要立即生成并发送 Follow_up报文; 当 Slave从时钟设备收到 Sync报文后, 需要立即发送 Delay_req; 当 Master 主时钟设备收到 Delay_req后, 需要立即发送 Delay_reSp。 由于时间同步的高精确性, 1588 协议要求在转发层面对这些报文进行组 装和发送。
Push timestamp, 在 TC设备, 需要生成入时间戳, 并在 ptp报文尾部中携带; 扩大 metadata (元数据) 的长度, 目前只有 8个字节, 如果在 metadata中携带时 间戳, 需要支持更多的字节数目, 优选地, 在本实施例中扩展 metadata长度为 32个 字节;
Modify CF (更新 CF), 在 TC设备, 计算出驻留时间=出时间戳 -入时间戳, 驻留 时间加上 1588报文中的 correctionField, 相加的结果用来修改报文中的 correctionField 字段。
Copy timestamp (复制时间戳), 收到 Delay_req报文后, 采用 generate timestamp 生成入时间戳 T4, 在发送 Delay_resp消息时, 需要把时间戳 T4和 Delay_req报文内 的 correctionField分另 ll复制至 Ll Delay resp的 receiveTimestamp字段禾口 correctionField字 段中;
Copy sequenceld/copy sourcePortldentity/copy domainNumber (复制序列号、复制源 端口号、 复制域名), 需要把 Delay_req 字段中的 sequenceld、 sourcePortldentity 和 domainNumber拷贝到 Delay_resp消息的对应字段。 依据上述扩展的各个指令, 在本优选实施例中提供了一种基于 OpenFlow的时间 同步方法, 图 8是根据本发明优选实施例的基于 OpenFlow的时间同步示意图, 该流 程涉及的设备包括: SDN控制器和 OpenFlow同步设备, 其中, OpenFlow同步设备包 括主时钟设备 Master 透传设备 TC1、 透传设备 TC2、 透传设备 TC3及从时钟设备 Slave 如图 8所示, 该基于 OpenFlow的 1588时间同步流程包括如下步骤: 步骤 Sl, OpenFlow同步设备和控制器建立连接,控制器向 OpenFlow Switch查询 同步设备的基本配置信息并配置 OpenFlow同步设备基本参数; 步骤 S2, 控制器向 OpenFlow同步设备发送二层邻接设备探测命令消息, 例如, 可以是链路层发现协议 (Link Layer Discovery Protocol, 简称为 LLDP), 用于发现 OpenFlow同步网络的拓扑结构; 步骤 S3, 控制器下发流表 (FlowTable) (或称流表配置消息) 给各个 OpenFlow 同步设备, 用于 1588报文的转发和时间戳处理, 进行时间同步; 流表配置消息中增加 了时间戳的处理指令; 步骤 S4, 在主时钟设备, 在 T1时刻发出 Sync (同步) 报文给下游同步设备; 为 了达到高精度时间同步的要求, Sync报文必须在靠近出端口时进行处理, 即流表配置 消息匹配 (Match={ethertype or mac or UDP port} ) 1588报文 (目的地媒体的访问控制 (Destination Media Access Control, 简称为 DMAC), EtherType (以太类型) 或用户 数据报协议 (User Data Protocol, 简称为 UDP) 端口号, ip地址等); 匹配 1588报文 后, 执行指令 (Action={Set_Field timestamp;Output}, 即设置时间戳字段, 出端口), 采用 Generate timestamp指令记录下出时间戳,通过 Sync报文的 originTimestamp字段 携带并转发出去。 同时, Sync报文的 correctionField字段清 0; 步骤 S5, 报文到达 TC1设备, 根据 TC1配置的流表配置消息, 匹配 1588报文 (Match={ethertype or mac or UDP port} ) 并修正 Sync报文的 correctionField, 例如, 可以采用以下处理方式:
( 1 ) 在 TCI设备入口, 采用扩展的 Push timestamp指令记录 Sync报文的入时间 戳 TS1, TS1时间戳可以在 Sync报文中携带 (添加在报文尾部, 不能改动 Sync报文 本身的 originTimestamp字段),也可以通过 write-metadata指令写入 metadata ( metadata 需要扩展为大于 10个字节), 并通过它携带给下级流表配置消息处理;
(2) 由于 1588报文要求实时处理, 所以可以通过 set-queue指令配置 1588报文 到高优先级队列; ( 3 )在 TC 1设备出口,执行指令( Action={驻留时间处理; Output} ),采用 Generate timestamp指令记录下出口时间戳, 出口时间戳减去入口时间戳, 计算出驻留时间(即 具体处理过程为: 记录 ingress timestamp (入时间戳); 记录 egress timestamp (出时 间戳); 驻留时间 Egress TS (出时间戳) 减去 ingress TS (入时间戳); CF=CF+驻留 时间); 并采用扩展的 Modify CF指令, 修正 Sync报文的 correctionField字段 (即 correctionField=correctionField+驻留时间)。 步骤 S6, Sync报文到达 TC2和 TC3设备, 处理流程和 TC1相同;
Sync报文经过 TC1、 TC2和 TC3后, Sync报文的 correctionField将记录了 3个设 备总的驻留时间; 步骤 S7, Sync报文到达从时钟 Slave设备, 在 Slave设备入口, 流表配置消息匹 配 1588报文(Match={ethertype or mac or UDP port} ),而后执行指令( Action={Set_Field timestamp;output CPU} ),采用 Generate timestamp指令记录下 Sync报文的入时间戳 T2, 这时从时钟设备将获取了 Sync报文的发送时间戳 T1、到达时间戳 T2和中间设备的驻 留时间 CFs; 这些参数将上送给 SDN控制器保存和处理。 然后, 收到 Sync报文后, 从设备 Slave立即向主设备 Master发送 Delay_req (延 迟请求) 报文; 在出口, 流表配置消息匹配 1588报文, 采用 Generate timestamp指令 记录下出时间戳 T3 ; 同时 Delay_req中的 correctionField设置为 0; 步骤 S8, Delay_req报文经过 TC3、 TC2禾 P TC1, 处理流程和步骤 S5相同; 步骤 S9, Delay_req报文 (延迟请求报文) 到达主时钟 Master设备入口, 流表配 置消息将匹配 1588报文,采用 Generate timestamp指令记录下 Delay_req入时间戳 T4, 这时主时钟设备将获悉了 Delay_req报文的到达时间和经过中间设备 TC1,TC2和 TC3 的驻留时间,这两个参数将保存在 metadata中(在长度不够的时候可能发送给控制器); 然后, 主时钟 Master将发送 Delay_resp报文(延迟请求响应报文)给 Slave设备; 在出口, 流表配置消息将匹配 Delay_resp报文, 并把 Delay_req的到达时间 T4和驻留 时间分别复制到 Delay_resp报文中的 receiveTimestamp字段和 correctionField字段中; 另夕卜,还需要把 Delay_req字段中的 sequenceld sourcePortldentity禾口 domainNumber 拷贝到 Delay_resp消息的对应字段中; 步骤 S10, Delay_resp报文经过 TC1、 TC2和 TC3时, 将透明传送, 即不需要修 正 correctionField字段; 步骤 Sll, Delay_resp 报文到达 Slave 设备后, Slave 设备将能获悉四个时间戳 (T1,T2,T3和 Τ4), 并获悉了报文的接收方向的驻留时间 CFs和发送方向的驻留时间 CFr; 依据这些参数, Slave计算出时间偏差 Offset = T2 - Tl - Delay - Sync消息中的 correctionField; 其中 Delay={ (T2-T3 ) + (T4-T1 ) -Sync消息中的 correctionField-Delay_resp消息 中的 correctionFieldV2; 计算出时间偏差后, Slave将修正本设备的系统时间, 使得 Slave和 Master的时间 保持一致。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。 工业实用性 通过上述技术方案, 不仅解决了相关技术中的 OpenFlow协议无法实现精确的时 间同步的问题, 进而使得 OpenFlow协议能够支持精确的时间同步, 扩大了 OpenFlow 的应用领域。

Claims

权 利 要 求 书
1. 一种时间同步处理方法, 包括:
扩展 OpenFlow协议的指令集, 其中, 扩展后的指令集用于实现 1588协议 的时间同步;
向时间同步设备发送流表配置消息, 其中, 所述流表配置消息中包括扩展 后的指令集, 所述时间同步设备依据扩展后的指令集完成时间同步处理。
2. 根据权利要求 1所述的方法, 其中, 扩展 OpenFlow协议的指令集包括以下至 少之一:
增加产生时间戳指令, 其中, 所述产生时间戳指令用于所述时间同步设备 在入口接收到报文和 /或在出口发出报文时产生当时的时间戳;
增加发送报文指令, 其中, 所述发送报文指令用于以下至少之一: 在主时 钟设备发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同步报文的 同时发送延迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟请 求响应报文;
增加扩大元数据长度指令, 其中, 所述扩大元数据长度指令用于扩大元数 据的字节数;
增加写元数据指令, 其中, 所述写元数据指令用于写入元数据; 增加更改校正字段指令, 其中, 所述更改校正字段指令用于更改报文中的 校正字段;
增加复制时间戳指令, 其中, 所述复制时间戳指令用于将延迟请求报文中 所包括的字段的时间同步信息复制到延迟请求响应报文中的对应字段中。
3. 根据权利要求 1或 2所述的方法, 其中, 在向所述时间同步设备发送所述流表 配置消息之后, 还包括:
接收时间同步设备反馈的用于计算时间同步的时间同步参数。
4. 一种时间同步处理方法, 包括: 接收软件定义网络 SDN控制器发送的流表配置消息,其中,所述流表配置 消息包括扩展 OpenFlow协议的指令集后获得的指令集, 扩展后的指令集用于 实现 1588协议的时间同步; 依据所述扩展后的指令集完成时间同步处理。
5. 根据权利要求 4所述的方法, 其中, 扩展后的指令集包括以下至少之一: 产生时间戳指令, 其中, 所述产生时间戳指令用于所述时间同步设备在入 口接收到报文和 /或在出口发出报文时产生当时的时间戳;
发送报文指令, 其中, 所述发送报文指令用于以下至少之一: 在主时钟设 备发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同步报文的同时 发送延迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟请求响 应报文;
扩大元数据长度指令, 其中, 所述扩大元数据长度指令用于扩大元数据的 字节数;
写元数据指令, 其中, 所述写元数据指令用于写入元数据; 更改校正字段指令, 其中, 所述更改校正字段指令用于更改报文中的校正 字段;
复制时间戳指令, 其中, 所述复制时间戳指令用于将延迟请求报文中所包 括的字段的时间同步信息复制到延迟请求响应报文中的对应字段中。
6. 根据权利要求 4或 5所述的方法, 其中, 在依据所述扩展后的指令集完成时间 同步处理之前, 还包括:
向所述 SDN控制器发送用于计算时间同步的时间同步参数。
7. 一种时间同步处理装置, 包括:
扩展模块, 设置为扩展 OpenFlow协议的指令集, 其中, 扩展后的指令集 用于实现 1588协议的时间同步;
第一发送模块, 设置为向时间同步设备发送流表配置消息, 其中, 所述流 表配置消息中包括扩展后的指令集, 所述时间同步设备依据扩展后的指令集完 成时间同步处理。
8. 根据权利要求 7所述的装置, 其中, 所述扩展模块包括以下至少之一: 第一增加单元, 设置为增加产生时间戳指令, 其中, 所述产生时间戳指令 用于所述时间同步设备在入口接收到报文和 /或在出口发出报文时产生当时的 时间戳;
第二增加单元, 设置为增加发送报文指令, 其中, 所述发送报文指令用于 以下至少之一: 在主时钟设备发送完同步报文的同时发送跟随报文、 在从时钟 设备接收到同步报文的同时发送延迟请求报文、 在主时钟设备接收到延迟请求 报文的同时发送延迟请求响应报文;
第三增加单元, 设置为增加扩大元数据长度指令, 其中, 所述扩大元数据 长度指令用于扩大元数据的字节数;
第四增加单元, 设置为增加写元数据指令, 其中, 所述写元数据指令用于 写入元数据;
第五增加单元, 设置为增加更改校正字段指令, 其中, 所述更改校正字段 指令用于更改报文中的校正字段;
第六增加单元, 设置为增加复制时间戳指令, 其中, 所述复制时间戳指令 用于将延迟请求报文中所包括的字段的时间同步信息复制到延迟请求响应报文 中的对应字段中。
9. 根据权利要求 7或 8所述的装置, 其中, 还包括: 第一接收模块, 设置为接收时间同步设备反馈的用于计算时间同步的时间 同步参数。
10. 一种时间同步处理装置, 包括:
第二接收模块, 设置为接收软件定义网络 SDN控制器发送的流表配置消 息, 其中, 所述流表配置消息包括扩展 OpenFlow协议的指令集后获得的指令 集, 扩展后的指令集用于实现 1588协议的时间同步;
处理模块, 设置为依据所述扩展后的指令集完成时间同步处理。
11. 根据权利要求 10所述的装置, 其中, 扩展后的指令集包括以下至少之一: 产生时间戳指令, 其中, 所述产生时间戳指令用于所述时间同步设备在入 口接收到报文和 /或在出口发出报文时产生当时的时间戳;
发送报文指令, 其中, 所述发送报文指令用于以下至少之一: 在主时钟设 备发送完同步报文的同时发送跟随报文、 在从时钟设备接收到同步报文的同时 发送延迟请求报文、 在主时钟设备接收到延迟请求报文的同时发送延迟请求响 应报文;
扩大元数据长度指令, 其中, 所述扩大元数据长度指令用于扩大元数据的 字节数;
写元数据指令, 其中, 所述写元数据指令用于写入元数据;
更改校正字段指令, 其中, 所述更改校正字段指令用于更改报文中的校正 字段;
复制时间戳指令, 其中, 所述复制时间戳指令用于将延迟请求报文中所包 括的字段的时间同步信息复制到延迟请求响应报文中的对应字段中。
12. 根据权利要求 10或 11所述的装置, 其中, 还包括:
第二发送模块,设置为向所述 SDN控制器发送用于计算时间同步的时间同 步参数。
PCT/CN2014/078350 2013-07-23 2014-05-23 时间同步处理方法及装置 WO2014187369A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/907,561 US20160173267A1 (en) 2013-07-23 2014-05-23 Method and Apparatus for Processing Time Synchronization
EP14801499.6A EP3026861B1 (en) 2013-07-23 2014-05-23 Method and apparatus for processing time synchronization

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310311329.5 2013-07-23
CN201310311329.5A CN104348568A (zh) 2013-07-23 2013-07-23 时间同步处理方法及装置

Publications (1)

Publication Number Publication Date
WO2014187369A1 true WO2014187369A1 (zh) 2014-11-27

Family

ID=51932921

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078350 WO2014187369A1 (zh) 2013-07-23 2014-05-23 时间同步处理方法及装置

Country Status (4)

Country Link
US (1) US20160173267A1 (zh)
EP (1) EP3026861B1 (zh)
CN (1) CN104348568A (zh)
WO (1) WO2014187369A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410170A (zh) * 2014-12-19 2015-03-11 重庆大学 一种适用于电力通信sdn技术
CN105791160A (zh) * 2014-12-25 2016-07-20 中国移动通信集团公司 软件定义网络中事务的处理方法、设备及系统
CN106877959A (zh) * 2015-12-11 2017-06-20 深圳市中兴微电子技术有限公司 一种时钟同步的方法、设备和系统

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104662857A (zh) * 2012-03-30 2015-05-27 瑞典爱立信有限公司 用于鲁棒精确时间协议同步的方法和系统
EP2919400A1 (en) * 2014-03-13 2015-09-16 Alcatel Lucent Method and device for forwarding a clock synchronization message
WO2016070947A1 (en) * 2014-11-05 2016-05-12 Telefonaktiebolaget L M Ericsson (Publ) Transmitting residence time information in a network
CN105591912B (zh) * 2015-07-21 2019-08-06 新华三技术有限公司 一种转发路径的选择方法和装置
CN105530697B (zh) * 2015-12-15 2019-02-01 重庆大学 一种支持工业物联网业务时间同步方法
TWI612831B (zh) 2016-03-01 2018-01-21 財團法人工業技術研究院 時脈同步方法、行動網路系統、網路控制器與網路交換器
CN107800500A (zh) * 2016-08-29 2018-03-13 南京中兴新软件有限责任公司 一种确定时间同步报文时钟时间的方法、装置和设备
US10250486B2 (en) * 2016-10-14 2019-04-02 Gvbb Holdings S.A.R.L. System and method for isochronous switching of packetized media streams
CN108988976B (zh) * 2017-05-31 2021-01-26 中兴通讯股份有限公司 一种同步网自动保护方法和装置
US10560390B2 (en) * 2018-03-05 2020-02-11 Schweitzer Engineering Laboratories, Inc. Time-based network operation profiles in a software-defined network
US10565149B2 (en) * 2018-04-06 2020-02-18 Embrionix Design Inc. Standardized hot-pluggable transceiving unit, hosting unit and method for applying delays based on port positions
CN108599887A (zh) * 2018-04-24 2018-09-28 新华三技术有限公司 一种时差计算方法和转发设备
CN110798276B (zh) * 2018-08-02 2022-11-11 全球能源互联网研究院有限公司 一种智能变电站sdn网络的时间同步方法与系统
US11962492B2 (en) * 2018-12-16 2024-04-16 Kulcloud Wired/wireless convergence network packet relay device and packet timestamp assigning method thereof
EP3677984B1 (en) * 2019-01-07 2022-08-10 ADVA Optical Networking SE Method of time delivery in a computing system and system thereof
KR20210078174A (ko) * 2019-12-18 2021-06-28 주식회사 쏠리드 네트워크 관리 시스템 및 통신 네트워크의 동기화 방법
KR20210144213A (ko) * 2020-05-21 2021-11-30 삼성전자주식회사 통신 시스템에서 동기화 정보를 전송하기 위한 장치 및 방법
CN113708912B (zh) * 2021-07-20 2023-10-10 深圳市风云实业有限公司 一种时钟同步方法及其系统
CN114245411A (zh) * 2021-11-08 2022-03-25 深圳震有科技股份有限公司 报文延时时间的测试方法、装置、终端设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453316A (zh) * 2007-11-30 2009-06-10 华为技术有限公司 时间信息同步系统及方法以及相关装置
CN101977104A (zh) * 2010-11-13 2011-02-16 上海交通大学 基于ieee1588精确时钟同步协议系统及其同步方法
CN102111380A (zh) * 2009-12-25 2011-06-29 华为技术有限公司 一种时间同步的方法、设备及系统
CN102957528A (zh) * 2011-08-26 2013-03-06 中兴通讯股份有限公司 穿越第三方同步网络的同步方法和系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8964563B2 (en) * 2011-07-08 2015-02-24 Telefonaktiebolaget L M Ericsson (Publ) Controller driven OAM for OpenFlow

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453316A (zh) * 2007-11-30 2009-06-10 华为技术有限公司 时间信息同步系统及方法以及相关装置
CN102111380A (zh) * 2009-12-25 2011-06-29 华为技术有限公司 一种时间同步的方法、设备及系统
CN101977104A (zh) * 2010-11-13 2011-02-16 上海交通大学 基于ieee1588精确时钟同步协议系统及其同步方法
CN102957528A (zh) * 2011-08-26 2013-03-06 中兴通讯股份有限公司 穿越第三方同步网络的同步方法和系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3026861A4 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410170A (zh) * 2014-12-19 2015-03-11 重庆大学 一种适用于电力通信sdn技术
CN105791160A (zh) * 2014-12-25 2016-07-20 中国移动通信集团公司 软件定义网络中事务的处理方法、设备及系统
CN105791160B (zh) * 2014-12-25 2019-03-05 中国移动通信集团公司 软件定义网络中事务的处理方法、设备及系统
CN106877959A (zh) * 2015-12-11 2017-06-20 深圳市中兴微电子技术有限公司 一种时钟同步的方法、设备和系统
CN106877959B (zh) * 2015-12-11 2019-04-30 深圳市中兴微电子技术有限公司 一种时钟同步的方法、设备和系统

Also Published As

Publication number Publication date
EP3026861B1 (en) 2020-01-15
EP3026861A4 (en) 2016-07-06
EP3026861A1 (en) 2016-06-01
CN104348568A (zh) 2015-02-11
US20160173267A1 (en) 2016-06-16

Similar Documents

Publication Publication Date Title
WO2014187369A1 (zh) 时间同步处理方法及装置
US11444713B2 (en) Transmitting residence time information in a network
US10659344B2 (en) Information transmission method, apparatus and system
JP5862769B2 (ja) 通信システム、制御装置、通信方法及びプログラム
JP6009672B2 (ja) 通信ネットワークにおいて、高精度時刻プロトコルによって配信クロックを同期するための方法
WO2017016106A1 (zh) 一种基于SDN的支持QoS的通信隧道建立方法及系统
JP6032824B2 (ja) パケット交換通信網におけるスケジューリング方法、エンドノード及びコアネットワークスイッチ
EP2817902A2 (en) Method and network node for processing a precision time protocol
WO2016065763A1 (zh) 一种跨域时钟同步方法、装置、系统及计算机存储介质
WO2018072732A1 (zh) 一种信息处理方法、装置和计算机存储介质
JP2013520137A (ja) パケットネットワークにおけるクロック分配のためのレート変動型マルチキャスト伝送
WO2018171529A1 (zh) 一种实现双控制平面的方法、装置、计算机存储介质
WO2015035616A1 (zh) 跨网通信方法及装置
WO2017015839A1 (zh) 一种基于sdn的arp实现方法及装置
WO2014198217A1 (zh) 一种隧道处理方法及系统、控制面设备、转发面设备
JP2020510342A (ja) Avbストリームのモジュール式ルーティングの方法及び装置
WO2015027738A1 (zh) 一种传输、接收元数据的方法、开放流逻辑交换机
WO2023015644A1 (zh) 一种链式业务流调度的规划方法和系统架构
Weber EtherCAT and TSN-Best Practices for Industrial Ethernet System Architectures
EP3020163B1 (en) Interworking between first protocol entity of stream reservation protocol and second protocol entity of routing protocol
WO2022183879A1 (zh) 报文转发方法、电子设备和存储介质
JP5472948B2 (ja) ビデオサーバ
Prytz et al. Switched Ethernet in Automation
JP2016171469A (ja) 転送システム、転送装置、転送方法、およびプログラム

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 14907561

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2014801499

Country of ref document: EP