WO2021139692A1 - 一种时钟端口属性恢复方法, 设备及系统 - Google Patents

一种时钟端口属性恢复方法, 设备及系统 Download PDF

Info

Publication number
WO2021139692A1
WO2021139692A1 PCT/CN2021/070507 CN2021070507W WO2021139692A1 WO 2021139692 A1 WO2021139692 A1 WO 2021139692A1 CN 2021070507 W CN2021070507 W CN 2021070507W WO 2021139692 A1 WO2021139692 A1 WO 2021139692A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
network device
port
clock
message
Prior art date
Application number
PCT/CN2021/070507
Other languages
English (en)
French (fr)
Inventor
吕京飞
张亚伟
王锦辉
李�浩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21738393.4A priority Critical patent/EP4068659B1/en
Priority to JP2022541659A priority patent/JP7451721B2/ja
Priority to KR1020227023544A priority patent/KR102684118B1/ko
Publication of WO2021139692A1 publication Critical patent/WO2021139692A1/zh
Priority to US17/857,412 priority patent/US20220337384A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0008Synchronisation information channels, e.g. clock distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0641Change of the master or reference, e.g. take-over or failure of the master
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure

Definitions

  • This application relates to the field of communications, a method, equipment and system for restoring clock port attributes.
  • clock synchronization becomes more and more important.
  • NTP network time protocol
  • IEEE 1588V2 IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control
  • BMC Best Master Clock
  • the embodiments of the present application provide a method, device, and system for restoring clock port attributes to solve the technical problem that the clock port attributes cannot be restored and the clock port status may be incorrect.
  • the technical solutions are as follows:
  • a method for restoring attributes of a clock port is provided.
  • the method can be executed by a first network device.
  • the method includes the following steps: the first network device does not receive N pieces of the first type within a timeout period according to the clock port.
  • Clock message the value of the port data set signal failure attribute of the clock port is set to the first value
  • the clock port is connected to the master clock port of the second network device
  • the clock port is a slave port or a passive port
  • the clock message can be any of the following three kinds of clock messages: synchronization message, follow message, and delayed response message.
  • N is a positive integer greater than 0.
  • the first value indicates that the clock port generates a message. The text is lost.
  • the first network device sets the value of the signal failure attribute of the port data set to the first value
  • the value of the signal failure attribute of the port data set is set to the second value, indicating that the No packet loss occurred on the clock port.
  • the method of restoring the value to the second value according to the recovery conditions can help the port
  • the value of the signal failure attribute of the data set is kept correct, so that the state of the clock port can maintain the journey, thereby ensuring the correctness of the clock tracking relationship.
  • determining that the first network device meets the recovery condition includes: the first network device receives a configuration instruction, the configuration instruction is used to instruct the first network device to invalidate the value of the port data set signal Set to the second value.
  • the administrator can modify the value of the port data set signal failure attribute to the second through configuration instructions. value. In this way, the impact on the network equipment can be reduced, and the status of the port can be restored directly and quickly.
  • the first network device determines that the recovery condition is satisfied, including: the first network device receives M synchronization messages and M follow messages within the first time, where M is greater than 0 Is a positive integer.
  • the network device confirms that the recovery conditions are met after receiving the synchronization message and the following message that meet the requirements, which helps to reduce the workload of the management personnel, and automatically confirms that the recovery conditions are met.
  • the first type of clock message is a synchronization message
  • the first network device determines that the recovery condition is satisfied, including: the first network device receives M within the second time A synchronization message, or the clock message of the first type is a follow-up message, and the first network device determines that a recovery condition is satisfied, including: the first network device receives M follow-up messages within the second time Message, M is a positive integer greater than 0.
  • the network device confirms that it meets the recovery condition by confirming that it has received a clock message corresponding to the first type that meets the requirements, which helps to reduce the workload of the management personnel, and automatically confirms that the recovery condition is satisfied.
  • the first network device determining that the recovery condition is satisfied includes: the first network device receives a second message, the second message indicating that the delayed response packet loss state of the clock port is recovered . After the attribute value of the clock port becomes the first value, the clock port will not send a delay request message to the corresponding master clock port, so the clock port will no longer receive a delay response message.
  • the manager can issue a message through the management system, or the manager can directly issue a configuration command through the management interface of the device, indicating that the delayed response packet of the port is restored to the state, thereby confirming that the recovery condition is met.
  • the first network device sets the value of the port data set signal failure attribute of the clock port to be based on the clock port not receiving N clock messages of the first type within the timeout period
  • the first value includes: the first network device generates the first event according to the clock port not receiving the N clock messages of the first type within the timeout period.
  • the first network device sets the value of the signal failure attribute of the port data set to the first value according to the first event.
  • the network device generates the corresponding message loss event after the message is lost, and can record the related information of the message loss, such as: port information, the type of the lost message, and so on.
  • the network device can also change the value of the port attribute according to the event, which is more helpful to record related faults and changes on the network device.
  • the first network device when the first network device determines that the recovery condition is satisfied, sets the value of the port data set signal failure attribute to the second value, including: When the first network device determines that the recovery condition is satisfied, the first network device determines that the first loss event is eliminated. The first network device eliminates according to the first event, and sets the value of the signal failure attribute of the port data set to the second value.
  • the network device determines that the recovery condition is met, such as receiving a corresponding message or receiving a configuration instruction, it can determine that the first loss event is eliminated, and by determining that the first loss event is eliminated, the value of the port attribute is restored. It is also possible to further modify the information recorded in the first loss event, which helps to record information such as failure recovery on the network device.
  • the first network device eliminates according to the first event, and sets the value of the port data set signal failure attribute to the second value, including: the first network device eliminates the signal according to the The first event is eliminated, and the value of the port parameter corresponding to the first event of the clock port is set to a third value, where the third value indicates that the clock packet corresponding to the port parameter is not lost; The first network device sets the value of the signal failure attribute of the port data set to the second value according to the value of the clock port parameter.
  • the first event includes the first type of identification.
  • the first network device when the first network device determines that the recovery condition is satisfied, sets the value of the signal failure attribute of the port data set to the second value, including: According to the determination that the recovery condition is satisfied, the first network device sets the value of the port parameter of the clock port corresponding to the first type to a third value, and the third value indicates that the clock packet corresponding to the port parameter is not lost The first network device sets the value of the signal failure attribute of the port data set to the second value according to the value of the clock port parameter.
  • the method of defining the port parameters corresponding to the packet loss event on the network device, and the method of updating the value of the port parameter according to the event information can accurately record the loss status of various types of packets of the network device, which is convenient for the network device Restore the value of the port attribute according to the port parameter, the record is clearer and easier to judge.
  • the method further includes: the first network device according to the The value of the signal failure attribute of the port data set is the first value, and the value of the Erbest data set of the clock reference source of the clock port is set to null.
  • the first network device if the value of the signal failure attribute of the port data set is the first value, the first network device generates a state decision event, and the state decision event is used to instruct the first network device to make a decision The state of the clock port.
  • the method further includes: the first network device sets the Erbest data The value of the set is set to non-empty.
  • the value of the signal failure attribute of the port data set is the second value.
  • the clock message is a precision time protocol PTP clock message.
  • the network device can flexibly adjust the value of the port data set on the network device to be empty or non-empty, thereby making the network device more accurate
  • the BMC algorithm determines the port status according to the value of the port data set to ensure the correctness of the clock tracking relationship in the network.
  • a first network device in a second aspect, includes: a processing unit and a first communication unit,
  • the processing unit is configured to set the value of the port data set signal failure attribute of the first communication unit to the first communication unit according to the first communication unit not receiving N clock messages of the first type within the timeout period.
  • a value, the first type of clock message is any one of the following three types of clock messages: a synchronization message, a follow message, and a delayed response message, the N is a positive integer greater than 0, and the The first value indicates that the first communication unit has packet loss; the first communication unit is used to communicate with the master clock port of the second network device, and the clock port status of the first communication unit is slave port or passive Port; after the processing unit sets the value of the signal failure attribute of the port data set to the first value, the processing unit is further configured to determine the signal failure attribute of the port data set according to the determination that the recovery condition is satisfied The value is set to a second value, and the second value indicates that no packet loss has occurred in the first communication unit.
  • the second communication unit is configured to receive a configuration instruction, and the configuration instruction is used to instruct the processing unit to set the value of the port data set signal failure attribute to the second value
  • the processing unit is further configured to determine that the restoration condition is satisfied according to the configuration instruction received by the second communication unit.
  • the processing unit is further configured to determine that the recovery condition is satisfied according to the M synchronization messages and M follow messages received by the first communication unit within the first time, so Said M is a positive integer greater than zero.
  • the first type of clock message is a synchronization message
  • the processing unit is further configured to determine according to the M synchronization messages received by the first communication unit within the second time Satisfy the recovery condition; or the first type of clock message is a follow-up message, and the processing unit is further configured to receive M follow-up messages within the second time according to the first communication unit, It is determined that the restoration condition is satisfied; M is a positive integer greater than 0.
  • the processing unit is further configured to determine that the recovery condition is satisfied according to the second message received by the second communication unit, and the second message indicates the delay of the first communication unit The lost state of the response message is restored.
  • the processing unit is further configured to generate a first event according to the first communication unit not receiving the N clock messages of the first type within a timeout period; the processing The unit is further configured to set the value of the signal failure attribute of the port data set to the first value according to the first event.
  • the processing unit is further configured to generate a first event according to the first communication unit not receiving the N clock messages of the first type within a timeout period; the processing The unit is further configured to set the value of the signal failure attribute of the port data set to the first value according to the first event.
  • the processing unit is further configured to determine that the first loss event is eliminated according to the determination that the recovery condition is satisfied; the processing unit is further configured to eliminate the first loss event according to the first event, and The value of the signal failure attribute of the port data set is set to the second value.
  • the processing unit is further configured to set the value of the port parameter corresponding to the first event of the communication unit to a third value according to the elimination of the first event, and the first event The three-value indicates that the clock message corresponding to the port parameter is not lost; the processing unit is further configured to set the value of the signal failure attribute of the port data set to the third value according to the value of the clock port parameter. The second value.
  • the processing unit is further configured to set the value of the port parameter of the first communication unit corresponding to the first type to a third value according to the determination that the restoration condition is satisfied, and the first type The three-value indicates that the clock message corresponding to the port parameter is not lost; the processing unit is further configured to set the value of the signal failure attribute of the port data set to the third value according to the value of the clock port parameter. The second value.
  • the processing unit is further configured to set the value of the Erbest data set of the clock reference source of the clock port to be empty according to the value of the signal failure attribute of the port data set as the first value.
  • the processing unit when the value of the signal failure attribute of the port data set is the first value, the processing unit is also used to generate a state decision event, and the state decision event is used to instruct the processing unit to make a decision The state of the clock port.
  • the processing unit is further configured to set the value of the Erbest data set to be non-empty.
  • the processing unit sets the value of the signal failure attribute of the port data set to the first value
  • the value of the signal failure attribute of the port data set is the second value
  • an embodiment of the present application provides another network device, which is characterized by comprising: at least one processor, the at least one processor is coupled with at least one memory: the at least one processor is configured to execute all The computer program or instruction stored in the at least one memory causes the network device to execute the method described in the first aspect.
  • a chip which includes a processor and an interface circuit.
  • the interface circuit is used to receive instructions and transmit them to the processor; the processor is used to execute the method described in the first aspect.
  • a network system in a fifth aspect, includes a first network device and a second network device.
  • the first network device is the first network device described in the second aspect or the network device provided in the third aspect.
  • a network device, the second network device includes a communication interface, the second network device communicates with the first network device through the communication interface, and the clock port status of the communication interface is a master clock port.
  • embodiments of the present application also provide a computer-readable storage medium, including a computer program, which when running on a computer, causes the computer to execute the method described in the first aspect.
  • FIG. 1 is a schematic diagram of a clock tracking relationship scenario provided by an embodiment of the application
  • Figure 2a is a schematic diagram of a clock tracking relationship provided by an embodiment of the application.
  • 2b is a schematic diagram of a clock tracking relationship provided by an embodiment of the application.
  • Figure 3a is a schematic diagram of a clock synchronization process provided by an embodiment of the application.
  • Figure 3b is a schematic diagram of a clock synchronization process provided by an embodiment of the application.
  • FIG. 4 is a flowchart of a method for restoring the state of a clock port provided by an embodiment of the application
  • FIG. 5a is a flowchart of a method for restoring a clock port state according to an embodiment of the application
  • FIG. 5b is a flowchart of a method for restoring a clock port state according to an embodiment of the application
  • FIG. 6a is a flowchart of a method for restoring a clock port state according to an embodiment of the application
  • FIG. 6b is a flowchart of a method for restoring a clock port state according to an embodiment of the application
  • FIG. 7 is a schematic structural diagram of an apparatus for realizing clock port state recovery provided by an embodiment of the application.
  • FIG. 8 is a schematic structural diagram of an apparatus for realizing clock port state recovery provided by an embodiment of the application.
  • FIG. 9 is a schematic structural diagram of an apparatus for implementing clock port state recovery provided by an embodiment of the application.
  • ITU-T International Telecommunication Union-Telecommunication Standardization Sector
  • G is a series of recommended standards in the ITU-T chapters on transmission systems and media, digital systems and networks (transmission systems and media, digital systems and networks).
  • ITU-T G.8275.1 is used in mobile bearer networks where every device supports the 1588 protocol
  • ITU-T G.8275.2 is used in mobile bearer networks where some devices support the 1588 protocol.
  • the principles of ITU-T G.8275.1 and ITU-T G.8275.2 are the same.
  • the BMC algorithm needs to be used to select the optimal 1588 clock.
  • the source is tracked to determine the master clock port, slave clock port, or passive clock port of the device, which can also be called master port, slave port, and passive port.
  • the clock port of the device is determined by the device in the network, and the clock tracking relationship formed can be shown in Figure 1.
  • Figure 1 is a schematic diagram of a clock tracking relationship scenario provided by this application.
  • Figure 1 shows a network with 4 network devices.
  • the network device 101 is connected to a clock source, and the network device 101 is connected to the network device 102.
  • the network device 103 is connected, the network device 102 is connected to the network device 101 and the network device 104, the network device 103 is connected to the network device 101 and the network device 104, and the network device 104 is connected to the network device 101 and the network device 103.
  • the master port determined by the network device 101 is port 1
  • the slave port determined by the network device 102 is port 2
  • the master port is port 3
  • the slave port determined by the network device 103 is port 4
  • the master port is port 5
  • the network device 104 determines
  • the slave port is port 6, the master port is port 7, and the passive port is port 8.
  • the clock tracking relationship formed by the network is: network device 101->network device 102->network device 104, and network device 101->network device 103.
  • the tracking relationship can be as simple as shown in FIG. 2a.
  • the second network device receives from port-port 2 and responds to the clock message sent by port-port 1 of the first network device, thereby performing clock information synchronization.
  • the clock messages sent between devices mainly include an announce message, a sync message, a follow_up message, a delay request (delay_req) message, and a delay response (delay_resp) message.
  • the Announce message is mainly used for the BMC source selection algorithm to decide whether the port status is master, slave, or passive.
  • the port status is initializing, and then each port will send announce messages to each other.
  • the device determines the port status (master/slave, etc.) through the BMC source selection algorithm only the master port will When sending an announce message, the slave port will not send an announce message.
  • the announce message information received by the slave port changes or the slave port cannot receive the announce message, the BMC source selection algorithm will recalculate the port status and update the status of each port.
  • Sync message, follow_up message, delay_req message and delay_resp message are mainly used for time synchronization.
  • the following is mainly combined with master port and slave port to explain ,
  • the interaction between the main port and the passive port is similar, so I won’t repeat it.
  • the detailed process is as follows:
  • the master port sends a sync message to the slave port, and records the sending time T1 when sending the sync message; if the master port is configured in one-step mode, T1 will fill in a certain field of the sync message, and Sent to the slave port.
  • S302 can be executed before S303, and S302 can also be executed after S303.
  • the time error (TE) between the slave port and the master port can be obtained by the following formula:
  • TE [(t2–t1)–(t4–t3)]/2.
  • the G.8275.2 standard also defines the Packet Timing Signal Fail (PTSF) function. This function is applied when a packet loss occurs on the clock port. It includes the following two events:
  • Packet timing signal failure-loss sync (PTSF-losssync) event When the slave port detects that any of the three types of messages (sync message, follow_up message or delay_resp message) is lost, the slave The port needs to generate a PTSF-losssync event;
  • Packet timing signal failure-unusable (PTSF-unusable) event The slave port detects the input sync message, the time stamp calculated by the follow_up message and the delay_resp message when the time error TE exceeds the requirement, then PTSF- unusable event.
  • the network device When the above 1) or 2) occurs, the network device will set the value of the port data set signal final (portdataset signal final, portDS.SF) attribute of the slave port to TRUE.
  • the value of portDS.SF is further used to indicate whether the port is invalid.
  • the clock reference source (Erbest) data set of the slave port When its value is true, the clock reference source (Erbest) data set of the slave port is set to empty, and then the BMC algorithm is triggered to recalculate the port status and change this The port is set to the master state, so that the clock port cannot participate in clock source selection. That is, the state of the second network device port 2 as shown in FIG. 2a will be changed to the state of the master port as shown in FIG. 2b.
  • Port 2 of the second network device becomes the master state, and after the fault is rectified, the port 2 will continue to receive sync packets and follow_up packets sent by the first network device (follow_up packets are only configured when the clock tracking relationship is configured as It will be received in two-step mode), but since port 2 will not send a delay_req message to port 1 of the first network device at this time, the first network device will not send a delay_resp message to the second network device. Port 2, so that port 2 of the second network device cannot receive the delay_resp message. Therefore, the PTSF-losssync event of port 2 of the second network device cannot be eliminated, and the value of portDS.SF of the port data set of this port is still TRUE .
  • the portDS.SF value of the port data set of the port is TRUE, the value of the Erbest data set of the port will not be set to non-empty, which will cause the port to be no longer available.
  • the device determines the port state through the BMC algorithm, it returns to the slave state. And if portDS.SF is false (FALSE), then the device will not set the reference source data set Erbest of the port to an empty set, which will not affect the clock source selection of the port.
  • This technical solution can not only be applied to the 1588 standard ITU-T G.8275.2 of telecommunications, it can also be applied to the 1588 standard ITU-T G.8275.1 of telecommunications, and it can also be applied to the 1588 basic protocol IEEE 1588 and the 1588 standard IEEE 1588 in the telecom field C37.238, the 1588 standard SMPTE2059 of the Society of Motion Picture and Television Engineers (SMPTE), etc.
  • the method for realizing clock port state recovery includes:
  • S401 The network device detects that a packet loss occurs on the clock port within the timeout period.
  • the network device 104 determines that one of its clock ports, such as port 6 or port 8, has not received N clock messages of the first type within a certain timeout period, and generates a message loss event.
  • the timeout period can be a specified specific timeout period, for example, the specified timeout period is 6s, or it can be a multiple of the receiving interval of a certain type of message, for example, when the receiving time of a certain type of message is 3 seconds (second, s) , The timeout time can be 3 times the receiving time interval, that is, 9s finally;
  • N can be the specified number of lost clock packets, for example, the value can be configured by the network manager through the management system or the management interface
  • the instructions configured on the network device 104 can also be the number specified by the 1588 clock protocol, or a certain value preset by the network device 104 when it is manufactured, and its value is an integer greater than or equal to 1.
  • the clock synchronization operation mechanism on the network device 104 is in the one-step mode, there is no need to consider the following message.
  • the clock synchronization operation mechanism configured by the network device is in the two-step mode, it is necessary to consider the following message. That is, in one-step mode, the network device confirms that any slave or passive port on it has not received one of the following two types of messages within the timeout period: synchronization messages and delayed response messages, then it is determined Packet loss occurred on this clock port.
  • the network device confirms that any slave or passive port on it has not received one of the following three types of messages within the timeout period: synchronization messages, follow messages, and delayed response messages Message, it is determined that the clock port has a message loss.
  • the network device restores the attribute value of the clock port, the message that needs to be received is the same as here, that is, when it is in one-step mode, it only determines whether a synchronization message is received.
  • the status of the delayed response message and the delayed response message when it is in the two-step mode, it is determined whether the synchronization message and the following message are received at the same time, as well as the delayed response message state. This will not be done in other embodiments of this application. Elaborate in detail.
  • a packet loss event is generated.
  • the packet loss event is a PTSF-losssync event.
  • the message loss event indicates that a message loss has occurred on the clock port, and the type of the lost clock message can be any one or more of a synchronization message, a follow message, or a delayed response message.
  • the message loss event also includes an indication of the type of the lost clock message.
  • the message loss event includes a lost clock message type field, which indicates what event the clock port has lost.
  • the message loss event may include 3 type fields: synchronization message type, follow message type, and delayed response type.
  • synchronization message type When the value of the corresponding type field is set to a special value, such as 1, It is considered that the clock message of this type is lost.
  • the network device can update the information of the second type field of the loss event To this event, or generate another message loss event.
  • the network device sets the port attribute value of the clock port to the first value according to detecting that the packet loss of the clock port occurs.
  • the network device 104 sets the value of portDS.SF of the port 6 to the first value according to the packet loss of the port 6.
  • the network device 104 may also set the portDS.SF value of the port to the first one according to the packet loss event.
  • the network device 104 may try to set the value of portDS.SF of the port to the first value while generating the packet loss event or after generating the packet loss event.
  • the first value is true.
  • the clock port of the network device also has a port parameter corresponding to the message type.
  • the value of the port parameter is set to true. Indicates that the corresponding type of packet loss occurred on the clock port.
  • the network device may also set the value of the port parameter to true based on the foregoing packet loss event.
  • the recovery conditions include that when the port 6 of the network device 104 receives all types of clock messages in the synchronization message and the follow message, and after each type of clock message has received M consecutively, the network device Or the management and maintenance personnel determine the recovery of the corresponding packet loss event.
  • M can be the specified number of lost clock packets.
  • Continuous reception means that when the packet transmission rate of the master port tracked by port 6 is 1 second each, then when port 6 receives 2 synchronization packets within 2 consecutive seconds, it receives 2 packets within 2 consecutive seconds.
  • a follow-up message, and the synchronization message and the follow-up message are received within a certain packet transmission interval. For example, if two synchronization messages and two follow-up messages are received within 4 seconds, the recovery conditions are considered to be met.
  • the port attribute is configurable.
  • the management personnel can issue a configuration instruction to the network device through configuration, and the configuration instruction instructs the network device 104 to The port attribute value of port 6 is set to the second value.
  • the network device when the network device detects a packet loss on the clock port, generates a packet loss event, and modifies the value of portDS.SF to the first value according to the packet loss event, then when the network device receives the above After the message, the message loss event is eliminated.
  • the network device can eliminate the message loss event and set the value of portDS.SF of the clock port to the second value.
  • the clock port has two configurable port parameters, the value of which can be any value that can indicate true or false, such as: port signal failure synchronization packet loss attribute (portDS.SF.losssync) and port signal The invalid unusable attribute (portDS.SF.unusable).
  • port signal failure synchronization packet loss attribute portDS.SF.losssync
  • port signal The invalid unusable attribute portDS.SF.unusable.
  • the network device 104 automatically sets the value of the port attribute portDS.SF to FALSE, and the device will no longer reference the Erbest data set of port 6 Set it to an empty set, which will trigger the BMC algorithm to re-update the port status to slave status or other status.
  • the second value is false.
  • the network device when the network device still has port parameters corresponding to the message type or the message loss event, after the network device receives the message, the value of the corresponding port parameter is set to false.
  • the network device can set the value of portDS.SF of the clock port to the second value based on the values of all port parameters being false.
  • the clock port can receive the synchronization message and the following message.
  • the clock port can automatically set the port parameters corresponding to the message type. The value of is changed to false.
  • the clock port since the state of the clock port has been changed to master, the clock port will not send a delay request message to the master port connected to it, and the clock port will not receive a delay response message either. At this time, you can define a corresponding port parameter for the delayed response message.
  • the network administrator can modify the value of this parameter to false by default. In this way, when the network device receives the synchronization message and/or the follow message, it can automatically modify the value of portDS.SF of the clock port to false. Of course, the network administrator can also configure some policies to automatically modify the value of the port parameter to false.
  • the method for realizing clock port state recovery includes:
  • S501 The network device detects that the first type of clock packet loss occurs on the clock port, and generates a first packet loss event.
  • the network device 104 detects its slave port or passive port. If the first type of clock packet loss occurs on port 6 or port 8, a first packet loss event is generated. As shown in the above S401, the network device 104 detects that its first type of clock packet is lost, which may be detected by detecting that its port 6 or port 8 has not received N clock packets of the first type within the timeout period. Details For information, please refer to S401, which will not be repeated here.
  • the network device 104 when the first type is a synchronization message, the network device 104 generates a first message loss event.
  • the message loss event is a lost synchronization event, which may also be referred to as a packet timing signal failure loss synchronization event (PTSF-loss-sync-message). This event is used to indicate that port 6 or port 8 has lost synchronization packets.
  • PTSF-loss-sync-message packet timing signal failure loss synchronization event
  • the network device 104 when the first type is a follow-up message, the network device 104 generates a first message loss event, and the message loss event is a loss follow-up event, which can also be referred to as a packet timing signal failure loss follow-up event (PTSF-loss-follow-up-message). This event is used to indicate that the following packet loss occurs on port 6 or port 8.
  • PTSF-loss-follow-up-message packet timing signal failure loss follow-up event
  • the network device 104 when the first type is a delayed response message, the network device 104 generates a first message loss event.
  • the message loss event is a loss delayed response event, which may also be referred to as a packet timing signal failure loss. Delayed response event (PTSF-loss-delay-resp-message). This event is used to indicate that a delayed response packet is lost on port 6.
  • PTSF-loss-delay-resp-message This event is used to indicate that a delayed response packet is lost on port 6.
  • S503 The network device sets the port attribute value of the clock port to the first value according to the first packet loss event.
  • the network device 104 when the network device 104 generates the packet timing signal failure and synchronization event of port 6 or the network device 104 receives the packet timing signal failure and synchronization event generated by the port 6 or port 8 After that, the network device 104 sets the invalid attribute value of the packet timing signal of port 6 to true.
  • the network device also detects that the clock port also loses the second type of clock packet, and generates a second packet loss event.
  • the port 6 or the port 8 of the network device 104 also lost N second type clock messages, and the second type clock messages are clock messages different from the first type.
  • the network device also detects that the clock port also loses the third type of clock packet, and generates a third packet loss event.
  • port 6 or port 8 of the network device 104 also lost N third-type clock messages, and the third-type clock messages are clock message types different from the first and second types. .
  • the occurrence time of the above steps S505, S507 and step S501 is not limited, that is, the first type of clock message can be any one of synchronization messages, follow messages and delayed response messages, and the second type of clock messages
  • the message is different from the first type, any of the three types of clock messages, and the third type of clock message is a clock message of the first type and the second type among these three types of messages.
  • the network device 104 can set the value of the port attribute of the packet timing signal failure to true.
  • the clock port of the network device receives the clock message of the first type, and confirms that the first message loss event is eliminated.
  • the network device 104 may generate a synchronization message loss elimination event, and the network device can generate a synchronization message loss elimination event according to the synchronization message.
  • Message loss elimination event confirm that the first message loss event is eliminated.
  • the network device 104 confirms that the first message loss event is eliminated.
  • the network device 104 when the first type is a follow-up message, after port 6 of the network device 104 continuously receives M follow-up messages, the network device 104 can generate a follow-up message loss elimination event, and the network device can generate a follow-up message loss elimination event according to the Follow the message loss elimination event to confirm that the first message loss event is eliminated.
  • the network device 104 confirms that the delayed response message loss event is eliminated, and the network device According to the delayed response message loss elimination event, it is confirmed that the first message loss event is eliminated.
  • the clock port of the network device receives the second type of clock message, and confirms that the second message loss event is eliminated.
  • the network device 104 may generate a synchronization message loss elimination event, and the network device may generate a synchronization message loss elimination event according to the synchronization message.
  • the message loss elimination event confirm that the second message loss event is eliminated.
  • the network device 104 when the second type is a synchronization message, after port 6 of the network device 104 receives M synchronization messages, the network device 104 does not need to generate a synchronization message loss elimination event, and the network device 104 confirms the first 2. Elimination of message loss events.
  • the network device 104 may generate a follow-up message loss elimination event, and the network device can generate a follow-up message loss elimination event according to the follow-up message Message loss elimination event, confirm that the second message loss event is eliminated.
  • the network device 104 when the second type is a delayed response message, after port 6 of the network device 104 receives M delayed response messages, the network device 104 does not need to generate a delayed response message loss elimination event, and the network device 104 confirms that the second message loss event is eliminated.
  • the network device considers that the second packet loss event is recovered according to the elimination of the second packet loss event.
  • the clock port of the network device receives the third type of clock message, and confirms that the third message loss event is eliminated.
  • the network device 104 may generate a synchronization message loss elimination event, and the network device may generate a synchronization message loss elimination event according to the synchronization message.
  • the message loss elimination event confirm that the third message loss event is eliminated.
  • the third type is a synchronization message
  • the network device 104 after port 6 of the network device 104 receives M synchronization messages, the network device 104 does not need to generate a synchronization message loss elimination event, and the network device 104 confirms the first 3. Elimination of message loss events.
  • the network device 104 may generate a follow-up message loss elimination event, and the network device can generate a follow-up message loss elimination event according to the follow-up message.
  • Message loss elimination event confirm the elimination of the third message loss event.
  • the third type is a delayed response message
  • the network device 104 does not need to generate a delayed response elimination event, and the network device 104 confirms the first 3. Elimination of message loss events.
  • the network device considers that the third packet loss event is recovered based on the elimination of the third packet loss event.
  • S515 The network device eliminates the first packet loss event, and sets the port attribute value of the clock port to the second value.
  • the network device 104 When the network device 104 only has the first packet loss event, the network device 104 eliminates the first packet loss event according to the port 6 and confirms that the first packet loss event is recovered. And according to the elimination of the first packet loss event, the port attribute value of the clock port is set to the second value.
  • the network device 104 sets the port attribute value of the clock port to the second value according to the elimination of the first packet loss event and the elimination of the second packet loss event.
  • the network device 104 When a third packet loss event still exists on port 6 of the network device 104, the network device 104 eliminates the first packet loss event, the second packet loss event, and the third packet loss event, and sets the clock port to the The attribute value is set to the second value.
  • the network device 104 when the network device 104 is configured in the one-step mode, the network device 104 sets the port attribute value of the clock port to the second value according to the elimination of the loss of synchronization event and the elimination of the loss of delay response event.
  • the network device 104 When the network device 104 is configured in the two-step mode, the network device 104 sets the port attribute value of the clock port to the second value according to the loss of synchronization event elimination, loss of delay response event elimination, and loss of follow-up event elimination.
  • the method for realizing clock port state recovery includes:
  • the network device 104 After the network device 104 generates the first packet loss event, the network device 104 sets the port parameter value corresponding to the packet loss event to a third value according to the first packet loss event, where the third value is Can be true. The third value is used to indicate that the clock port has lost the corresponding type of clock message.
  • the port parameter corresponding to the event is a lost synchronization parameter, which can also be referred to as: port data set signal failure attribute.
  • Loss of synchronization parameter (portDS.SF. loss-sync-message), that is, the message type corresponding to the port parameter is a synchronous message.
  • the value of the port parameter is the third value, indicating that the port has lost synchronization packets.
  • the port parameter corresponding to the event is a loss-follow-up parameter, which can also be called: port data set signal failure attribute.
  • Loss-follow-up parameter (portDS.SF.loss-follow-up -message), that is, the message type corresponding to the port parameter is follow message.
  • the value of the port parameter is the third value, indicating that the port loses the delayed follow-up packet.
  • the port parameter corresponding to the event is the loss delayed response parameter, which can also be called: port data set signal failure attribute.
  • Loss delayed response parameter (portDS.SF.loss- delay-resp-message), that is, the message type corresponding to the port parameter is a delayed response message.
  • the value of the port parameter is the third value, indicating that the port has lost the delayed response packet.
  • S503 The network device sets the port attribute value of the clock port to the first value according to the first packet loss event.
  • the network device may set the port attribute value of the clock port to the first value based on the first packet loss event, or it may set the port parameter value to the third value based on the above-mentioned port parameter value.
  • the port attribute value of the clock port is set to the first value.
  • S510 The network device eliminates the first packet loss event, and sets the corresponding port parameter value to the fourth value.
  • the network device 104 eliminates the first packet loss event, and sets the port parameter value corresponding to the packet loss event to a fourth value, where the fourth value may be false.
  • the fourth value indicates that the clock message of the type corresponding to the port parameter is received normally.
  • the network device can directly eliminate the corresponding packet loss event and automatically set the port parameter value corresponding to the packet loss event to The fourth value.
  • the network device 104 may set the value of the loss delay response parameter to the fourth value through the received configuration instruction.
  • the configuration instruction may be a configuration instruction issued to the network device 104 by a network manager through a management system, a management interface, or the like.
  • S516 The network device sets the port attribute value of the clock port to the second value according to the value of the port parameter.
  • the network device sets the port attribute value of the clock port to the second value.
  • the network device 104 sets the port attribute value of the clock port to the second value according to the values of the loss synchronization parameter and the loss delay response parameter.
  • the network device 104 sets the port attribute value of the clock port to the second value according to the values of the loss synchronization parameter, the loss delay response parameter, and the loss follow parameter.
  • the method for realizing clock port state recovery includes:
  • the network device detects that the clock port has lost the first type or the second type of clock message, and generates a first message loss event.
  • the first type or second type of clock message can be a synchronization message and a follow-up message, that is, when a network device detects any one of a synchronization message or a follow-up message, the first message is generated Document loss event.
  • the message loss event is a lost synchronization event.
  • S603 The network device sets the port attribute value of the clock port to the first value according to the first packet loss event.
  • the network device detects that the third type of clock packet loss also occurs on the clock port, and generates a second packet loss event.
  • the third type of clock message may be a delayed response message, and correspondingly, the second message loss event may be a lost delayed response message.
  • step S605 and step S601 can be interchanged.
  • S603 only needs to be executed after any one of steps S601 and S605 is executed, and the execution order of another step and S603 is not limited.
  • the clock port of the network device receives the clock messages of the first type and the second type, and confirms that the first message loss event is eliminated.
  • the network device 104 when the first type is a synchronization message and the second type is a follow-up message, when the network device 104 is configured in one-step mode, after the port 6 of the network device 104 receives M synchronization messages , The network device 104 can generate a synchronization message loss elimination event; when the network device 104 is configured in the two-step mode, after the port 6 of the network device 104 receives M synchronization messages and M follow messages, then The network device 104 may generate a synchronization message loss elimination event.
  • the sync message of port 6 of the network device 104 carries a one-step/two-step flag bit.
  • the network device confirms that the first message loss event is eliminated according to the synchronization message loss elimination event.
  • the port 6 of the network device 104 receives M synchronization messages After that, the network device 104 confirms that the first packet loss event is eliminated.
  • S611 The network device eliminates the first packet loss event, and sets the port attribute value of the clock port to the second value.
  • the network device can only eliminate the first packet loss event and set the port attribute value of the clock port to the second value, or it can eliminate the first packet loss event and the second packet loss event to eliminate the clock port
  • the port attribute value of is set to the second value.
  • the method for realizing clock port state recovery includes:
  • the network device sets the port parameter corresponding to the message event to the third value according to the first message loss event.
  • the port parameter corresponding to the event is a lost synchronization parameter, which can also be referred to as: port data set signal failure attribute.
  • Loss of synchronization parameter (portDS.SF. loss-sync-message).
  • the value of the port parameter is the third value, which indicates that the port has lost synchronization packets or following packets.
  • the port parameter corresponding to the event is the loss delayed response parameter, which can also be called: port data set signal failure attribute.
  • Loss delayed response parameter (portDS.SF.loss- delay-resp-message).
  • the value of the port parameter is the third value, indicating that the port has lost the delayed response packet.
  • S610 The network device eliminates the first packet loss event, and sets the port parameter corresponding to the packet event to the fourth value.
  • the network device 104 eliminates the first packet loss event, and sets the port parameter value corresponding to the packet loss event to a fourth value, where the fourth value may be false.
  • the fourth value indicates that the clock message of the type corresponding to the port parameter is received normally.
  • the embodiment provided in this application can be used for the recovery of portDS.SF, but is not limited to this attribute of the clock port, and can also be used to recover other attributes of the clock port, which is not specifically limited in this application.
  • This application provides a device (for example, a repeater/network device), which has the function of realizing the behavior of the network device in the above method.
  • the functions can be implemented based on hardware, or implemented based on hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions. For example, see Figure 7, Figure 8, and Figure 9 below.
  • FIG. 7 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • the device 700 can execute the method executed by the network device (network device 104) shown in FIG. 4, FIG. 5a, FIG. 5b, FIG. 6a, and FIG. 6b.
  • the device 700 includes a first communication unit 701, a processing unit 702, and a second communication unit 703.
  • the first communication unit 701 can be used to execute the network device receiving clock message, sending clock message and other related methods in the above method embodiment
  • the second communication unit 703 can be used to perform the network device receiving in the above method embodiment.
  • the first communication unit 701 and the second communication unit 703 may also be implemented by one communication unit.
  • the processing unit 702 can be used to perform the generation of the message loss event in the above method embodiment, set the port attribute value of the clock port to the first value or the second value, determine the elimination of the message loss event, modify the value of the port parameter, etc. method.
  • FIG. 8 is a schematic structural diagram of a network device 800 provided by an embodiment of the present application.
  • the apparatus 800 can execute the method executed by the network device (network device 104) shown in FIG. 4, FIG. 5a, FIG. 5b, FIG. 6a, and FIG. 6b. See the schematic diagram of the device structure shown in Figure 8.
  • the device 800 includes at least one processor 801, a communication bus 802, and at least one communication interface 804.
  • the device 800 may further include a memory 803.
  • the processor 801 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling program execution of the solution of this application.
  • the processor 801 may be configured to detect whether the communication interface 804 is lost or receive a clock message, and process according to the detection result, so as to implement the method for recovering the state of the clock port provided in the embodiment of the present application.
  • the communication bus 802 is used to transfer information between the processor 801, the communication interface 804, and the memory 803.
  • the memory 803 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
  • DR RAM Direct Rambus RAM
  • the memory 803 may exist independently, and is connected to the processor 801 through a communication bus 802.
  • the memory 803 may also be integrated with the processor 801.
  • the memory 803 is used to store program codes or instructions for executing the solutions of the present application, and the processor 801 controls the execution.
  • the processor 801 is configured to execute program codes stored in the memory 803.
  • One or more software modules can be included in the program code.
  • the processor 801 itself may also store program codes or instructions for executing the solutions of the present application.
  • the communication interface 804 uses any device such as a transceiver to communicate with other devices or communication networks.
  • the communication network can be Ethernet, wireless access network (RAN) or wireless local area networks (WLAN), wide area network Wait.
  • the communication interface 804 may be used to receive a clock message sent by a second network device in the network, and may also send a clock message to the second network device.
  • the communication interface 804 may be an Ethernet interface (Ethernet) interface, a Fast Ethernet (FE) interface, or a Gigabit Ethernet (GE) interface, etc.
  • the communication interface 804 may also be used to receive configuration instructions so that the processor 801 can modify the value of port attributes and port parameters according to the instructions of the configuration instructions.
  • the network device may also include other communication interfaces, and use other communication interfaces to receive configuration instructions.
  • the device 800 may include multiple processors, such as the processor 801 and the processor 805 shown in FIG. 8. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • this application provides a network device.
  • the network device includes a main control board and an interface board, and further, may also include a switching network board.
  • the network device is used to execute the method in any possible implementation manner of the foregoing methods. For example, as shown in Figure 9.
  • FIG. 9 is a schematic structural diagram of an apparatus 900 provided by an embodiment of the present application.
  • the apparatus 900 can execute the method executed by the network device (network device 104) shown in FIG. 4, FIG. 5a, FIG. 5b, FIG. 6a, and FIG. 6b. See the schematic diagram of the device structure shown in FIG. 9.
  • the device 900 includes a main control board and one or more interface boards, and the main control board is in communication connection with the interface board.
  • the main control board is also called the main processing unit (MPU) or the route processor card (route processor card).
  • the main control board is responsible for the control and management of each component in the device 900, including routing calculation, equipment management and maintenance functions .
  • the interface board is also called a line processing unit (LPU) or a line card (line card), which is used to forward data.
  • the device 900 may also include a switching network board.
  • the switching network board is in communication connection with the main control board and the interface board.
  • the switching network board is used to forward data between the interface boards.
  • the switching network board may also be called a switching network board.
  • Board unit switch fabric unit, SFU).
  • the interface board includes a central processing unit, a memory, a forwarding chip, and a physical interface card (PIC).
  • the central processing unit is respectively communicatively connected with the memory, the network processor and the physical interface card.
  • the memory is used to store the forwarding table.
  • the forwarding chip is used to forward the received message based on the forwarding table stored in the memory. If the destination address of the message is the address of the device 900, the message is sent to the central processing unit (CPU), such as The central processing unit 931 processes; if the destination address of the message is not the address of the equipment 900, the next hop and outbound interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the destination address Corresponding outgoing interface.
  • the forwarding chip may be a network processor (NP).
  • the PIC is also called a daughter card, which can be installed on the interface board and is responsible for converting the photoelectric signal into a data message and forwarding the data message to the forwarding chip for processing after checking the legality of the data message.
  • the central processing unit can also perform the function of a forwarding chip, such as realizing software forwarding based on a general-purpose CPU, so that no forwarding chip is required in the interface board.
  • the communication connection between the main control board, the interface board, and the switching network board can be realized through a bus.
  • the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • the device 900 includes a control plane and a forwarding plane.
  • the control plane includes a main control board and a central processing unit.
  • the forwarding plane includes various components that perform forwarding, such as memory, PIC, and NP.
  • the control plane performs functions such as routers, generation of forwarding tables, processing of signaling and protocol messages, configuration and maintenance of the status of the equipment, and the control plane sends the generated forwarding tables to the forwarding plane.
  • the NP is based on the control plane’s
  • the forwarding table looks up and forwards the message received by the PIC of the device 900.
  • the forwarding table issued by the control plane can be stored in the memory. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
  • main control boards there may be one or more main control boards, and when there are more than one, it may include the main main control board and the standby main control board.
  • the switching network board may not exist, or there may be one or more. When there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the network equipment may not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system.
  • the network device can have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture.
  • the form of the network device may also have only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board.
  • the central processing unit and the main control board on the interface board The central processing unit on the board can be combined into a central processing unit on the same board to perform the functions of the two superimposed.
  • This type of equipment has low data exchange and processing capabilities (for example, low-end switches or routers and other networks) equipment).
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • this application provides a network device that includes a controller and a first forwarding sub-device.
  • the first forwarding sub-device includes: an interface board, and further, may also include a switching network board.
  • the first forwarding sub-device is used to perform the function of the interface board in FIG. 9 above, and further, it may also perform the function of the switching network board in FIG. 9 above.
  • the controller includes a receiver, a processor, a transmitter, a random access memory, a read-only memory, and a bus. Among them, the processor is respectively coupled to the receiver, the transmitter, the random access memory, and the read-only memory through the bus.
  • the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is started to guide the controller into a normal operating state.
  • the application program and the operating system are run in the random access memory, so that the processor executes the functions of the above-mentioned main control board.
  • the steps of the method or algorithm described in combination with the disclosure of the present application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions.
  • Software instructions can be composed of corresponding software modules, which can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, mobile hard disk, CD-ROM or any other form of storage known in the art Medium.
  • An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium.
  • the storage medium may also be an integral part of the processor.
  • the processor and the storage medium may be located in the ASIC.
  • the ASIC may be located in the user equipment.
  • the processor and the storage medium may also exist as discrete components in the user equipment.
  • This application provides a computer storage medium for storing programs, codes, or instructions used by the above-mentioned network devices.
  • the processors or hardware devices execute these programs, codes, or instructions, the functions or steps of the above-mentioned network devices can be completed.
  • An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled with a memory, the memory is used to store a program or instruction, when the program or instruction is executed by the processor, the The chip system implements the method in any of the foregoing method embodiments.
  • processors in the chip system there may be one or more processors in the chip system.
  • the processor can be implemented by hardware or software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor can be a general-purpose processor, implemented by reading software codes stored in the memory.
  • the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
  • the memory may be a non-transitory processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip, or may be set on different chips.
  • the setting method of the processor is not specifically limited.
  • the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC). It can also be a central processor unit (CPU), a network processor (NP), a digital signal processing circuit (digital signal processor, DSP), or a microcontroller (microcontroller).
  • the controller unit, MCU may also be a programmable controller (programmable logic device, PLD) or other integrated chips.
  • each step in the foregoing method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • This application provides a network system that includes the above-mentioned network device and a second network device.
  • the second network device can be any network device that supports a clock synchronization function.
  • the second network device communicates with the first network device.
  • the interface is connected, and the second network device includes a communication interface, and the communication interface serves as a master clock port to communicate with the first network device.
  • the functions described in this application can be implemented by hardware or a combination of hardware and software.
  • these software can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
  • the processor mentioned in the embodiment of the present invention may be a central processing unit (Central Processing Unit, CPU), or may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application-specific integrated circuits (Central Processing Unit, CPU).
  • CPU Central Processing Unit
  • DSPs Digital Signal Processors
  • CPU Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory mentioned in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be ROM, PROM, erasable EPROM, EEPROM or flash memory.
  • the volatile memory may be random access memory RAM, which acts as an external cache.
  • RAM random access memory RAM
  • many forms of RAM are available, such as SRAM, DRAM, SDRAM, DDR SDRAM, ESDRAM, SLDRAM, and DR RAM.
  • the size of the sequence number of the above-mentioned processes does not mean the order of execution. Some or all of the steps can be executed in parallel or one after the other.
  • the execution order of each process should be determined by its function and internal logic. , And should not constitute any limitation to the implementation process of the embodiments of the present application.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, a network device, or a terminal device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes. .
  • each device provided in each device embodiment is used to execute the method provided in the corresponding method embodiment, so each device embodiment can refer to the correlation in the related method embodiment Part of understanding.
  • the device structure diagrams given in the device embodiments of the present invention only show the simplified design of the corresponding device.
  • the device may include any number of transmitters, receivers, processors, memories, etc., to implement the functions or operations performed by the device in the device embodiments of the present invention, and all devices that can implement the present application All are within the protection scope of this application.
  • the names of the message/frame/instruction information, module or unit, etc. provided in the embodiments of the present invention are only examples, and other names can be used as long as the message/frame/indication information, module or unit, etc. have the same function.

Landscapes

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

Abstract

本申请公开了一种用于实现时钟端口属性恢复的方法, 设备, 系统及存储介质, 应用于时钟技术领域。方法包括: 网络设备根据其上的时钟端口在超时时间内未接收到N个同步报文, 跟随报文和延迟响应报文三种报文中的任一类型的时钟报文, 则将该时钟端口的端口属性的值置为第一值, 表明该时钟端口发生报文丢失。根据确定满足恢复条件, 网络设备将该时钟端口的端口属性的值置为第二值, 表明所述时钟端口的状态为未发生报文丢失。

Description

一种时钟端口属性恢复方法、设备及系统
本申请要求于2020年01月06日提交中国国家知识产权局、申请号202010011547.7、申请名称为“一种时钟端口状态自动恢复的方法及装置”的中国专利申请的优先权,以及要求在2020年03月02日提交中华人民共和国知识产权局、申请号为202010136536.1、申请名称为“一种时钟端口属性恢复方法、设备及系统”的中国专利申请的优先权,这两篇中国专利申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,一种时钟端口属性恢复方法、设备及系统。
背景技术
当通信和网络应用上越来越多的使用分布式系统时,时钟同步变得越来越重要,网络时间协议(network time protocol,NTP)作为一种时钟同步方式,被得到了广泛的应用。此外,为了满足越来越多的高精度时间同步要求,电气电子工程师学会(Institute of Electrical and Electronics Engineers,IEEE)于2008年正式发布IEEE 1588V2(IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems)版本标准,该标准是网络测量和控制系统的精密时钟同步协议标准。为了满足无线基站的时间同步需求,移动承载网络可以采用IEEE1588v2协议把精确的时间传递给每个基站,从而满足基站的时间同步需求。
在网络中的设备常常通过最佳主时钟(Best Master Clock,BMC)算法来选择最优的1588时钟源进行跟踪,设备通过BMC源选择算法决策出该设备上的端口的状态为主(master)时钟端口,从(slave)时钟端口或被动(passive)时钟端口。设备通过BMC算法决策时钟端口的状态时,会该时钟端口的端口数据集进行计算,而该时钟端口的端口数据集的信息与该时钟端口的属性相关。因此,在网络设备上保障时钟端口属性的正确性是保证时钟源跟踪正确的关键。
发明内容
本申请实施例提供了一种时钟端口属性恢复方法、设备及系统,以解决时钟端口属性无法恢复,导致时钟端口状态可能不正确的技术问题,技术方案如下:
第一方面,提供了一种时钟端口属性恢复方法,该方法可以由第一网络设备执行,该方法包括如下步骤:第一网络设备根据时钟端口在超时时间内未接收到N个第一类型的时钟报文,将该时钟端口的端口数据集信号失效属性的值置为第一值,该时钟端口与第二网络设备的主时钟端口相连,该时钟端口为从端口或被动端口,第一类型的时钟报文可以为以下三种时钟报文中的任一种:同步报文、跟随报文和延迟响应报文,N为大于0的正整数,该第一值表明所述时钟端口发生报文丢失。在第一网络设备将端口数据集信号失效属性的值置为第一值之后,当第一网络设备确定满足恢复条件时,将端口数据集信号失效属性的值置为第二值,表明所述时钟端口未发生报文丢失。
通过当网络设备根据报文丢失将该时钟端口的端口数据集信号失效属性的值置为第一值后,根据恢复条件,将该值恢复为第二值的方法,可以有助于将该端口数据集信号失 效属性的值保持正确,从而使得时钟端口的状态能保持征程,进而保证时钟跟踪关系的正确性。
在一种可能的设计中,第一网络设备确定满足恢复条件包括:第一网络设备接收到配置指令,该配置指令用于指示所述第一网络设备将所述端口数据集信号失效属性的值置为所述第二值。当网络管理人员确定第一网络设备的该时钟端口已经接收到连接的主时钟端口发送的报文后,管理人员可以通过配置指令的方式,将该端口数据集信号失效属性的值修改为第二值。这样,可以减少对网络设备的影响,直接快速的恢复该端口的状态。
在一种可能的设计中,所述第一网络设备确定满足恢复条件,包括:第一网络设备在第一时间内接收到M个同步报文和M个跟随报文,所述M为大于0的正整数。网络设备通过确定接收到符合要求的同步报文和跟随报文后,确认满足恢复条件,有助于减少管理人员的工作负担,而自动确认满足恢复条件。
在一种可能的设计中,所述第一类型的时钟报文为同步报文,所述第一网络设备确定满足恢复条件,包括:所述第一网络设备在第二时间内接收到M个同步报文,或者所述第一类型的时钟报文为跟随报文,所述第一网络设备确定满足恢复条件,包括:所述第一网络设备在所述第二时间内接收到M个跟随报文,M为大于0的正整数。网络设备通过确定接收到符合要求的与第一类型对应的时钟报文,确认满足恢复条件,有助于减少管理人员的工作负担,而自动确认满足恢复条件。
在一种可能的设计中,所述第一网络设备确定满足恢复条件,包括:所述第一网络设备接收第二消息,所述第二消息表明所述时钟端口的延迟响应报文丢失状态恢复。由于当该时钟端口的该属性值变为第一值后,该时钟端口不会给对应的主时钟端口发送延迟请求报文,所以该时钟端口不会再接收到延迟响应报文。可以通过管理人员通过管理系统下发消息,或者管理人员直接通过该设备的管理接口下发配置指令的方式,表明该端口的延迟响应报文丢失状态恢复,从而确认满足恢复条件。
在一种可能的设计中,所述第一网络设备根据时钟端口在超时时间内未接收到N个第一类型的时钟报文,将所述时钟端口的端口数据集信号失效属性的值置为第一值,包括:所述第一网络设备根据所述时钟端口在超时时间内未接收到所述N个第一类型的时钟报文,生成第一事件。所述第一网络设备根据所述第一事件,将所述端口数据集信号失效属性的值置为第一值。
网络设备通过在丢失报文后生成对应的报文丢失事件的方式,可以记录该报文丢失的相关信息,如:端口信息、丢失报文类型等。而网络设备也可以根据该事件改变该端口属性的值,这样更有助于记录该网络设备上的相关故障和变化。
在一种可能的设计中,所述当所述第一网络设备确定满足恢复条件时,所述第一网络设备将所述端口数据集信号失效属性的值置为第二值,包括:当所述第一网络设备根据确定满足恢复条件时,所述第一网络设备确定所述第一丢失事件消除。所述第一网络设备根据所述第一事件消除,将所述端口数据集信号失效属性的值置为所述第二值。
当网络设备确定满足恢复条件时,如,接收到对应的报文,或者接收到配置指令等,则可以确定该第一丢失事件消除,通过确定第一丢失事件消除,恢复该端口属性的值。还可以进一步修改该第一丢失事件记录的信息,这样有助于记录网络设备上的故障恢复等信息。
在一种可能的设计中,所述第一网络设备根据所述第一事件消除,将所述端口数据集信号失效属性的值置为所述第二值,包括:所述第一网络设备根据所述第一事件消除,将所述时钟端口的所述第一事件对应的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;所述第一网络设备根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
在一种可能的设计中,所述第一事件包括所述第一类型的标识。
在一种可能的设计中,所述当所述第一网络设备确定满足恢复条件时,所述第一网络设备将所述端口数据集信号失效属性的值置为第二值,包括:所述第一网络设备根据确定满足恢复条件,将所述第一类型对应的所述时钟端口的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;所述第一网络设备根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
以上,还在网络设备上定义跟报文丢失事件对应的端口参数的方式,以及根据事件信息更新端口参数的值的方式,可以准确记录该网络设备的各类型报文的丢失状态,便于网络设备根据端口参数恢复该端口属性的值,记录更清晰、且易于判断。
在一种可能的设计中,在所述第一网络设备将所述时钟端口的端口数据集信号失效属性的值置为第一值之后,所述方法还包括:所述第一网络设备根据所述端口数据集信号失效属性的值为第一值,将所述时钟端口的时钟参考源Erbest数据集的值置为空。
在一种可能的设计中,如果所述端口数据集信号失效属性的值为第一值,所述第一网络设备生成状态决策事件,所述状态决策事件用于指示所述第一网络设备决策所述时钟端口的状态。
在一种可能的设计中,在所述第一网络设备将所述端口数据集信号失效属性的值置为第二值之后,所述方法还包括:所述第一网络设备将所述Erbest数据集的值置为非空。
在一种可能的设计中,在所述第一网络设备将所述端口数据集信号失效属性的值置为第一值前,所述端口数据集信号失效属性的值为所述第二值。
在一种可能的设计中,所述时钟报文为精确时间协议PTP时钟报文。
以上,通过根据该时钟端口的该端口属性的值的变化和恢复的方式,网络设备可以灵活的调整该网络设备上的端口数据集的值,为空或非空,从而使得该网络设备更准确的通过BMC算法根据端口数据集的值决策端口状态,保证该网络中的时钟跟踪关系的正确性。
第二方面,提供了一种第一网络设备,该网络设备包括:处理单元和第一通信单元,
所述处理单元,用于根据所述第一通信单元在超时时间内未接收到N个第一类型的时钟报文,将所述第一通信单元的端口数据集信号失效属性的值置为第一值,所述第一类型的时钟报文为以下三种时钟报文中的任一种:同步报文、跟随报文和延迟响应报文,所述N为大于0的正整数,所述第一值表明所述第一通信单元发生报文丢失;所述第一通信单元,用于与第二网络设备的主时钟端口通信,所述第一通信单元的时钟端口状态为从端口或被动端口;在所述处理单元将所述端口数据集信号失效属性的值置为第一值之后,所述处理单元,还用于根据确定满足恢复条件时,将所述端口数据集信号失效属性的值置为第二值,所述第二值表明所述第一通信单元未发生报文丢失。
在一种可能的设计中,所述第二通信单元,用于接收配置指令,所述配置指令用于指示所述处理单元将所述端口数据集信号失效属性的值置为所述第二值;所述处理单元, 还用于根据所述第二通信单元接收到所述配置指令,确定满足所述恢复条件。
在一种可能的设计中,所述处理单元,还用于根据所述第一通信单元在第一时间内接收到M个同步报文和M个跟随报文,确定满足所述恢复条件,所述M为大于0的正整数。
在一种可能的设计中,所述第一类型的时钟报文为同步报文,所述处理单元还用于根据所述第一通信单元在第二时间内接收到M个同步报文,确定满足所述恢复条件;或所述第一类型的时钟报文为跟随报文,所述处理单元还用于根据所述第一通信单元在所述第二时间内接收到M个跟随报文,确定满足所述恢复条件;M为大于0的正整数。
在一种可能的设计中,所述处理单元,还用于根据所述第二通信单元接收到第二消息,确定满足所述恢复条件,所述第二消息表明所述第一通信单元的延迟响应报文丢失状态恢复。
在一种可能的设计中,所述处理单元,还用于根据所述第一通信单元在超时时间内未接收到所述N个第一类型的时钟报文,生成第一事件;所述处理单元,还用于根据所述第一事件,将所述端口数据集信号失效属性的值置为第一值。
在一种可能的设计中,所述处理单元,还用于根据所述第一通信单元在超时时间内未接收到所述N个第一类型的时钟报文,生成第一事件;所述处理单元,还用于根据所述第一事件,将所述端口数据集信号失效属性的值置为所述第一值。
在一种可能的设计中,所述处理单元,还用于根据确定满足所述恢复条件,确定所述第一丢失事件消除;所述处理单元,还用于根据所述第一事件消除,将所述端口数据集信号失效属性的值置为所述第二值。
在一种可能的设计中,所述处理单元,还用于根据所述第一事件消除,将所述通信单元的所述第一事件对应的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;所述处理单元,还用于根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
在一种可能的设计中,所述处理单元,还用于根据确定满足恢复条件,将所述第一类型对应的所述第一通信单元的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;所述处理单元,还用于根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
在一种可能的设计中,所述处理单元,还用于根据所述端口数据集信号失效属性的值为第一值,将所述时钟端口的时钟参考源Erbest数据集的值置为空。
在一种可能的设计中,当所述端口数据集信号失效属性的值为第一值时,所述处理单元还用于生成状态决策事件,所述状态决策事件用于指示所述处理单元决策所述时钟端口的状态。
在一种可能的设计中,所述处理单元,还用于将所述Erbest数据集的值置为非空。
在一种可能的设计中,在所述处理单元将所述端口数据集信号失效属性的值置为第一值前,所述端口数据集信号失效属性的值为所述第二值。
第三方面,本申请实施例提供了另一种网络设备,其特征在于,包括:至少一个处理器,所述至少一个处理器与至少一个存储器耦合:所述至少一个处理器,用于执行所述 至少一个存储器中存储的计算机程序或指令,使得所述网络设备执行如第一方面所述的方法。
第四方面,提供了一种芯片,包括处理器和接口电路。所述接口电路,用于接收指令并传输至所述处理器;所述处理器,用于执行如第一方面所述的方法。
第五方面,提供了一种网络系统,所述系统包括第一网络设备和第二网络设备,所述第一网络设备为上述第二方面所述的第一网络设备或上述第三方面提供的网络设备,所述第二网络设备包括通信接口,所述第二网络设备通过所述通信接口与所述第一网络设备通信,所述通信接口的时钟端口状态为主时钟端口。
第六方面,本申请实施例还提供了一种计算机可读存储介质,包括计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。
附图说明
图1为本申请实施例提供的时钟跟踪关系场景示意图;
图2a为本申请实施例提供的时钟跟踪关系示意图;
图2b为本申请实施例提供的时钟跟踪关系示意图;
图3a为本申请实施例提供的时钟同步流程示意图;
图3b为本申请实施例提供的时钟同步流程示意图;;
图4为本申请实施例提供的时钟端口状态恢复方法流程图;
图5a为本申请实施例提供的时钟端口状态恢复方法流程图;
图5b为本申请实施例提供的时钟端口状态恢复方法流程图;
图6a为本申请实施例提供的时钟端口状态恢复方法流程图;
图6b为本申请实施例提供的时钟端口状态恢复方法流程图;
图7为本申请实施例提供的用于实现时钟端口状态恢复的装置结构示意图;
图8为本申请实施例提供的用于实现时钟端口状态恢复的装置结构示意图;
图9为本申请实施例提供的用于实现时钟端口状态恢复的装置结构示意图。
具体实施方式
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
在IEEE 1588的应用场景中,当网络中的设备的时钟端口的属性值发生了变化,导致时钟端口的状态发送变化,从而导致时钟跟踪关系变化,可能会导致该设备跟踪的时钟源选择错误。
以下,简要介绍本申请涉及的术语:
本申请中术语“第一”“第二”“第三”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”和“第三”之间不具有逻辑或时序上的 依赖关系,也不对数量和执行顺序进行限定。
本申请中的属性或其他消息的值为真(ture)和假(false)时,指示该属性或消息的值表达的含义为ture或者false,其具体表现形式可以为用1个比特(bit)的标志位或多个bit的标志位,或其他形式进行表达,本申请不做具体的限定。
在电信领域,国际电联电信标准化部门(International Telecommunication Union-Telecommunication Standardization Sector,ITU-T)基于IEEE 1588v2协议并结合电信领域的独特场景,定义了ITU-T G.8275.1和ITU-T G.8275.2两个标准,其中G是ITU-T中关于传输系统和媒体、数字系统和网络(transmission systems and media,digital systems and networks)的章节的系列推荐标准。
ITU-T G.8275.1应用于每个设备都支持1588协议的移动承载网络中,ITU-T G.8275.2应用于部分设备支持1588协议的移动承载网络中。对于1588参考时钟源选择,ITU-T G.8275.1和ITU-T G.8275.2的原理相同,比如:在设备有多个1588时钟输入源的场景下,需要通过BMC算法来选择最优的1588时钟源进行跟踪,从而确定该设备的主(master)时钟端口、从(slave)时钟端口或被动(passive)时钟端口,也可以称为主端口、从端口和被动端口。通过网络中的设备确定该设备的时钟端口,形成的时钟跟踪关系可如图1所示。
图1为本申请提供的一种时钟跟踪关系场景示意图,图1中示出了一个有4台网络设备的网络,该网络中,网络设备101与时钟源相连,网络设备101与网络设备102和网络设备103相连,网络设备102与网络设备101和网络设备104相连,网络设备103与网络设备101和网络设备104相连,网络设备104与网络设备101和网络设备103相连。网络设备101确定的主端口为端口1,网络设备102确定的从端口为端口2、主端口为端口3,网络设备103确定的从端口为端口4、主端口为端口5,网络设备104确定的从端口为端口6、主端口为端口7、被动端口为端口8。该网络形成的时钟跟踪关系为:网络设备101->网络设备102->网络设备104,和网络设备101->网络设备103。
该跟踪关系可简单如图2a所示,第二网络设备通过从端口-端口2接收并对第一网络设备端口-端口1发送的时钟报文进行响应,进而进行时钟信息同步。设备之间发送的时钟报文主要包括声明(announce)报文,同步(sync)报文,跟随(follow_up)报文,延迟请求(delay_req)报文和延迟响应(delay_resp)报文。
其中,Announce报文主要用于BMC源选择算法来决策端口状态为master,slave,或者passive状态。当设备刚上电时,端口状态为初始化状态(initializing),然后每个端口都会互相发送announce报文,当设备通过BMC源选择算法决策出端口状态(master/slave等)后,只有master端口会发送announce报文,slave端口不会发送announce报文。当slave端口收到的announce报文信息发生变化,或者slave端口收不到announce报文时,BMC源选择算法会重新计算端口状态,并更新每个端口的状态。
Sync报文,follow_up报文,delay_req报文和delay_resp报文主要用于时间同步。网络设备之间同步时间信息的方式主要有如图3a所示的一步(one-step)模式和图3b所示的两步(two-step)模式两种,以下主要结合master端口和slave端口进行讲解,主端口与passive端口的交互也类似,不再赘述。其详细过程如下:
S301:Master端口发送sync报文给slave端口,并在发送sync报文时记录发送时间T1; 如master端口配置为一步(one-step)模式,T1会填入sync报文的某个字段,并发送给slave端口。
S302:当slave端口收到sync报文后,记录接收时间T2。
S303:如果master端口配置为两步(two-step)模式,那么master端口会在发送完sync报文后马上发送follow_up报文,然后T1会填入follow_up报文的某个字段,并发送给slave端口。
以上,S302可在S303之前执行,S302也可以在S303之后执行。
S304:当slave端口配置为E2E(End-to-End)机制后,slave端口会发送delay_req报文给master端口,并且记录发送时间T3;
S305:当master端口收到delay_req报文后,会记录接收时间T4,并填入delay_resp报文的某个字段,然后发送delay_resp报文给slave端口。
S306:Slave端口收到delay_resp报文后,获得T4。从而根据T1/T2/T3/T4可以计算出
slave端口与master端口之间的时间偏差(Time Error,TE),可以通过如下公式获得:
TE=[(t2–t1)–(t4–t3)]/2。
G.8275.2标准中还定义了包定时信号失效(Packet Timing Signal Fail,PTSF)功能,该功能应用于当时钟端口上发生报文丢失时,其包括如下两个事件:
1)包定时信号失效-丢失同步(PTSF-losssync)事件:当slave端口检测到三种报文中(sync报文,follow_up报文或delay_resp报文)的任意一种报文丢失,则该slave端口需要产生PTSF-losssync事件;
2)包定时信号失效-不可用(PTSF-unusable)事件:slave端口检测输入的sync报文,follow_up报文和delay_resp报文产生的时间戳计算出来的时间误差TE超过要求时,则产生PTSF-unusable事件。
当上述1)或2)发生时,网络设备会把slave端口的端口数据集信号失效(port dataset signal final,portDS.SF)属性的值置为真(TRUE)。portDS.SF的值进一步用于指示该端口是否失效,当其值为真时,把slave端口的时钟参考源(Erbest)数据集置为空,然后会触发BMC算法重新计算端口状态,并把此端口置为master状态,使得该时钟端口无法参与时钟源选取。即,如图2a所示的第二网络设备端口2的状态将会变更为如图2b所示的master端口状态。第二网络设备的端口2变为master状态,且故障排除后,该端口2会继续收到第一网络设备发送的sync报文以及follow_up报文(follow_up报文仅在该时钟跟踪关系被配置为two-step模式时会接收到),但由于此时端口2不会发送delay_req报文给第一网络设备的端口1,所述第一网络设备也不会发送delay_resp报文给第二网络设备的端口2,从而第二网络设备的端口2无法收到delay_resp报文,因此,第二网络设备的端口2的PTSF-losssync事件无法消除,该端口的端口数据集的portDS.SF的值仍然为TRUE。即,如果不采用特殊的技术手段,该端口的端口数据集的portDS.SF的值为TRUE的情况下,该端口的Erbest数据集的值不会被置为非空,从而导致该端口无法再在该设备通过BMC算法决定端口状态时,恢复到slave状态。而如果portDS.SF为假(FALSE),那么设备不会把端口的该参考源数据集Erbest置为空集,从而不会影响该端口的时钟源选取。
以上示例仅仅以slave端口作为示意,但同样也适用于passive端口。
即,当时钟端口的portDS.SF的值为TRUE后,该端口没有办法做为时钟源选源端口之 一,影响网络中的时钟跟踪关系。本发明对此提出技术解决方案。本技术方案除了可应用到电信的1588标准ITU-T G.8275.2,也可以应用到电信的1588标准ITU-T G.8275.1,还可以应用到1588基础协议IEEE 1588,以及电信领域的1588标准IEEE C37.238,电影与电视工程师学会(Society of Motion Picture and Television Engineers,SMPTE)的1588标准SMPTE2059等。
接下来,结合图1所示的场景对本申请实施例提供的方法所涉及的几种可能的实施方式进行举例说明,将网络设备104作为此处的网络设备进行介绍。如图4所示,用于实现时钟端口状态恢复的方法包括:
S401:网络设备检测到时钟端口在超时时间内发生报文丢失。
网络设备104确定其某一个时钟端口,如端口6或端口8,在一定超时时间内未接收到N个第一类型的时钟报文,则生成报文丢失事件。其中,超时时间可以是指定的具体超时时间,如指定的超时时间为6s,也可以是某类报文接收时间间隔的倍数,如,当某类报文接收时间为3秒(second,s),该超时时间可以为接收时间间隔的3倍,即最终为9s;N可以为指定的丢失的时钟报文的数量,如该值可以为由网络管理人员通过管理系统、或者管理接口下发配置指令配置在网络设备104上的,也可以是1588时钟协议指定的数量,或是网络设备104在制造出厂时即被预设的某个值,其值为大于等于1的整数,在一些情况下,N的取值范围可以具体为:3<=N<=255;该第一类型可以为同步报文、跟随报文和延迟响应报文中的任意一种报文类型。当网络设备104上的时钟同步运行机制为one-step模式时,则不必考虑跟随报文,当网络设备配置的时钟同步运行机制为two-step模式时,则需要考虑跟随报文。即,one-step模式时,网络设备确认其上的任意一个slave或passive端口在超时时间内未接收到N个以下2种报文中的一种:同步报文和延迟响应报文,则确定该时钟端口发生报文丢失。或,two-step模式时,网络设备确认其上的任意一个slave或passive端口在超时时间内未接收到N个以下3种报文中的一种:同步报文、跟随报文和延迟响应报文,则确定该时钟端口发生报文丢失。以下,在本申请实施例中,当网络设备恢复该时钟端口的属性值的时候,需要接收到的报文与此处一致,即,当为one-step模式时,只确定是否接收到了同步报文,以及延迟响应报文的状态;当为two-step模式时,同时确定是否接收到了同步报文和跟随报文,以及延迟响应报文的状态,在本申请其他实施例中不再就此进行详细阐述。
可选的,当该网络设备检测到该设备上的时钟端口发生报文丢失时,生成报文丢失事件,在一个示例中,该报文丢失事件为PTSF-losssync事件。该报文丢失事件表明该时钟端口发生了报文丢失,丢失的时钟报文的类型可为同步报文、跟随报文或延迟响应报文中的任一种或多种。
可选的,该报文丢失事件中还包括其丢失的时钟报文的类型的指示。
在一个示例中,该报文丢失事件包括丢失的时钟报文类型字段,该字段表明该时钟端口丢失了什么事件。
在另一个示例中,该报文丢失事件可包括3个类型字段:同步报文类型、跟随报文类型、延迟响应类型,当对应的类型字段的值被置为特殊的值,如1时,则认为丢失了该类型的时钟报文。
可选的,当该时钟端口在丢失了第一种时钟报文后,该时钟端口还丢失了另一种时钟 报文,则该网络设备可将该丢失事件的第二个类型字段的信息更新到该事件中,或是生成另一个报文丢失事件。
S403:网络设备根据检测到该时钟端口的发生报文丢失,将该时钟端口的端口属性值置为第一值。
网络设备104根据端口6发生报文丢失将端口6的portDS.SF的值置为第一值。
可选的,网络设备104也可以是根据报文丢失事件将该端口的portDS.SF的值置为第一只。网络设备104可以试在生成该报文丢失事件的同时,或生成该报文丢失事件后,即将该端口的portDS.SF的值置为第一值。
在一个示例中,该第一值为真。
可选的,该网络设备的时钟端口还有与报文类型对应的端口参数,当该网络设备检测到该设备上的时钟端口发生报文丢失时,则将该端口参数的值置为真,表明该时钟端口发生了对应类型的报文丢失。
可选的,该网络设备也可以是根据上述报文丢失事件,而将该端口参数的值置为真。
S405:在该portDS.SF的值被置为第一值之后,当网络设备确定满足恢复条件时,将该时钟端口的portDS.SF的值置为第二值。
恢复条件包括,当网络设备104的端口6接收到同步报文、跟随报文两种报文中的所有类型的时钟报文,且每种时钟报文都连续接收到M个后,则网络设备或管理维护人员确定对应的报文丢失事件恢复。M可以为指定的丢失的时钟报文的数量,如该值可以为由网络管理人员配置在网络设备上,也可以是1588时钟协议指定的数量,或在网络设备在制造出厂时即预设的某个值,其值为大于等于1的整数,在一些情况下,M的取值范围可以具体为:2<=M<=255。连续收到是指,当端口6跟踪的master端口的发包率为1秒每个时,则当端口6在连续的2秒内收到2个同步报文,在连续的2秒内收到2个跟随报文,且同步报文和跟随报文时在确定的发包间隔内收到的,如4秒内收到2个同步报文,2个跟随报文,则认为满足恢复条件。
在一个示例中,该端口属性为可配置的,当管理维护人员确定该网络设备满足上述恢复条件,管理人员可以通过配置的方式,向网络设备下发配置指令,该配置指令指示网络设备104将端口6的端口属性值置为第二值。
可选的,当该网络设备检测到时钟端口发生报文丢失,生成报文丢失事件,并根据报文丢失事件将portDS.SF的值修改为第一值后,则当该网络设备接收到上述报文后,则报文丢失事件消除。网络设备可以根据该报文丢失事件消除,将该时钟端口的portDS.SF的值置为第二值。
在一个示例中,该时钟端口有两个可配置的端口参数,其值可为任何能指示true或false的值,如:端口信号失效同步报文丢失属性(portDS.SF.losssync)和端口信号失效不可用属性(portDS.SF.unusable)。当PTSF-losssync事件发生并且故障修复后,可通过人工配置把此端口的portDS.SF.losssync置为FALSE;当PTSF-unusable事件发生并且故障修复后,可通过人工配置把此端口的portDS.SF.unusable置为FALSE。当端口的portDS.SF.losssync和portDS.SF.unusable都为FALSE后,则网络设备104自动将该端口属性portDS.SF的值置为FALSE,设备不会再把端口6的参考源数据集Erbest置为空集,从而会触发BMC算法,重新把此端口状态更新为slave状态或者其它状态。在一个示例中,该第 二值为假。
可选的,当该网络设备还有与报文类型或报文丢失事件对应的端口参数时,则当该网络设备接收到上述报文后,将对应的端口参数的值置为假。网络设备可以根据所有端口参数的值都为假,将该时钟端口的portDS.SF的值置为第二值。
在这种情况中,由于当故障恢复,时钟端口可以接收到同步报文和跟随报文,当该时钟端口接收到同步报文和跟随报文后,可以自动把该报文类型对应的端口参数的值修改为假。但是由于该时钟端口的状态已经变更为master,则该时钟端口不会向与其连接的master端口发送延迟请求报文,则该时钟端口也不会接受到延迟响应报文。这个时候,可以为延迟响应报文定义一个对应的端口参数,当该时钟端口丢失延迟响应报文的时候,则将该参数的值置为真,而当由于丢失延迟响应报文导致该时钟端口的portDS.SF的值修改为真之后,网络管理员可以默认将该参数的值修改为假。这样,当该网络设备接收到同步报文和/或跟随报文后,即可自动将该时钟端口的portDS.SF的值修改为假。当然,网络管理员也可以配置一些策略,自动将该端口参数的值修改为假。
下面仍结合图1所示的场景对本申请实施例提供的方法所涉及的几种可能的实施方式进行举例说明,将网络设备104作为此处的网络设备进行介绍。图5a所示的方法实施例与图4所示的方法实施例方法类似,相关内容请参见图4部分阐述,此处重点针对不同的地方进行详细描述。如图5a所示,用于实现时钟端口状态恢复的方法包括:
S501:网络设备检测到时钟端口发生第一类型的时钟报文丢失,生成第一报文丢失事件。
网络设备104检测到其slave端口或passive端口,如端口6或端口8发生第一类型的时钟报文丢失,则生成第一报文丢失事件。如上述S401所示,网络设备104检测到其第一类型的时钟报文丢失,可以是在超时时间内检测到其端口6或端口8未接收到N个该第一类型的时钟报文,详细信息请参见S401,在此不再赘述。
在一个示例中,当该第一类型为同步报文时,则网络设备104生成第一报文丢失事件,该报文丢失事件为丢失同步事件,也可以称为包定时信号失效丢失同步事件(PTSF-loss-sync-message)。该事件用于表明端口6或端口8发生了同步报文丢失。
在另一个示例中,当该第一类型为跟随报文时,则网络设备104生成第一报文丢失事件,该报文丢失事件为丢失跟随事件,也可以称为包定时信号失效丢失跟随事件(PTSF-loss-follow-up-message)。该事件用于表明端口6或端口8发生了跟随报文丢失。
在另一个示例中,当该第一类型为延迟响应报文时,则网络设备104生成第一报文丢失事件,该报文丢失事件为丢失延迟响应事件,也可以称为包定时信号失效丢失延迟响应事件(PTSF-loss-delay-resp-message)。该事件用于表明端口6发生了延迟响应报文丢失。
S503:网络设备根据第一报文丢失事件将该时钟端口的端口属性值置为第一值。
以该端口属性为包定时信号失效属性为例,当网络设备104生成端口6的包定时信号失效丢失同步事件时,或网络设备104接收到端口6或端口8生成的包定时信号失效丢失同步事件后,则网络设备104将端口6的包定时信号失效属性值置为真。
S505(可选):网络设备还检测到该时钟端口还丢失第二类型的时钟报文,则生成第二 报文丢失事件。
在一个示例中,网络设备104的端口6或端口8还丢失了N个第二类型的时钟报文,该第二类型的时钟报文为与第一类型不同的时钟报文。
S507(可选):网络设备还检测到该时钟端口还丢失第三类型的时钟报文,则生成第三报文丢失事件。
在一个示例中,网络设备104的端口6或端口8还丢失了N个第三类型的时钟报文,该第三类型的时钟报文为与第一类型和第二类型不同的时钟报文类型。
以上步骤S505、S507与步骤S501的发生时间并不做限定,即第一类型的时钟报文可以为同步报文、跟随报文和延迟响应报文中的任一种,第二类型的时钟报文为不同于第一类型的,这三种时钟报文中的任一种,第三类型的时钟报文为这三种报文中不同于第一类型、第二类型的一种时钟报文。各类报文丢失的发生顺序并无限定。当任一类型的时钟报文丢失事件发生后,则网络设备104即可以将包定时信号失效端口属性的值置为真。
S509:网络设备的该时钟端口接收到第一类型的时钟报文,确认第一报文丢失事件消除。
在一个示例中,当第一类型为同步报文时,当网络设备104的端口6连续接收到M个同步报文后,则网络设备104可以生成同步报文丢失消除事件,网络设备根据该同步报文丢失消除事件,确认第一报文丢失事件消除。
在另一个示例中,当第一类型为同步报文时,当网络设备104的端口6连续接收到M个同步报文后,则网络设备104确认第一报文丢失事件消除。
在另一个示例中,当第一类型为跟随报文时,当网络设备104的端口6连续接收到M个跟随报文后,则网络设备104可以生成跟随报文丢失消除事件,网络设备根据该跟随报文丢失消除事件,确认第一报文丢失事件消除。
在另一个示例中,当第一类型为延迟响应报文时,当网络设备104的端口6连续接收到M个延迟响应报文后,则网络设备104确认延迟响应报文丢失事件消除,网络设备根据该延迟响应报文丢失消除事件,确认第一报文丢失事件消除。
S511(可选):网络设备的该时钟端口接收到第二类型的时钟报文,确认第二报文丢失事件消除。
对应于S505,当网络设备确认存在第二类型的时钟报文丢失事件时,当网络设备的该时钟端口接收到第二类型的时钟报文,确认第二报文丢失事件消除。
在一个示例中,当第二类型为同步报文时,当网络设备104的端口6接收到M个同步报文后,则网络设备104可以生成同步报文丢失消除事件,网络设备根据该同步报文丢失消除事件,确认第二报文丢失事件消除。
在另一个示例中,当第二类型为同步报文时,当网络设备104的端口6接收到M个同步报文后,网络设备104不需要生成同步报文丢失消除事件,网络设备104确认第二报文丢失事件消除。
在另一个示例中,当第二类型为跟随报文时,当网络设备104的端口6接收到M个跟随报文后,则网络设备104可以生成跟随报文丢失消除事件,网络设备根据该跟随报文丢失消除事件,确认第二报文丢失事件消除。
在另一个示例中,当第二类型为延迟响应报文时,当网络设备104的端口6接收到M个 延迟响应报文后,网络设备104不需要生成延迟响应报文丢失消除事件,网络设备104确认第二报文丢失事件消除。
网络设备根据第二报文丢失事件消除认为第二报文丢失事件恢复。
S513(可选):网络设备的该时钟端口接收到第三类型的时钟报文,确认第三报文丢失事件消除。
对应于S507,当网络设备确认存在第三类型的时钟报文丢失事件时,当网络设备的该时钟端口接收到第三类型的时钟报文,确认第二报文丢失事件消除。
在一个示例中,当第三类型为同步报文时,当网络设备104的端口6接收到M个同步报文后,则网络设备104可以生成同步报文丢失消除事件,网络设备根据该同步报文丢失消除事件,确认第三报文丢失事件消除。
在另一个示例中,当第三类型为同步报文时,当网络设备104的端口6接收到M个同步报文后,网络设备104不需要生成同步报文丢失消除事件,网络设备104确认第三报文丢失事件消除。
在另一个示例中,当第三类型为跟随报文时,当网络设备104的端口6接收到M个跟随报文后,则网络设备104可以生成跟随报文丢失消除事件,网络设备根据该跟随报文丢失消除事件,确认第三报文丢失事件消除。
在另一个示例中,当第三类型为延迟响应报文时,当网络设备104的端口6接收到M个延迟响应报文后,网络设备104不需要生成延迟响应消除事件,网络设备104确认第三报文丢失事件消除。
网络设备根据第三报文丢失事件消除认为第三报文丢失事件恢复。
S515:网络设备根据第一报文丢失事件消除,将该时钟端口的端口属性值置为第二值。
当网络设备104仅存在第一报文丢失事件时,网络设备104根据端口6的第一报文丢失事件消除,确认第一报文丢失事件恢复。并根据该第一报文丢失事件消除,将该时钟端口的端口属性值置为第二值。
当网络设备104的端口6还存在第二报文丢失事件,网络设备104根据第一报文丢失事件消除和第二报文丢失事件消除,将该时钟端口的端口属性值置为第二值。
当网络设备104的端口6还存在第三报文丢失事件,网络设备104根据第一报文丢失事件消除、第二报文丢失事件消除和第三报文丢失事件消除,将该时钟端口的端口属性值置为第二值。在一个示例中,当网络设备104被配置为one-step模式时,网络设备104根据丢失同步事件消除和丢失延迟响应事件消除,将该时钟端口的端口属性值置为第二值。当网络设备104被配置为two-step模式时,网络设备104根据丢失同步事件消除、丢失延迟响应事件消除和丢失跟随事件消除,将该时钟端口的端口属性值置为第二值。
下面仍结合图1所示的场景对本申请实施例提供的方法所涉及的几种可能的实施方式进行举例说明,将网络设备104作为此处的网络设备进行介绍。图5b所示的方法实施例与图5a所示的方法实施例方法类似,详细内容请参见图5a部分阐述,此处仅针对不同的地方进行详细描述。如图5b所示,用于实现时钟端口状态恢复的方法包括:
S502:当网络设备104生成第一报文丢失事件后,网络设备104根据该第一报文丢失事件,将该报文丢失事件对应的端口参数值置为第三值,此处的第三值可为真。该第三值 用于表明该时钟端口丢失对应类型的时钟报文。
在一个示例中,当该第一报文丢失事件为丢失同步事件时,该事件对应的端口参数为丢失同步参数,也可以称为:端口数据集信号失效属性.丢失同步参数(portDS.SF.loss-sync-message),即:该端口参数对应的报文类型为同步报文。该端口参数的值为第三值,表明该端口丢失同步报文。
当该第一报文丢失事件为丢失跟随事件时,该事件对应的端口参数为丢失跟随参数,也可以称为:端口数据集信号失效属性.丢失跟随参数(portDS.SF.loss-follow-up-message),即:该端口参数对应的报文类型为跟随报文。该端口参数的值为第三值,表明该端口丢失延迟跟随报文。
当该第一报文丢失事件为丢失延迟响应事件时,该事件对应的端口参数为丢失延迟响应参数,也可以称为:端口数据集信号失效属性.丢失延迟响应参数(portDS.SF.loss-delay-resp-message),即:该端口参数对应的报文类型为延迟响应报文。该端口参数的值为第三值,表明该端口丢失延迟响应报文。
S503:网络设备根据第一报文丢失事件将该时钟端口的端口属性值置为第一值。
参见图5a S503处描述,此处,网络设备可以是根据第一报文丢失事件将该时钟端口的端口属性值置为第一值,也可以是根据上述端口参数的值为第三值,将该时钟端口的端口属性值置为第一值。
S506与S508:参见S502处的描述。
S510:网络设备根据第一报文丢失事件消除,将对应的端口参数值置为第四值。
网络设备104根据该第一报文丢失事件消除,将该报文丢失事件对应的端口参数值置为第四值,此处的第四值可为假。该第四值表明,该端口参数对应类型的时钟报文接收正常。
在一个示例中,当该第一报文丢失事件为丢失同步事件或丢失跟随事件时,网络设备可直接根据对应的报文丢失事件消除,自动将该报文丢失事件对应的端口参数值置为第四值。当该第一报文丢失事件为丢失延迟响应事件时,网络设备104可以通过接收到的配置指令,将丢失延迟响应参数的值置为第四值。该配置指令可以是网络管理人员通过管理系统、管理接口等向网络设备104下发的配置指令。
S512:参见S510。
S516:网络设备根据端口参数的值为第四值,将该时钟端口的端口属性值置为第二值。
当第一报文丢失事件对应的端口参数的值为第四值时,表明该第一报文丢失事件恢复。当网络设备的所有相关端口参数的值均为第四值时,网络设备将该时钟端口的端口属性值置为第二值。在一个示例中,当网络设备104被配置为one-step模式时,网络设备104根据丢失同步参数和丢失延迟响应参数的值为第四值,将该时钟端口的端口属性值置为第二值。当网络设备104被配置为two-step模式时,网络设备104根据丢失同步参数、丢失延迟响应参数和丢失跟随参数的值为第四值,将该时钟端口的端口属性值置为第二值。
下面仍结合图1所示的场景对本申请实施例提供的方法所涉及的几种可能的实施方式进行举例说明,将网络设备104作为此处的网络设备进行介绍。图6a所示的方法实施例与图5a所示的方法实施例方法类似,详细内容请参见图5a部分阐述,此处仅针对不同的地方进行详细描述。如图6a所示,用于实现时钟端口状态恢复的方法包括:
S601:网络设备检测到时钟端口丢失第一类型或第二类型的时钟报文,生成第一报文丢失事件。
该第一类型或第二类型的时钟报文可为同步报文和跟随报文,即当网络设备检测到同步报文或跟随报文中的任一种时钟报文后,则生成第一报文丢失事件。在一个示例中,该报文丢失事件为丢失同步事件。
其他相关信息请参见S501。
S603:网络设备根据第一报文丢失事件将该时钟端口的端口属性值置为第一值。
S605:网络设备检测到该时钟端口还发生第三类型的时钟报文丢失,生成第二报文丢失事件。
该第三类型的时钟报文可为延迟响应报文,对应的,该第二报文丢失事件可为丢失延迟响应报文。
步骤S605和步骤S601的执行顺序可以互换,S603只需在S601和S605任一步骤执行之后执行,另一步骤与S603的执行顺序先后不做限定。
S609:网络设备的该时钟端口接收到第一类型和第二类型的时钟报文,确认第一报文丢失事件消除。
在一个示例中,当第一类型为同步报文,第二类型为跟随报文时,当网络设备104被配置为one-step模式时,网络设备104的端口6接收到M个同步报文后,则网络设备104可以生成同步报文丢失消除事件;当网络设备104被配置为two-step模式时,则网络设备104的端口6接收到M个同步报文和M个跟随报文后,则网络设备104可以生成同步报文丢失消除事件。网络设备104的端口6的sync报文里携带有one-step/two-step的标记位。
网络设备根据该同步报文丢失消除事件,确认第一报文丢失事件消除。
在另一个示例中,当第一类型为同步报文,第二类型为跟随报文时,当网络设备104被配置为one-step模式时,网络设备104的端口6接收到M个同步报文后,则网络设备104确认第一报文丢失事件消除。
S611:网络设备根据第一报文丢失事件消除,将该时钟端口的端口属性值置为第二值。
网络设备可以仅根据第一报文丢失事件消除,将该时钟端口的端口属性值置为第二值,也可以根据第一报文丢失事件消除和第二报文丢失事件消除,将该时钟端口的端口属性值置为第二值。
下面仍结合图1所示的场景对本申请实施例提供的方法所涉及的几种可能的实施方式进行举例说明,将网络设备104作为此处的网络设备进行介绍。图6b所示的方法实施例与图6a所示的方法实施例方法类似,详细内容请参见图6a部分阐述,此处仅针对不同的地方进行详细描述。如图6b所示,用于实现时钟端口状态恢复的方法包括:
S602:网络设备根据第一报文丢失事件将给报文事件对应的端口参数置为第三值。
在一个示例中,当该第一报文丢失事件为丢失同步事件时,该事件对应的端口参数为丢失同步参数,也可以称为:端口数据集信号失效属性.丢失同步参数(portDS.SF.loss-sync-message)。该端口参数的值为第三值,表明该端口丢失同步报文或跟随报文。当该第一报文丢失事件为丢失延迟响应事件时,该事件对应的端口参数为丢失延迟响应参数,也可以称为:端口数据集信号失效属性.丢失延迟响应参数(portDS.SF.loss-delay-resp-message)。该端口参数的值为第三值,表明该端口丢失延迟响应报文。
S610:网络设备根据第一报文丢失事件消除,将该报文事件对应的端口参数置为第四值。
网络设备104根据该第一报文丢失事件消除,将该报文丢失事件对应的端口参数值置为第四值,此处的第四值可为假。该第四值表明,该端口参数对应类型的时钟报文接收正常。
本申请提供的实施例可以用于portDS.SF的恢复,但并不限于时钟端口的本属性,也可以用于恢复时钟端口的其他属性,本申请不做具体限定。
以上,介绍了本申请提供的方法实施例,以下介绍本申请提供的网络设备。
本申请提供了一种装置(例如转发器/网络设备),所述装置具有实现上述方法中的网络设备行为的功能。所述功能可以基于硬件实现,也可以基于硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。例如参见下图图7、图8和图9。
图7是本申请实施例提供的一种装置结构示意图,该装置700可以执行图4、图5a、图5b、图6a和图6b所示的网络设备(网络设备104)执行的方法。该装置700包括第一通信单元701,处理单元702,第二通信单元703。该第一通信单元701可用于执行上述方法实施例中的网络设备的接收时钟报文、发送时钟报文等相关方法,第二通信单元703,可用于执行上述方法实施例中的网络设备的接收配置指令等相关方法,第一通信单元701和第二通信单元703也可以为由一个通信单元实现。处理单元702,可用于执行上述方法实施例中的生成报文丢失事件,将时钟端口的端口属性值置为第一值或第二值、确定报文丢失事件消除和修改端口参数的值等相关方法。
需要说明的一点是,图7实施例提供的网络设备在进行如上所述的时钟端口状态恢复的处理时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将网络设备的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能;或者用统一个功能单元完成上述多个单元的功能。应理解,上述实施例提供的网络设备与上述时钟端口状态恢复的方法实施例属于同一构思,在此仅针对该网络设备的各单元执行的步骤进行了举例说明,但并不代表其就不执行上述实施例中的其他步骤或可选方法,其具体实现过程详见方法实施例,这里不再赘述。
图8是本申请实施例提供的一种网络设备800的结构示意图。该装置800可以执行图4、图5a、图5b、图6a和图6b所示的网络设备(网络设备104)执行的方法。 参见图8所示的设备结构示意图。该装置800包括至少一个处理器801,通信总线802以及至少一个通信接口804,可选地,该装置800还可以包括存储器803。
处理器801可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路。处理器801可以用于检测通信接口804是否丢失或接收到时钟报文,并根据检测结果进行处理,以实现本申请实施例中提供的时钟端口状态恢复的方法。
通信总线802用于在处理器801、通信接口804和存储器803之间传送信息。
存储器803可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
存储器803可以是独立存在,通过通信总线802与处理器801相连接。存储器803也可以和处理器801集成在一起。
可选地,存储器803用于存储执行本申请方案的程序代码或指令,并由处理器801来控制执行。处理器801用于执行存储器803中存储的程序代码。程序代码中可以包括一个或多个软件模块。可选地,处理器801自身也可以存储执行本申请方案的程序代码或指令。
通信接口804,使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)、广域网等。在本申请实施例中,通信接口804可以用于接收网络中的第二网络设备发送的时钟报文,也可以向第二网络设备发送时钟报文。通信接口804可以为以太接口(Ethernet)接口、快速以太(Fast Ethernet,FE)接口或千兆以太(Gigabit Ethernet,GE)接口等,该通信接口804,还可以用于接收配置指令,使得处理器801可以根据配置指令的指示,修改端口属性、端口参数的值。该网络设备还可以包括其他通信接口,用其他通信接口接收配置指令。
在具体实现中,作为一种实施例,设备800可以包括多个处理器,例如图8中所示的处理器801和处理器805。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在另一个可能的设计中,本申请提供了一种网络设备,所述网络设备包括:主控板和接口板,进一步,还可以包括交换网板。该网络设备用于执行上述方法中的任意可能的实现方式中的方法。例如图9所示。
图9是本申请实施例提供的一种装置900的结构示意图。该装置900可以执行图4、图5a、图5b、图6a和图6b所示的网络设备(网络设备104)执行的方法。参见图9所示的装置结构示意图。该装置900包括主控板和一个或多个接口板,主控板与接口板通信连接。主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板负责对装置900中各个组件的控制和管理,包括路由计算、设备管理和维护功能。接口板也称为线卡(line processing unit,LPU)或线卡(line card),用于转发数据。在一些实施例中,装置900也可以包括交换网板,交换网板与主控板、接口板通信连接,交换网板用于转发接口板之间的数据,交换网板也可以称为交换网板单元(switch fabric unit,SFU)。接口板包括中央处理器、存储器、转发芯片和物理接口卡(physical interface card,PIC)。中央处理器与存储器、网络处理器和物理接口卡分别通信连接。存储器用于存储转发表。转发芯片用于基于存储器中保存的转发表转发接收到的报文,如果报文的目的地址为装置900的地址,则将该报文上送至中央处理器(central processing unit,CPU),如中央处理器931处理;如果报文的目的地址不是装备900的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。转发芯片可以是网络处理器(network processor,NP)。PIC也称为子卡,可安装在接口板上,负责将光电信号转换为数据报文并对数据报文进行合法性检查后转发给转发芯片处理。在一些实施例中,中央处理器也可执行转发芯片的功能,比如基于通用CPU实现软件转发,从而接口板中不需要转发芯片。主控板、接口板、交换网板之间的通信连接可以通过总线来实现。在一些实施例中,转发芯片可以通过专用集成电路(application-specific integrated circuit,ASIC)或现场可编程门阵列(field programmable gate array,FPGA)实现。
在逻辑上,装置900包括控制面和转发面,控制面包括主控板和中央处理器,转发面包括执行转发的各个组件,比如存储器、PIC和NP。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,NP基于控制面下发的转发表对装置900的PIC收到的报文查表转发。控制面下发的转发表可以保存在存储器中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只 有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
在一种可能的设计中,本申请提供了一种网络设备,该网络设备包括控制器和第一转发子设备。第一转发子设备包括:接口板,进一步,还可以包括交换网板。第一转发子设备用于执行上述图9中的接口板的功能,进一步,还可以执行上述图9中交换网板的功能。所述控制器包括接收器、处理器、发送器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接接收器、发送器、随机存取存储器以及只读存储器。其中,当需要运行控制器时,通过固化在只读存储器中的基本输入/输出系统或者嵌入式系统中的引导系统(bootloader)进行启动,引导控制器进入正常运行状态。在控制器进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行上述中主控板的功能。
结合本申请公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于用户设备中。当然,处理器和存储介质也可以作为分立组件存在于用户设备中。
本申请提供了一种计算机存储介质,用于储存为上述网络设备所用的程序、代码或指令,当处理器或硬件设备执行这些程序、代码或指令时可以完成上述网络设备的功能或步骤。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软 件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请提供了一种网络系统,该网络系统包括上述网络设备和第二网络设备,该第二网络设备可以为任何支持时钟同步功能的网络设备,该第二网络设备与第一网络设备通过通信接口相连,该第二网络设备包括通信接口,该通信接口作为主时钟端口与第一网络设备通信。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请所描述的功能可以用硬件或者用硬件和软件的组合来实现。当使用硬件和软件的组合实现时,可以将这些软件存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
应理解,本发明实施例中提及的处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
还应理解,本发明实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是ROM、PROM、可擦除EPROM、EEPROM或闪存。易失性存储器可以是随机存取存储器RAM,其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如SRAM、DRAM、SDRAM、DDR SDRAM、ESDRAM、SLDRAM和DR RAM等。
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,部分或全部步骤可以并行执行或先后执行,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机 软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,网络设备或者终端设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本发明各方法实施例之间相关部分可以相互参考;各装置实施例所提供的装置用于执行对应的方法实施例所提供的方法,故各装置实施例可以参考相关的方法实施例中的相关部分进行理解。
本发明各装置实施例中给出的装置结构图仅示出了对应的装置的简化设计。在实际应用中,该装置可以包含任意数量的发射器,接收器,处理器,存储器等,以实现本发明各装置实施例中该装置所执行的功能或操作,而所有可以实现本申请的装置都在本申请的保护范围之内。
本发明各实施例中提供的消息/帧/指示信息、模块或单元等的名称仅为示例,可以使用其他名称,只要消息/帧/指示信息、模块或单元等的作用相同即可。
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,不同的实施例可以进行组合,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何组合、修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (33)

  1. 一种时钟端口属性恢复方法,其特征在于,包括:
    第一网络设备根据时钟端口在超时时间内未接收到N个第一类型的时钟报文,将所述时钟端口的端口数据集信号失效属性的值置为第一值,所述时钟端口与第二网络设备的主时钟端口相连,所述时钟端口为从端口或被动端口,所述第一类型的时钟报文为以下三种时钟报文中的任一种:同步报文、跟随报文和延迟响应报文,所述N为大于0的正整数,所述第一值表明所述时钟端口发生报文丢失;
    在所述第一网络设备将所述端口数据集信号失效属性的值置为第一值之后,当所述第一网络设备确定满足恢复条件时,所述第一网络设备将所述端口数据集信号失效属性的值置为第二值,所述第二值表明所述时钟端口未发生报文丢失。
  2. 根据权利要求1所述的方法,其特征在于,所述第一网络设备确定满足恢复条件包括:所述第一网络设备接收到配置指令,所述配置指令用于指示所述第一网络设备将所述端口数据集信号失效属性的值置为所述第二值。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一网络设备确定满足恢复条件,包括:所述第一网络设备在第一时间内接收到M个同步报文和M个跟随报文,所述M为大于0的正整数。
  4. 根据权利要求1或2所述的方法,其特征在于,
    所述第一类型的时钟报文为同步报文,所述第一网络设备确定满足恢复条件,包括:所述第一网络设备在第二时间内接收到M个同步报文;或
    所述第一类型的时钟报文为跟随报文,所述第一网络设备确定满足恢复条件,包括:所述第一网络设备在所述第二时间内接收到M个跟随报文,
    所述M为大于0的正整数。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一网络设备确定满足恢复条件,包括:所述第一网络设备接收第二消息,所述第二消息表明所述时钟端口的延迟响应报文丢失状态恢复。
  6. 根据权利要求1或2所述的方法,其特征在于,所述第一网络设备根据时钟端口在超时时间内未接收到N个第一类型的时钟报文,将所述时钟端口的端口数据集信号失效属性的值置为第一值,包括:
    所述第一网络设备根据所述时钟端口在超时时间内未接收到所述N个第一类型的时钟报文,生成第一事件;
    所述第一网络设备根据所述第一事件,将所述端口数据集信号失效属性的值置为第一值。
  7. 根据权利要求3-5任一项所述的方法,其特征在于,所述第一网络设备根据时钟端口在超时时间内未接收到N个第一类型的时钟报文,将所述时钟端口的端口数据集信号失效属性的值置为第一值,包括:
    所述第一网络设备根据所述时钟端口在超时时间内未接收到所述N个第一类型的时钟报文,生成第一事件;
    所述第一网络设备根据所述第一事件,将所述端口数据集信号失效属性的值置为所述 第一值。
  8. 根据权利要求7所述的方法,其特征在于,所述当所述第一网络设备确定满足恢复条件时,所述第一网络设备将所述端口数据集信号失效属性的值置为第二值,包括:
    当所述第一网络设备根据确定满足恢复条件时,所述第一网络设备确定所述第一丢失事件消除;
    所述第一网络设备根据所述第一事件消除,将所述端口数据集信号失效属性的值置为所述第二值。
  9. 根据权利要求8所述的方法,其特征在于,所述第一网络设备根据所述第一事件消除,将所述端口数据集信号失效属性的值置为所述第二值,包括:
    所述第一网络设备根据所述第一事件消除,将所述时钟端口的所述第一事件对应的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;
    所述第一网络设备根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
  10. 根据权利要求6-9任一项所述的方法,其特征在于,所述第一事件包括所述第一类型的标识。
  11. 根据权利要求3-5任一项所述的方法,其特征在于,所述当所述第一网络设备确定满足恢复条件时,所述第一网络设备将所述端口数据集信号失效属性的值置为第二值,包括:
    所述第一网络设备根据确定满足恢复条件,将所述第一类型对应的所述时钟端口的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;
    所述第一网络设备根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,在所述第一网络设备将所述时钟端口的端口数据集信号失效属性的值置为第一值之后,所述方法还包括:
    所述第一网络设备根据所述端口数据集信号失效属性的值为第一值,将所述时钟端口的时钟参考源Erbest数据集的值置为空。
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述方法还包括:
    如果所述端口数据集信号失效属性的值为第一值,所述第一网络设备生成状态决策事件,所述状态决策事件用于指示所述第一网络设备决策所述时钟端口的状态。
  14. 根据权利要求1-13任一项所述的方法,其特征在于,在所述第一网络设备将所述端口数据集信号失效属性的值置为第二值之后,所述方法还包括:
    所述第一网络设备将所述Erbest数据集的值置为非空。
  15. 根据权利要求1-14任一项所述的方法,其特征在于,在所述第一网络设备将所述端口数据集信号失效属性的值置为第一值前,所述端口数据集信号失效属性的值为所述第二值。
  16. 根据权利要求1-15任一项所述的方法,其特征在于,所述时钟报文为精确时间协议PTP时钟报文。
  17. 一种第一网络设备,其特征在于,包括:处理单元和第一通信单元,
    所述处理单元,用于根据所述第一通信单元在超时时间内未接收到N个第一类型的时钟报文,将所述第一通信单元的端口数据集信号失效属性的值置为第一值,所述第一类型的时钟报文为以下三种时钟报文中的任一种:同步报文、跟随报文和延迟响应报文,所述N为大于0的正整数,所述第一值表明所述第一通信单元发生报文丢失;
    所述第一通信单元,用于与第二网络设备的主时钟端口通信,所述第一通信单元的时钟端口状态为从端口或被动端口;
    在所述处理单元将所述端口数据集信号失效属性的值置为第一值之后,所述处理单元,还用于根据确定满足恢复条件时,将所述端口数据集信号失效属性的值置为第二值,所述第二值表明所述第一通信单元未发生报文丢失。
  18. 根据权利要求17所述的第一网络设备,其特征在于,还包括第二通信单元,
    所述第二通信单元,用于接收配置指令,所述配置指令用于指示所述处理单元将所述端口数据集信号失效属性的值置为所述第二值;
    所述处理单元,还用于根据所述第二通信单元接收到所述配置指令,确定满足所述恢复条件。
  19. 根据权利要求17或18所述的第一网络设备,其特征在于,
    所述处理单元,还用于根据所述第一通信单元在第一时间内接收到M个同步报文和M个跟随报文,确定满足所述恢复条件,所述M为大于0的正整数。
  20. 根据权利要求17或18所述的第一网络设备,其特征在于,
    所述第一类型的时钟报文为同步报文,所述处理单元还用于根据所述第一通信单元在第二时间内接收到M个同步报文,确定满足所述恢复条件;或
    所述第一类型的时钟报文为跟随报文,所述处理单元还用于根据所述第一通信单元在所述第二时间内接收到M个跟随报文,确定满足所述恢复条件;
    M为大于0的正整数。
  21. 根据权利要求17-20任一项所述的第一网络设备,其特征在于,所述处理单元,还用于根据所述第二通信单元接收到第二消息,确定满足所述恢复条件,所述第二消息表明所述第一通信单元的延迟响应报文丢失状态恢复。
  22. 根据权利要求17或18所述的第一网络设备,其特征在于,
    所述处理单元,还用于根据所述第一通信单元在超时时间内未接收到所述N个第一类型的时钟报文,生成第一事件;
    所述处理单元,还用于根据所述第一事件,将所述端口数据集信号失效属性的值置为第一值。
  23. 根据权利要求19-21任一项所述的第一网络设备,其特征在于,
    所述处理单元,还用于根据所述第一通信单元在超时时间内未接收到所述N个第一类型的时钟报文,生成第一事件;
    所述处理单元,还用于根据所述第一事件,将所述端口数据集信号失效属性的值置为所述第一值。
  24. 根据权利要求23所述的第一网络设备,其特征在于,
    所述处理单元,还用于根据确定满足所述恢复条件,确定所述第一丢失事件消除;
    所述处理单元,还用于根据所述第一事件消除,将所述端口数据集信号失效属性的值 置为所述第二值。
  25. 根据权利要求24所述的第一网络设备,其特征在于,
    所述处理单元,还用于根据所述第一事件消除,将所述通信单元的所述第一事件对应的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;
    所述处理单元,还用于根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
  26. 根据权利要求19-21任一项所述的第一网络设备,
    所述处理单元,还用于根据确定满足恢复条件,将所述第一类型对应的所述第一通信单元的端口参数的值置为第三值,所述第三值表明所述端口参数对应的时钟报文未丢失;
    所述处理单元,还用于根据所述时钟端口参数的值为第三值,将所述端口数据集信号失效属性的值置为所述第二值。
  27. 根据权利要求17-26任一项所述的第一网络设备,其特征在于,
    所述处理单元,还用于根据所述端口数据集信号失效属性的值为第一值,将所述时钟端口的时钟参考源Erbest数据集的值置为空。
  28. 根据权利要求17-27任一项所述的第一网络设备,其特征在于,
    当所述端口数据集信号失效属性的值为第一值时,所述处理单元还用于生成状态决策事件,所述状态决策事件用于指示所述处理单元决策所述时钟端口的状态。
  29. 根据权利要求17-28任一项所述的第一网络设备,其特征在于,
    所述处理单元,还用于将所述Erbest数据集的值置为非空。
  30. 根据权利要求17-29任一项所述的第一网络设备,其特征在于,在所述处理单元将所述端口数据集信号失效属性的值置为第一值前,所述端口数据集信号失效属性的值为所述第二值。
  31. 一种网络设备,其特征在于,包括:至少一个处理器,所述至少一个处理器与至少一个存储器耦合:
    所述至少一个处理器,用于执行所述至少一个存储器中存储的计算机程序或指令,使得所述网络设备执行如权利要求1-16任意一项所述的方法。
  32. 一种芯片,其特征在于,包括处理器和接口电路,
    所述接口电路,用于接收指令并传输至所述处理器;
    所述处理器,用于执行如权利要求1-16任意一项所述的方法。
  33. 一种网络系统,其特征在于,所述系统包括第一网络设备和第二网络设备,
    所述第一网络设备为权利要求17-30中任一项所述的第一网络设备,或所述第一网络设备为权利要求31所述的网络设备,
    所述第二网络设备包括通信接口,所述第二网络设备通过所述通信接口与所述第一网络设备通信,所述通信接口的时钟端口状态为主时钟端口。
PCT/CN2021/070507 2020-01-06 2021-01-06 一种时钟端口属性恢复方法, 设备及系统 WO2021139692A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP21738393.4A EP4068659B1 (en) 2020-01-06 2021-01-06 Clock port attribute recovery method, device, and system
JP2022541659A JP7451721B2 (ja) 2020-01-06 2021-01-06 クロックポート属性回復方法、デバイス、およびシステム
KR1020227023544A KR102684118B1 (ko) 2020-01-06 2021-01-06 클록 포트 속성 복원 방법, 디바이스, 및 시스템
US17/857,412 US20220337384A1 (en) 2020-01-06 2022-07-05 Clock Port Attribute Recovery Method, Device, and System

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010011547 2020-01-06
CN202010011547.7 2020-01-06
CN202010136536.1A CN113078976A (zh) 2020-01-06 2020-03-02 一种时钟端口属性恢复方法、设备及系统
CN202010136536.1 2020-03-02

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/857,412 Continuation US20220337384A1 (en) 2020-01-06 2022-07-05 Clock Port Attribute Recovery Method, Device, and System

Publications (1)

Publication Number Publication Date
WO2021139692A1 true WO2021139692A1 (zh) 2021-07-15

Family

ID=76609104

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/070507 WO2021139692A1 (zh) 2020-01-06 2021-01-06 一种时钟端口属性恢复方法, 设备及系统

Country Status (6)

Country Link
US (1) US20220337384A1 (zh)
EP (1) EP4068659B1 (zh)
JP (1) JP7451721B2 (zh)
KR (1) KR102684118B1 (zh)
CN (1) CN113078976A (zh)
WO (1) WO2021139692A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394264A (zh) * 2007-09-21 2009-03-25 华为技术有限公司 周期性报文传递的监控方法及装置
CN103051406A (zh) * 2011-10-17 2013-04-17 中兴通讯股份有限公司 一种1588-2008协议中时钟同步的方法及系统
US20130227172A1 (en) * 2012-02-27 2013-08-29 Qun Zheng Frequency distribution using precision time protocol
WO2017130034A1 (en) * 2016-01-27 2017-08-03 Telefonaktiebolaget Lm Ericsson (Publ) A method of timing loop prevention for the precision time protocol (ptp) with g.8275.1 profile

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230198738A1 (en) * 2021-12-21 2023-06-22 Cisco Technology, Inc. Method to eliminate clock synchronization from undesired clock sources
US12120212B2 (en) * 2022-03-29 2024-10-15 Intel Corporation Time recovery in a time sensitive network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394264A (zh) * 2007-09-21 2009-03-25 华为技术有限公司 周期性报文传递的监控方法及装置
CN103051406A (zh) * 2011-10-17 2013-04-17 中兴通讯股份有限公司 一种1588-2008协议中时钟同步的方法及系统
US20130227172A1 (en) * 2012-02-27 2013-08-29 Qun Zheng Frequency distribution using precision time protocol
WO2017130034A1 (en) * 2016-01-27 2017-08-03 Telefonaktiebolaget Lm Ericsson (Publ) A method of timing loop prevention for the precision time protocol (ptp) with g.8275.1 profile

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Precision time protocol telecom profile for phase/time synchronization with full timing support from the network; G.8275.1/Y.1369.1 (07/14)", ITU-T STANDARD, INTERNATIONAL TELECOMMUNICATION UNION, no. G.8275.1/Y.1369.1 (07/14), 22 July 2014 (2014-07-22), GENEVA ; CH, pages 1 - 39, XP044008632 *
"Precision time Protocol Telecom Profile for time/phase synchronization with partial timing support from the network; G.8275.2/Y.1369.2 (06/16)", ITU-T STANDARD, INTERNATIONAL TELECOMMUNICATION UNION, no. G.8275.2/Y.1369.2 (06/16), 22 June 2016 (2016-06-22), GENEVA ; CH, pages 1 - 40, XP044172636 *
See also references of EP4068659A4

Also Published As

Publication number Publication date
EP4068659B1 (en) 2024-06-19
KR102684118B1 (ko) 2024-07-10
EP4068659A4 (en) 2023-01-18
US20220337384A1 (en) 2022-10-20
CN113078976A (zh) 2021-07-06
EP4068659A1 (en) 2022-10-05
KR20220108816A (ko) 2022-08-03
JP7451721B2 (ja) 2024-03-18
JP2023509491A (ja) 2023-03-08

Similar Documents

Publication Publication Date Title
US11496235B2 (en) Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP
US9876596B2 (en) Method and device for detecting fault in synchronization link
US9749073B2 (en) Clock recovery in a packet based network
US20110026394A1 (en) Distributed ethernet system and method for detecting fault based thereon
RU2638645C2 (ru) Способ для определения опорных синхросигналов, подвергнутых воздействию изменения в асимметрии задержки трассы распространения между узлами в сети связи
US9654555B2 (en) Method for synchronizing local clocks in a distributed computer system
EP3352392B1 (en) Time synchronization packet processing method and device
WO2015117501A1 (zh) 一种时间同步方法、可编程逻辑器件、单板及网元
KR20160126325A (ko) 광전달망 시스템에서의 데이터 손실을 최소화하는 보호절체 장치 및 방법
WO2015125439A1 (ja) 通信システム、無線通信装置及び無線通信方法
CN110266422B (zh) 中间时钟设备报文驻留时间处理方法、装置、设备及介质
US20240080122A1 (en) Packet transmission method and apparatus, device, and storage medium
US9641268B2 (en) Method, system and device for synchronizing clocks
WO2021139692A1 (zh) 一种时钟端口属性恢复方法, 设备及系统
CN116865898A (zh) 基于多时钟域的时钟冗余系统和时钟冗余的实现方法
JP6805938B2 (ja) 仮想lanの時刻同期方法
JP2023554065A (ja) クロックソースを選択するための方法及び装置
WO2016184225A1 (zh) 一种时间同步消息发送方法和装置
KR101973264B1 (ko) PTP(precision time protocol) 시스템에서의 시간 동기 장애 복구 방법 및 그 장치
EP3070886A1 (en) Path delay determination in ring networks
WO2023236048A1 (en) Method and network device for ptp clock synchronization
WO2021213225A1 (zh) 一种信号帧的处理方法及相关设备
CN118282550A (zh) 一种时钟源的确定方法、网络设备及网络管理设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21738393

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022541659

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20227023544

Country of ref document: KR

Kind code of ref document: A

Ref document number: 2021738393

Country of ref document: EP

Effective date: 20220701

NENP Non-entry into the national phase

Ref country code: DE