WO2013097365A1 - 收敛主时钟源的方法及网络设备 - Google Patents

收敛主时钟源的方法及网络设备 Download PDF

Info

Publication number
WO2013097365A1
WO2013097365A1 PCT/CN2012/072699 CN2012072699W WO2013097365A1 WO 2013097365 A1 WO2013097365 A1 WO 2013097365A1 CN 2012072699 W CN2012072699 W CN 2012072699W WO 2013097365 A1 WO2013097365 A1 WO 2013097365A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
mcc
clock source
state machine
primary clock
Prior art date
Application number
PCT/CN2012/072699
Other languages
English (en)
French (fr)
Inventor
陈栋
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013097365A1 publication Critical patent/WO2013097365A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0641Change of the master or reference, e.g. take-over or failure of the master

Definitions

  • the present invention relates to a digital synchronization technology, and more particularly to a method and network device for converging a primary clock source.
  • Digital synchronous networks have been widely used.
  • high-precision clock synchronization of devices in the network is the key to technology.
  • clocks There are many types of clocks that are widely used at present, and they can be classified into line clocks and non-line clocks according to the transmission method.
  • the non-line clock includes: a global positioning system (GPS) clock, a pulse per second (PPls) clock, a building integrated timing supply (BITS) clock, etc.; the line clock includes: a synchronous digital hierarchy (SDH) clock, a synchronous Ethernet clock , E1 clock, 1588 clock, etc.
  • GPS global positioning system
  • Pls pulse per second
  • BITS building integrated timing supply
  • the line clock includes: a synchronous digital hierarchy (SDH) clock, a synchronous Ethernet clock , E1 clock, 1588 clock, etc.
  • SDH synchronous digital hierarchy
  • the International Telecommunication Union Telecommunication Standardization Organization recommends that G.704 use the Synchronization Status Message (SSM) to pass the quality level of the timing signal in the synchronous timing link.
  • SSM Synchronization Status Message
  • Table 1 Clock quality level table
  • the SDH clock and the synchronous Ethernet clock can send SSM information, and the SSM information is used to complete the selection calculation of the primary clock source among the devices.
  • the SSM protocol specifies two bytes. The first is the sync information byte (S1 byte): and uses S1's (bit5 ⁇ bit8) to characterize the different clock quality levels to pass the SSM information. Bits 1 to 4 of S1 are reserved bits. The second is to extend the SI byte: Use the bits 4 to 8 of this byte to indicate the number of hops the SSM has passed. As shown in table 2:
  • the high quality level is selected as the main clock source; the clock quality is the same, and the number of nodes passing through is selected as the main clock source. If the number of passing nodes is the same, any reference source is randomly selected as the device primary clock source.
  • the synchronous Ethernet device uses the Ethernet slow protocol packet to send S SM packets.
  • the transmission period of the Ethernet slow protocol is usually set. It is set to 1 second.
  • the convergence speed of the primary clock source should be within 10 seconds.
  • the number of hops of the air interface device will reach 100 hops or more.
  • the clock it receives is more than 50 seconds.
  • the convergence time is slow, causing the clocks between devices to be out of synchronization during the entire convergence period, which can easily cause network interruption and affect data communication. Therefore, a method that can quickly converge the main clock source is especially critical.
  • the traditional algorithm has a more serious problem: In the process of handover, it is likely to cause multiple clock source switching for devices in the network. Multiple clock switchings can cause large changes in the clock frequency of the device, resulting in continuous interruption of the service.
  • the network devices (NE) 1 ⁇ NE64 pass the clock through the synchronous Ethernet (the device in the middle is omitted), where NE1 is connected to the GPS clock source with a quality level of 2.
  • the NE 32 is connected to the SETS clock source with a quality class of 11.
  • the NE 64 is connected to the BITS clock source with a quality of 4.
  • the devices in the network will reselect the clock.
  • the intermediate process of network source selection When the clock source of NE1 is lost, the message with the clock quality of 15 is transmitted to the adjacent device.
  • the NE32 receives a packet with a clock quality of 15, it selects the SETS device clock source with a clock quality of 11. And the current selected source clock quality 11 is actively transmitted to the adjacent network device, as shown in Figure 2.
  • the NE64 When a clock level of 11 is sent to the NE64, the NE64 will select the BITS clock with a quality level of 4 as the clock source for this device. And sending the quality of the SSM to the neighboring network device is 4, as shown in Figure 3.
  • the embodiment of the invention provides a method for converging a primary clock source and a network device, so as to solve the problem that the convergence method of the existing convergence method is slow.
  • An embodiment of the present invention provides a method for converging a primary clock source, where the method includes:
  • the current network device enters a master clock change (MCC) state machine
  • the current network device sends and carries to the adjacent network device in the MCC state machine.
  • Synchronization status information (SSM) message of the MCC flag Synchronization status information (SSM) message of the MCC flag.
  • the entering, by the current network device, the MCC state machine includes:
  • the current network device After the current network device receives the SSM message carrying the MCC flag, the current network device enters Within the MCC state machine; or
  • the current network device After the current network device detects that the current primary clock source has changed, the current network device enters the MCC state machine.
  • the method further includes:
  • the SSM message sent by the neighboring network device in the MCC state machine Receiving, by the current network device, the SSM message sent by the neighboring network device in the MCC state machine, and acquiring a new primary clock source therefrom, determining that the new primary clock source is different from the previously tracked primary clock source, The previously tracked primary clock source is set to a free-running state, and an SSM message filling the synchronization information byte with the clock quality of the new primary clock source is sent to the neighboring network device.
  • the method further includes: after the timeout of the MCC state machine, the current network device writes information about the new primary clock source to the underlying hardware, and writes the selected information to the bottom hardware.
  • the new primary clock source acts as the primary clock source for the current network device.
  • the MCC flag is located in any one of the first to third bits of the synchronization information byte.
  • the embodiment of the invention provides a network device, where the network device includes:
  • the access module is configured to enter the network device into a master clock change (MCC) state machine; and the sending module is configured to: send, by the network device, the synchronization state information carrying the MCC flag to the neighboring network device in the MCC state machine ( SSM) message.
  • MCC master clock change
  • SSM MCC state machine
  • the entering module is configured to receive the SSM message that is sent by the neighboring network device and that carries the MCC flag, and enter the MCC state machine; or, when detecting that the current primary clock source is generated, After the change, and enter the MCC state machine.
  • the network device further includes a setting module
  • the setting module is configured to: when the network device receives an SSM message sent by a neighboring network device in the MCC state machine, and obtains a new primary clock source therefrom, determining the new master clock received by the receiving module After the source is different from the primary clock source tracked by the network device, the previously tracked primary clock source is set to a free-running state, and the synchronization module is configured to fill the synchronization information with the clock quality of the new primary clock source.
  • the network device further includes: Writing to the module, after the MCC state machine times out, writing information of the current new primary clock source to the underlying hardware, and selecting the new primary clock source written to the underlying hardware as the network device The main clock source.
  • the MCC flag is located in any one of the first to third bits of the synchronization information byte.
  • the method for the convergence of the primary clock source and the network device quickly broadcast the primary clock source change by using the SSM packet carrying the MCC flag, so that when the primary clock source of a device changes, the operation of sending the packet is not sent by the slow protocol.
  • the limitation of the period is such that the clock convergence time of the entire system is shortened by 3 to 5 times, the convergence speed is effectively improved, and the convergence time is saved.
  • 1 is a schematic diagram of clock tracking of a current network steady state
  • 2 is a schematic diagram of current network transition state clock tracking
  • FIG. 3 is a schematic diagram of clock tracking after the existing network is re-selected
  • FIG. 4 is a flow chart of an embodiment of a method for converging a master clock source according to the present invention
  • FIG. 5 is a schematic structural diagram of an embodiment of a network device according to the present invention. Preferred embodiment of the invention
  • Step 401 A current network device enters an MCC state machine.
  • the current network device receives the synchronization status information (SSM) message carrying the MCC flag, and enters the MCC state machine; or the current network device detects that the current primary clock source has changed. , enter the MCC state machine.
  • SSM synchronization status information
  • Step 402 The current network device sends, in the MCC state machine, a synchronization state information (SSM) message carrying an MCC flag to a neighboring network device, such as a downstream network device, where the MCC
  • SSM synchronization state information
  • the flag may be located in any one of the first to third bits of the sync information (S1) byte, as shown in Table 3, which is defined on the third bit (bit3) of the S1 byte.
  • N is the total number of hops in the network system
  • SSM message delay of each device is 50ms, so that N / 20 can get the total transmission time.
  • Step 403 The current network device receives, in the MCC state machine, a new primary clock source sent by a network device that is adjacent to the network device.
  • Step 404 comparing whether the new primary clock source is different from the previously tracked primary clock source, if not, performing step 405, otherwise, proceeding to step 407;
  • Step 405 the primary clock source is set to a free-running state, and the SSM "Stext" of the S1 byte is filled with the clock quality of the new primary clock source;
  • the network device still reads the SSM information from each port according to the SSM protocol to obtain a new primary clock source; however, the difference between the processing and the non-state processing is: If the new primary clock source and the current master are obtained The clock source is different.
  • the current main clock source cannot be directly written to the underlying hardware to switch the clock reference source. Instead, the current clock source of the current device is set to a free-running state. In a short period of several tens of seconds, free oscillation In the mode, the frequency change is small, and the influence on the synchronous data is small, so the effect of setting the free oscillation state on the network is small.
  • the device After obtaining the new primary clock source, the device will immediately fill the S1 byte with the clock quality of the new primary clock source to form the SSM " ⁇ text, and broadcast to the neighboring device through the port immediately. Under this condition, Limited by the slow protocol transmission period, it does not need to wait until the next send window to send.
  • Step 406 determining whether the MCC state machine has timed out, if timed out, proceeding to step 408;
  • Step 407 determine whether the MXC state machine has timed out, if timed out, go to step 409;
  • Step 408 exit MCC state machine, the current new master clock source information (such as quality level) is written to the underlying hardware, the master clock source is switched; otherwise, go to step 403;
  • Step 409 Exit the MCC state machine, and do not operate on the underlying hardware; otherwise, go to step 403.
  • the only condition for the network device in the MCC state machine to exit the MCC state machine is the state machine timeout, which is dynamically configured by the network device as needed.
  • the configuration parameter is N/6 (N is the maximum hop count of the current network). For a 64-hop system, this parameter is configured as 10 seconds.
  • the convergence time of the previous 64-hop example is more than 100 seconds, and the current convergence time is about 10 seconds, and the convergence time is greatly reduced.
  • the device While exiting the MCC state machine, the device writes the latest clock source serial number to the underlying hardware to switch the clock reference source. This source will be the last master clock source of the system, and the only one source operation, avoiding the intermediate transition process.
  • the device does not perform any operations on the underlying hardware. If the primary clock source remains unchanged in the MCC state machine, the device still sends SSM messages to neighboring network devices in cycles according to the requirements of the slow protocol.
  • the method for converging the primary clock source uses the SSM of the MCC flag to quickly broadcast the primary clock source, so that when the primary clock source of a device changes, the operation of sending packets is not limited by the slow protocol transmission period. Therefore, the clock convergence time of the entire system is shortened by 3 to 5 times, the convergence speed is effectively improved, and the convergence time is saved.
  • the device does not perform frequent source selection, if the primary clock source occurs. Change, first transition to the interrupt of the free-oscillation link; only before exiting the MCC state machine, the device sets the final source selection result to the underlying hardware, so that the main clock source is switched from more than 3 times to only 1 Times.
  • This embodiment uses the scenario shown in FIG. 2-3 as an example to describe the convergence process of the primary clock source.
  • the process includes: Step 501: After detecting that the current primary clock source is lost, the NE1 sends the SSM carrying the MCC flag to the neighboring device NE2. Message, and enter the MCC state machine; Step 502: After receiving the SSM message, the NE2 enters the MCC state machine, and sends the message to the NE3, and so on, until it is sent to the NE32.
  • Step 503 After receiving the SSM message in the MMC state machine, the NE32 fills the S1 byte with the SETS clock source with the clock quality of 11, and sends the SE1 clock source with the clock quality of 11 to the NE31 and the NE33 to fill the S1 byte.
  • SSM " ⁇ ;
  • Step 504 After receiving the SSM message, the NE 31 sends the SSM message to the NE 30, and so on. After receiving the SSM message, the NE 33 sends the SSM message to the NE 34, and so on. Step 505, NE1-NE63 After the SSM message is obtained, the new primary clock source SETS is obtained, and the clock quality is 11 . Since the quality of the SETS is 11 and the clock quality 2 of the GPS is different, the primary clock source is set to a free oscillation state.
  • Step 506 After receiving the SSM message, the NE64 fills the S1 byte with the BITS clock source of the quality 4, and sends the SSM byte of the S1 byte with the BITS clock source of the quality of 4, and so on.
  • Step 507 NE1-NE63 obtains a new primary clock source BITS after receiving the SSM message in the MCC state machine, and the clock quality is 4. Since the clock quality 4 of the BITS is different from the clock quality 11 of the SETS, the main The clock source is set to a free-running state;
  • Step 508 When the MCC state machine times out, NE1-NE64 writes the current new primary clock source BITS to the underlying hardware, and uses the BITS clock reference source as the primary clock source commonly used by the network device.
  • the operation of sending packets on the network device in the MCC state machine is not limited by the slow protocol transmission period, which can effectively improve the convergence speed.
  • the device sets the last source selection result to the bottom layer only before exiting the MCC state machine. Hardware, which effectively reduces the number of times the primary clock source is switched.
  • FIG. 5 it is a schematic structural diagram of an embodiment of a network device according to the present invention.
  • the network device includes an entry module 51 and a sending module 52, where:
  • the access module is configured to enter the network device into a master clock change (MCC) state machine; and the sending module is configured to: send, by the network device, the synchronization state information carrying the MCC flag to the neighboring network device in the MCC state machine ( SSM) SSM message.
  • MCC master clock change
  • SSM MCC state machine
  • the access module is specifically configured to receive the SSM message that is sent by the neighboring network device and that carries the MCC flag, and enter the MCC state machine, where the network device is not changed.
  • the network device connected to the primary clock source; or, after detecting that the current primary clock source is changed, sending the SSM packet carrying the MCC flag, and entering the MCC state machine, where the situation is for the network device It is a network device connected to the primary clock source that has changed.
  • the network device further includes a setting module, configured to receive a new primary clock source sent by the neighboring network device in the MCC state machine, and determine the new master received by the receiving module. After the clock source is different from the primary clock source tracked by the network device, the primary clock source is set to a free-running state, and the sending module is sent with the clock quality of the new primary clock source to fill the S1 byte. SSM message.
  • a setting module configured to receive a new primary clock source sent by the neighboring network device in the MCC state machine, and determine the new master received by the receiving module. After the clock source is different from the primary clock source tracked by the network device, the primary clock source is set to a free-running state, and the sending module is sent with the clock quality of the new primary clock source to fill the S1 byte. SSM message.
  • the network device further includes: a writing module 54 configured to write information of the current new primary clock source to the underlying hardware after the MCC state machine times out, and select The new primary clock source written to the underlying hardware acts as the primary clock source for the network device.
  • the network device uses the SSM packet carrying the MCC flag to quickly broadcast the change of the primary clock source, so that when the primary clock source of a device changes, the operation of sending the packet is not limited by the slow protocol transmission period, thereby making the entire system
  • the clock convergence time is shortened by 3 to 5 times, which effectively improves the convergence speed and saves convergence time.
  • the device does not perform frequent source selection. If the primary clock source changes, the transition first occurs. To the free-running state, this makes the frequency difference between the devices not become very large in the short term, so the communication link is not interrupted; the device will only select the final source result before exiting the MCC state machine. Set to the underlying hardware, reducing the switching of the primary clock source from more than 3 times to only one.
  • the method for the convergence of the primary clock source and the network device provided by the embodiment of the present invention rapidly broadcast the primary clock source change by using the SSM packet carrying the MCC flag, so that when the primary clock source of a device changes, the packet is sent.
  • the operation is not limited by the slow protocol transmission period, which shortens the clock convergence time of the entire system by 3 to 5 times, effectively improves the convergence speed and saves convergence time.

Landscapes

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

Abstract

本发明提供了一种收敛主时钟源的方法及网络设备,该方法包括:当前网络设备进入到主时钟改变(MCC)状态机;所述当前网络设备在所述MCC状态机内向相邻网络设备发送携带有MCC标志的同步状态信息(SSM)报文。上述收敛主时钟源的方法及网络设备,利用携带有MCC标志的SSM报文快速广播主时钟源变化,使得当一个设备的主时钟源发生变化后,发送报文的操作不受慢协议发送周期的限制,从而使得整个系统的时钟收敛时间缩短3~5倍,有效地提高了收敛速度,节省了收敛时间。

Description

收敛主时钟源的方法及网络设备
技术领域
本发明涉及一种数字同步技术, 尤其涉及一种收敛主时钟源的方法及网 络设备。
背景技术
数字同步网络已逐渐被广泛应用, 在数字同步网中, 高精度地保证网络 内各设备的时钟同步, 是技术的关键。 目前广泛应用的时钟有很多种类, 按 传输方式可分为线路时钟和非线路时钟两大类。
其中, 非线路时钟包括: 全球定位系统(GPS ) 时钟、 每秒一个脉冲 (PPls ) 时钟、楼宇综合定时供给( BITS )时钟等;线路时钟包括:同步数字体系 ( SDH ) 时钟、 同步以太网时钟、 E1时钟、 1588时钟等。
国际电信联盟远程通信标准化组织 (ITU-T )建议 G.704 釆用同步状态信息 ( Synchronization Status Message, SSM )在同步定时链路中传递定时信号的 质量等级。 时钟质量等级的定义如表 1所示: 表 1 时钟质量等级表
Figure imgf000003_0001
在线路时钟中 , SDH时钟和同步以太网时钟可以发送 SSM信息, 并通 过 SSM信息在各设备间完成主时钟源的选择计算。 SSM协议, 规定了两个字节。 第一个是同步信息字节(S1字节): 并利 用 S1的 (bit5~bit8)表征不同的时钟质量等级,以传递 SSM信息 。 S1的 bitl ~ bit4为保留 bit。 第二个是扩展 SI字节: 利用这个字节的 bit4 ~ bit8表示 SSM 所经过的跳数。 如表 2所示:
表 2 扩展 S1字节定义表
Figure imgf000004_0001
两个字节共同决定相邻设备的选源。 质量等级高的被选为主时钟源; 时 钟质量相同, 通过的节点数目少的被选为主时钟源。 通过节点数目相同, 则 随机选择任一参考源为设备主时钟源。
同步以太网设备是利用以太网慢协议报文发送 S SM报文。
这种机制所存在的问题: 在目前的同步时钟选源机制中, 当网络中某一 的设备主时钟源被切换后, 由于釆用的以太网慢协议的报文传输, 其发送周 期通常设定为 1秒,对于固网网络而言,因为固网的拓朴结构多在 10跳以内, 其主时钟源的收敛速度应该在 10秒以内。
但对于微波产品, 其空口设备的传输跳数将达到 100跳以上。 这样其收 敛的时钟为 50秒以上。 收敛的时间慢, 造成各设备之间的时钟在整个收敛期 间不同步, 极易造成网络中断, 影响数据通讯。 因此, 一个能快速收敛主时 钟源的方法显得尤为关键。
传统的算法除了收敛速度慢以外, 还有一个更为严重的问题: 在切换的 过程中, 对于网络中的的设备而言, 很可能造成多次的时钟源切换。 多次的 时钟切换会造成设备时钟频率的大幅度变化, 从而造成业务的连续中断。
如图 1所示的场景中, 网络设备 ( NE ) 1~NE64通过同步以太网传递时 钟(中间的设备省略表示) , 其中, NE1连接 GPS时钟源, 质量等级为 2。
NE 32连接 SETS时钟源, 质量等级为 11。 NE 64连接 BITS时钟源, 质量为 4。
通过 SSM协议, 在稳定状态下, 所有设备将跟踪 NE1设备发出的质量 等级为 2的线路时钟。 各设备间的 S1字节传递如图 1所示。接收到时钟质量 为 2报文的相邻设备向发送方设备返回的时钟等级为 15的报文,代表着跟踪 上一级的时钟源。
当 NE1的 GPS时钟突然丟失,那么网络内的设备会对时钟进行重新选择。 网络选源的中间过程: 当 NE1的时钟源丟失后, 把时钟质量为 15的消 息向相邻设备传递。 当 NE32接收到时钟质量为 15的报文后, 将选择到时钟 质量为 11的 SETS设备时钟源。 并将当前选源的时钟质量 11 , 主动向相邻网 络设备进行传递, 如图 2所描述的场景。
当质量为 11的时钟等级发送到 NE64时, NE64将选择质量等级为 4的 BITS时钟为本设备的时钟源。并向相邻网络设备发送 SSM的质量为 4,如图 3所描述的场景。
这样再经过了 64个周期, 传递到了 NE1 , 完成收敛。 整个收敛的时间达 到了 100秒以上!
而从时钟跟随的角度看: 在整个过程中, NE1~NE63 , 都经历了时钟源 质量从 2 - >11 - >4的过程。 时钟源切换了两次。若是网络系统中再增加其它 的时钟参考源, 时钟切换的次数会大幅增加。 而每一次时钟源的切换, 对时 钟的波动都很大, 极易造成各设备间时钟的不同步, 从而造成通讯数据的中 断。 发明内容
本发明实施例提供了一种收敛主时钟源的方法及网络设备, 以解决现有 的收敛方法收敛速度慢的问题。
本发明实施例提供了一种收敛主时钟源的方法, 该方法包括:
当前网络设备进入到主时钟改变 ( MCC )状态机;
所述当前网络设备在所述 MCC 状态机内向相邻网络设备发送携带有
MCC标志的同步状态信息 ( SSM )报文。
可选地, 所述当前网络设备进入到 MCC状态机包括:
所述当前网络设备接收到携带有所述 MCC标志的 SSM报文后, 进入到 所述 MCC状态机内; 或者
所述当前网络设备检测到当前主时钟源发生变化后, 进入到所述 MCC 状态机。
可选地, 所述当前网络设备在所述 MCC状态机内向相邻网络设备发送 所述 SSM报文之后, 所述方法还包括:
所述当前网络设备在所述 MCC状态机内接收相邻网络设备发送的 SSM 报文并从中获取新主时钟源, 确定所述新主时钟源与之前跟踪的主时钟源不 同后, 将所述之前跟踪的主时钟源设置为自由振荡状态, 并向相邻网络设备 发送以所述新主时钟源的时钟质量填充同步信息字节的 SSM报文。
可选地, 所述方法还包括: 所述当前网络设备在所述 MCC状态机超时 后, 将所述新主时钟源的信息写入底层硬件, 并将选择写入所述底层硬件的 所述新主时钟源作为当前网络设备的主时钟源。
可选地, 所述 MCC标志位于所述同步信息字节的第一至第三位中的任 意一位。
本发明实施例提供了一种网络设备, 该网络设备包括:
进入模块, 设置为所述网络设备进入到主时钟改变 (MCC )状态机; 发送模块, 设置为所述网络设备在所述 MCC状态机内向相邻网络设备 发送携带有 MCC标志的同步状态信息 ( SSM )报文。
可选地, 所述进入模块, 具体设置为接收相邻网络设备发送的携带有所 述 MCC标志的所述 SSM报文, 进入到所述 MCC状态机; 或者, 在检测到 当前主时钟源发生变化后, 并进入到所述 MCC状态机。
可选地, 所述网络设备还包括设置模块;
所述设置模块, 设置为当所述网络设备在所述 MCC状态机内接收相邻 网络设备发送的 SSM报文并从中获取新主时钟源,在确定所述接收模块接收 的所述新主时钟源与所述网络设备之前跟踪的主时钟源不同后, 将所述之前 跟踪的主时钟源设置为自由振荡状态, 并向所述发送模块发送以所述新主时 钟源的时钟质量填充同步信息字节的 SSM报文。
可选地, 所述网络设备还包括: 写入模块, 设置为在所述 MCC状态机超时后, 将当前的新主时钟源的 信息写入底层硬件, 并将选择写入所述底层硬件的所述新主时钟源作为所述 网络设备的主时钟源。
可选地, 所述 MCC标志位于同步信息字节的第一至第三位中的任意一 位。
上述收敛主时钟源的方法及网络设备, 利用携带有 MCC标志的 SSM报 文快速广播主时钟源变化, 使得当一个设备的主时钟源发生变化后, 发送才艮 文的操作不受慢协议发送周期的限制, 从而使得整个系统的时钟收敛时间缩 短 3 ~ 5倍, 有效地提高了收敛速度, 节省了收敛时间。 附图概述
图 1是现有网络稳定状态时钟跟踪示意图;
图 2是现有网络过渡状态时钟跟踪示意图;
图 3是现有网络重新选源后的时钟跟踪示意图;
图 4是本发明收敛主时钟源方法实施例的流程图;
图 5是本发明网络设备实施例的结构示意图。 本发明的较佳实施方式
下文中将结合附图对本发明的实施例进行详细说明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。
如图 4所示, 是本发明收敛主时钟源方法实施例的流程图, 该方法包括: 步骤 401、 当前网络设备进入到 MCC状态机;
该步骤包括: 所述当前网络设备接收携带有 MCC标志的同步状态信息 ( SSM )报文, 并进入到所述 MCC状态机内; 或者, 所述当前网络设备检 测到当前主时钟源发生变化后, 进入到所述 MCC状态机。
步骤 402、所述当前网络设备在 MCC状态机内向相邻网络设备如下游网 络设备发送携带有 MCC标志的同步状态信息( SSM )报文; 其中, 该 MCC 标志可以位于同步信息 (S1 )字节的第一至第三位中的任意一位, 如表 3所 示, 将其定义在 S1字节的第三位(bit3 )上。
表 3 改变后的 S1字节定义表
扩展 QL TLV B1 B2 B3 B4 B5 B6 ! B7 \ B8 的第 4字节 ; ! MCC ! S 1 \ S 1 ! S 1 \ S 1
由于处于 MCC状态机中的网络设备发送报文的操作不受慢协议发送周 期的限制, 无需等待到下一发送窗口才发送。 这样的机制可以保证在 N / 20 时间内 (N为网络系统中链路总的跳数), 网络内的所有设备能接收到 MCC 消息。 总的跳数比上 20的计算, 是基于每个设备的 SSM报文延迟在 50ms, 这样 N / 20就能得到总的发送时间。
步骤 403、所述当前网络设备在所述 MCC状态机内接收相邻的网络设备 如上游的网络设备发送的新主时钟源;
步骤 404、 比较新主时钟源与之前跟踪的主时钟源是否不同, 若不同, 执行步骤 405 , 否则, 转向步骤 407;
步骤 405、 将所述主时钟源设置为自由振荡状态, 并发送以所述新主时 钟源的时钟质量填充 S1字节的 SSM "^文; 转向步骤 406;
在 MCC状态机内, 网络设备依然按 SSM的协议,从各端口读取 SSM信 息, 获得新主时钟源; 但和非状态机内处理上的区别是: 若获得的新主时钟 源和当前主时钟源不同, 不能直接将当前的主时钟源写入底层硬件, 进行时 钟参考源的切换; 而是将当前的设备的主时钟源设置为自由振荡状态; 在几 十秒以内短期内, 自由振荡模式下频率变化很小, 对同步数据影响很小, 所 以设置为自由振荡状态对网络影响 4艮小。
在 MCC状态机内, 获得新主时钟源后, 该设备将立即以新主时钟源的 时钟质量填充 S1字节, 组成 SSM "^文, 并即时通过端口向相邻设备广播。 此条件下不受慢协议发送周期的限制, 无需等待到下一发送窗口才发送。
步骤 406、 判断 MCC状态机是否超时, 若超时, 转向步骤 408;
步骤 407、 判断 MXC状态机是否超时, 若超时, 转向步骤 409; 步骤 408、 退出 MCC状态机, 将当前的新主时钟源的信息(例如质量等 级)写入底层硬件, 进行主时钟源的切换; 否则, 转向步骤 403;
步骤 409、 退出 MCC状态机, 不对底层硬件进行操作; 否则, 转向步骤 403。 处于 MCC状态机的网络设备退出 MCC状态机的唯一条件就是状态机 超时, 此超时时间由网络设备根据需要动态配置。 其配置的指导参数为 N/6 ( N为当前网络的最大跳数) , 以 64跳的系统为例, 此参数配置为 10秒。 前文 64跳的例子的收敛时间在 100秒以上,而现在的收敛时间在 10秒左右, 收敛的时间大大减少了。
设备在退出 MCC状态机的同时, 将最新的时钟源序号写入到底层硬件 中, 进行时钟参考源的切换。 此源将是这个系统最后共同选用的主时钟源, 也是唯一的一次选源操作, 避免了中间的过渡切换过程。
当然, 若在整个 MCC状态机内, 网络设备所获得的主时钟源, 始终没 有变化,依旧是原来的主时钟源, 那么该设备不对底层硬件进行任何的操作。 若在 MCC状态机内, 主时钟源始终保持不变, 则设备依旧根据慢协议的要 求, 按周期发送 SSM报文给相邻网络设备。
上述收敛主时钟源的方法, 利用携带有 MCC标志的 SSM "^文快速广播 主时钟源变化, 使得当一个设备的主时钟源发生变化后, 发送报文的操作不 受慢协议发送周期的限制, 从而使得整个系统的时钟收敛时间缩短 3 ~ 5倍, 有效地提高了收敛速度, 节省了收敛时间; 另外, 当设备处于 MCC状态机 内, 设备不进行频繁的选源, 若主时钟源发生改变, 则先过渡到自由振荡状 讯链路的中断; 只有在退出 MCC状态机前, 设备才将最后的选源结果设置 到底层硬件, 使得主时钟源的切换从 3次以上降低到仅 1次。
实施例
该实施例以图 2-3所示场景为例介绍主时钟源的收敛过程, 该过程包括: 步骤 501、 NE1检测到当前主时钟源丟失后, 向相邻设备 NE2发送携带 有 MCC标志的 SSM报文, 并进入到 MCC状态机; 步骤 502、 NE2接收到该 SSM报文后, 进入 MCC状态机, 并向 NE3发 送该报文, 依次类推, 直至发送到 NE32;
步骤 503、 NE32在 MMC状态机内接收到该 SSM报文后, 以时钟质量 为 11的 SETS时钟源填充 S1字节, 向 NE31和 NE33发送以时钟质量为 11 的 SETS时钟源填充 S1字节的 SSM "^艮文;
步骤 504、 NE31接收到 SSM报文后, 将该 SSM报文发送给 NE30, 依 次类推; NE33接收到 SSM报文后, 将该 SSM报文发送给 NE34, 依次类推; 步骤 505、 NE1-NE63收到该 SSM报文后获得新主时钟源 SETS, 时钟质 量为 11 , 由于 SETS的质量为 11与 GPS的时钟质量 2不同, 因此, 将所述 主时钟源设置为自由振荡状态;
步骤 506、 NE64收到该 SSM报文后, 将以质量为 4的 BITS时钟源填充 S1字节, 向 NE63发送以质量为 4的 BITS时钟源填充 S1字节的 SSM ^艮文, 依次类推;
步骤 507、NE1-NE63在 MCC状态机内收到该 SSM报文后获得新主时钟 源 BITS, 时钟质量为 4, 由于 BITS的时钟质量 4与 SETS的时钟质量 11不 同, 因此, 将所述主时钟源设置为自由振荡状态;
步骤 508、 当 MCC状态机超时时, NE1-NE64将当前的新主时钟源 BITS 写入底层硬件, 将 BITS时钟参考源作为网络设备共同选用的主时钟源。
由于处于 MCC状态机中的网络设备发送报文的操作不受慢协议发送周 期的限制, 可以有效提高收敛速度; 另外, 只有在退出 MCC状态机前, 设 备才将最后的选源结果设置到底层硬件, 从而有效地减少了主时钟源的切换 次数。
如图 5所示, 是本发明网络设备实施例的结构示意图, 该网络设备包括 进入模块 51和发送模块 52, 其中:
进入模块, 设置为所述网络设备进入到主时钟改变 (MCC )状态机; 发送模块, 设置为所述网络设备在所述 MCC状态机内向相邻网络设备 发送携带有 MCC标志的同步状态信息 ( SSM ) SSM报文。 上述 MCC标志可以位于 SI字节的第一位至第三位中的任意一位。
另外, 所述进入模块具体设置为接收相邻网络设备发送的携带有所述 MCC标志的所述 SSM报文,并进入到所述 MCC状态机,该情况是针对该网 络设备不是与发生改变的主时钟源相连的网络设备; 或者, 在检测到当前主 时钟源发生变化后, 发送携带所述 MCC标志的所述 SSM报文, 并进入到所 述 MCC状态机, 该情况是针对该网络设备是与发生改变的主时钟源相连的 网络设备。
可选地, 网络设备还包括设置模块 53; 所述设置模块, 设置为在所述 MCC状态机内接收相邻网络设备发送的新主时钟源,在确定所述接收模块接 收的所述新主时钟源与所述网络设备之前跟踪的主时钟源不同后, 将所述主 时钟源设置为自由振荡状态, 并向所述发送模块发送以所述新主时钟源的时 钟质量填充 S1字节的 SSM报文。
为了有效减少主时钟源的切换次数,所述网络设备还包括:写入模块 54, 设置为在所述 MCC状态机超时后, 将当前的新主时钟源的信息写入底层硬 件, 并将选择写入所述底层硬件的所述新主时钟源作为所述网络设备的主时 钟源。
该网络设备,利用携带有 MCC标志的 SSM报文快速广播主时钟源变化, 使得当一个设备的主时钟源发生变化后, 发送报文的操作不受慢协议发送周 期的限制, 从而使得整个系统的时钟收敛时间缩短 3 ~ 5倍, 有效地提高了收 敛速度, 节省了收敛时间; 另外, 当设备处于 MCC状态机内, 设备不进行 频繁的选源, 若主时钟源发生改变, 则先过渡到自由振荡状态, 这使得各设 备之间的频率差别不会在短期内变的很大, 因而不会造成通讯链路的中断; 只有在退出 MCC状态机前, 设备才将最后的选源结果设置到底层硬件, 使 得主时钟源的切换从 3次以上降低到仅 1次。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 上述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明实施例不限 制于任何特定形式的硬件和软件的结合。 佳实施例对本发明进行了详细说明。 本领域的普通技术人员应当理解, 可以 对本发明实施例的技术方案进行修改或者等同替换, 而不脱离本发明技术方 案的精神和范围, 均应涵盖在本发明的权利要求范围当中。
工业实用性
本发明的实施方式所提供的收敛主时钟源的方法及网络设备, 利用携带 有 MCC标志的 SSM报文快速广播主时钟源变化, 使得当一个设备的主时钟 源发生变化后, 发送报文的操作不受慢协议发送周期的限制, 从而使得整个 系统的时钟收敛时间缩短 3 ~ 5倍,有效地提高了收敛速度,节省了收敛时间。

Claims

权 利 要 求 书
1、 一种收敛主时钟源的方法, 包括:
当前网络设备进入到主时钟改变 ( MCC )状态机;
所述当前网络设备在所述 MCC 状态机内向相邻网络设备发送携带有 MCC标志的同步状态信息 ( SSM )报文。
2、 根据权利要求 1所述的方法, 其中:
所述当前网络设备进入到 MCC状态机的步骤包括:
所述当前网络设备接收到携带有所述 MCC标志的 SSM报文后, 进入到 所述 MCC状态机内; 或者
所述当前网络设备检测到当前主时钟源发生变化后, 进入到所述 MCC 状态机。
3、 根据权利要求 1所述的方法, 其中: 报文的步骤之后, 所述方法还包括:
所述当前网络设备在所述 MCC状态机内接收相邻网络设备发送的 SSM 报文并从中获取新主时钟源, 确定所述新主时钟源与之前跟踪的主时钟源不 同后, 将所述之前跟踪的主时钟源设置为自由振荡状态, 并向相邻网络设备 发送以所述新主时钟源的时钟质量填充同步信息字节的 SSM报文。
4、 根据权利要求 3所述的方法, 其还包括:
所述当前网络设备在所述 MCC状态机超时后, 将所述新主时钟源的信 息写入底层硬件, 并将选择写入所述底层硬件的所述新主时钟源作为所述当 前网络设备的主时钟源。
5、 根据权利要求 1-4任一权利要求所述的方法, 其中:
所述 MCC标志位于所述同步信息字节的第一至第三位中的任意一位。
6、 一种网络设备, 包括:
进入模块, 其设置为使所述网络设备进入到主时钟改变( MCC )状态机; 以及
发送模块, 其设置为在所述网络设备在所述 MCC状态机内时向相邻网 络设备发送携带有 MCC标志的同步状态信息 ( SSM )报文。
7、 根据权利要求 6所述的网络设备, 其中:
所述进入模块是设置为接收相邻网络设备发送的携带有所述 MCC标志 的 SSM报文, 进入到所述 MCC状态机; 或者, 在检测到当前主时钟源发生 变化后, 进入到所述 MCC状态机。
8、 根据权利要求 6所述的网络设备, 其还包括设置模块;
所述设置模块设置为当所述网络设备在所述 MCC状态机内时接收相邻 网络设备发送的 SSM报文并从中获取新主时钟源,在确定所述接收模块接收 的所述新主时钟源与所述网络设备之前跟踪的主时钟源不同后, 将所述之前 跟踪的主时钟源设置为自由振荡状态, 并向所述发送模块发送以所述新主时 钟源的时钟质量填充同步信息字节的 SSM报文。
9、 根据权利要求 8所述的网络设备, 其还包括:
写入模块, 其设置为在所述 MCC状态机超时后, 将当前的新主时钟源 的信息写入底层硬件, 并将选择写入所述底层硬件的所述新主时钟源作为所 述网络设备的主时钟源。
10、 根据权利要求 6-9任一权利要求所述的网络设备, 其中:
所述 MCC标志位于同步信息字节的第一至第三位中的任意一位。
PCT/CN2012/072699 2011-12-26 2012-03-21 收敛主时钟源的方法及网络设备 WO2013097365A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110442312.4A CN103178919B (zh) 2011-12-26 2011-12-26 收敛主时钟源的方法及网络设备
CN201110442312.4 2011-12-26

Publications (1)

Publication Number Publication Date
WO2013097365A1 true WO2013097365A1 (zh) 2013-07-04

Family

ID=48638559

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072699 WO2013097365A1 (zh) 2011-12-26 2012-03-21 收敛主时钟源的方法及网络设备

Country Status (2)

Country Link
CN (1) CN103178919B (zh)
WO (1) WO2013097365A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471537A (zh) * 2014-09-05 2016-04-06 北京华为数字技术有限公司 一种时钟隔离的方法和装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107959537B (zh) * 2016-10-17 2020-10-16 中国移动通信有限公司研究院 一种状态同步方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100264890B1 (ko) * 1997-12-03 2000-09-01 윤종용 교환시스템에서망동기클럭공급방법
CN101159533A (zh) * 2007-11-06 2008-04-09 中兴通讯股份有限公司 一种分组传送网中时钟链路自动保护的方法
JP2010219850A (ja) * 2009-03-17 2010-09-30 Nec Corp 伝送通信装置の同期タイミングソース切り替え方法
CN101895361A (zh) * 2010-07-12 2010-11-24 中兴通讯股份有限公司 传输同步状态信息的方法、系统和时钟板
CN102130766A (zh) * 2010-01-15 2011-07-20 华为技术有限公司 一种同步以太网时钟跟踪的方法、设备及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100264890B1 (ko) * 1997-12-03 2000-09-01 윤종용 교환시스템에서망동기클럭공급방법
CN101159533A (zh) * 2007-11-06 2008-04-09 中兴通讯股份有限公司 一种分组传送网中时钟链路自动保护的方法
JP2010219850A (ja) * 2009-03-17 2010-09-30 Nec Corp 伝送通信装置の同期タイミングソース切り替え方法
CN102130766A (zh) * 2010-01-15 2011-07-20 华为技术有限公司 一种同步以太网时钟跟踪的方法、设备及系统
CN101895361A (zh) * 2010-07-12 2010-11-24 中兴通讯股份有限公司 传输同步状态信息的方法、系统和时钟板

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471537A (zh) * 2014-09-05 2016-04-06 北京华为数字技术有限公司 一种时钟隔离的方法和装置

Also Published As

Publication number Publication date
CN103178919B (zh) 2017-03-29
CN103178919A (zh) 2013-06-26

Similar Documents

Publication Publication Date Title
CN101286835B (zh) 一种时钟跟踪的方法、装置及网元设备
US11496235B2 (en) Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP
JP5792884B2 (ja) 通信ネットワークにおける時間配信のための方法、装置およびシステム
CN102263630B (zh) 一种时钟源的选择方法
US10892884B2 (en) Method for updating clock synchronization topology, method for determining clock synchronization path, and device
CN102006135A (zh) 一种选择同步时钟源的方法及装置
US9749073B2 (en) Clock recovery in a packet based network
US9215092B2 (en) Clock selection for synchronous Ethernet
WO2014101669A1 (zh) 时间同步方法及系统
WO2013071807A1 (zh) 一种多时钟同步技术混合组网的实现方法、系统和装置
CN103248445A (zh) 一种时钟同步方法和装置
WO2013189176A2 (zh) 一种多同步域的时间同步系统、方法及跨域设备
CN102130766A (zh) 一种同步以太网时钟跟踪的方法、设备及系统
WO2006047946A1 (fr) Procede de determination de trajet de signaux d'horloge et procede de signaux d'horloge dans le reseau
WO2013152700A1 (zh) 微波网元的时钟源选择方法及装置
WO2012163172A1 (zh) 一种时钟同步方法及设备
CN103051439B (zh) 一种选择时钟源的方法及装置
CN102420688A (zh) 一种时钟频率同步方法及装置
CN114389735A (zh) 一种基于ieee802.1as冗余主时钟的时钟同步方法
WO2013097365A1 (zh) 收敛主时钟源的方法及网络设备
JP2012004925A (ja) 通信装置およびクロック同期方法
CN116232519A (zh) 一种时钟的同步方法和网络设备
WO2005067195A1 (fr) Procede de synchroniser les generateurs horloges dans un reseau
TWI653863B (zh) 連接控制電路
WO2012071838A1 (zh) 多链路时钟恢复方法及装置

Legal Events

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

Ref document number: 12863967

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12863967

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 12863967

Country of ref document: EP

Kind code of ref document: A1