CN103312429B - A kind of method for synchronizing time and device - Google Patents

A kind of method for synchronizing time and device Download PDF

Info

Publication number
CN103312429B
CN103312429B CN201310230950.9A CN201310230950A CN103312429B CN 103312429 B CN103312429 B CN 103312429B CN 201310230950 A CN201310230950 A CN 201310230950A CN 103312429 B CN103312429 B CN 103312429B
Authority
CN
China
Prior art keywords
port
physical member
ptp
aggregation
role information
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.)
Active
Application number
CN201310230950.9A
Other languages
Chinese (zh)
Other versions
CN103312429A (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

Abstract

This application discloses a kind of method for synchronizing time and device, comprise: local device is the enable PTP function of aggregation port, activation port is chosen from the physical member port of described aggregation port, and be described activation port arrangement PTP function, it is mutual that local device and PTP opposite equip. carry out Role Information, the Role Information determined is utilized to configure described activation port, local device carries out time synchronized by the activation port of described activation port and opposite equip., achieve the time synchronized based on aggregation port, reach the time synchronized with opposite equip., and pass through directly enable PTP function on aggregation port, simplify user's configuration, reduce the consumption of device resource, improve equipment performance, enhance the stability of network topology.

Description

A kind of method for synchronizing time and device
Technical field
The application relates to communication technical field, particularly relates to a kind of method for synchronizing time and device.
Background technology
In existing communication network, permitted multiple services normal operation and all required clock synchronization of ad, namely the time between each equipment of whole network or difference on the frequency remain in rational error level, for time synchronized wherein, usual employing be based on PTP(PrecisionTimeProtocol, Precision Time Protocol) time synchronized of agreement, for a pair clock node of phase mutually synchronization, there is master slave relation, but this master slave relation is relative, specific explanations is done to this master slave relation below: host node (MasterNode) is the clock node issuing lock in time, clock on it is called master clock (MasterClock), otherwise, it is the clock node receiving lock in time from node (SlaveNode), clock on it is called from clock (SlaveClock), for PTP port clock node being issued lock in time, usually main (Master) port is referred to as, the PTP port receiving lock in time is then called as from (Slave) port, in addition, also exist and a kind ofly neither issue the PTP port also not receiving lock in time, be called passive (Passive) port.
Based on the time synchronized of PTP protocol, its principle is: synchronisation message between master and slave clock the transmitting-receiving time of recording messages, the time difference come and gone by calculating message calculates the round total time delay between master and slave clock, if network is symmetrical (namely the transmission delay of both direction is identical), be exactly total then come and go the half one-way delay of time delay, this one-way delay is the clock jitter between master and slave clock, adjust local zone time from clock according to this deviation, just can realize its synchronous with master clock.PTP protocol defines two kinds of propagation delay measurement mechanisms: request-reply (Requset_Response) mechanism and end time delay (PeerDelay) mechanism, and these two kinds of mechanism are all premised on network symmetry.
For the various message of PTP synchronous interaction, two classes can be divided into according to the need of response time stamp event, one class is that PTP event message (comprising: synchronous (Sync) message, end latency request (PDelay_Req) message, latency request (Delay_Req) message, end delayed response (PDelay_Resp) message); One class is PTP non-event message (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, PTP event message needs the response time to stab event, and this needs the support of interface board chip just can complete logging timestamp, otherwise this interface board can not support PTP protocol function.
For PTP protocol, because needs special hardware is as support, so more special, set forth the Time Synchronizing based on PTP protocol in prior art below.
As shown in Figure 1, for the host node of two support PTP functions with from node, backup link is had in order to make the PTP time synchronized of two equipment, must respectively by 4 all enable PTP of port, after all configurations are all configured, have following situation: 4 ports on host node are all master port, for issuing time; Be from port from the port one of node, for from host node device lock in time, port 2 to 4 is all passive port, is the backup port of the port one from node, neither the issuing time also asynchronous time.
When from the port one place link failure of node, port role election can be re-started from node, again select from remaining passive port one preferentially port as new from port, then issue PTP message from port carry out time synchronized by new.
In the process realizing the application, inventor finds at least there is following problem in prior art:
1) because needs are 4 member port configuration PTP functions simultaneously, and each port needs to carry out interacting message, therefore, inconvenient in configuration, and can cause the very big consumption of device resource; 2) when SLAVE port goes wrong, meeting originating port role re-elects, and causes topological structure stable not.
Summary of the invention
The object of the embodiment of the present application is to provide method for synchronizing time and a kind of time synchronism apparatus, needs to carry out at each member port the device resource that PTP functional configuration causes consume excessive problem to solve in 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 device is the enable PTP function of aggregation port, from the physical member port of described aggregation port, choose activation port, and is described activation port arrangement PTP function;
It is mutual that local device and PTP opposite equip. carry out Role Information, utilizes the Role Information determined to configure described activation port;
Local device carries out time synchronized by the activation port of described activation port and described opposite equip..
Preferably, local device comprises after being the enable PTP function of described aggregation port further:
Described local device judges the physical member port quantity of described aggregation port;
When described physical member port is two or more, after the physical member port of described aggregation port chooses activation port, backup port is chosen further from other physical member port beyond described activation port, for described backup port configuration PTP function, and with opposite equip. determination Role Information after, configure described backup port according to the Role Information determined;
When described physical member port is zero, do not do any process.
Preferably, when the aggregation port of enable PTP function adds physical member port, described method comprises:
Current physical member port quantity on the aggregation port that described local device judges this enable PTP function;
When described present physical member port quantity is two or more, do not do any process;
When described present physical member port quantity is one, the physical member port choosing interpolation is backup port, is its configuration PTP function and Role Information;
When described present physical member port quantity is zero, choose the physical member port of this interpolation for activating port, for its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information determined to configure 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 of enable PTP function exits, described method comprises:
The port status of the physical member port exited described in described local device obtains;
When the described physical member port exited is common physical member port, do not do any process;
When the described physical member port exited is backup port, the PTP function of the physical member port exited described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port exited is for activating port, the PTP function of the physical member port exited described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP 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 of enable PTP function breaks down, described method comprises:
The port status of the physical member port broken down described in described local device obtains;
When the described physical member port broken down is common physical member port, do not do any process;
When the described physical member port broken down is backup port, the PTP function of the physical member port broken down described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port broken down is for activating port, the PTP function of the physical member port broken down described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
Preferably,
Utilize the aggregation port of Role Information determination local device for Master port or Slave port;
When the aggregation port of local device is Master port, it is Master port that local device configures described activation port, described local device is by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain the timestamp information in described PTP mutual message by described opposite equip., utilize described timestamp information to carry out time synchronized;
When the aggregation port of local device is Slave port, it is Slave port that local device configures described activation port, the PTP mutual message that described local device is sent by corresponding activation port by described activation port accepts opposite equip., obtain the timestamp information carried in 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:
Configuration process module, for being the enable PTP function of aggregation port, chooses activation port from the physical member port of described aggregation port, and is described activation port arrangement PTP function;
Interaction process module, for carrying out Role Information alternately with PTP opposite equip., utilizes the Role Information determined to configure described activation port;
Synchronous processing module, for carrying out time synchronized by the activation port of described activation port and described opposite equip..
Preferably, also comprise:
Judge module, for judging the physical member port quantity of described aggregation port;
Described configuration process module, specifically for when described physical member port is two or more, after the physical member port of described aggregation port chooses activation port, backup port is chosen further from other physical member port beyond described activation port, for described backup port configuration PTP function, and after described interaction process module and opposite equip. determination Role Information, configure described backup port according to the Role Information determined; When described physical member port is zero, be only the enable PTP function of aggregation port.
Preferably, when the aggregation port of enable PTP function adds physical member port,
Described judge module, also current physical member port quantity on the aggregation port judging this enable PTP function;
Described configuration process module, for when described present physical member port quantity is two or more, does not do any process;
When described present physical member port quantity is one, the physical member port choosing interpolation is backup port, is its configuration PTP function and Role Information;
When described present physical member port quantity is zero, choose the physical member port of this interpolation for activating port, for its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information determined to configure 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 of enable PTP function exits,
Described judge module, the port status of physical member port also for exiting described in obtaining;
Described configuration process module, for when described in the physical member port that exits be common physical member port time, do not do any process;
When the described physical member port exited is backup port, the PTP function of the physical member port exited described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port exited is for activating port, the PTP function of the physical member port exited described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP 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 of enable PTP function breaks down,
Described judge module, the port status of physical member port also for breaking down described in obtaining;
Described configuration process module, for when described in the physical member port that breaks down be common member port time, do not do any process;
When the described physical member port broken down is backup port, the PTP function of the physical member port broken down described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port broken down is for activating port, the PTP function of the physical member port broken down described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
Preferably,
Described interaction process module, specifically for utilizing the aggregation port of Role Information determination local device for Master port or Slave port, when described aggregation port is Master port, configuring described activation port is Master port, when described aggregation port is Slave port, configuring described activation port is Slave port;
Described synchronous processing module, specifically for when described aggregation port is Master port, by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain the timestamp information in described PTP mutual message by described opposite equip., utilize described timestamp information to carry out time synchronized;
When described aggregation port is Slave port, the PTP mutual message sent by corresponding activation port by described activation port accepts opposite equip., is obtained the timestamp information carried in described PTP message, utilizes described timestamp information to carry out time synchronized.
Compared with prior art, the technical scheme that the embodiment of the present application proposes has the following advantages:
By the proposition of the application's scheme, achieve the time synchronized based on aggregation port, reach the time synchronized with opposite equip., and pass through directly enable PTP function on aggregation port, simplify user's configuration, reduce the consumption of device resource, improve equipment performance, enhance the stability of network topology.
Accompanying drawing explanation
Fig. 1 is the topological structure figure realizing in prior art backing up;
Fig. 2 is the schematic flow sheet of the time synchronized that the embodiment of the present application provides;
Fig. 3 is the handling process schematic diagram of the aggregation port when enable PTP function that provides of the embodiment of the present application one when adding physical member port;
Fig. 4 is the handling process schematic diagram of the physical member port of the aggregation port when enable PTP function that the embodiment of the present application two provides when exiting;
Fig. 5 is the handling process schematic diagram of the physical member port of the aggregation port when enable PTP function that the embodiment of the present application three provides 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, be clearly and completely described the technical scheme in the application, obviously, described embodiment is only section Example, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making other embodiments all obtained under creative work prerequisite, all belong to the scope of the application's protection.
See Fig. 2, be the schematic flow sheet of the time synchronized that the embodiment of the present application provides, this flow process can comprise:
Step 201, local device is to the enable PTP function of the aggregation port on equipment of itself.
In this step, local device, by enable PTP function on self-polymerization mouth, supports time synchronized to enable the aggregation port of equipment of itself.
Step 202, local device chooses activation (Active) port from the physical member port of aggregation port.
In concrete enforcement, after local device is the enable PTP function of aggregation port, also comprise:
Local device judges the physical member port quantity of aggregation port;
When physical member port quantity is two or more, local device chooses activation port first wherein, according to link principle of optimality, can choose the port that link idle rate is high in the physical member port of self-polymerization mouth, as activation port; After choosing activation port, from other physical member port activated outside port, choose backup (Backup) port, the link idle rate of backup port is only second to activation port;
When physical member port quantity is one, this physical member port is chosen for activation port by local device;
When physical member port quantity is zero, local device does not do any process.
Carry out choosing of port for above-mentioned according to link idle rate, the preferred implementation just in the embodiment of the present application, certainly, also can adopt other port to choose mode, as the bandwidth according to link, link load etc. are chosen.
For activation port, all replace illustrating with Active port below, backup port all carries out replacement explanation with Backup port.
Step 203, local device is the Active port arrangement PTP function chosen.
Concrete, when there being Backup port, for Backup port configures PTP function equally.
Step 204, it is mutual that local device and PTP opposite equip. carry out Role Information, and determining the role of the aggregation port of local device, can be Master port or Slave port.
For PTP opposite equip. wherein, refer to that this opposite equip. is applied in PTP network;
It is mutual that local device and PTP opposite equip. carry out Role Information, specifically comprises:
Local device chooses arbitrarily a physical member port (wherein in the physical member port of self-polymerization mouth, this physical member port chosen can also be Active port), opposite equip. chooses arbitrarily a physical member port in the physical member port of self-polymerization mouth, it is mutual that local device carries out Role Information by the physical member port that the physical member port chosen and opposite equip. are chosen, obtaining the Role Information of the other side respectively, is Master port or Slave port according to the aggregation port of this Role Information determination equipment of itself; When the aggregation port of local device is Master port, forward step 205 to, when the aggregation port of local device is Slave port, forward step 207 to.
Step 205, configuration Active port is Master port.
Step 206, local device, by the Active port transmission PTP mutual message of Active port to opposite equip., utilizes the timestamp information in this PTP mutual message to carry out time synchronized by the activation port of opposite equip..
Particularly, local device is by the Active port transmission PTP mutual message of Active port to opposite equip., timestamp information is carried in this PTP mutual message, opposite equip. is after receiving this PTP mutual message, it is resolved, obtain timestamp information wherein, utilize this timestamp information poor for computing time, by the time difference calculated, time synchronized is carried out to equipment of itself;
Wherein, for the calculating of time difference, with the method that computing time in prior art is poor, therefore no longer do concrete elaboration at this.
Step 207, configuration Active port is Slave port.
Step 208, the local zone time that local device is sent by corresponding Active port by Active port accepts opposite equip., utilizes this local zone time to carry out time synchronized.
Particularly, the PTP mutual message that local device is sent by the Active port of Active port accepts opposite equip., timestamp information is carried in this PTP mutual message, this PTP mutual message is resolved, obtain timestamp information wherein, utilize this timestamp information poor for computing time, by the time difference calculated, time synchronized is carried out to equipment of itself.
In the present embodiment, local device is to the enable PTP function of the aggregation port on equipment of itself, Active port is chosen from the physical member port of aggregation port, and the Active port arrangement PTP function for choosing, to carry out Role Information mutual with opposite equip., determines that the aggregation port of local device is Master(master) port or Slave(from) port, when the aggregation port of local device is Master port, configuration Active port is Master port, by the Active port transmission local zone time of Active port to opposite equip., this local zone time is utilized to carry out time synchronized by opposite equip., when the aggregation port of local device is Slave port, configuration Active port is Slave port, by the local zone time that Active port accepts opposite equip. is sent by corresponding Active port, this local zone time is utilized to carry out time synchronized, achieve the time synchronized based on aggregation port, reach the time synchronized with opposite equip., and pass through directly enable PTP function on aggregation port, simplify user's configuration, reduce the consumption of device resource, improve equipment performance, enhance the stability of network topology.
Above-mentioned the application is set forth further below with several specific embodiment; for Role Information reciprocal process and the follow-up time synchronizing of the following local device that relates to and opposite equip.; all identical with the process in the flow process of above-mentioned Fig. 2; therefore no longer do concrete elaboration in following embodiment; certainly; the application is also not only confined to proposed several embodiments; to those skilled in the art; do not paying under performing creative labour; according to the embodiment of the present application other processing scheme thinkable, all within the protection range of the application.
Embodiment one,
See Fig. 3, on the aggregation port of enable PTP function, add schematic flow sheet during new physical member port, this flow process can comprise:
Step 301, local device judges physical member port quantity current on the aggregation port of enable PTP function.
Particularly, local device is by judging physical member port quantity current on the aggregation port of enable PTP function, carry out the process for new physical member port of adding: when present physical member port quantity is two or more, forward step 306 to, when present physical member port quantity is one, forward step 302 to, when present physical member port quantity is zero, forward step 303 to.
Step 302, the physical member port that local device chooses this interpolation is Backup port, is its configuration PTP function and Role Information, forwards step 305 to afterwards.
Step 303, the physical member port that local device chooses this interpolation is Active port, is its configuration PTP function.
In this step, when finding that own physical member port quantity is zero, initiated polymerization mouth, the physical member port choosing this interpolation is Active port, is its configuration PTP function.
Step 304, it is mutual that local device and opposite equip. carry out Role Information, utilizes the Role Information configuration Active port determined.
Step 305, local device carries out time synchronized by the Active port of Active port and opposite equip..
Step 306, local device does not do any process.
In the present embodiment, when adding new physical member port on the aggregation port of enable PTP function, by judging physical member port quantity current on the aggregation port of equipment of itself, achieve new different disposal flow process of adding physical member port, and pass through directly enable PTP function on aggregation port, simplify user's configuration, reduce the consumption of device resource, improve equipment performance, enhance the stability of network topology.
Embodiment two,
See Fig. 4, the schematic flow sheet when physical member port on the aggregation port of enable PTP function exits, this flow process can comprise:
Step 401, local device obtains the state of the physical member port exited, and processes accordingly according to its state information.
Particularly, local device, by obtaining the physical member port state information exited, has carried out the respective handling for the physical member port exited:
When the physical member port exited is common physical member port, forward step 410 to, when the physical member port exited is Backup port, forward step 402 to, when the physical member port exited is Active port, forward step 405 to.
Step 402, local device removes PTP function and the Role Information of the physical member port that this exits.
Step 403, local device judges whether also have other common physical member port in the aggregation port of enable PTP function.
In this step, whether in addition local device, by other common physical member port in the aggregation port that judges enable PTP function, when sometimes, forwards step 404 to, otherwise, forward step 409 to.
Step 404, local device selects new Backup port from common physical member port, is its configuration PTP function and Role Information, forwards step 409 to.
Backup port is wherein chosen, link principle of optimality can be adopted.
Step 405, local device removes PTP function and the Role Information of the physical member port that this exits.
Step 406, Backup port is set to Active port by local device.
Step 407, local device judges whether also have other common physical member port in the aggregation port of enable PTP function.
In this step, local device judges whether also have other common physical member port in the aggregation port of enable PTP function, when sometimes, forwards step 408 to, otherwise, forward step 409 to.
Step 408, local device selects new Backup port from common physical member port, is its configuration PTP function and Role Information, forwards step 409 to afterwards.
Step 409, process ends.
Step 410, local device does not do any process.
In the present embodiment, when physical member port on the aggregation port of enable PTP function exits, by judging the state of the physical member port exited, achieve the different disposal flow process to the physical member port exited, and pass through directly enable PTP function on aggregation port, simplify user's configuration, reduce the consumption of device resource, improve equipment performance, enhance the stability of network topology.
Embodiment three,
See Fig. 5, the schematic flow sheet when physical member port on the aggregation port of enable PTP function breaks down, this flow process can comprise:
Step 501, local device obtains the state of the member port broken down, and processes accordingly according to its state information.
Particularly, local device, by obtaining the port status information of the member port broken down, has carried out the respective handling for the physical member port broken down:
When the physical member port broken down is common physical member port, forward step 510 to, when the physical member port broken down is Backup port, forward step 502 to, when the physical member port broken down is Active port, forward step 505 to.
Step 502, local device removes PTP function and the Role Information of the physical member port that this breaks down.
Step 503, local device judges whether also have other common physical member port in the aggregation port of enable PTP function.
In this step, local device judges whether also have other common physical member port in the aggregation port of enable PTP function, when sometimes, forwards step 504 to, otherwise, forward step 509 to.
Step 504, local device selects new Backup port from common physical member port, is its configuration PTP function and Role Information.
After the Backup port arrangement PTP function new for this and Role Information, forward step 509 to.
Step 505, local device removes PTP function and the Role Information of the physical member port that this breaks down.
Step 506, Backup port is set to Active port by local device.
Step 507, local device judges whether also have other common physical member port in the aggregation port of enable PTP function.
In this step, local device judges whether also have other common physical member port in the aggregation port of enable PTP function, when sometimes, forwards step 508 to, otherwise, forward step 509 to.
Step 508, local device selects new Backup port from this common physical member port, and is its configuration PTP function and Role Information, forwards step 509 to afterwards.
Step 509, process ends.
Step 510, local device does not do any process.
In the present embodiment, when physical member port on the aggregation port of enable PTP function breaks down, by judging the state of the physical member port broken down, achieve different disposal flow process when network members port is broken down, and pass through directly enable PTP function on aggregation port, simplify user's configuration, reduce the consumption of device resource, improve equipment performance, enhance the stability of network topology.
Based on the design identical with said method, the embodiment of the present application additionally provides a kind of time synchronism apparatus, and as shown in Figure 6, this device comprises:
Configuration process module 61, for being the enable PTP function of aggregation port, chooses activation port from the physical member port of aggregation port, and for activating port arrangement PTP function;
Interaction process module 63, for carrying out Role Information alternately with opposite equip., utilizes the Role Information allocation activation port determined;
Synchronous processing module 64, carries out time synchronized for the activation port by activating port and opposite equip..
This device also comprises: judge module 62, for judging the physical member port quantity of aggregation port;
Configuration process module 61, specifically for when physical member port is two or more, after the physical member port of aggregation port chooses activation port, backup port is chosen further from other physical member port activated beyond port, for backup port configuration PTP function, and after interaction process module and opposite equip. determination Role Information, according to the Role Information configuration backup port determined; When physical member port is zero, be only the enable PTP function of aggregation port.Judge module 62, also for when the aggregation port of enable PTP function adds physical member port, current physical member port quantity on the aggregation port judging this enable PTP function;
Configuration process module 61, for when present physical member port quantity is two or more, does not do any process; When present physical member port quantity is one, the physical member port choosing interpolation is backup port, is its configuration PTP function and Role Information; When present physical member port quantity is zero, choose the physical member port of this interpolation for activating port, for its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information allocation activation port determined, and carry out time synchronized by the activation port activating port and opposite equip..
Judge module 62, when also exiting for the physical member port of the aggregation port when enable PTP function, obtains the port status of the physical member port exited;
Configuration process module 61, for when the physical member port exited is common physical member port, does not do any process; When the physical member port exited is backup port, remove PTP function and the Role Information of the physical member port exited, if when also having common physical member port in the aggregation port of enable PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information; When the physical member port exited is for activating port, remove PTP function and the Role Information of the physical member port exited, backup port is set to activate port, if when also having common physical member port in the aggregation port of enable PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information.
Judge module 62, when also breaking down for the physical member port of the aggregation port when enable PTP function, obtains the port status of the physical member port broken down;
Configuration process module 61, for when the physical member port broken down is common member port, does not do any process; When the physical member port broken down is backup port, remove PTP function and the Role Information of the physical member port broken down, if when also having common physical member port in the aggregation port of enable PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information; When the physical member port broken down is for activating port, remove PTP function and the Role Information of the physical member port broken down, backup port is set to activate port, if when also having common physical member port in the aggregation port of enable PTP function, therefrom choose new backup port, and be new backup port configuration PTP function and Role Information.
Interaction process module 63, specifically for utilizing the aggregation port of Role Information determination local device for Master port or Slave port, when described aggregation port is Master port, configuring described activation port is Master port, when described aggregation port is Slave port, configuring described activation port is Slave port;
Synchronous processing module 64, specifically for when aggregation port is Master port, by activating the activation port transmission PTP mutual message of port to opposite equip., obtaining the timestamp information in PTP mutual message by opposite equip., utilizing timestamp information to carry out time synchronized;
When aggregation port is Slave port, by activating the PTP mutual message that port accepts opposite equip. is sent by corresponding activation port, obtains the timestamp information carried in PTP message, utilizing timestamp information to carry out time synchronized.
In the present embodiment, local device is to the enable PTP function of the aggregation port on equipment of itself, Active port is chosen from the physical member port of aggregation port, and the Active port arrangement PTP function for choosing, to carry out Role Information mutual with opposite equip., determines that the aggregation port of local device is Master(master) port or Slave(from) port, when the aggregation port of local device is Master port, configuration Active port is Master port, by the Active port transmission local zone time of Active port to opposite equip., this local zone time is utilized to carry out time synchronized by opposite equip., when the aggregation port of local device is Slave port, configuration Active port is Slave port, by the local zone time that Active port accepts opposite equip. is sent by corresponding Active port, this local zone time is utilized to carry out time synchronized, achieve the time synchronized based on aggregation port, reach the time synchronized with opposite equip., and pass through directly enable PTP function on aggregation port, simplify user's configuration, reduce the consumption of device resource, improve equipment performance, enhance the stability of network topology.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the application can add required general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, the technical scheme of the application can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform 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 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 in embodiment can carry out being distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.
Above-mentioned the embodiment of the present application sequence number, just to describing, does not represent the quality of embodiment.
Be only several specific embodiments of the application above, but the application is not limited thereto, the changes that any person skilled in the art can think of all should fall into the protection range of the application.

Claims (12)

1. a method for synchronizing time, is characterized in that, described method comprises:
Local device is aggregation port enable Precision Time Protocol PTP function, from the physical member port of described aggregation port, choose activation port, and is described activation port arrangement PTP function;
It is mutual that local device and PTP opposite equip. carry out Role Information, utilizes the Role Information determined to configure described activation port;
Local device 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 device comprises after being the enable PTP function of described aggregation port further:
Described local device judges the physical member port quantity of described aggregation port;
When described physical member port is two or more, after the physical member port of described aggregation port chooses activation port, backup port is chosen further from other physical member port beyond described activation port, for described backup port configuration PTP function, and with opposite equip. determination Role Information after, configure described backup port according to the Role Information determined;
When described physical member port is zero, do not do any process.
3. method as claimed in claim 2, is characterized in that, when the aggregation port of enable PTP function adds physical member port, described method comprises:
Current physical member port quantity on the aggregation port that described local device judges this enable PTP function;
When described present physical member port quantity is two or more, do not do any process;
When described present physical member port quantity is one, the physical member port choosing interpolation is backup port, is its configuration PTP function and Role Information;
When described present physical member port quantity is zero, choose the physical member port of this interpolation for activating port, for its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information determined to configure 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, it is characterized in that, when the physical member port of the aggregation port of enable PTP function exits, described method comprises:
The port status of the physical member port exited described in described local device obtains;
When the described physical member port exited is common physical member port, do not do any process;
When the described physical member port exited is backup port, the PTP function of the physical member port exited described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port exited is for activating port, the PTP function of the physical member port exited described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP 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, it is characterized in that, when the physical member port of the aggregation port of enable PTP function breaks down, described method comprises:
The port status of the physical member port broken down described in described local device obtains;
When the described physical member port broken down is common physical member port, do not do any process;
When the described physical member port broken down is backup port, the PTP function of the physical member port broken down described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port broken down is for activating port, the PTP function of the physical member port broken down described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
6., as the method as described in arbitrary in claim 1 to 5, it is characterized in that,
Utilize the aggregation port of Role Information determination local device for Master port or Slave port;
When the aggregation port of local device is Master port, it is Master port that local device configures described activation port, described local device is by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain the timestamp information in described PTP mutual message by described opposite equip., utilize described timestamp information to carry out time synchronized;
When the aggregation port of local device is Slave port, it is Slave port that local device configures described activation port, the PTP mutual message that described local device is sent by corresponding activation port by described activation port accepts opposite equip., obtain the timestamp information carried in described PTP message, utilize described timestamp information to carry out time synchronized.
7. a time synchronism apparatus, is characterized in that, comprising:
Configuration process module, for being aggregation port enable Precision Time Protocol PTP function, chooses activation port from the physical member port of described aggregation port, and is described activation port arrangement PTP function;
Interaction process module, for carrying out Role Information alternately with PTP opposite equip., utilizes the Role Information determined to configure described activation port;
Synchronous processing module, for carrying out time synchronized by the activation port of described activation port and described opposite equip..
8. device as claimed in claim 7, is characterized in that, also comprise:
Judge module, for judging the physical member port quantity of described aggregation port;
Described configuration process module, specifically for when described physical member port is two or more, after the physical member port of described aggregation port chooses activation port, backup port is chosen further from other physical member port beyond described activation port, for described backup port configuration PTP function, and after described interaction process module and opposite equip. determination Role Information, configure described backup port according to the Role Information determined; When described physical member port is zero, be only the enable PTP function of aggregation port.
9. device as claimed in claim 8, is characterized in that, when the aggregation port of enable PTP function adds physical member port,
Described judge module, also current physical member port quantity on the aggregation port judging this enable PTP function;
Described configuration process module, for when described present physical member port quantity is two or more, does not do any process;
When described present physical member port quantity is one, the physical member port choosing interpolation is backup port, is its configuration PTP function and Role Information;
When described present physical member port quantity is zero, choose the physical member port of this interpolation for activating port, for its configuration PTP function, to carry out Role Information mutual with opposite equip., utilize the Role Information determined to configure described activation port, and carry out time synchronized by the activation port of described activation port and opposite equip..
10. device as claimed in claim 8, is characterized in that, when the physical member port of the aggregation port of enable PTP function exits,
Described judge module, for the port status of physical member port exited described in obtaining;
Described configuration process module, for when described in the physical member port that exits be common physical member port time, do not do any process;
When the described physical member port exited is backup port, the PTP function of the physical member port exited described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port exited is for activating port, the PTP function of the physical member port exited described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
11. devices as claimed in claim 8, is characterized in that, when the physical member port of the aggregation port of enable PTP function breaks down,
Described judge module, for the port status of physical member port broken down described in obtaining;
Described configuration process module, for when described in the physical member port that breaks down be common member port time, do not do any process;
When the described physical member port broken down is backup port, the PTP function of the physical member port broken down described in removal and Role Information, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information;
When the described physical member port broken down is for activating port, the PTP function of the physical member port broken down described in removal and Role Information, backup port is set to activate port, if when also having common physical member port in the aggregation port of described enable PTP function, therefrom choose new backup port, and be described new backup port configuration PTP function and Role Information.
12., as the device as described in arbitrary in claim 7 to 11, is characterized in that,
Described interaction process module, specifically for utilizing the aggregation port of Role Information determination local device for Master port or Slave port, when described aggregation port is Master port, configuring described activation port is Master port, when described aggregation port is Slave port, configuring described activation port is Slave port;
Described synchronous processing module, specifically for when described aggregation port is Master port, by the activation port transmission PTP mutual message of described activation port to opposite equip., obtain the timestamp information in described PTP mutual message by described opposite equip., utilize described timestamp information to carry out time synchronized;
When described aggregation port is Slave port, the PTP mutual message sent by corresponding activation port by described activation port accepts opposite equip., is obtained the timestamp information carried in described PTP message, utilizes 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 CN103312429A (en) 2013-09-18
CN103312429B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105744616B (en) * 2014-12-08 2018-03-23 中国移动通信集团公司 A kind of method for synchronizing time and device
CN105827570A (en) * 2015-01-06 2016-08-03 中兴通讯股份有限公司 Method, device and system for time synchronization of aggregation network precision time protocol (PTP)
CN109120392A (en) * 2017-06-22 2019-01-01 中兴通讯股份有限公司 Time translation method and device, equipment, storage medium, processor
CN114124275A (en) * 2020-08-31 2022-03-01 深圳市中兴微电子技术有限公司 Time synchronization method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7366964B2 (en) * 2004-07-23 2008-04-29 Intel Corporation Method, system, and apparatus for loopback entry and exit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN103312429A (en) 2013-09-18

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
CN103312429B (en) A kind of method for synchronizing time and device
EP3016316B1 (en) Network control method and apparatus
CN103312428B (en) For the method and apparatus of precision clock protocol synchronization network
EP2802097B1 (en) Clock synchronization method and device
EP3140932A1 (en) A method for robust ptp synchronization with default 1588v2 profile
CN105515759A (en) Micro service registration method and micro service registration system
CN106156318B (en) System and method for realizing high availability of multi-node database
WO2015196685A1 (en) Clock synchronization method and apparatus
JPH0267033A (en) Network synchronizing system
CN108259109B (en) Network equipment in PTP domain and TOD synchronization method
CN103001759B (en) A kind of network method for synchronizing time, system and device
JP5266705B2 (en) Communications system
GB2404121A (en) Inter-network synchronisation
CN1937484A (en) Method and system for realizing multi-clock synchronization
CN112087506B (en) Cluster node management method and device and computer storage medium
CN103532970B (en) The transmission method of a kind of time synchronized message and equipment
CN103259639B (en) A kind of clock synchronizing method of stack equipment and equipment
US9705823B2 (en) Port status synchronization method, related device, and system
CN102983997A (en) Method and device for migrating master services
US20100318646A1 (en) Method of correction of network synchronisation
CN111064622B (en) Network device, synchronization apparatus, and information transmission method
WO2014086254A1 (en) Clock protection method and system and related ordinary clock device
JP2010108407A (en) Apparatus, system, method and program for issuing synchronous message
CN112865899B (en) Method and device for adjusting physical layer (PHY) master-slave mode

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

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.

CP03 Change of name, title or address
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.

TR01 Transfer of patent right