WO2017211140A1 - Method and apparatus for detecting clock/time of network device, and computer storage medium - Google Patents

Method and apparatus for detecting clock/time of network device, and computer storage medium Download PDF

Info

Publication number
WO2017211140A1
WO2017211140A1 PCT/CN2017/082002 CN2017082002W WO2017211140A1 WO 2017211140 A1 WO2017211140 A1 WO 2017211140A1 CN 2017082002 W CN2017082002 W CN 2017082002W WO 2017211140 A1 WO2017211140 A1 WO 2017211140A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock
network device
detection
indicator
time
Prior art date
Application number
PCT/CN2017/082002
Other languages
French (fr)
Chinese (zh)
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 中兴通讯股份有限公司
Publication of WO2017211140A1 publication Critical patent/WO2017211140A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Definitions

  • the present invention relates to the field of communications, and in particular, to a network device clock/time detecting method, apparatus, and computer storage medium.
  • embodiments of the present invention provide a network device clock/time detecting method, apparatus, and computer storage medium.
  • the embodiment of the invention provides a network device clock/time detecting method, including:
  • the detection indicators include the following five groups: no clock/time synchronization indicator, clock/time synchronization hop count exceeding indicator, lack of active or standby clock source configuration
  • the indicator, clock synchronization is configured as a ring indicator, and the time synchronization indicator is not turned on.
  • the embodiment of the invention further provides a network device clock/time detecting device, comprising:
  • the reading module is configured to read at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator is not supported, the clock/time synchronization hop count exceeds the standard indicator, and the main indicator is missing.
  • the or backup clock source to configure indicators, clock synchronization to be configured as a ring indicator, and not open time synchronization indicators.
  • the processing module is configured to acquire detection parameters corresponding to each detection indicator, and detect the detection parameter and the corresponding detection indicator to generate a detection result;
  • An output module configured to output a test result.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and when executed, causes at least one processor to execute the foregoing network device clock/time detection method.
  • the network device clock/time detecting method, apparatus, and computer storage medium by reading at least one set of detection indicators for detecting the clock/time of the network device, the detection indicators include the following five groups: the clock is not supported. /Time synchronization indicator, clock/time synchronization hop count exceeding indicator, lack of active or standby clock source configuration indicator, clock synchronization configuration into ring indicator, and non-on time synchronization indicator; obtaining detection parameters corresponding to each detection index, and detecting parameters The detection is performed with the corresponding detection index to generate a detection result; the detection result is output.
  • the above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2.
  • the clock/time synchronization hop count exceeds the standard;
  • the main or standby clock source configuration is missing; 4.
  • the clock synchronization is configured into a ring; 5.
  • the time synchronization is not enabled.
  • the utility model can solve the problems of low efficiency, labor-intensive and incapable of ensuring accuracy caused by the hidden trouble of the clock/time configuration of the network device in the prior art, thereby saving manpower and improving the efficiency of clock/time detection of the network device. It ensures the accuracy of the test results and the stability of the network business.
  • FIG. 1 is a flowchart of a network device clock/time detecting method according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of detecting whether a network device does not support clock/time synchronization according to Embodiment 1 of the present invention
  • FIG. 3 is a flowchart of detecting whether a clock synchronization hop count of a network device exceeds a standard according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart of detecting whether a time synchronization hop count of a network device exceeds a standard according to Embodiment 1 of the present invention
  • FIG. 5 is a flowchart of detecting whether a network device lacks an active or standby clock source configuration according to Embodiment 1 of the present invention
  • FIG. 6 is a flowchart of detecting whether a clock synchronization configuration of a network device is looped according to Embodiment 1 of the present invention
  • FIG. 7 is a flowchart of detecting time synchronization of a network device not being turned on according to Embodiment 1 of the present invention.
  • FIG. 8 is a schematic structural diagram of a network device clock/time detecting apparatus according to Embodiment 2 of the present invention.
  • the embodiment provides a network design.
  • Figure 1 For the backup clock/time detection method, see Figure 1, including the following steps:
  • S101 Read at least one set of detection indicators for detecting clock/time of the network device, and the detection indicators include the following five groups: no clock/time synchronization indicator, no clock/time synchronization hop exceeding indicator, lack of active or standby clock Source configuration indicators, clock synchronization configured as ring indicators, and time synchronization indicators not enabled.
  • the clock/time synchronization indicator the clock/time synchronization hop count exceeding indicator, the lack of the active or standby clock source configuration indicator,
  • the clock synchronization is configured as a ring indicator and the time synchronization indicator is not turned on.
  • the method further includes: setting the five sets of detection indicators mentioned above.
  • the method of setting the detection indicator can be set as the default setting and/or according to the user operation.
  • the user can also change the detection index according to actual needs, and the user can input the clock/time synchronization indicator and the clock.
  • the time/synchronous hop count is exceeded, the primary or backup clock source configuration indicator is omitted, the clock synchronization is configured as a ring indicator, and the time synchronization indicator is not enabled.
  • the clock/time detection indicators of the network devices of the entire network are pre-configured to ensure the detection index. The correctness.
  • Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices.
  • the clock/time synchronization indicator is not supported to detect whether the network device does not support clock/time synchronization.
  • the clock/time synchronization hop count exceeds the standard indicator to detect the network device clock. Whether the time synchronization hop count is exceeded or not, the lack of the active or standby clock source configuration indicator corresponds to whether the network device is configured to detect whether the network device is missing the primary or backup clock source.
  • the clock synchronization is configured as a ring indicator corresponding to detecting whether the network device clock synchronization is configured as a ring, not enabled.
  • the time synchronization indicator corresponds to detecting whether the network device does not turn on time synchronization.
  • S102 Acquire detection parameters corresponding to each detection index, and detect detection parameters and corresponding detection indicators to generate detection results.
  • Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices, and the detection of each group is independent and does not interfere with each other.
  • the detection parameters corresponding to the detection indexes are obtained, and the detection parameters and the corresponding detection indicators may be detected by any one of the following two methods:
  • Method 1 Obtain all the detection parameters, and test the detection parameters and the corresponding detection indicators by the group;
  • Manner 2 Obtain a set of detection parameters, and detect the detection parameters and the corresponding detection indicators; then acquire the next set of detection parameters, and detect the detection parameters and the corresponding detection indicators until all the detection indicators are detected and corresponding Detection parameters.
  • the detection indicator when checking whether the network device does not support clock/time synchronization, includes not supporting the clock/time synchronization indicator, and the clock/time synchronization indicator is not supported, including the version of the network device that does not support clock/time synchronization. , board, port. Obtain the version, board, and port of the network device to be detected. If the version of the network device does not support the clock/time synchronization indicator, or if the version of the network device does not meet the clock/time synchronization indicator, the board or port of the network device is not supported. If the clock/time synchronization indicator is not supported and there is an optical connection, it is determined that the network device does not support clock/time synchronization.
  • the specific judging process includes: determining whether the version of the network device belongs to a network device version that does not support clock/time synchronization; if yes, directly determining that the network device does not support clock/time synchronization, and is an abnormal state; if not, then If the board or port of the network device is not a board or port that does not support clock/time synchronization, the board or port of the network device is a board or port that does not support clock/time synchronization. If the board or port of the network device belongs to a network device or port that does not support clock/time synchronization, in order to judge the result more accurately, further determine whether the corresponding port has an optical connection configuration. If yes, determine the network. The device does not support clock/time synchronization and is in an abnormal state. If it does not exist, it is determined to be in a normal state.
  • the detection indicators include that the clock synchronization indicator is not supported, and the version, board, and port of the network device that does not support clock synchronization are obtained, and whether the version of the network device belongs to a network device that does not support clock synchronization is determined.
  • Version if yes, directly determine that the network device does not support clock synchronization, which is an abnormal state; if not, further determine the network device Whether the board or the port is a network device board or port that does not support clock synchronization; if the board or port of the network device does not belong to a network device board or port that does not support clock/time synchronization, it is determined to be in a normal state; The board or port of the device belongs to the network device board or port that does not support clock synchronization. To determine the result is more accurate, further determine whether the corresponding port has an optical connection configuration. If it exists, determine that the network device does not support clock synchronization. If it does not exist, it is judged to be in a normal state.
  • the detection indicator includes not supporting the time synchronization indicator, obtaining the version, board, and port of the network device that does not support time synchronization, and determining whether the version of the network device belongs to a network device that does not support time synchronization. If yes, it is determined that the network device does not support time synchronization and is in an abnormal state; if not, it is further determined whether the board or port of the network device belongs to a network device board or port that does not support time synchronization; If the board or port is not a network device or a port that does not support time synchronization, it is determined to be in a normal state.
  • the board or port of the network device belongs to a network device board or port that does not support time synchronization, the result is more accurate. Further, it is determined whether the optical port has an optical connection configuration. If yes, it is determined that the network device does not support time synchronization, and is an abnormal state; if not, it is determined to be a normal state.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the network device does not support the clock/time synchronization function. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicator when checking whether the clock/time synchronization hop count of the network device exceeds the standard, includes: a clock/time synchronization hop count exceeding the standard indicator; and the clock/time synchronization hop count exceeding the indicator may be set to clock/time synchronization. Hop count threshold.
  • Manner 1 Obtain the hop count of the local clock of the network device from the grandfather clock. When the hop count is greater than the clock/time synchronization hop exceeds the standard, determine that the time synchronization hop count of the network device exceeds the standard;
  • Manner 2 When the current synchronization timing source of the network device is the extracted Ethernet clock, obtain the hop count of the distance between the network device and the other network device; the current synchronization timing source of the other network device is the external clock, the internal clock, and the global positioning. System (GPS, Global Positioning System) clock or 1588 hours The current synchronous timing source of the clock or another network device is the extracted Ethernet clock, and the network device is farthest from the other network device; when the hop count is greater than the clock/time synchronization hop count exceeding the standard, the clock synchronization of the network device is determined. The number of hops exceeded the standard.
  • GPS Global Positioning System
  • Method 1 Refer to FIG. 3, determine whether the hop count of the local clock of the network device is greater than the time synchronization hop threshold, and if yes, determine that the time synchronization hop count of the network device exceeds the standard, and the abnormal state; if not, determine normal status.
  • the distance from the local clock to the grandfather clock can be queried through the 1588 state.
  • Manner 2 Refer to Figure 4 to determine whether the current synchronization timing source of the network device is the extracted Ethernet clock. If not, it does not participate in the evaluation; if yes, it determines whether the network device can find the root node, and the root node includes the current synchronization timing source.
  • Network device with clock, internal clock, GPS clock or 1588 clock;
  • the root node If the root node is found, it is determined whether the hop count of the network device from the root node is greater than the threshold of the clock synchronization hop count. If yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state. ;
  • the root node it is determined whether the hop count of the network device from the other network device is greater than the clock synchronization hop threshold, and the current synchronization timing source of the other network device is also the extracted Ethernet clock, and the network device is the most distant from the other network device. Far; if yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state.
  • the first method is to determine whether the time synchronization hop count of the network device exceeds the standard
  • the second method is to determine whether the clock synchronization hop count of the network device exceeds the standard, in order to implement a comprehensive check of the network device clock/time configuration to ensure the network service. Stability, in actual operation, it is necessary and indispensable to check whether the number of clock synchronization hops of the network device exceeds the standard and whether the time synchronization hop count exceeds the standard.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the clock/time synchronization hop count exceeds the standard. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicators include the lack of the active or standby clock source configuration indicators, and the lack of the active or standby clock source configuration indicators may include: the number of optical connections of the network device and the threshold number of clock sources configured for the corresponding optical connection port.
  • the threshold of the number of optical connections of the network device and the number of clock sources configured by the corresponding optical port includes the following two situations:
  • the threshold of the number of clock sources configured for the corresponding optical port is 1.
  • the clock source here includes the Ethernet clock, the line pumping clock, or the branch clock. If the number of clock sources configured on the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks an active or standby clock source configuration;
  • the threshold of the number of clock sources configured for the corresponding optical port is 2
  • the clock source here includes the extracted Ethernet clock, the line pumping clock, the branch clock, the external clock, and the GPS clock. Or 1588 clock, excluding the internal clock; in addition, if the number of clock sources configured by the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks the active or standby clock source configuration.
  • the extracted Ethernet clock means that the clock signal is extracted from the Ethernet line as the clock synchronization from the Ethernet line.
  • the Sync From E1 Line Clock refers to: extracting a clock signal from the E1 line as the system clock of the entire device (clock synchronization from E1 line).
  • the Sync From E1 branch clock means that the clock signal is extracted from the E1 signal input from the E1 port as the clock synchronization from the E1 branch.
  • Obtaining detection parameters corresponding to each detection index, and detecting the detection parameter and the corresponding detection index, and generating the detection result includes:
  • the number of optical connections is less than or equal to 1, the number of clock sources is less than 1, and the clock source includes the extracted Ethernet clock, the line pumping clock, or the tributary clock, or when the number of optical connections is greater than 1, the number of clock sources is less than 2, and the clock
  • the source does not include the internal clock, it is determined that the network device lacks the primary or backup clock source. Configuration.
  • the specific judging process includes: determining whether the number of optical connections of the network device is greater than 1. If the number of optical connections of the network device is less than or equal to 1, determining whether the number of clock sources configured by the optical connection port of the network device is less than 1, The clock source includes an extracted Ethernet clock, a line pumping clock, or a branching clock; if yes, it is determined that the network device lacks an active or standby clock source configuration, and is in an abnormal state; if not, it is determined to be a normal state, and the normal state is The specific situation is as follows: if the number of optical connections of the network device is equal to 1, it is determined whether the number of clock sources configured by the optical connection port of the network device is 1, and the clock source includes an extracted Ethernet clock, a line pumping clock, or a branching clock; if yes, Then it is determined to be in a normal state.
  • the clock source here includes the extracted Ethernet clock, the line drawing clock, the branch pumping clock, the external clock, and the GPS.
  • the clock or 1588 clock does not include the internal clock; if so, it determines that the network device lacks the active or standby clock source configuration and is in an abnormal state; if not, it is determined to be in a normal state.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the primary or backup clock source configuration is missing. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicator when detecting whether the network device clock synchronization configuration is looped, includes clock synchronization configured as a ring indicator, acquiring detection parameters corresponding to each detection indicator, and detecting the detection parameter and the corresponding detection indicator,
  • the detection result includes: acquiring the version of the network device, the board, and the port.
  • the network device and the other network device are configured to extract an Ethernet clock, and
  • it is determined that the clock source along the optical connection link forms a closed loop in the direction according to the version, the board, and the port of the network device, it is determined that the network device clock is synchronously configured into a ring.
  • the specific judging process includes: judging whether the configuration of the network device is an extracted Ethernet clock, and if not, not participating in the evaluation, for example, if the network device is configured with a line drawing clock or a branch clock, it does not participate in the evaluation. . If the network device is configured with an Ethernet clock, determine whether the number of optical connections between the two network devices is greater than 1. If yes, determine the clock source along the optical connection link according to the version, board, and port of the network device. Whether a closed loop is formed in the direction, and if so, The clock of the network device is synchronously configured as a ring, which is an abnormal state; if not, it is determined to be a normal state.
  • the number of optical connections between the two network devices is not greater than 1, it is determined whether the number of optical connections between the two network devices is 1. If the number of optical connections between the two network devices is 1, according to the network device The version, the board, and the port determine whether the clock source along the optical link link forms a closed loop in the direction. If yes, it determines that it is in a normal state.
  • the network device When the network device is in the optical connection state, it can determine which direction the clock source is drawn according to the version, board, and port of the network device. It should be noted that if there is only one optical connection between two network devices, if the clock source is configured to be mutually pumped, this case does not determine that the clock synchronization is configured as a ring, which is a normal state.
  • the mutual extraction refers to: the two devices are each other's system clock.
  • a directional tree is formed, and the corresponding clock configuration along the current tree structure is extracted back to the source network device, and then the clock of the corresponding network device is determined to be configured as a ring.
  • the number of optical connections between the network device A and the network device B is greater than 1, the number of optical connections between the network device A and the network device B is greater than one; if the network device A and the network After the above rules check is applied between the devices B to configure clock synchronization for the ring, it is determined that the clock synchronization is configured as a ring. If the optical connection between the network device A and the network device B is directly performed, and the network device A and the network device B are also optically connected through the network device C, this situation also belongs to between the network device A and the network device B. The number of optical connections is greater than one.
  • the number of optical connections between the network device A and the network device B is greater than one, and is not limited to the above two types. For example, the following is one of the modes: the network device A and the network device B pass through the network device. C is optically connected to form an optical connection link 1. The network device A and the network device B are also optically connected through the network device D to form an optical connection link 2.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicator when checking whether the network device does not enable the time synchronization function, includes an un-on time synchronization indicator, acquires detection parameters corresponding to each detection indicator, and detects the detection parameter and the corresponding detection indicator,
  • the detection result includes: obtaining a time-period (PTP) time port configuration item of the network device.
  • PTP time-period
  • the specific judging process includes: determining whether a network device has a PTP time port configuration item, and if not, determining that the network device does not turn on time synchronization, and is an abnormal state; if yes, determining that the device is in a normal state.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • Each set of detected test results is read, generated and output as an evaluation report stored in a database.
  • the detection indicators include the following five groups: clock/time synchronization indicator, clock/time are not supported.
  • the number of synchronization hops exceeds the standard, the configuration indicator of the primary or backup clock source is missing, the clock synchronization is configured as a ring indicator, and the time synchronization indicator is not turned on; the detection parameters corresponding to each detection indicator are obtained, and the detection parameters and the corresponding detection indicators are detected, Generate test results; output test results.
  • the above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2.
  • the clock/time synchronization hop count exceeds the standard;
  • the main or standby clock source configuration is missing; 4.
  • the clock synchronization is configured into a ring; 5.
  • the time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the embodiment provides a network device clock/time detecting device, as shown in FIG.
  • the network device clock/time detecting device 20 can A processor is included, the processor being configured to execute a program stored in a memory, the program comprising the following modules:
  • the reading module 201 is configured to read at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator is not supported, the clock/time synchronization hop count exceeds the standard indicator, and the missing The primary or secondary clock source configuration indicator, the clock synchronization configuration is a ring indicator, and the time synchronization indicator is not enabled.
  • the processing module 202 is configured to acquire detection parameters corresponding to the detection indexes, and detect the detection parameters and the corresponding detection indicators to generate a detection result.
  • the output module 203 is configured to output a detection result.
  • the setting module 204 is further configured to: before the reading module 201 reads at least one set of detection indicators for detecting the clock/time of the network device, setting the five sets of detection indicators.
  • the method of setting the detection indicator can be set as the default setting and/or according to the user operation. On the basis of the default setting, the user can also change the detection index according to actual needs, and the user can input the clock/time synchronization indicator and the clock. The time/synchronous hop count is exceeded, the primary or backup clock source configuration indicator is omitted, the clock synchronization is configured as a ring indicator, and the time synchronization indicator is not enabled.
  • the clock/time detection indicators of the network devices of the entire network are pre-configured to ensure the detection index. The correctness.
  • Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices.
  • the clock/time synchronization indicator is not supported to detect whether the network device does not support clock/time synchronization.
  • the clock/time synchronization hop count exceeds the standard indicator to detect the network device clock. Whether the time synchronization hop count is exceeded or not, the lack of the active or standby clock source configuration indicator corresponds to whether the network device is configured to detect whether the network device is missing the primary or backup clock source.
  • the clock synchronization is configured as a ring indicator corresponding to detecting whether the network device clock synchronization is configured as a ring, not enabled.
  • the time synchronization indicator corresponds to detecting whether the network device does not turn on time synchronization.
  • Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices, and the detection of each group is independent and does not interfere with each other.
  • the processing module 202 obtains the detection parameters corresponding to the detection indexes, and detects the detection parameters and the corresponding detection indicators, and may include any one of the following two methods. :
  • Method 1 Obtain all the detection parameters, and test the detection parameters and the corresponding detection indicators by the group;
  • Manner 2 Obtain a set of detection parameters, and detect the detection parameters and the corresponding detection indicators; then acquire the next set of detection parameters, and detect the detection parameters and the corresponding detection indicators until all the detection indicators are detected and corresponding Detection parameters.
  • the detection indicator read by the reading module 201 includes not supporting the clock/time synchronization indicator, and does not support the clock/time synchronization indicator including not supporting the clock/ Time-synchronized network device version, board, and port.
  • the processing module 202 is configured to: obtain a version, a board, and a port of the network device to be detected. When the version of the network device does not support the clock/time synchronization indicator, or when the version of the network device does not meet the clock/time synchronization indicator, the network is not supported. If the board or port of the device does not support the clock/time synchronization indicator and the optical connection exists, it is determined that the network device does not support clock/time synchronization.
  • the processing module 202 is configured to: determine whether the version of the network device belongs to a network device version that does not support clock/time synchronization; if yes, directly determine that the network device does not support clock/time synchronization, which is an abnormal state; if not, further determine Whether the board or port of the network device belongs to a network device board or port that does not support clock/time synchronization. If the board or port of the network device does not belong to a network device board or port that does not support clock/time synchronization, it is determined as If the board or the port of the network device belongs to a network device or port that does not support clock/time synchronization, to determine whether the result is more accurate, further determine whether the corresponding port has an optical connection configuration. If it exists, determine that the network device does not. Supports clock/time synchronization, which is an abnormal state; if it does not exist, it is determined to be a normal state.
  • the detection indicator read by the reading module 201 includes not supporting the clock synchronization indicator, and the processing module 202 obtains the version, the board, and the port of the network device that does not support the clock synchronization, and determines the network device.
  • the version belongs to the network device version that does not support clock synchronization; if yes, it directly determines that the network device does not support clock synchronization, which is an abnormal state; If not, it is further determined whether the board or port of the network device belongs to a network device board or port that does not support clock synchronization; if the board or port of the network device does not belong to a network device board or port that does not support clock/time synchronization If the board or the port of the network device belongs to a network device board or port that does not support clock synchronization, in order to judge the result more accurately, it is further determined whether the corresponding port has an optical connection configuration, and if so, the network is determined. The device does not support clock synchronization and is in an abnormal state. If it does not exist, it is determined to be in a normal state.
  • the detection indicator read by the reading module 201 includes not supporting the time synchronization indicator, and the processing module 202 obtains the version, the board, and the port of the network device that does not support the time synchronization, and determines the network device. Whether the version belongs to the network device version that does not support time synchronization. If yes, it directly determines whether the network device does not support time synchronization and is abnormal. If not, it further determines whether the board or port of the network device belongs to a network device that does not support time synchronization. If the board or port of the network device does not belong to a network device or port that does not support time synchronization, the board is determined to be in a normal state.
  • the board or port of the network device belongs to a network device that does not support time synchronization.
  • the board or port in order to judge the result more accurately, further determines whether the corresponding port has an optical connection configuration. If it exists, it determines that the network device does not support time synchronization, which is an abnormal state; if not, it determines that it is a normal state.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the network device does not support the clock/time synchronization function. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicators read by the reading module 201 include: a clock/time synchronization hop count exceeding the standard indicator; and the clock/time synchronization hop count exceeding the standard indicator Can be set to the clock/time sync hop count threshold.
  • the processing module 202 acquires the detection parameters corresponding to the detection indicators, and detects the detection parameters and the corresponding detection indicators, and the detection result includes at least one of the following manners:
  • the processing module 202 obtains the hop count of the local clock of the network device from the grandfather clock, and determines that the time synchronization hop count of the network device exceeds the standard when the hop count is greater than the clock/time synchronization hop count exceeding the standard.
  • the processing module 202 obtains the hop count of the distance between the network device and the current synchronization timing source of the network device, and the current synchronization of the other network device.
  • the time source is an external clock, an internal clock, a GPS clock, or a 1588 clock, or the current synchronous timing source of another network device is an extracted Ethernet clock, and the network device is farthest from another network device; the hop count is greater than the clock/time synchronization When the hop count exceeds the standard, it is determined that the number of clock synchronization hops of the network device exceeds the standard.
  • the method 1 is: the processing module 202 determines whether the hop count of the local clock of the network device is greater than the time synchronization hop threshold, and if yes, determines that the time synchronization hop count of the network device exceeds the standard, and is abnormal; if not, Then it is determined to be in a normal state. The distance from the local clock to the grandfather clock can be queried through the 1588 state.
  • the second mode is: the processing module 202 determines whether the current synchronization timing source of the network device is an extracted Ethernet clock, and if not, does not participate in the evaluation; if yes, determines whether the network device can find the root node, and the root node includes the current synchronization timing source.
  • a network device that is an external clock, an internal clock, a GPS clock, or a 1588 clock;
  • the root node If the root node is found, it is determined whether the hop count of the network device from the root node is greater than the threshold of the clock synchronization hop count. If yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state. ;
  • the root node it is determined whether the hop count of the network device from the other network device is greater than the clock synchronization hop threshold, and the current synchronization timing source of the other network device is also the extracted Ethernet clock, and the network device is the most distant from the other network device. Far; if yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state.
  • the first method is to determine whether the time synchronization hop count of the network device exceeds the standard
  • the second method is to determine whether the clock synchronization hop count of the network device exceeds the standard, in order to implement a comprehensive check of the network device clock/time configuration to ensure the network service. Stability, in actual operation, it is necessary and indispensable to check whether the number of clock synchronization hops of the network device exceeds the standard and whether the time synchronization hop count exceeds the standard.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the clock/time synchronization hop count exceeds the standard. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicator read by the reading module 201 when checking whether the network device lacks an active or standby clock source configuration, includes a lack of an active or standby clock source configuration indicator, and is missing.
  • the primary or secondary clock source configuration indicator may include: the number of optical connections of the network device and the threshold number of clock sources configured by the corresponding optical connection port.
  • the threshold of the number of optical connections of the network device and the number of clock sources configured by the corresponding optical port includes the following two situations:
  • the threshold of the number of clock sources configured for the corresponding optical port is 1.
  • the clock source here includes the Ethernet clock, the line pumping clock, or the branch clock. If the number of clock sources configured on the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks an active or standby clock source configuration;
  • the threshold of the number of clock sources configured for the corresponding optical port is 2
  • the clock source here includes the extracted Ethernet clock, the line pumping clock, the branch clock, the external clock, and the GPS clock. Or 1588 clock, excluding the internal clock; in addition, if the number of clock sources configured by the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks the active or standby clock source configuration.
  • the extracted Ethernet clock means that the clock signal is extracted from the Ethernet line as the clock synchronization from the Ethernet line.
  • the Sync From E1 Line Clock refers to: extracting a clock signal from the E1 line as the system clock of the entire device (clock synchronization from E1 line).
  • the Sync From E1 branch clock means that the clock signal is extracted from the E1 signal input from the E1 port as the clock synchronization from the E1 branch.
  • the processing module 202 is configured to: obtain the number of optical connections of the network device and the number of clock sources configured by the optical connection port of the network device; when the number of optical connections is less than or equal to 1, the number of clock sources is less than 1, and the clock source includes an extracted Ethernet clock, When the line draws a clock or a branch to draw a clock, or when the number of optical connections is greater than 1, the number of clock sources is less than 2, and the clock source does not include an internal clock, then it is determined that the network device lacks an active or standby clock source configuration.
  • the processing module 202 is configured to: determine whether the number of optical connections of the network device is greater than 1. If the number of optical connections of the network device is less than or equal to 1, determine whether the number of clock sources configured by the optical connection port of the network device is less than 1, and the clock source. Including pumping Ethernet clock, line pumping clock or branch pumping If the network device lacks the primary or backup clock source configuration, it is abnormal; if not, it is determined to be in a normal state.
  • the normal state is as follows: It is determined whether the number of clock sources configured by the optical connection port of the network device is 1, and the clock source includes an extracted Ethernet clock, a line pumping clock, or a tributary clock; if yes, it is determined to be a normal state.
  • the processing module 202 is configured to: if the number of optical connections of the network device is greater than 1, determine whether the number of clock sources configured by the optical connection port of the network device is less than 2.
  • the clock source includes the extracted Ethernet clock, the line drawn clock, and the branch.
  • the path clock, external clock, GPS clock or 1588 clock does not include the internal clock; if yes, it determines that the network device lacks the active or standby clock source configuration, which is an abnormal state; if not, it is determined to be a normal state.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the primary or backup clock source configuration is missing. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicator read by the reading module 201 includes clock synchronization configured as a ring indicator.
  • the processing module 202 is configured to: obtain a version, a board, and a port of the network device. When the number of optical connections between the network device and another network device is greater than 1, the network device and the other network device are configured to extract an Ethernet clock. When it is determined that the clock source along the optical connection link forms a closed loop in the direction according to the version, the board, and the port of the network device, it is determined that the network device clock is synchronously configured into a ring.
  • the processing module 202 is configured to: determine whether the configuration of the network device is an extracted Ethernet clock, and if not, do not participate in the evaluation, for example, if the network device is configured with a line pumping clock or a branch clock, it does not participate in the evaluation. If the network device is configured with an Ethernet clock, determine whether the number of optical connections between the two network devices is greater than 1. If yes, determine the clock source along the optical connection link according to the version, board, and port of the network device. Whether a closed loop is formed in the direction, and if so, it is determined that the network device clock is synchronously configured as a loop, which is an abnormal state; if not, it is determined to be a normal state.
  • the number of optical connections between the two network devices is not greater than 1, it is determined whether the number of optical connections between the two network devices is 1. If the number of optical connections between the two network devices is 1, according to the network device The version, the board, and the port determine whether the clock source along the optical link link forms a closed loop in the direction. If yes, it determines that it is in a normal state.
  • the network device When the network device is in the optical connection state, it can determine which direction the clock source is drawn according to the version, board, and port of the network device. It should be noted that if there is only one optical connection between two network devices, if the clock source is configured to be mutually pumped, this case does not determine that the clock synchronization is configured as a ring, which is a normal state.
  • the mutual extraction refers to: the two devices are each other's system clock.
  • a directional tree is formed, and the corresponding clock configuration along the current tree structure is extracted back to the source network device, and then the clock of the corresponding network device is determined to be configured as a ring.
  • the number of optical connections between the network device A and the network device B is greater than 1, the number of optical connections between the network device A and the network device B is greater than one; if the network device A and the network After the above rules check is applied between the devices B to configure clock synchronization for the ring, it is determined that the clock synchronization is configured as a ring. If the optical connection between the network device A and the network device B is directly performed, and the network device A and the network device B are also optically connected through the network device C, this situation also belongs to between the network device A and the network device B. The number of optical connections is greater than one.
  • the number of optical connections between the network device A and the network device B is greater than one, and is not limited to the above two types. For example, the following is one of the modes: the network device A and the network device B pass through the network device. C is optically connected to form an optical connection link 1. The network device A and the network device B are also optically connected through the network device D to form an optical connection link 2.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the detection indicator read by the reading module 201 includes an un-on time synchronization indicator
  • the processing module 202 is configured to: acquire a PTP time port configuration of the network device. If the network device does not have a PTP time port configuration item, it is determined that the network device does not enable time synchronization.
  • the processing module 202 is configured to: determine whether the network device has a PTP time port configuration item, and if not, determine that the network device does not turn on time synchronization, and is an abnormal state; if yes, Then it is determined to be in a normal state.
  • the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • the output module 203 is configured to read each set of detected detection results, generate and output an evaluation report to be stored in a database.
  • the reading module 201 reads at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator is not supported. The clock/time synchronization hop count exceeds the standard indicator, the active or standby clock source configuration indicator is missing, the clock synchronization is configured into a ring indicator, and the time synchronization indicator is not turned on; the processing module 202 obtains the detection parameter corresponding to each detection indicator, and the detection parameter and the detection parameter The corresponding detection index is detected to generate a detection result; the output module 203 outputs the detection result.
  • the above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2. The clock/time synchronization hop count exceeds the standard; The main or standby clock source configuration is missing; 4. The clock synchronization is configured into a ring; 5. The time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
  • modules or steps of the above embodiments of the present invention can be implemented by a general computing device, which can be concentrated on a single computing device or distributed among multiple computing devices.
  • they may be implemented by program code executable by the computing device so that they can be stored in a computer storage medium (ROM/RAM, diskette, optical disk, ready-to-read storage medium) by the computing device
  • ROM/RAM read-only memory
  • the steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of A single integrated circuit module is implemented. Therefore, the invention is not limited to any particular combination of hardware and software.
  • an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and when executed, causes at least one processor to execute the foregoing network device clock/time detection method.
  • the solution provided by the embodiment of the present invention reads at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator, the clock/time synchronization hop count exceeding the standard, The primary or backup clock source configuration indicator, the clock synchronization configuration loop indicator, and the time synchronization index are not enabled; the detection parameters corresponding to each detection index are obtained, and the detection parameters and the corresponding detection indicators are detected to generate detection results; result.
  • the above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2. The clock/time synchronization hop count exceeds the standard; The main or standby clock source configuration is lacking; 4. The clock synchronization is configured into a ring; 5. The time synchronization is not enabled, thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of the detection result and the network service. stability.

Landscapes

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

Abstract

Provided are a method and apparatus for detecting the clock/time of a network device, and a computer storage medium. The method comprises: reading at least one group of detection indexes for detecting the clock/time of a network device, the detection indexes comprising the following five groups: an index wherein clock/time synchronisation is not supported, an index wherein the number of clock/time synchronisation hops exceeds a limit, an index for the lack of configuration of a primary or standby clock source, an index wherein a clock synchronisation configuration forms a ring, and an index wherein time synchronisation is not started; acquiring a detection parameter corresponding to each of the detection indexes, and detecting the detection parameter and the corresponding detection index so as to generate a detection result; and outputting the detection result.

Description

一种网络设备时钟/时间检测方法、装置和计算机存储介质Network device clock/time detecting method, device and computer storage medium
相关申请的交叉引用Cross-reference to related applications
本申请基于申请号为201610395533.3、申请日为2016年06月06日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。The present application is filed on the basis of the Chinese Patent Application No. PCT Application No.
技术领域Technical field
本发明涉及通信领域,尤其涉及一种网络设备时钟/时间检测方法、装置和计算机存储介质。The present invention relates to the field of communications, and in particular, to a network device clock/time detecting method, apparatus, and computer storage medium.
背景技术Background technique
在现代通信网络中,运营商大多数业务的正常运行都对全网网络设备的时钟/时间有严格要求,否则会严重影响到网络业务的稳定性。但是目前,运营商的网络设备的时间/时钟配置得比较复杂,使得在现网运行的网络设备中,时钟/时间配置存在极大隐患,主要有以下5大隐患:1、不支持时钟/时间同步;2、时钟/时间同步跳数超标;3、缺少主用或备用时钟源配置;4、时钟同步配置成环;5、未开启时间同步。这些隐患若不及时排查,会对网络业务的稳定性产生很大的影响,现网之前都是采用人工手段来排查这些隐患,效率低,耗费人力并且无法保证准确性。In modern communication networks, the normal operation of most services of operators has strict requirements on the clock/time of network devices of the entire network. Otherwise, the stability of network services will be seriously affected. However, at present, the time/clock configuration of the network device of the carrier is complicated, so that the clock/time configuration in the network device running on the live network has great hidden dangers, and the following five major hidden dangers are: 1. The clock/time is not supported. Synchronization; 2. The clock/time synchronization hop count exceeds the standard; 3. The primary or backup clock source configuration is missing; 4. The clock synchronization is configured into a ring; 5. The time synchronization is not enabled. If these hidden dangers are not checked in time, it will have a great impact on the stability of the network business. Before the current network, manual methods are used to check these hidden dangers, which is inefficient, labor-intensive and cannot guarantee accuracy.
针对上述问题,提出一种高效、准确的网络设备时钟/时间检测方法,是本领域技术人员亟待解决的技术问题。Aiming at the above problems, an efficient and accurate network device clock/time detection method is proposed, which is a technical problem to be solved by those skilled in the art.
发明内容Summary of the invention
为解决现有存在的技术问题,本发明实施例提供一种网络设备时钟/时间检测方法、装置和计算机存储介质。In order to solve the existing technical problems, embodiments of the present invention provide a network device clock/time detecting method, apparatus, and computer storage medium.
本发明实施例提供一种网络设备时钟/时间检测方法,包括: The embodiment of the invention provides a network device clock/time detecting method, including:
读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;Read at least one set of detection indicators for detecting the clock/time of the network device. The detection indicators include the following five groups: no clock/time synchronization indicator, clock/time synchronization hop count exceeding indicator, lack of active or standby clock source configuration The indicator, clock synchronization is configured as a ring indicator, and the time synchronization indicator is not turned on.
获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果;Obtaining detection parameters corresponding to each detection index, and detecting the detection parameter and the corresponding detection index to generate a detection result;
输出检测结果。Output test results.
本发明实施例还提供一种网络设备时钟/时间检测装置,包括:The embodiment of the invention further provides a network device clock/time detecting device, comprising:
读取模块,配置为读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;The reading module is configured to read at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator is not supported, the clock/time synchronization hop count exceeds the standard indicator, and the main indicator is missing. Use the or backup clock source to configure indicators, clock synchronization to be configured as a ring indicator, and not open time synchronization indicators.
处理模块,配置为获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果;The processing module is configured to acquire detection parameters corresponding to each detection indicator, and detect the detection parameter and the corresponding detection indicator to generate a detection result;
输出模块,配置为输出检测结果。An output module configured to output a test result.
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,当执行所述指令时,引起至少一个处理器执行前述的网络设备时钟/时间检测方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and when executed, causes at least one processor to execute the foregoing network device clock/time detection method.
本发明实施例的有益效果是:The beneficial effects of the embodiments of the present invention are:
根据本发明实施例提供的网络设备时钟/时间检测方法、装置和计算机存储介质,通过读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果;输出检测结果。采用上述方案,可以自动、高效、准确地检测出以下五种网络设备的时钟/时间配置隐患中的至少一种:1、不支持时钟/时间同步;2、时钟/时间同步跳数超标;3、缺少主用或备用时钟源配置;4、时钟同步配置成环;5、未开启时间同步。 能够解决现有技术中,采用人工手段来排查网络设备时钟/时间配置的隐患所造成的效率低、耗费人力并且无法保证准确性的问题,从而节省人力,提升网络设备时钟/时间检测的效率,确保了检测结果的准确性以及网络业务的稳定性。The network device clock/time detecting method, apparatus, and computer storage medium according to the embodiment of the present invention, by reading at least one set of detection indicators for detecting the clock/time of the network device, the detection indicators include the following five groups: the clock is not supported. /Time synchronization indicator, clock/time synchronization hop count exceeding indicator, lack of active or standby clock source configuration indicator, clock synchronization configuration into ring indicator, and non-on time synchronization indicator; obtaining detection parameters corresponding to each detection index, and detecting parameters The detection is performed with the corresponding detection index to generate a detection result; the detection result is output. The above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2. The clock/time synchronization hop count exceeds the standard; The main or standby clock source configuration is missing; 4. The clock synchronization is configured into a ring; 5. The time synchronization is not enabled. The utility model can solve the problems of low efficiency, labor-intensive and incapable of ensuring accuracy caused by the hidden trouble of the clock/time configuration of the network device in the prior art, thereby saving manpower and improving the efficiency of clock/time detection of the network device. It ensures the accuracy of the test results and the stability of the network business.
附图说明DRAWINGS
图1为本发明实施例一提供的一种网络设备时钟/时间检测方法的流程图;1 is a flowchart of a network device clock/time detecting method according to Embodiment 1 of the present invention;
图2为本发明实施例一提供的一种检测网络设备是否不支持时钟/时间同步的流程图;2 is a flowchart of detecting whether a network device does not support clock/time synchronization according to Embodiment 1 of the present invention;
图3为本发明实施例一提供的一种检测网络设备的时钟同步跳数是否超标的流程图;FIG. 3 is a flowchart of detecting whether a clock synchronization hop count of a network device exceeds a standard according to Embodiment 1 of the present invention;
图4为本发明实施例一提供的一种检测网络设备的时间同步跳数是否超标的流程图;4 is a flowchart of detecting whether a time synchronization hop count of a network device exceeds a standard according to Embodiment 1 of the present invention;
图5为本发明实施例一提供的一种检测网络设备是否缺少主用或备用时钟源配置的流程图;FIG. 5 is a flowchart of detecting whether a network device lacks an active or standby clock source configuration according to Embodiment 1 of the present invention;
图6为本发明实施例一提供的一种检测网络设备时钟同步配置是否成环的流程图;FIG. 6 is a flowchart of detecting whether a clock synchronization configuration of a network device is looped according to Embodiment 1 of the present invention;
图7为本发明实施例一提供的一种检测网络设备是否未开启时间同步的流程图;FIG. 7 is a flowchart of detecting time synchronization of a network device not being turned on according to Embodiment 1 of the present invention;
图8为本发明实施例二提供的一种网络设备时钟/时间检测装置的结构示意图。FIG. 8 is a schematic structural diagram of a network device clock/time detecting apparatus according to Embodiment 2 of the present invention.
具体实施方式detailed description
下面通过具体实施方式结合附图对本发明实施例作进一步详细说明。The embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
实施例一Embodiment 1
为了解决采用人工手段来排查网络设备时钟/时间配置的隐患所造成的效率低、耗费人力并且无法保证准确性的问题,本实施例提供一种网络设 备时钟/时间检测方法,请参见图1,包括以下步骤:In order to solve the problem that the manual method is used to check the hidden troubles of the clock/time configuration of the network device, the problem is low, labor-intensive, and the accuracy cannot be ensured. The embodiment provides a network design. For the backup clock/time detection method, see Figure 1, including the following steps:
S101:读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标。S101: Read at least one set of detection indicators for detecting clock/time of the network device, and the detection indicators include the following five groups: no clock/time synchronization indicator, no clock/time synchronization hop exceeding indicator, lack of active or standby clock Source configuration indicators, clock synchronization configured as ring indicators, and time synchronization indicators not enabled.
也就是说,读取以下至少一组对网络设备的时钟/时间进行检测的检测指标:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标。That is, the following at least one set of detection indicators for detecting the clock/time of the network device is read: the clock/time synchronization indicator, the clock/time synchronization hop count exceeding indicator, the lack of the active or standby clock source configuration indicator, The clock synchronization is configured as a ring indicator and the time synchronization indicator is not turned on.
其中,在该S101之前,还可以包括:设置上述的五组检测指标。设置检测指标的方式可以为默认设置和/或根据用户操作进行设置,在默认设置的基础上,用户还可根据实际需求对检测指标进行更改,可以由用户输入不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标,完成对全网网络设备的时钟/时间检测指标的预配置,保证检测指标的正确性。Before the S101, the method further includes: setting the five sets of detection indicators mentioned above. The method of setting the detection indicator can be set as the default setting and/or according to the user operation. On the basis of the default setting, the user can also change the detection index according to actual needs, and the user can input the clock/time synchronization indicator and the clock. The time/synchronous hop count is exceeded, the primary or backup clock source configuration indicator is omitted, the clock synchronization is configured as a ring indicator, and the time synchronization indicator is not enabled. The clock/time detection indicators of the network devices of the entire network are pre-configured to ensure the detection index. The correctness.
其中,每组检测指标对应检测不同类别的网络设备时钟/时间配置,不支持时钟/时间同步指标对应检测网络设备是否不支持时钟/时间同步,时钟/时间同步跳数超标指标对应检测网络设备时钟/时间同步跳数是否超标,缺少主用或备用时钟源配置指标对应检测网络设备是否缺少主用或备用时钟源配置,时钟同步配置成环指标对应检测网络设备时钟同步是否配置成环,未开启时间同步指标对应检测网络设备是否未开启时间同步。Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices. The clock/time synchronization indicator is not supported to detect whether the network device does not support clock/time synchronization. The clock/time synchronization hop count exceeds the standard indicator to detect the network device clock. Whether the time synchronization hop count is exceeded or not, the lack of the active or standby clock source configuration indicator corresponds to whether the network device is configured to detect whether the network device is missing the primary or backup clock source. The clock synchronization is configured as a ring indicator corresponding to detecting whether the network device clock synchronization is configured as a ring, not enabled. The time synchronization indicator corresponds to detecting whether the network device does not turn on time synchronization.
S102:获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果。S102: Acquire detection parameters corresponding to each detection index, and detect detection parameters and corresponding detection indicators to generate detection results.
每组检测指标对应检测不同类别的网络设备时钟/时间配置,且每组的检测都是各自独立进行、互不干扰的。当读取至少两组检测指标时,获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测的方式可以包括以下两种方式中的任意一种:Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices, and the detection of each group is independent and does not interfere with each other. When at least two sets of detection indicators are read, the detection parameters corresponding to the detection indexes are obtained, and the detection parameters and the corresponding detection indicators may be detected by any one of the following two methods:
方式一、获取所有的检测参数,分组对检测参数与对应的检测指标进行检测; Method 1: Obtain all the detection parameters, and test the detection parameters and the corresponding detection indicators by the group;
方式二、获取一组检测参数,并对检测参数与对应的检测指标进行检测;然后获取下一组检测参数,并对检测参数与对应的检测指标进行检测,直至检测完所有的检测指标与对应的检测参数。Manner 2: Obtain a set of detection parameters, and detect the detection parameters and the corresponding detection indicators; then acquire the next set of detection parameters, and detect the detection parameters and the corresponding detection indicators until all the detection indicators are detected and corresponding Detection parameters.
在一种实施例中,当检查网络设备是否不支持时钟/时间同步时,检测指标包括不支持时钟/时间同步指标,不支持时钟/时间同步指标包括不支持时钟/时间同步的网络设备的版本、单板、端口。获取待检测网络设备的版本、单板、端口,当网络设备的版本满足不支持时钟/时间同步指标,或当网络设备的版本不满足不支持时钟/时间同步指标、网络设备的单板或端口满足不支持时钟/时间同步指标、且存在光连接时,则判断为网络设备不支持时钟/时间同步。In an embodiment, when checking whether the network device does not support clock/time synchronization, the detection indicator includes not supporting the clock/time synchronization indicator, and the clock/time synchronization indicator is not supported, including the version of the network device that does not support clock/time synchronization. , board, port. Obtain the version, board, and port of the network device to be detected. If the version of the network device does not support the clock/time synchronization indicator, or if the version of the network device does not meet the clock/time synchronization indicator, the board or port of the network device is not supported. If the clock/time synchronization indicator is not supported and there is an optical connection, it is determined that the network device does not support clock/time synchronization.
参见图2,具体的判断过程包括:判断网络设备的版本是否属于不支持时钟/时间同步的网络设备版本;若是,则直接判定网络设备不支持时钟/时间同步,为异常状态;若否,则进一步判断网络设备的单板或端口是否属于不支持时钟/时间同步的网络设备单板或端口;若网络设备的单板或端口不属于不支持时钟/时间同步的网络设备单板或端口,则判定为正常状态;若网络设备的单板或端口属于不支持时钟/时间同步的网络设备单板或端口,为了判断结果更加准确,进一步判断对应端口是否存在光连接配置,若存在,才判定网络设备不支持时钟/时间同步,为异常状态;若不存在,则判定为正常状态。Referring to FIG. 2, the specific judging process includes: determining whether the version of the network device belongs to a network device version that does not support clock/time synchronization; if yes, directly determining that the network device does not support clock/time synchronization, and is an abnormal state; if not, then If the board or port of the network device is not a board or port that does not support clock/time synchronization, the board or port of the network device is a board or port that does not support clock/time synchronization. If the board or port of the network device belongs to a network device or port that does not support clock/time synchronization, in order to judge the result more accurately, further determine whether the corresponding port has an optical connection configuration. If yes, determine the network. The device does not support clock/time synchronization and is in an abnormal state. If it does not exist, it is determined to be in a normal state.
应当理解的是,在检查网络设备是否不支持时钟/时间同步时,检查网络设备不支持时钟同步和时间同步的检测指标、判断机制都是一样的,且为了实现对网络设备时钟/时间配置的全面检查,以保证网络业务的稳定性,在实际操作中,检查网络设备不支持时钟同步和时间同步都是非常必要、缺一不可的,时钟同步是频率保持一致,时间同步是频率、相位保持一致,具体的判断过程参见以下内容:It should be understood that when checking whether the network device does not support clock/time synchronization, it is checked that the network device does not support the detection indicators of the clock synchronization and the time synchronization, and the determination mechanism is the same, and in order to implement the clock/time configuration of the network device. Comprehensive inspection to ensure the stability of network services. In actual operation, it is necessary and necessary to check that network devices do not support clock synchronization and time synchronization. Clock synchronization is consistent in frequency, and time synchronization is frequency and phase preservation. Consistent, the specific judgment process is as follows:
当检查网络设备是否不支持时钟同步时,检测指标包括不支持时钟同步指标,获取不支持时钟同步的网络设备的版本、单板、端口,判断网络设备的版本是否属于不支持时钟同步的网络设备版本;若是,则直接判定网络设备不支持时钟同步,为异常状态;若否,则进一步判断网络设备的 单板或端口是否属于不支持时钟同步的网络设备单板或端口;若网络设备的单板或端口不属于不支持时钟/时间同步的网络设备单板或端口,则判定为正常状态;若网络设备的单板或端口属于不支持时钟同步的网络设备单板或端口,为了判断结果更加准确,进一步判断对应端口是否存在光连接配置,若存在,才判定网络设备不支持时钟同步,为异常状态;若不存在,则判定为正常状态。When checking whether the network device does not support clock synchronization, the detection indicators include that the clock synchronization indicator is not supported, and the version, board, and port of the network device that does not support clock synchronization are obtained, and whether the version of the network device belongs to a network device that does not support clock synchronization is determined. Version; if yes, directly determine that the network device does not support clock synchronization, which is an abnormal state; if not, further determine the network device Whether the board or the port is a network device board or port that does not support clock synchronization; if the board or port of the network device does not belong to a network device board or port that does not support clock/time synchronization, it is determined to be in a normal state; The board or port of the device belongs to the network device board or port that does not support clock synchronization. To determine the result is more accurate, further determine whether the corresponding port has an optical connection configuration. If it exists, determine that the network device does not support clock synchronization. If it does not exist, it is judged to be in a normal state.
当检查网络设备是否不支持时间同步时,检测指标包括不支持时间同步指标,获取不支持时间同步的网络设备的版本、单板、端口,判断网络设备的版本是否属于不支持时间同步的网络设备版本;若是,则直接判定网络设备不支持时间同步,为异常状态;若否,则进一步判断网络设备的单板或端口是否属于不支持时间同步的网络设备单板或端口;若网络设备的单板或端口不属于不支持时间同步的网络设备单板或端口,则判定为正常状态;若网络设备的单板或端口属于不支持时间同步的网络设备单板或端口,为了判断结果更加准确,进一步判断对应端口是否存在光连接配置,若存在,才判定网络设备不支持时间同步,为异常状态;若不存在,则判定为正常状态。When checking whether the network device does not support time synchronization, the detection indicator includes not supporting the time synchronization indicator, obtaining the version, board, and port of the network device that does not support time synchronization, and determining whether the version of the network device belongs to a network device that does not support time synchronization. If yes, it is determined that the network device does not support time synchronization and is in an abnormal state; if not, it is further determined whether the board or port of the network device belongs to a network device board or port that does not support time synchronization; If the board or port is not a network device or a port that does not support time synchronization, it is determined to be in a normal state. If the board or port of the network device belongs to a network device board or port that does not support time synchronization, the result is more accurate. Further, it is determined whether the optical port has an optical connection configuration. If yes, it is determined that the network device does not support time synchronization, and is an abnormal state; if not, it is determined to be a normal state.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:网络设备不支持时钟/时间同步功能。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the network device does not support the clock/time synchronization function. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备的时钟/时间同步跳数是否超标时,检测指标包括:时钟/时间同步跳数超标指标;时钟/时间同步跳数超标指标可以设置为时钟/时间同步跳数阈值。获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果包括以下方式中的至少一种:In an embodiment, when checking whether the clock/time synchronization hop count of the network device exceeds the standard, the detection indicator includes: a clock/time synchronization hop count exceeding the standard indicator; and the clock/time synchronization hop count exceeding the indicator may be set to clock/time synchronization. Hop count threshold. Obtaining detection parameters corresponding to each detection index, and detecting the detection parameter and the corresponding detection index, and generating the detection result includes at least one of the following methods:
方式一:获取网络设备的本地时钟距离祖父时钟的跳数,当跳数大于时钟/时间同步跳数超标指标时,则判定网络设备的时间同步跳数超标;Manner 1: Obtain the hop count of the local clock of the network device from the grandfather clock. When the hop count is greater than the clock/time synchronization hop exceeds the standard, determine that the time synchronization hop count of the network device exceeds the standard;
方式二:当网络设备的当前同步定时源为抽以太网时钟时,获取其与另一网络设备之间距离的跳数;另一网络设备的当前同步定时源为外时钟、内时钟、全球定位系统(GPS,Global Positioning System)时钟或1588时 钟,或另一网络设备的当前同步定时源为抽以太网时钟、且网络设备与另一网络设备距离最远;跳数大于时钟/时间同步跳数超标指标时,则判定网络设备的时钟同步跳数超标。Manner 2: When the current synchronization timing source of the network device is the extracted Ethernet clock, obtain the hop count of the distance between the network device and the other network device; the current synchronization timing source of the other network device is the external clock, the internal clock, and the global positioning. System (GPS, Global Positioning System) clock or 1588 hours The current synchronous timing source of the clock or another network device is the extracted Ethernet clock, and the network device is farthest from the other network device; when the hop count is greater than the clock/time synchronization hop count exceeding the standard, the clock synchronization of the network device is determined. The number of hops exceeded the standard.
上述两种方式具体的判断过程包括:The specific judgment process of the above two methods includes:
方式一:参见图3,判断网络设备的本地时钟距离祖父时钟的跳数是否大于时间同步跳数阈值,若是,则判定网络设备的时间同步跳数超标,为异常状态;若否,则判定为正常状态。其中,可以通过1588状态查询本地时钟到祖父时钟的距离。Method 1: Refer to FIG. 3, determine whether the hop count of the local clock of the network device is greater than the time synchronization hop threshold, and if yes, determine that the time synchronization hop count of the network device exceeds the standard, and the abnormal state; if not, determine normal status. The distance from the local clock to the grandfather clock can be queried through the 1588 state.
方式二:参见图4,判断网络设备当前同步定时源是否是抽以太网时钟,若不是,则不参与评估;若是,则判断网络设备是否能找到根节点,根节点包括当前同步定时源为外时钟、内时钟、GPS时钟或1588时钟的网络设备;Manner 2: Refer to Figure 4 to determine whether the current synchronization timing source of the network device is the extracted Ethernet clock. If not, it does not participate in the evaluation; if yes, it determines whether the network device can find the root node, and the root node includes the current synchronization timing source. Network device with clock, internal clock, GPS clock or 1588 clock;
若能找到根节点,则判断网络设备距离其根节点的跳数是否大于时钟同步跳数阈值,若是,则判定网络设备的时钟同步跳数超标,为异常状态;若否,则判定为正常状态;If the root node is found, it is determined whether the hop count of the network device from the root node is greater than the threshold of the clock synchronization hop count. If yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state. ;
若不能找到根节点,则判断网络设备距离另一网络设备的跳数是否大于时钟同步跳数阈值,另一网络设备当前同步定时源也为抽以太网时钟,网络设备与另一网络设备距离最远;若是,则判定网络设备的时钟同步跳数超标,为异常状态;若否,则判定为正常状态。If the root node cannot be found, it is determined whether the hop count of the network device from the other network device is greater than the clock synchronization hop threshold, and the current synchronization timing source of the other network device is also the extracted Ethernet clock, and the network device is the most distant from the other network device. Far; if yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state.
应当理解的是,方式一为判断网络设备的时间同步跳数是否超标,方式二为判断网络设备的时钟同步跳数是否超标,为了实现对网络设备时钟/时间配置的全面检查,以保证网络业务的稳定性,在实际操作中,检查网络设备的时钟同步跳数是否超标和时间同步跳数是否超标都是非常必要、缺一不可的。It should be understood that the first method is to determine whether the time synchronization hop count of the network device exceeds the standard, and the second method is to determine whether the clock synchronization hop count of the network device exceeds the standard, in order to implement a comprehensive check of the network device clock/time configuration to ensure the network service. Stability, in actual operation, it is necessary and indispensable to check whether the number of clock synchronization hops of the network device exceeds the standard and whether the time synchronization hop count exceeds the standard.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:时钟/时间同步跳数超标。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the clock/time synchronization hop count exceeds the standard. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备是否缺少主用或备用时钟源配置时, 检测指标包括缺少主用或备用时钟源配置指标,缺少主用或备用时钟源配置指标可以包括:网络设备的光连接的数量以及对应的光连接端口配置的时钟源数量阈值。In one embodiment, when checking if the network device lacks an active or standby clock source configuration, The detection indicators include the lack of the active or standby clock source configuration indicators, and the lack of the active or standby clock source configuration indicators may include: the number of optical connections of the network device and the threshold number of clock sources configured for the corresponding optical connection port.
其中,网络设备的光连接的数量和对应的光连接端口配置的时钟源数量阈值包括以下两种情况:The threshold of the number of optical connections of the network device and the number of clock sources configured by the corresponding optical port includes the following two situations:
1、网络设备的光连接数量小于或等于1时,对应的光连接端口配置的时钟源数量阈值为1,这里的时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟;另外,若网络设备的光连接端口配置的时钟源数量小于该阈值,则可判定网络设备缺少主用或备用时钟源配置;1. When the number of optical connections of the network device is less than or equal to 1, the threshold of the number of clock sources configured for the corresponding optical port is 1. The clock source here includes the Ethernet clock, the line pumping clock, or the branch clock. If the number of clock sources configured on the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks an active or standby clock source configuration;
2、网络设备的光连接数量大于1时,对应的光连接端口配置的时钟源数量阈值为2,这里的时钟源包括抽以太网时钟、线路抽时钟、支路抽时钟、外时钟、GPS时钟或1588时钟,不包括内时钟;另外,若网络设备的光连接端口配置的时钟源数量小于该阈值,则可判定网络设备缺少主用或备用时钟源配置。2. When the number of optical connections of the network device is greater than 1, the threshold of the number of clock sources configured for the corresponding optical port is 2, and the clock source here includes the extracted Ethernet clock, the line pumping clock, the branch clock, the external clock, and the GPS clock. Or 1588 clock, excluding the internal clock; in addition, if the number of clock sources configured by the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks the active or standby clock source configuration.
这里,所述抽以太网时钟(SyncE),是指:从以太网线路抽取时钟信号作为整个设备的系统时钟(clock synchronization from Ethernet line)。Here, the extracted Ethernet clock (SyncE) means that the clock signal is extracted from the Ethernet line as the clock synchronization from the Ethernet line.
所述线路抽时钟(Sync From E1 Line Clock),是指:从E1线路中抽取时钟信号,作为整个设备的系统时钟(clock synchronization from E1 line)。The Sync From E1 Line Clock refers to: extracting a clock signal from the E1 line as the system clock of the entire device (clock synchronization from E1 line).
所述支路抽时钟(Sync From E1 branch Clock),是指:从E1端口输入的E1信号中抽取时钟信号,作为整个设备的系统时钟(clock synchronization from E1 branch)。The Sync From E1 branch clock means that the clock signal is extracted from the E1 signal input from the E1 port as the clock synchronization from the E1 branch.
获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果包括:Obtaining detection parameters corresponding to each detection index, and detecting the detection parameter and the corresponding detection index, and generating the detection result includes:
获取网络设备的光连接数量和网络设备的光连接端口配置的时钟源数量;Obtaining the number of optical connections of the network device and the number of clock sources configured for the optical connection port of the network device;
当光连接数量小于或等于1、时钟源数量小于1、且时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟时,或当光连接数量大于1、时钟源数量小于2、且时钟源不包括内时钟时,则判定网络设备缺少主用或备用时钟源 配置。When the number of optical connections is less than or equal to 1, the number of clock sources is less than 1, and the clock source includes the extracted Ethernet clock, the line pumping clock, or the tributary clock, or when the number of optical connections is greater than 1, the number of clock sources is less than 2, and the clock When the source does not include the internal clock, it is determined that the network device lacks the primary or backup clock source. Configuration.
参见图5,具体的判断过程包括:判断网络设备的光连接数量是否大于1,若网络设备的光连接数量小于或等于1,则判断网络设备的光连接端口配置的时钟源数量是否小于1,时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟;若是,则判定网络设备缺少主用或备用时钟源配置,为异常状态;若否,则判定为正常状态,此种正常状态的情况具体为:若网络设备的光连接数量等于1,则判断网络设备的光连接端口配置的时钟源数量是否为1,时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟;若是,则判定为正常状态。Referring to FIG. 5, the specific judging process includes: determining whether the number of optical connections of the network device is greater than 1. If the number of optical connections of the network device is less than or equal to 1, determining whether the number of clock sources configured by the optical connection port of the network device is less than 1, The clock source includes an extracted Ethernet clock, a line pumping clock, or a branching clock; if yes, it is determined that the network device lacks an active or standby clock source configuration, and is in an abnormal state; if not, it is determined to be a normal state, and the normal state is The specific situation is as follows: if the number of optical connections of the network device is equal to 1, it is determined whether the number of clock sources configured by the optical connection port of the network device is 1, and the clock source includes an extracted Ethernet clock, a line pumping clock, or a branching clock; if yes, Then it is determined to be in a normal state.
若网络设备的光连接数量大于1,则判断网络设备的光连接端口配置的时钟源数量是否小于2,这里的时钟源包括抽以太网时钟、线路抽时钟、支路抽时钟、外时钟、GPS时钟或1588时钟,不包括内时钟;若是,则判定网络设备缺少主用或备用时钟源配置,为异常状态;若否,则判定为正常状态。If the number of optical connections of the network device is greater than 1, it is determined whether the number of clock sources configured by the optical connection port of the network device is less than 2. The clock source here includes the extracted Ethernet clock, the line drawing clock, the branch pumping clock, the external clock, and the GPS. The clock or 1588 clock does not include the internal clock; if so, it determines that the network device lacks the active or standby clock source configuration and is in an abnormal state; if not, it is determined to be in a normal state.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:缺少主用或备用时钟源配置。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the primary or backup clock source configuration is missing. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备时钟同步配置是否成环时,检测指标包括时钟同步配置成环指标,获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果包括:获取网络设备的版本、单板、端口,当网络设备与另一网络设备之间的光连接数量大于1、网络设备与另一网络设备均配置的是抽以太网时钟、且根据网络设备的版本、单板、端口确定出沿光连接链路抽时钟源在方向上形成闭环时,则判定网络设备时钟同步配置成环。In an embodiment, when detecting whether the network device clock synchronization configuration is looped, the detection indicator includes clock synchronization configured as a ring indicator, acquiring detection parameters corresponding to each detection indicator, and detecting the detection parameter and the corresponding detection indicator, The detection result includes: acquiring the version of the network device, the board, and the port. When the number of optical connections between the network device and the other network device is greater than 1, the network device and the other network device are configured to extract an Ethernet clock, and When it is determined that the clock source along the optical connection link forms a closed loop in the direction according to the version, the board, and the port of the network device, it is determined that the network device clock is synchronously configured into a ring.
参见图6,具体的判断过程包括:判断网络设备配置的是否为抽以太网时钟,若否,则不参与评估,比如若网络设备配置的是线路抽时钟或支路抽时钟,则不参与评估。若网络设备配置的是抽以太网时钟,则判断两个网络设备之间的光连接数量是否大于1,若是,则根据网络设备的版本、单板、端口判断沿光连接链路抽时钟源在方向上是否形成闭环,若是,则判 定网络设备时钟同步配置成环,为异常状态;若否,则判定为正常状态。若两个网络设备之间的光连接数量不是大于1,则判断两个网络设备之间的光连接数量是否为1,若两个网络设备之间的光连接数量是1,则根据网络设备的版本、单板、端口判断沿光连接链路抽时钟源在方向上是否形成闭环,若是,则判定为正常状态。Referring to FIG. 6, the specific judging process includes: judging whether the configuration of the network device is an extracted Ethernet clock, and if not, not participating in the evaluation, for example, if the network device is configured with a line drawing clock or a branch clock, it does not participate in the evaluation. . If the network device is configured with an Ethernet clock, determine whether the number of optical connections between the two network devices is greater than 1. If yes, determine the clock source along the optical connection link according to the version, board, and port of the network device. Whether a closed loop is formed in the direction, and if so, The clock of the network device is synchronously configured as a ring, which is an abnormal state; if not, it is determined to be a normal state. If the number of optical connections between the two network devices is not greater than 1, it is determined whether the number of optical connections between the two network devices is 1. If the number of optical connections between the two network devices is 1, according to the network device The version, the board, and the port determine whether the clock source along the optical link link forms a closed loop in the direction. If yes, it determines that it is in a normal state.
网络设备在处于光连接状态时,可以根据网络设备自身的版本、单板、端口确定出往哪个方向抽时钟源。需要特别说明的是,如果两个网络设备之间仅存在1条光连接时,若时钟源配置为互抽,这种情况不判定时钟同步配置成环,为正常状态。When the network device is in the optical connection state, it can determine which direction the clock source is drawn according to the version, board, and port of the network device. It should be noted that if there is only one optical connection between two network devices, if the clock source is configured to be mutually pumped, this case does not determine that the clock synchronization is configured as a ring, which is a normal state.
其中,所述互抽是指:两个设备互为对方的系统时钟。The mutual extraction refers to: the two devices are each other's system clock.
应当理解的是,对配置了抽以太网时钟的网络设备,形成有方向树,沿着当前树结构的对应时钟配置又抽回到了源网络设备,则可判定对应网络设备时钟配置成环。It should be understood that, for a network device configured with an extracted Ethernet clock, a directional tree is formed, and the corresponding clock configuration along the current tree structure is extracted back to the source network device, and then the clock of the corresponding network device is determined to be configured as a ring.
若网络设备A与网络设备B之间直接进行光连接、且光连接的数量大于1,则这种情况属于网络设备A与网络设备B之间的光连接数量大于1;若网络设备A与网络设备B之间应用上述规则检查为时钟同步配置成环,则判定时钟同步配置成环。若网络设备A与网络设备B之间直接进行光连接、且网络设备A与网络设备B之间还通过网络设备C进行光连接,则这种情况也属于网络设备A与网络设备B之间的光连接数量大于1;若网络设备A与网络设备B之间应用上述规则检查为时钟同步配置成环,则判定时钟同步配置成环。应当理解的是,网络设备A与网络设备B之间的光连接数量大于1并不仅限于上述两种,比如下面例举的也是其中一种方式:网络设备A与网络设备B之间通过网络设备C进行光连接形成光连接链路1、网络设备A与网络设备B之间还通过网络设备D进行光连接形成光连接链路2。If the number of optical connections between the network device A and the network device B is greater than 1, the number of optical connections between the network device A and the network device B is greater than one; if the network device A and the network After the above rules check is applied between the devices B to configure clock synchronization for the ring, it is determined that the clock synchronization is configured as a ring. If the optical connection between the network device A and the network device B is directly performed, and the network device A and the network device B are also optically connected through the network device C, this situation also belongs to between the network device A and the network device B. The number of optical connections is greater than one. If the above rules are applied between the network device A and the network device B to check that the clock synchronization is configured as a ring, it is determined that the clock synchronization is configured as a ring. It should be understood that the number of optical connections between the network device A and the network device B is greater than one, and is not limited to the above two types. For example, the following is one of the modes: the network device A and the network device B pass through the network device. C is optically connected to form an optical connection link 1. The network device A and the network device B are also optically connected through the network device D to form an optical connection link 2.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:时钟同步配置成环。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。 With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备是否未开启时间同步的功能时,检测指标包括未开启时间同步指标,获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果包括:获取网络设备的精密时间协议(PTP,Precision Time Protocol)时间端口配置项,当网络设备不存在PTP时间端口配置项时,则判定网络设备未开启时间同步。In an embodiment, when checking whether the network device does not enable the time synchronization function, the detection indicator includes an un-on time synchronization indicator, acquires detection parameters corresponding to each detection indicator, and detects the detection parameter and the corresponding detection indicator, The detection result includes: obtaining a time-period (PTP) time port configuration item of the network device. When the network device does not have a PTP time port configuration item, determining that the network device is not enabled for time synchronization.
参见图7,具体的判断过程包括:判断网络设备是否存在PTP时间端口配置项,若不存在,则判定网络设备未开启时间同步,为异常状态;若存在,则判定为正常状态。Referring to FIG. 7 , the specific judging process includes: determining whether a network device has a PTP time port configuration item, and if not, determining that the network device does not turn on time synchronization, and is an abnormal state; if yes, determining that the device is in a normal state.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:未开启时间同步。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
S103:输出检测结果。S103: Output the detection result.
读取每一组检测出的检测结果,生成并输出成评估报告保存在数据库中。Each set of detected test results is read, generated and output as an evaluation report stored in a database.
根据实施例提供的网络设备时钟/时间检测方法,通过读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果;输出检测结果。采用上述方案,可以自动、高效、准确地检测出以下五种网络设备的时钟/时间配置隐患中的至少一种:1、不支持时钟/时间同步;2、时钟/时间同步跳数超标;3、缺少主用或备用时钟源配置;4、时钟同步配置成环;5、未开启时间同步。从而节省人力,提升网络设备时钟/时间检测的效率,确保了检测结果的准确性以及网络业务的稳定性。According to the network device clock/time detecting method provided by the embodiment, by detecting at least one set of detection indicators for detecting the clock/time of the network device, the detection indicators include the following five groups: clock/time synchronization indicator, clock/time are not supported. The number of synchronization hops exceeds the standard, the configuration indicator of the primary or backup clock source is missing, the clock synchronization is configured as a ring indicator, and the time synchronization indicator is not turned on; the detection parameters corresponding to each detection indicator are obtained, and the detection parameters and the corresponding detection indicators are detected, Generate test results; output test results. The above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2. The clock/time synchronization hop count exceeds the standard; The main or standby clock source configuration is missing; 4. The clock synchronization is configured into a ring; 5. The time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
实施例二Embodiment 2
为了解决采用人工手段来排查网络设备时钟/时间配置的隐患所造成的效率低、耗费人力并且无法保证准确性的问题,本实施例提供一种网络设备时钟/时间检测装置,请参见图8,该网络设备时钟/时间检测装置20可以 包括处理器,处理器配置为执行存储在存储器中的程序,所述程序包括以下模块:In order to solve the problem that the manual device is used to check the hidden troubles of the clock/time configuration of the network device, which is inefficient, labor-intensive, and cannot guarantee the accuracy, the embodiment provides a network device clock/time detecting device, as shown in FIG. The network device clock/time detecting device 20 can A processor is included, the processor being configured to execute a program stored in a memory, the program comprising the following modules:
读取模块201,配置为读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标。The reading module 201 is configured to read at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator is not supported, the clock/time synchronization hop count exceeds the standard indicator, and the missing The primary or secondary clock source configuration indicator, the clock synchronization configuration is a ring indicator, and the time synchronization indicator is not enabled.
处理模块202,配置为获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果。The processing module 202 is configured to acquire detection parameters corresponding to the detection indexes, and detect the detection parameters and the corresponding detection indicators to generate a detection result.
输出模块203,配置为输出检测结果。The output module 203 is configured to output a detection result.
其中,还可以包括:设置模块204,配置为在读取模块201读取至少一组对网络设备的时钟/时间进行检测的检测指标之前,设置上述的五组检测指标。设置检测指标的方式可以为默认设置和/或根据用户操作进行设置,在默认设置的基础上,用户还可根据实际需求对检测指标进行更改,可以由用户输入不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标,完成对全网网络设备的时钟/时间检测指标的预配置,保证检测指标的正确性。The setting module 204 is further configured to: before the reading module 201 reads at least one set of detection indicators for detecting the clock/time of the network device, setting the five sets of detection indicators. The method of setting the detection indicator can be set as the default setting and/or according to the user operation. On the basis of the default setting, the user can also change the detection index according to actual needs, and the user can input the clock/time synchronization indicator and the clock. The time/synchronous hop count is exceeded, the primary or backup clock source configuration indicator is omitted, the clock synchronization is configured as a ring indicator, and the time synchronization indicator is not enabled. The clock/time detection indicators of the network devices of the entire network are pre-configured to ensure the detection index. The correctness.
其中,每组检测指标对应检测不同类别的网络设备时钟/时间配置,不支持时钟/时间同步指标对应检测网络设备是否不支持时钟/时间同步,时钟/时间同步跳数超标指标对应检测网络设备时钟/时间同步跳数是否超标,缺少主用或备用时钟源配置指标对应检测网络设备是否缺少主用或备用时钟源配置,时钟同步配置成环指标对应检测网络设备时钟同步是否配置成环,未开启时间同步指标对应检测网络设备是否未开启时间同步。Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices. The clock/time synchronization indicator is not supported to detect whether the network device does not support clock/time synchronization. The clock/time synchronization hop count exceeds the standard indicator to detect the network device clock. Whether the time synchronization hop count is exceeded or not, the lack of the active or standby clock source configuration indicator corresponds to whether the network device is configured to detect whether the network device is missing the primary or backup clock source. The clock synchronization is configured as a ring indicator corresponding to detecting whether the network device clock synchronization is configured as a ring, not enabled. The time synchronization indicator corresponds to detecting whether the network device does not turn on time synchronization.
每组检测指标对应检测不同类别的网络设备时钟/时间配置,且每组的检测都是各自独立进行、互不干扰的。当读取模块201读取至少两组检测指标时,处理模块202获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测的方式可以包括以下两种方式中的任意一种:Each group of detection indicators corresponds to detecting the clock/time configuration of different types of network devices, and the detection of each group is independent and does not interfere with each other. When the reading module 201 reads the at least two sets of detection indicators, the processing module 202 obtains the detection parameters corresponding to the detection indexes, and detects the detection parameters and the corresponding detection indicators, and may include any one of the following two methods. :
方式一、获取所有的检测参数,分组对检测参数与对应的检测指标进行检测; Method 1: Obtain all the detection parameters, and test the detection parameters and the corresponding detection indicators by the group;
方式二、获取一组检测参数,并对检测参数与对应的检测指标进行检测;然后获取下一组检测参数,并对检测参数与对应的检测指标进行检测,直至检测完所有的检测指标与对应的检测参数。Manner 2: Obtain a set of detection parameters, and detect the detection parameters and the corresponding detection indicators; then acquire the next set of detection parameters, and detect the detection parameters and the corresponding detection indicators until all the detection indicators are detected and corresponding Detection parameters.
在一种实施例中,当检查网络设备是否不支持时钟/时间同步时,读取模块201读取的检测指标包括不支持时钟/时间同步指标,不支持时钟/时间同步指标包括不支持时钟/时间同步的网络设备的版本、单板、端口。处理模块202配置为:获取待检测网络设备的版本、单板、端口,当网络设备的版本满足不支持时钟/时间同步指标,或当网络设备的版本不满足不支持时钟/时间同步指标、网络设备的单板或端口满足不支持时钟/时间同步指标、且存在光连接时,则判断为网络设备不支持时钟/时间同步。In an embodiment, when checking whether the network device does not support clock/time synchronization, the detection indicator read by the reading module 201 includes not supporting the clock/time synchronization indicator, and does not support the clock/time synchronization indicator including not supporting the clock/ Time-synchronized network device version, board, and port. The processing module 202 is configured to: obtain a version, a board, and a port of the network device to be detected. When the version of the network device does not support the clock/time synchronization indicator, or when the version of the network device does not meet the clock/time synchronization indicator, the network is not supported. If the board or port of the device does not support the clock/time synchronization indicator and the optical connection exists, it is determined that the network device does not support clock/time synchronization.
其中,处理模块202配置为:判断网络设备的版本是否属于不支持时钟/时间同步的网络设备版本;若是,则直接判定网络设备不支持时钟/时间同步,为异常状态;若否,则进一步判断网络设备的单板或端口是否属于不支持时钟/时间同步的网络设备单板或端口;若网络设备的单板或端口不属于不支持时钟/时间同步的网络设备单板或端口,则判定为正常状态;若网络设备的单板或端口属于不支持时钟/时间同步的网络设备单板或端口,为了判断结果更加准确,进一步判断对应端口是否存在光连接配置,若存在,才判定网络设备不支持时钟/时间同步,为异常状态;若不存在,则判定为正常状态。The processing module 202 is configured to: determine whether the version of the network device belongs to a network device version that does not support clock/time synchronization; if yes, directly determine that the network device does not support clock/time synchronization, which is an abnormal state; if not, further determine Whether the board or port of the network device belongs to a network device board or port that does not support clock/time synchronization. If the board or port of the network device does not belong to a network device board or port that does not support clock/time synchronization, it is determined as If the board or the port of the network device belongs to a network device or port that does not support clock/time synchronization, to determine whether the result is more accurate, further determine whether the corresponding port has an optical connection configuration. If it exists, determine that the network device does not. Supports clock/time synchronization, which is an abnormal state; if it does not exist, it is determined to be a normal state.
应当理解的是,在检查网络设备是否不支持时钟/时间同步时,检查网络设备不支持时钟同步和时间同步的检测指标、判断机制都是一样的,且为了实现对网络设备时钟/时间配置的全面检查,以保证网络业务的稳定性,在实际操作中,检查网络设备不支持时钟同步和时间同步都是非常必要、缺一不可的,时钟同步是频率保持一致,时间同步是频率、相位保持一致,处理模块202具体的判断过程参见以下内容:It should be understood that when checking whether the network device does not support clock/time synchronization, it is checked that the network device does not support the detection indicators of the clock synchronization and the time synchronization, and the determination mechanism is the same, and in order to implement the clock/time configuration of the network device. Comprehensive inspection to ensure the stability of network services. In actual operation, it is necessary and necessary to check that network devices do not support clock synchronization and time synchronization. Clock synchronization is consistent in frequency, and time synchronization is frequency and phase preservation. Consistently, the specific judgment process of the processing module 202 is as follows:
当检查网络设备是否不支持时钟同步时,读取模块201读取的检测指标包括不支持时钟同步指标,处理模块202获取不支持时钟同步的网络设备的版本、单板、端口,判断网络设备的版本是否属于不支持时钟同步的网络设备版本;若是,则直接判定网络设备不支持时钟同步,为异常状态; 若否,则进一步判断网络设备的单板或端口是否属于不支持时钟同步的网络设备单板或端口;若网络设备的单板或端口不属于不支持时钟/时间同步的网络设备单板或端口,则判定为正常状态;若网络设备的单板或端口属于不支持时钟同步的网络设备单板或端口,为了判断结果更加准确,进一步判断对应端口是否存在光连接配置,若存在,才判定网络设备不支持时钟同步,为异常状态;若不存在,则判定为正常状态。When checking whether the network device does not support the clock synchronization, the detection indicator read by the reading module 201 includes not supporting the clock synchronization indicator, and the processing module 202 obtains the version, the board, and the port of the network device that does not support the clock synchronization, and determines the network device. Whether the version belongs to the network device version that does not support clock synchronization; if yes, it directly determines that the network device does not support clock synchronization, which is an abnormal state; If not, it is further determined whether the board or port of the network device belongs to a network device board or port that does not support clock synchronization; if the board or port of the network device does not belong to a network device board or port that does not support clock/time synchronization If the board or the port of the network device belongs to a network device board or port that does not support clock synchronization, in order to judge the result more accurately, it is further determined whether the corresponding port has an optical connection configuration, and if so, the network is determined. The device does not support clock synchronization and is in an abnormal state. If it does not exist, it is determined to be in a normal state.
当检查网络设备是否不支持时间同步时,读取模块201读取的检测指标包括不支持时间同步指标,处理模块202获取不支持时间同步的网络设备的版本、单板、端口,判断网络设备的版本是否属于不支持时间同步的网络设备版本;若是,则直接判定网络设备不支持时间同步,为异常状态;若否,则进一步判断网络设备的单板或端口是否属于不支持时间同步的网络设备单板或端口;若网络设备的单板或端口不属于不支持时间同步的网络设备单板或端口,则判定为正常状态;若网络设备的单板或端口属于不支持时间同步的网络设备单板或端口,为了判断结果更加准确,进一步判断对应端口是否存在光连接配置,若存在,才判定网络设备不支持时间同步,为异常状态;若不存在,则判定为正常状态。When checking whether the network device does not support the time synchronization, the detection indicator read by the reading module 201 includes not supporting the time synchronization indicator, and the processing module 202 obtains the version, the board, and the port of the network device that does not support the time synchronization, and determines the network device. Whether the version belongs to the network device version that does not support time synchronization. If yes, it directly determines whether the network device does not support time synchronization and is abnormal. If not, it further determines whether the board or port of the network device belongs to a network device that does not support time synchronization. If the board or port of the network device does not belong to a network device or port that does not support time synchronization, the board is determined to be in a normal state. If the board or port of the network device belongs to a network device that does not support time synchronization. The board or port, in order to judge the result more accurately, further determines whether the corresponding port has an optical connection configuration. If it exists, it determines that the network device does not support time synchronization, which is an abnormal state; if not, it determines that it is a normal state.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:网络设备不支持时钟/时间同步功能。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the network device does not support the clock/time synchronization function. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备的时钟/时间同步跳数是否超标时,读取模块201读取的检测指标包括:时钟/时间同步跳数超标指标;时钟/时间同步跳数超标指标可以设置为时钟/时间同步跳数阈值。In an embodiment, when checking whether the clock/time synchronization hop count of the network device exceeds the standard, the detection indicators read by the reading module 201 include: a clock/time synchronization hop count exceeding the standard indicator; and the clock/time synchronization hop count exceeding the standard indicator Can be set to the clock/time sync hop count threshold.
处理模块202获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果包括以下方式中的至少一种:The processing module 202 acquires the detection parameters corresponding to the detection indicators, and detects the detection parameters and the corresponding detection indicators, and the detection result includes at least one of the following manners:
方式一:处理模块202获取网络设备的本地时钟距离祖父时钟的跳数,当跳数大于时钟/时间同步跳数超标指标时,则判定网络设备的时间同步跳数超标。Manner 1: The processing module 202 obtains the hop count of the local clock of the network device from the grandfather clock, and determines that the time synchronization hop count of the network device exceeds the standard when the hop count is greater than the clock/time synchronization hop count exceeding the standard.
方式二:处理模块202当网络设备的当前同步定时源为抽以太网时钟时,获取其与另一网络设备之间距离的跳数;另一网络设备的当前同步定 时源为外时钟、内时钟、GPS时钟或1588时钟,或另一网络设备的当前同步定时源为抽以太网时钟、且网络设备与另一网络设备距离最远;跳数大于时钟/时间同步跳数超标指标时,则判定网络设备的时钟同步跳数超标。Manner 2: The processing module 202 obtains the hop count of the distance between the network device and the current synchronization timing source of the network device, and the current synchronization of the other network device. The time source is an external clock, an internal clock, a GPS clock, or a 1588 clock, or the current synchronous timing source of another network device is an extracted Ethernet clock, and the network device is farthest from another network device; the hop count is greater than the clock/time synchronization When the hop count exceeds the standard, it is determined that the number of clock synchronization hops of the network device exceeds the standard.
其中,方式一具体为:处理模块202判断网络设备的本地时钟距离祖父时钟的跳数是否大于时间同步跳数阈值,若是,则判定网络设备的时间同步跳数超标,为异常状态;若否,则判定为正常状态。其中,可以通过1588状态查询本地时钟到祖父时钟的距离。The method 1 is: the processing module 202 determines whether the hop count of the local clock of the network device is greater than the time synchronization hop threshold, and if yes, determines that the time synchronization hop count of the network device exceeds the standard, and is abnormal; if not, Then it is determined to be in a normal state. The distance from the local clock to the grandfather clock can be queried through the 1588 state.
方式二具体为:处理模块202判断网络设备的当前同步定时源是否是抽以太网时钟,若不是,则不参与评估;若是,则判断网络设备是否能找到根节点,根节点包括当前同步定时源为外时钟、内时钟、GPS时钟或1588时钟的网络设备;The second mode is: the processing module 202 determines whether the current synchronization timing source of the network device is an extracted Ethernet clock, and if not, does not participate in the evaluation; if yes, determines whether the network device can find the root node, and the root node includes the current synchronization timing source. a network device that is an external clock, an internal clock, a GPS clock, or a 1588 clock;
若能找到根节点,则判断网络设备距离其根节点的跳数是否大于时钟同步跳数阈值,若是,则判定网络设备的时钟同步跳数超标,为异常状态;若否,则判定为正常状态;If the root node is found, it is determined whether the hop count of the network device from the root node is greater than the threshold of the clock synchronization hop count. If yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state. ;
若不能找到根节点,则判断网络设备距离另一网络设备的跳数是否大于时钟同步跳数阈值,另一网络设备当前同步定时源也为抽以太网时钟,网络设备与另一网络设备距离最远;若是,则判定网络设备的时钟同步跳数超标,为异常状态;若否,则判定为正常状态。If the root node cannot be found, it is determined whether the hop count of the network device from the other network device is greater than the clock synchronization hop threshold, and the current synchronization timing source of the other network device is also the extracted Ethernet clock, and the network device is the most distant from the other network device. Far; if yes, it is determined that the number of clock synchronization hops of the network device exceeds the standard, and is an abnormal state; if not, it is determined to be a normal state.
应当理解的是,方式一为判断网络设备的时间同步跳数是否超标,方式二为判断网络设备的时钟同步跳数是否超标,为了实现对网络设备时钟/时间配置的全面检查,以保证网络业务的稳定性,在实际操作中,检查网络设备的时钟同步跳数是否超标和时间同步跳数是否超标都是非常必要、缺一不可的。It should be understood that the first method is to determine whether the time synchronization hop count of the network device exceeds the standard, and the second method is to determine whether the clock synchronization hop count of the network device exceeds the standard, in order to implement a comprehensive check of the network device clock/time configuration to ensure the network service. Stability, in actual operation, it is necessary and indispensable to check whether the number of clock synchronization hops of the network device exceeds the standard and whether the time synchronization hop count exceeds the standard.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:时钟/时间同步跳数超标。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the clock/time synchronization hop count exceeds the standard. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备是否缺少主用或备用时钟源配置时,读取模块201读取的检测指标包括缺少主用或备用时钟源配置指标,缺少 主用或备用时钟源配置指标可以包括:网络设备的光连接的数量以及对应的光连接端口配置的时钟源数量阈值。In an embodiment, when checking whether the network device lacks an active or standby clock source configuration, the detection indicator read by the reading module 201 includes a lack of an active or standby clock source configuration indicator, and is missing. The primary or secondary clock source configuration indicator may include: the number of optical connections of the network device and the threshold number of clock sources configured by the corresponding optical connection port.
其中,网络设备的光连接的数量和对应的光连接端口配置的时钟源数量阈值包括以下两种情况:The threshold of the number of optical connections of the network device and the number of clock sources configured by the corresponding optical port includes the following two situations:
1、网络设备的光连接数量小于或等于1时,对应的光连接端口配置的时钟源数量阈值为1,这里的时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟;另外,若网络设备的光连接端口配置的时钟源数量小于该阈值,则可判定为网络设备缺少主用或备用时钟源配置;1. When the number of optical connections of the network device is less than or equal to 1, the threshold of the number of clock sources configured for the corresponding optical port is 1. The clock source here includes the Ethernet clock, the line pumping clock, or the branch clock. If the number of clock sources configured on the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks an active or standby clock source configuration;
2、网络设备的光连接数量大于1时,对应的光连接端口配置的时钟源数量阈值为2,这里的时钟源包括抽以太网时钟、线路抽时钟、支路抽时钟、外时钟、GPS时钟或1588时钟,不包括内时钟;另外,若网络设备的光连接端口配置的时钟源数量小于该阈值,则可判定网络设备缺少主用或备用时钟源配置。2. When the number of optical connections of the network device is greater than 1, the threshold of the number of clock sources configured for the corresponding optical port is 2, and the clock source here includes the extracted Ethernet clock, the line pumping clock, the branch clock, the external clock, and the GPS clock. Or 1588 clock, excluding the internal clock; in addition, if the number of clock sources configured by the optical connection port of the network device is less than the threshold, it may be determined that the network device lacks the active or standby clock source configuration.
这里,所述抽以太网时钟(SyncE),是指:从以太网线路抽取时钟信号作为整个设备的系统时钟(clock synchronization from Ethernet line)。Here, the extracted Ethernet clock (SyncE) means that the clock signal is extracted from the Ethernet line as the clock synchronization from the Ethernet line.
所述线路抽时钟(Sync From E1 Line Clock),是指:从E1线路中抽取时钟信号,作为整个设备的系统时钟(clock synchronization from E1 line)。The Sync From E1 Line Clock refers to: extracting a clock signal from the E1 line as the system clock of the entire device (clock synchronization from E1 line).
所述支路抽时钟(Sync From E1 branch Clock),是指:从E1端口输入的E1信号中抽取时钟信号,作为整个设备的系统时钟(clock synchronization from E1 branch)。The Sync From E1 branch clock means that the clock signal is extracted from the E1 signal input from the E1 port as the clock synchronization from the E1 branch.
处理模块202配置为:获取网络设备的光连接数量和网络设备的光连接端口配置的时钟源数量;当光连接数量小于或等于1、时钟源数量小于1、且时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟时,或当光连接数量大于1、时钟源数量小于2、且时钟源不包括内时钟时,则判定网络设备缺少主用或备用时钟源配置。The processing module 202 is configured to: obtain the number of optical connections of the network device and the number of clock sources configured by the optical connection port of the network device; when the number of optical connections is less than or equal to 1, the number of clock sources is less than 1, and the clock source includes an extracted Ethernet clock, When the line draws a clock or a branch to draw a clock, or when the number of optical connections is greater than 1, the number of clock sources is less than 2, and the clock source does not include an internal clock, then it is determined that the network device lacks an active or standby clock source configuration.
其中,处理模块202配置为:判断网络设备的光连接数量是否大于1,若网络设备的光连接数量小于或等于1,则判断网络设备的光连接端口配置的时钟源数量是否小于1,时钟源包括抽以太网时钟、线路抽时钟或支路抽 时钟;若是,则判定网络设备缺少主用或备用时钟源配置,为异常状态;若否,则判断为正常状态,此种正常状态的情况具体为:若网络设备的光连接数量等于1,则判断网络设备的光连接端口配置的时钟源数量是否为1,时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟;若是,则判定为正常状态。The processing module 202 is configured to: determine whether the number of optical connections of the network device is greater than 1. If the number of optical connections of the network device is less than or equal to 1, determine whether the number of clock sources configured by the optical connection port of the network device is less than 1, and the clock source. Including pumping Ethernet clock, line pumping clock or branch pumping If the network device lacks the primary or backup clock source configuration, it is abnormal; if not, it is determined to be in a normal state. The normal state is as follows: It is determined whether the number of clock sources configured by the optical connection port of the network device is 1, and the clock source includes an extracted Ethernet clock, a line pumping clock, or a tributary clock; if yes, it is determined to be a normal state.
其中,处理模块202配置为:若网络设备的光连接数量大于1,则判断网络设备的光连接端口配置的时钟源数量是否小于2,这里的时钟源包括抽以太网时钟、线路抽时钟、支路抽时钟、外时钟、GPS时钟或1588时钟,不包括内时钟;若是,则判定网络设备缺少主用或备用时钟源配置,为异常状态;若否,则判定为正常状态。The processing module 202 is configured to: if the number of optical connections of the network device is greater than 1, determine whether the number of clock sources configured by the optical connection port of the network device is less than 2. The clock source includes the extracted Ethernet clock, the line drawn clock, and the branch. The path clock, external clock, GPS clock or 1588 clock does not include the internal clock; if yes, it determines that the network device lacks the active or standby clock source configuration, which is an abnormal state; if not, it is determined to be a normal state.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:缺少主用或备用时钟源配置。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: the primary or backup clock source configuration is missing. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备时钟同步配置是否成环时,读取模块201读取的检测指标包括时钟同步配置成环指标。In an embodiment, when checking whether the network device clock synchronization configuration is looped, the detection indicator read by the reading module 201 includes clock synchronization configured as a ring indicator.
处理模块202配置为:获取网络设备的版本、单板、端口,当网络设备与另一网络设备之间的光连接数量大于1、网络设备与另一网络设备均配置的是抽以太网时钟、且根据网络设备的版本、单板、端口确定出沿光连接链路抽时钟源在方向上形成闭环时,则判定网络设备时钟同步配置成环。The processing module 202 is configured to: obtain a version, a board, and a port of the network device. When the number of optical connections between the network device and another network device is greater than 1, the network device and the other network device are configured to extract an Ethernet clock. When it is determined that the clock source along the optical connection link forms a closed loop in the direction according to the version, the board, and the port of the network device, it is determined that the network device clock is synchronously configured into a ring.
其中,处理模块202配置为:判断网络设备配置的是否为抽以太网时钟,若否,则不参与评估,比如若网络设备配置的是线路抽时钟或支路抽时钟,则不参与评估。若网络设备配置的是抽以太网时钟,则判断两个网络设备之间的光连接数量是否大于1,若是,则根据网络设备的版本、单板、端口判断沿光连接链路抽时钟源在方向上是否形成闭环,若是,则判定网络设备时钟同步配置成环,为异常状态;若否,则判定为正常状态。若两个网络设备之间的光连接数量不是大于1,则判断两个网络设备之间的光连接数量是否为1,若两个网络设备之间的光连接数量是1,则根据网络设备的版本、单板、端口判断沿光连接链路抽时钟源在方向上是否形成闭环,若是,则判定为正常状态。 The processing module 202 is configured to: determine whether the configuration of the network device is an extracted Ethernet clock, and if not, do not participate in the evaluation, for example, if the network device is configured with a line pumping clock or a branch clock, it does not participate in the evaluation. If the network device is configured with an Ethernet clock, determine whether the number of optical connections between the two network devices is greater than 1. If yes, determine the clock source along the optical connection link according to the version, board, and port of the network device. Whether a closed loop is formed in the direction, and if so, it is determined that the network device clock is synchronously configured as a loop, which is an abnormal state; if not, it is determined to be a normal state. If the number of optical connections between the two network devices is not greater than 1, it is determined whether the number of optical connections between the two network devices is 1. If the number of optical connections between the two network devices is 1, according to the network device The version, the board, and the port determine whether the clock source along the optical link link forms a closed loop in the direction. If yes, it determines that it is in a normal state.
网络设备在处于光连接状态时,可以根据网络设备自身的版本、单板、端口确定出往哪个方向抽时钟源。需要特别说明的是,如果两个网络设备之间仅存在1条光连接时,若时钟源配置为互抽,这种情况不判定时钟同步配置成环,为正常状态。When the network device is in the optical connection state, it can determine which direction the clock source is drawn according to the version, board, and port of the network device. It should be noted that if there is only one optical connection between two network devices, if the clock source is configured to be mutually pumped, this case does not determine that the clock synchronization is configured as a ring, which is a normal state.
其中,所述互抽是指:两个设备互为对方的系统时钟。The mutual extraction refers to: the two devices are each other's system clock.
应当理解的是,对配置了抽以太网时钟的网络设备,形成有方向树,沿着当前树结构的对应时钟配置又抽回到了源网络设备,则可判定对应网络设备时钟配置成环。It should be understood that, for a network device configured with an extracted Ethernet clock, a directional tree is formed, and the corresponding clock configuration along the current tree structure is extracted back to the source network device, and then the clock of the corresponding network device is determined to be configured as a ring.
若网络设备A与网络设备B之间直接进行光连接、且光连接的数量大于1,则这种情况属于网络设备A与网络设备B之间的光连接数量大于1;若网络设备A与网络设备B之间应用上述规则检查为时钟同步配置成环,则判定时钟同步配置成环。若网络设备A与网络设备B之间直接进行光连接、且网络设备A与网络设备B之间还通过网络设备C进行光连接,则这种情况也属于网络设备A与网络设备B之间的光连接数量大于1;若网络设备A与网络设备B之间应用上述规则检查为时钟同步配置成环,则判定时钟同步配置成环。应当理解的是,网络设备A与网络设备B之间的光连接数量大于1并不仅限于上述两种,比如下面例举的也是其中一种方式:网络设备A与网络设备B之间通过网络设备C进行光连接形成光连接链路1、网络设备A与网络设备B之间还通过网络设备D进行光连接形成光连接链路2。If the number of optical connections between the network device A and the network device B is greater than 1, the number of optical connections between the network device A and the network device B is greater than one; if the network device A and the network After the above rules check is applied between the devices B to configure clock synchronization for the ring, it is determined that the clock synchronization is configured as a ring. If the optical connection between the network device A and the network device B is directly performed, and the network device A and the network device B are also optically connected through the network device C, this situation also belongs to between the network device A and the network device B. The number of optical connections is greater than one. If the above rules are applied between the network device A and the network device B to check that the clock synchronization is configured as a ring, it is determined that the clock synchronization is configured as a ring. It should be understood that the number of optical connections between the network device A and the network device B is greater than one, and is not limited to the above two types. For example, the following is one of the modes: the network device A and the network device B pass through the network device. C is optically connected to form an optical connection link 1. The network device A and the network device B are also optically connected through the network device D to form an optical connection link 2.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:时钟同步配置成环。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
在一种实施例中,当检查网络设备是否未开启时间同步的功能时,读取模块201读取的检测指标包括未开启时间同步指标,处理模块202配置为:获取网络设备的PTP时间端口配置项,当网络设备不存在PTP时间端口配置项时,则判定网络设备未开启时间同步。In an embodiment, when the network device checks whether the time synchronization function is not enabled, the detection indicator read by the reading module 201 includes an un-on time synchronization indicator, and the processing module 202 is configured to: acquire a PTP time port configuration of the network device. If the network device does not have a PTP time port configuration item, it is determined that the network device does not enable time synchronization.
其中,处理模块202配置为:判断网络设备是否存在PTP时间端口配置项,若不存在,则判定网络设备未开启时间同步,为异常状态;若存在, 则判定为正常状态。The processing module 202 is configured to: determine whether the network device has a PTP time port configuration item, and if not, determine that the network device does not turn on time synchronization, and is an abnormal state; if yes, Then it is determined to be in a normal state.
采用上述方案,可以自动、高效、准确地检测出网络设备的时钟/时间配置隐患:未开启时间同步。从而节省人力,提升网络设备时钟/时间检测的效率、确保了检测结果的准确性及网络业务的稳定性。With the above solution, the clock/time configuration of the network device can be detected automatically, efficiently, and accurately: time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
输出模块203配置为读取每一组检测出的检测结果,生成并输出成评估报告保存在数据库中。The output module 203 is configured to read each set of detected detection results, generate and output an evaluation report to be stored in a database.
根据实施例提供的网络设备时钟/时间检测装置,通过读取模块201读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;处理模块202获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果;输出模块203输出检测结果。采用上述方案,可以自动、高效、准确地检测出以下五种网络设备的时钟/时间配置隐患中的至少一种:1、不支持时钟/时间同步;2、时钟/时间同步跳数超标;3、缺少主用或备用时钟源配置;4、时钟同步配置成环;5、未开启时间同步。从而节省人力,提升网络设备时钟/时间检测的效率,确保了检测结果的准确性以及网络业务的稳定性。According to the network device clock/time detecting device provided by the embodiment, the reading module 201 reads at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator is not supported. The clock/time synchronization hop count exceeds the standard indicator, the active or standby clock source configuration indicator is missing, the clock synchronization is configured into a ring indicator, and the time synchronization indicator is not turned on; the processing module 202 obtains the detection parameter corresponding to each detection indicator, and the detection parameter and the detection parameter The corresponding detection index is detected to generate a detection result; the output module 203 outputs the detection result. The above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2. The clock/time synchronization hop count exceeds the standard; The main or standby clock source configuration is missing; 4. The clock synchronization is configured into a ring; 5. The time synchronization is not enabled. Thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of detection results and the stability of network services.
显然,本领域的技术人员应该明白,上述本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(ROM/RAM、磁碟、光盘,即可读存储介质)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the modules or steps of the above embodiments of the present invention can be implemented by a general computing device, which can be concentrated on a single computing device or distributed among multiple computing devices. On the network, optionally, they may be implemented by program code executable by the computing device so that they can be stored in a computer storage medium (ROM/RAM, diskette, optical disk, ready-to-read storage medium) by the computing device To be performed, and in some cases, the steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of A single integrated circuit module is implemented. Therefore, the invention is not limited to any particular combination of hardware and software.
基于此,本发明实施例还提供了一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,当执行所述指令时,引起至少一个处理器执行前述的网络设备时钟/时间检测方法。 Based on this, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and when executed, causes at least one processor to execute the foregoing network device clock/time detection method.
以上内容是结合具体的实施方式对本发明实施例所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above is a detailed description of the embodiments of the present invention in conjunction with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.
工业实用性Industrial applicability
本发明实施例提供的方案,读取至少一组对网络设备的时钟/时间进行检测的检测指标,检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;获取各检测指标对应的检测参数,并对检测参数与对应的检测指标进行检测,生成检测结果;输出检测结果。采用上述方案,可以自动、高效、准确地检测出以下五种网络设备的时钟/时间配置隐患中的至少一种:1、不支持时钟/时间同步;2、时钟/时间同步跳数超标;3、缺少主用或备用时钟源配置;4、时钟同步配置成环;5、未开启时间同步,从而节省人力,提升网络设备时钟/时间检测的效率,确保了检测结果的准确性以及网络业务的稳定性。 The solution provided by the embodiment of the present invention reads at least one set of detection indicators for detecting the clock/time of the network device, and the detection indicators include the following five groups: the clock/time synchronization indicator, the clock/time synchronization hop count exceeding the standard, The primary or backup clock source configuration indicator, the clock synchronization configuration loop indicator, and the time synchronization index are not enabled; the detection parameters corresponding to each detection index are obtained, and the detection parameters and the corresponding detection indicators are detected to generate detection results; result. The above solution can automatically, efficiently, and accurately detect at least one of the clock/time configuration risks of the following five network devices: 1. Clock/time synchronization is not supported; 2. The clock/time synchronization hop count exceeds the standard; The main or standby clock source configuration is lacking; 4. The clock synchronization is configured into a ring; 5. The time synchronization is not enabled, thereby saving manpower, improving the efficiency of network device clock/time detection, ensuring the accuracy of the detection result and the network service. stability.

Claims (15)

  1. 一种网络设备时钟/时间检测方法,包括:A network device clock/time detection method includes:
    读取至少一组对网络设备的时钟/时间进行检测的检测指标,所述检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;Reading at least one set of detection indicators for detecting clock/time of the network device, where the detection indicators include the following five groups: no clock/time synchronization indicator, clock/time synchronization hop count exceeding indicator, lack of active or standby clock The source configuration indicator, the clock synchronization configuration is a ring indicator, and the time synchronization indicator is not enabled.
    获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测,生成检测结果;Obtaining detection parameters corresponding to each detection index, and detecting the detection parameter and the corresponding detection indicator to generate a detection result;
    输出所述检测结果。The detection result is output.
  2. 如权利要求1所述的网络设备时钟/时间检测方法,其中,当读取至少两组检测指标时,所述获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测包括:The network device clock/time detecting method according to claim 1, wherein when at least two sets of detection indexes are read, the detecting parameters corresponding to the respective detection indexes are acquired, and the detection parameters and the corresponding detection are performed. The indicators are tested to include:
    获取所有的所述检测参数,分组对所述检测参数与对应的所述检测指标进行检测;Obtaining all the detection parameters, and detecting, by the group, the detection parameter and the corresponding detection indicator;
    或,获取一组所述检测参数,并对所述检测参数与对应的所述检测指标进行检测;然后获取下一组所述检测参数,并对所述检测参数与对应的所述检测指标进行检测,直至检测完所有的所述检测指标与对应的所述检测参数。Or acquiring a set of the detection parameters, and detecting the detection parameters and the corresponding detection indicators; then acquiring the next set of the detection parameters, and performing the detection parameters and the corresponding detection indicators Detecting until all of the detection indicators and corresponding detection parameters are detected.
  3. 如权利要求1或2所述的网络设备时钟/时间检测方法,其中,当所述检测指标包括不支持时钟/时间同步指标时,所述获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测,生成检测结果包括:The network device clock/time detecting method according to claim 1 or 2, wherein, when the detection indicator includes not supporting a clock/time synchronization indicator, the acquiring a detection parameter corresponding to each detection index, and detecting the detection parameter The parameter is detected by the corresponding detection indicator, and the generated detection result includes:
    获取所述网络设备的版本、单板、端口,当所述网络设备的版本满足所述不支持时钟/时间同步指标,或当所述网络设备的版本不满足所述不支持时钟/时间同步指标、所述网络设备的单板或端口满足所述不支持时钟/时间同步指标、且存在光连接时,则判定所述网络设备不支持时钟/时间同步。 Obtaining a version, a board, and a port of the network device, when the version of the network device meets the non-supported clock/time synchronization indicator, or when the version of the network device does not meet the non-supported clock/time synchronization indicator If the board or port of the network device meets the non-supported clock/time synchronization indicator and there is an optical connection, it is determined that the network device does not support clock/time synchronization.
  4. 如权利要求1或2所述的网络设备时钟/时间检测方法,其中,当所述检测指标包括时钟/时间同步跳数超标指标时,所述获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测,生成检测结果包括以下方式中的至少一种:The network device clock/time detecting method according to claim 1 or 2, wherein, when the detection index includes a clock/time synchronization hop count exceeding the indicator, the acquiring the detection parameter corresponding to each detection index, and The detection parameter is detected by the corresponding detection indicator, and the detection result includes at least one of the following manners:
    方式一:获取所述网络设备的本地时钟距离祖父时钟的跳数,当所述跳数大于所述时钟/时间同步跳数超标指标时,则判定所述网络设备的时间同步跳数超标;Manner 1: Obtaining the hop count of the local clock of the network device from the grandfather clock, and determining that the time synchronization hop count of the network device exceeds the standard when the hop count is greater than the clock/time synchronization hop count exceeding the standard;
    方式二:当所述网络设备的当前同步定时源为抽以太网时钟时,获取其与另一网络设备之间距离的跳数;所述另一网络设备的当前同步定时源为外时钟、内时钟、全球定位系统时钟或1588时钟,或所述另一网络设备的当前同步定时源为抽以太网时钟、且所述网络设备与所述另一网络设备距离最远;所述跳数大于所述时钟/时间同步跳数超标指标时,则判定所述网络设备的时钟同步跳数超标。Manner 2: when the current synchronization timing source of the network device is an extracted Ethernet clock, obtain the hop count of the distance between the network device and the other network device; the current synchronization timing source of the other network device is an external clock, a clock, a global positioning system clock, or a 1588 clock, or a current synchronization timing source of the another network device is an extracted Ethernet clock, and the network device is farthest from the other network device; the hop count is greater than When the clock/time synchronization hop count exceeds the standard, it is determined that the number of clock synchronization hops of the network device exceeds the standard.
  5. 如权利要求1或2所述的网络设备时钟/时间检测方法,其中,当所述检测指标包括缺少主用或备用时钟源配置指标时,所述获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测,生成检测结果包括:The network device clock/time detecting method according to claim 1 or 2, wherein when the detection indicator includes a missing primary or backup clock source configuration indicator, the acquiring the detection parameter corresponding to each detection indicator The detection parameter is detected by the corresponding detection indicator, and the detection result includes:
    获取所述网络设备的光连接数量和所述网络设备的光连接端口配置的时钟源数量;Obtaining the number of optical connections of the network device and the number of clock sources configured by the optical connection port of the network device;
    当所述光连接数量小于或等于1、所述时钟源数量小于1、且所述时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟时,或当所述光连接数量大于1、所述时钟源数量小于2、且所述时钟源不包括内时钟时,则判定所述网络设备缺少主用或备用时钟源配置。When the number of optical connections is less than or equal to 1, the number of clock sources is less than 1, and the clock source includes an extracted Ethernet clock, a line pumping clock, or a tributary clock, or when the number of optical connections is greater than 1. When the number of clock sources is less than 2 and the clock source does not include an internal clock, it is determined that the network device lacks an active or standby clock source configuration.
  6. 如权利要求1或2所述的网络设备时钟/时间检测方法,其中,当所述检测指标包括时钟同步配置成环指标时,所述获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测,生成检测结果包括:The network device clock/time detecting method according to claim 1 or 2, wherein when the detection index includes clock synchronization configured as a ring index, the acquiring a detection parameter corresponding to each detection index, and detecting the detection parameter And detecting corresponding detection indicators, and generating detection results include:
    获取所述网络设备的版本、单板、端口,当所述网络设备与另一网络设备之间的光连接数量大于1、所述网络设备与所述另一网络设备均配置的 是抽以太网时钟、且根据所述网络设备的版本、单板、端口确定出沿光连接链路抽时钟源在方向上形成闭环时,则判定所述网络设备时钟同步配置成环。Obtaining a version, a board, and a port of the network device, where the number of optical connections between the network device and another network device is greater than 1, and the network device and the other network device are configured When the Ethernet clock is extracted, and the loop is formed in the direction along the optical connection link according to the version, the board, and the port of the network device, it is determined that the network device clock is synchronously configured into a ring.
  7. 如权利要求1或2所述的网络设备时钟/时间检测方法,其中,当所述检测指标包括未开启时间同步指标时,所述获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测,生成检测结果包括:The network device clock/time detecting method according to claim 1 or 2, wherein, when the detection indicator includes an un-on time synchronization indicator, the acquiring a detection parameter corresponding to each detection index, and the detection parameter and Corresponding detection indicators are detected, and the generated detection results include:
    获取所述网络设备的精密时间协议时间端口配置项,当所述网络设备不存在所述精密时间协议时间端口配置项时,则判定所述网络设备未开启时间同步。Obtaining a precision time protocol time port configuration item of the network device, when the network device does not have the precise time protocol time port configuration item, determining that the network device does not turn on time synchronization.
  8. 一种网络设备时钟/时间检测装置,包括:A network device clock/time detecting device includes:
    读取模块,配置为读取至少一组对网络设备的时钟/时间进行检测的检测指标,所述检测指标包括以下五组:不支持时钟/时间同步指标、时钟/时间同步跳数超标指标、缺少主用或备用时钟源配置指标、时钟同步配置成环指标、未开启时间同步指标;The reading module is configured to read at least one set of detection indicators for detecting the clock/time of the network device, where the detection indicators include the following five groups: the clock/time synchronization indicator, the clock/time synchronization hop count exceeding the standard, Lack of active or standby clock source configuration indicators, clock synchronization configuration into ring indicators, and time synchronization indicators not enabled;
    处理模块,配置为获取各检测指标对应的检测参数,并对所述检测参数与对应的所述检测指标进行检测,生成检测结果;The processing module is configured to acquire detection parameters corresponding to each detection indicator, and detect the detection parameter and the corresponding detection indicator to generate a detection result;
    输出模块,配置为输出所述检测结果。An output module configured to output the detection result.
  9. 如权利要求8所述的网络设备时钟/时间检测装置,其中,所述处理模块配置为:当所述读取模块读取至少两组检测指标时,The network device clock/time detecting device according to claim 8, wherein the processing module is configured to: when the reading module reads at least two sets of detection indicators,
    获取所有的所述检测参数,分组对所述检测参数与对应的所述检测指标进行检测;Obtaining all the detection parameters, and detecting, by the group, the detection parameter and the corresponding detection indicator;
    或,获取一组所述检测参数,并对所述检测参数与对应的所述检测指标进行检测;然后获取下一组所述检测参数,并对所述检测参数与对应的所述检测指标进行检测,直至检测完所有的所述检测指标与对应的所述检测参数。Or acquiring a set of the detection parameters, and detecting the detection parameters and the corresponding detection indicators; then acquiring the next set of the detection parameters, and performing the detection parameters and the corresponding detection indicators Detecting until all of the detection indicators and corresponding detection parameters are detected.
  10. 如权利要求8或9所述的网络设备时钟/时间检测装置,其中,所述处理模块配置为:当所述检测指标包括不支持时钟/时间同步指标时, 获取所述网络设备的版本、单板、端口,当所述网络设备的版本满足所述不支持时钟/时间同步指标,或当所述网络设备的版本不满足所述不支持时钟/时间同步指标、所述网络设备的单板或端口满足所述不支持时钟/时间同步指标、且存在光连接时,则判定所述网络设备不支持时钟/时间同步。The network device clock/time detecting device according to claim 8 or 9, wherein the processing module is configured to: when the detection indicator includes not supporting a clock/time synchronization indicator, Obtaining a version, a board, and a port of the network device, when the version of the network device meets the non-supported clock/time synchronization indicator, or when the version of the network device does not meet the non-supported clock/time synchronization indicator If the board or port of the network device meets the non-supported clock/time synchronization indicator and there is an optical connection, it is determined that the network device does not support clock/time synchronization.
  11. 如权利要求8或9所述的网络设备时钟/时间检测装置,其中,所述处理模块配置为:当所述检测指标包括时钟/时间同步跳数超标指标时,The network device clock/time detecting device according to claim 8 or 9, wherein the processing module is configured to: when the detection indicator includes a clock/time synchronization hop count exceeding a target,
    获取所述网络设备的本地时钟距离祖父时钟的跳数,当所述跳数大于所述时钟/时间同步跳数超标指标时,则判定为所述网络设备的时间同步跳数超标;Obtaining, by the local clock of the network device, a hop count of the grandfather clock, when the hop count is greater than the clock/time synchronization hop count exceeding the standard, determining that the time synchronization hop count of the network device exceeds the standard;
    和/或,当所述网络设备的当前同步定时源为抽以太网时钟时,获取其与另一网络设备之间距离的跳数;所述另一网络设备的当前同步定时源为外时钟、内时钟、全球定位系统时钟或1588时钟,或所述另一网络设备的当前同步定时源为抽以太网时钟、且所述网络设备与所述另一网络设备距离最远;所述跳数大于所述时钟/时间同步跳数超标指标时,则判定所述网络设备的时钟同步跳数超标。And/or, when the current synchronization timing source of the network device is an extracted Ethernet clock, acquiring a hop count of a distance between the network device and another network device; the current synchronization timing source of the another network device is an external clock, An internal clock, a global positioning system clock, or a 1588 clock, or a current synchronization timing source of the another network device is an extracted Ethernet clock, and the network device is farthest from the other network device; the hop count is greater than When the clock/time synchronization hop count exceeds the standard, it is determined that the number of clock synchronization hops of the network device exceeds the standard.
  12. 如权利要求8或9所述的网络设备时钟/时间检测装置,其中,所述处理模块配置为:当所述检测指标包括缺少主用或备用时钟源配置指标时,The network device clock/time detecting apparatus according to claim 8 or 9, wherein the processing module is configured to: when the detection indicator includes a lack of an active or standby clock source configuration indicator,
    获取所述网络设备的光连接数量和所述网络设备的光连接端口配置的时钟源数量;Obtaining the number of optical connections of the network device and the number of clock sources configured by the optical connection port of the network device;
    当所述光连接数量小于或等于1、所述时钟源数量小于1、且所述时钟源包括抽以太网时钟、线路抽时钟或支路抽时钟时,或当所述光连接数量大于1、所述时钟源数量小于2、且所述时钟源不包括内时钟时,则判定所述网络设备缺少主用或备用时钟源配置。When the number of optical connections is less than or equal to 1, the number of clock sources is less than 1, and the clock source includes an extracted Ethernet clock, a line pumping clock, or a tributary clock, or when the number of optical connections is greater than 1. When the number of clock sources is less than 2 and the clock source does not include an internal clock, it is determined that the network device lacks an active or standby clock source configuration.
  13. 如权利要求8或9所述的网络设备时钟/时间检测装置,其中,所述处理模块配置为:当所述检测指标包括时钟同步配置成环指标时,获取所述网络设备的版本、单板、端口,当所述网络设备与另一网络设备之间的光连接数量大于1、所述网络设备与所述另一网络设备均配置的是抽以太网时钟、且根据所述网络设备的版本、单板、端口确定出沿光连接链路 抽时钟源在方向上形成闭环时,则判定所述网络设备时钟同步配置成环。The network device clock/time detecting device according to claim 8 or 9, wherein the processing module is configured to acquire a version of the network device and a board when the detection indicator includes a clock synchronization configured as a ring indicator. Port, when the number of optical connections between the network device and another network device is greater than 1, the network device and the other network device are configured to extract an Ethernet clock, and according to the version of the network device Board, port, and optical link When the clock source is formed to form a closed loop in the direction, it is determined that the network device clock is synchronously configured as a ring.
  14. 如权利要求8或9所述的网络设备时钟/时间检测装置,其中,所述处理模块配置为:当所述检测指标包括未开启时间同步指标时,获取所述网络设备的精密时间协议时间端口配置项,当所述网络设备不存在所述精密时间协议时间端口配置项时,则判定所述网络设备未开启时间同步。The network device clock/time detecting device according to claim 8 or 9, wherein the processing module is configured to: acquire the precise time protocol time port of the network device when the detection indicator includes an unenabled time synchronization indicator a configuration item, when the network device does not have the precise time protocol time port configuration item, determining that the network device does not turn on time synchronization.
  15. 一种计算机存储介质,所述计算机存储介质存储有一组指令,当执行所述指令时,引起至少一个处理器执行如权利要求1至7任一项所述的网络设备时钟/时间检测方法。 A computer storage medium storing a set of instructions that, when executed, cause at least one processor to perform the network device clock/time detection method of any one of claims 1 to 7.
PCT/CN2017/082002 2016-06-06 2017-04-26 Method and apparatus for detecting clock/time of network device, and computer storage medium WO2017211140A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610395533.3 2016-06-06
CN201610395533.3A CN107465475A (en) 2016-06-06 2016-06-06 A kind of network equipment clock/time detecting method and apparatus

Publications (1)

Publication Number Publication Date
WO2017211140A1 true WO2017211140A1 (en) 2017-12-14

Family

ID=60545720

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/082002 WO2017211140A1 (en) 2016-06-06 2017-04-26 Method and apparatus for detecting clock/time of network device, and computer storage medium

Country Status (2)

Country Link
CN (1) CN107465475A (en)
WO (1) WO2017211140A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786741B (en) * 2020-07-20 2023-02-28 哈尔滨海能达科技有限公司 Clock synchronization method and related device for CPRI transmission data
CN113452465B (en) * 2021-05-17 2023-12-26 新华三信息安全技术有限公司 Clock synchronization method and device
CN114113977A (en) * 2021-11-11 2022-03-01 广州朗国电子科技股份有限公司 RTC circuit automatic detection method and system of circuit board

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5260979A (en) * 1991-05-28 1993-11-09 Codex Corp. Circuit and method of switching between redundant clocks for a phase lock loop
CN102123057A (en) * 2010-12-09 2011-07-13 中国电力科学研究院 Synchronous network route detection, optimization and network routing method and synchronous network system
CN102957545A (en) * 2011-08-17 2013-03-06 中兴通讯股份有限公司 Method and device for maintaining synchronous network clocks
CN103428009A (en) * 2012-05-14 2013-12-04 中兴通讯股份有限公司 Method and device for achieving OAM of grouped synchronous networks

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026504B (en) * 2006-02-24 2011-05-11 华为技术有限公司 Network performance measuring method
CN104080115B (en) * 2013-03-28 2018-02-23 中国移动通信集团公司 A kind of time synchronized performance monitoring method, apparatus and system
WO2015010250A1 (en) * 2013-07-23 2015-01-29 Telefonaktiebolaget L M Ericsson (Publ) Clock recovery in a packet based network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5260979A (en) * 1991-05-28 1993-11-09 Codex Corp. Circuit and method of switching between redundant clocks for a phase lock loop
CN102123057A (en) * 2010-12-09 2011-07-13 中国电力科学研究院 Synchronous network route detection, optimization and network routing method and synchronous network system
CN102957545A (en) * 2011-08-17 2013-03-06 中兴通讯股份有限公司 Method and device for maintaining synchronous network clocks
CN103428009A (en) * 2012-05-14 2013-12-04 中兴通讯股份有限公司 Method and device for achieving OAM of grouped synchronous networks

Also Published As

Publication number Publication date
CN107465475A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
WO2017211140A1 (en) Method and apparatus for detecting clock/time of network device, and computer storage medium
US9491728B2 (en) Method and device for implementing automatic compensation for asymmetric delay of 1588 link
CA3131162A1 (en) Method of remotely monitoring the timing performance of a ptp slave
CN109669899B (en) Method for adaptively adjusting serial port communication baud rate and serial port device
EP2706686A1 (en) Method, terminal and system for measuring asymmetric delay of transmission link
EP2448168A1 (en) Method and system for bearing time synchronization protocol in optical transport network
CN107078821A (en) Distribution of the dynamic accuracy information in the network of the clocks of IEEE 1588
CN102546639B (en) Network-oriented penetration testing scheme automatic-generation method
GB2606111A (en) Partially-ordered blockchain
CN106301996B (en) A kind of method and device that PTP message is tested automatically
CN103441861A (en) Method and device for generating data records
CN104641612A (en) Intelligent supervision for configuration of precision time protocol (PTP) entities
KR20200003213A (en) Communication system and slave device
US20140347652A1 (en) Method and device for detecting symmetry of optical fiber
CN107070577B (en) A kind of synchronous method and its equipment of equipment clock
US20220286989A1 (en) Method and Network Device for Locating Clock Fault
WO2017054559A1 (en) Clock frequency recognition method and apparatus
CN106357501B (en) Intelligent clock planning configuration method and device and centralized controller
CN111262624A (en) Optical cable fault monitoring method and device
US9007889B2 (en) Communication device and communication system with failure detection capabilities
CN111064507A (en) Method and device for detecting length of optical fiber link and terminal equipment
WO2016000324A1 (en) Method and apparatus for implementing time synchronization
CN106470083B (en) A kind of synchronizing network detection method and device
WO2016091050A1 (en) Time synchronization method and device
CN113541837B (en) Parameter configuration method, equipment and system

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: 17809580

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17809580

Country of ref document: EP

Kind code of ref document: A1