WO2011011932A1 - Method for processing precision time protocol message and apparatus thereof - Google Patents

Method for processing precision time protocol message and apparatus thereof Download PDF

Info

Publication number
WO2011011932A1
WO2011011932A1 PCT/CN2009/073794 CN2009073794W WO2011011932A1 WO 2011011932 A1 WO2011011932 A1 WO 2011011932A1 CN 2009073794 W CN2009073794 W CN 2009073794W WO 2011011932 A1 WO2011011932 A1 WO 2011011932A1
Authority
WO
WIPO (PCT)
Prior art keywords
ptp
port
state
protocol
transparent
Prior art date
Application number
PCT/CN2009/073794
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 WO2011011932A1 publication Critical patent/WO2011011932A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • 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
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0679Clock or time synchronisation in a network by determining clock distribution path in a network
    • 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/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]

Definitions

  • the present invention relates to the field of mobile communications technologies, and in particular, to a method and apparatus for processing a precise time transfer protocol message.
  • frequency synchronization that is, signals at the source end and the destination end maintain a certain relationship in frequency or phase
  • frequency synchronization can also be referred to as time 4 Synchronization, for example, synchronous Ethernet, E1 interface, 4 synchronization, etc.
  • time synchronization that is, the source and destination are not only the same frequency, but also the same phase, and have the same time count scale.
  • each network element node can be locked by clock synchronization signals (such as synchronous Ethernet, etc.).
  • Each network element node clock and other fixed frequency sources together form a frequency (or clock) synchronization network.
  • the main implementation methods include: Global Position System (GPS) 4 time-dependent or using time synchronization protocol (for example, IEEE Std 1588TM - 2008, etc.) to adjust master time 4 and slave time Time offset between 4, achieving time synchronization.
  • the time synchronization protocol can also achieve frequency synchronization between the master clock and the slave clock.
  • the Packet Transport Network (PTN) device mainly implements frequency synchronization and time synchronization in the network through the IEEE Std 1588TM - called PTP to solve the replacement problem of the base station GPS.
  • the basic function of PTP is to keep the clocks of each node in the distributed network and keep the clock and time synchronized within a certain precision.
  • 1588v2 provides three basic clock types that can be used for networking between master and slave clocks: boundary clock, end-to-end (E2E) transparent clock, and point-to-point (point to point). ) Transparent clock.
  • boundary clock end-to-end (E2E) transparent clock
  • point-to-point point to point.
  • Transparent clock In a distributed network, three types of clocks can be mixed, but in the case of networking, if a plurality of transparents form a ring structure between the four, the node itself has a function of being transparent.
  • the Best Master Clock (BMC) algorithm does not run the best master clock (BMC) algorithm. After the packet is processed, the packet is forwarded.
  • BMC Best Master Clock
  • the present invention provides an improved PTP message processing method and apparatus for solving the problem of PTP 4 ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ According to an aspect of the present invention, an accurate PTP message processing method is provided for processing a PTP 4 message in a looped network composed of transparent clocks.
  • the method for processing an accurate PTP 4 file includes: running a multiple spanning tree protocol (MSTP) on each transparent clock in the foregoing network, and selecting a state of each port on which each PTP protocol is enabled on a transparent clock;
  • MSTP multiple spanning tree protocol
  • Each of the transparent clocks processes the PTP 4 message according to the state of the port selected by the MSTP protocol and the type of the PTP 4 message to be processed, and forwards the processed PTP only on the port in the sending state.
  • the status of the port includes one of the following: a disabled state, a listening state, a learning state, a sending state, and a blocking state.
  • the MSTP protocol is run on each of the transparent clocks to select a dog state of each port on which the PTP protocol is enabled on each transparent clock, including: creating, for each transparent clock, an instance of a predetermined virtual local area network, where the virtual local area network The port that runs the PTP protocol with the link link on the transparent clock. The MSTP protocol is run on each transparent clock, and the state of a port on the link in which the PTP 4 is looped in the network is set based on the created instance. Is blocked.
  • the above-mentioned virtual local area network is dedicated to PTP.
  • the PTP 4 message to be processed includes: a PTP 4 message generated by the transparent clock and/or a PTP 4 message received by the transparent clock.
  • the method further includes: automatically running the MSTP protocol again on each transparent clock in the network, and reselecting the states of the ports on the transparent clocks.
  • a PTP 4 file processing apparatus located at a node having a transparent clock function.
  • the PTP message processing apparatus includes: an MSTP protocol module, a PTP protocol module, and a PTP 4 ⁇ message forwarding module.
  • the MSTP protocol module is configured to generate and run the MSTP protocol, and determine the status of each port of the node that is enabled with the PTP protocol.
  • the PTP protocol module is configured to determine the status of each port and the PTP according to the MSTP protocol module.
  • the PTP message forwarding module is configured to forward the PTP message processed by the PTP protocol module on the port in the sending state.
  • the status of the port includes one of the following: a disabled state, a listening state, a learning state, a sending state, and a blocking state.
  • FIG. 1 is a flow chart of a PTP 4 ⁇ message processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a network composed of a transparent clock in the first embodiment
  • FIG. 3 is a schematic diagram of a mesh network in the second embodiment
  • 4 is a schematic structural diagram of a network structure of a third embodiment
  • FIG. 5 is a schematic structural diagram of a PTP packet processing apparatus according to an embodiment of the present invention
  • FIG. 6 is a specific implementation of a PTP packet processing apparatus according to an embodiment of the present invention; Schematic diagram of the structure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A function of a node with a transparent clock function does not run the BMC algorithm. Therefore, if a ring structure is formed between multiple transparent clocks during networking, the PTP 4 message will be looped.
  • the embodiment of the invention provides an improved PTP 4 message processing scheme.
  • each node having a transparent clock function runs the MSTP protocol to create an MST instance, the MST.
  • the instance corresponds to a dedicated PTP 4 virtual local area network or virtual network (Virtual Local Area Networks, called a VLAN), the VLAN contains PTP ports in the transparent 4 .
  • a VLAN Virtual Local Area Networks
  • the node with transparent clock function will determine which port is disconnected on the loop.
  • the status of the port determined by running MSTP is VLAN-based.
  • the corresponding VLAN is a special VLAN and is used for PTP. Therefore, the status of the determined port is only for PTP. It works, other agreements are not affected.
  • the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
  • the preferred embodiments of the present invention are described in the following with reference to the accompanying drawings, which are intended to illustrate and illustrate the invention.
  • a PTP packet processing method is first provided, and the method is used to process a PTP packet in a looped network composed of transparent clocks.
  • 1 is a flowchart of a PTP 4 message processing method according to an embodiment of the present invention.
  • the PTP 4 file processing method according to an embodiment of the present invention mainly includes the following steps (step S101 - steps) S103): Step S101: Run MSTP on each transparent clock in the network, and select a state of each port on which PTP 10 is enabled in each transparent time; specifically, create an instance for each transparent clock.
  • the VLAN corresponding to the created instance is a predetermined VLAN (that is, a pre-negotiated VLAN).
  • the port included in the VLAN is a port running the PTP protocol with a link link on the transparent clock. Run the MSTP protocol to set the state of a port on the link that is a ring of PTP packets on the network to the blocked state based on the created instance.
  • the status of the port includes, but is not limited to, a prohibited state, a listening state, a learning state, a sending state, and a blocking state. In the embodiment of the present invention, only the port in the transmitting state can forward the PTP message.
  • Step S103 For each transparent clock in the network, the PTP 4 message is processed according to the state of the port selected by the MSTP protocol and the type of the PTP 4 message to be processed, and only after the forwarding process is performed on the port in the sending state. PTP message.
  • the type of 4 ⁇ On all transparent clocks in the network, when there are 4 files to be processed, the type of 4 ⁇ is first determined. If it is a PTP packet, it is determined according to the type of the clock of the node (that is, the boundary clock, the normal clock, the transparent clock) and the type of the PTP 4 message, whether the message should be sent to the PTP protocol stack, or whether it is based on the MSTP. The selected port status is used to process the PTP 4 message.
  • the port status selected by the MSTP is processed, the port status selected by the MSTP protocol and the PTP 4 message type are processed, and the PTp_3 ⁇ 4 text is processed. If it is a different protocol, it will be processed separately. For example, 4 files will be sent to other protocol stack components for processing.
  • Embodiment 1 uses a network composed of a transparent clock as shown in FIG. 2 as an example.
  • a port with a normal clock (OC) and a P2P transparent clock (P2P TC) 1 is connected.
  • P2P TC P2P transparent clock
  • Sync PTP synchronization
  • Pdelay-Rep PTP point-to-point delay request
  • MSTP is enabled on all P2P transparent clocks in the figure to create an instance.
  • the VLAN corresponding to the created instance is a special VLAN with a good quotient.
  • the port included in the VLAN is the port with the link link on the P2P transparent clock (the port must be the port running PTP).
  • the status of each port on each P2P transparent clock is selected, that is, the PTP packet is looped in the figure.
  • a port state on the link is set to a blocking state.
  • the PTP protocol stack If it is a PTP packet, it is judged whether it should be sent to the PTP protocol stack according to the clock type (boundary clock, normal clock, transparent clock) of the node and the type of PTP message, or is it judged according to MSTP.
  • the port state handles PTP 4 ⁇ text. If it is sent to the PTP protocol stack, the PTP 4 message is processed according to the port status selected by the MSTP protocol and the PTP 4 message type. If it is a different protocol, it will be processed separately. For example, 4 baht is sent to other protocol stack components for processing.
  • Step 1 The normal clock 1-1 acts as the MASTER port of the grandfather clock on the link A, and actively initiates the Sync 4 message and the Pdelay Rep 4 message, and responds to the Pdelay-Req 4 Yan Wen.
  • the other common clocks in the figure are used as the slave clocks, and the time is synchronized with the normal clock 1-1; Step 2, after receiving the Sync message on the link A, the P2P transparent clock 1-1 is forwarded to the two links B and C; After receiving the Pdelay-Req 4 message, it is sent to the PTP protocol stack module for processing. At the same time, the node clock sends Pdelay-Req 4 messages on links A, B and C.
  • Step 3 MSTP is enabled on all the transparent clocks of the network, and the VLANs corresponding to the created instances are pre-negotiated special VLANs.
  • the port included in the VLAN is a port with a link link on the P2P transparent clock. For example, for P2P transparent, when 1 - 1 is in 4, the corresponding VLAN contains the port A,
  • Step 4 On all P2P transparent clocks in the network, according to the port state selected by the MSTP protocol and the PTP 4 port type, the PTP 4 message is processed, specifically, on each P2P transparent clock, only for sending The port of the state only forwards the PTP 4 message, and the port of the other state does not forward the PTP message, so that the PTP 4 message can be avoided.
  • the port status selected by the MSTP protocol only works for PTP packets, so it does not affect other protocol packets.
  • Step 5 If the topology of the network changes, running MSTP will re-select the state of each port on each P2P transparent clock node.
  • Embodiment 3 This embodiment describes the technical solution provided by the embodiment of the present invention by taking the network structure shown in FIG. 4 as an example. As shown in FIG. 4, in the network shown in FIG. 4, the convergence ring devices 1 and 2 are set to the boundary clock function, and the devices 3, 4, and 5 are set to the transparent clock function (for example, the P2P transparent clock), and all devices of the access ring are set. Both are set to transparent clock functions (for example, P2P transparent clock). Moreover, a TD base station is hung under the access ring device, and each TD base station has a common clock function.
  • All PTP devices use the one-step clock mode defined by 1588v2.
  • the i or JLi or the delay measurement mechanism is the Peer delay mode, and the network is also an MSTP i. or. Its processing mainly includes:
  • boundary clock 1 is from GPS, which is the GM clock of the PTP domain.
  • the port on the link acts as the MASTER port, and actively initiates the Sync 4 message and Pdelay Rep 4, and in response to Pdelay-Req 4 , other common clocks in the model are used as slave clocks according to the BMC algorithm, and time is synchronized to boundary clock 1.
  • the transparent clock 3 receives the Sync message on the link connected to the boundary clock 2, and then forwards it to the other four links. If the Pdelay-Req message from 2 is received, It is sent to the PTP protocol stack module for processing; at the same time, the node clock sends Pdelay-Req 4 messages on all links, and the processing of other P2P transparent clocks in the network model is similar to the P2P transparent clock 3.
  • the transparent clock in the model forms a ring structure, for example, when the access ring is transparent, 4, 3, 1-1, 1-2, 1-3, 1-4, 1-5, 1-6, and 1-7
  • the PTP 4 ⁇ text loop is constructed.
  • the MSTP protocol is enabled on all the P2P transparent clocks in the network model, and the VLANs corresponding to the instances created in the MSTP protocol are pre-negotiated special VLANs.
  • the ports included in the VLAN are P2P transparent.
  • a port state on the link in which the PTP packet is looped is set to a blocking state in the model, so that the ring link is disconnected, for example, disconnected.
  • the link between the transparent clocks 1-3 and 1-4 of the ring I is accessed.
  • each P2P transparent clock processes the PTP file according to the port state selected by the running MSTP protocol and the type of the PTP 4 message to be processed. Specifically, for each P2P transparent clock, only the port that is in the sending state forwards the PTP message, and the ports in other states do not forward the PTP message.
  • FIG. 5 is a schematic structural diagram of a PTP packet processing apparatus according to an embodiment of the present invention.
  • a PTP packet processing apparatus mainly includes: an MSTP protocol module 1, a PTP protocol module 3, and a PTP 4. ⁇ forwarding module 5.
  • the MSTP protocol module 1 is configured to generate and run the MSTP protocol, and determine the state of each port of the node; the PTP protocol module 3, The PTP 4 ⁇ message forwarding module 3 is configured to forward the PTP processed by the PTP protocol module 3 on the port in the sending state according to the state of each port determined by the MSTP protocol module 1 and the type of the PTP message. 4 ⁇ .
  • the status of the foregoing port includes, but is not limited to, one of the following: a disabled state, a listening state, a learning state, a sending state, and a blocking state.
  • the foregoing device may be implemented by using a transparent system as shown in FIG. 6. As shown in FIG.
  • the transparent clock system mainly includes: 1588 protocol stack 61, MSTP protocol stack 63, and other protocol stacks. 65 and protocol 4 extraction and processing module 67.
  • the MSTP protocol stack 61 is used to: 1) generate and process the MSTP protocol, 2) run the MSTP protocol, determine the state of each port on the device in the network; 1588 protocol stack 63 is used to generate and process the PTP 4 message; other protocols
  • the stack 65 is used to generate and process non-PTP messages; the protocol message extraction and processing module 67 is used to determine the type of the message, and the corresponding processing according to different types.
  • the link of the PTP packet to be looped can be disconnected between the transparent clock nodes without affecting the delivery of the non-PTP packet.
  • the PTP packet transmission link can be updated in time without causing abnormality in PTP packet transmission.
  • the solution provided by the embodiment of the present invention can be used simultaneously with the BMC algorithm, and can be applied to the scenario where the boundary clock and the transparent clock are mixed, effectively preventing the PTP 4 from being looped, and implementing the synchronization path protection.

Abstract

A method for processing precision time protocol (PTP) message and the apparatus thereof are disclosed in the invention. The method is used to process PTP message in a looped network composed of transparent clocks, which includes the following steps: running multiple spanning trees protocol (MSTP) on each transparent clock in the network, selecting the state of each port using PTP on each transparent clock, processing the PTP message according to the port state selected by running the MSTP and the type of the PTP message to be processed, and forwarding the processed PTP message only on the port in the state of transmitting. By the invention, the PTP message can be prevented from forming a loop.

Description

精确时间传递协议艮文处理方法及装置 技术领域 本发明涉及移动通信技术领域,尤其涉及一种精确时间传递协议报文处 理方法及装置。 背景技术 目前, 通信网络中设备间的同步包括两种: 一种是频率同步, 即源端和 目的端的信号在频率或相位上保持某种特定的关系, 频率同步通常也可以称 为时 4中同步, 例如, 同步以太网、 E1接口时 4中同步等; 另一种同步是时间同 步, 即源端和目的端不仅频率相同, 而且相位也相同, 并且具有相同的时间 记数标尺。 对于频率同步, 可以通过各网元节点依次锁定时钟同步信号(如同步以 太网等) 实现。 各网元节点时钟和其他固定频率源共同组成频率 (或时钟) 同步网。对于时间同步,主要的实现方式包括:全球定位系统( Global Position System, 筒称为 GPS ) 4受时或者采用时间同步协议(例如, IEEE Std 1588™ - 2008等) 调整主时 4中与从时 4中之间的时间偏差, 实现时间同步。 并且, 时 间同步协议也可实现主时钟与从时钟之间的频率同步。 目前分组传送网络 ( Packet Transport Network, 筒称为 PTN )设备主要通过 IEEE Std 1588™ - 筒称为 PTP )在网络中实现频率同步和时间同步, 以解决基站 GPS的替代问 题。  The present invention relates to the field of mobile communications technologies, and in particular, to a method and apparatus for processing a precise time transfer protocol message. BACKGROUND Currently, there are two types of synchronization between devices in a communication network: One is frequency synchronization, that is, signals at the source end and the destination end maintain a certain relationship in frequency or phase, and frequency synchronization can also be referred to as time 4 Synchronization, for example, synchronous Ethernet, E1 interface, 4 synchronization, etc.; Another synchronization is time synchronization, that is, the source and destination are not only the same frequency, but also the same phase, and have the same time count scale. For frequency synchronization, each network element node can be locked by clock synchronization signals (such as synchronous Ethernet, etc.). Each network element node clock and other fixed frequency sources together form a frequency (or clock) synchronization network. For time synchronization, the main implementation methods include: Global Position System (GPS) 4 time-dependent or using time synchronization protocol (for example, IEEE Std 1588TM - 2008, etc.) to adjust master time 4 and slave time Time offset between 4, achieving time synchronization. Moreover, the time synchronization protocol can also achieve frequency synchronization between the master clock and the slave clock. At present, the Packet Transport Network (PTN) device mainly implements frequency synchronization and time synchronization in the network through the IEEE Std 1588TM - called PTP to solve the replacement problem of the base station GPS.
PTP的基本功能是使分布式网络内的各节点时钟 ,在一定精度内保持时 钟和时间的同步。 1588v2提供了三种可用于主从时钟之间组网的基本时钟类 型: 边界时钟、 端到端(End to End, 筒称为 E2E )透明时钟和点到点( Point to Point , 筒称为 Ρ2Ρ ) 透明时钟。 在一分布式网络中, 三种时钟类型可以混 合组网, 但是在组网时, 若多个透明时 4中之间构成一环^!犬结构, 而由于具有 透明时 4†功能的节点本身并不运行最佳主时 4† ( Best Master Clock, 筒称为 BMC )算法, 只是对报文做一些处理后, 转发报文, 因此, 将导致 PTP报文 成环, 从而引起网络风暴。 发明内容 有鉴于此, 本发明提供了一种改进的 PTP报文处理方法及装置, 用以 解决现有技术中由于多个透明时钟之间构成环状结构而导致 PTP 4艮文成环的 问题。 根据本发明的一个方面, 提供了一种精确 PTP报文处理方法, 用于在 透明时钟组成的成环的网络中处理 PTP 4艮文。 居本发明的精确 PTP 4艮文处理方法, 包括: 在上述网络中的各个透 明时钟上运行多生成树协议 ( MSTP ), 选择出各个透明时钟上启用 PTP协议 的各端口的状态; 对于上述网络中的各个透明时钟 , 才艮据运行 MSTP协议选 择出的端口的状态以及待处理的 PTP 4艮文的类型对 PTP 4艮文进行处理,只在 发送状态的端口上转发处理后的 PTP 4艮文。 优选地, 上述端口的状态包括以下之一: 禁止状态、 监听状态、 学习状 态、 发送^ 态和阻塞^!犬态。 优选地, 在上述各个透明时钟上运行 MSTP 协议, 选择出各个透明时 钟上启用 PTP协议的各端口的犬态, 包括: 对于各个透明时钟, 创建一个预定的虚拟局域网的实例, 其中, 该虚拟 局域网包括该透明时钟上有链路链接的运行 PTP协议的端口; 通过在各个透 明时钟上运行 MSTP协议, 基于创建的实例, 将上述网络中 PTP 4艮文成环的 链路上的一个端口的状态设置为阻塞状态。 优选地 , 上述虚拟局域网为 PTP 4艮文专用。 优选地, 待处理的 PTP 4艮文包括: 透明时钟生成的 PTP 4艮文和 /或透明 时钟接收到的 PTP 4艮文。 优选地, 当上述网络的拓朴结构发生变化时, 上述方法还包括: 在上述 网络中的各个透明时钟上自动地再次运行 MSTP协议, 重新选择出各个透明 时钟上各端口的状态。 才艮据本发明的另一方面, 提供了一种 PTP 4艮文处理装置, 位于具有透 明时钟功能的节点。 根据本发明的 PTP报文处理装置包括: MSTP协议模块、 PTP协议模块 和 PTP 4艮文转发模块。其中, MSTP协议模块, 用于生成并运行 MSTP协议, 判断出节点启用 PTP 协议的各端口的状态; PTP 协议模块, 用于才艮据上述 MSTP协议模块判断出的各端口的状态以及 PTP 4艮文的类型处理 PTP 4艮文; PTP报文转发模块 , 用于在发送状态的端口上转发上述 PTP协议模块处理后 的 PTP 艮文。 优选地, 上述端口的状态包括以下之一: 禁止状态、 监听状态、 学习状 态、 发送^ 态和阻塞^!犬态。 通过本发明的上述至少一个方案,通过在透明时钟组成的成环的网络中 的每个具有透明时钟功能的节点运行 MSTP协议, 可以选择出各个透明时钟 上启用 PTP协议功能的各个端口的状态,各个透明时钟根据选择出的端口的 状态对 PTP 4艮文进行处理, 只在发送状态的端口上转发 PTP 4艮文,从而可以 防止 PTP 4艮文成环。 本发明的其它特征和优点将在随后的说明书中阐述, 并且, 部分地从说 明书中变得显而易见, 或者通过实施本发明而了解。 本发明的目的和其他优 点可通过在所写的说明书、 权利要求书、 以及附图中所特别指出的结构来实 现和获得。 附图说明 附图用来提供对本发明的进一步理解, 并且构成说明书的一部分, 与本 发明的实施例一起用于解释本发明, 并不构成对本发明的限制。 在附图中: 图 1为根据本发明实施例的 PTP 4艮文处理方法的流程图; 图 2为实施例一中透明时钟组成的网络的示意图; 图 3为实施例二中 mesh网络的示意图; 图 4为实施例三的网络结构示意图; 图 5为才艮据本发明实施例的 PTP 4艮文处理装置的结构示意图; 图 6为根据本发明实施例的 PTP报文处理装置的具体实现的结构示意 图。 具体实施方式 功能相克述 由于具有透明时钟功能的节点本身并不运行 BMC算法, 因此, 如果在 组网时多个透明时钟之间构成环状结构 ,则将导致 PTP 4艮文成环 ,有鉴于此 , 本发明实施例提供了一种改进的 PTP 4艮文处理方案。 在本发明实施例中, 在 一透明时钟组成的成环的网络中 , 若存在 PTP 4艮文的转发环路, 则每个具有 透明时钟功能的节点运行 MSTP协议, 创建一 MST实例, 该 MST实例对应 一个专属 PTP 4艮文的虚拟局 i或网 (Virtual Local Area Networks , 筒称为 VLAN ) , 该 VLAN包含透明时 4中的 PTP端口。 通过运行 MSTP十办议, 具有 透明时钟功能的节点将判断出在哪个端口上断开环路。 由于运行 MSTP判断 出的端口状态是基于 VLAN的, 因为创建 MST实例时 , 对应的 VLAN为特 殊的 VLAN, 专为 PTP 4艮文使用, 因此, 判断出的端口的状态只针对 PTP •t艮文起作用 , 其它协议 4艮文和业务 4艮文不受影响。 在不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组 合。 以下结合附图对本发明的优选实施例进行说明 , 应当理解 , 此处所描述 的优选实施例仅用于说明和解释本发明, 并不用于限定本发明。 根据本发明实施例, 首先提供了一种 PTP报文处理方法, 该方法用于 在透明时钟组成的成环的网络中处理 PTP 4艮文。 图 1为才艮据本发明实施例的 PTP 4艮文处理方法的流程图, 如图 1所示, 才艮据本发明实施例的 PTP 4艮文处理方法主要包括以下步骤 (步骤 S101 -步 骤 S 103 ): 步骤 S 101 : 在该网络中的各个透明时钟上运行 MSTP, 选择出各个透 明时 4中上启用 PTP十办议的各端口的状态; 具体地 ,对于各个透明时钟 ,创建一个实例,创建的该实例对应的 VLAN 为预定的 VLAN (即预先协商好的 VLAN ), 其中, 该 VLAN下包含的端口 为透明时钟上有链路链接的运行 PTP协议的端口; 通过在各个透明时钟上运 行 MSTP协议, 基于创建的实例, 将网络中 PTP报文成环的链路上的一个端 口的状态设置为阻塞状态。 具体地, 端口的状态包括但不限于: 禁止状态、 监听状态、 学习状态、 发送状态和阻塞状态。 在本发明实施例中 , 只有处于发送状态的端口能够转 发 PTP 艮文。 步骤 S 103: 对于网络中的各个透明时钟, 根据运行 MSTP协议选择出 的端口的状态以及待处理的 PTP 4艮文的类型对 PTP 4艮文进行处理,只在发送 状态的端口上转发处理后的 PTP报文。 在该网络中所有的透明时钟上, 当有 4艮文需要处理时, 首先判断 4艮文的 类型。 若为 PTP报文, 则根据节点的时钟类型(即边界时钟、 普通时钟、 透 明时钟)以及 PTP 4艮文的类型 , 判断是应该将 4艮文送到 PTP协议栈处理, 还 是才艮据 MSTP选择出的端口状态处理 PTP 4艮文 ,如果才艮据 MSTP选择出的端 口状态进行处理, 则 居 MSTP协议选择出的端口状态与 PTP 4艮文类型, 处 理 PTp _¾文。 若为其它协议艮文, 则另行处理, 例如, 将 4艮文送到其它协议 栈部件处理。 具体地, 处理的 ΡΤΡ 4艮文包括透明时钟本节点所产生的 ΡΤΡ 4艮文和 / 或该透明时钟接收到来的来自其它节点的 ΡΤΡ 4艮文。 才艮据 MSTP判断出的端口状态处理 PTP 4艮文时, 只有在 MSTP判断出 的端口状态为发送状态的端口上转发 PTP 报文, 其它状态的端口上不转发 PTP 4艮文。 从而避免了 PTP 4艮文成环。 并且 MSTP十办议选择出的端口 犬态只 针对 PTP 4艮文起作用, 不影响其它协议报文。 并且, 在本发明实施例中, 当网络的拓朴结构发生变化时, 可以在网络 中的各个透明时钟上于通过 MSTP协议, 重新选择每个透明时钟上各端口的 状态。 下面通过具体实施例进行说明。 实施例一 本实施例以图 2所示的透明时钟组成的网络为例进行说明 ,如图 2所示, 在该网络中, 普通时钟( OC )与 P2P透明时钟 ( P2P TC ) 1相连的端口作为 主 (MASTER ) 端口, 主动发起 PTP 同步 4艮文(Sync ) 4艮文和 PTP点到点 延时请求 4艮文 ( Pdelay— Rep ), 并响应 Pdelay— Req 4艮文。 在图 2中 P2P透明 时钟( P2P TC )上所有有连接的端口都会转发 Syn 4艮文,主动发起 Pdelay— Rep 艮文, 并响应 Pdelay— Req 4艮文。 在图 2 中三个 P2P TC组成了 PTP 4艮文环路, 则才艮据本发明实施例的 PTP 4艮文处理方法, 对本实施例中的网络进行如下处理: The basic function of PTP is to keep the clocks of each node in the distributed network and keep the clock and time synchronized within a certain precision. 1588v2 provides three basic clock types that can be used for networking between master and slave clocks: boundary clock, end-to-end (E2E) transparent clock, and point-to-point (point to point). ) Transparent clock. In a distributed network, three types of clocks can be mixed, but in the case of networking, if a plurality of transparents form a ring structure between the four, the node itself has a function of being transparent. The Best Master Clock (BMC) algorithm does not run the best master clock (BMC) algorithm. After the packet is processed, the packet is forwarded. Therefore, the PTP packet is looped, causing network storms. SUMMARY OF THE INVENTION In view of the above, the present invention provides an improved PTP message processing method and apparatus for solving the problem of PTP 4 成 成 由于 由于 由于 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 According to an aspect of the present invention, an accurate PTP message processing method is provided for processing a PTP 4 message in a looped network composed of transparent clocks. The method for processing an accurate PTP 4 file according to the present invention includes: running a multiple spanning tree protocol (MSTP) on each transparent clock in the foregoing network, and selecting a state of each port on which each PTP protocol is enabled on a transparent clock; Each of the transparent clocks processes the PTP 4 message according to the state of the port selected by the MSTP protocol and the type of the PTP 4 message to be processed, and forwards the processed PTP only on the port in the sending state. Text. Preferably, the status of the port includes one of the following: a disabled state, a listening state, a learning state, a sending state, and a blocking state. Preferably, the MSTP protocol is run on each of the transparent clocks to select a dog state of each port on which the PTP protocol is enabled on each transparent clock, including: creating, for each transparent clock, an instance of a predetermined virtual local area network, where the virtual local area network The port that runs the PTP protocol with the link link on the transparent clock. The MSTP protocol is run on each transparent clock, and the state of a port on the link in which the PTP 4 is looped in the network is set based on the created instance. Is blocked. Preferably, the above-mentioned virtual local area network is dedicated to PTP. Preferably, the PTP 4 message to be processed includes: a PTP 4 message generated by the transparent clock and/or a PTP 4 message received by the transparent clock. Preferably, when the topology of the network changes, the method further includes: automatically running the MSTP protocol again on each transparent clock in the network, and reselecting the states of the ports on the transparent clocks. According to another aspect of the present invention, there is provided a PTP 4 file processing apparatus located at a node having a transparent clock function. The PTP message processing apparatus according to the present invention includes: an MSTP protocol module, a PTP protocol module, and a PTP 4 艮 message forwarding module. The MSTP protocol module is configured to generate and run the MSTP protocol, and determine the status of each port of the node that is enabled with the PTP protocol. The PTP protocol module is configured to determine the status of each port and the PTP according to the MSTP protocol module. The PTP message forwarding module is configured to forward the PTP message processed by the PTP protocol module on the port in the sending state. Preferably, the status of the port includes one of the following: a disabled state, a listening state, a learning state, a sending state, and a blocking state. With the above at least one aspect of the present invention, by running the MSTP protocol on each node having a transparent clock function in a loop-shaped network composed of a transparent clock, the state of each port on which the PTP protocol function is enabled on each transparent clock can be selected. Each transparent clock processes the PTP 4 message according to the state of the selected port, and only forwards the PTP 4 message on the port in the sending state, thereby preventing the PTP 4 message from being looped. Other features and advantages of the invention will be set forth in the description which follows, and The objectives and other advantages of the invention will be realized and attained by the <RTI The drawings are intended to provide a further understanding of the invention, and are intended to be a part of the description of the invention. 1 is a flow chart of a PTP 4 艮 message processing method according to an embodiment of the present invention; FIG. 2 is a schematic diagram of a network composed of a transparent clock in the first embodiment; FIG. 3 is a schematic diagram of a mesh network in the second embodiment; 4 is a schematic structural diagram of a network structure of a third embodiment; FIG. 5 is a schematic structural diagram of a PTP packet processing apparatus according to an embodiment of the present invention; FIG. 6 is a specific implementation of a PTP packet processing apparatus according to an embodiment of the present invention; Schematic diagram of the structure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A function of a node with a transparent clock function does not run the BMC algorithm. Therefore, if a ring structure is formed between multiple transparent clocks during networking, the PTP 4 message will be looped. The embodiment of the invention provides an improved PTP 4 message processing scheme. In the embodiment of the present invention, in a looped network composed of a transparent clock, if there is a PTP 4 转发 forwarding loop, each node having a transparent clock function runs the MSTP protocol to create an MST instance, the MST. The instance corresponds to a dedicated PTP 4 virtual local area network or virtual network (Virtual Local Area Networks, called a VLAN), the VLAN contains PTP ports in the transparent 4 . By running MSTP 10, the node with transparent clock function will determine which port is disconnected on the loop. The status of the port determined by running MSTP is VLAN-based. The corresponding VLAN is a special VLAN and is used for PTP. Therefore, the status of the determined port is only for PTP. It works, other agreements are not affected. The embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The preferred embodiments of the present invention are described in the following with reference to the accompanying drawings, which are intended to illustrate and illustrate the invention. According to an embodiment of the present invention, a PTP packet processing method is first provided, and the method is used to process a PTP packet in a looped network composed of transparent clocks. 1 is a flowchart of a PTP 4 message processing method according to an embodiment of the present invention. As shown in FIG. 1, the PTP 4 file processing method according to an embodiment of the present invention mainly includes the following steps (step S101 - steps) S103): Step S101: Run MSTP on each transparent clock in the network, and select a state of each port on which PTP 10 is enabled in each transparent time; specifically, create an instance for each transparent clock. The VLAN corresponding to the created instance is a predetermined VLAN (that is, a pre-negotiated VLAN). The port included in the VLAN is a port running the PTP protocol with a link link on the transparent clock. Run the MSTP protocol to set the state of a port on the link that is a ring of PTP packets on the network to the blocked state based on the created instance. Specifically, the status of the port includes, but is not limited to, a prohibited state, a listening state, a learning state, a sending state, and a blocking state. In the embodiment of the present invention, only the port in the transmitting state can forward the PTP message. Step S103: For each transparent clock in the network, the PTP 4 message is processed according to the state of the port selected by the MSTP protocol and the type of the PTP 4 message to be processed, and only after the forwarding process is performed on the port in the sending state. PTP message. On all transparent clocks in the network, when there are 4 files to be processed, the type of 4艮 is first determined. If it is a PTP packet, it is determined according to the type of the clock of the node (that is, the boundary clock, the normal clock, the transparent clock) and the type of the PTP 4 message, whether the message should be sent to the PTP protocol stack, or whether it is based on the MSTP. The selected port status is used to process the PTP 4 message. If the port status selected by the MSTP is processed, the port status selected by the MSTP protocol and the PTP 4 message type are processed, and the PTp_3⁄4 text is processed. If it is a different protocol, it will be processed separately. For example, 4 files will be sent to other protocol stack components for processing. Specifically, the processed 包括 艮 包括 包括 包括 包括 包括 包括 包括 包括 包括 包括 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 透明 。 。 。 When PTP 4 messages are processed according to the port status judged by the MSTP, PTP packets are forwarded only on the port whose state is determined by the MSTP. The PTP packets are not forwarded on the ports in other states. Thus, PTP 4 is avoided. And the port dog state selected by MSTP 10 only works for PTP 4, and does not affect other protocol messages. Moreover, in the embodiment of the present invention, when the topology of the network changes, the state of each port on each transparent clock may be re-selected on each transparent clock in the network through the MSTP protocol. The following description will be made by way of specific examples. Embodiment 1 This embodiment uses a network composed of a transparent clock as shown in FIG. 2 as an example. As shown in FIG. 2, in the network, a port with a normal clock (OC) and a P2P transparent clock (P2P TC) 1 is connected. As the master (MASTER) port, it initiates PTP synchronization (Sync) 4 and PTP point-to-point delay request (Pdelay-Rep), and responds to Pdelay-Req. In Figure 2, all connected ports on the P2P transparent clock (P2P TC) will forward the Syn 4 message and initiate Pdelay-Rep. 艮文, and respond to Pdelay-Req 4 艮文. In FIG. 2, the three P2P TCs constitute a PTP 4 艮 text loop, and then the PTP 4 艮 text processing method according to the embodiment of the present invention performs the following processing on the network in this embodiment:
( 1 )在该图中所有的 P2P透明时钟上都启用 MSTP协议, 创建一个实 例, 创建的实例对应的 VLAN为一 ¼、商好的特殊 VLAN。 该 VLAN下包含 的端口为 P2P透明时钟上有链路链接的端口(该端口必须为运行 PTP协议的 端口) 。 通过该图中所有 P2P透明时钟上 MSTP协议的运行, 选择出各个 P2P透明时钟上各端口的状态 (包括: 禁止、 监听、 学习、 发送和阻塞) , 即在该图中把 PTP报文成环的链路上的一个端口状态置为阻塞状态。 ( 2 )在该模型中所有的 P2P透明时钟上 , 首先判断要处理报文的类型。 若为 PTP报文, 则根据节点的时钟类型(边界时钟, 普通时钟, 透明时钟)以 及 PTP 艮文的类型,判断是应该 4巴艮文送到 PTP协议栈处理,还是才艮据 MSTP 判断出的端口状态处理 PTP 4艮文。 如果送到 PTP协议栈处理, 则才艮据 MSTP 协议选择出的端口状态与 PTP 4艮文类型 ,处理 PTP 4艮文。若为其它协议 4艮文, 则另行处理, 例如, 4巴4艮文送到其它协议栈部件处理。 (1) MSTP is enabled on all P2P transparent clocks in the figure to create an instance. The VLAN corresponding to the created instance is a special VLAN with a good quotient. The port included in the VLAN is the port with the link link on the P2P transparent clock (the port must be the port running PTP). Through the operation of the MSTP protocol on all P2P transparent clocks in the figure, the status of each port on each P2P transparent clock (including: forbidden, listening, learning, sending, and blocking) is selected, that is, the PTP packet is looped in the figure. A port state on the link is set to a blocking state. (2) On all P2P transparent clocks in the model, first determine the type of message to be processed. If it is a PTP packet, it is judged whether it should be sent to the PTP protocol stack according to the clock type (boundary clock, normal clock, transparent clock) of the node and the type of PTP message, or is it judged according to MSTP. The port state handles PTP 4 艮 text. If it is sent to the PTP protocol stack, the PTP 4 message is processed according to the port status selected by the MSTP protocol and the PTP 4 message type. If it is a different protocol, it will be processed separately. For example, 4 baht is sent to other protocol stack components for processing.
( 3 )只有 MSTP判断出的端口状态为发送状态的端口才转发 PTP 4艮文 , 其它状态的端口不转发 PTP 4艮文。 实施例二 本实施例以图 3所示的 mesh网络为例对发明实施例提供的技术方案进 行说明。 具体地, 主要包括以下处理步骤: 步骤 1 , 普通时钟 1-1作为祖父时钟在链路 A上的端口作为 MASTER 端口 , 主动发起 Sync 4艮文和 Pdelay Rep 4艮文 , 并响应 Pdelay— Req 4艮文。 图中其它普通时钟作为从时钟, 时间同步于普通时钟 1-1; 步骤 2 , P2P透明时钟 1-1在链路 A上接收到 Sync报文后, 转发到 B 和 C两条链路上; 接收到 Pdelay— Req 4艮文后送到 PTP协议栈模块处理, 同 时该节点时钟在链路 A、 B和 C上都发送 Pdelay— Req 4艮文。 对于图中其它 P2P透明时钟的处理都与 P2P透明时钟 1-1类似,在此不 再赘述, 从而使得网络中的透明时钟构成了环网, 例如, P2P透明时钟 1-1、 1-2、 2-1和 2-2构成了 PTP 4艮文环路。 步骤 3 , 在该网络中所有的 Ρ2Ρ透明时钟上都启用 MSTP协议 , 且创建 的实例对应的 VLAN都为预先协商的特殊 VLAN。 该 VLAN下包含的端口 为 P2P透明时钟上有链路链接的端口。 例如, 对于 P2P透明时 4中 1 - 1 , 其对应的 VLAN包含的端口为链路 A、(3) Only the port whose port status is the sending status judged by the MSTP forwards the PTP 4 message, and the port in other status does not forward the PTP 4 message. Embodiment 2 This embodiment describes a technical solution provided by an embodiment of the present invention by taking the mesh network shown in FIG. 3 as an example. Specifically, the method includes the following steps: Step 1: The normal clock 1-1 acts as the MASTER port of the grandfather clock on the link A, and actively initiates the Sync 4 message and the Pdelay Rep 4 message, and responds to the Pdelay-Req 4 Yan Wen. The other common clocks in the figure are used as the slave clocks, and the time is synchronized with the normal clock 1-1; Step 2, after receiving the Sync message on the link A, the P2P transparent clock 1-1 is forwarded to the two links B and C; After receiving the Pdelay-Req 4 message, it is sent to the PTP protocol stack module for processing. At the same time, the node clock sends Pdelay-Req 4 messages on links A, B and C. The processing of other P2P transparent clocks in the figure is similar to that of the P2P transparent clock 1-1, and is not described here again, so that the transparent clock in the network constitutes a ring network, for example, a P2P transparent clock 1-1, 1-2, 2-1, and 2-2 form the PTP 4 艮 text loop. Step 3: MSTP is enabled on all the transparent clocks of the network, and the VLANs corresponding to the created instances are pre-negotiated special VLANs. The port included in the VLAN is a port with a link link on the P2P transparent clock. For example, for P2P transparent, when 1 - 1 is in 4, the corresponding VLAN contains the port A,
B和 C上的三个端口。 经过该网络中所有 P2P透明时钟上 MSTP协议的运行,将该网络中 PTP •t艮文成环的链路上的一个端口的状态置为阻塞状态。 步骤 4 , 在该网络中所有的 P2P透明时钟上 , 才艮据 MSTP协议选择出的 端口状态与 PTP 4艮文类型, 处理 PTP 4艮文, 具体地, 在各个 P2P透明时钟 上, 只有为发送状态的端口才转发 PTP 4艮文, 其它状态的端口不转发 PTP 艮文, 从而可以避免 PTP 4艮文成环。 并且, 由于运行 MSTP协议选择出的端 口状态只针对 PTP报文起作用 , 因此, 不会影响其它协议报文。 步骤 5 , 如果该网络的拓朴结构发生变化, 则运行 MSTP协议会重新选 择出每个 P2P透明时钟节点上各端口的状态。 实施例三 本实施例以图 4所示的网络结构为例 ,对本发明实施例提供的技术方案 进行描述。 如图 4所示, 在图 4所示的网络中汇聚环设备 1和 2设置为边界 时钟功能, 设备 3、 4和 5设置为透明时钟功能(例如, P2P透明时钟) , 接 入环所有设备都设置为透明时钟功能 (例如, P2P透明时钟) 。 并且, 在接 入环设备都下挂一 TD基站, 每个 TD基站都具有普通时钟功能。 所有 PTP 设备均使用 1588v2定义的一步时钟 ( one-step clock )模式。 根据本发明实施例提供的技术方案 , 对于图 4所示的网络, 该网络为一 PTP时 4中 i或 , JLi或延时测量机制为 Peer delay方式, 并且, 该网络也同为一 MSTP i或。 其处理主要包括: Three ports on B and C. After the MSTP protocol is running on all P2P transparent clocks in the network, the state of a port on the link in which the PTP packet is looped is set to the blocking state. Step 4: On all P2P transparent clocks in the network, according to the port state selected by the MSTP protocol and the PTP 4 port type, the PTP 4 message is processed, specifically, on each P2P transparent clock, only for sending The port of the state only forwards the PTP 4 message, and the port of the other state does not forward the PTP message, so that the PTP 4 message can be avoided. In addition, the port status selected by the MSTP protocol only works for PTP packets, so it does not affect other protocol packets. Step 5: If the topology of the network changes, running MSTP will re-select the state of each port on each P2P transparent clock node. Embodiment 3 This embodiment describes the technical solution provided by the embodiment of the present invention by taking the network structure shown in FIG. 4 as an example. As shown in FIG. 4, in the network shown in FIG. 4, the convergence ring devices 1 and 2 are set to the boundary clock function, and the devices 3, 4, and 5 are set to the transparent clock function (for example, the P2P transparent clock), and all devices of the access ring are set. Both are set to transparent clock functions (for example, P2P transparent clock). Moreover, a TD base station is hung under the access ring device, and each TD base station has a common clock function. All PTP devices use the one-step clock mode defined by 1588v2. According to the technical solution provided by the embodiment of the present invention, for the network shown in FIG. 4, when the network is a PTP, the i or JLi or the delay measurement mechanism is the Peer delay mode, and the network is also an MSTP i. or. Its processing mainly includes:
( 1 ) 在该时钟域中, 边界时钟和普通时钟, 都启用 BMC算法。 (1) In this clock domain, both the boundary clock and the normal clock, the BMC algorithm is enabled.
( 2 ) 边界时钟 1 的时间源来自 GPS , 为该 PTP域的 GM时钟。 才艮据 BMC 算法, 其链路上的端口作为 MASTER 端口, 主动发起 Sync 4艮文和 Pdelay Rep 4艮文, 并响应 Pdelay— Req 4艮文, 模型中其它普通时钟才艮据 BMC 算法作为从时钟, 时间同步于边界时钟 1。 (2) The time source of boundary clock 1 is from GPS, which is the GM clock of the PTP domain. According to the BMC algorithm, the port on the link acts as the MASTER port, and actively initiates the Sync 4 message and Pdelay Rep 4, and in response to Pdelay-Req 4 ,, other common clocks in the model are used as slave clocks according to the BMC algorithm, and time is synchronized to boundary clock 1.
( 3 ) 在接入环一中, 透明时钟 3在与边界时钟 2相连的链路上接收到 Sync报文后, 转发到另外四条链路上, 如果接收到来自 2的 Pdelay— Req报 文则送到 PTP 协议栈模块处理; 同时该节点时钟在所有链路上都发送 Pdelay— Req 4艮文,对于该网络模型中的其它 P2P透明时钟的处理都与 P2P透 明时钟 3类似。 模型中的透明时钟形成环状结构, 例如, 接入环一中透明时 4中 3、 1-1、 1-2、 1-3、 1-4、 1-5、 1-6和 1-7构成的 PTP 4艮文环路。 (3) In the access ring 1, the transparent clock 3 receives the Sync message on the link connected to the boundary clock 2, and then forwards it to the other four links. If the Pdelay-Req message from 2 is received, It is sent to the PTP protocol stack module for processing; at the same time, the node clock sends Pdelay-Req 4 messages on all links, and the processing of other P2P transparent clocks in the network model is similar to the P2P transparent clock 3. The transparent clock in the model forms a ring structure, for example, when the access ring is transparent, 4, 3, 1-1, 1-2, 1-3, 1-4, 1-5, 1-6, and 1-7 The PTP 4 艮 text loop is constructed.
( 4 )在该网络模型中所有的 P2P透明时钟上都启用 MSTP协议 ,并且 , 运行 MSTP协议时创建的实例对应的 VLAN都为预先协商好的特殊 VLAN, 在该 VLAN下包含的端口为 P2P透明时钟上有链路链接的端口。 例如, 对于 P2P透明时钟 3 , 其对应的 VLAN包含的端口为所有链路 上的五个端口。 经过该网络模型中所有 P2P 透明时钟上 MSTP协议的运行, 将在该模 型中把 PTP 报文成环的链路上的一个端口状态置为阻塞状态,使得环形链路 断开, 例如, 断开接入环 I的透明时钟 1-3与 1-4之间的链路。 (4) The MSTP protocol is enabled on all the P2P transparent clocks in the network model, and the VLANs corresponding to the instances created in the MSTP protocol are pre-negotiated special VLANs. The ports included in the VLAN are P2P transparent. A port with a link link on the clock. For example, for P2P transparent clock 3, its corresponding VLAN contains five ports on all links. After the operation of the MSTP protocol on all P2P transparent clocks in the network model, a port state on the link in which the PTP packet is looped is set to a blocking state in the model, so that the ring link is disconnected, for example, disconnected. The link between the transparent clocks 1-3 and 1-4 of the ring I is accessed.
( 5 )在该模网络型中各个 P2P透明时钟上 , 各个 P2P透明时钟根据运 行 MSTP协议选择出的端口状态以及待处理 PTP 4艮文的类型, 处理 PTP 艮 文。 具体地, 对于各个 P2P透明时钟, 只有为发送状态的端口才转发 PTP 艮 文, 其它状态的端口不转发 PTP 4艮文。 (5) On each P2P transparent clock in the mode network type, each P2P transparent clock processes the PTP file according to the port state selected by the running MSTP protocol and the type of the PTP 4 message to be processed. Specifically, for each P2P transparent clock, only the port that is in the sending state forwards the PTP message, and the ports in other states do not forward the PTP message.
( 6 ) 在该模型中, 若网络拓朴结构发生变化, 则 MSTP协议会重新判 断每个 P2P透明时钟节点上各端口的状态 , 并且运行在边界时钟和普通时钟 的 BMC算法, 也将相应地重新选择 PTP端口状态。 才艮据本发明实施例, 还提供了一种 PTP 文处理装置, 该装置位于具 有透明时钟功能的节点。 图 5为根据本发明实施例的 PTP报文处理装置的结构示意图, 如图 5 所示, 根据本发明实施例的 PTP报文处理装置主要包括: MSTP协议模块 1、 PTP协议模块 3和 PTP 4艮文转发模块 5。 其中, MSTP协议模块 1 , 用于生 成并运行 MSTP协议, 判断出所述节点的各端口的状态; PTP协议模块 3 , 用于根据 MSTP协议模块 1判断出的各端口的状态以及 PTP报文的类型处理 PTP 4艮文; PTP 4艮文转发模块 3 , 用于在发送状态的端口上转发 PTP协议模 块 3处理的 PTP 4艮文。 具体地,上述端口的状态包括但不限于以下之一: 禁止状态、监听状态、 学习状态、 发送状态和阻塞状态。 在具体实施过程中,上述装置可以通过如图 6所示的透明时 4中系统来实 现, 如图 6所示, 该透明时钟系统主要包括: 1588协议栈 61、 MSTP协议栈 63、 其它协议栈 65以及协议 4艮文提取与处理模块 67。 其中, MSTP协议栈 61用于: 1 ) 生成并处理 MSTP协议, 2 )运行 MSTP协议, 判断出网络中 设备上各端口的状态; 1588协议栈 63用于生成并处理 PTP 4艮文; 其它协议 栈 65用于生成与处理非 PTP报文; 协议报文提取与处理模块 67用于判断报 文的类型, 并才艮据不同的类型 丈相应的处理。 如上所述, 借助本发明实施例提供的技术方案, 可以在透明时钟节点之 间断开 PTP报文成环的链路, 而不影响非 PTP报文的传递。 并且, 在本发明 实施例中, 当网络拓朴结构改变时, 能够及时更新 PTP报文的传递链路, 不 会引起 PTP 报文传递的异常。 另夕卜, 根据本发明实施例提供的方案可以与 BMC算法同时使用 , 可适用于边界时钟和透明时钟混合组网的场景 ,有效防 止了 PTP 4艮文成环, 并实现了同步路径保护。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的 4青申和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。 (6) In this model, if the network topology changes, the MSTP protocol will re-determine the state of each port on each P2P transparent clock node, and the BMC algorithm running on the boundary clock and the ordinary clock will also Reselect the PTP port status. According to an embodiment of the present invention, there is also provided a PTP text processing apparatus, the apparatus being located at a node having a transparent clock function. FIG. 5 is a schematic structural diagram of a PTP packet processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, a PTP packet processing apparatus according to an embodiment of the present invention mainly includes: an MSTP protocol module 1, a PTP protocol module 3, and a PTP 4.艮文 forwarding module 5. The MSTP protocol module 1 is configured to generate and run the MSTP protocol, and determine the state of each port of the node; the PTP protocol module 3, The PTP 4 转发 message forwarding module 3 is configured to forward the PTP processed by the PTP protocol module 3 on the port in the sending state according to the state of each port determined by the MSTP protocol module 1 and the type of the PTP message. 4 艮文. Specifically, the status of the foregoing port includes, but is not limited to, one of the following: a disabled state, a listening state, a learning state, a sending state, and a blocking state. In a specific implementation process, the foregoing device may be implemented by using a transparent system as shown in FIG. 6. As shown in FIG. 6, the transparent clock system mainly includes: 1588 protocol stack 61, MSTP protocol stack 63, and other protocol stacks. 65 and protocol 4 extraction and processing module 67. The MSTP protocol stack 61 is used to: 1) generate and process the MSTP protocol, 2) run the MSTP protocol, determine the state of each port on the device in the network; 1588 protocol stack 63 is used to generate and process the PTP 4 message; other protocols The stack 65 is used to generate and process non-PTP messages; the protocol message extraction and processing module 67 is used to determine the type of the message, and the corresponding processing according to different types. As described above, with the technical solution provided by the embodiment of the present invention, the link of the PTP packet to be looped can be disconnected between the transparent clock nodes without affecting the delivery of the non-PTP packet. In addition, in the embodiment of the present invention, when the network topology is changed, the PTP packet transmission link can be updated in time without causing abnormality in PTP packet transmission. In addition, the solution provided by the embodiment of the present invention can be used simultaneously with the BMC algorithm, and can be applied to the scenario where the boundary clock and the transparent clock are mixed, effectively preventing the PTP 4 from being looped, and implementing the synchronization path protection. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 Claim
1. 一种 4青确时间传递协议 PTP 4艮文处理方法 , 用于在透明时钟组成的成环 的网络中处理 PTP _t艮文, 其特征在于, 所述方法包括: 在所述网络中的各个透明时钟上运行多生成树协议 MSTP, 选择出 各个透明时钟上启用 PTP协议的各端口的状态; A method for processing a PTP 4 packet in a ring-shaped network composed of transparent clocks, wherein the method comprises: in the network The multi-spanning tree protocol MSTP is run on each transparent clock to select the state of each port on the transparent clock that is enabled with the PTP protocol.
对于所述网络中的各个透明时钟,才艮据运行 MSTP协议选择出的端 口的状态以及待处理的 PTP 4艮文的类型对所述 PTP 4艮文进行处理,只在 发送状态的端口上转发处理后的所述 PTP 4艮文。  For each transparent clock in the network, the PTP 4 message is processed according to the state of the port selected by the MSTP protocol and the type of the PTP 4 message to be processed, and is only forwarded on the port in the sending state. The PTP 4 after processing.
2. 根据权利要求 1所述的方法, 其特征在于, 所述端口的状态包括以下之 —: 禁止状态、 监听状态、 学习状态、 发送状态和阻塞状态。 2. The method according to claim 1, wherein the state of the port comprises the following: a prohibited state, a listening state, a learning state, a sending state, and a blocking state.
3. 根据权利要求 2所述的方法 , 其特征在于 , 在所述各个透明时钟上运行 MSTP协议,选择出各个透明时钟上启用 PTP协议的各端口的状态包括: 对于各个透明时钟, 创建一个预定的虚拟局域网的实例, 其中, 所 述虚拟局域网包括该透明时钟上有链路链接的运行 PTP协议的端口; 通过在各个透明时钟上运行 MSTP协议, 基于创建的实例 , 将所述 网络中 PTP 4艮文成环的链路上的一个端口的状态设置为阻塞状态。 The method according to claim 2, wherein the MSTP protocol is run on each of the transparent clocks, and the states of the ports on which the PTP protocol is enabled on each transparent clock are selected: for each transparent clock, a reservation is created. An example of a virtual local area network, where the virtual local area network includes a port running the PTP protocol with a link link on the transparent clock; by running the MSTP protocol on each transparent clock, based on the created instance, the PTP 4 in the network is The state of a port on the link of the ring is set to the blocked state.
4. 根据权利要求 3所述的方法, 其特征在于, 所述虚拟局域网为 PTP报文 专用。 The method according to claim 3, wherein the virtual local area network is dedicated to PTP messages.
5. 根据权利要求 1所述的方法,其特征在于,待处理的所述 PTP报文包括: 所述透明时钟生成的 PTP 4艮文和 /或所述透明时钟接收到的 PTP 4艮 文。 The method according to claim 1, wherein the PTP message to be processed comprises: a PTP message generated by the transparent clock and/or a PTP message received by the transparent clock.
6. 根据权利要求 1至 5中任一项所述的方法, 其特征在于, 当所述网络的 拓朴结构发生变化时, 所述方法还包括: The method according to any one of claims 1 to 5, wherein when the topology of the network changes, the method further includes:
在所述网络中的各个透明时钟上自动地再次运行 MSTP协议,重新 选择出各个透明时钟上各端口的状态。 一种 PTP 4艮文处理装置, 位于具有透明时 4中功能的节点, 其特征在于, 所述装置包括: The MSTP protocol is automatically run again on each transparent clock in the network, and the state of each port on each transparent clock is reselected. A PTP 4 艮 处理 processing device, located in a node having a function of being transparent 4, wherein the device comprises:
MSTP协议模块, 用于生成并运行 MSTP协议, 判断出所述节点启 用 ΡΤΡ十办议的各端口的状态;  The MSTP protocol module is configured to generate and run the MSTP protocol, and determine that the node enables the state of each port that is discussed by the tenth node;
ΡΤΡ协议模块 ,用于根据所述 MSTP协议模块判断出的各端口的状 态以及 PTP 4艮文的类型处理 PTP 4艮文;  a protocol module, configured to process the PTP 4 according to the status of each port determined by the MSTP protocol module and the type of the PTP 4 message;
PTP 文转发模块, 用于在发送状态的端口上转发所述 PTP协议 模块处理后的 PTP报文。 根据权利要求 7所述的装置 , 其特征在于, 所述端口的状态包括以下之 The PTP file forwarding module is configured to forward the PTP packet processed by the PTP protocol module on the port in the sending state. The device according to claim 7, wherein the state of the port comprises the following
—: 禁止状态、 监听状态、 学习状态、 发送状态和阻塞状态。 —: Disable status, listening status, learning status, sending status, and blocking status.
PCT/CN2009/073794 2009-07-27 2009-09-07 Method for processing precision time protocol message and apparatus thereof WO2011011932A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 200910164419 CN101616163B (en) 2009-07-27 2009-07-27 Method and device for processing precise time transfer protocol message
CN200910164419.X 2009-07-27

Publications (1)

Publication Number Publication Date
WO2011011932A1 true WO2011011932A1 (en) 2011-02-03

Family

ID=41495567

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/073794 WO2011011932A1 (en) 2009-07-27 2009-09-07 Method for processing precision time protocol message and apparatus thereof

Country Status (2)

Country Link
CN (1) CN101616163B (en)
WO (1) WO2011011932A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820355B (en) * 2010-01-20 2012-03-28 瑞斯康达科技发展股份有限公司 Method for acquiring network topology and network element
CN102195766B (en) * 2010-03-01 2013-12-25 杭州华三通信技术有限公司 Time synchronization method and clock device
CN101938318B (en) * 2010-09-15 2013-02-27 中兴通讯股份有限公司 Synchronous method, system and convergent ring device among devices in convergent network
CN103427927B (en) * 2012-05-17 2017-04-12 中兴通讯股份有限公司 Clock synchronization realizing method and system for MPLS-TP network
CN103634208B (en) * 2013-11-26 2017-02-01 杭州华三通信技术有限公司 Method and device for preventing loop in PTP (precision time protocol) TC (transparent clock) looped network
WO2016095099A1 (en) * 2014-12-16 2016-06-23 华为技术有限公司 Time synchronization method and apparatus
CN105429725B (en) * 2015-11-17 2018-06-12 中南大学 A kind of submicrosecond grade clock synchronizing method and system based on SOPC networkings
CN108521341B (en) * 2018-03-23 2019-09-13 新华三信息技术有限公司 Message transmitting method and device
CN109495962A (en) * 2018-12-25 2019-03-19 广东浪潮大数据研究有限公司 A kind of network timing framework and method
CN110290580B (en) * 2019-06-05 2021-08-20 深圳市英特瑞半导体科技有限公司 Method and system for transmitting time based on 1588 protocol
CN112350794B (en) * 2019-08-09 2024-01-16 诺基亚通信公司 End-to-end transparent clock and PTP message forwarding method
CN114221730A (en) * 2020-09-04 2022-03-22 华为技术有限公司 Message processing method, device, equipment, system and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412980A (en) * 2002-11-08 2003-04-23 华为技术有限公司 Data transmission method between web bridge
CN1525715A (en) * 2003-02-26 2004-09-01 华为技术有限公司 A method for implementing multiple spanning tree protocol on single spanning tree switching chip

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412980A (en) * 2002-11-08 2003-04-23 华为技术有限公司 Data transmission method between web bridge
CN1525715A (en) * 2003-02-26 2004-09-01 华为技术有限公司 A method for implementing multiple spanning tree protocol on single spanning tree switching chip

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IEEE STANDARD FOR A PRECISION CLOCK SYNCHRONIZATION PROTOCOL FOR NETWORKED MEASUREMENT AND CONTROL SYSTEMS, IEEE STD, 24 July 2008 (2008-07-24), pages 1588 - 2008 *
IEEE STANDARDS FOR LOCAL AND METROPOLITAN AREA NETWORKS, VIRTUAL BRIDGED LOCAL AREA NETWORKS-AMENDMENT 3: MULTIPLE SPANNING TREES, IEEE, 31 December 2002 (2002-12-31) *

Also Published As

Publication number Publication date
CN101616163B (en) 2012-11-28
CN101616163A (en) 2009-12-30

Similar Documents

Publication Publication Date Title
WO2011011932A1 (en) Method for processing precision time protocol message and apparatus thereof
US11496235B2 (en) Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP
US9819541B2 (en) PTP over IP in a network topology with clock redundancy for better PTP accuracy and stability
WO2017157170A1 (en) Method of updating clock synchronization topology, method of determining clock synchronization path, and apparatus
US9749073B2 (en) Clock recovery in a packet based network
EP2274880B1 (en) Method and apparatus for link-state handshake for loop prevention
WO2013071807A1 (en) Method, system and apparatus for implementing hybrid networking of multiple clock synchronization technologies
WO2014101669A1 (en) Time synchronization method and system
WO2012034330A1 (en) Method, system and convergence loop apparatus for synchronization between apparatuses in convergence network
JP5455138B2 (en) Method and clock device for processing high precision time protocol messages
WO2018188425A1 (en) Vxlan single-homing and dual-homing hybrid access method and apparatus, pe device and storage medium
US20110199941A1 (en) Rate-Varying Multicast Transmission for Clock Distribution in Packet Networks
WO2008125028A1 (en) A method, an apparatus and a network element for tracing clock
WO2011134371A1 (en) Method for synchronizing clocks and clock synchronization device
WO2010022576A1 (en) A control packet transmission method and apparatus based on multi-ring ethernet
WO2013086833A1 (en) Clock time synchronization source configuration method and device
WO2008009193A1 (en) Method and device for transmitting packet in resilient packet intersect ring
WO2013178148A1 (en) Clock synchronization method and device for communication network
WO2013170736A1 (en) Packet network synchronization method, apparatus and system
US20130336117A1 (en) Distributed processing scheme to support ieee 1588 ptp over multiple ports spanning a lag
US10090952B2 (en) Master/slave negotiation associated with a synchronous ethernet network
WO2008131654A1 (en) A network system and a method for establishing the shortest path and transmitting the broadcast packet
WO2012152124A1 (en) Externally connected temporal port changeover method and device
Cisco Configuring RSTP and MSTP
Garner et al. Using an IEEE 802.1 AS network as a distributed IEEE 1588 boundary, ordinary, or transparent clock

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

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

Country of ref document: EP

Kind code of ref document: A1