WO2017166969A1 - Method and apparatus for sending 1588 message, and storage medium - Google Patents

Method and apparatus for sending 1588 message, and storage medium Download PDF

Info

Publication number
WO2017166969A1
WO2017166969A1 PCT/CN2017/074980 CN2017074980W WO2017166969A1 WO 2017166969 A1 WO2017166969 A1 WO 2017166969A1 CN 2017074980 W CN2017074980 W CN 2017074980W WO 2017166969 A1 WO2017166969 A1 WO 2017166969A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock
board
clock board
packet
message
Prior art date
Application number
PCT/CN2017/074980
Other languages
French (fr)
Chinese (zh)
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 WO2017166969A1 publication Critical patent/WO2017166969A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/74Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission for increasing reliability, e.g. using redundant or spare channels or apparatus
    • 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
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Definitions

  • the present disclosure relates to the field of data network communications, and in particular, to a 1588 message sending method, apparatus, and storage medium.
  • the IEEE 1588 Time Synchronization Protocol is a high-precision clock synchronization technology that can be combined with packet networks to synchronize clock signals of different precisions in heterogeneous systems to a unified master clock with the highest performance. Clock accuracy is up to sub-microsecond level.
  • the PTP measures the time offset and path delay of the upstream and downstream by means of packet exchange.
  • the downstream device synchronizes the local time with the upstream device according to the measurement result. This is a process of continuously converge to approach the upstream device time.
  • the standby device needs to undergo a short-term initialization process.
  • the PTP network protocol is interrupted for a short period of time. After the PTP packet processor of the downstream device detects the packet interruption and times out, it will recalculate and select the optimal 1588.
  • the clock source is synchronized. When the downstream device selects and synchronizes the poor quality clock source, the clock quality of the downstream network is degraded.
  • the downstream device After the active/standby switchover of the PTP service of the current device is complete, the downstream device resynchronizes to the clock source of the current device. This process of re-selecting and synchronizing will affect the clock accuracy and clock quality of downstream devices and pass them to downstream devices step by step, causing the entire network to oscillate and it takes a while to regain stability.
  • the downstream network may be affected, such as network flapping.
  • the longer the switching time the greater the shock to the downstream network. How to minimize the active/standby switching time of PTP services has become an important issue to be solved urgently.
  • the purpose of the disclosure is to provide a method, an apparatus, and a storage medium for transmitting 1588 packets, which solves the problem that the active/standby switching time is too long in the related art.
  • a method for transmitting a 1588 packet including: discarding a 1588 packet generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where The second clock board is a clock backup board before the switching; after the switching between the active state and the standby state of the first clock board and the second clock board, the 1588 message generated by the second clock board is sent.
  • discarding the 1588 packet generated by the second clock board includes: closing the 1588 packet of the second clock board to the external sending port, and discarding the 1588 packet.
  • sending the 1588 packet generated by the second clock board includes: opening a 1588 packet of the second clock board to the external sending port, and sending the 1588 packet.
  • the method further includes: switching the second clock board to a clock In the case of the main board, the 1588 packet of the second clock board is opened to the external sending port, and the 1588 packet is sent.
  • the discarding the 1588 packet generated by the second clock board includes: determining that the 1588 packet is sent by the second clock board; and discarding the 1588 packet generated by the second clock board.
  • the method further includes: configuring, for the second clock board, the 1588 clock configuration supported by the first clock board.
  • a 1588 packet sending apparatus including: a discarding module, configured to discard the second clock board generated before the switching between the active state and the standby state of the first clock board and the second clock board
  • the second clock board is a clock backup board before the switching
  • the sending module is configured to send the second clock board after the switching between the active state and the standby state of the first clock board and the second clock board.
  • the discarding module includes: a shutting down unit, configured to close the 1588 packet of the second clock board to send the port; and the discarding unit is configured to discard the 1588 packet.
  • the sending module includes: an open unit, configured to open the 1588 packet outgoing port of the second clock board; and the sending unit is configured to send the 1588 packet.
  • the device further includes: a configuration module, configured to configure a 1588 clock configuration supported by the first clock board for the second clock board.
  • a configuration module configured to configure a 1588 clock configuration supported by the first clock board for the second clock board.
  • a non-transitory computer readable storage medium wherein computer program instructions are stored, when one or more processors of a 1588 message transmitting device execute the computer program instructions,
  • the 1588 packet sending device performs a 1588 packet sending method, and the method includes: discarding 1588 packets generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board
  • the second clock board is a clock backup board before the switching; after the first clock board and the second clock board are switched, the 1588 message generated by the second clock board is sent.
  • the present invention solves the problem that the active/standby switching time is too long in the related art, and the network caused by the active/standby switchover is alleviated. Shock.
  • FIG. 1 is a flowchart 1 of a method for transmitting a 1588 message according to an embodiment of the present disclosure
  • FIG. 2 is a block diagram showing the structure of an embodiment of the present disclosure
  • FIG. 3 is a structural block diagram 1 of a 1588 message transmitting apparatus according to a preferred embodiment of the present disclosure
  • FIG. 4 is a structural block diagram 2 of a 1588 message transmitting apparatus according to a preferred embodiment of the present disclosure
  • FIG. 5 is a structural block diagram 3 of a 1588 message transmitting apparatus according to a preferred embodiment of the present disclosure
  • FIG. 6 is a second flowchart of a 1588 message sending method according to an embodiment of the present disclosure.
  • FIG. 7 is a first schematic diagram of a 1588 message transmitting apparatus according to an embodiment of the present disclosure.
  • FIG. 8 is a second schematic diagram of a 1588 message transmitting apparatus according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart 1 of a method for sending a packet according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 discarding 1588 packets generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where the second clock board is a clock backup board before the switching;
  • Step S104 After the primary clock state of the first clock board and the second clock board are switched, the 1588 message generated by the second clock board is sent.
  • the 1588 packet generated by discarding the second clock board is as follows:
  • the first clock board and the second clock board respectively send the message to different message sending modules, and the message sending module corresponding to the clock board in the active/standby state is turned off.
  • the port is configured to disable the sending of the packet sending module corresponding to the clock board in the active/standby state.
  • the 1588 packet sent by the standby board is discarded. After the clock board becomes the main board after the active/standby switchover, the packet is sent. After the module learns that the clock board is switched to the clock board, the packet sending port corresponding to the clock board is opened to grant the sending permission, and the 1588 message sent to the packet sending module is sent out.
  • the second clock board is a clock main board, and if the determination result is yes, the 1588 message of the second clock board is opened to the external transmission port, and the 1588 message is sent; if the judgment result is negative, The 1588 packet of the second clock board is sent to the external sending port, and the 1588 packet is discarded.
  • the first clock board and the second clock board send a 1588 message to the same message sending module, and the message sending module determines the sender of the received 1588 message. It is a clock backup board, and the 1588 packet is discarded. The 1588 packet is sent by the clock main board, and the 1588 packet is sent out. The message sending module receives the next 1588 message and repeats the above determining action.
  • the clock backup board is the second clock board before the active/standby switchover. After the active/standby switchover, the clock backup board is the first clock board.
  • the second clock board acquires the same 1588 clock configuration as the clock board, so that the second clock board can send and receive 1588 messages according to the 1588 protocol.
  • the clock synchronization board works in synchronization with the clock main board, but the packet of the clock backup board is sent, so that the clock board and the peer device are synchronized normally, and the clock backup board and the peer device are pseudo-synchronized to ensure the device.
  • the original clock backup board is synchronized with the peer device immediately after being switched to the clock board. This eliminates the configuration of the clock release and the resynchronization of the clock board and the peer device.
  • the switching time of the PTP service during the standby switchover reduces the impact of the active/standby switchover on the clock synchronization network.
  • FIG. 2 is a structural block diagram of a 1588 message sending apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes:
  • the discarding module 22 is configured to discard the 1588 packet generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where the second clock board is the clock backup board before the switching ;
  • the sending module 24 is configured to send the 1588 message generated by the second clock board after the switching between the active state and the standby state of the first clock board and the second clock board.
  • FIG. 3 is a structural block diagram 1 of a 1588 packet sending apparatus according to a preferred embodiment of the present invention.
  • the discarding module 22 includes:
  • the closing unit 32 is configured to close the 1588 packet of the second clock board to the external sending port
  • the discarding unit 34 is configured to discard the 1588 packet.
  • FIG. 4 is a structural block diagram 2 of a 1588 message sending apparatus according to a preferred embodiment of the present invention. As shown in FIG. 4, the sending module 24 further includes:
  • the open unit 42 is configured to open the 1588 packet of the second clock board to the external sending port;
  • the sending unit 44 is configured to send the 1588 message.
  • FIG. 5 is a structural block diagram 3 of a 1588 message sending apparatus according to a preferred embodiment of the present invention. As shown in FIG. 5, the apparatus further includes:
  • the configuration module 52 is configured to configure, for the second clock board, the 1588 protocol type supported by the first clock board.
  • the invention discloses a device and a method for shortening the switching time of the active/standby switching PTP service, and relates to the field of network communication.
  • the method includes: after the 1588 message enters the device, it is sent to the clock main board (ie, the first clock described above). At the same time, the board is copied to the clock backup board (the second clock board described above); the clock board and the peer device perform normal 1588 message exchange to implement the 1588 clock synchronization function of the clock node; The slave board sends and receives 1588 packets. The 1588 packets are discarded in the 1588 packet sending module.
  • the clock backup board and the peer device implement the pseudo 1588 clock synchronization function.
  • the original clock backup board is transferred to the master, and the 1588 packet sending port is opened to perform normal 1588 packet exchange.
  • the original clock board is transferred to the switch, the 1588 packet sending port is closed, and the 1588 protocol processor sends the 1588 report. Text.
  • FIG. 6 is a second flowchart of a 1588 packet sending method according to an embodiment of the present invention. As shown in FIG. 6, the method includes the following steps:
  • Step S602 The configuration of the 1588 protocol is sent to the clock board and the clock backup board at the same time, so that the clock master board 1588 protocol processor has the capability of receiving and processing 1588 packets.
  • the clock board and the clock backup board both transmit and receive protocol packets.
  • step S606 the 1588 packet sent by the clock main board is sent to the peer device by the packet sending and receiving module, and the 1588 packet sent by the clock backup board is discarded by the packet sending module.
  • the packet sending module performs corresponding processing on the packet sent by the clock board according to the active/standby state delivered by the sending module in the active/standby state. If the status is the primary, the packet sending module sends the 1588 packet to the clock board. The packet is sent to the 1588 packet sending and receiving module, and is sent to the peer device by the 1588 packet sending module. If the status is the standby, the packet sending module discards the 1588 packet sent by the clock board and does not send the packet to the 1588 packet sending and receiving module. .
  • the packets sent by the clock board are sent to the peer through the 1588 packet sending module to complete the normal 1588 clock synchronization function.
  • the packets sent by the clock backup board are discarded in the 1588 packet sending module.
  • the clock backup board maintains the normal interaction of 1588 packets and completes the pseudo 1588 clock synchronization function.
  • the original clock backup board is changed to the clock main board, and the 1588 packet sending function switch is enabled to perform the normal 1588 packet exchange.
  • the original clock becomes the clock backup board, and the 1588 packet sending function switch is disabled.
  • 1588 packet sent by the protocol processor. The right to interact with the PTP packet of the peer device is smoothly switched from the original clock to the current clock.
  • the master/slave switchover occurs, the original clock is converted to the clock backup board.
  • the 1588 packet sending module detects that the clock board is the backup port and then sends the 1588 packet to the port.
  • the board is converted to a clock board.
  • the 1588 packet sending module detects that the clock board is the primary port and then sends the 1588 packet sending port to start sending 1588 packets. Therefore, when the master/slave switchover is performed, the 1588 packet sending right of the clock node is smoothly switched from the original clock board to the current clock board.
  • FIG. 7 is a first schematic diagram of a 1588 message sending apparatus according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes:
  • the configuration sending module 71 is configured to specify the 1588 protocol type that the 1588 protocol processor runs, and configure the 1588 protocol type to be synchronized to the clock master and backup boards.
  • the parameters of the 1588 protocol processor are set according to the configuration commands of the user, so that the protocol processor can send and receive 1588 packets according to the requirements of the user, and implement the 1588 clock synchronization function.
  • the specific setting parameters include Layer 2 and Layer 3 selection of 1588 packets, single multicast mode selection, rate selection of each packet, and whether two-step method selection is enabled.
  • the active/standby state delivered by the module 72 in the active/standby state is given to the first clock board 73 and the second clock board 74.
  • the first clock board 73 and the second clock board 74 are configured to implement the processing of the 1588 protocol packet, and send and receive the 1588 protocol packet, and perform 1588 clock synchronization with the peer device.
  • the 1588 protocol configuration parameter is configured based on the 1588 protocol, and the 1588 protocol type specified by the upper-layer device is used to complete the 1588 clock synchronization function between the clock node and the peer device.
  • the first packet sending module 75 is configured to receive the 1588 packet outputted by the first clock board 73, and determine whether to send the 1588 packet according to the active/standby state of the clock board; when the clock board is the clock board, the 1588 packet sending port is opened. The packet is sent to the 1588 packet sending and receiving module 77, and is sent to the peer device by the 1588 packet sending and receiving module 77. When the clock is used as the clock backup board, the 1588 packet sending port is closed, and the received 1588 packet is discarded.
  • the second packet sending module 76 is configured to receive the 1588 packet outputted by the second clock board 74, and determine whether to send the 1588 packet according to the active/standby state of the clock board; when the clock motherboard is the clock, the 1588 packet sending port is opened. The packet is sent to the 1588 packet sending and receiving module 77, and is sent to the peer device by the 1588 packet sending and receiving module 77. When the clock is used as the clock backup board, the 1588 packet sending port is closed, and the received 1588 packet is discarded.
  • FIG. 8 is a second schematic diagram of a 1588 message sending apparatus according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes:
  • the configuration issuance module 81 is configured to specify the 1588 protocol type that the 1588 protocol processor runs, and configure the 1588 protocol type to be synchronized to the clock master and backup boards.
  • the parameters of the 1588 protocol processor are set according to the configuration commands of the user, so that the protocol processor can send and receive 1588 packets according to the requirements of the user, and implement the 1588 clock synchronization function.
  • the specific setting parameters include Layer 2 and Layer 3 selection of 1588 packets, single multicast mode selection, rate selection of each packet, and whether two-step method selection is enabled.
  • the active/standby state sent by the sending module 82 in the active/standby state is given to the first clock board 83 and the second clock board 84.
  • the first clock board 83 and the second clock board 84 are configured to implement the processing of the 1588 protocol packet, and send and receive the 1588 protocol packet, and perform 1588 clock synchronization with the peer device.
  • the 1588 protocol configuration parameter is configured based on the 1588 protocol, and the 1588 protocol type specified by the upper-layer device is used to complete the 1588 clock synchronization function between the clock node and the peer device.
  • the message sending module 85 is configured to receive the 1588 message outputted by the first clock board 83 and the second clock board 84, and determine whether to send the 1588 message according to the active/standby state of the packet sending entity; when the sending body is the clock motherboard The packet is sent to the 1588 packet sending and receiving module 86, and is sent to the peer device by the 1588 packet sending and receiving module 86. When the packet sending body is the clock backup board, the 1588 packet sending port is closed, and the received 1588 packet is discarded. Text.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • Embodiments of the present disclosure provide a non-transitory computer readable storage medium having stored therein computer program instructions that, when one or more processors of a 1588 message transmitting device execute the computer program instructions, the 1588 message
  • the sending device performs a 1588 packet sending method, where the method includes: discarding 1588 packets generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where the first The second clock board is a clock backup board before the switching; after the first clock board and the second clock board are switched, the 1588 message generated by the second clock board is sent.
  • the present disclosure is applicable to the field of data network communication, and solves the problem that the active/standby switching time is too long in the related art, and alleviates the network oscillation caused by the active/standby switchover.

Abstract

Provided are a method and apparatus for sending a 1588 message. The method comprises: before active/standby states of a first clock board and a second clock board are switched, discarding a 1588 message generated by the second clock board, wherein the second clock board is a standby clock board before switching; and after the active/standby states of the first clock board and the second clock board are switched, sending the 1588 message generated by the second clock board. By means of the present disclosure, the problem in the related art that the active/standby switching time is too long is solved, and network oscillation caused by active/standby switching is alleviated.

Description

1588报文发送方法、装置及存储介质1588 message sending method, device and storage medium 技术领域Technical field
本公开涉及数据网络通信领域,尤其是涉及到1588报文发送方法、装置及存储介质。The present disclosure relates to the field of data network communications, and in particular, to a 1588 message sending method, apparatus, and storage medium.
背景技术Background technique
随着通信网技术的发展,其对时钟同步的需求越来越高,高质量的时钟同步成为首先需要解决的关键问题。IEEE 1588时间同步协议(简称PTP协议),是一种高精度时钟同步技术,能够与分组网络相结合,将异构系统内不同精度的时钟信号同步到统一的、具有最高性能的主时钟,其时钟精度可达亚微秒级别。With the development of communication network technology, its demand for clock synchronization is getting higher and higher, and high-quality clock synchronization has become the key problem that needs to be solved first. The IEEE 1588 Time Synchronization Protocol (PTP) is a high-precision clock synchronization technology that can be combined with packet networks to synchronize clock signals of different precisions in heterogeneous systems to a unified master clock with the highest performance. Clock accuracy is up to sub-microsecond level.
PTP通过报文交互的方式测量上下游的时间偏移和路径时延,下游设备根据测量结果修正本地时间与上游设备进行同步,是一个不断收敛逼近上游设备时间的过程。当上游设备发生主备倒换时,备板需要经历一个短暂的初始化过程,此时PTP网络协议短暂中断,下游设备PTP报文处理器检测到报文中断并且超时后,会重新计算选择最优1588时钟源进行同步。当下游设备选择并同步了质量较差的时钟源后,会造成下游网络的时钟质量整体退化。而当当前设备的PTP业务主备倒换完成后,下游设备会重新同步到当前设备的时钟源。这种重新选源并同步的过程会对下游设备的时钟精度和时钟质量产生影响,并逐级传递给下游设备,使得整个网络出现震荡,需要经过一段时间才能重新获得稳定。The PTP measures the time offset and path delay of the upstream and downstream by means of packet exchange. The downstream device synchronizes the local time with the upstream device according to the measurement result. This is a process of continuously converge to approach the upstream device time. When the active/standby switchover occurs on the upstream device, the standby device needs to undergo a short-term initialization process. The PTP network protocol is interrupted for a short period of time. After the PTP packet processor of the downstream device detects the packet interruption and times out, it will recalculate and select the optimal 1588. The clock source is synchronized. When the downstream device selects and synchronizes the poor quality clock source, the clock quality of the downstream network is degraded. After the active/standby switchover of the PTP service of the current device is complete, the downstream device resynchronizes to the clock source of the current device. This process of re-selecting and synchronizing will affect the clock accuracy and clock quality of downstream devices and pass them to downstream devices step by step, causing the entire network to oscillate and it takes a while to regain stability.
在PTP业务中的主备倒换时,对下游网络会产生影响,如造成网络震荡。倒换时间越长,对下游网络造成的震荡就越大。如何尽量缩短PTP业务的主备倒换时间,成为亟待解决的重要问题。When the active/standby switchover is performed in the PTP service, the downstream network may be affected, such as network flapping. The longer the switching time, the greater the shock to the downstream network. How to minimize the active/standby switching time of PTP services has become an important issue to be solved urgently.
发明内容Summary of the invention
本公开的目的在于提供了1588报文发送方法、装置及存储介质,解决了相关技术中主备倒换时间过长的问题。The purpose of the disclosure is to provide a method, an apparatus, and a storage medium for transmitting 1588 packets, which solves the problem that the active/standby switching time is too long in the related art.
根据本公开的一个方面,提供一种1588报文发送方法,包括:在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃该第二时钟板产生的1588报文,其中,该第二时钟板为倒换前的时钟备板;在该第一时钟板与该第二时钟板的主备状态发生倒换后,发送该第二时钟板产生的1588报文。According to an aspect of the present disclosure, a method for transmitting a 1588 packet is provided, including: discarding a 1588 packet generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where The second clock board is a clock backup board before the switching; after the switching between the active state and the standby state of the first clock board and the second clock board, the 1588 message generated by the second clock board is sent.
可选地,丢弃该第二时钟板产生的1588报文包括:关闭该第二时钟板的1588报文对外发送端口,丢弃该1588报文。Optionally, discarding the 1588 packet generated by the second clock board includes: closing the 1588 packet of the second clock board to the external sending port, and discarding the 1588 packet.
可选地,发送该第二时钟板产生的1588报文包括:开放该第二时钟板的1588报文对外发送端口,发送该1588报文。Optionally, sending the 1588 packet generated by the second clock board includes: opening a 1588 packet of the second clock board to the external sending port, and sending the 1588 packet.
可选地,在丢弃该1588报文之后,该方法还包括:在该第二时钟板倒换为时钟 主板的情况下,开放该第二时钟板的1588报文对外发送端口,发送该1588报文。Optionally, after discarding the 1588 packet, the method further includes: switching the second clock board to a clock In the case of the main board, the 1588 packet of the second clock board is opened to the external sending port, and the 1588 packet is sent.
该丢弃该第二时钟板产生的1588报文包括:确定该1588报文为该第二时钟板发送的;丢弃该第二时钟板产生的1588报文。The discarding the 1588 packet generated by the second clock board includes: determining that the 1588 packet is sent by the second clock board; and discarding the 1588 packet generated by the second clock board.
可选地,在丢弃该第二时钟板产生的1588报文之前,该方法还包括:为该第二时钟板配置该第一时钟板支持的1588时钟配置。Optionally, before discarding the 1588 packet generated by the second clock board, the method further includes: configuring, for the second clock board, the 1588 clock configuration supported by the first clock board.
根据本公开的另一方面,提供一种1588报文发送装置,包括:丢弃模块,设置为在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃该第二时钟板产生的1588报文,其中,该第二时钟板为倒换前的时钟备板;发送模块,设置为在该第一时钟板与该第二时钟板的主备状态发生倒换后,发送该第二时钟板产生的1588报文。According to another aspect of the present disclosure, a 1588 packet sending apparatus is provided, including: a discarding module, configured to discard the second clock board generated before the switching between the active state and the standby state of the first clock board and the second clock board In the 1588 packet, the second clock board is a clock backup board before the switching, and the sending module is configured to send the second clock board after the switching between the active state and the standby state of the first clock board and the second clock board. Generated 1588 message.
可选地,该丢弃模块包括:关闭单元,设置为关闭该第二时钟板的1588报文对外发送端口;丢弃单元,设置为丢弃该1588报文。Optionally, the discarding module includes: a shutting down unit, configured to close the 1588 packet of the second clock board to send the port; and the discarding unit is configured to discard the 1588 packet.
可选地,该发送模块包括:开放单元,设置为开放该第二时钟板的1588报文对外发送端口;发送单元,设置为发送该1588报文。Optionally, the sending module includes: an open unit, configured to open the 1588 packet outgoing port of the second clock board; and the sending unit is configured to send the 1588 packet.
可选地,该装置还包括:配置模块,设置为为该第二时钟板配置该第一时钟板支持的1588时钟配置。Optionally, the device further includes: a configuration module, configured to configure a 1588 clock configuration supported by the first clock board for the second clock board.
根据本公开实施例的再一方面,提供一种非临时性计算机可读存储介质,其中存储有计算机程序指令,当1588报文发送设备的一个或多个处理器执行所述计算机程序指令时,所述1588报文发送设备执行一种1588报文发送方法,所述方法包括:在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃该第二时钟板产生的1588报文,其中,该第二时钟板为倒换前的时钟备板;在该第一时钟板与该第二时钟板的主备状态发生倒换后,发送该第二时钟板产生的1588报文。According to still another aspect of an embodiment of the present disclosure, a non-transitory computer readable storage medium is provided, wherein computer program instructions are stored, when one or more processors of a 1588 message transmitting device execute the computer program instructions, The 1588 packet sending device performs a 1588 packet sending method, and the method includes: discarding 1588 packets generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board The second clock board is a clock backup board before the switching; after the first clock board and the second clock board are switched, the 1588 message generated by the second clock board is sent.
通过本发明,采用通过启动时钟备板与时钟主板同步工作,但是关闭时钟备板的报文发送的技术方案,解决了相关技术中主备倒换时间过长的问题,缓解主备倒换引起的网络震荡。The present invention solves the problem that the active/standby switching time is too long in the related art, and the network caused by the active/standby switchover is alleviated. Shock.
附图说明DRAWINGS
此处所说明的附图用来提供对本公开的进一步理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:The drawings described herein are provided to provide a further understanding of the present disclosure, which is a part of the present disclosure, and the description of the present disclosure and the description thereof are not intended to limit the disclosure. In the drawing:
图1是根据本公开实施例的1588报文发送方法的流程图一;FIG. 1 is a flowchart 1 of a method for transmitting a 1588 message according to an embodiment of the present disclosure;
图2是根据本公开实施例的的结构框图;2 is a block diagram showing the structure of an embodiment of the present disclosure;
图3是根据本公开优选实施例的1588报文发送装置的结构框图一;3 is a structural block diagram 1 of a 1588 message transmitting apparatus according to a preferred embodiment of the present disclosure;
图4是根据本公开优选实施例的1588报文发送装置的结构框图二;4 is a structural block diagram 2 of a 1588 message transmitting apparatus according to a preferred embodiment of the present disclosure;
图5是根据本公开优选实施例的1588报文发送装置的结构框图三;5 is a structural block diagram 3 of a 1588 message transmitting apparatus according to a preferred embodiment of the present disclosure;
图6是根据本公开实施例的1588报文发送方法的流程图二; 6 is a second flowchart of a 1588 message sending method according to an embodiment of the present disclosure;
图7是根据本公开实施例的1588报文发送装置的示意图一;FIG. 7 is a first schematic diagram of a 1588 message transmitting apparatus according to an embodiment of the present disclosure; FIG.
图8是根据本公开实施例的1588报文发送装置的示意图二。FIG. 8 is a second schematic diagram of a 1588 message transmitting apparatus according to an embodiment of the present disclosure.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种1588报文发送方法及装置,图1是根据本发明实施例的1588报文发送方法的流程图一,如图1所示,该流程包括如下步骤:In this embodiment, a method and a device for sending a 1588 packet are provided. FIG. 1 is a flowchart 1 of a method for sending a packet according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤S102,在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃该第二时钟板产生的1588报文,其中,该第二时钟板为倒换前的时钟备板;Step S102, discarding 1588 packets generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where the second clock board is a clock backup board before the switching;
步骤S104,在该第一时钟板与该第二时钟板的主备状态发生倒换后,发送该第二时钟板产生的1588报文。Step S104: After the primary clock state of the first clock board and the second clock board are switched, the 1588 message generated by the second clock board is sent.
上述丢弃第二时钟板产生的1588报文如下两种可选实施方式:The 1588 packet generated by discarding the second clock board is as follows:
实施方式一,如图7所示,该第一时钟板与该第二时钟板分别将报文发送给不同的报文发送模块,通过关闭主备状态为备的时钟板对应的报文发送模块的端口以关闭主备状态为备的时钟板对应的报文发送模块的发送权限,由备板发送的1588报文被丢弃;在主备倒换后该时钟板成为主板的情况下,报文发送模块获知到时钟板的状态倒换为时钟主板,则开放该时钟板对应的报文发送端口以授予发送权限,将发送至该报文发送模块的1588报文发送出去。换言之,判断该第二时钟板是否成为时钟主板,在判断结果为是的情况下,开放上述第二时钟板的1588报文对外发送端口,发送该1588报文;在判断结果为否的情况下,关闭上述第二时钟板的1588报文对外发送端口,丢弃该1588报文。In the first embodiment, as shown in FIG. 7, the first clock board and the second clock board respectively send the message to different message sending modules, and the message sending module corresponding to the clock board in the active/standby state is turned off. The port is configured to disable the sending of the packet sending module corresponding to the clock board in the active/standby state. The 1588 packet sent by the standby board is discarded. After the clock board becomes the main board after the active/standby switchover, the packet is sent. After the module learns that the clock board is switched to the clock board, the packet sending port corresponding to the clock board is opened to grant the sending permission, and the 1588 message sent to the packet sending module is sent out. In other words, it is determined whether the second clock board is a clock main board, and if the determination result is yes, the 1588 message of the second clock board is opened to the external transmission port, and the 1588 message is sent; if the judgment result is negative, The 1588 packet of the second clock board is sent to the external sending port, and the 1588 packet is discarded.
实施方式二,如图8所示,该第一时钟板与该第二时钟板将1588报文发送给同一个报文发送模块,该报文发送模块判断接收到的上述1588报文的发送方是时钟备板,将该1588报文丢弃;在判断上述1588报文是时钟主板发送的,将该1588报文发送出去。该报文发送模块接收下一个1588报文,重复上述判断动作。上述时钟备板在主备倒换前是第二时钟板,在主备倒换后上述时钟备板是第一时钟板。In the second embodiment, as shown in FIG. 8, the first clock board and the second clock board send a 1588 message to the same message sending module, and the message sending module determines the sender of the received 1588 message. It is a clock backup board, and the 1588 packet is discarded. The 1588 packet is sent by the clock main board, and the 1588 packet is sent out. The message sending module receives the next 1588 message and repeats the above determining action. The clock backup board is the second clock board before the active/standby switchover. After the active/standby switchover, the clock backup board is the first clock board.
进一步地,在第二时钟板产生1588报文之前,该第二时钟板获取到与时钟主板相同的1588时钟配置,使得第二时钟板能够按照1588协议收发并处理1588报文。Further, before the second clock board generates the 1588 message, the second clock board acquires the same 1588 clock configuration as the clock board, so that the second clock board can send and receive 1588 messages according to the 1588 protocol.
通过上述步骤,本发明通过启动时钟备板与时钟主板同步工作,但是关闭时钟备板的报文发送,使得时钟主板与对端设备正常同步,时钟备板与对端设备伪同步,从而保证设备主备倒换期间,原时钟备板倒换到时钟主板后立即和对端设备进行同步,省去了倒换到时钟主板状态后的配置下发及时钟板同对端设备的重新同步过程,缩短了主备倒换期间的PTP业务的倒换时间,减小了主备倒换对时钟同步网络造成的影响。 Through the above steps, the clock synchronization board works in synchronization with the clock main board, but the packet of the clock backup board is sent, so that the clock board and the peer device are synchronized normally, and the clock backup board and the peer device are pseudo-synchronized to ensure the device. During the active/standby switchover, the original clock backup board is synchronized with the peer device immediately after being switched to the clock board. This eliminates the configuration of the clock release and the resynchronization of the clock board and the peer device. The switching time of the PTP service during the standby switchover reduces the impact of the active/standby switchover on the clock synchronization network.
图2是根据本发明实施例的1588报文发送装置的结构框图,如图2所示,该装置包括:FIG. 2 is a structural block diagram of a 1588 message sending apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes:
丢弃模块22,用于在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃该第二时钟板产生的1588报文,其中,该第二时钟板为倒换前的时钟备板;The discarding module 22 is configured to discard the 1588 packet generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where the second clock board is the clock backup board before the switching ;
发送模块24,用于在该第一时钟板与该第二时钟板的主备状态发生倒换后,发送该第二时钟板产生的1588报文。The sending module 24 is configured to send the 1588 message generated by the second clock board after the switching between the active state and the standby state of the first clock board and the second clock board.
图3是根据本发明优选实施例的1588报文发送装置的结构框图一,如图3所示,该丢弃模块22包括:FIG. 3 is a structural block diagram 1 of a 1588 packet sending apparatus according to a preferred embodiment of the present invention. As shown in FIG. 3, the discarding module 22 includes:
关闭单元32,用于关闭该第二时钟板的1588报文对外发送端口;The closing unit 32 is configured to close the 1588 packet of the second clock board to the external sending port;
丢弃单元34,用于丢弃该1588报文。The discarding unit 34 is configured to discard the 1588 packet.
图4是根据本发明优选实施例的1588报文发送装置的结构框图二,如图4所示,该发送模块24还包括:FIG. 4 is a structural block diagram 2 of a 1588 message sending apparatus according to a preferred embodiment of the present invention. As shown in FIG. 4, the sending module 24 further includes:
开放单元42,用于开放该第二时钟板的1588报文对外发送端口;The open unit 42 is configured to open the 1588 packet of the second clock board to the external sending port;
发送单元44,用于发送该1588报文。The sending unit 44 is configured to send the 1588 message.
图5是根据本发明优选实施例的1588报文发送装置的结构框图三,如图5所示,该装置还包括:FIG. 5 is a structural block diagram 3 of a 1588 message sending apparatus according to a preferred embodiment of the present invention. As shown in FIG. 5, the apparatus further includes:
配置模块52,用于为该第二时钟板配置该第一时钟板支持的1588协议类型。The configuration module 52 is configured to configure, for the second clock board, the 1588 protocol type supported by the first clock board.
下面结合具体实施例对本发明进行进一步说明。The invention will now be further described in conjunction with specific embodiments.
本发明公开了一种缩短主备倒换PTP业务倒换时间的装置和方法,涉及网络通信领域,该方法包括:1588报文进入设备后,上送给时钟主板(即上文所述的第一时钟板)的同时,复制一份给时钟备板(即上文所述的第二时钟板);时钟主板和对端设备进行正常的1588报文交互,实现本时钟节点的1588时钟同步功能;时钟备板正常收发处理1588报文,其发送的1588报文在1588报文发送模块内被丢弃,时钟备板与对端设备实现伪1588时钟同步功能。在发生主备倒换时,原时钟备板转主,打开1588报文发送端口,进行正常1588报文交互;原时钟主板转备,关闭1588报文发送端口,丢弃1588协议处理器发送的1588报文。The invention discloses a device and a method for shortening the switching time of the active/standby switching PTP service, and relates to the field of network communication. The method includes: after the 1588 message enters the device, it is sent to the clock main board (ie, the first clock described above). At the same time, the board is copied to the clock backup board (the second clock board described above); the clock board and the peer device perform normal 1588 message exchange to implement the 1588 clock synchronization function of the clock node; The slave board sends and receives 1588 packets. The 1588 packets are discarded in the 1588 packet sending module. The clock backup board and the peer device implement the pseudo 1588 clock synchronization function. When the master/slave switchover occurs, the original clock backup board is transferred to the master, and the 1588 packet sending port is opened to perform normal 1588 packet exchange. The original clock board is transferred to the switch, the 1588 packet sending port is closed, and the 1588 protocol processor sends the 1588 report. Text.
图6是根据本发明实施例的1588报文发送方法的流程图二,如图6所示,该方法包括以下步骤:FIG. 6 is a second flowchart of a 1588 packet sending method according to an embodiment of the present invention. As shown in FIG. 6, the method includes the following steps:
步骤S602,1588协议配置同时下发给时钟主板和时钟备板,使得时钟主备板1588协议处理器具备正常收发处理1588报文的能力。Step S602: The configuration of the 1588 protocol is sent to the clock board and the clock backup board at the same time, so that the clock master board 1588 protocol processor has the capability of receiving and processing 1588 packets.
步骤S604,时钟主板和时钟备板均进行协议报文的收发处理。In the step S604, the clock board and the clock backup board both transmit and receive protocol packets.
步骤S606,时钟主板发送的1588报文被报文发送模块通过报文收发模块,发送到对端设备;时钟备板发送的1588报文被报文发送模块做丢弃处理。In the step S606, the 1588 packet sent by the clock main board is sent to the peer device by the packet sending and receiving module, and the 1588 packet sent by the clock backup board is discarded by the packet sending module.
具体的说,报文发送模块根据主备状态下发模块下发的主备状态,对时钟板发送出来的报文做相应的处理。若状态为主,则报文发送模块将时钟板发送的1588报文 发送到1588报文收发模块,由1588报文发送模块发送到对端设备;若状态为备,则报文发送模块将时钟板发送的1588报文做丢弃处理,不发送到1588报文收发模块。Specifically, the packet sending module performs corresponding processing on the packet sent by the clock board according to the active/standby state delivered by the sending module in the active/standby state. If the status is the primary, the packet sending module sends the 1588 packet to the clock board. The packet is sent to the 1588 packet sending and receiving module, and is sent to the peer device by the 1588 packet sending module. If the status is the standby, the packet sending module discards the 1588 packet sent by the clock board and does not send the packet to the 1588 packet sending and receiving module. .
时钟主板发送的报文经过1588报文发送模块,发送到对端,完成正常1588时钟同步功能。时钟备板发送的报文在1588报文发送模块内做丢弃处理。时钟备板本身保持1588报文正常交互,完成伪1588时钟同步功能。The packets sent by the clock board are sent to the peer through the 1588 packet sending module to complete the normal 1588 clock synchronization function. The packets sent by the clock backup board are discarded in the 1588 packet sending module. The clock backup board maintains the normal interaction of 1588 packets and completes the pseudo 1588 clock synchronization function.
在发生主备倒换时,原时钟备板转为时钟主板,打开1588报文发送功能开关,进行正常1588报文交互;原时钟主板转为时钟备板,关闭1588报文发送功能开关,丢弃1588协议处理器发送的1588报文。与对端设备的PTP报文交互权,从原时钟主板平滑倒换到当前时钟主板。设备在发生主备倒换时,原时钟主板转换为时钟备板,其1588报文发送模块,检测到本时钟板为备后关闭1588报文发送端口,停止向外发送1588报文;原时钟备板转换为时钟主板,其1588报文发送模块,检测到本时钟板为主后打开1588报文发送端口,开始向外发送1588报文。从而实现主备倒换时,本时钟节点的1588报文发送权从原时钟主板平滑倒换到当前时钟主板。When the active/standby switchover occurs, the original clock backup board is changed to the clock main board, and the 1588 packet sending function switch is enabled to perform the normal 1588 packet exchange. The original clock becomes the clock backup board, and the 1588 packet sending function switch is disabled. 1588 packet sent by the protocol processor. The right to interact with the PTP packet of the peer device is smoothly switched from the original clock to the current clock. When the master/slave switchover occurs, the original clock is converted to the clock backup board. The 1588 packet sending module detects that the clock board is the backup port and then sends the 1588 packet to the port. The board is converted to a clock board. The 1588 packet sending module detects that the clock board is the primary port and then sends the 1588 packet sending port to start sending 1588 packets. Therefore, when the master/slave switchover is performed, the 1588 packet sending right of the clock node is smoothly switched from the original clock board to the current clock board.
图7是根据本发明实施例的1588报文发送装置的示意图一,如图7所示,该装置包括:FIG. 7 is a first schematic diagram of a 1588 message sending apparatus according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes:
配置下发模块71,用于指定1588协议处理器运行的1588协议类型,并将需要运行的1588协议类型同步配置到时钟主备板。主要是根据用户的配置命令对1588协议处理器运行所需要的参数进行设置,使得协议处理器能够按照用户的需求进行收发和处理1588报文,实现1588时钟同步功能。具体设置参数包括1588报文的二三层选择、单组播模式选择、每种报文的速率选择以及是否启用两步法选择。The configuration sending module 71 is configured to specify the 1588 protocol type that the 1588 protocol processor runs, and configure the 1588 protocol type to be synchronized to the clock master and backup boards. The parameters of the 1588 protocol processor are set according to the configuration commands of the user, so that the protocol processor can send and receive 1588 packets according to the requirements of the user, and implement the 1588 clock synchronization function. The specific setting parameters include Layer 2 and Layer 3 selection of 1588 packets, single multicast mode selection, rate selection of each packet, and whether two-step method selection is enabled.
主备状态下发模块72下发的主备状态给第一时钟板73和第二时钟板74。The active/standby state delivered by the module 72 in the active/standby state is given to the first clock board 73 and the second clock board 74.
第一时钟板73和第二时钟板74,用于实现1588协议报文的计算处理,收发1588协议报文,与对端设备进行1588时钟同步。主要是根据1588协议配置下发模块下发的1588协议配置参数,运行上层指定的1588协议类型,完成本时钟节点与对端设备的1588时钟同步功能。The first clock board 73 and the second clock board 74 are configured to implement the processing of the 1588 protocol packet, and send and receive the 1588 protocol packet, and perform 1588 clock synchronization with the peer device. The 1588 protocol configuration parameter is configured based on the 1588 protocol, and the 1588 protocol type specified by the upper-layer device is used to complete the 1588 clock synchronization function between the clock node and the peer device.
第一报文发送模块75,用于接收第一时钟板73输出的1588报文,并根据本时钟板的主备状态判断是否发送1588报文;当为时钟主板时,打开1588报文发送端口,将报文发送到1588报文收发模块77,由1588报文收发模块77发送到对端设备;当为时钟备板时,关闭1588报文发送端口,丢弃接收到的1588报文。The first packet sending module 75 is configured to receive the 1588 packet outputted by the first clock board 73, and determine whether to send the 1588 packet according to the active/standby state of the clock board; when the clock board is the clock board, the 1588 packet sending port is opened. The packet is sent to the 1588 packet sending and receiving module 77, and is sent to the peer device by the 1588 packet sending and receiving module 77. When the clock is used as the clock backup board, the 1588 packet sending port is closed, and the received 1588 packet is discarded.
第二报文发送模块76,用于接收第二时钟板74输出的1588报文,并根据本时钟板的主备状态判断是否发送1588报文;当为时钟主板时,打开1588报文发送端口,将报文发送到1588报文收发模块77,由1588报文收发模块77发送到对端设备;当为时钟备板时,关闭1588报文发送端口,丢弃接收到的1588报文。The second packet sending module 76 is configured to receive the 1588 packet outputted by the second clock board 74, and determine whether to send the 1588 packet according to the active/standby state of the clock board; when the clock motherboard is the clock, the 1588 packet sending port is opened. The packet is sent to the 1588 packet sending and receiving module 77, and is sent to the peer device by the 1588 packet sending and receiving module 77. When the clock is used as the clock backup board, the 1588 packet sending port is closed, and the received 1588 packet is discarded.
图8是根据本发明实施例的1588报文发送装置的示意图二,如图8所示,该装置包括: FIG. 8 is a second schematic diagram of a 1588 message sending apparatus according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes:
配置下发模块81,用于指定1588协议处理器运行的1588协议类型,并将需要运行的1588协议类型同步配置到时钟主备板。主要是根据用户的配置命令对1588协议处理器运行所需要的参数进行设置,使得协议处理器能够按照用户的需求进行收发和处理1588报文,实现1588时钟同步功能。具体设置参数包括1588报文的二三层选择、单组播模式选择、每种报文的速率选择以及是否启用两步法选择。The configuration issuance module 81 is configured to specify the 1588 protocol type that the 1588 protocol processor runs, and configure the 1588 protocol type to be synchronized to the clock master and backup boards. The parameters of the 1588 protocol processor are set according to the configuration commands of the user, so that the protocol processor can send and receive 1588 packets according to the requirements of the user, and implement the 1588 clock synchronization function. The specific setting parameters include Layer 2 and Layer 3 selection of 1588 packets, single multicast mode selection, rate selection of each packet, and whether two-step method selection is enabled.
主备状态下发模块82下发的主备状态给第一时钟板83和第二时钟板84。The active/standby state sent by the sending module 82 in the active/standby state is given to the first clock board 83 and the second clock board 84.
第一时钟板83和第二时钟板84,用于实现1588协议报文的计算处理,收发1588协议报文,与对端设备进行1588时钟同步。主要是根据1588协议配置下发模块下发的1588协议配置参数,运行上层指定的1588协议类型,完成本时钟节点与对端设备的1588时钟同步功能。The first clock board 83 and the second clock board 84 are configured to implement the processing of the 1588 protocol packet, and send and receive the 1588 protocol packet, and perform 1588 clock synchronization with the peer device. The 1588 protocol configuration parameter is configured based on the 1588 protocol, and the 1588 protocol type specified by the upper-layer device is used to complete the 1588 clock synchronization function between the clock node and the peer device.
报文发送模块85,用于接收第一时钟板83和第二时钟板84输出的1588报文,并根据报文发送主体的主备状态判断是否发送1588报文;当发送主体为时钟主板时,将报文发送到1588报文收发模块86,由1588报文收发模块86发送到对端设备;当报文发送主体为时钟备板时,关闭1588报文发送端口,丢弃接收到的1588报文。The message sending module 85 is configured to receive the 1588 message outputted by the first clock board 83 and the second clock board 84, and determine whether to send the 1588 message according to the active/standby state of the packet sending entity; when the sending body is the clock motherboard The packet is sent to the 1588 packet sending and receiving module 86, and is sent to the peer device by the 1588 packet sending and receiving module 86. When the packet sending body is the clock backup board, the 1588 packet sending port is closed, and the received 1588 packet is discarded. Text.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
本公开的实施例提供一种非临时性计算机可读存储介质,其中存储有计算机程序指令,当1588报文发送设备的一个或多个处理器执行所述计算机程序指令时,所述1588报文发送设备执行一种1588报文发送方法,所述方法包括:在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃该第二时钟板产生的1588报文,其中,该第二时钟板为倒换前的时钟备板;在该第一时钟板与该第二时钟板的主备状态发生倒换后,发送该第二时钟板产生的1588报文。Embodiments of the present disclosure provide a non-transitory computer readable storage medium having stored therein computer program instructions that, when one or more processors of a 1588 message transmitting device execute the computer program instructions, the 1588 message The sending device performs a 1588 packet sending method, where the method includes: discarding 1588 packets generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where the first The second clock board is a clock backup board before the switching; after the first clock board and the second clock board are switched, the 1588 message generated by the second clock board is sent.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。The above description 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 invention are intended to be included within the scope of the invention.
工业实用性Industrial applicability
本公开适用于数据网络通信领域,用以解决相关技术中主备倒换时间过长的问题,缓解主备倒换引起的网络震荡。 The present disclosure is applicable to the field of data network communication, and solves the problem that the active/standby switching time is too long in the related art, and alleviates the network oscillation caused by the active/standby switchover.

Claims (11)

  1. 一种1588报文发送方法,包括:A 1588 packet sending method includes:
    在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃所述第二时钟板产生的1588报文,其中,所述第二时钟板为倒换前的时钟备板;Before the switching between the active state and the standby state of the first clock board and the second clock board, discarding the 1588 packet generated by the second clock board, where the second clock board is a clock backup board before the switching;
    在所述第一时钟板与所述第二时钟板的主备状态发生倒换后,发送所述第二时钟板产生的1588报文。After the switching between the active state and the standby state of the first clock board and the second clock board, the 1588 message generated by the second clock board is sent.
  2. 根据权利要求1所述的方法,其中,丢弃所述第二时钟板产生的1588报文包括:The method of claim 1, wherein discarding the 1588 message generated by the second clock board comprises:
    关闭所述第二时钟板的1588报文对外发送端口,丢弃所述1588报文。The 1588 packet of the second clock board is sent to the external sending port, and the 1588 packet is discarded.
  3. 根据权利要求2所述的方法,其中,发送所述第二时钟板产生的1588报文包括:The method of claim 2, wherein transmitting the 1588 message generated by the second clock board comprises:
    开放所述第二时钟板的1588报文对外发送端口,发送所述1588报文。The 1588 packet of the second clock board is opened to the external sending port, and the 1588 packet is sent.
  4. 根据权利要求3所述的方法,其中,在丢弃所述1588报文之后,所述方法还包括:The method of claim 3, wherein after the dropping of the 1588 message, the method further comprises:
    在所述第二时钟板倒换为时钟主板的情况下,开放所述第二时钟板的1588报文对外发送端口,发送所述1588报文。In the case that the second clock board is switched to the clock main board, the 1588 message of the second clock board is opened to the external sending port, and the 1588 message is sent.
  5. 根据权利要求1所述的方法,其中,丢弃所述第二时钟板产生的1588报文包括:The method of claim 1, wherein discarding the 1588 message generated by the second clock board comprises:
    确定所述1588报文为所述第二时钟板发送的;Determining that the 1588 packet is sent by the second clock board;
    丢弃所述第二时钟板产生的1588报文。The 1588 packet generated by the second clock board is discarded.
  6. 根据权利要求1所述的方法,其中,在丢弃所述第二时钟板产生的1588报文之前,所述方法还包括:The method of claim 1, wherein before the discarding the 1588 message generated by the second clock board, the method further comprises:
    为所述第二时钟板配置所述第一时钟板支持的1588时钟配置。The 1588 clock configuration supported by the first clock board is configured for the second clock board.
  7. 一种1588报文发送装置,包括:A 1588 message sending device includes:
    丢弃模块,设置为在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃所述第二时钟板产生的1588报文,其中,所述第二时钟板为倒换前的时钟备板;The discarding module is configured to discard the 1588 packet generated by the second clock board before the switching between the active state and the standby state of the first clock board and the second clock board, where the second clock board is the clock preparation before the switching board;
    发送模块,设置为在所述第一时钟板与所述第二时钟板的主备状态发生倒换后,发送所述第二时钟板产生的1588报文。The sending module is configured to send the 1588 message generated by the second clock board after the switching between the active state and the standby state of the first clock board and the second clock board.
  8. 根据权利要求7所述的装置,其中,所述丢弃模块包括:The device of claim 7, wherein the discarding module comprises:
    关闭单元,设置为关闭所述第二时钟板的1588报文对外发送端口;The unit is configured to shut down the 1588 packet of the second clock board to the external sending port;
    丢弃单元,设置为丢弃所述1588报文。The discarding unit is configured to discard the 1588 packet.
  9. 根据权利要求8所述的装置,其中,所述发送模块包括:The apparatus of claim 8 wherein said transmitting module comprises:
    开放单元,设置为开放所述第二时钟板的1588报文对外发送端口;An open unit, configured to open the 1588 packet of the second clock board to the external sending port;
    发送单元,设置为发送所述1588报文。The sending unit is configured to send the 1588 message.
  10. 根据权利要求7所述的装置,其中,所述装置还包括: The apparatus of claim 7 wherein said apparatus further comprises:
    配置模块,设置为为所述第二时钟板配置所述第一时钟板支持的1588时钟配置。And a configuration module, configured to configure a 1588 clock configuration supported by the first clock board for the second clock board.
  11. 一种非临时性计算机可读存储介质,其中存储有计算机程序指令,当1588报文发送设备的一个或多个处理器执行所述计算机程序指令时,所述1588报文发送设备执行一种1588报文发送方法,所述方法包括:A non-transitory computer readable storage medium storing computer program instructions for performing a 1588 message transmitting device when the one or more processors of the 1588 message transmitting device execute the computer program instructions a message sending method, the method comprising:
    在第一时钟板与第二时钟板的主备状态发生倒换前,丢弃该第二时钟板产生的1588报文,其中,该第二时钟板为倒换前的时钟备板;以及The 1588 packet generated by the second clock board is discarded before the switching between the active state and the standby state of the first clock board and the second clock board, where the second clock board is a clock backup board before the switching;
    在该第一时钟板与该第二时钟板的主备状态发生倒换后,发送该第二时钟板产生的1588报文。 After the primary clock state of the first clock board and the second clock board are switched, the 1588 message generated by the second clock board is sent.
PCT/CN2017/074980 2016-03-28 2017-02-27 Method and apparatus for sending 1588 message, and storage medium WO2017166969A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610182257.2 2016-03-28
CN201610182257.2A CN107241154A (en) 2016-03-28 2016-03-28 1588 file transmitting methods and device

Publications (1)

Publication Number Publication Date
WO2017166969A1 true WO2017166969A1 (en) 2017-10-05

Family

ID=59963402

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/074980 WO2017166969A1 (en) 2016-03-28 2017-02-27 Method and apparatus for sending 1588 message, and storage medium

Country Status (2)

Country Link
CN (1) CN107241154A (en)
WO (1) WO2017166969A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314432B (en) * 2020-01-20 2022-02-22 新华三大数据技术有限公司 Message processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7689854B2 (en) * 2006-09-22 2010-03-30 Agilent Technologies, Inc. Method and apparatus for establishing IEEE 1588 clock synchronization across a network element comprising first and second cooperating smart interface converters wrapping the network element
CN103744755A (en) * 2014-01-08 2014-04-23 烽火通信科技股份有限公司 Implement system for primary and standby veneer single port shared protection and method thereof
CN105406984A (en) * 2015-10-22 2016-03-16 上海斐讯数据通信技术有限公司 System and method of realizing main/standby switching backboard clock

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009653A (en) * 2007-01-26 2007-08-01 华为技术有限公司 The method for sending message and the system for switching device and main and standby switching
CN102123046B (en) * 2011-01-21 2013-09-04 烽火通信科技股份有限公司 Packet transport network (PTN) device and method for realizing time synchronization protection switching (PS) by using main cross disk and spare cross disk of PTN device
EP2506470B1 (en) * 2011-03-29 2013-05-29 Alcatel Lucent Method, apparatus and system for time distribution in a telecommunications network
CN102594481B (en) * 2012-03-08 2017-05-10 中兴通讯股份有限公司 Clock oscillation generating method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7689854B2 (en) * 2006-09-22 2010-03-30 Agilent Technologies, Inc. Method and apparatus for establishing IEEE 1588 clock synchronization across a network element comprising first and second cooperating smart interface converters wrapping the network element
CN103744755A (en) * 2014-01-08 2014-04-23 烽火通信科技股份有限公司 Implement system for primary and standby veneer single port shared protection and method thereof
CN105406984A (en) * 2015-10-22 2016-03-16 上海斐讯数据通信技术有限公司 System and method of realizing main/standby switching backboard clock

Also Published As

Publication number Publication date
CN107241154A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
EP2820783B1 (en) Frequency distribution using precision time protocol
US8879552B2 (en) Precision time protocol offloading in a PTP boundary clock
US10181919B2 (en) Synchronization method, controller, synchronization node, synchronous network, and storage medium
US8081663B2 (en) Time synchronization method and relay apparatus
US9215092B2 (en) Clock selection for synchronous Ethernet
EP3226504B1 (en) Time synchronization method and apparatus
WO2011134371A1 (en) Method for synchronizing clocks and clock synchronization device
WO2017045546A1 (en) Time synchronization packet processing method and device
US20160156427A1 (en) Clock recovery in a packet based network
WO2012122813A1 (en) Method, system and device for switching and selecting clock source device
JP2010035171A (en) Multi-router for time-controlled communication system
WO2015165192A1 (en) Time synchronization method and device
WO2011063725A1 (en) Method and system for active-standby synchronization
US10097297B2 (en) Apparatus and method for two-way timestamp exchange
CN113572561B (en) Method, apparatus, communication system and medium for clock synchronization
WO2017166969A1 (en) Method and apparatus for sending 1588 message, and storage medium
CN102404104B (en) Adaptive synchronicity method and system based on different delayed time mechanism
WO2012152124A1 (en) Externally connected temporal port changeover method and device
JP2016535950A (en) Port status synchronization method, related device, and system
WO2019149280A1 (en) Method for generating synchronization message, synchronization apparatus, and computer readable storage medium
WO2021164541A1 (en) Communication device and clock synchronization method
WO2021139692A1 (en) Clock port attribute recovery method, device, and system
WO2013097365A1 (en) Method and network device for converging master clock sources
JP2015173311A (en) communication system
KR101735622B1 (en) High availability system and time synchronization method thereof

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17773000

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17773000

Country of ref document: EP

Kind code of ref document: A1