WO2013189176A2 - 一种多同步域的时间同步系统、方法及跨域设备 - Google Patents
一种多同步域的时间同步系统、方法及跨域设备 Download PDFInfo
- Publication number
- WO2013189176A2 WO2013189176A2 PCT/CN2013/000967 CN2013000967W WO2013189176A2 WO 2013189176 A2 WO2013189176 A2 WO 2013189176A2 CN 2013000967 W CN2013000967 W CN 2013000967W WO 2013189176 A2 WO2013189176 A2 WO 2013189176A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- domain
- synchronization
- ptp
- cross
- time
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0641—Change of the master or reference, e.g. take-over or failure of the master
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/0667—Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
Definitions
- Multi-synchronous domain time synchronization system method and cross-domain device
- the present invention relates to the field of packet network synchronization technologies, and in particular, to a multi-sync domain time synchronization system, method, and cross-domain device. Background technique
- the synchronization topology is based on the BMC (Best Master Clock) algorithm of the protocol to select the source and establish the topology.
- BMC Best Master Clock
- the idea is to first select the highest GM in the synchronization domain (Grandmaster Clock). , grandmother clock), and then complete the topology establishment according to the hop number of the distance GM; the advantage is that the whole network can be synchronized to a time source, so that in the steady state, the whole network is in the same time synchronization state.
- This time synchronization network has a simple structure and does not require cross-domain processing. However, as the field of time synchronization technology continues to expand, such time synchronization architectures are becoming less suitable for large-scale networking.
- the main defects include: (1) The network hierarchy is unclear, which makes the network maintenance in the later stage very difficult; (2) The GM load sharing and mutual backup cannot be realized in the whole network; (3) The network is too large, when there is a failure, BMC The exchange time is long; (4) The synchronization link of the GM to the terminal device (such as the base station) is long, and more link asymmetry errors are introduced.
- the related technology allows multiple synchronization domains in the synchronization network, such as a VPN (Virtual Private Network).
- the synchronization domains are isolated from each other.
- the inter-domain cannot be implemented. Interoperability does not enable inter-domain protection for multiple synchronization domains. Summary of the invention
- the embodiment of the invention provides a time synchronization system and method for a multi-synchronization domain, and a cross-domain device, which divides the time synchronization network into multiple synchronization domains, implements inter-domain communication, and establishes an inter-domain synchronization relationship.
- Cross-domain delivery and inter-domain protection of inter-source information are examples of cross-domain delivery and inter-domain protection of inter-source information.
- the time synchronization network is divided into multiple synchronization domains, and the cross-domain devices are deployed between the synchronization domains.
- the synchronization relationship between the synchronization domains is established by the cross-domain devices, and the time source information is transmitted and time source between the synchronization domains. Protection, achieving time synchronization between synchronization domains.
- the synchronization domain includes: a PTP domain, a time domain, and a Network Time Protocol (NTP) domain.
- NTP Network Time Protocol
- the synchronization domain is a PTP domain
- the inter-domain device is configured with one or more PTP ports, and each PTP port belongs to the same or different synchronization domain;
- the synchronization relationship between adjacent synchronization domains is a master-master relationship or a master-slave relationship
- the synchronization device in the slave synchronization domain selects a time source deployed in the master synchronization domain for synchronization
- the synchronization device selects the time source in the synchronization domain to synchronize; when the time source is not deployed in the synchronization domain, or the synchronization domain is deployed. When the time source fails or degrades, the synchronization device selects the time source in the other synchronization domain to synchronize.
- the synchronization domain is in a master-master relationship
- the time source parameter in the PTP advertisement packet is remapped according to the inter-domain parameter mapping table configured on the cross-domain device.
- the time source level of the other synchronization domain is lower than the time source level of the synchronization domain, and the best master clock (BMC) algorithm is run based on the mapped time source parameter to calculate the state of the cross-domain device PTP port.
- BMC master clock
- the method further includes:
- the inter-domain device When receiving the PTP advertisement message sent by the other synchronization domain, the inter-domain device performs the access control according to the configured inter-domain access control rule, and discards the PTP advertisement message if the inter-domain access control rule is not met; If the inter-domain access control rule is met, the time source parameter in the PTP advertisement packet is remapped.
- the method further includes:
- the inter-domain device When the cross-domain device detects that the time source of the synchronization domain is normal, the inter-domain device discards the PTP event packet sent by the neighboring synchronization domain.
- the cross-domain device When the cross-domain device detects that the time source of the synchronization domain is faulty or degraded, the cross-domain device calculates a time deviation according to the received PTP event packet sent by the neighboring synchronization domain, and selects the phase.
- the time source of the neighboring synchronization domain performs cross-domain time synchronization;
- the cross-domain device detects that the clock source of the synchronization domain fails or degrades, and detects that the clock source of the adjacent synchronization domain also fails or degrades, the synchronization device of the synchronization domain is in the synchronization. ⁇ «Reselect the clock source.
- the synchronization domain is in a master-master relationship
- the domain device After the synchronization relationship is established between the synchronization domains, if the domain device does not receive the PTP advertisement packet of the neighboring synchronization domain within a predetermined time, the PTP event packet is sent to the neighboring synchronization domain; if received, Stop sending PTP event packets to the neighboring synchronization domain.
- the synchronization domain is in a master-slave relationship
- the PTP port is used to calculate the PTP port status.
- the static PTP port status is Master or Slave.
- the cross-domain device transmits the time source information between the synchronization domains in the following manner:
- the domain-by-domain synchronization mode When the PTP advertisement packet is transmitted across the domain, the cross-domain device receives each time a synchronization domain passes. The domain number in the PTP advertisement packet is changed to the domain number of the synchronization domain, and the hop count is increased. The other parameters remain unchanged.
- Inter-AS transparent transmission mode The inter-AS device acts as a cross-domain logical TC channel.
- the entry timestamp is recorded in the entry of the logical TC channel
- the egress timestamp is recorded on the exit of the logical TC channel.
- the difference between the egress timestamp and the egress timestamp is obtained by the dwell time of the PTP packet through the synchronization domain, thereby completing the cross-domain periodic transparent transmission.
- the method further includes:
- Inter-domain device advertises domain level information, and runs cross-domain based on domain level information of each synchronization domain.
- the BMC algorithm selects the best synchronization domain and establishes the synchronization relationship between the domains.
- the synchronization device in each synchronization domain advertises intra-domain synchronization information, and runs the intra-domain BMC algorithm to establish a synchronization relationship within the domain.
- the method further includes:
- the inter-domain device of the primary synchronization domain detects that the time source of the synchronization domain is normal, the inter-domain device sends a PTP advertisement packet to the other synchronization domain to advertise the clock level information of the time domain of the synchronization domain;
- the device sends a PTP advertisement packet to the other synchronization domain to advertise the clock level information of the inter-AS device.
- the method further includes:
- the inter-domain device in the synchronization domain receives the PTP advertisement packet containing the clock level information of the cross-domain device, it is determined whether the domain number, GMid, and/or GM level parameter in the PTP advertisement packet conforms to the cross-domain.
- the inter-domain access control rule configured by the domain device if yes, determines that the primary synchronization domain is normal; otherwise, if the primary synchronization domain is determined to be faulty or degraded, the synchronization device of the synchronization domain selects and synchronizes to other primary synchronization domains. Clock source.
- the method further includes:
- the highest priority synchronization link is selected for cross-domain synchronization; when the high priority synchronization link is faulty, the secondary priority synchronization link is selected for cross-domain synchronization.
- the method further comprises: preventing the inter-domain loop in the following manner:
- the parameter value in the inter-domain parameter mapping table configured on the cross-domain device is lower than the corresponding parameter value in the synchronization domain;
- the embodiment of the invention further provides a cross-domain device, which is applied to a time synchronization system including multiple synchronization domains.
- One or more PTP ports are configured on the cross-domain device, and each of the PTP ports is separately In the same or different sync domains;
- the cross-domain device is configured to establish a synchronization relationship between the synchronization domains, and perform time source information transmission and time source protection between the synchronization domains to implement time synchronization between the synchronization domains.
- the synchronization domain is a PTP domain
- One or more PTP ports are configured on the cross-domain device, and each of the PTP ports belongs to the same or different synchronization domains.
- the cross-domain device includes a synchronization relationship establishing module and a time synchronization processing module, and the synchronization relationship establishing module is configured to establish a synchronization relationship between the synchronization domain and other synchronization domains as follows: a master-master relationship, or a master-slave relationship; the time synchronization processing module is configured to be a master-slave relationship between the synchronization domain and other synchronization domains, and the synchronization domain is a slave Then, the time source deployed in the master synchronization domain is selected for synchronization; if the master-slave relationship is between the synchronization domain and the other synchronization domain, when the time source is deployed in the synchronization domain, the time source in the synchronization domain is selected for synchronization. When the time source is not deployed in the synchronization domain, or the time source deployed in the synchronization domain fails or degraded, the time source in the other synchronization domain is selected for synchronization.
- the synchronization relationship establishing module is configured to: when the PTP advertisement (Announce) message sent by the other synchronization domain is received, the inter-domain access is configured according to the configuration.
- the control rule performs access control, and if the inter-domain access control rule is not met, the PTP advertisement message is discarded; if the inter-domain access control rule is met, the other synchronization domain is mapped according to the weight mapping on the cross-domain device.
- the time source level is lower than the time source level of the synchronization domain, and based on the mapped time source parameter, the best master clock (BMC) algorithm is run, and the state of the cross-domain device PTP port is calculated to establish the synchronization domain.
- BMC best master clock
- the synchronization relationship establishing module is configured to dynamically calculate the PTP port status by using the inter-area BMC algorithm when the master-slave relationship is established with the adjacent synchronization domain; or statically specifying the port status as Master or Slave.
- the time synchronization processing module is configured to:
- the ⁇ is ⁇ when the master-slave relationship between the adjacent synchronization domain is normal.
- the PTP advertisement packet is sent from the synchronization domain to advertise the clock level information of the time domain of the synchronization domain.
- the PTP advertisement packet is sent to other slave synchronization domains. Clock level information of the cross-domain device;
- the time source of the synchronization domain When the time source of the synchronization domain is normal, the PTP event packet sent by the neighboring synchronization domain is discarded. When the synchronization domain is detected, the time of the synchronization domain is detected. When the source fails or degrades, the time deviation is calculated according to the received PTP event sent by the adjacent synchronization domain, and the time source of the adjacent synchronization domain is selected to perform cross-domain time synchronization; When the clock source of the synchronization domain fails or degrades, and the clock source of the adjacent synchronization domain is also detected to be faulty or degraded, the clock source is reselected in the synchronization domain.
- the synchronization relationship establishing module is further configured to: interact with other synchronization domains to synchronize domain domain information of the domain, and run a cross-domain BMC algorithm based on the domain level information of each synchronization domain to select an optimal synchronization domain. , establishing a synchronization relationship between domains;
- the domain level information includes a domain number, and/or a domain priority level 1, and/or a domain GM clock level, and/or an i3 ⁇ 4 priority level 2.
- the cross-domain device further includes a time source information delivery module.
- the time source information delivery module is configured to transfer the time source information between synchronization domains in the following manner:
- the domain number is changed to the domain number of the current synchronization domain, and the hop count is increased.
- the other parameters remain unchanged.
- Cross-domain transparent transmission mode When a PTP advertisement packet is transmitted across the domain, as a cross-domain logical TC channel, for the received PTP packet, the entry timestamp is recorded at the entry of the logical TC channel, and the exit record of the logical TC channel is recorded. Exit timestamp; by the difference between the exit timestamp and the entry timestamp
- the PTP packet passes the resident time of the synchronization domain, thereby completing the cross-domain periodic transparent transmission.
- the inter-domain device further includes a loop avoidance module, and the loop avoidance module is configured to prevent an inter-domain loop in the following manner:
- the parameter value in the inter-domain parameter mapping table configured on the cross-domain device is lower than the corresponding parameter value in the synchronization domain;
- the GM id is specified in the inter-domain access control rule configured on the cross-domain device.
- the embodiment of the present invention further provides a time synchronization system of multiple synchronization domains, where the system includes multiple synchronization domains, each synchronization domain includes one or more synchronization devices, and the system further includes deployment between synchronization domains.
- the cross-domain device of any of the above.
- the embodiment of the present invention provides a synchronization architecture based on multiple synchronization domains, which divides the time synchronization network into multiple synchronization domains, implements inter-domain interworking, establishes inter-domain synchronization relationships, implements cross-domain transmission of time source information, and inter-domain protection.
- the inter-domain loop is avoided, and the problem that inter-domain interworking and inter-domain protection cannot be implemented between multiple synchronization domains in the time synchronization network in the related art is solved.
- the time synchronization system, the method, and the inter-domain device of the multi-synchronization domain implement inter-domain interworking, cross-domain transmission, and inter-domain protection switching in multiple synchronization domains, and time is achieved.
- the synchronous domain management effect improves the synchronization quality and maintainability of the 1588 synchronization network.
- FIG. 1 is a schematic diagram of a multi-synchronous domain time synchronization system according to an embodiment of the present invention
- FIG. 2 is a schematic diagram of inter-domain GM backup (GM1, GM2 are normal) according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of inter-domain GM backup (in case of GM1 failure) according to an embodiment of the present invention
- Schematic diagram of inter-domain GM backup (when both GM1 and GM2 fail);
- FIG. 5 is a schematic diagram of degradation of GM1 according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of inter-domain chain and loop avoidance according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of inter-domain link backup and loop avoidance (both link A and link B are normal) according to an embodiment of the present invention:
- FIG. 8 is a schematic diagram of inter-domain link backup and loop avoidance (link A failure, handover to link B) according to an embodiment of the present invention
- FIG. 9 is a schematic diagram of cross-domain transmission of GM information according to an embodiment of the present invention
- FIG. 10 is a schematic diagram of cross-domain transparent transmission (logical TC) according to an embodiment of the present invention
- FIG. 11 is a schematic diagram of multiple synchronization domain loop avoidance according to an embodiment of the present invention.
- FIG. 12 is a schematic diagram of a BMC algorithm based on multiple synchronization domains according to an embodiment of the present invention
- FIG. 13 is a schematic diagram of a BMC algorithm based on multiple synchronization domains according to an embodiment of the present invention
- FIG. 14 is a schematic diagram of domain failure and inter-domain switching according to an embodiment of the present invention.
- 15 is a schematic diagram of a peer-to-peer architecture (normal situation) of an inter-domain Master-Master according to an embodiment of the present invention
- 16 is a schematic diagram of a peer-to-peer architecture (domain 1 failure) of an inter-domain Master-Master according to an embodiment of the present invention
- FIG. 17 is a schematic diagram of a hierarchical structure of multiple synchronization according to an embodiment of the present invention.
- FIG. 18 is a schematic diagram of a cross-domain synchronization device according to an embodiment of the present invention.
- FIG. 19 is a schematic diagram of a synchronization network of a ring network structure according to an embodiment of the present invention.
- the large time synchronization network is divided into multiple synchronization domains for management.
- interworking between multiple synchronization domains cannot be implemented, and inter-domain protection of multiple synchronization domains cannot be implemented.
- an embodiment of the present invention provides a time synchronization system for multiple synchronization domains, which adopts the following technical solutions:
- the time synchronization network is divided into multiple synchronization domains, and the cross-domain devices are deployed between the synchronization domains.
- the synchronization relationship between the synchronization domains is established by the cross-domain devices, and the time source information is transmitted and time source between the synchronization domains. Protection, achieving time synchronization between synchronization domains.
- the synchronization domain includes but is not limited to: a PTP domain, a time domain, a Network Time Protocol (NTP) domain, and the like.
- the above solution includes the following contents:
- the large time synchronization network is divided into multiple synchronization domains, and each synchronization domain is assigned a domain number; the synchronization relationship between the synchronization domains may be a master-slave relationship, that is,
- Master-Slave relationship can also be a peer-to-peer relationship, that is, Master-Master master-master relationship (where the synchronization relationship between the synchronization domains is a master-slave relationship or a peer-to-peer relationship, which is configured during network planning);
- the synchronization device in the synchronization domain preferentially selects the time source in the domain; if the time source is not deployed in the synchronization domain, or the time source of the synchronization domain fails/falls Quality, then select the time source of other domains;
- the Slave synchronization domain selects the time source of the Master synchronization domain and synchronizes
- the time source information is allowed to be transmitted across the third-party synchronization domain, and the third-party synchronization domain may transmit the timing signal by using the cross-domain transmission mode, or may be transmitted by using the retiming mode;
- Inter-domain devices are deployed between the synchronization domains.
- the inter-domain devices implement the inter-domain protection functions in the following ways: ( )) inter-domain parameter mapping; (2) multi-domain PTP ports; (3) cross-domain BMC algorithms; Cross-domain devices need to support domain failure/degradation detection and notification mechanisms;
- one or more synchronization links can be configured, and each link is configured with different level parameters to implement the synchronization chain between the domains.
- the embodiment further provides a time synchronization method for multiple synchronization domains, which implements inter-domain interworking and inter-domain protection of multiple synchronization domains, including the following contents:
- Step 1 Enable PTP packet pre-processing on the inter-AS device to pre-process PTP Announce packets, including inter-domain parameter mapping and inter-domain access control.
- Step 2 When receiving the PTP Announce packet, first perform the inter-domain access control check, that is, the inter-domain access control rule configured, and the received Announce message related information, such as the domain number (domain number), and the source port. ID, GMid, GM priority 1 (Priority 1), GM clock class (clock class), GM priority 2 (Priority2), time source type, etc., analyze whether the access control rules are met, and if they match, it indicates that inter-domain interworking is allowed. , then proceed to the next step; if not, discard the Announce message and return;
- the inter-domain access control check that is, the inter-domain access control rule configured
- the received Announce message related information such as the domain number (domain number), and the source port. ID, GMid, GM priority 1 (Priority 1), GM clock class (clock
- Step 3 Perform inter-domain parameter mapping, that is, map the corresponding parameters in the received PTP Announce message according to the configured inter-domain parameter mapping table. If the domain number is different, modify the domain number in the Announce packet to The domain number of the local domain, and modify the GM parameters (including priority 1, clock level, and/or priority 2, etc.) in the Announce message to the values configured in the mapping table; other values remain unchanged.
- inter-domain parameter mapping that is, map the corresponding parameters in the received PTP Announce message according to the configured inter-domain parameter mapping table. If the domain number is different, modify the domain number in the Announce packet to The domain number of the local domain, and modify the GM parameters (including priority 1, clock level, and/or priority 2, etc.) in the Announce message to the values configured in the mapping table; other values remain unchanged.
- Step 4 Run the existing PTP protocol module, that is, the running number comparison algorithm and the state determination algorithm, based on the mapped GM parameters, and calculate the state of each PTP port of the device, thereby establishing a synchronization relationship between the domains;
- Step 5 The inter-AS device processes the PTP event packet:
- the inter-AS device discards the PTP event packets of other synchronization domains and does not synchronize them.
- the time offset is calculated according to the received PTP event packets of other synchronization domains, and time synchronization is performed. According to the timestamp in the PTP event packet, four times are obtained. The time value is then calculated according to the calculation formula, specifically referring to the IEEE-1588v2 standard specification).
- the PTP ports of the prior art cannot be inter-domain. That is, the PTP ports configured on the inter-AS devices can only be timed in the synchronization domain to which they belong. The domains are isolated from each other.
- Step 1 According to manual planning, divide the large synchronization network into multiple synchronization domains;
- Step 2 Configure one or more PTP ports on the inter-domain device between the synchronization domains, and specify the synchronization domain number to which the PTP port belongs.
- Step 3 Dynamically calculate or statically specify the port status of the PTP port in the synchronization domain. If the PTP port is in the static state, the port status is Master. That is, the synchronization domain is the virtual master. The device provides timing services for other synchronization domains.
- Step 4 In this synchronization domain, the inter-domain device functions as the BC device and obtains reference source information from other devices in the local domain. For other synchronization domains, the inter-domain device functions as the OC device.
- the synchronization domain provides reference source information; that is, the cross-domain device is a composite device of BC+OC;
- Step 5 Normally, the synchronization domain locks the time source of the synchronization domain.
- the cross-domain device advertises the clock level information of the time domain of the synchronization domain to other synchronization domains.
- Step 6 When the cross-domain device detects that the time source (such as GM) of the synchronization domain is faulty or degraded, the cross-domain device advertises the clock level information of the cross-domain device to the other synchronization domain.
- the time source such as GM
- the other synchronization domain receives the notified clock level information of the cross-domain device, the parameters such as the domain number, GMid, and GM level in the PTP advertisement packet do not meet the inter-domain access rules configured by the device. It is also referred to as the GM access control rule, and the synchronization domain is considered to be faulty or degraded. If the parameters such as the domain number, GMid, and GM level in the PTP advertisement packet meet the inter-domain access rules configured by the device, the synchronization domain is considered to be the synchronization domain. normal.
- Step 1 each synchronization domain, configured with different domain levels, including domain number, and / or domain priority 1, and / or domain GM clock level, and / or domain priority 2;
- Step 2 The intra-domain synchronization device advertises the intra-domain synchronization information according to the existing mode, and runs the BMC algorithm in a single domain to establish a synchronization topology in the domain to complete time synchronization in the domain.
- Step 3 The inter-domain synchronization device advertises the synchronization domain information and runs the inter-domain BMC algorithm.
- the inter-domain BMC algorithm includes: using the domain number as a source parameter of the BMC algorithm, selecting the best domain, establishing Synchronization between domains to complete inter-domain interworking and time transfer.
- This embodiment relates to inter-domain GM backup in a peer-to-peer architecture (Master-Master primary-primary domain relationship).
- the time synchronization network is divided into multiple synchronization domains, and each synchronization domain is deployed with a GM.
- the synchronization domains are in a peer relationship.
- the inter-domain PTP packets need to be pre-processed, including the domain. Inter-access control check and inter-domain parameter mapping.
- the intra-domain synchronization device preferentially selects the GM of the synchronization domain to synchronize
- the GM of the other synchronization domain is selected for synchronization based on the domain priority (such as priority 2);
- the Master-Master state exists between the two inter-AS devices. This mode can be used to send Announce messages and event packets to each other. However, synchronization is not performed normally. When the time source is used. When the fault or degradation occurs, the timestamp in the PTP event text of the adjacent synchronization domain can be obtained, the time deviation is calculated, and the deviation of the device is corrected to achieve the synchronization purpose.
- an optimization method is as follows: You can disable the sending of event packets, that is, the PTP port of the device is in the master state, and you need to check whether the Announce message of the peer end can be received. If it is not received for a period of time, the event is sent. ; If received, stop sending event 4 good text. If the Announce packet is sent by the peer, it indicates that it is a master-master relationship, and the PTP event packet is stopped. This reduces the network bandwidth requirement and improves the bandwidth resource utilization.
- GM access control rules it is possible to detect the failure or degradation of the synchronization domain in which the GM is located, thereby generating inter-domain switching.
- access control rules with different control granularities. For example, you can configure whether the detection domain number matches and whether the GMid matches. You can also configure whether to check whether the GM level matches, etc., while specifying the GMid.
- FIG 2, Figure 3, Figure 4 are scenarios in which two synchronization domains are interworking. Each domain is configured with one GM. The two synchronization domains are independent of each other and are invisible to each other.
- the inter-domain devices T-BC2 and T-BC5 are used to implement cross-domain. Interoperability.
- the synchronization principle is as follows: The GM in the synchronization domain is the primary GM, and the priority is high; the GM of the other synchronization domains is the standby GM, and the priority is low. For example, for devices in sync domain 1, GM1 is the primary GM and GM2 is the standby GM.
- the specific steps for inter-domain synchronization are:
- Step 1 If both GM1 and GM2 are normal, all devices in Synchronous Domain 1 and Synchronous Domain 2 will run the existing PTP, establish the Master-Slave synchronization topology in the domain, and select GM1 and GM2 as the grandmother clock respectively.
- the topology is shown in Figure 2.
- Step 2 Configure an inter-domain parameter mapping table and an inter-domain access control rule table (also referred to as a GM rule table) on the inter-domain PTP devices T-BC2 and T-BC5.
- an inter-domain access control rule table also referred to as a GM rule table
- the GM rule table on the T-BC2 in the synchronization domain 1 is used to access the GM2 of the synchronization domain 2
- the GM rule table on the T-BC5 in the synchronization domain 2 is used to access the GM1 of the synchronization domain 1.
- Step 3 For the inter-domain PTP device, the Announce message pre-processing function is enabled on the PTP port 3 of the T-BC2. Therefore, the Announce message needs to perform GM access control and GM parameter mapping.
- the cross-domain device T-BC2 receives the Announce message parameters from the inter-domain device T-BC5 of the synchronization domain 2:
- the T-BC5 device performs similar processing.
- Step 4 After the Announce message is processed, it is forwarded to the PTP protocol engine for processing.
- the BMC algorithm For the T-BC2 device in the synchronization domain 1, the BMC algorithm is used to calculate the state of PTP port 1 as Slave, and the state of port 2 and port 3 is Master according to the information of priority 1, clockClasss priority 2, etc.
- the state of the PTP port 1 is calculated as Slave, and the states of the port 2 and the port 3 are both Master.
- Step 5 When both PTP ports connected to T-BC2 and T-BC5 are in the master state, the two PTP ports periodically send PTP packets to the other party. In this case, except Announce packets and other PTP ordinary packets, The PTP event packet will be discarded because the PTP port is not in the Slave state at this time. That is, at this time, the two sync domains can "see" each other, but no time synchronization.
- Step 1 After GM1 fails, all sync devices in sync domain 1 will run PTP and re-select the new GM grandmother clock.
- Step 2 After receiving the GM access control check and parameter mapping, the Announce message received by the T-BC2 device from the port 3 is forwarded to the PTP protocol engine for processing, and the BMC algorithm is executed to calculate the PTP port 3 state as Slave, PTP port 1 And the status of port 2 is Master;
- the PTP port 3 of the T-BC2 device will accept the PTP event sent by the T-BC5. Report, calculate the time deviation and synchronize.
- Step 3 The other devices in the synchronization domain 1 recalculate the state of each port, and finally select GM2 as the grandmother clock and perform time synchronization.
- the final calculated synchronization topology is shown in Figure 12.
- Step 4 After the GM1 returns to normal, according to the BMC algorithm, the synchronization domain 1 will reselect GM1 as the grandmother clock and perform time synchronization; the two domains will each select the GM in the domain as the grandmother clock and perform time synchronization.
- the principle of time synchronization is: Reselect a PTP device as a new GM in this domain, and not select a PTP device in another domain.
- the grandmasterldentity in the received Announce packet does not match the configured GM access control rule (the GM id is different), indicating that the T-BC2 does not trust the new synchronization domain 2.
- the selected GM therefore, this Announce message will be discarded.
- the processing of the T-BC5 device is similar. Therefore, the PTP devices of the two synchronization domains will respectively reselect the GMs in the local domain, and will not select the PTP devices of other domains as the GMs.
- the clock class clockClass changes, for example, from 5 to 52, and other parameters are unchanged. At this time, even if degradation occurs, the existing BMC algorithm can be modified.
- select the new GM For example, as shown in Figure 5, when GM1 degrades, GM2 will be selected as the grandmother's clock.
- the final calculated synchronization topology is shown in Figure 5.
- This embodiment relates to an implementation of inter-domain link backup and loop avoidance.
- the other synchronization domain is abstracted as a virtual GM
- the synchronization device of the local domain is abstracted as a virtual BC; that is, the virtual BC is connected to a local GM and multiple virtual GMs;
- Its Implementation options include:
- inter-domain link priority is for a certain domain. For example, domain 1 and domain 2 have link A and chain. Path B, for domain 1, link A has a higher priority than link B; but for domain 2, link B has a higher priority than link A;
- priorities can be configured to distinguish the priority of the link.
- the priority attribute of the link can be used to switch between multiple synchronous links.
- the priority is reduced. For example, priority 2 is always lower than P2 of the synchronization domain, so no loop is formed. .
- the devices in the domain of the synchronization domain 1 and the synchronization domain 2 select the GM of the domain to synchronize; when the GM of the synchronization domain 1 fails and the GM of the synchronization domain 2 is normal, then the synchronization in the synchronization domain 1
- the device will select the GM of sync domain 2. It includes the following steps:
- Step 1 The two synchronization links configured in the inter-domain are assigned different priorities.
- Step 2 The device in the synchronization domain 1 runs the source selection algorithm. Because the GM in the domain fails, according to the priority level, the synchronization device of the synchronization domain 1 selects the virtual GM1 as the optimal master clock, that is, selects the synchronization link A.
- Step 3 After the GM parameter sent in the synchronization domain passes through other synchronization domain rings and returns to the synchronization domain, the priority is reduced. For example, the priority 2 is always lower than the P2 of the synchronization domain, so no ring is formed. road.
- Step 4 When link A fails and the inter-domain synchronization link switches from link A to link B, that is, synchronization domain 1 selects link B as the synchronization link.
- This embodiment relates to cross-domain delivery of time source information.
- Cross-domain delivery of GM information can be used but is not limited to the following two methods:
- the Announce message carries the GM parameters, including the domain number, source port ID, timestamp, Pl,
- CC P2, GMid, hops, time source type;
- the domain number needs to be changed to the domain number of the current synchronization domain after each synchronization domain; other parameters are unchanged; , the number of hops needs to be increased.
- the PTP domain is similar to the VPN nature, and the domains are isolated from each other. In fact, for the synchronous network, the PTP domain is more suitable as the "area synchronization area" concept.
- the GM time source is not identified by GMid, but should be domain+GMid.
- Mode 2 cross-domain transparent transmission mode (logical TC)
- the intermediate domain locks GM2 in advance and completes time synchronization.
- a cross-domain logical TC channel is configured; the cross-domain device BC21 of domain 2 is regarded as a logical TC channel.
- Ingress, BC23 is regarded as the exit of the logical TC channel; for the PTP event 4, at the entry of the logical TC channel, the entry timestamp is recorded; at the exit of the logical TC channel, the exit timestamp is recorded; the exit timestamp and the entry timestamp Poor, that is, the PTP message is residing through the synchronization domain 2 Time. Thereby completing the cross-domain timing transparent transmission.
- synchronization domain 3 accesses synchronization domain 1 and synchronization domain 2; when both GM1 and GM2 are normal, GM3 fails, synchronization domain 3 will synchronize to GM2; when GM1 is normal, GM2 and GM3 are both invalid, then synchronization domain 3 will Need to synchronize to GM1, then you need to implement GM1 cross-domain delivery.
- Implementation steps include:
- Step 1 Configure two GMs on BC32 port 1 of sync domain 3; 3 ⁇ 4 are tables for access
- Step 2 When GM2 and GM3 are invalid, Synchronization Domain 2 will synchronize GM1. At this time, GM1 id in Announce message will not be modified on BC21 port 1 of Synchronization Domain 2, and the hop count will not be modified. Synchronize domain 3; At the same time, it should be noted that the domain number needs to be modified.
- Step 3 The BC32 device of the synchronization domain 3 is configured with two GM rule tables, which are respectively used for access.
- Step 4 When receiving the Announce message sent by the BC23 of the synchronization domain 2, the BC32 checks the configured two GM rule tables and finds that the GM1 access control rule is met, and the Announce message sent by the synchronization domain 1 is not filtered. Synchronous domain 3 can access GM1, thus achieving cross-domain delivery of GM1.
- FIG. 10 shows a schematic diagram of cross-domain transparent transmission of timing information.
- the synchronization domain 2 is abstracted as a logical TC device, that is, the BC21 of the synchronization domain 2 serves as the ingress port of the logical TC device, and the BC23 serves as the egress port of the logical TC device.
- the specific steps mainly include:
- Step 1 Each synchronization domain implements time synchronization in advance.
- Step 2' Configure a logical TC channel on the BC21 and BC23 inter-domain devices in Synchronous Domain 1, where port 1 of BC21 acts as the ingress port of the logical TC channel and port 2 of BC23 acts as the logical TC. The outbound port of the channel.
- Step 3 When the BC21 of the synchronization domain 2 receives the PTP ordinary packet of the synchronization domain 1, it is transparently transmitted to the BC23 through the BC22.
- Step 4 When the BC21 receives the PTP event packet of the domain 1, for example, the Sync packet, the entry time stamp TS1 is recorded in the PTP packet.
- Step 5 When BC23 receives the PTP event message, it records the timestamp TS2; TS2-TS1 is the time of the event message passing through the synchronization domain 2 (because domain 2 is synchronized, the same time reference is used) .
- Step 6 The synchronization domain 3 receives the PTP common packet of the synchronization domain 1, such as the Announce packet, and establishes a Master-Slave relationship with the domain 1.
- Step 7 Synchronous domain 1 sends a PTP event packet, which crosses the synchronization domain 2, and arrives at the synchronization domain 3.
- the synchronization domain 3 can learn the synchronization domain 2 resident according to the timestamp information of the correctionReld carried in the PTP packet. Time, thereby calculating the time offset of sync domain 1 to sync domain 3.
- This embodiment mainly relates to the implementation of multi-synchronous domain loop avoidance. Multi-sync domain loops can be avoided by configuring inter-domain GM access control rules.
- Figure 11 shows a plurality of synchronous domain synchronization networks, for example, for synchronization domain 2, which can obtain GM source information from synchronization domain 1 and synchronization domain 3; BC21 is used to access GM1 of synchronization domain 1, and BC23 is used to access synchronization domain 3 GM3.
- BC21 is used to access GM1 of synchronization domain 1
- BC23 is used to access synchronization domain 3 GM3.
- Step 1 When the GM of each synchronization domain is normal, the PTP device in each synchronization domain will select the GM in the domain as the grandmother clock.
- Step 2 If the GM2 of the synchronization domain 2 fails or degrades, and GM1 and GM3 are normal, according to the GM rule table of the configuration of the synchronization domain 2, the device of the synchronization domain 1 will select GM1 as the grandmother clock and synchronize GM1.
- This embodiment relates to a BMC algorithm based on multiple synchronization domains - Master-Slave master-slave architecture.
- the dynamic mode is calculated according to the current state decision algorithm;
- the configured domain parameters Pl/cc/p2 may be the same or different, and the relationship between i or the relationship is a Master-Slave relationship;
- Static mode based on manual configuration, set the inter-domain PTP port to Master or Slave.
- Cross-domain devices such as BC21 and BC23 in domain 2 are considered to be faulty if the GM2 information of the local domain is not received within a certain period of time without being synchronized to other domains.
- the inter-domain devices BC21 and BC23 will not send inter-domain information; or send degraded domain information.
- the synchronization network consists of four synchronization domains. Each synchronization domain can be deployed with or without GM. The following steps are included:
- Step 1 Abstract each synchronization domain as a virtual BC; the domain number is equivalent to clockID (domain number - clockID participates in BMC calculation), and P1/CC/P2 of synchronization domain is equivalent to P1/CC P2 of synchronization device; (PTP port Divided into two types, cross-domain and intra-domain, used for inter-domain hop count calculation)
- Step 2 Configure the parameters of the synchronization domain on the inter-domain border synchronization device, including P1, CC, and P2.
- the boundary device advertises the parameters of the local domain to other domains instead of the parameters of the synchronization device.
- the synchronization domain 2 The boundary devices are BC21 and BC23, respectively, which send the parameter information of the synchronization domain 2 to the synchronization domain 1 and the synchronization domain 4; and receive the parameter information from the synchronization domain 1 and the synchronization domain 4;
- the cross-domain PTP packet is identified as follows: (1) The cross-domain flag is added to the PTP packet. (2) If the domain ID is different, the cross-domain information is considered to have been received.
- Step 3 For BC21, it receives the information of the GM2 of the local domain, and also receives the information of the synchronization domain 1. At this time, the BC21 runs the multi-domain BMC algorithm, compares the domain parameters, and finds that the parameters of the synchronization domain 1 are more If yes, set the port to the slave state; and force port 2 and port 3 to be in the master state (the two ports no longer use the BMC calculation state), and send the synchronization domain 1 information to BC22, BC23; Step 4, BC22, After receiving the Announce message of the synchronization domain 1, the BC23 determines the cross-domain flag or the comparison domain number of the packet.
- the PTP port is directly set to the slave state, and the other PTP ports are set as the master. Therefore, the synchronization device in the synchronization domain 2 will be synchronized to the GM1 of the domain 1, and will not be synchronized to the GM2 of the domain; thus, the cross-domain transfer of the GM is realized.
- Step 5 When the synchronization domain 1 and the synchronization domain 4 connected to the synchronization domain 2 are faulty, the synchronization domain 2 will be resynchronized to the GM2 of the domain.
- Step 6 When the GM1 of the synchronization domain 1 is faulty, the inter-domain device BC13 of the synchronization domain 1 calculates the port state as the slave state by using the inter-domain BMC algorithm, and the ports 1, 3, and 4 are in the master state; finally, the synchronization domain 1 is Synchronous domain 3 and sync domain 4 are synchronized to sync domain 2, thereby completing inter-domain switching.
- Step 7 Topological establishment and loop avoidance in the domain. The hop count is used to calculate the topology.
- Step 8 Inter-domain topology establishment and loop avoidance:
- BC31 For BC31 and BC43 cross-domain devices, after comparing the number of hops between domains, BC31 will be set as Master and BC43 as Passive.
- This embodiment relates to a BMC algorithm based on multiple synchronization domains - Master-Master peer-to-peer architecture.
- Modify the existing state decision algorithm For example, if the two domains have the same status, for example, the domain parameters P1/CC P2 are equal, then both domains are Master, and their relationship is the Master-Master relationship (peer); The device prefers to synchronize the GM of this domain. As shown in Figure 15, the parameters of the two sync domains, sync domain 1 and sync domain 2 are equal. At this time, the PTP port status calculated by the inter-domain border device is Master.
- Step 1 Under normal circumstances, when the GMs of the synchronization domain 1 and the synchronization domain 2 are normal, the devices in the domain of the two synchronization domains will select the GM of the domain to synchronize.
- Step 2 When the GM of the synchronization domain 1 is faulty, the T-BC2 will be switched to the synchronization domain 2, that is, the PTP port 3 is in the Slave state, and the PTP port 1 and the port 2 are set as the master; as shown in FIG.
- Step 3 Other devices in the synchronization domain 1 find that the GM fault or degradation in the domain is synchronized to the GM of the synchronization domain 2;
- Step 4 When the GM of Synchronous Domain 1 returns to normal, as shown in Figure 15, T-BC1 will select GM1 and synchronize it. For T-BC2, when GM1 returns to normal, PTP port 3 will be reset to Master status.
- This embodiment relates to a master-slave architecture of multiple synchronization domains.
- the time synchronization network is divided into multiple synchronization domains.
- the synchronization domain has a master-slave relationship.
- the principle of trusting other domains is suitable for a single carrier's synchronization network.
- a PTP device is a multi-domain synchronization device, which is characterized by:
- PTP ports in a multi-domain synchronization device can belong to different synchronization domains, such as
- PTP port P11 and P12 belong to the synchronization domain 1
- PTP port P31 belongs to the synchronization domain 3
- the PTP port P41 belongs to the synchronization domain 4;
- the PTP port status of the multi-domain synchronization device can be dynamically calculated (based on the BMC algorithm or other algorithms as the BC device), the PTP port is bidirectional, or statically configured (as the GM device), and the PTP port is unidirectional;
- This embodiment relates to a multi-synchronous domain deployment scheme of a ring network.
- Synchronous domain 1 is an aggregation ring.
- the devices on the aggregation ring are ordinary PTP devices.
- the device clock needs to use a more advanced clock, such as a 1st or 2nd clock. That is, the device on the aggregation ring is used as an ordinary BC device.
- sync domain 1 it can also be used as a GM device (in other sync domains).
- the access ring divides multiple synchronization domains, and the domains are isolated from each other.
- the synchronization principle of the master-slave architecture is:
- the time stream information is forwarded from the upper layer to the lower layer in one direction, that is, the time stream information is transmitted from the primary synchronization domain to the secondary synchronization domain;
- the lowest layer constitutes different synchronization domains that are isolated from each other; that is, they are isolated from each other;
- Multi-GM load sharing and backup are implemented by sub-domains, and one GM device belongs to different domains;
- GM2 and GM3 belong to sync domain 3 and sync domain 4; in sync domain 3,
- GM2 is the main GM, and GM3 is the standby GM. However, in the synchronization domain 4, GM2 is the standby GM and GM3 is the primary GM.
- the embodiment of the present invention further provides a cross-domain device, which is applied to a time synchronization system including multiple synchronization domains, where the cross-domain device is configured with one or more PTP ports, and each of the PTP ports is respectively configured. Belong to the same or different sync domains;
- the cross-domain device is configured to establish a synchronization relationship between the synchronization domains, and perform time source information transmission and time source protection between the synchronization domains to implement time synchronization between the synchronization domains.
- the synchronization domain is a PTP domain
- One or more PTP ports are configured on the cross-domain device, and each of the PTP ports belongs to the same or different synchronization domains.
- the cross-domain device includes a synchronization relationship establishing module, and a time synchronization processing module.
- the synchronization relationship establishing module is configured to establish a synchronization relationship between the synchronization domain and other synchronization domains: a master-master relationship or a master-slave relationship;
- the time synchronization processing module is configured to: if the synchronization domain and the other synchronization domain are in a master-slave relationship, and the synchronization domain is a slave, select a time source deployed in the master synchronization domain for synchronization; if the synchronization domain and other synchronization domains
- the time source in the synchronization domain is selected for synchronization.
- the time source is not deployed in the synchronization domain, or the time source deployed in the synchronization domain fails or falls. For quality, select the time source in the other sync domain to synchronize.
- the synchronization relationship establishing module is configured to: when the PTP advertisement (Announce) message sent by the other synchronization domain is received, the inter-domain access is configured according to the configuration.
- the control rule performs access control, and if the inter-domain access control rule is not met, the PTP advertisement message is discarded; if the inter-domain access control rule is met, the inter-domain parameter mapping table configured on the cross-domain device is used. Re-mapping the time source parameter in the PTP advertisement packet, and the time source parameter, running the best master clock (BMC) algorithm, and calculating the state of the cross-domain device PTP port to establish the synchronization domain The synchronization relationship between.
- BMC best master clock
- the synchronization relationship establishing module is configured to dynamically calculate the PTP port state by using the inter-domain BMC algorithm when the master-slave relationship is established with the neighboring synchronization domain, or statically specify the port state as Master or Slave.
- the time synchronization processing module is configured to:
- the PTP advertisement message is sent to the other slave synchronization domain, and the clock level information of the time domain of the synchronization domain is advertised;
- the PTP advertisement packet is sent to the other synchronization domain to notify the clock level information of the cross-domain device.
- the time source of the synchronization domain When the time source of the synchronization domain is normal, the PTP event packet sent by the neighboring synchronization domain is discarded. When the synchronization domain is detected, the time of the synchronization domain is detected. When the source is faulty or degraded, the PTP event sent by the neighboring synchronization domain is received, the time deviation is calculated, and the time source of the adjacent synchronization domain is selected for cross-domain time synchronization; when the synchronization is detected The clock source of the domain fails or degrades, and the clock source of the adjacent sync domain is detected. When a fault or degradation occurs, the clock source is reselected in this synchronization domain.
- the synchronization relationship establishing module is further configured to: interact with other synchronization domains to synchronize domain domain information of the domain, and run a cross-domain BMC algorithm based on the domain level information of each synchronization domain to select an optimal synchronization domain. , establishing a synchronization relationship between domains;
- the domain level information includes a domain number, and/or a domain priority level 1, and/or a domain GM clock level, and/or a domain priority level 2.
- the cross-domain device further includes a time source information delivery module.
- the time source information delivery module is configured to transfer the time source information between synchronization domains in the following manner:
- the domain number is changed to the domain number of the current synchronization domain, and the hop count is increased.
- the other parameters remain unchanged.
- Cross-domain transparent transmission mode When a PTP advertisement packet is transmitted across the domain, as a cross-domain logical TC channel, for the received PTP packet, the entry timestamp is recorded at the entry of the logical TC channel, and the exit record of the logical TC channel is recorded.
- the egress timestamp is obtained by the difference between the egress timestamp and the entry timestamp, and the time interval of the PTP message passing through the synchronization domain is obtained, thereby completing the cross-domain timed transparent transmission.
- the inter-domain device further includes a loop avoidance module, and the loop avoidance module is configured to prevent a loop between the ⁇ 3:
- the parameter value in the inter-domain parameter mapping table configured on the cross-domain device is lower than the corresponding parameter value in the synchronization domain;
- the embodiment of the present invention further provides a time synchronization system of multiple synchronization domains, where the system includes multiple synchronization domains, each synchronization domain includes one or more synchronization devices, and the system further includes deployment between synchronization domains.
- the cross-domain device of any of the above.
- the embodiments of the present invention implement inter-domain interworking, cross-domain transmission, and inter-domain protection switching in multiple synchronization domains, achieve time-division domain management, and improve synchronization quality and maintainability of the 1588 synchronization network.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
一种多同步域的时间同步系统、方法及跨域设备,其方法包括:将时间同步网络划分为多个同步域,在同步域之间部署跨域设备,通过所述跨域设备在同步域之间建立同步关系,在同步域之间进行时间源信息的传递和时间源的保护,实现同步域之间的时间同步。
Description
一种多同步域的时间同步系统、 方法及跨域设备
技术领域
本发明涉及分组网络同步技术领域, 尤其涉及一种多同步域的时间同步 系统、 方法及跨域设备。 背景技术
随着 3G网络的高速发展, PTP ( Precision Time Protocol, 精确时间协议 ) 时间同步协议在分组网络中得到越来越多的重视和广泛的应用。 国内外运营 商不断的使用 PTP协议进行时间同步, 逐步替换使用 GPS ( Global Position System , 全球定位系统 )进行时间同步的方式。
对于时间同步网, 同步拓朴是通过 ΡΤΡ协议的 BMC ( Best Master Clock, 最佳主时钟) 算法来实现选源和建立拓朴, 其思想为先在同步域内选举一个 等级最高的 GM ( Grandmaster Clock, 祖母时钟) , 然后按照距离 GM的跳 数来完成拓朴建立; 其优点是全网可以同步于一个时间源, 这样在稳定状态 下, 整网处于同源时间同步状态。 这种时间同步网络结构简单, 也不需要跨 域处理; 但随着时间同步技术应用领域的不断扩大, 这种时间同步架构越来 越不适应大规模组网。 其主要缺陷包括: ( 1 ) 网络层次结构不清晰, 导致后 期的网络维护非常困难; (2 )全网不能实现 GM的负荷分担和互为备份; (3 ) 网络太大, 出现故障时, BMC例换时间长; (4 ) GM到终端设备(比如基 站) 的同步链路长, 引入更多的链路非对称误差。
相关技术允许同步网中存在多个同步域, 类似 VPN ( Virtual Private Network, 虛拟专用网), 同步域之间是相互隔离的, 但在这种多同步域的组 网情况下, 域间不能实现互通, 也不能实现多同步域的域间保护。 发明内容
本发明实施例提供一种多同步域的时间同步系统、 方法及跨域设备, 将 时间同步网划分为多个同步域, 实现域间互通、 建立域间同步关系, 实现时
间源信息的跨域传递、 域间保护。
本发明实施例提供的一种多同步域的时间同步方法, 包括:
将时间同步网络划分为多个同步域, 在同步域之间部署跨域设备, 通过 所述跨域设备在同步域之间建立同步关系, 在同步域之间进行时间源信息的 传递和时间源的保护, 实现同步域之间的时间同步。
较佳地, 所述同步域包括: PTP域、 时间域、 网络时间协议 (NTP)域。 较佳地, 所述同步域为 PTP域, 所述跨域设备配置有一个或多个 PTP端 口, 且所述每个 PTP端口属于相同或不同的同步域;
相邻的同步域之间的同步关系为主-主 (master-master)关系, 或者主-从 (master-slave)关系;
如果所述同步域之间为主-从关系, 则 slave 同步域内的同步设备选择 master同步域内部署的时间源进行同步;
如果所述同步域之间为主-主关系, 则当本同步域内部署了时间源时, 同 步设备选择本同步域内的时间源进行同步; 当本同步域内未部署时间源、 或 者本同步域内部署的时间源发生故障或者降质时 , 则同步设备选择其他同步 域内的时间源进行同步。
较佳地, 所述同步域之间为主 -主关系时,
所述跨域设备收到其他同步域发送的 PTP通告 (Announce)报文时, 根据 本跨域设备上配置的域间参数映射表对所述 PTP通告报文中的时间源参数进 行重映射, 其中重映射后其它同步域的时间源等级低于本同步域的时间源等 级, 并基于映射后的时间源参数, 运行最佳主时钟 (BMC)算法, 计算本跨域 设备 PTP端口的状态 , 以建立与所述同步域之间的同步关系。
较佳地, 所述同步域之间为主 -主关系时, 所述方法还包括:
所述跨域设备收到其他同步域发送的 PTP通告报文时, 根据配置的域间 访问控制规则进行访问控制, 如果不符合所述域间访问控制规则, 则丢弃所 述 PTP通告报文; 如果符合所述域间访问控制规则, 则对所述 PTP通告报文 中的时间源参数进行重映射。
较佳地,所述同步域之间为主 -主关系时,在所述同步域建立同步关系后,
所述方法还包括:
当所述跨域设备检测到本同步域的时间源正常时, 所述跨域设备将接收 到的相邻同步域发送的 PTP事件报文进行丢弃;
当所述跨域设备检测到本同步域的时间源发生故障或者降质时, 所述跨 域设备根据接收到的相邻同步域发送的 PTP事件报文, 计算出时间偏差, 选 择所述相邻同步域的时间源进行跨域时间同步;
当所述跨域设备检测到本同步域的时钟源发生故障或者降质、 且检测到 所述相邻同步域的时钟源也发生故障或者降质时, 则本同步域的同步设备在 本同步^ «内重新选择时钟源。
较佳地, 所述同步域之间为主 -主关系时,
所述同步域之间建立同步关系后, 如果 域设备在预定时间内未收到相 邻同步域的 PTP通告报文, 则向所述相邻同步域发送 PTP事件报文; 如果收 到, 则停止向所述相邻同步域发送 PTP事件报文。
较佳地, 所述同步域之间为主 -从关系时 ,
对于跨域设备的 PTP端口, 采用跨域 BMC算法计算 PTP端口状态; 或 者, 静态指定 PTP端口状态为 Master或 Slave。
较佳地,所述跨域设备采用如下方式在同步域之间传递所述时间源信息: 逐域同步方式: 当 PTP通告报文跨域传递时, 每经过一个同步域, 跨域 设备将接收到的 PTP通告报文中的域号修改为本同步域的域号,并增加跳数, 其它参数保持不变;
跨域透传方式: 跨域设备作为跨域的逻辑 TC通道, 对接收到的 PTP通 告报文, 在逻辑 TC通道的入口记录入口时间戳, 在逻辑 TC通道的出口记录 出口时间戳; 通过所述出口时间戳和入口时间戳之差得出 PTP报文经过本同 步域的驻留时间, 从而完成跨域的定时透传。
较佳地, 所述方法还包括:
为每个同步域配置不同的域等级信息, 所述域等级信息包括域号、 和 /或 域优先级 1、 和 /或域 GM时钟等级, 和 /或域优先级 2;
跨域设备进行域等级信息的通告, 基于各同步域的域等级信息运行跨域
BMC算法, 选出最佳的同步域, 建立域间的同步关系;
各同步域内的同步设备进行域内同步信息的通告, 运行域内 BMC 算法 建立域内的同步关系。
较佳地, 所述同步域之间为主 -从关系时, 所述方法还包括:
当主同步域的跨域设备检测到本同步域的时间源正常时, 所述跨域设备 向其他从同步域发送 PTP通告报文, 通告本同步域时间源的时钟等级信息; 当主同步域的跨域设备检测到本同步域的时间源发生故障或者降质时, 向其他从同步域发送 PTP通告报文, 通告本跨域设备的时钟等级信息。
较佳地, 所述方法还包括:
其它从同步域的跨域设备收到包含所述跨域设备的时钟等级信息的 PTP 通告报文时, 判断该 PTP通告报文中的域号、 GMid、 和 /或 GM等级参数是 否符合本跨域设备配置的域间访问控制规则, 如果符合, 则判定所述主同步 域正常; 否则, 判定所述主同步域故障或降质, 则本同步域的同步设备选择 并同步到其他主同步域的时钟源。
较佳地, 所述方法还包括:
在同步域之间配置一条或者多条同步链路, 并为每条同步链路配置不同 的优先级;
当同步链路都正常时, 选择最高优先级的同步链路进行跨域同步; 当高 优先级同步链路故障, 则选择次优先级的同步链路进行跨域同步。
较佳地, 所述方法还包括, 采用如下方式防止域间环路:
跨域设备上配置的所述域间参数映射表中的参数值低于本同步域内的相 应参数值;
跨域设备上配置的域间访问控制规则中指定 GM id。
本发明实施例还提供了一种跨域设备, 应用于包括多个同步域的时间同 步系统,
所述跨域设备上配置有一个或多个 PTP端口,每个所述 PTP端口分别属
于相同或不同的同步域;
所述跨域设备设置为, 在同步域之间建立同步关系, 并在同步域之间进 行时间源信息的传递和时间源的保护, 实现同步域之间的时间同步。
较佳地, 所述同步域为 PTP域;
所述跨域设备上配置有一个或多个 PTP端口,每个所述 PTP端口分别属 于相同或不同的同步域。
较佳地, 所述跨域设备包括同步关系建立模块, 和时间同步处理模块, 所述同步关系建立模块设置为, 在本同步域和其他同步域之间建立如下 之一种同步关系: 主-主 (master-master)关系, 或者主-从 (master-slave)关系; 所述时间同步处理模块设置为, 如果本同步域和其他同步域之间为主-从 关系, 且本同步域为 slave, 则选择 master同步域内部署的时间源进行同步; 如杲本同步域和其他同步域之间为主 -从关系, 则当本同步域内部署了时间源 时, 选择本同步域内的时间源进行同步; 当本同步域内未部署时间源、 或者 本同步域内部署的时间源发生故障或者降质时, 则选择其他同步域内的时间 源进行同步。
较佳地, 所述同步关系建立模块设置为, 与相邻同步域之间为主-主关系 时, 在收到其他同步域发送的 PTP通告 (Announce)报文时, 根据配置的域间 访问控制规则进行访问控制, 如果不符合所述域间访问控制规则, 则丢弃所 述 PTP通告报文; 如果符合所述域间访问控制规则, 则根据本跨域设备上配 重映射后其它同步域的时间源等级低于本同步域的时间源等级, 并基于映射 后的时间源参数, 运行最佳主时钟 (BMC)算法, 计算本跨域设备 PTP端口的 状态, 以建立与所述同步域之间的同步关系。
较佳地, 所述同步关系建立模块设置为, 与相邻同步域之间为主-从关系 时, 采用跨域 BMC算法动态计算 PTP端口状态; 或者静态指定端口状态为 Master或 Slave
较佳地, 所述时间同步处理模块设置为:
与相邻同步域之间为主 -从关系时, 检测到本同步域的时间源正常时, 向 δ
其他从同步域发送 PTP通告报文, 通告本同步域时间源的时钟等级信息; 当 检测到本同步域的时间源发生故障或者降质时, 向其他从同步域发送 PTP通 告报文, 通告本跨域设备的时钟等级信息;
与相邻同步域之间为主 -主关系时, 检测到本同步域的时间源正常时, 将 接收到的相邻同步域发送的 PTP事件报文进行丢弃; 当检测到本同步域的时 间源^生故障或者降质时, 根据接收到的相邻同步域发送的 PTP事件 4艮文, 计算出时间偏差, 选择所述相邻同步域的时间源进行跨域时间同步; 当检测 到本同步域的时钟源发生故障或者降质、 且检测到所述相邻同步域的时钟源 也发生故障或者降质时, 则在本同步域内重新选择时钟源。
较佳地, 所述同步关系建立模块还设置为, 与其他同步域之间交互同步 域的域等级信息, 并基于各同步域的域等级信息运行跨域 BMC 算法, 选出 最佳的同步域, 建立域间的同步关系;
其中所迷域等级信息包括域号、和 /或域优先级 1、和 /或域 GM时钟等级, 和 /或 i¾优先级 2。
较佳地, 所述跨域设备还包括时间源信息传递模块,
所述时间源信息传递模块设置为采用如下方式在同步域之间传递所述时 间源信息:
逐域同步方式: 当 PTP通告报文跨域传递时, 每经过一个同步域, 将域 号修改为当前经过的同步域的域号, 增加跳数, 其它参数保持不变;
跨域透传方式: 当 PTP通告报文跨域传递时, 作为跨域的逻辑 TC通道, 对接收到的 PTP报文, 在逻辑 TC通道的入口记录入口时间戳, 在逻辑 TC 通道的出口记录出口时间戳; 通过所述出口时间戳和入口时间戳之差得出
PTP报文经过本同步域的驻留时间, 从而完成跨域的定时透传。
较佳地, 所述跨域设备还包括环路避免模块, 所述环路避免模块设置为 采用如下方式防止域间环路:
跨域设备上配置的所述域间参数映射表中的参数值低于本同步域内的相 应参数值;
跨域设备上配置的域间访问控制规则中指定 GM id。
此外, 本发明实施例还提供了一种多同步域的时间同步系统, 所述系统 包括多个同步域, 每个同步域内包括一个或多个同步设备, 所述系统还包括 同步域之间部署的如上所述之任一项所述的跨域设备。
本发明实施例提出一种基于多同步域的同步架构, 将时间同步网划分为 多个同步域, 实现域间互通、 建立域间同步关系, 实现时间源信息的跨域传 递、 域间保护并避免域间环路, 解决了相关技术中时间同步网中多个同步域 之间不能实现域间互通及域间保护的问题。
采用本发明实施例提供的多同步域的时间同步系统、 方法和跨域设备, 与现有技术相比, 实现了多同步域的域间互通、 跨域传递、 域间保护倒换, 达到了时间同步的分域管理效果, 提高了 1588 同步网的同步质量和可维护 性。 附图概述
此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部 分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的 不当限定。 在附图中:
图 1为本^明实施例的多同步域时间同步系统的示意图;
图 2为本发明实施例的域间 GM备份 (GM1, GM2都正常) 的示意图; 图 3为本发明实施例的域间 GM备份(GM1失效情况下) 的示意图; 图 4为本发明实施例的域间 GM备份(GM1 , GM2都失效情况下)的示 意图;
图 5为本发明实施例的 GM1降质的示意图;
图 6为本发明实施例的域间链^ ^份及环路避免的示意图;
图 7为本发明实施例的域间链路备份及环路避免(链路 A和链路 B都正 常) 的示意图:
图 8为本发明实施例的域间链路备份及环路避免 (链路 A故障, 切换到 链路 B ) 的示意图;
图 9为本发明实施例的 GM信息的跨域传递的示意图; 图 10为本发明实施例的跨域透传 (逻辑 TC)的示意图;
图 11为本发明实施例的多同步域环路避免的示意图;
图 12为本发明实施例的基于多同步域的 BMC算法的示意图; 图 13为本发明实施例的基于多同步域的 BMC算法的示意图; 图 14为本发明实施例的域故障及域间倒换的示意图;
图 15为本发明实施例的域间 Master-Master的对等架构 (正常情况) 的 示意图;
图 16为本发明实施例的域间 Master-Master的对等架构 (域 1故障) 的 示意图;
图 17为本发明实施例的多同步的层次架构的示意图;
图 18为本发明实施例的跨域同步设备的示意图;
图 19为本发明实施例的环网结构的同步网络的示意图;
图 20为本发明实施例的主从架构的逻辑图。 本发明的较佳实施方式
随着时间同步网络规模的不断扩大, 为方便网络的维护和升级, 将大的 时间同步网络分为多个同步域来管理。 但这种多同步域的组网情况下, 多个 同步域间不能实现互通, 也不能实现多同步域的域间保护。
为此, 有必要在时间同步网络中部署多个同步域和多个时间源, 且同步 域之间需要互通, 建立跨域的同步拓朴链路, 实现时间源信息的跨域传递、 域间环路避免、 域间故障检测及跨域的保护倒换。
为实现在时间同步网中多同步域的域间互通和域间保护, 本发明实施例 提出一种多同步域的时间同步系统, 采用以下技术方案:
将时间同步网络划分为多个同步域, 在同步域之间部署跨域设备, 通过 所述跨域设备在同步域之间建立同步关系, 在同步域之间进行时间源信息的 传递和时间源的保护, 实现同步域之间的时间同步。
其中, 所述的同步域包括但不限于: 精确时间协议域 (PTP domain)、 时间 域 (time domain)、 网络时间协议 (NTP)域, 等。
以 PTP域为例, 上述方案包括如下内容:
1、 基于人工规划或同步算法, 将大的时间同步网划分为多个同步域, 每 个同步域分配一个域号; 同步域之间的同步关系可以是主从关系, 即
Master-Slave关系; 也可以对等关系, 即 Master-Master主-主关系 (其中, 同 步域之间的同步关系是主从关系还是对等关系, 是在网络规划时就配置好 的) ;
2、 如果同步域间为对等关系, 并且同步域内部署了时间源, 则同步域内 同步设备优先选择本域内的时间源; 如果本同步域内未部署时间源, 或本同 步域时间源故障 /降质, 则选择其它域的时间源;
3、 如杲同步域间为主从关系, 则 Slave同步域选择 Master同步域的时间 源并进行同步;
4、 时间源信息允许跨第三方同步域传送, 第三方同步域可以采用跨域透 传方式传递定时信号, 也可以采用重定时方式传递;
5、在同步域之间部署跨域设备,跨域设备通过以下方式实现及域间保护 功能: ( ] )域间参数映射; ( 2 )多域 PTP端口; ( 3 )跨域 BMC算法; 且 跨域设备需要支持域故障 /降质检测及通告机制;
6、 同步域之间, 可以配置一条或多条同步链路, 每条链路配置不同的等 级参数, 用来实现域间的同步链^^份;
7、 时间源信息跨域传递时, 采用人工规划 (参数映射 , 多域 PTP端口) 或跨域的 BMC算法, 避免域间环路。
本实施方式还提供一种多同步域的时间同步方法, 实现多同步域的域间 互通和域间保护, 包括以下内容:
一, 域间 PTP报文预处理(对等架构)
步骤 1 , 在跨域设备上使能 PTP报文预处理功能, 对 PTP Announce (通 告)报文进行预处理, 包括域间参数映射及域间访问控制;
步骤 2 , 当收到 PTP Announce报文, 首先进行域间访问控制检查, 即根 掂配置的域间访问控制规则, 及收到的 Announce报文相关信息, 比如域号 ( domain number ) 、 源端口 ID、 GMid、 GM优先级 1 ( Priority 1 ) 、 GM时 钟等级( clock class ) 、 GM优先级 2 ( Priority2 ) 、 时间源类型等参数, 分析 是否符合访问控制规则, 如果符合, 表明允许域间互通, 则进行下一步骤; 如果不符合, 丟弃 Announce报文, 并返回;
步骤 3 , 进行域间参数映射, 即根据配置的域间参数映射表, 对收到的 PTP Announce报文中的对应参数进行映射; 如果域号不同, 则把 Announce 报文中的域号修改为本域的域号,并把 Announce报文中 GM参数 (包括优先 级 1、 时钟等级和 /或优先级 2等)修改为映射表中配置的值; 其它值保持不 变 ·
步骤 4, 基于映射后的 GM参数, 运行现有的 PTP协议模块, 即运行数 掂集比较算法和状态决定算法, 计算出本设备各个 PTP端口的状态, 从而建 立域间的同步关系;
步骤 5 , 跨域设备处理 PTP事件报文:
本同步域的时间源正常时, 跨域设备对接收到其他同步域的 PTP事件报 文时会直接丢弃, 不会同步;
当本同步域的时间源出现故障或降质时, 则根据接收到的其他同步域的 PTP事件报文, 计算出时间偏差, 进行时间同步 (根据 PTP事件报文中的时 间戳, 获取 4个时间值, 然后根据计算公式计算, 具体参考 IEEE-1588v2标 准规范) 。
二, 跨域 PTP端口 (主从架构)
现有技术的 PTP端口不能跨域, 即跨域设备上配置的 PTP端口之间, 只 能在所属的同步域进行定时传递, 域间相互隔离。
本 明实施例的跨域 PTP端口实现方法, 包括:
步骤 1 , 根据人工规划, 将大的同步网划分为多个同步域;
步骤 2 , 在同步域之间的跨域设备上, 配置一个或多个 PTP端口, 并指 定 PTP端口所属的同步域号;
步骤 3 ,对本同步域的 PTP端口,采用现有的 BMC算法动态计算或静态 指定端口状态; 对跨域的 PTP端口, 采用静态配置方式, 指定端口状态为 Master, 即, 本同步域作为虚拟 Master设备, 为其它同步域提供定时服务; 步骤 4, 在本同步域, 跨域设备作为 BC设备, 从本域的其它设备获得参 考源信息; 对其它同步域, 跨域设备作为 OC设备, 为其它同步域提供参考 源信息; 即跨域设备是 BC+OC的复合设备;
步骤 5 , 正常情况下, 本同步域锁定了本同步域的时间源, 这时, 跨域 设备向其它同步域通告本同步域时间源的时钟等级信息;
步骤 6, 当跨域设备检测到本同步域的时间源(如 GM )故障或降质, 这 时, 跨域设备向其它同步域通告本跨域设备的时钟等级信息。
通过上述方式, 当其它同步域收到通告的该跨域设备的时钟等级信息时, 如果 PTP通告报文中的域号、 GMid、 GM等级等参数不符合本设备配置的域 间访问规则 (下文中也称作 GM访问控制规则) , 则认为该同步域故障或降 质; 如果 PTP通告报文中的域号、 GMid、 GM等级等参数符合本设备配置的 域间访问规则, 认为该同步域正常。
三, 跨域 BMC算法
步骤 1, 每个同步域, 配置不同的域等级, 包括域号, 和 /或域优先级 1、 和 /或域 GM时钟等级, 和 /或域优先级 2;
步骤 2 , 域内同步设备按照现有方式进行域内同步信息的通告, 运行单 域的 BMC算法建立域内的同步拓朴, 完成域内的时间同步;
步骤 3 ,域间同步设备进行同步域信息的通告,并运行跨域的 BMC算法, 跨域的 BMC算法包括: 将域号也作为 BMC算法的一个选源参数, 选出最佳 的域, 建立域间的同步关系, 完成域间互通和时间传递功能。
以下将结合附图对本发明实施例作详细描述。 需要说明的是, 在不冲突 的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。
实施例一
本实施例涉及对等架构(Master-Master主 -主域间关系)中域间 GM备份。
本实施例中, 将时间同步网划分为多个同步域, 每个同步域均部署 GM, 同步域之间为对等关系, 域间互通时需要对域间 PTP报文进行预处理, 包括 域间访问控制检查和域间参数映射。
在跨域设备上配置访问控制列表, 并配置 GM参数映射表(相当于基于 同步域的本地优先级功能), 即: (1 )域间访问控制, (2 )域间参数映射一 域本地优先级, 包括:
1 .如果本同步域 GM正常, 则域内同步设备优先选择本同步域的 GM进 行同步;
2.如杲本同步域 GM失效或降质, 则基于域优先级(比如优先级 2 ) , 选择其它同步域的 GM进行同步;
3.如果本同步域和其它同步域的 GM都失效, 则重新在本同步域选择新 的 GM;
4.域间本着不信任原则, 即域间互通需要检查合法性(访问控制检查);
5.两个跨域设备之间, 存在 Master-Master状态(现有技术不存在这种模 式), 即可以相互发送 Announce报文和事件报文, 但正常情况下不会进行同 步; 当时间源故障或降质时, 则可获取相邻同步域的 PTP事件 文中的时间 戳, 计算出时间偏差并修正自身设备的偏差, 达到同步的目的。
此外, 一种优化方法为: 可以禁止发送事件报文, 即本设备 PTP端口为 Master状态,还需要检查是否能收到对端的 Announce报文, 如果一段时间未 收到, 则发送事件 4艮文; 如果收到, 则停止发送事件 4良文。 其中, 如果收到 对方发送的 Announce报文, 则表明是主-主关系, 则停止发送 PTP事件报文, 从而降低了对网络带宽的要求, 提高了带宽资源利用率。
6. 同步域故障检测及域间倒换
通过 GM访问控制规则, 可以检测 GM所在同步域故障或降质, 从而产 生域间倒换。 可包括以下内容:
( 1 )可以检查其它同步域故障。 比如, 如果其它同步域 GM ( GMid=l ) 失效, 则故障域会重新选择出一个新的 GM(GM id=2); 这时, 可以在 GM访 问控制规则中,指定只信任 GM id=l;这样,只要 GMid=l故障,则认为 GMid=l
所在的同步域出现故障;
( 2 )可以检查其它同步域是否降质。例如,如果其它同步域 GM(GM id-1) 降质, 即 clockClass由 10变为 20; 这时跨域设备能够检测到该变化, 通过配 置访问规则, 比如 GM id=l正常, 并且此 GM的 P1/CC P2 (优先级 1/时钟等 级 /优先級 2 )满足一定要求, 才认为此 GM可用, 如果 GM id=l不正常, 或 者此 GM的 P1/CC/P2不满足要求, 则认为 GM故障或降质。
此外, 可以配置不同控制粒度的访问控制规则, 比如可以配置检测域号 是否匹配、 GMid是否匹配; 还可以配置在指定 GMid的同时, 检测 GM等级 是否匹配, 等。
图 2, 图 3 , 图 4为两个同步域互通的场景, 每个域配置一个 GM, 两个 同步域相互独立, 互不可见; 跨域设备 T-BC2和 T-BC5用于实现跨域互通。 同步原则是: 本同步域内的 GM为主 GM, 优先级高; 其它同步域的 GM为 备 GM, 优先级低。 例如, 对同步域 1内的设备来说, GM1为主 GM, GM2 为备 GM。 域间同步的具体步骤为:
步骤 1 , 假如 GM1和 GM2都正常, 这时同步域 1和同步域 2的所有设 备将运行现有的 PTP, 建立域内的 Master-Slave同步拓朴, 并分别选择 GM1 和 GM2为祖母时钟, 建立的拓朴结构如图 2所示。
步骤 2 ,在域间 PTP设备 T-BC2和 T-BC5上分别配置域间参数映射表及 域间访问控制规则表(也称作 GM规则表) ;
其中同步域 1内的 T-BC2上的 GM规则表用于访问同步域 2的 GM2,而 同步域 2内的 T-BC5上的 GM规则表用于访问同步域 1的 GM1。
步骤 3 , 对域间 PTP设备, 由于 T-BC2的 PTP端口 3使能了 Announce 报文预处理功能, 因此, Announce报文需要进行 GM访问控制和 GM参数映 射;
例如, 跨域设备 T-BC2从同步域 2的跨域设备 T-BC5收到 Announce报 文参数为:
domainNumber=2, grandmasterPriority 1 =2 ,
grandinasterClockQuality.clockClass=4 ,
grandmasterPriority2=5, grandmasterIdentity=GM2;
由于 Announce报文中 grandmasterldentity和 GM访问控制规则配置的参 数一致, 都为 GM2, 因此访问控制检查通过;
然后, Announce消息的参数将映射为 GM参数映射表对应的参数; 处理 后的 Announce 寺 II文参凄 t为: domainNumber=l , grandmasterPriorityl=3 , giandmasterClockQuality.clockClass=5 , grandmasterPriority2=7。
T-BC5设备也进行类似的处理, 处理后的 Announce报文参数为: domainNumber=2, grandmasterPriority 1 =2,
grandmastei-ClockQuality.clockClass=4, grandmasterPriority2=7。
步骤 4, Announce报文需要进行预处理后, 交给 PTP协议引擎处理。 对同步域 1 内的 T-BC2设备来说, 根据优先级 1、 clockClasss 优先级 2 等信息, 采用 BMC算法, 计算出 PTP端口 1的状态为 Slave, 端口 2和端口 3状态都为 Master; 对同步域 2内的 T-BC5设备来说, 根据 BMC算法, 计 算出 PTP端口 1的状态为 Slave, 端口 2和端口 3状态都为 Master.
步骤 5, 连接 T-BC2和 T-BC5的两个 PTP端口都为 Master状态, 则两 个 PTP端口会周期向对方发送 PTP报文; 此时, 除了 Announce报文和其它 PTP普通报文, 会将 PTP事件报文将丢弃, 因为此时 PTP端口不是 Slave状 态。 即, 这时两个同步域间能互相 "看见" 对方, 但不会进行时间同步。
当同步域 1中的 GM1失效(GM2仍有效) 时, 如图 3所示, 这时同步 域 1内的同步设备将同步到同步域 2的 GM2 , 步骤为:
步骤 1, GM1失效后, 同步域 1 内的所有同步设备将运行 PTP, 重新选 择出新的 GM祖母时钟。
步骤 2, T-BC2设备从 ΡΤΡ端口 3收到的 Announce报文经过 GM访问控 制检查和参数映射后, 交给 PTP协议引擎处理,运行 BMC算法,计算出 PTP 端口 3状态为 Slave, PTP端口 1和端口 2的状态为 Master;
另外, 这时 T-BC2设备的 PTP端口 3将会接受 T-BC5发出的 PTP事件
报 , 计算出时间偏差并进行同步。
步骤 3, 同步域 1 中的其它设备重新计算出各个端口的状态, 最终将选 择 GM2作为祖母时钟并进行时间同步, 最终计算出的同步拓朴结构如图 12 所示。
步骤 4,当 GM1恢复正常后,根据 BMC算法,同步域 1将重新选择 GM1 作为祖母时钟并进行时间同步; 两个域会各自选择本域中的 GM作为祖母时 钟并进行时间同步。
当同步域 2中的 GM2失效, 而同步域 1的 GM1仍有效时, 处理流程与 之类似。
此外, 当 GM1和 GM2都失效时, 此时时间同步的原则是: 只在本域中 重新选择出某个 PTP设备作为新的 GM, 而不会选择其他域中的某个 PTP设 备。
如图 4 所示, 对 T-BC2 设备来说, 由于收到的 Announce 报文中 grandmasterldentity和配置的 GM访问控制规则不相符(GM id 不同) , 即表 明 T-BC2不信任同步域 2中新选出的 GM, 因此, 此 Announce消息将丢弃。 T-BC5设备的处理类似。 因而, 两个同步域的 PTP设备将分别重新选择出本 域中的 GM, 而不会选择其它域的 PTP设备作为 GM。
如图 5所示, 当 GM1出现降质时, 时钟等级 clockClass出现变化, 比如 由 5变为 52 ,而其它参数不变,此时,即使出现降质,也能在不修改现有 BMC 算法前提下, 选择新的 GM。 比如, 如图 5所示, 当 GM1出现降质, 将会选 择 GM2作为祖母时钟。 最后计算出的同步拓朴如图 5所示。
实施例二
本实施例涉及域间链路备份及环路避免的实现。
本实施例中, 将其它同步域抽象为虚拟 GM, 本域的同步设备抽象为虚 拟 BC; 即虚拟 BC连接了一个本域的 GM和多个虚拟 GM; 如图 6所示。 其
实现方案包括:
1.域间的多条同步链路配置不同的优先级, 实现域间链路保护; 其中, 域间链路优先级是针对某个域的, 比如域 1和域 2存在链路 A和 链路 B, 对域 1来说, 链路 A优先级高于链路 B; 但对域 2来说, 链路 B优 先级可以高于链路 A;
例如, 可以通过配置不同的优先级 2来区分链路的优先级; 通过链路的 优先级属性, 可以在多条同步链路间进行切换。
2.域间环路避免
可以通过: (1 )域间访问控制规则; 或者 (2 ) GM 参数重映射, 防止 域间环路。
由于本同步域中发出的 Announce报文,穿过其它同步域环回到本同步域 后, 由于优先级已被降低, 比如优先级 2总低于本同步域的 P2, 所以不会形 成环路。
( 1 )假如 GM id改变, 优先级 P2低于本同步域 P2, 不会有环路; ( 2 )假如 GM id不改变, 被 GM ACL ( Access Control List, 访问控制列 表) 过滤 (只信任 GM1 ) , 因此不会有环路。
如图 7所示, 同步域 1和同步域 2之间有两条同步链路, 分别为链路 A 和链路 B; 其中, 链路 A的优先级高于链路 B的优先级; 当两个同步域内的 GM都正常时, 同步域 1和同步域 2的域内设备都选择本域的 GM进行同步; 当同步域 1的 GM失效而同步域 2的 GM正常, 这时同步域 1 内的同步设备 将选择同步域 2的 GM。 其包括如下步骤:
步骤 1 , 在域间配置的两条同步链路分配不同的优先级;
参考图 6,对同步域 1来说,域内同步设备可以抽象为一个虚拟 BC设备, 它连接的时间源有 3个, 一个是本同步域内的真实 GM, 对应的 GM参数分 别为: 优先级 1=3, 时钟等级 =5, 优先级 2=7; 另外两个为虚拟 GM (即把其 它域抽象为虚拟 GM ); GM参数如 6图所示, 这时, 3个 GM的优先级通过 优先级 2来区分。 从图 6中可以看出, 域内 GM优先级最高, 虚拟 GM1优先
级次之, 虚拟 GM2优先级最低。
步骤 2, 同步域 1 的设备运行选源算法, 由于域内 GM失效, 根据优先 级高低, 同步域 1的同步设备将选择虛拟 GM1作为最佳主时钟, 即选择同步 链路 A。
步骤 3, 本同步域中发出的 GM参数, 穿过其它同步域环回到本同步域 后, 由于优先级已被降低, 比如优先级 2总低于本同步域的 P2, 所以不会形 成环路。
步骤 4, 当链路 A故障、 域间同步链路从链路 A切换到链路 B, 即同步 域 1将选择链路 B作为同步链路。
实施例三
本实施例涉及时间源信息的跨域传递。
GM信息的跨域传递, 可采用但不仅限于如下两种方式:
方式 1, 逐域同步方式(逻辑 BC )
Announce消息携带了 GM参数, 包括域号、 源端口 ID、 时间戳、 Pl、
CC:、 P2、 GMid、 跳数(hops ) 、 时间源类型; 当跨域传递时, 每经过一个同 步域, 域号都需要修改为当前经过的同步域的域号; 其它参数不变; 注意, 跳数需要增加。
需要说明的是, 已有技术认为, PTP域类似 VPN性质, 域间相互隔离; 其实对同步网来说, PTP域作为 "area同步区域" 的概念更合适。
这时, GM时间源不是按照 GMid来标识, 而应该是 domain+GMid。 方式 2, 跨域透传方式(逻辑 TC )
如图 10所示, 中间域事先锁定 GM2并完成了时间同步; 另外, 在跨域 设备 BC21和 BC23上,配置一个跨域的逻辑 TC通道;域 2的跨域设备 BC21 看作逻辑 TC通道的入口, BC23看作逻辑 TC通道的出口;对 PTP事件 4艮文, 在逻辑 TC通道的入口, 记录入口时间戳; 在逻辑 TC通道的出口, 记录出口 时间戳; 出口时间戳和入口时间戳之差, 即为 PTP报文经过同步域 2的驻留
时间。 从而完成了跨域的定时透传。
以下将对上述两种跨域传递方式进行详细描述。
方式 1.逐域同步方式- 逻辑 BC
如图 9所示,对串行的多个同步域, 需要考虑 GM信息的跨域传递问题。 比如, 同步域 3访问同步域 1和同步域 2; 当 GM1和 GM2都正常, GM3 失效时, 同步域 3将同步到 GM2; 当 GM1正常, GM2和 GM3都失效时, 这时同步域 3将需要同步到 GM1, 这时就需要实现 GM1跨域传递。
实现步骤包括:
步骤 1 ,在同步域 3的 BC32端口 1配置两个 GM;¾则表,分别用于访问
GM1和 GM2。
步骤 2, 当 GM2 , GM3失效, 同步域 2将同步 GM1 ; 这时, 在同步域 2 的 BC21端口 1, 将不修改 Announce报文中的 GM1 id, 跳数也不修改, 这些 信息将通告给同步域 3; 同时, 需要注意的是, 域号需要修改。
步骤 3 , 同步域 3的 BC32设备配置了 2个 GM规则表 , 分别用于访问
GM1和 GM2。
步骤 4, 当 BC32收到同步域 2的 BC23发送的 Announce报文时, 检查 配置的两个 GM规则表, 发现符合 GM1访问控制规则, 则将不会过滤同步 域 1发送过来的 Announce消息,从而同步域 3能访问 GM1,从而实现了 GM1 的跨域传递。
方式 2.跨域透传方式 -逻辑 TC
图 10所示为定时信息的跨域透传示意图。这时同步域 2抽象为一个逻辑 TC设备, 即同步域 2的 BC21作为逻辑 TC设备的入端口, BC23作为逻辑 TC设备的出端口。 具体步骤主要包括:
步骤 1 , 每个同步域都事先实现了时间同步。
步骤 2'在同步域 1的 BC21和 BC23跨域设备上配置一个逻辑 TC通道, 其中 BC21的端口 1作为逻辑 TC通道的入端口, BC23的端口 2作为逻辑 TC
通道的出端口。
步骤 3 ,当同步域 2的 BC21收到同步域 1的 PTP普通报文,则通过 BC22 透传给 BC23。
步骤 4, 当 BC21收到域 1的 PTP事件报文, 比如 Sync报文, 则在 PTP 报文中记录下入时戳 TS1。
步骤 5 , 当 BC23收到 PTP事件报文, 记录下出时戳 TS2; TS2-TS1即为 此事件报文经过同步域 2的驻留时间 (因为域 2 已同步, 采用了相同的时间 基准) 。
步骤 6 , 同步域 3收到同步域 1的 PTP普通报文, 比如 Announce报文, 和域 1建立 Master-Slave关系。
步骤 7 , 同步域 1发送 PTP事件报文, 跨越同步域 2, 到达同步域 3; 同 步域 3根据 PTP报文中携带的 correctionReld (修正域)的时戳信息, 可以获悉 同步域 2的驻留时间, 从而计算出同步域 1到同步域 3的时间偏差。
实施例四
本实施例主要涉及多同步域环路避免的实现。 可以通过配置域间 GM访 问控制规则避免多同步域环路。
图 11所示为多个同步域同步网络, 比如对同步域 2 , 它可以从同步域 1 和同步域 3获取 GM源信息; BC21用于访问同步域 1的 GM1, BC23用于访 问同步域 3的 GM3。 包括以下步骤:
步骤 1, 当每个同步域的 GM都正常时, 每个同步域内的 PTP设备将选 择本域内的 GM为祖母时钟。
步骤 2, 假如同步域 2的 GM2失效或降质, 而 GM1和 GM3正常, 则根 据同步域 2的配置的 GM规则表,同步域 1的设备将选择 GM1作为祖母时钟 并同步 GM1。
另外, 当多个同步域互联时, 需要避免环路。 假如 GM2和 GM3都失效 或降质, 则此时 BMC计算的多域同步拓朴如图 11所示, 由于 BC32的端口 1的过滤映射表只信任 GM2, 所以不会形成多域环路。
实施例五
本实施例涉及基于多同步域的 BMC算法 -Master-Slave主从架构。
Master-Slave主从架构:
动态方式, 依据目前的状态决策算法计算; 配置的域参数 Pl/cc/p2可以 相同, 也可以不同, i或之间的关系为 Master-Slave关系;
静态方式, 基于人工配置, 设置域间 PTP端口为 Master或 Slave。
判断域故障的方法如下:
( 1 ) 跨域设备, 比如域 2的 BC21和 BC23, 在未同步到其它域的前提 下, 如果一段时间内未收到本域的 GM2信息, 则认为本域故障;
( 2 )域故障情况下, 跨域设备 BC21和 BC23将不向外发送域间信息; 或发送降质的域信息。
1. 基于跨域的 BMC算法(动态方式)
如图 12所示, 同步网络由 4个同步域组成, 每个同步域可以部署 GM, 也可以不部署 GM; 包括以下步骤:
步骤 1 ,将每个同步域抽象为一个虚拟 BC; 域号的作用等同 clockID (域 号- clockID参与 BMC计算),同步域的 P1/CC/P2 等同同步设备的 P1/CC P2; ( PTP端口分为跨域和域内两种类型, 用于域间跳数计算)
步骤 2, 在域间边界同步设备上配置同步域的参数, 包括 P1,CC,P2; 边 界设备向其它域通告的是本域的参数, 而非同步设备的参数; 如图 12 , 同步 域 2的边界设备分别为 BC21和 BC23 , 它们分别向同步域 1和同步域 4发送 同步域 2的参数信息; 并从同步域 1和同步域 4接收参数信息;
说明: 跨域 PTP报文的识别: ( 1 )在 PTP报文中增加跨域标志; ( 2 ) 检查到域号不同, 则认为收到了跨域信息。
步骤 3 , 对 BC21来说, 其收到本域的 GM2的信息, 也收到同步域 1的 信息; 这时 BC21运行多域 BMC算法, 比较域参数, 发现同步域 1的参数更
好, 则设置端口为 Slave状态; 并强制设置端口 2和端口 3为 Master状态(这 2个端口不再采用 BMC计算状态),并向 BC22, BC23发送同步域 1的信息; 步骤 4, BC22, BC23收到同步域 1的 Announce报文后, 判断报文的跨 域标志或比较域号, 发现收到其它同步域的信息, 则直接置本 PTP 端口为 Slave状态, 并置其它 PTP端口为 master; 从而同步域 2内的同步设备将同步 到域 1的 GM1 , 而不会同步到本域的 GM2; 从而实现了 GM的跨域传递。
注意: 对 BC23来说, 当同步到同步域 1的 GM后, 发送的是同步域 1 的信息, 而非本域的信息。
步骤 5 , 当同步域 2连接的同步域 1及同步域 4故障, 则同步域 2将重新 同步到本域的 GM2。
步骤 6, 当同步域 1的 GM1故障 , 同步域 1的跨域设备 BC13通过运行 域间 BMC算法, 计算出端口 2为 Slave状态, 端口 1,3,4为 Master状态; 最 终, 同步域 1 , 同步域 3, 同步域 4都同步到同步域 2, 从而完成了域间倒换。
步骤 7, 域内拓朴建立及环路避免, 采用跳数比较计算拓朴。
步骤 8, 域间拓朴建立及环路避免:
( 1 ) 修改 Annouce报文格式, 增加域间跳数 (保留字节)如图 13, 域 1 和域 2建立主从关系后, 如果是域间 PTP接口收到或发送 域间 Announce报 文, 则域间跳数 + 1; 对域内的非域间 PTP端口, 不处理;
( 2 ) 对 BC31和 BC43两个跨域设备, 比较域间跳数后, 将设置 BC31 为 Master, BC43为 Passive。
实施例六
本实施例涉及基于多同步域的 BMC算法 -Master-Master对等架构。
对等架构 Master-Master:
修改现有状态决策算法, 如杲两个域地位相同, 比如域参数 P1/CC P2相 等, 则两个域都为 Master, 它们的关系是 Master-Master的关系 (对等体) ; 这时域内的设备优先选择本域的 GM进行同步。
如图 15所示, 两个同步域, 同步域 1和同步域 2的参数相等。 这时域间 边界设备计算出的 PTP端口状态都为 Master。
步骤 1 , 正常情况下, 当同步域 1和同步域 2的 GM都正常, 两个同步 域的域内设备将选择本域的 GM进行同步。
步骤 2 , 当同步域 1的 GM故障, T-BC2将倒换到同步域 2, 即 PTP端 口 3为 Slave状态, 并设置 PTP端口 1和端口 2为 Master; 如图 16所示。
步骤 3 , 同步域 1 内的其它设备发现本域 GM故障或降质, 将都同步到 同步域 2的 GM;
步骤 4, 当同步域 1的 GM恢复正常, 如图 15所示, T-BC1将选择 GM1 并同步之;对 T-BC2 ,发现 GM1恢复正常时,将重新设置 PTP端口 3为 Master 状态。
实施例七
本实施例涉及多同步域的主从架构。
如图 17所示, 时间同步网分为多个同步域, 同步域之间为主从关系, 对 其它域信任的原则, 适合单个运营商的同步网; 即:
1.人工规划好多个同步域的主从关系;
2.跨域设备的 PTP端口状态人工配置;
PTP设备为多域同步设备, 其特点是:
( 1 ) 多域同步设备中的 PTP端口可以分别属于不同的同步域, 比如图
17, PTP端口 P11和 P12属于同步域 1, PTP端口 P31属于同步域 3, PTP端 口 P41属于同步域 4;
( 2 )多域同步设备的 PTP端口状态可以动态计算(基于 BMC算法或其 它算法, 作为 BC设备) , PTP端口是双向的; 也可以静态配置 (作为 GM 设备) , PTP端口是单向的;
(3) BC+OC的混合设备模型, 比如, 在同步域 1中, 作为 BC设备; 在 同步域 3和同步域 4中作为 GM设备;
实施例八
本实施例涉及环形网络的多同步域部署方案。
目前的一种环网架构, 为了提高可维护性, 采用分层分域的架构。 如图 19所示。 同步域 1为汇聚环, 汇聚环上的设备为普通的 PTP设备, 但设备时 钟需要采用更高级的时钟, 比如 1级钟或 2级钟; 即汇聚环上的设备即作为 普通的 BC设备(在同步域 1中) , 也可作为 GM设备(在其它同步域中) 。 接入环划分多个同步域, 域间相互隔离。
主从架构的同步原则为:
( 1 ) 时间流信息从高层向低层单向转发,即时间流信息从主同步域向从 同步域传送;
( 2 ) 最低层组成相互隔离的不同的同步域; 即从同步域相互隔离;
( 3 ) 通过分域实现多 GM的负荷分担和备份, 一个 GM设备属于不同 的域;
如图 19中所示, GM2和 GM3属于同步域 3和同步域 4; 在同步域 3中,
GM2为主 GM, GM3为备 GM; 但在同步域 4中, GM2为备 GM, GM3为 主 GM。
此外, 本发明实施例中还提供了一种跨域设备, 应用于包括多个同步域 的时间同步系统,所述跨域设备上配置有一个或多个 PTP端口,每个所述 PTP 端口分别属于相同或不同的同步域;
所述跨域设备设置为, 在同步域之间建立同步关系, 并在同步域之间进 行时间源信息的传递和时间源的保护, 实现同步域之间的时间同步。
较佳地, 所述同步域为 PTP域;
所述跨域设备上配置有一个或多个 PTP端口,每个所述 PTP端口分别属 于相同或不同的同步域。
较佳地, 所述跨域设备包括同步关系建立模块, 和时间同步处理模块,
所述同步关系建立模块设置为, 在本同步域和其他同步域之间建立如下 之一种同步关系: 主-主 (master-master)关系, 或者主-从 (master-slave)关系; 所述时间同步处理模块设置为, 如果本同步域和其他同步域之间为主-从 关系, 且本同步域为 slave, 则选择 master同步域内部署的时间源进行同步; 如果本同步域和其他同步域之间为主-从关系, 则当本同步域内部署了时间源 时, 选择本同步域内的时间源进行同步; 当本同步域内未部署时间源、 或者 本同步域内部署的时间源发生故障或者降质时, 则选择其他同步域内的时间 源进行同步。
较佳地, 所述同步关系建立模块设置为, 与相邻同步域之间为主-主关系 时, 在收到其他同步域发送的 PTP通告 (Announce)报文时, 根据配置的域间 访问控制规则进行访问控制, 如果不符合所述域间访问控制规则, 则丢弃所 述 PTP通告报文; 如果符合所述域间访问控制规则, 则根据本跨域设备上配 置的域间参数映射表对所述 PTP通告报文中的时间源参数进行重映射, 其中 后的时间源参数, 运行最佳主时钟 (BMC)算法, 计算本跨域设备 PTP端口的 状态, 以建立与所述同步域之间的同步关系。
较佳地, 所述同步关系建立模块设置为, 与相邻同步域之间为主-从关系 时, 采用跨域 BMC算法动态计算 PTP端口状态; 或者静态指定端口状态为 Master或 Slave。
较佳地, 所述时间同步处理模块设置为:
与相邻同步域之间为主 -从关系时, 检测到本同步域的时间源正常时, 向 其他从同步域发送 PTP通告 4艮文, 通告本同步域时间源的时钟等级信息; 当 检测到本同步域的时间源发生故障或者降质时, 向其他从同步域发送 PTP通 告报文, 通告本跨域设备的时钟等级信息;
与相邻同步域之间为主 -主关系时, 检测到本同步域的时间源正常时, 将 接收到的相邻同步域发送的 PTP事件报文进行丢弃; 当检测到本同步域的时 间源发生故障或者降质时, 根据接收到的相邻同步域发送的 PTP事件才艮文, 计算出时间偏差, 选择所述相邻同步域的时间源进行跨域时间同步; 当检测 到本同步域的时钟源发生故障或者降质、 且检测到所述相邻同步域的时钟源
也发生故障或者降质时, 则在本同步域内重新选择时钟源。
较佳地, 所述同步关系建立模块还设置为, 与其他同步域之间交互同步 域的域等级信息, 并基于各同步域的域等级信息运行跨域 BMC 算法, 选出 最佳的同步域, 建立域间的同步关系;
其中所述域等级信息包括域号、和 /或域优先级 1、和 /或域 GM时钟等级, 和 /或域优先级 2。
较佳地, 所述跨域设备还包括时间源信息传递模块,
所述时间源信息传递模块设置为, 采用如下方式在同步域之间传递所述 时间源信息:
逐域同步方式: 当 PTP通告报文跨域传递时, 每经过一个同步域, 将域 号修改为当前经过的同步域的域号, 增加跳数, 其它参数保持不变;
跨域透传方式: 当 PTP通告报文跨域传递时, 作为跨域的逻辑 TC通道, 对接收到的 PTP报文, 在逻辑 TC通道的入口记录入口时间戳, 在逻辑 TC 通道的出口记录出口时间戳; 通过所述出口时间戳和入口时间戳之差得出 PTP报文经过本同步域的驻留时间, 从而完成跨域的定时透传。
较佳地, 所述跨域设备还包括环路避免模块, 所述环路避免模块用于, 采用如下方式防止 ^¾间环路:
跨域设备上配置的所述域间参数映射表中的参数值低于本同步域内的相 应参数值;
跨域设备上配置的域间访问控制规则中指定 GM id。
此外, 本发明实施例还提供了一种多同步域的时间同步系统, 所述系统 包括多个同步域, 每个同步域内包括一个或多个同步设备, 所述系统还包括 同步域之间部署的如上所述之任一项所述的跨域设备。
以上仅为本发明的优选实施案例而已, 并不用于限制本发明, 本发明还 可有其他多种实施例, 在不背离本发明精神及其实质的情况下, 熟悉本领域 的技术人员可根据本发明做出各种相应的改变和变形, 但这些相应的改变和 变形都应属于本发明所附的权利要求的保护范围。
显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程 序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 并 且在某些情况下, 可以以不同于此处的顺序执行所示出或描述的步骤, 或者 将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作 成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软件 结合。
工业实用性
本发明实施例实现了多同步域的域间互通、 跨域传递、 域间保护倒换, 达到了时间同步的分域管理效果, 提高了 1588 同步网的同步质量和可维护 性。
Claims
1、 一种多同步域的时间同步方法, 其包括:
将时间同步网络划分为多个同步域, 在同步域之间部署跨域设备, 通过 所述跨域设备在同步域之间建立同步关系, 在同步域之间进行时间源信息的 传递和时间源的保护, 实现同步域之间的时间同步。
2、 如权利要求 1所述的方法, 其中,
所述同步域包括: 精确时间协议 (PTP)域、 时间域或网络时间协议 (NTP) 域。
3、 如权利要求 1所述的方法, 其中,
所述同步域为 PTP域, 所述跨域设备配置有一个或多个 PTP端口, 且所 述每个 PTP端口属于相同或不同的同步域;
相邻的同步域之间的同步关系为主-主关系, 或者主 -从关系;
如果所述同步域之间为主 -从关系, 则从同步域内的同步设备选择主同步 域内部署的时间源进行同步;
如杲所述同步域之间为主-主关系, 则当本同步域内部署了时间源时, 同 步设备选择本同步域内的时间源进行同步; 当本同步域内未部署时间源、 或 者本同步域内部署的时间源发生故障或者降质时, 则同步设备选择其他同步 域内的时间源进行同步。
4、 如权利要求 3所述的方法, 其中, 所述同步域之间为主 -主关系时, 所述跨域设备收到其他同步域发送的 PTP通告报文时, 根据本跨域设备 上配置的域间参数映射表对所述 PTP通告报文中的时间源参数进行重映射, 映射后的时间源参数, 运行最佳主时钟 (BMC)算法, 计算本跨域设备 PTP端 口的状态, 以建立与所述同步域之间的同步关系。
5、 如权利要求 3或 4所述的方法, 其中, 所述同步域之间为主-主关系 时, 所述方法还包括:
所述跨域设备收到其他同步域发送的 PTP通告报文时, 根据配置的域间
访问控制规则进行访问控制, 如果不符合所述域间访问控制规则, 则丢弃所 述 PTP通告报文; 如果符合所迷域间访问控制规则, 则对所述 PTP通告报文 中的时间源参数进行重映射。
6、 如权利要求 3或 4所述的方法, 其中, 所述同步域之间为主-主关系 时, 在所述同步域建立同步关系后, 所述方法还包括:
当所述跨域设备检测到本同步域的时间源正常时, 所述跨域设备将接收 到的相邻同步域发送的 PTP事件报文进行丢弃;
当所述跨域设备检测到本同步域的时间源发生故障或者降质时, 所述跨 域设备根据接收到的相邻同步域发送的 PTP事件报文, 计算出时间偏差, 选 择所述相邻同步域的时间源进行跨域时间同步;
当所述跨域设备检测到本同步域的时钟源发生故障或者降质、 且检测到 所述相邻同步域的时钟源也发生故障或者降质时, 则本同步域的同步设备在 本同步域内重新选择时钟源。
7、 如权利要求 3或 4所述的方法, 其中, 所述同步域之间为主-主关系 时,
所述同步域之间建立同步关系后, 如果跨域设备在预定时间内未收到相 邻同步域的 PTP通告报文, 则向所述相邻同步域发送 PTP事件报文; 如果收 到, 则停止向所述相邻同步域发送 PTP事件 4艮文。
8、 如权利要求 3所述的方法, 其中, 所述同步域之间为主 -从关系时, 对于跨域设备的 PTP端口, 采用跨域 BMC算法计算 PTP端口状态; 或 者, 静态指定 PTP端口状态为主或从。
9、 如权利要求 1、 2、 3、 4或 8所述的方法, 其中, 所述跨域设备采用 如下方式在同步域之间传递所述时间源信息:
逐域同步方式: 当 PTP通告报文跨域传递时, 每经过一个同步域, 跨域 设备将接收到的 PTP通告报文中的域号修改为本同步域的域号,并增加跳数, 其它参数保持不变;
跨域透传方式: 跨域设备作为跨域的逻辑 TC通道, 对接收到的 PTP通 告报文, 在逻辑 TC通道的入口记录入口时间戳, 在逻辑 TC通道的出口记录
出口时间戳; 通过所述出口时间戳和入口时间戳之差得出 PTP ^-文经过本同 步域的驻留时间, 从而完成跨域的定时透传。
10、 如权利要求 1、 2、 3或 4所述的方法, 所述方法还包括:
为每个同步域配置不同的域等级信息, 所述域等级信息包括域号、 和 /或 域优先级 1、 和 /或域祖母时钟(GM ) 等级, 和 /或域优先级 2;
跨域设备进行域等级信息的通告, 基于各同步域的域等级信息运行跨域 BMC算法, 选出最佳的同步域, 建立域间的同步关系;
各同步域内的同步设备进行域内同步信息的通告, 运行域内 BMC 算法 建立域内的同步关系。
11、 如权利要求 3或 8所述的方法, 其中, 所述同步域之间为主-从关系 时, 所述方法还包括:
当主同步域的跨域设备检测到本同步域的时间源正常时, 所述跨域设备 向其他从同步域发送 PTP通告报文, 通告本同步域时间源的时钟等级信息; 当主同步域的跨域设备检测到本同步域的时间源发生故障或者降质时, 向其他从同步域发送 PTP通告报文, 通告本跨域设备的时钟等级信息。
12、 如权利要求 11所述的方法, 所述方法还包括:
其它从同步域的跨域设备收到包含所述跨域设备的时钟等级信息的 PTP 通告报文时, 判断该 PTP通告报文中的域号、 GM标识(GMid )、 和 /或 GM 等级参数是否符合本跨域设备配置的域间访问控制规则, 如杲符合, 则判定 所述主同步域正常; 如果不符合, 判定所述主同步域故障或降质, 则本同步 域的同步设备选择并同步到其他主同步域的时钟源。
13、 如权利要求 1所述的方法, 所述方法还包括:
在同步域之间配置一条或者多条同步链路, 并为每条同步链路配置不同 的优先级;
当同步链路都正常时, 选择最高优先级的同步链路进行跨域同步; 当高 优先级同步链路故障, 则选择次优先级的同步链路进行跨域同步。
14、 如权利要求 4所述的方法, 所述方法还包括, 采用如下方式防止域
间环路:
跨域设备上配置的所述域间参数映射表中的参数值低于本同步域内的相 应参数值;
跨域设备上配置的域间访问控制规则中指定 GM id。
15、 一种跨域设备, 应用于包括多个同步域的时间同步系统, 所述跨域设备上配置有一个或多个精确时间协议 (PTP)端口, 每个所述 PTP端口分别属于相同或不同的同步域;
所述跨域设备设置为, 在同步域之间建立同步关系, 并在同步域之间进 行时间源信息的传递和时间源的保护, 实现同步域之间的时间同步。
16、 如权利要求 15所述的跨域设备, 其中,
所述同步域为 PTP域;
所述跨域设备上配置有一个或多个 PTP端口,每个所述 PTP端口分别属 于相同或不同的同步域。
17、 如权利要求 16所述的跨域设备, 所述跨域设备包括同步关系建立模 块, 和时间同步处理模块,
所述同步关系建立模块设置为, 在本同步域和其他同步域之间建立如下 之一种同步关系: 主-主关系, 或者主-从关系;
所述时间同步处理模块设置为, 如果本同步域和其他同步域之间为主-从 关系, 且本同步域为从, 则选择主同步域内部署的时间源进行同步; 如果本 同步域和其他同步域之间为主-从关系, 则当本同步域内部署了时间源时, 选 择本同步域内的时间源进行同步; 当本同步域内未部署时间源、 或者本同步 域内部署的时间源发生故障或者降质时, 则选择其他同步域内的时间源进行 同步。
18、 如权利要求 17所述的跨域设备, 其中,
所述同步关系建立模块还设置为, 与相邻同步域之间为主 -主关系时, 在 收到其他同步域发送的 PTP通告报文时, 根据配置的域间访问控制规则进行 访问控制, 如果不符合所述域间访问控制规则, 则丢弃所述 PTP通告^ R文;
如果符合所述域间访问控制规则, 则根据本跨域设备上配置的域间参数映射 表对所述 PTP通告报文中的时间源参数进行重映射, 其中重映射后其它同步 域的时间源等级低于本同步域的时间源等级, 并基于映射后的时间源参数, 运行最佳主时钟 (BMC)算法, 计算本跨域设备 PTP端口的状态, 以建立与所 述同步域之间的同步关系。
19、 如权利要求 17所述的跨域设备, 其中,
所述同步关系建立模块还设置为, 与相邻同步域之间为主 -从关系时, 采 用跨域 BMC算法动态计算 PTP端口状态; 或者静态指定端口状态为主或从。
20、 如权利要求 17、 18或 19所述的跨域设备, 其中,
所述时间同步处理模块还设置为:
与相邻同步域之间为主 -从关系时, 检测到本同步域的时间源正常时, 向 其他从同步域发送 PTP通告报文, 通告本同步域时间源的时钟等级信息; 当 检测到本同步域的时间源发生故障或者降质时, 向其他从同步域发送 PTP通 告报文, 通告本跨域设备的时钟等级信息;
与相邻同步域之间为主 -主关系时, 检测到本同步域的时间源正常时, 将 接收到的相邻同步域发送的 PTP事件报文进行丢弃; 当检测到本同步域的时 间源发生故障或者降质时, 根据接收到的相邻同步域发送的 PTP事件报文, 计算出时间偏差、 选择所述相邻同步域的时间源进行跨域时间同步; 当检测 到本同步域的时钟源发生故障或者降质、 且检测到所述相邻同步域的时钟源 也发生故障或者降质时, 则在本同步域内重新选择时钟源。
21、 如权利要求 17、 18或 19所述的系统, 其中,
所述同步关系建立模块还设置为, 与其他同步域之间交互同步域的域等 级信息, 并基于各同步域的域等级信息运行跨域 BMC 算法, 选出最佳的同 步域, 建立域间的同步关系;
其中所述域等级信息包括域号、和 /或域优先级 1、和 /或域祖母时钟( GM ) 等级, 和 /或域优先级 2。
22、 如权利要求 17、 18或 19所述的跨域设备, 所述跨域设备还包括时 间源信息传递模块,
所迷时间源信息传递模块设置为采用如下方式在同步域之间传递所述时 间源信息:
逐域同步方式: 当 PTP通告报文跨域传递时, 每经过一个同步域, 将域 号修改为当前经过的同步域的域号, 增加跳数, 其它参数保持不变;
跨域透传方式: 当 PTP通告报文跨域传递时, 作为跨域的逻辑 TC通道, 对接收到的 PTP报文, 在逻辑 TC通道的入口记录入口时间戳, 在逻辑 TC 通道的出口记录出口时间戳; 通过所述出口时间戳和入口时间戳之差得出
PTP报文经过本同步域的驻留时间, 从而完成跨域的定时透传。
23、 如权利要求 17、 18或 19所述的跨域设备, 所述跨域设备还包括环 路避免模块, 所述环路避免模块设置为采用如下方式防止域间环路:
跨域设备上配置的所述域间参数映射表中的参数值低于本同步域内的相 应参数值;
跨域设备上配置的域间访问控制规则中指定 GM标识。
24、 一种多同步域的时间同步系统, 所述系统包括多个同步域, 每个同 步域内包括一个或多个同步设备, 所述系统还包括同步域之间部署的如权利 要求 15至 23之任一项所述的跨域设备。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210295766.8 | 2012-08-20 | ||
CN201210295766.8A CN103634091B (zh) | 2012-08-20 | 2012-08-20 | 一种多同步域的时间同步系统、方法及跨域设备 |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2013189176A2 true WO2013189176A2 (zh) | 2013-12-27 |
WO2013189176A3 WO2013189176A3 (zh) | 2014-02-13 |
Family
ID=49769488
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/000967 WO2013189176A2 (zh) | 2012-08-20 | 2013-08-20 | 一种多同步域的时间同步系统、方法及跨域设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103634091B (zh) |
WO (1) | WO2013189176A2 (zh) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104579535A (zh) * | 2015-01-06 | 2015-04-29 | 盛科网络(苏州)有限公司 | Ptp引擎广播时戳的方法、芯片处理时戳的方法及装置 |
CN105141406A (zh) * | 2015-09-29 | 2015-12-09 | 北京润科通用技术有限公司 | 时间同步方法、时间同步装置及仿真系统 |
CN105959078A (zh) * | 2016-06-16 | 2016-09-21 | 浪潮电子信息产业股份有限公司 | 一种集群时间同步方法、集群及时间同步系统 |
CN106105103A (zh) * | 2014-03-05 | 2016-11-09 | 华为技术有限公司 | 时钟同步方法、设备及通信系统 |
US11405121B2 (en) * | 2017-02-07 | 2022-08-02 | Texas Instruments Incorporated | Apparatus and mechanism to support multiple time domains in a single SoC for time sensitive network |
EP4297303A1 (en) * | 2022-06-22 | 2023-12-27 | Moxa Inc. | Method and device for time synchronization of time synchronization domains |
EP4391424A1 (en) * | 2022-12-19 | 2024-06-26 | Moxa Inc. | Method and device for time synchronization of time synchronization domains |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105099646A (zh) * | 2014-05-14 | 2015-11-25 | 中兴通讯股份有限公司 | 同步链路确定方法及装置 |
CN105099647A (zh) | 2014-05-16 | 2015-11-25 | 中兴通讯股份有限公司 | 一种同步方法、控制器、同步节点及同步网络 |
WO2016095099A1 (zh) | 2014-12-16 | 2016-06-23 | 华为技术有限公司 | 一种时间同步方法及装置 |
DE102015205406A1 (de) | 2015-03-25 | 2016-09-29 | Siemens Aktiengesellschaft | Vorrichtung, Verfahren und System zur Erfassung und Auflösung von Zeitinformationen unterschiedlicher administrativer Domänen |
CN107667491B (zh) * | 2015-06-10 | 2019-07-19 | 诺基亚通信公司 | 增强计算机网络中的同步的方法、装置和计算机可读介质 |
EP3288198B1 (en) * | 2016-08-23 | 2021-04-28 | Robert Bosch GmbH | System and method of clock synchronization in a computer network |
WO2019174574A1 (en) * | 2018-03-14 | 2019-09-19 | Huawei Technologies Co., Ltd. | Distributed network time protocol |
CN108667547B (zh) * | 2018-08-10 | 2019-10-11 | 电信科学技术第五研究所有限公司 | 一种网络时间协议转换方法及系统 |
CN111106889B (zh) | 2018-10-25 | 2021-04-20 | 华为技术有限公司 | 一种时钟同步方法及装置 |
CN111245549A (zh) * | 2020-01-15 | 2020-06-05 | Ut斯达康通讯有限公司 | 一种支持多个ptp域同步的网络设备及方法 |
CN111698052B (zh) * | 2020-06-12 | 2023-04-07 | 四川革什扎水电开发有限责任公司 | 一种跨越电力安全区的同源对时系统 |
CN113993009B (zh) * | 2020-07-27 | 2024-10-11 | 上海诺基亚贝尔股份有限公司 | 时间同步用于多域传输的方法、装置、olt及onu |
CN115189792A (zh) * | 2021-04-02 | 2022-10-14 | 烽火通信科技股份有限公司 | 一种分组同步通道失效的处理方法和装置 |
CN114039690B (zh) * | 2021-10-18 | 2023-04-28 | 中国联合网络通信集团有限公司 | 时间同步方法、装置及计算机可读存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101142773A (zh) * | 2005-03-18 | 2008-03-12 | 皇家飞利浦电子股份有限公司 | 网络节点的同步方法 |
CN101359238A (zh) * | 2008-09-02 | 2009-02-04 | 中兴通讯股份有限公司 | 一种多核系统的时间同步方法及系统 |
EP2333993A1 (en) * | 2009-12-09 | 2011-06-15 | Alcatel Lucent | Automatic management of timestamp-based synchronisation protocols |
CN102332974A (zh) * | 2011-11-01 | 2012-01-25 | 盛科网络(苏州)有限公司 | 支持多个ieee1588时钟域同步的方法及系统 |
-
2012
- 2012-08-20 CN CN201210295766.8A patent/CN103634091B/zh not_active Expired - Fee Related
-
2013
- 2013-08-20 WO PCT/CN2013/000967 patent/WO2013189176A2/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101142773A (zh) * | 2005-03-18 | 2008-03-12 | 皇家飞利浦电子股份有限公司 | 网络节点的同步方法 |
CN101359238A (zh) * | 2008-09-02 | 2009-02-04 | 中兴通讯股份有限公司 | 一种多核系统的时间同步方法及系统 |
EP2333993A1 (en) * | 2009-12-09 | 2011-06-15 | Alcatel Lucent | Automatic management of timestamp-based synchronisation protocols |
CN102332974A (zh) * | 2011-11-01 | 2012-01-25 | 盛科网络(苏州)有限公司 | 支持多个ieee1588时钟域同步的方法及系统 |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10178636B2 (en) | 2014-03-05 | 2019-01-08 | Huawei Technologies Co., Ltd | Clock synchronization method and device and communications system |
CN106105103B (zh) * | 2014-03-05 | 2020-09-18 | 华为技术有限公司 | 时钟同步方法、设备及通信系统 |
CN106105103A (zh) * | 2014-03-05 | 2016-11-09 | 华为技术有限公司 | 时钟同步方法、设备及通信系统 |
EP3104556A4 (en) * | 2014-03-05 | 2017-03-15 | Huawei Technologies Co., Ltd. | Clock synchronization method and device, and communication system |
CN104579535B (zh) * | 2015-01-06 | 2017-08-01 | 盛科网络(苏州)有限公司 | Ptp引擎广播时戳的方法、芯片处理时戳的方法及装置 |
CN104579535A (zh) * | 2015-01-06 | 2015-04-29 | 盛科网络(苏州)有限公司 | Ptp引擎广播时戳的方法、芯片处理时戳的方法及装置 |
CN105141406A (zh) * | 2015-09-29 | 2015-12-09 | 北京润科通用技术有限公司 | 时间同步方法、时间同步装置及仿真系统 |
CN105959078B (zh) * | 2016-06-16 | 2018-02-23 | 浪潮电子信息产业股份有限公司 | 一种集群时间同步方法、集群及时间同步系统 |
CN105959078A (zh) * | 2016-06-16 | 2016-09-21 | 浪潮电子信息产业股份有限公司 | 一种集群时间同步方法、集群及时间同步系统 |
US11405121B2 (en) * | 2017-02-07 | 2022-08-02 | Texas Instruments Incorporated | Apparatus and mechanism to support multiple time domains in a single SoC for time sensitive network |
US12113612B2 (en) | 2017-02-07 | 2024-10-08 | Texas Instruments Incorporated | Apparatus and mechanism to support multiple time domains in a single SoC for time sensitive network |
EP4297303A1 (en) * | 2022-06-22 | 2023-12-27 | Moxa Inc. | Method and device for time synchronization of time synchronization domains |
EP4391424A1 (en) * | 2022-12-19 | 2024-06-26 | Moxa Inc. | Method and device for time synchronization of time synchronization domains |
Also Published As
Publication number | Publication date |
---|---|
WO2013189176A3 (zh) | 2014-02-13 |
CN103634091B (zh) | 2019-05-24 |
CN103634091A (zh) | 2014-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013189176A2 (zh) | 一种多同步域的时间同步系统、方法及跨域设备 | |
US11496235B2 (en) | Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP | |
CN102377666B (zh) | 具有平均速率和突发速率控制的基于泛洪的路由协议 | |
CN102263630B (zh) | 一种时钟源的选择方法 | |
CN101999224B (zh) | 对虚拟专用lan业务的冗余的以太网自动保护切换接入 | |
CN101252494B (zh) | 业务负载分担的方法和设备 | |
WO2014101669A1 (zh) | 时间同步方法及系统 | |
ES2527834T3 (es) | Método y sistema de comunicaciones de empresa de servicios | |
US20180176131A1 (en) | Apparatus and methods of routing with control vectors in a synchronized adaptive infrastructure (sain) network | |
CN102970231B (zh) | 组播流转发实现方法和路由网桥(rb) | |
WO2013071807A1 (zh) | 一种多时钟同步技术混合组网的实现方法、系统和装置 | |
WO2013152700A1 (zh) | 微波网元的时钟源选择方法及装置 | |
WO2009059475A1 (en) | A method for clock link automatically protection in packet networks | |
WO2014059844A1 (zh) | 分布式弹性网络互连中网关动态切换方法和装置 | |
CN101577719B (zh) | 一种双机热备方法、装置和系统 | |
CN102638389A (zh) | 一种trill网络的冗余备份方法及系统 | |
US9264314B2 (en) | Method, system, and switch for making bridge in MSTP join region | |
CN101753453A (zh) | 一种分组传送网环网的组网方法 | |
CN107615721B (zh) | 传输软件定义网络-逻辑链路聚合成员信令的系统和方法 | |
CN101800774A (zh) | 一种接入环保护方法及接入环保护网络 | |
JP2012529805A5 (zh) | ||
CN102946305B (zh) | 一种链路状态协议数据单元的同步方法和设备 | |
WO2013178097A1 (zh) | 一种通告方法、装置及系统 | |
WO2012071909A1 (zh) | 业务恢复方法及装置 | |
WO2012062097A1 (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: 13807709 Country of ref document: EP Kind code of ref document: A2 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 13807709 Country of ref document: EP Kind code of ref document: A2 |