CN103312429A - Time synchronization method and time synchronization device - Google Patents

Time synchronization method and time synchronization device Download PDF

Info

Publication number
CN103312429A
CN103312429A CN2013102309509A CN201310230950A CN103312429A CN 103312429 A CN103312429 A CN 103312429A CN 2013102309509 A CN2013102309509 A CN 2013102309509A CN 201310230950 A CN201310230950 A CN 201310230950A CN 103312429 A CN103312429 A CN 103312429A
Authority
CN
China
Prior art keywords
port
physical member
ptp
aggregation
function
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.)
Granted
Application number
CN2013102309509A
Other languages
Chinese (zh)
Other versions
CN103312429B (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.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201310230950.9A priority Critical patent/CN103312429B/en
Publication of CN103312429A publication Critical patent/CN103312429A/en
Application granted granted Critical
Publication of CN103312429B publication Critical patent/CN103312429B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a time synchronization method and a time synchronization device. The time synchronization method includes that home terminal equipment enables a PTP (precision time protocol) function for aggregation ports, active ports are selected from physical member ports of the aggregation ports, and the PTP function is configured for the active ports; role information is exchanged between the home terminal equipment and PTP opposite terminal equipment, and the active ports are configured by the aid of the determined role information; the home terminal equipment performs time synchronization via the active ports and active ports of the opposite terminal equipment. The time synchronization method and the time synchronization device have the advantages that time synchronization on the basis of the aggregation ports is implemented, and time synchronization between the home terminal equipment and the opposite terminal equipment is implemented; the PTP function is directly enabled on the aggregation ports, so that configuration is simplified for users, consumption of equipment resources is reduced, the performance of the equipment is improved, and the network topology stability is enhanced.

Description

A kind of method for synchronizing time and device
Technical field
The application relates to communication technical field, relates in particular to a kind of method for synchronizing time and device.
Background technology
In existing communication network, the normal operation of many business all requires network clocking synchronous, be that time or difference on the frequency between each equipment of whole network remains in the rational error level, for time synchronized wherein, that usually adopts is based on PTP(Precision Time Protocol, Precision Time Protocol) time synchronized of agreement, for a pair of clock node of phase mutually synchronization, there is master slave relation, but this master slave relation is relative, below this master slave relation is done specific explanations: host node (Master Node) is the issue clock node of lock in time, clock on it is called master clock (Master Clock), otherwise, be the clock node that receives lock in time from node (Slave Node), the clock on it is called from clock (Slave Clock); For the PTP port of issuing lock in time on the clock node, usually be referred to as main (Master) port, the PTP port that receives lock in time then is called as the port from (Slave), in addition, also exist a kind of neither issue also not receive the PTP port of lock in time, be called passive (Passive) port.
Time synchronized based on the PTP agreement, its principle is: the transmitting-receiving time of synchronisation message and recording messages between the master and slave clock, calculating always coming and going between the master and slave clock by the round time difference of calculating message delays time, if network is symmetrical (transmission delay that is both direction is identical), be exactly Zong then come and go half one-way delay of time-delay, this one-way delay is the clock jitter between the master and slave clock, adjust local zone time from clock according to this deviation, just can realize itself and master clock synchronously.The PTP protocol definition two kinds of propagation delay measurement mechanisms: request-reply (Requset_Response) mechanism and end time-delay (Peer Delay) mechanism, and these two kinds of mechanism all with network to being called prerequisite.
Various message for the PTP synchronous interaction, can be according to whether needing response time stamp event to be divided into two classes, one class is that the PTP event message (comprising: synchronous (Sync) message, end time-delay request (PDelay_Req) message, time-delay request (Delay_Req) message, end delayed response (PDelay_Resp) message); One class is the non-event message of PTP (comprising: declaration (Announce) message, follow-up (Follow_Up) message, delayed response (Delay_Resp) message, end delayed response follow-up (PDelay_Resp_Follow_Up) message); Wherein, the PTP event message needs the response time to stab event, and this needs the support of interface board chip just can finish logging timestamp, otherwise this interface board can not be supported the PTP protocol function.
For the PTP agreement owing to need special hardware as support, so more special, below in the elaboration prior art based on the time synchronized scheme of PTP agreement.
As shown in Figure 1, for the host node of two support PTP functions with from node, in order to make the PTP time synchronized of two equipment that backup link be arranged, must respectively 4 ports all be enabled PTP, after all configurations are all configured, have following situation: 4 ports on the host node all are master port, are used for issuing time; Be from port from the port one of node, be used for from the host node device synchronization time that port 2 to 4 all is passive port, be the backup port from the port one of node, neither also asynchronous time of issuing time.
When the port one place link from node breaks down, can carry out the port role election again from node, from remaining passive port, select again one according to qualifications port as new from port, issue PTP message from port and carry out time synchronized by new then.
In the process that realizes the application, the inventor finds to exist at least in the prior art following problem:
1) owing to need be 4 member ports configuration PTP functions simultaneously, and each port all needs to carry out interacting message, and is therefore inconvenient in configuration, and can cause the very big consumption of device resource; 2) when the SLAVE port goes wrong, meeting originating port role re-elects, and causes topological structure stable inadequately.
Summary of the invention
The purpose of the embodiment of the present application is to provide method for synchronizing time and a kind of time synchronism apparatus, need carry out the excessive problem of device resource consumption that the PTP functional configuration is caused at each member port to solve in the prior art.
In order to achieve the above object, the embodiment of the present application provides a kind of method for synchronizing time, comprising:
Local terminal equipment is that aggregation port enables the PTP function, chooses the activation port from the physical member port of described aggregation port, and is described activation port arrangement PTP function;
It is mutual that local terminal equipment and PTP opposite equip. carry out Role Information, utilizes the Role Information of determining to dispose described activation port;
Local terminal equipment carries out time synchronized by the activation port of described activation port and described opposite equip..
Preferably, local terminal equipment is that described aggregation port enables further to comprise after the PTP function:
Described local terminal equipment is judged the physical member port quantity of described aggregation port;
When described physical member port is two when above, after the physical member port of described aggregation port is chosen the activation port, further choose backup port other physical member port beyond described activation port, be described backup port configuration PTP function, and after determining Role Information with opposite equip., dispose described backup port according to the Role Information of determining;
When described physical member port is zero, do not do any processing.
Preferably, when the aggregation port that enables the PTP function added physical member port, described method comprised:
Described local terminal equipment is judged current physical member port quantity on this aggregation port that enables the PTP function;
When described current physical member port quantity is two when above, do not do any processing;
When described current physical member port quantity was one, the physical member port of choosing interpolation was backup port, was its configuration PTP function and Role Information;
When described current physical member port quantity is zero, choose the physical member port of this interpolation for activating port, be its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information of determining to dispose described activation port, and carry out time synchronized by the activation port of described activation port and opposite equip..
Preferably, when the physical member port of the aggregation port that enables the PTP function withdrawed from, described method comprised:
Described local terminal equipment obtains the port status of the described physical member port that withdraws from;
When the described physical member port that withdraws from is common physical member port, do not do any processing;
When the described physical member port that withdraws from is backup port, remove PTP function and the Role Information of the described physical member port that withdraws from, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that withdraws from is when activating port, remove PTP function and the Role Information of the described physical member port that withdraws from, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
Preferably, when the physical member port of the aggregation port that enables the PTP function broke down, described method comprised:
Described local terminal equipment obtains the port status of the described physical member port that breaks down;
When the described physical member port that breaks down is common physical member port, do not do any processing;
When the described physical member port that breaks down is backup port, remove PTP function and the Role Information of the described physical member port that breaks down, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that breaks down is when activating port, remove PTP function and the Role Information of the described physical member port that breaks down, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
Preferably,
Utilize Role Information to determine that the aggregation port of local terminal equipment is Master port or Slave port;
When the aggregation port of local terminal equipment is the Master port, it is the Master port that local terminal equipment disposes described activation port, described local terminal equipment is by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain timestamp information in the mutual message of described PTP by described opposite equip., utilize described timestamp information to carry out time synchronized;
When the aggregation port of local terminal equipment is the Slave port, it is the Slave port that local terminal equipment disposes described activation port, described local terminal equipment receives the mutual message of PTP that opposite equip. sends by corresponding activation port by described activation port, obtain the timestamp information that carries in the described PTP message, utilize described timestamp information to carry out time synchronized.
The embodiment of the present application provides a kind of time synchronism apparatus, comprising:
The configuration process module is used to aggregation port to enable the PTP function, chooses the activation port from the physical member port of described aggregation port, and is described activation port arrangement PTP function;
The interaction process module is used for that to carry out Role Information mutual with the PTP opposite equip., utilizes the Role Information of determining to dispose described activation port;
Synchronous processing module is used for carrying out time synchronized by the activation port of described activation port and described opposite equip..
Preferably, also comprise:
Judge module is for the physical member port quantity of judging described aggregation port;
Described configuration process module module, concrete be used for when described physical member port be two when above, after the physical member port of described aggregation port is chosen the activation port, further choose backup port other physical member port beyond described activation port, be described backup port configuration PTP function, and after described interaction process module and opposite equip. are determined Role Information, dispose described backup port according to the Role Information of determining; When described physical member port is zero, only enable the PTP function for aggregation port.
Preferably, when the aggregation port that enables the PTP function adds physical member port,
Described judge module also is used for judging current physical member port quantity on this aggregation port that enables the PTP function;
Described configuration process module, be used for when described current physical member port quantity be two when above, do not do any processing;
When described current physical member port quantity was one, the physical member port of choosing interpolation was backup port, was its configuration PTP function and Role Information;
When described current physical member port quantity is zero, choose the physical member port of this interpolation for activating port, be its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information of determining to dispose described activation port, and carry out time synchronized by the activation port of described activation port and opposite equip..
Preferably, when the physical member port of the aggregation port that enables the PTP function withdraws from,
Described judge module is also for the port status that obtains the described physical member port that withdraws from;
Described configuration process module is used for not doing any processing when the described physical member port that withdraws from is common physical member port;
When the described physical member port that withdraws from is backup port, remove PTP function and the Role Information of the described physical member port that withdraws from, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that withdraws from is when activating port, remove PTP function and the Role Information of the described physical member port that withdraws from, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
Preferably, when the physical member port of the aggregation port that enables the PTP function breaks down,
Described judge module is also for the port status that obtains the described physical member port that breaks down;
Described configuration process module is used for not doing any processing when the described physical member port that breaks down is common member port;
When the described physical member port that breaks down is backup port, remove PTP function and the Role Information of the described physical member port that breaks down, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that breaks down is when activating port, remove PTP function and the Role Information of the described physical member port that breaks down, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
Preferably,
Described interaction process module, concrete being used for utilizes Role Information to determine that the aggregation port of local terminal equipment is Master port or Slave port, when described aggregation port is the Master port, disposing described activation port is the Master port, when described aggregation port was the Slave port, disposing described activation port was the Slave port;
Described synchronous processing module, concrete being used for when described aggregation port is the Master port, by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain timestamp information in the mutual message of described PTP by described opposite equip., utilize described timestamp information to carry out time synchronized;
When described aggregation port is the Slave port, receive opposite equip. by the mutual message of PTP that corresponding activation port sends by described activation port, obtain the timestamp information that carries in the described PTP message, utilize described timestamp information to carry out time synchronized.
Compared with prior art, the technical scheme that proposes of the embodiment of the present application has the following advantages:
Proposition by the application's scheme, realized the time synchronized based on aggregation port, reached the time synchronized with opposite equip., and by directly enabling the PTP function at aggregation port, simplified user's configuration, reduce the consumption of device resource, improved equipment performance, strengthened the stability of network topology.
Description of drawings
Fig. 1 is the topological structure figure that realizes backup in the prior art;
Fig. 2 is the schematic flow sheet of the time synchronized that provides of the embodiment of the present application;
Fig. 3 is the handling process schematic diagram when the aggregation port that enables the PTP function adds physical member port that the embodiment of the present application one provides;
Fig. 4 is the physical member port when the aggregation port that enables the PTP function that the embodiment of the present application two the provides handling process schematic diagram when withdrawing from;
Fig. 5 is the physical member port when the aggregation port that enables the PTP function that the embodiment of the present application three the provides handling process schematic diagram when breaking down;
Fig. 6 is a kind of time synchronism apparatus schematic diagram that the embodiment of the present application provides.
Embodiment
Below in conjunction with accompanying drawing, the technical scheme among the application is clearly and completely described, obviously, described embodiment only is part embodiment, rather than whole embodiment.Based on the embodiment among the application, those of ordinary skills are not making all other embodiment that obtain under the creative work prerequisite, all belong to the scope of the application's protection.
Referring to Fig. 2, the schematic flow sheet of the time synchronized that provides for the embodiment of the present application, this flow process can comprise:
Step 201, local terminal equipment enables the PTP function to the aggregation port on the equipment of itself.
In this step, local terminal equipment is by enabling the PTP function at the self-polymerization mouth, so that the aggregation port of equipment of itself can be supported time synchronized.
Step 202, local terminal equipment are chosen activation (Active) port from the physical member port of aggregation port.
In concrete enforcement, be after aggregation port enables the PTP function, also to comprise at local terminal equipment:
Local terminal equipment is judged the physical member port quantity of aggregation port;
Local terminal equipment is chosen the activation port at first therein, can choose the high port of link idle rate in the physical member port of self-polymerization mouth according to the link principle of optimality when above when physical member port quantity is two, as activating port; After choosing the activation port, choose backup (Backup) port other physical member port outside activating port, the link idle rate of backup port is only second to the activation port;
When physical member port quantity was one, local terminal equipment was chosen for the activation port with this physical member port;
When physical member port quantity was zero, local terminal equipment was not done any processing.
Carry out choosing of port for above-mentioned according to the link idle rate, just the preferred implementation in the embodiment of the present application certainly, also can adopt other port to choose mode, as choosing according to the bandwidth of link, link load etc.
For activating port, below all replace explanation with the Active port, backup port all replaces explanation with the Backup port.
Step 203, local terminal equipment are the Active port arrangement PTP function of choosing.
Concrete, when the Backup port, for the Backup port disposes the PTP function equally.
Step 204, it is mutual that local terminal equipment and PTP opposite equip. carry out Role Information, determines the role of the aggregation port of local terminal equipment, can be Master port or Slave port.
For PTP opposite equip. wherein, refer to that this opposite equip. is applied in the PTP network;
It is mutual that local terminal equipment and PTP opposite equip. carry out Role Information, specifically comprises:
Local terminal equipment is chosen a physical member port arbitrarily (wherein in the physical member port of self-polymerization mouth, this physical member port of choosing can also be the Active port), opposite equip. is chosen a physical member port arbitrarily in the physical member port of self-polymerization mouth, it is mutual that the physical member port that local terminal equipment is chosen by the physical member port chosen and opposite equip. is carried out Role Information, obtain the other side's Role Information respectively, determine that according to this Role Information the aggregation port of equipment of itself is Master port or Slave port; When the aggregation port of local terminal equipment is the Master port, forward step 205 to, when the aggregation port of local terminal equipment is the Slave port, forward step 207 to.
Step 205, configuration Active port is the Master port.
Step 206, local terminal equipment sends the mutual message of PTP by the Active port to the Active port of opposite equip., utilizes the timestamp information in the mutual message of this PTP to carry out time synchronized by the activation port of opposite equip..
Particularly, local terminal equipment is by the Active port transmission PTP mutual message of Active port to opposite equip., carry timestamp information in the mutual message of this PTP, opposite equip. is after receiving the mutual message of this PTP, it is resolved, obtain timestamp information wherein, utilize this timestamp information poor computing time, equipment of itself is carried out time synchronized by the time difference that calculates;
Wherein, for the calculating of time difference, with poor method computing time in the prior art, so no longer do concrete elaboration at this.
Step 207, configuration Active port is the Slave port.
Step 208, local terminal equipment receives opposite equip. by the local zone time that corresponding Active port sends by the Active port, utilizes this local zone time to carry out time synchronized.
Particularly, local terminal equipment receives the mutual message of PTP of the Active port transmission of opposite equip. by the Active port, carry timestamp information in the mutual message of this PTP, the mutual message of this PTP is resolved, obtain timestamp information wherein, utilize this timestamp information poor computing time, equipment of itself is carried out time synchronized by the time difference that calculates.
In the present embodiment, local terminal equipment enables the PTP function to the aggregation port on the equipment of itself, from the physical member port of aggregation port, choose the Active port, and the Active port arrangement PTP function for choosing, to carry out Role Information mutual with opposite equip., and the aggregation port of determining local terminal equipment is Master(master) port or Slave(from) port; When the aggregation port of local terminal equipment is the Master port, configuration Active port is the Master port, by the Active port transmission local zone time of Active port to opposite equip., utilize this local zone time to carry out time synchronized by opposite equip., when the aggregation port of local terminal equipment is the Slave port, configuration Active port is the Slave port, receive the local zone time that opposite equip. sends by corresponding Active port by the Active port, utilize this local zone time to carry out time synchronized, realized the time synchronized based on aggregation port, reached the time synchronized with opposite equip., and by directly enabling the PTP function at aggregation port, simplified user's configuration, reduced the consumption of device resource, improve equipment performance, strengthened the stability of network topology.
Further set forth above-mentioned the application with several specific embodiments below; for the following local terminal equipment that relates to and the Role Information reciprocal process of opposite equip. and follow-up time synchronizing; all identical with the processing in the flow process of above-mentioned Fig. 2; so no longer do concrete elaboration among the following embodiment; certainly; several embodiment that the application and not only being confined to proposes; to those skilled in the art; do not paying under the performing creative labour; according to thinkable other processing scheme of the embodiment of the present application, all within the application's protection range.
Embodiment one,
Referring to Fig. 3, the schematic flow sheet when adding new physical member port on the aggregation port that enables the PTP function, this flow process can comprise:
Step 301, the judgement of local terminal equipment has enabled physical member port quantity current on the aggregation port of PTP function.
Particularly, local terminal equipment has enabled physical member port quantity current on the aggregation port of PTP function by judging, finish the processing for the physical member port of new interpolation: when current physical member port quantity is two when above, forward step 306 to, when current physical member port quantity is one, forward step 302 to, when current physical member port quantity is zero, forward step 303 to.
The physical member port that step 302, local terminal equipment are chosen this interpolation is the Backup port, for its configuration PTP function and Role Information, forwards step 305 afterwards to.
The physical member port that step 303, local terminal equipment are chosen this interpolation is the Active port, is its configuration PTP function.
In this step, when discovery self physical member port quantity is zero, the initialization aggregation port, the physical member port of choosing this interpolation is the Active port, is its configuration PTP function.
Step 304, it is mutual that local terminal equipment and opposite equip. carry out Role Information, utilizes the Role Information configuration Active port of determining.
Step 305, local terminal equipment carries out time synchronized by the Active port of Active port and opposite equip..
Step 306, local terminal equipment is not done any processing.
In the present embodiment, when adding new physical member port on the aggregation port that enables the PTP function, by current physical member port quantity on the aggregation port of judging equipment of itself, realized the different disposal flow process of new interpolation physical member port, and by directly enabling the PTP function at aggregation port, simplified user's configuration, reduced the consumption of device resource, improve equipment performance, strengthened the stability of network topology.
Embodiment two,
Referring to Fig. 4, the schematic flow sheet when the physical member port on the aggregation port that enables the PTP function withdraws from, this flow process can comprise:
Step 401, local terminal equipment obtains the state of the physical member port that withdraws from, and handles accordingly according to its state information.
Particularly, local terminal equipment is finished the respective handling for the physical member port that withdraws from by obtaining the physical member port state information that withdraws from:
When the physical member port that withdraws from is common physical member port, forward step 410 to, when the physical member port that withdraws from is the Backup port, forward step 402 to, when the physical member port that withdraws from is the Active port, forward step 405 to.
Step 402, local terminal equipment are removed PTP function and the Role Information of this physical member port that withdraws from.
Step 403, local terminal equipment judge whether also have other common physical member port in the aggregation port that enables the PTP function.
In this step, local terminal equipment enables whether also have other common physical member port in the aggregation port of PTP function by judgement, when sometimes, forward step 404 to, otherwise, forward step 409 to.
Step 404, local terminal equipment are selected new Backup port from common physical member port, for its configuration PTP function and Role Information, forward step 409 to.
Choose for Backup port wherein, can adopt the link principle of optimality.
Step 405, local terminal equipment are removed PTP function and the Role Information of this physical member port that withdraws from.
Step 406, local terminal equipment Backup port is set to the Active port.
Step 407, local terminal equipment judge whether also have other common physical member port in the aggregation port that enables the PTP function.
In this step, local terminal equipment judges in the aggregation port that enables the PTP function whether also have other common physical member port, when sometimes, forwards step 408 to, otherwise, forward step 409 to.
Step 408, local terminal equipment are selected new Backup port from common physical member port, for its configuration PTP function and Role Information, forward step 409 afterwards to.
Step 409, process ends.
Step 410, local terminal equipment is not done any processing.
In the present embodiment, when the physical member port on the aggregation port that enables the PTP function withdraws from, the state of the physical member port that withdraws from by judgement, realized the different disposal flow process to the physical member port that withdraws from, and by directly enabling the PTP function at aggregation port, simplified user's configuration, reduced the consumption of device resource, improve equipment performance, strengthened the stability of network topology.
Embodiment three,
Referring to Fig. 5, the schematic flow sheet when the physical member port on the aggregation port that enables the PTP function breaks down, this flow process can comprise:
Step 501, local terminal equipment obtains the state of the member port that breaks down, and handles accordingly according to its state information.
Particularly, local terminal equipment is finished the respective handling for the physical member port that breaks down by obtaining the port status information of the member port that breaks down:
When the physical member port that breaks down is common physical member port, forward step 510 to, when the physical member port that breaks down is the Backup port, forward step 502 to, when the physical member port that breaks down is the Active port, forward step 505 to.
Step 502, local terminal equipment are removed PTP function and the Role Information of this physical member port that breaks down.
Step 503, local terminal equipment judge whether also have other common physical member port in the aggregation port that enables the PTP function.
In this step, local terminal equipment judges in the aggregation port that enables the PTP function whether also have other common physical member port, when sometimes, forwards step 504 to, otherwise, forward step 509 to.
Step 504, local terminal equipment are selected new Backup port from common physical member port, be its configuration PTP function and Role Information.
After being this new Backup port arrangement PTP function and Role Information, forward step 509 to.
Step 505, local terminal equipment are removed PTP function and the Role Information of this physical member port that breaks down.
Step 506, local terminal equipment Backup port is set to the Active port.
Step 507, local terminal equipment judge whether also have other common physical member port in the aggregation port that enables the PTP function.
In this step, local terminal equipment judges in the aggregation port that enables the PTP function whether also have other common physical member port, when sometimes, forwards step 508 to, otherwise, forward step 509 to.
Step 508, local terminal equipment are selected new Backup port from this common physical member port, and for its configuration PTP function and Role Information, forward step 509 afterwards to.
Step 509, process ends.
Step 510, local terminal equipment is not done any processing.
In the present embodiment, when the physical member port on the aggregation port that enables the PTP function breaks down, the state of the physical member port that breaks down by judgement, realized the different disposal flow process when the network members port broken down, and by directly enabling the PTP function at aggregation port, simplified user's configuration, reduced the consumption of device resource, improve equipment performance, strengthened the stability of network topology.
Based on the design identical with said method, the embodiment of the present application also provides a kind of time synchronism apparatus, and as shown in Figure 6, this device comprises:
Configuration process module 61 is used to aggregation port to enable the PTP function, chooses the activation port from the physical member port of aggregation port, and for activating port arrangement PTP function;
Interaction process module 63 is used for that to carry out Role Information mutual with opposite equip., utilizes the Role Information allocation activation port of determining;
Synchronous processing module 64 is used for carrying out time synchronized by the activation port that activates port and opposite equip..
This device also comprises: judge module 62, for the physical member port quantity of judging aggregation port;
Configuration process module 61, concrete be used for when physical member port be two when above, after the physical member port of aggregation port is chosen the activation port, further choose backup port other physical member port beyond activating port, be backup port configuration PTP function, and after interaction process module and opposite equip. are determined Role Information, according to the Role Information configuration backup port of determining; When physical member port is zero, only enable the PTP function for aggregation port.Judge module 62 also is used for judging current physical member port quantity on this aggregation port that enables the PTP function when the aggregation port that enables the PTP function adds physical member port;
Configuration process module 61, be used for when current physical member port quantity be two when above, do not do any processing; When current physical member port quantity was one, the physical member port of choosing interpolation was backup port, was its configuration PTP function and Role Information; When current physical member port quantity is zero, choose the physical member port of this interpolation for activating port, be its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information allocation activation port of determining, and carry out time synchronized by the activation port that activates port and opposite equip..
Judge module 62 also is used for obtaining the port status of the physical member port that withdraws from when the physical member port of the aggregation port that enables the PTP function withdraws from;
Configuration process module 61 is used for not doing any processing when the physical member port that withdraws from is common physical member port; When the physical member port that withdraws from is backup port, PTP function and the Role Information of the physical member port that removal is withdrawed from, if when enabling to also have common physical member port in the aggregation port of PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information; When the physical member port that withdraws from is when activating port, PTP function and the Role Information of the physical member port that removal is withdrawed from, backup port is set to activate port, if when enabling to also have common physical member port in the aggregation port of PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information.
Judge module 62 also is used for obtaining the port status of the physical member port that breaks down when the physical member port of the aggregation port that enables the PTP function breaks down;
Configuration process module 61 is used for not doing any processing when the physical member port that breaks down is common member port; When the physical member port that breaks down is backup port, PTP function and the Role Information of the physical member port that removal is broken down, if when enabling to also have common physical member port in the aggregation port of PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information; When the physical member port that breaks down is when activating port, PTP function and the Role Information of the physical member port that removal is broken down, backup port is set to activate port, if when enabling to also have common physical member port in the aggregation port of PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information.
Interaction process module 63, concrete being used for utilizes Role Information to determine that the aggregation port of local terminal equipment is Master port or Slave port, when described aggregation port is the Master port, disposing described activation port is the Master port, when described aggregation port was the Slave port, disposing described activation port was the Slave port;
Synchronous processing module 64, concrete being used for when aggregation port is the Master port, send the mutual message of PTP by activating port to the activation port of opposite equip., obtain timestamp information in the mutual message of PTP by opposite equip., utilize timestamp information to carry out time synchronized;
When aggregation port is the Slave port, receive opposite equip. by the mutual message of PTP that corresponding activation port sends by activating port, obtain the timestamp information that carries in the PTP message, utilize timestamp information to carry out time synchronized.
In the present embodiment, local terminal equipment enables the PTP function to the aggregation port on the equipment of itself, from the physical member port of aggregation port, choose the Active port, and the Active port arrangement PTP function for choosing, to carry out Role Information mutual with opposite equip., and the aggregation port of determining local terminal equipment is Master(master) port or Slave(from) port; When the aggregation port of local terminal equipment is the Master port, configuration Active port is the Master port, by the Active port transmission local zone time of Active port to opposite equip., utilize this local zone time to carry out time synchronized by opposite equip., when the aggregation port of local terminal equipment is the Slave port, configuration Active port is the Slave port, receive the local zone time that opposite equip. sends by corresponding Active port by the Active port, utilize this local zone time to carry out time synchronized, realized the time synchronized based on aggregation port, reached the time synchronized with opposite equip., and by directly enabling the PTP function at aggregation port, simplified user's configuration, reduced the consumption of device resource, improve equipment performance, strengthened the stability of network topology.
Through the above description of the embodiments, those skilled in the art can be well understood to the application and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that the application's technical scheme contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the method for each embodiment of the application.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in the accompanying drawing or flow process might not be that enforcement the application is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
Above-mentioned the embodiment of the present application sequence number does not represent the quality of embodiment just to description.
More than disclosed only be several specific embodiments of the application, still, the application is not limited thereto, any those skilled in the art can think variation all should fall into the application's protection range.

Claims (12)

1. a method for synchronizing time is characterized in that, described method comprises:
Local terminal equipment is that aggregation port enables Precision Time Protocol PTP function, chooses the activation port from the physical member port of described aggregation port, and is described activation port arrangement PTP function;
It is mutual that local terminal equipment and PTP opposite equip. carry out Role Information, utilizes the Role Information of determining to dispose described activation port;
Local terminal equipment carries out time synchronized by the activation port of described activation port and described opposite equip..
2. the method for claim 1 is characterized in that, local terminal equipment is that described aggregation port enables further to comprise after the PTP function:
Described local terminal equipment is judged the physical member port quantity of described aggregation port;
When described physical member port is two when above, after the physical member port of described aggregation port is chosen the activation port, further choose backup port other physical member port beyond described activation port, be described backup port configuration PTP function, and after determining Role Information with opposite equip., dispose described backup port according to the Role Information of determining;
When described physical member port is zero, do not do any processing.
3. method as claimed in claim 2 is characterized in that, when the aggregation port that enables the PTP function added physical member port, described method comprised:
Described local terminal equipment is judged current physical member port quantity on this aggregation port that enables the PTP function;
When described current physical member port quantity is two when above, do not do any processing;
When described current physical member port quantity was one, the physical member port of choosing interpolation was backup port, was its configuration PTP function and Role Information;
When described current physical member port quantity is zero, choose the physical member port of this interpolation for activating port, be its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information of determining to dispose described activation port, and carry out time synchronized by the activation port of described activation port and opposite equip..
4. method as claimed in claim 2 is characterized in that, when the physical member port of the aggregation port that enables the PTP function withdrawed from, described method comprised:
Described local terminal equipment obtains the port status of the described physical member port that withdraws from;
When the described physical member port that withdraws from is common physical member port, do not do any processing;
When the described physical member port that withdraws from is backup port, remove PTP function and the Role Information of the described physical member port that withdraws from, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that withdraws from is when activating port, remove PTP function and the Role Information of the described physical member port that withdraws from, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
5. method as claimed in claim 2 is characterized in that, when the physical member port of the aggregation port that enables the PTP function broke down, described method comprised:
Described local terminal equipment obtains the port status of the described physical member port that breaks down;
When the described physical member port that breaks down is common physical member port, do not do any processing;
When the described physical member port that breaks down is backup port, remove PTP function and the Role Information of the described physical member port that breaks down, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that breaks down is when activating port, remove PTP function and the Role Information of the described physical member port that breaks down, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
6. as arbitrary described method in the claim 1 to 5, it is characterized in that,
Utilize Role Information to determine that the aggregation port of local terminal equipment is Master port or Slave port;
When the aggregation port of local terminal equipment is the Master port, it is the Master port that local terminal equipment disposes described activation port, described local terminal equipment is by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain timestamp information in the mutual message of described PTP by described opposite equip., utilize described timestamp information to carry out time synchronized;
When the aggregation port of local terminal equipment is the Slave port, it is the Slave port that local terminal equipment disposes described activation port, described local terminal equipment receives the mutual message of PTP that opposite equip. sends by corresponding activation port by described activation port, obtain the timestamp information that carries in the described PTP message, utilize described timestamp information to carry out time synchronized.
7. a time synchronism apparatus is characterized in that, comprising:
The configuration process module is used to aggregation port to enable Precision Time Protocol PTP function, chooses the activation port from the physical member port of described aggregation port, and is described activation port arrangement PTP function;
The interaction process module is used for that to carry out Role Information mutual with the PTP opposite equip., utilizes the Role Information of determining to dispose described activation port;
Synchronous processing module is used for carrying out time synchronized by the activation port of described activation port and described opposite equip..
8. aggregation port as claimed in claim 7 is characterized in that, also comprises:
Judge module is for the physical member port quantity of judging described aggregation port;
Described configuration process module, concrete be used for when described physical member port be two when above, after the physical member port of described aggregation port is chosen the activation port, further choose backup port other physical member port beyond described activation port, be described backup port configuration PTP function, and after described interaction process module and opposite equip. are determined Role Information, dispose described backup port according to the Role Information of determining; When described physical member port is zero, only enable the PTP function for aggregation port.
9. aggregation port as claimed in claim 8 is characterized in that, when the aggregation port that enables the PTP function adds physical member port,
Described judge module also is used for judging current physical member port quantity on this aggregation port that enables the PTP function;
Described configuration process module, be used for when described current physical member port quantity be two when above, do not do any processing;
When described current physical member port quantity was one, the physical member port of choosing interpolation was backup port, was its configuration PTP function and Role Information;
When described current physical member port quantity is zero, choose the physical member port of this interpolation for activating port, be its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information of determining to dispose described activation port, and carry out time synchronized by the activation port of described activation port and opposite equip..
10. aggregation port as claimed in claim 8 is characterized in that, when the physical member port of the aggregation port that enables the PTP function withdraws from,
Described judge module is for the port status that obtains the described physical member port that withdraws from;
Described configuration process module is used for not doing any processing when the described physical member port that withdraws from is common physical member port;
When the described physical member port that withdraws from is backup port, remove PTP function and the Role Information of the described physical member port that withdraws from, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that withdraws from is when activating port, remove PTP function and the Role Information of the described physical member port that withdraws from, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
11. aggregation port as claimed in claim 8 is characterized in that, when the physical member port of the aggregation port that enables the PTP function breaks down,
Described judge module is for the port status that obtains the described physical member port that breaks down;
Described configuration process module is used for not doing any processing when the described physical member port that breaks down is common member port;
When the described physical member port that breaks down is backup port, remove PTP function and the Role Information of the described physical member port that breaks down, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port that breaks down is when activating port, remove PTP function and the Role Information of the described physical member port that breaks down, backup port is set to activate port, if when also having common physical member port in the aggregation port of the described PTP of enabling function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
12. as arbitrary described device in the claim 7 to 11, it is characterized in that,
Described interaction process module, concrete being used for utilizes Role Information to determine that the aggregation port of local terminal equipment is Master port or Slave port, when described aggregation port is the Master port, disposing described activation port is the Master port, when described aggregation port was the Slave port, disposing described activation port was the Slave port;
Described synchronous processing module, concrete being used for when described aggregation port is the Master port, by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain timestamp information in the mutual message of described PTP by described opposite equip., utilize described timestamp information to carry out time synchronized;
When described aggregation port is the Slave port, receive opposite equip. by the mutual message of PTP that corresponding activation port sends by described activation port, obtain the timestamp information that carries in the described PTP message, utilize described timestamp information to carry out time synchronized.
CN201310230950.9A 2013-06-08 2013-06-08 A kind of method for synchronizing time and device Active CN103312429B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310230950.9A CN103312429B (en) 2013-06-08 2013-06-08 A kind of method for synchronizing time and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310230950.9A CN103312429B (en) 2013-06-08 2013-06-08 A kind of method for synchronizing time and device

Publications (2)

Publication Number Publication Date
CN103312429A true CN103312429A (en) 2013-09-18
CN103312429B CN103312429B (en) 2015-11-25

Family

ID=49137250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310230950.9A Active CN103312429B (en) 2013-06-08 2013-06-08 A kind of method for synchronizing time and device

Country Status (1)

Country Link
CN (1) CN103312429B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016091050A1 (en) * 2014-12-08 2016-06-16 中国移动通信集团公司 Time synchronization method and device
WO2016110084A1 (en) * 2015-01-06 2016-07-14 中兴通讯股份有限公司 Method, device and system for precision time protocol time synchronization in aggregation network
WO2018233450A1 (en) * 2017-06-22 2018-12-27 中兴通讯股份有限公司 Time conversion method and device, apparatus, storage medium, and processor
WO2022042697A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Time synchronization method and apparatus, device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060020861A1 (en) * 2004-07-23 2006-01-26 Tim Frodsham Method, system, and apparatus for loopback entry and exit
CN1937567A (en) * 2006-08-10 2007-03-28 杭州华为三康技术有限公司 Method for determining port role
CN101047553A (en) * 2006-05-11 2007-10-03 华为技术有限公司 Device and method for implementing service automatic recovery
CN101599906A (en) * 2009-07-08 2009-12-09 杭州华三通信技术有限公司 Method and device that port status is provided with
CN102195766A (en) * 2010-03-01 2011-09-21 杭州华三通信技术有限公司 Time synchronization method and clock device
CN102271056A (en) * 2011-07-22 2011-12-07 中兴通讯股份有限公司 Active aggregator selection method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060020861A1 (en) * 2004-07-23 2006-01-26 Tim Frodsham Method, system, and apparatus for loopback entry and exit
CN101047553A (en) * 2006-05-11 2007-10-03 华为技术有限公司 Device and method for implementing service automatic recovery
CN1937567A (en) * 2006-08-10 2007-03-28 杭州华为三康技术有限公司 Method for determining port role
CN101599906A (en) * 2009-07-08 2009-12-09 杭州华三通信技术有限公司 Method and device that port status is provided with
CN102195766A (en) * 2010-03-01 2011-09-21 杭州华三通信技术有限公司 Time synchronization method and clock device
CN102271056A (en) * 2011-07-22 2011-12-07 中兴通讯股份有限公司 Active aggregator selection method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016091050A1 (en) * 2014-12-08 2016-06-16 中国移动通信集团公司 Time synchronization method and device
CN105744616A (en) * 2014-12-08 2016-07-06 中国移动通信集团公司 Time synchronization method and device
CN105744616B (en) * 2014-12-08 2018-03-23 中国移动通信集团公司 A kind of method for synchronizing time and device
WO2016110084A1 (en) * 2015-01-06 2016-07-14 中兴通讯股份有限公司 Method, device and system for precision time protocol time synchronization in aggregation network
CN105827570A (en) * 2015-01-06 2016-08-03 中兴通讯股份有限公司 Method, device and system for time synchronization of aggregation network precision time protocol (PTP)
WO2018233450A1 (en) * 2017-06-22 2018-12-27 中兴通讯股份有限公司 Time conversion method and device, apparatus, storage medium, and processor
WO2022042697A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Time synchronization method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
CN103312429B (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
CN103312428B (en) For the method and apparatus of precision clock protocol synchronization network
CN105187464B (en) Method of data synchronization, apparatus and system in a kind of distributed memory system
CN112838903B (en) Clock synchronization method, equipment and storage medium
CN105262555B (en) Time synchronization method, programmable logic device, single board and network element
CN103312429A (en) Time synchronization method and time synchronization device
CN109547512A (en) A kind of method and device of the distributed Session management based on NoSQL
US20150317371A1 (en) Method, device, and system for peer-to-peer data replication and method, device, and system for master node switching
JPH0267033A (en) Network synchronizing system
WO2015196685A1 (en) Clock synchronization method and apparatus
CN109600388A (en) Data transmission method, device, computer-readable medium and electronic equipment
CN103188064A (en) Clock synchronization method and clock synchronization device
CN113778615B (en) Rapid and stable network shooting range virtual machine construction system
CN100466545C (en) Data synchronization method between the main board and spare board in the communication system
CN112087506B (en) Cluster node management method and device and computer storage medium
CN111147312A (en) Resource allocation management method and device, resource allocation cache management method and device, and allocation management system
CN103532970B (en) The transmission method of a kind of time synchronized message and equipment
US9705823B2 (en) Port status synchronization method, related device, and system
WO2020052298A1 (en) Method and device for clock and time synchronization, and multi-router system
CN110535959A (en) A kind of method, apparatus and computer readable storage medium for transmitting data
CN109413118B (en) Method, device, storage medium and program product for realizing session synchronization
WO2022127924A1 (en) Method and device for selecting clock source
CN111064622B (en) Network device, synchronization apparatus, and information transmission method
CN113346974B (en) Method, apparatus, communication system and storage medium for clock synchronization
CN105119675B (en) A kind of synchronous method and synchronization system of target 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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230619

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.