CN102664726B - Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches - Google Patents

Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches Download PDF

Info

Publication number
CN102664726B
CN102664726B CN201210126335.9A CN201210126335A CN102664726B CN 102664726 B CN102664726 B CN 102664726B CN 201210126335 A CN201210126335 A CN 201210126335A CN 102664726 B CN102664726 B CN 102664726B
Authority
CN
China
Prior art keywords
bfd
clockwork
clock equipment
probe messages
time interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210126335.9A
Other languages
Chinese (zh)
Other versions
CN102664726A (en
Inventor
康达祥
饶飞
徐俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210126335.9A priority Critical patent/CN102664726B/en
Publication of CN102664726A publication Critical patent/CN102664726A/en
Priority to PCT/CN2012/081891 priority patent/WO2013159486A1/en
Application granted granted Critical
Publication of CN102664726B publication Critical patent/CN102664726B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0641Change of the master or reference, e.g. take-over or failure of the master

Landscapes

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

Abstract

The invention discloses a kind of method that clock synchronization compliant with precision time protocol source switches, when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork; Receive the BFD negotiation of authorization message that clock equipment sends, according to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission; When time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source.The detectivity from clockwork can be improved.

Description

Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches
Technical field
The present invention relates to communication technical field, be specifically related to method, master-salve clock equipment and system that a kind of clock synchronization compliant with precision time protocol source switches.
Background technology
Communication equipment needs to carry out synchronous in order to collaborative work, synchronously can be divided into Frequency Synchronization and time synchronized, different communication systems has different synchronisation requirement: as common SDH (Synchronous Digital Hierarchy) (SDH, Synchronous Digital Hierarchy) be a Frequency Synchronization system, require that the frequency between different network elements will synchronously be got up, to ensure the normal transmission of SDH business; And TD SDMA (TD-SCDMA, Time Division-Synchronous Code Division Multiple Access) be a clock synchronization system, require that the time between adjacent base station will synchronously get up, to ensure normal work of eating dishes without rice or wine.
" the precise clock synchronization consensus standard of network measure and control system ", namely IEEE1588, full name is " IEEE Standard for a Precision Clock Synchronization Protocol forNetworked Measurement and Control Systems ", compare early stage Network Time Protocol (NTP, Network Time Protocol), IEEE1588 agreement has higher clock accuracy, NTP can only provide Millisecond precision, and IEEE1588 can realize the time synchronized of submicrosecond class precision.
IEEE1588 realizes as follows from the process of clockwork and clock equipment time synchronized:
1, clock equipment sends sync message to from clockwork in the t1 moment, and is carried in sync message by t1 timestamp;
2, from clockwork at t2 reception to sync message, produce t2 timestamp in this locality, and from sync message, extract t1 timestamp;
3, from clockwork at t3 moment transmission lag request message, and produce t3 timestamp in this locality;
4, clock equipment is at t4 reception to delay request message, and produces t4 timestamp in this locality, is then carried in delayed response message by t4 timestamp, returns to from clockwork;
5, receive delayed response message from clockwork, from message, extract t4 timestamp.
Suppose that clock equipment is Delayms to the transmit path time delay from clockwork, the transmit path time delay from clockwork to clock equipment is Delaysm, is Offset from the time deviation between clockwork and clock equipment.Obviously, these 3 variablees are all unknown numbers, so:
T2-t1=Delayms+Offset.......... equation 1;
T4-t3=Delaysm-Offset........... equation 2;
(t2-t1)-(t4-t3)=(Delayms+Offset)-(Delaysm-Offset) ... equation 3;
Offset=[(t2-t1)-(t4-t3)-(Delayms-Delaysm)]/2...... equation 4;
Obviously, if Delayms=Delaysm, i.e. clock equipment and symmetrical from the receiving-transmitting chain time delay between clockwork, so:
Offset=[(t2-t1)-(t4-t3)]/2...... equation 5;
Just can calculate time deviation Offset between oneself and clock equipment according to t1, t2, t3, t4 tetra-timestamps from clockwork like this, adjust the time of self to reach and clock equipment time synchronized.
Before realizing time synchronized, first clock source will be selected from clock, set up master slave relation, first initiate Announce to clock equipment from clockwork by request notice (Announce-request) message in prior art to consult, whether clock equipment decision gives from clockwork mandate, if authorized, then clock equipment starts to send Announce message to from clockwork, Announce message interval and the Announce authorization of messages cycle (Announce Duration Interval) of clock equipment mandate can be obtained from authorization notification (Announce-grant) message from clockwork.Judge whether clock equipment exists from clockwork according to whether Announce message can be received, if continuous three times can not receive Announce message, then think that clock equipment breaks down, after searching out best master clock equipment from clockwork, from clockwork switching clock source.
To in the research and practice process of prior art, the present inventor finds, clock equipment of the prior art only according to the transmission Announce message in preset (as 1S) cycle in the time interval to from clockwork, just an Announce message is detected every 1S from clockwork, have a lot from clockwork in network, the detectivity of each Announce message from clockwork is different, be directed to detectivity strong from clockwork (as detected a message in every 0.1 second), scheme 1S conventionally detects an Announce message, reduce the detectivity from clockwork.
Summary of the invention
A kind of method that the embodiment of the present invention provides clock synchronization compliant with precision time protocol source to switch, can improve the detectivity from clockwork.The embodiment of the present invention additionally provides corresponding master-salve clock equipment and system.
The method that precision interval clock agreement clock synchronization compliant with precision time protocol source switches, comprising:
When selecting clock synchronization compliant with precision time protocol source, sending the first two-way converting to clock equipment and detecting BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork;
Receive the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter;
According to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission;
The method that clock synchronization compliant with precision time protocol source switches, comprising:
Receive the BFD negotiation packet sent from clockwork, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork;
At least according to the very first time spacing parameter carried in a described BFD negotiation packet, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter;
A BFD negotiation of authorization message is sent from clockwork to described, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the periodically BFD probe messages that sends of detection clock equipment;
During normal work, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source.
A kind of from clockwork, comprising:
First transmitting element, for when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork;
First receiving element, for receiving the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter;
First probe unit, for receive a described BFD negotiation of authorization message at the first receiving element after, according to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission;
Clock source switch unit, for when time detection of continuous first numerical value of described first probe unit is less than described BFD probe messages, switches clock synchronization compliant with precision time protocol source.
A kind of clock equipment, comprising:
Second receiving element, for receiving the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting to send BFD probe messages from clockwork in a described BFD negotiation packet;
Negotiation element, for at least according to the very first time spacing parameter carried in a described BFD negotiation packet, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter;
Second transmitting element, for sending a BFD negotiation of authorization message to described from clockwork, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the BFD probe messages that periodic detection clock equipment sends, and when normally working, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source.
A kind of clock synchronization system, comprises from clockwork and clock equipment;
Described from clockwork for described in technique scheme from clockwork;
Described clock equipment for described in technique scheme from clockwork.
The embodiment of the present invention adopts when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork; Receive the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter; According to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission; When time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source.Be consider all receiving abilities from clockwork with clock equipment in prior art, what arranged in the time interval sending BFD probe messages compares very greatly, the method that the clock synchronization compliant with precision time protocol source that the embodiment of the present invention provides switches, can according to the receiving ability of self from clockwork, the very first time spacing parameter expecting to send BFD probe messages is sent to clock equipment, clock equipment is made to consider the described receiving ability from clockwork and the transmitting capacity of self, BFD probe messages is sent to from clockwork to be more than or equal to very first time spacing parameter, the detectivity from clockwork can be improved like this.
Accompanying drawing explanation
Fig. 1 is an embodiment schematic diagram of the method for the clock source switching that the embodiment of the present invention provides;
Fig. 2 is another embodiment schematic diagram of the method for the clock source switching that the embodiment of the present invention provides;
Fig. 3 is the embodiment schematic diagram of application scenarios in the embodiment of the present invention;
Fig. 4 is the embodiment schematic diagram from clockwork in the embodiment of the present invention;
Fig. 5 is another embodiment schematic diagram from clockwork in the embodiment of the present invention;
Fig. 6 is another embodiment schematic diagram from clockwork in the embodiment of the present invention;
Fig. 7 is an embodiment schematic diagram of clock equipment in the embodiment of the present invention;
Fig. 8 is another embodiment schematic diagram of clock equipment in the embodiment of the present invention;
Fig. 9 is an embodiment schematic diagram of the system that the embodiment of the present invention provides.
Embodiment
A kind of method that the embodiment of the present invention provides clock synchronization compliant with precision time protocol source to switch, can improve the detectivity from clockwork.The embodiment of the present invention also provides corresponding equipment and system.Below be described in detail respectively.
Consult Fig. 1, an embodiment of the method that the clock source that the embodiment of the present invention provides switches comprises:
101, from clockwork select clock synchronization compliant with precision time protocol source time, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork.
For realizing the time synchronized from clockwork and clock equipment, as the process of the maintenance master-salve clock equipment time synchronized in background technology, in fact, in a network, say for from clockwork, clock equipment is not unique, from clockwork according to best master clock algorithm (BMC, Best Master Clock) select the clock equipment with optimal clock source after, BFD negotiation packet is sent from clockwork to clock equipment, clock equipment determines to after providing master clock from clockwork, BFD negotiation of authorization message can be sent to from clockwork.
102, a BFD negotiation of authorization message of clock equipment transmission is received from clockwork, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter.
The time interval parameter that described clock equipment periodically sends BFD probe messages can be carried in BFD negotiation of authorization message, the time interval parameter of this clock equipment periodicity transmission BFD probe messages can be identical with very first time spacing parameter, also described very first time spacing parameter can be less than, when the transmitting capacity of clock equipment can reach the very first time spacing parameter of the detection BFD probe messages expected from clockwork, clock equipment can carry described very first time spacing parameter in BFD negotiation of authorization message, meet and expect from the detection of clockwork, when the transmitting capacity of clock equipment does not reach the expectation from clockwork, then according to the transmitting capacity of self, determine a transmission time interval parameter, this time interval parameter determined is carried in BFD negotiation of authorization message.In prior art, clock equipment is once after sending BFD negotiation of authorization message, BFD probe messages and synchronization message can be periodically sent according to time intervals that can receive from clockwork all in network, from the BFD probe messages that clockwork is sent by detection clock equipment, confirm that clock equipment does not break down, in normal operating state, in prior art, when detecting less than BFD probe messages for 3 times from clockwork is continuous, clock equipment will be switched, clock accurately can be obtained.
In fact, each ability from clockwork reception BFD probe messages is different, if clock equipment considers all receiving abilities from clockwork, what the time interval sending BFD probe messages will be arranged is very long, as 1S, may be 0.1S from the receiving ability of clockwork, can only could detect a message every 1S from clockwork like this.The technical scheme that the embodiment of the present invention provides, a BFD negotiation packet is sent from clockwork to clock equipment, the described very first time spacing parameter expecting to send BFD probe messages from clockwork is carried in a described BFD negotiation packet, when being 0.1S from the receiving ability of clockwork, just the time interval information of 0.1S is carried in a BFD negotiation packet, if the ability of clock equipment can reach the requirement from clockwork, BFD probe messages will be periodically sent to from clockwork according to the time interval of 0.1S, detect once from clockwork 0.1S, if the ability of clock equipment can not reach every 0.1S send a BFD probe messages, often can send a BFD probe messages by 0.15S, so just this time interval parameter is carried in BFD negotiation of authorization message, make to detect a BFD probe messages from clockwork 0.15S.
103, from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the periodically BFD probe messages that sends of detection clock equipment.
Receive a BFD negotiation of authorization message of clock equipment transmission from clockwork after, know that clock equipment can periodically send BFD probe messages to self with the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of clock equipment transmission is periodically detected, to confirm that described clock equipment is in normal operating state according to the time interval parameter carried in a BFD negotiation of authorization message.
When 104, detecting less than described BFD probe messages from continuous first numerical value of clockwork, switch clock synchronization compliant with precision time protocol source.
If detect the BFD probe messages of sending less than clock equipment from continuous first numerical value of clockwork, can think that clock equipment breaks down from clockwork, after choosing clock source, switch clock synchronization compliant with precision time protocol source.
It is described when time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source, specifically comprise: when time detection of continuous first numerical value is less than described BFD probe messages, source rule is selected according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource.
In prior art, the first numerical value is 3, when continuous 3 detections are less than BFD probe messages, will, according to BMC algorithm, select the clock equipment with optimal clock source to switch.A BFD probe messages is detected every 1S in prior art, continuous 3 times detection less than, also just need 3S to switch again, the method that the embodiment of the present invention provides, detect a message from clockwork every 0.1s, when continuous 3 detections are less than message, only need 0.3S just can carry out selecting source to switch, thus improve the detectivity from clockwork, improve the quality of clock synchronous, after switching clock source, the resource of original clock equipment can be discharged from clockwork.
When time detection of continuous first numerical value is less than described BFD probe messages, switches clock synchronization compliant with precision time protocol source, specifically comprise: when time detection of continuous first numerical value is less than described BFD probe messages, Sampling network flow; When the network traffics detected are less than preset threshold value, the 2nd BFD negotiation packet is sent to described clock equipment, the second time interval parameter is carried in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that a described BFD negotiation of authorization message carries, and makes described clock equipment send described BFD probe messages with the second time interval parameter; If receive the 2nd BFD negotiation of authorization message of described clock equipment transmission, then periodically detect the BFD probe messages of clock equipment transmission according to the second time interval parameter carried in described 2nd BFD negotiation of authorization message; If do not receive described 2nd BFD negotiation of authorization message, then select source rule according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource.
The scheme that the embodiment of the present invention provides, be not as of the prior art continuous 3 times detection less than BFD probe messages time, carry out clock equipment switching immediately, but Sampling network flow, may be that network congestion causes data transmission slack-off, when the network traffics detected are less than preset threshold value, the 2nd BFD negotiation packet is sent to described clock equipment from clockwork, the second time interval parameter is carried in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that a described BFD negotiation of authorization message carries, described clock equipment is made to send described BFD probe messages with the second time interval parameter, for example, if the time interval parameter 0.15S that a BFD negotiation of authorization message carries, second time interval parameter can be increased to 0.3S, if receive the 2nd BFD negotiation of authorization message that described clock equipment sends, illustrate that clock equipment obstacle does not occur, the data that just network congestion causes are transmitted slack-off, then periodically detect the BFD probe messages of clock equipment transmission according to the second time interval parameter carried in described 2nd BFD negotiation of authorization message, if do not receive the authorization notification of clock equipment from clockwork, illustrate that clock equipment obstacle may occur, then select source rule according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch.
Described when time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source, specifically comprise: when time detection of continuous first numerical value is less than described BFD probe messages, Sampling network flow; When the network traffics detected are more than or equal to preset threshold value, continue the described BFD probe messages of detection; When second value time detection is less than described BFD probe messages, source rule is selected according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource, described second value is greater than the first numerical value.
The technical scheme that the embodiment of the present invention provides, when detecting that network traffics are normal, illustrating that network does not block up, may be the instantaneous interruption of network, BFD probe messages is caused to be lost, this situation, can increase detection times, as originally detected 3 times, present detection 6 times, if 6 times also detect less than BFD probe messages, select source rule according to the best so again, select the clock equipment with optimal clock source outside described clock equipment to switch.
The scheme that the embodiment of the present invention provides, when after clockwork switching clock source, can discharge the resource of former clock source.
In the embodiment of the present invention, when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork; Receive the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter; According to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission; When time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source.Be consider all receiving abilities from clockwork with clock equipment in prior art, what arranged in the time interval sending BFD probe messages compares very greatly, the method of the message detection that the embodiment of the present invention provides, can according to the receiving ability of self from clockwork, the very first time spacing parameter expecting to send BFD probe messages is sent to clock equipment, clock equipment is made to consider the described receiving ability from clockwork and the transmitting capacity of self, BFD probe messages is sent to from clockwork to be more than or equal to very first time spacing parameter, the detectivity from clockwork can be improved like this, thus improve the quality of clock synchronous.
Alternatively, on the basis of above-described embodiment, can also comprise: send BFD message to clock equipment, make clock equipment periodically detect described BFD message, when continuous predetermined times detection is less than described BFD message, described clock equipment is discharged described from clockwork resource.
Consult Fig. 2, an embodiment of the method that the clock source that the embodiment of the present invention provides switches comprises:
201, clock equipment receives the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting to send BFD probe messages from clockwork in a described BFD negotiation packet.
In prior art, clock equipment is considered in network all from clockwork, BFD probe messages and synchronization message is periodically sent according to all time intervals that can receive from clockwork, the scheme that the embodiment of the present invention provides, clock equipment receives the BFD negotiation packet sent from clockwork, know from a described BFD negotiation packet from the receiving ability of clockwork be very first time spacing parameter, as 0.1S.
202, at least according to the very first time spacing parameter carried in a described BFD negotiation packet, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter.
After clock equipment receives a BFD negotiation packet, consult to send the time interval parameter of BFD probe messages from equipment to this according to the very first time spacing parameter carried in a BFD negotiation packet, when the transmitting capacity of clock equipment can reach the very first time spacing parameter of the detection BFD probe messages expected from clockwork, clock equipment can meet the expectation from clockwork, described very first time spacing parameter is carried in BFD negotiation of authorization message, meet and expect from the detection of clockwork, when the transmitting capacity of clock equipment does not reach the expectation from clockwork, then according to the transmitting capacity of self, determine a time interval parameter being greater than the transmission BFD probe messages of very first time spacing parameter, this time interval parameter determined is carried in BFD negotiation of authorization message.
203, a BFD negotiation of authorization message is sent to described from clockwork, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the periodically BFD probe messages that sends of detection clock equipment.
In the embodiment of the present invention, clock equipment receives the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting to send BFD probe messages from clockwork in a described BFD negotiation packet, after the transmitting capacity of clock equipment assessment self, if the described receiving ability from equipment can be reached, a BFD negotiation of authorization message is sent from clockwork to described, the time interval parameter of the periodicity transmission BFD probe messages of carrying in a described BFD negotiation of authorization message can be identical with very first time spacing parameter, if the transmitting capacity of clock equipment does not reach the described receiving ability from clockwork, the time interval parameter that the periodicity of so carrying in a described BFD negotiation of authorization message sends BFD probe messages is greater than very first time spacing parameter, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the BFD probe messages that periodic detection clock equipment sends.
When 204, normally working, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source.
Clock equipment with consult from clockwork BFD after, set up master slave relation, clock equipment is by sending BFD probe messages, make to pass through the described BFD probe messages of detection from clockwork, know that clock equipment operating state is normal, if clock equipment breaks down, so just cannot send described BFD probe messages again, like this, from clockwork detection less than described BFD probe messages, clock synchronization compliant with precision time protocol source can be switched.
Be consider all receiving abilities from clockwork with clock equipment in prior art, what arranged in the time interval sending BFD probe messages compares very greatly, the method of the message detection that the embodiment of the present invention provides, can according to the receiving ability of self from clockwork, the very first time spacing parameter expecting to send BFD probe messages is sent to clock equipment, when very first time spacing parameter is 0.1S, just the time interval information of 0.1S is carried in a BFD negotiation packet, if the ability of clock equipment can reach the requirement from clockwork, BFD probe messages will be periodically sent to from clockwork according to the time interval of 0.1S, detect once from clockwork 0.1S, if the ability of clock equipment can not reach every 0.1S send a BFD probe messages, can according to the ability of self, as every 0.15S sends a BFD probe messages, so just this time interval parameter 0.15S is carried in BFD negotiation of authorization message.Clock equipment can be avoided like this to consider all from clockwork, send BFD probe messages with the longer cycle, improve the detectivity from clockwork, thus improve the quality of clock synchronous.
Alternatively, on the basis of embodiment corresponding to above-mentioned Fig. 2, also comprise: receive described the 2nd BFD negotiation packet sent from clockwork, carry the second time interval parameter in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that described clock equipment periodically sends BFD probe messages; To described after clockwork transmission the 2nd BFD negotiation of authorization message, periodically send described BFD probe messages according to described second time interval parameter, described in making, know that described clock equipment is in normal operating state from clockwork.
When network congestion being detected from clockwork, the 2nd BFD negotiation packet can be sent to clock equipment, the second time interval parameter is carried in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that described clock equipment periodically sends BFD probe messages, if clock equipment is in normal operating conditions, can judge that the second time interval parameter is greater than the time interval parameter of the transmission BFD probe messages of self, thus the time interval parameter sending BFD probe messages can be revised as the second time interval parameter, then can send the 2nd BFD negotiation of authorization message to from clockwork, and the second time interval parameter is carried in described 2nd BFD negotiation of authorization message, then BFD probe messages is sent to from clockwork according to the second time interval parameter, described in making, know that described clock equipment is in normal operating state from clockwork.
Alternatively, on the basis of embodiment corresponding to above-mentioned Fig. 2, also comprise: detect the BFD message sent from clockwork; If predetermined times, detects less than described BFD message, then stop sending described BFD probe messages to described from clockwork continuously, and release is described from clockwork resource.
In prior art, clock equipment is once give after clockwork mandate, ceaselessly will send BFD probe messages to from clockwork, immediately have switched clock source from clockwork, clock equipment page also can continue to send, waste the resource of clock equipment like this, the message detection method that the embodiment of the present invention provides, clock equipment can detect the BFD message sent from clockwork, when in preset time, detection is less than described BFD message, then illustrate from clockwork switching clock source, then stop sending described BFD probe messages to described from clockwork.Thus save the resource of clock equipment.
For the ease of understanding, below for an embody rule scene, the method for the message detection that the detailed description embodiment of the present invention provides:
Consult Fig. 3, another embodiment of the method that the clock source that the embodiment of the present invention provides switches comprises:
301, send a BFD negotiation packet to clock equipment from clockwork, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting to send BFD probe messages from clockwork.
From clockwork when selecting clock source, first to send a BFD negotiation packet to clock equipment to clock equipment, and in a described BFD negotiation packet, carry the described very first time spacing parameter expecting to send BFD probe messages from clockwork.
302, clock equipment sends a BFD negotiation of authorization message to from clockwork.
Clock equipment determine to transmission the one BFD negotiation packet provide clock source from clockwork after, be sent to and send a BFD negotiation of authorization message from clockwork, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter.
303, the time interval parameter that carries according to a described BFD negotiation of authorization message of clock equipment, periodically sends BFD probe messages to from clockwork.
Periodically detect the BFD probe messages of clock equipment transmission according to the time interval parameter that a described BFD negotiation of authorization message carries from clockwork.
304a, the initiation time synchronized request from clockwork to clock equipment.
After setting up master slave relation from clockwork and clock equipment, just can time of origin synchronization request, the process that the message that the process of time synchronized and the embodiment of the present invention provide detects and clock source switches is independent of each other, just to could initiate time synchronized request after setting up master slave relation from clockwork and clock equipment, about the process of time synchronized, background technology can be consulted understand, no longer be described in detail at this.
304b, periodically send BFD message from clockwork to clock equipment.
305, when time detection of continuous first numerical value is less than described BFD probe messages, select source rule according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource.
306, when time detection of continuous first numerical value is less than described BFD probe messages, Sampling network flow.
307, when the network traffics detected are less than preset threshold value, the 2nd BFD negotiation packet is sent to described clock equipment, the second time interval parameter is carried in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that a described BFD negotiation of authorization message carries, and makes described clock equipment send described BFD probe messages with the second time interval parameter.
308, after clock equipment receives the 2nd BFD negotiation packet, the 2nd BFD negotiation of authorization message is sent to from clockwork.
309, clock equipment periodically sends BFD probe messages according to the second time interval parameter.
310, when the network traffics detected are more than or equal to preset threshold value, the described BFD probe messages of detection is continued.
311, clock equipment detection is from the BFD message of clockwork transmission, if in preset time, detects less than described BFD message, then stops sending described BFD probe messages to described from clockwork, and release is described from clockwork resource.
This application scene embodiment, can according to the receiving ability of self from clockwork, the very first time spacing parameter expecting to send BFD probe messages is sent to clock equipment, clock equipment is made to send BFD probe messages to from clockwork to be more than or equal to very first time spacing parameter, the detectivity from clockwork can be improved like this, thus improve the quality of clock synchronous.
Consult Fig. 4, what the embodiment of the present invention provided comprises from an embodiment of clockwork:
First transmitting element 401, for when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork;
First receiving element 402, for receiving the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter;
First probe unit 403, for receive a described BFD negotiation of authorization message at the first receiving element 402 after, according to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission;
Clock source switch unit 404, for when time detection of continuous first numerical value of described first probe unit 403 is less than described BFD probe messages, switches clock synchronization compliant with precision time protocol source.
In the embodiment of the present invention, first transmitting element 401 is when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork; First receiving element 402 receives the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter; First probe unit 403, after the first receiving element 402 receives a described BFD negotiation of authorization message, according to the time interval parameter carried in a described BFD negotiation of authorization message, periodically detects the BFD probe messages that clock equipment sends; Clock source switch unit 404, when time detection of continuous first numerical value of described first probe unit 403 is less than described BFD probe messages, switches clock synchronization compliant with precision time protocol source.Compared with prior art, the embodiment of the present invention provide from clockwork, the sensitivity of probe messages can be improved, thus improve the quality of clock synchronous.
On the basis of embodiment corresponding to above-mentioned Fig. 4, what the embodiment of the present invention provided also comprises from another embodiment of clockwork:
Described clock source switch unit 404, specifically for when time detection of continuous first numerical value of described first probe unit 403 is less than described BFD probe messages, source rule is selected according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource.
On the basis of embodiment corresponding to above-mentioned Fig. 4, consult Fig. 5, what the embodiment of the present invention provided also comprises from another embodiment of clockwork:
First detecting unit 405, for when time detection of continuous first numerical value of described first probe unit 403 is less than described BFD probe messages, Sampling network flow;
Described first transmitting element 401, also for when the network traffics that described first detecting unit 405 detects are less than preset threshold value, the 2nd BFD negotiation packet is sent to described clock equipment, the second time interval parameter is carried in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that a described BFD negotiation of authorization message carries, and makes described clock equipment send described BFD probe messages with the second time interval parameter;
Described first probe unit 403, also for receive when described first receiving element 402 described clock equipment send the 2nd BFD negotiation of authorization message time, according to the second time interval parameter carried in described 2nd BFD negotiation of authorization message periodically detect clock equipment send BFD probe messages;
Described clock source switch unit 404, specifically for do not receive when described first receiving element 402 described clock equipment send the 2nd BFD negotiation of authorization message time, source rule is selected according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource.
On the basis of embodiment corresponding to above-mentioned Fig. 4, consult Fig. 6, what the embodiment of the present invention provided also comprises from another embodiment of clockwork:
Second detecting unit 406, for when time detection of continuous first numerical value of described first probe unit 403 is less than described BFD probe messages, Sampling network flow;
Described first probe unit 403, also for when the network traffics that described second detecting unit 406 detects are more than or equal to preset threshold value, continues the described BFD probe messages of detection;
Described clock source switch unit 404, specifically for when time detection of described first probe unit 403 second value is less than described BFD probe messages, source rule is selected according to the best, the clock equipment with optimal clock source outside described clock equipment is selected to switch, and discharging described clock equipment resource, described second value is greater than the first numerical value.
On the basis of above-described embodiment, what the embodiment of the present invention provided also comprises from another embodiment of clockwork:
Described first transmitting element 401, also for sending BFD message to clock equipment, make clock equipment periodically detect described BFD message, when continuous predetermined times detection is less than described BFD message, described clock equipment is discharged described from clockwork resource.
The multiple embodiment of the present invention provide from clockwork, the sensitivity of probe messages can be improved, thus improve the quality of clock synchronous.
Consult Fig. 7, an embodiment of the clock equipment that the embodiment of the present invention provides comprises:
Second receiving element 501, for receiving the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting to send BFD probe messages from clockwork in a described BFD negotiation packet;
Negotiation element 502, for the very first time spacing parameter carried in the BFD negotiation packet that at least receives according to described second receiving element 501, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter;
Second transmitting element 503, after determining that at described negotiation element 502 periodicity sends the time interval parameter of BFD probe messages, a BFD negotiation of authorization message is sent from clockwork to described, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the BFD probe messages that periodic detection clock equipment sends, and when normally working, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source.
In the embodiment of the present invention, the second receiving element 501 receives the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting to send BFD probe messages from clockwork in a described BFD negotiation packet, the very first time spacing parameter carried in the BFD negotiation packet that negotiation element 502 at least receives according to described second receiving element 501, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter, second transmitting element 503 is after described negotiation element 502 determines the time interval parameter of periodically transmission BFD probe messages, a BFD negotiation of authorization message is sent from clockwork to described, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the BFD probe messages that periodic detection clock equipment sends, and when normally working, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source.Compared with prior art, the clock equipment that the embodiment of the present invention provides, sends BFD probe messages to from clockwork according to very first time spacing parameter, can improve the sensitivity of probe messages, thus improve the quality of clock synchronous.
On the basis of embodiment corresponding to above-mentioned Fig. 7, what the embodiment of the present invention provided also comprises from another embodiment of clockwork:
Described second receiving element 501, also for receiving described the 2nd BFD negotiation packet sent from clockwork, carry the second time interval parameter in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that described clock equipment periodically sends BFD probe messages;
Described negotiation element 502, also at least according to the second time interval parameter carried in described 2nd BFD negotiation packet, determines that the time interval parameter of described clock equipment periodicity transmission BFD probe messages is the second time interval parameter;
Described second transmitting element 503, also for determine periodically to send BFD probe messages at described negotiation element 502 time interval parameter after, send the 2nd BFD negotiation of authorization message to described from clockwork, periodically send described BFD probe messages according to described second time interval parameter.
On the basis of the embodiment of above-mentioned Fig. 7, consult Fig. 8, another embodiment of the clock equipment that the embodiment of the present invention provides also comprises:
Second probe unit 504, for detecting the BFD message sent from clockwork;
Resource releasing unit 505, at described second probe unit 504 predetermined times continuously, when detecting less than described BFD message, stop sending described BFD probe messages to described from clockwork, and release is described from clockwork resource.
The embodiment of the present invention provide from clockwork, can detect and whether exist from clockwork, when not existing from clockwork, stop sending BFD probe messages to from clockwork, thus saving the resource of clock equipment.
Consult Fig. 9, the clock synchronization system that the embodiment of the present invention provides, comprise from clockwork 40 and clock equipment 50;
Described from clockwork 40, for when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork; Receive the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter; According to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission; When time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source.
Described clock equipment 50, for receiving the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork in a described BFD negotiation packet; At least according to the very first time spacing parameter carried in a described BFD negotiation packet, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter; A BFD negotiation of authorization message is sent from clockwork to described, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the periodically BFD probe messages that sends of detection clock equipment; During normal work, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Method, equipment and system that the clock synchronization compliant with precision time protocol source provided the embodiment of the present invention above switches are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (9)

1. a method for precision interval clock agreement clock synchronization compliant with precision time protocol source switching, is characterized in that, comprising:
From clockwork when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork;
The described BFD negotiation of authorization message receiving the transmission of described clock equipment from clockwork, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter;
Described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the periodically BFD probe messages that sends of the described clock equipment of detection;
Described from clockwork when continuous first numerical value time detection is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source;
Described when time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source, specifically comprise:
When time detection of continuous first numerical value is less than described BFD probe messages, Sampling network flow;
When the network traffics detected are less than preset threshold value, the 2nd BFD negotiation packet is sent to described clock equipment, the second time interval parameter is carried in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that a described BFD negotiation of authorization message carries, and makes described clock equipment send described BFD probe messages with the second time interval parameter;
If receive the 2nd BFD negotiation of authorization message of described clock equipment transmission, then periodically detect the BFD probe messages of clock equipment transmission according to the second time interval parameter carried in described 2nd BFD negotiation of authorization message;
If do not receive described 2nd BFD negotiation of authorization message, then select source rule according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource;
Or,
Described when time detection of continuous first numerical value is less than described BFD probe messages, switch clock synchronization compliant with precision time protocol source, specifically comprise:
When time detection of continuous first numerical value is less than described BFD probe messages, Sampling network flow;
When the network traffics detected are more than or equal to preset threshold value, continue the described BFD probe messages of detection;
When second value time detection is less than described BFD probe messages, source rule is selected according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource, described second value is greater than the first numerical value.
2. method according to claim 1, is characterized in that, also comprises:
Send BFD message to clock equipment, make clock equipment periodically detect described BFD message, when continuous predetermined times detection is less than described BFD message, described clock equipment is discharged described from clockwork resource.
3. a method for clock synchronization compliant with precision time protocol source switching, is characterized in that, comprising:
Clock equipment receives the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork in a described BFD negotiation packet;
Described clock equipment is at least according to the very first time spacing parameter carried in a described BFD negotiation packet, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter;
Described clock equipment sends a BFD negotiation of authorization message to described from clockwork, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the periodically BFD probe messages that sends of detection clock equipment;
When described clock equipment normally works, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source;
The described time interval parameter according to carrying in a described BFD negotiation of authorization message, to described periodically send BFD probe messages from clockwork after, also comprise:
Receive described the 2nd BFD negotiation packet sent from clockwork, carry the second time interval parameter in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that described clock equipment periodically sends BFD probe messages;
At least according to the second time interval parameter carried in described 2nd BFD negotiation packet, determine that the time interval parameter of described clock equipment periodicity transmission BFD probe messages is the second time interval parameter;
To described from clockwork send carry the 2nd BFD negotiation of authorization message of described second time interval parameter after, periodically send described BFD probe messages according to described second time interval parameter.
4. method according to claim 3, is characterized in that, also comprises:
Detect the BFD message sent from clockwork;
If predetermined times, detects less than described BFD message, then stop sending described BFD probe messages to described from clockwork continuously, and release is described from clockwork resource.
5. from a clockwork, it is characterized in that, comprising:
First transmitting element, for when selecting clock synchronization compliant with precision time protocol source, send the first two-way converting to clock equipment and detect BFD negotiation packet, in a described BFD negotiation packet, carry the described very first time spacing parameter expecting described clock equipment transmission BFD probe messages from clockwork;
First receiving element, for receiving the BFD negotiation of authorization message that clock equipment sends, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, and the time interval parameter that a described BFD negotiation of authorization message carries is more than or equal to described very first time spacing parameter;
First probe unit, for receive a described BFD negotiation of authorization message at the first receiving element after, according to the time interval parameter carried in a described BFD negotiation of authorization message, the BFD probe messages of periodically detection clock equipment transmission;
Clock source switch unit, for when time detection of continuous first numerical value of described first probe unit is less than described BFD probe messages, switches clock synchronization compliant with precision time protocol source;
Describedly also to comprise from clockwork: the first detecting unit,
Described first detecting unit, for when time detection of continuous first numerical value of described first probe unit is less than described BFD probe messages, Sampling network flow;
Described first transmitting element, also for when the network traffics that described first detecting unit detects are less than preset threshold value, the 2nd BFD negotiation packet is sent to described clock equipment, the second time interval parameter is carried in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that a described BFD negotiation of authorization message carries, and makes described clock equipment send described BFD probe messages with the second time interval parameter;
Described first probe unit, also for receive when described first receiving element described clock equipment send the 2nd BFD negotiation of authorization message time, according to the second time interval parameter carried in described 2nd BFD negotiation of authorization message periodically detect clock equipment send BFD probe messages;
Described clock source switch unit, specifically for do not receive when described first receiving element described clock equipment send the 2nd BFD negotiation of authorization message time, source rule is selected according to the best, select the clock equipment with optimal clock source outside described clock equipment to switch, and discharge described clock equipment resource;
Or,
Describedly also to comprise from clockwork: the second detecting unit,
Described second detecting unit, for when time detection of continuous first numerical value of described first probe unit is less than described BFD probe messages, Sampling network flow;
Described first probe unit, also for when the network traffics that described second detecting unit detects are more than or equal to preset threshold value, continues the described BFD probe messages of detection;
Described clock source switch unit, specifically for when time detection of described first probe unit second value is less than described BFD probe messages, source rule is selected according to the best, the clock equipment with optimal clock source outside described clock equipment is selected to switch, and discharging described clock equipment resource, described second value is greater than the first numerical value.
6. according to claim 5 from clockwork, it is characterized in that,
Described first transmitting element, also for sending BFD message to clock equipment, makes clock equipment periodically detect described BFD message, when continuous predetermined times detection is less than described BFD message, described clock equipment is discharged described from clockwork resource.
7. a clock equipment, is characterized in that, comprising:
Second receiving element, for receiving the BFD negotiation packet sent from clockwork, carries the described very first time spacing parameter expecting to send BFD probe messages from clockwork in a described BFD negotiation packet;
Negotiation element, for at least according to the very first time spacing parameter carried in a described BFD negotiation packet, determine that described clock equipment periodically sends the time interval parameter of BFD probe messages, wherein said time interval parameter is more than or equal to described very first time spacing parameter;
Second transmitting element, for sending a BFD negotiation of authorization message to described from clockwork, a described BFD negotiation of authorization message carries the time interval parameter that described clock equipment periodically sends BFD probe messages, make described from clockwork according to the time interval parameter carried a described BFD negotiation of authorization message, the BFD probe messages that periodic detection clock equipment sends, and when normally working, according to the time interval parameter carried in a described BFD negotiation of authorization message, BFD probe messages is periodically sent from clockwork to described, when breaking down, stop sending described BFD probe messages, detect less than described BFD probe messages from clockwork described in making, switch clock synchronization compliant with precision time protocol source,
Described second receiving element, also for receiving described the 2nd BFD negotiation packet sent from clockwork, carry the second time interval parameter in described 2nd BFD negotiation packet, described second time interval parameter is greater than the time interval parameter that described clock equipment periodically sends BFD probe messages;
Described negotiation element, also at least according to the second time interval parameter carried in described 2nd BFD negotiation packet, determines that the time interval parameter of described clock equipment periodicity transmission BFD probe messages is the second time interval parameter;
Described second transmitting element, also for described from clockwork send carry the 2nd BFD negotiation of authorization message of the second time interval parameter after, periodically send described BFD probe messages according to described second time interval parameter.
8. clock equipment according to claim 7, is characterized in that, also comprises:
Second probe unit, for detecting the BFD message sent from clockwork;
Resource releasing unit, at the continuous predetermined times of described second probe unit, when detecting less than described BFD message, stops sending described BFD probe messages to described from clockwork, and release is described from clockwork resource.
9. a clock synchronization system, is characterized in that, comprises from clockwork and clock equipment;
Described from clockwork for described in the claims 5 or 6 from clockwork;
Described clock equipment is the clock equipment described in the claims 7 or 8.
CN201210126335.9A 2012-04-26 2012-04-26 Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches Expired - Fee Related CN102664726B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210126335.9A CN102664726B (en) 2012-04-26 2012-04-26 Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches
PCT/CN2012/081891 WO2013159486A1 (en) 2012-04-26 2012-09-25 Ptp clock source switching method, and master and slave clock devices and systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210126335.9A CN102664726B (en) 2012-04-26 2012-04-26 Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches

Publications (2)

Publication Number Publication Date
CN102664726A CN102664726A (en) 2012-09-12
CN102664726B true CN102664726B (en) 2015-08-05

Family

ID=46774147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210126335.9A Expired - Fee Related CN102664726B (en) 2012-04-26 2012-04-26 Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches

Country Status (2)

Country Link
CN (1) CN102664726B (en)
WO (1) WO2013159486A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102664726B (en) * 2012-04-26 2015-08-05 华为技术有限公司 Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches
CN105024798A (en) * 2014-04-28 2015-11-04 中兴通讯股份有限公司 Method and device for time synchronization
CN103957258B (en) * 2014-04-30 2018-06-15 中国工商银行股份有限公司 A kind of transregional data communications method and system
CN104602264B (en) * 2015-01-05 2018-01-16 华为技术有限公司 A kind of method, apparatus and system for promoting control point discovering device
US9912693B1 (en) 2015-04-06 2018-03-06 Sprint Communications Company L.P. Identification of malicious precise time protocol (PTP) nodes
CN106549822B (en) * 2015-09-16 2019-12-06 中国移动通信集团公司 Method and device for testing response time of time synchronization message and test equipment
CN107612772B (en) * 2017-09-07 2020-12-04 银清科技有限公司 Node state detection method and device of payment system
CN112073264B (en) * 2020-08-31 2022-09-02 新华三信息安全技术有限公司 Protocol detection method, device and network equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795216A (en) * 2010-01-25 2010-08-04 中兴通讯股份有限公司 Method and equipment for resetting watch dog in multi-hop bidirectional forwarding detection (BFD)
CN101800676A (en) * 2010-02-20 2010-08-11 中兴通讯股份有限公司 Link detection method, device and system
CN102347814A (en) * 2011-10-11 2012-02-08 上海电力学院 Slave clock regulation method based on master clock frequency difference

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394264B (en) * 2007-09-21 2012-01-25 华为技术有限公司 Monitoring method and device for periodically packet transmission
CN101237452B (en) * 2008-02-20 2012-04-18 杭州华三通信技术有限公司 Transmission method, system and device for bidirectional forward detection report
US8446896B2 (en) * 2010-04-21 2013-05-21 Lsi Corporation Time synchronization using packet-layer and physical-layer protocols
CN102664726B (en) * 2012-04-26 2015-08-05 华为技术有限公司 Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795216A (en) * 2010-01-25 2010-08-04 中兴通讯股份有限公司 Method and equipment for resetting watch dog in multi-hop bidirectional forwarding detection (BFD)
CN101800676A (en) * 2010-02-20 2010-08-11 中兴通讯股份有限公司 Link detection method, device and system
CN102347814A (en) * 2011-10-11 2012-02-08 上海电力学院 Slave clock regulation method based on master clock frequency difference

Also Published As

Publication number Publication date
CN102664726A (en) 2012-09-12
WO2013159486A1 (en) 2013-10-31

Similar Documents

Publication Publication Date Title
CN102664726B (en) Method, master-salve clock equipment and system that clock synchronization compliant with precision time protocol source switches
EP3016306B1 (en) Method and apparatus for providing in-vehicle network time synchronization using redundant grandmaster
US20170150464A1 (en) Communication apparatus, time synchronizing method, and non-transitory computer-readable storage medium
US9813175B2 (en) Method for detecting timing references affected by a change in path delay asymmetry between nodes in a communication network
CN105262555B (en) Time synchronization method, programmable logic device, single board and network element
US9900120B2 (en) Clock synchronization method and apparatus
CN106899370A (en) A kind of clock chain circuit changing method, device and base station
WO2016078349A1 (en) Data transmission method, communication device, and communication system
CN105577348B (en) Frequency deviation monitoring method and device based on time synchronization network
JP5736550B1 (en) Base station equipment
WO2021082674A1 (en) Time synchronization method, communication device, and system
CN103067111A (en) Method and device of clock synchronization
JP2010004321A (en) Time tracking system and time tracking apparatus
EP2628274B1 (en) Reducing continuity check message (ccm) bursts in connectivity fault management (cfm) maintenance association (ma)
CN110601786B (en) Time synchronization method, relay equipment and device
JP2015188152A (en) Slave node, control server, time synchronization destination determination method, and computer program
CN110620630B (en) Time synchronization method, device, network equipment and computer readable storage medium
JP2007174357A (en) Communication system, communication device, management device, and synchronous signal control method
EP3276898B1 (en) Resource switching method and apparatus
CN106330421B (en) Method and device for realizing frequency synchronization
JP6274918B2 (en) Communications system
CN102664697A (en) Network clock synchronization system and method thereof
CN103178919B (en) The method and the network equipment of convergence master clock source
JP5842102B2 (en) Communication apparatus, communication system, and network status determination method
JP2010219850A (en) Method for switching synchronization timing source of transmission communication device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150805

Termination date: 20180426