Synchronous information configuration method, device, network equipment and storage medium
By automatically detecting and configuring synchronization packets in Ethernet overhead frames, automatic clock and time synchronization of FlexE ports is achieved, solving the problems of cumbersome configuration and low efficiency in 5G networks, and improving network stability and synchronization accuracy.
Patent Information
- Application Number
- CN201911337974.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-23
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2039-12-23
AI Technical Summary
In 5G networks, the clock synchronization and time synchronization configuration process of FlexE ports is cumbersome and inefficient, and cannot meet the nanosecond time synchronization requirements. It is easy to cause abnormal synchronization due to manual configuration errors, affecting network stability.
Provide an automatic configuration method and device, by detecting a predetermined synchronization message in the received Ethernet overhead frame, generating and configuring corresponding synchronization information to the FlexE port, realizing automatic synchronization configuration of clock and time, and simplifying user configuration steps. Avoid artificial errors.
Improves the clock and time synchronization configuration efficiency of FlexE ports, enhances network stability, reduces manual configuration errors, and achieves higher precision time synchronization.
Smart Images

Figure CN113098645B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a method, an apparatus, a network device and a storage medium for configuring synchronization information. Background Art
[0002] With the development of the fifth generation of mobile communication technology (5G), Flexible Ethernet (FlexE) technology occupies an important position in 5G bearer technology, which can achieve ultra-low latency, physical isolation and high reliability data transmission. The access layer, aggregation layer and core layer in the 5G network usually use FlexE links, and the device ports in the FlexE links are important ports in the 5G network.
[0003] Data transmission in 5G bearer networks requires more accurate time synchronization, but the accuracy of network time synchronization provided by the current Global Positioning System (GPS) can no longer meet the future nanosecond-level time synchronization requirements. Clock synchronization or time synchronization based on FlexE ports can achieve nanosecond-level synchronization accuracy, but in the configuration of a large number of devices in the entire network, the manual configuration process is cumbersome and inefficient, and the entire configuration process consumes a lot of manpower. Summary of the invention
[0004] The embodiments of the present invention provide a synchronization information configuration method, apparatus, network device and storage medium, which can automatically configure the synchronization information of a FlexE port, solve the problem of cumbersome manual configuration and improve configuration efficiency.
[0005] In a first aspect, an embodiment of the present invention provides a method for configuring synchronization information, comprising: in response to receiving a detection start instruction for a predetermined synchronization message, starting detection of a predetermined synchronization message for a received Ethernet overhead frame; based on the detected predetermined synchronization message, generating synchronization information corresponding to the predetermined synchronization message, and configuring the synchronization information to the Ethernet port of a local device.
[0006] In a second aspect, an embodiment of the present invention provides a synchronization information configuration device, comprising: a message detection start module, used to respond to a detection start instruction of a predetermined synchronization message received, and start the detection of a predetermined synchronization message for a received Ethernet overhead frame; a synchronization information configuration module, used to generate synchronization information corresponding to the predetermined synchronization message according to the detected predetermined synchronization message, and configure the synchronization information to the Ethernet port of the local device. .
[0007] In a third aspect, an embodiment of the present invention provides a network device, comprising: a memory and a processor; the memory is used to store programs; the processor is used to read executable program codes stored in the memory to execute the above-mentioned synchronization information configuration method.
[0008] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the above-mentioned methods for configuring synchronization information.
[0009] According to the configuration method, device, network equipment and storage medium of synchronization information of the embodiments of the present invention, automatic clock synchronization configuration and / or automatic time synchronization configuration can be performed based on the FlexE port, simplifying the configuration steps of user clock and / or time synchronization, avoiding the situation of asynchrony caused by manual configuration errors, and improving the efficiency of synchronization configuration, thereby enhancing the stability of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.
[0011] Figure 1 A schematic diagram of the flexible Ethernet overhead frame structure is shown.
[0012] Figure 2 A schematic diagram showing the message format of a clock synchronization message.
[0013] Figure 3a A schematic diagram showing the message format of a time synchronization message.
[0014] Figure 3b A schematic diagram showing the message format of a time synchronization message transmitted via an Ethernet frame.
[0015] Figure 4 A schematic diagram showing a flow chart of a method for configuring synchronization information according to an embodiment of the present invention.
[0016] Figure 5 A schematic flow chart showing a method for configuring synchronization information according to another embodiment.
[0017] Figure 6 A schematic flow chart showing a method for configuring synchronization information according to yet another embodiment.
[0018] Figure 7 A schematic flow chart showing a method for configuring synchronization information according to yet another embodiment.
[0019] Figure 8 The configuration of synchronization information provided according to an embodiment of the present invention is shown.
[0020] Fig. 9 A structural diagram showing an exemplary hardware architecture of a computing device that can implement the method and apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only intended to provide a better understanding of the present invention by illustrating examples of the present invention.
[0022] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0023] Ultra-high-precision clock and time synchronization in communication networks includes clock synchronization and time synchronization. Clock synchronization is also called frequency synchronization, and time synchronization is also called phase synchronization. Clock synchronization and time synchronization are used to maintain stable operation of devices in communication networks.
[0024] Figure 1 Figure 2 shows a schematic diagram of the flexible Ethernet overhead frame structure. Figure 1 As shown in the figure, a FlexE overhead multiframe can be composed of 32 consecutive FlexE overhead frames, and a FlexE overhead frame consists of 8 consecutive overhead time slots (Overhead Slot). The Overhead Slot is actually a 64 / 66B data code block (OH code block). In the FlexE overhead frame, the first data code block can contain information such as control characters in the "0x4B" field and "0Code" characters in the "0x5" field. During the information transmission process, the two docked FlexE interfaces can determine the OH code block of the first overhead frame by matching the control characters and the "0Code" characters. When the receiving device recognizes the OH code block, it can receive the next OH code block after receiving 1023×20 64 / 66B data code blocks. By analogy, the entire FlexE frame can be extracted from the code block stream.
[0025] Continue to refer Figure 1The FlexE frame structure may include the following fields: Open Media Frame (OMF), Remote PHY Fault (RPF), FlexE Group Number, PHY Map, PHY Number, Time Slot Allocation Table Calendar A, Calendar B, CRC-16 Check, Manage Channel-Section, and Manage Channel-shim to shim.
[0026] exist Figure 1 In the frame structure of the FlexE overhead shown, in addition to the fields specifically indicated above, there is some space as a reserved field Reserved. In addition, several complete 66B code blocks are provided, which can be used as a management channel for transmitting specified information between two FlexE devices. Exemplarily, in the FlexE overhead frame, the complete 66B block in the sixth row is used for synchronization message filling. The synchronization message is at least one of a clock synchronization message and a time message.
[0027] Figure 2 A schematic diagram of the message format of a clock synchronization message is shown. In an embodiment of the present invention, an Ethernet Synchronous Message Channel (ESMC) message may be used as a clock synchronization message, and the quality level of the clock of the opposite device may be parsed from the ESMC message.
[0028] like Figure 2 As shown, the Ethernet message type field of the ESMC message is located at the 13th to 14th byte data position, occupying 2 bytes in length; the Ethernet message subtype field of the ESMC message is located at the 15th byte data position, occupying 1 byte in length.
[0029] In the embodiment of the present invention, the message type of the received message is determined according to the content of the Ethernet message type field and the content of the Ethernet message subtype field of the received message.
[0030] Figure 3a A schematic diagram showing the message format of a time synchronization message; Figure 3b FIG. 1 is a schematic diagram showing the message format of a time synchronization message transmitted through an Ethernet frame. In an embodiment of the present invention, a Precision Time Protocol (PTP) message may be used as a time synchronization message. PTP is a high-precision time synchronization protocol that can achieve sub-microsecond time accuracy. Figure 3aAs shown in the figure, the message type of the PTP message can be obtained by viewing the message type field MessageType. Figure 3b As shown, the PTP message is located in the data field of the Ethernet frame (ie, Ethernet frame). The Ethernet frame of the data link layer can add header information to the PTP message delivered by the application layer and transmit it in the form of a frame.
[0031] Figure 4 FIG. 2 is a flow chart showing a method for configuring synchronization information according to an embodiment of the present invention. Figure 4 As shown, the method for configuring synchronization information of an embodiment of the present invention may include the following steps.
[0032] S110 , in response to receiving a detection start instruction for a predetermined synchronization message, start detection of a predetermined synchronization message for a received Ethernet overhead frame.
[0033] S120, generating synchronization information corresponding to the predetermined synchronization message according to the detected predetermined synchronization message, and configuring the synchronization information to the Ethernet port of the local device.
[0034] In an embodiment of the present invention, the predetermined synchronization message includes a clock synchronization message and / or a time synchronization message. By setting a predetermined synchronization message for detecting FlexE overhead transmission, if a predetermined synchronization message of a corresponding FlexE port can be detected, the relevant FlexE port is configured with synchronization information corresponding to the predetermined message, thereby automatically realizing the configuration of the synchronization information between devices, simplifying the configuration steps of user clock synchronization and / or time synchronization, avoiding the situation of asynchronism caused by manual configuration errors, and thus enhancing the stability of the network.
[0035] In one embodiment, S110 may specifically include: when the local device allows synchronization information configuration, in response to receiving a detection start instruction for a predetermined synchronization message, starting detection of a predetermined synchronization message for a received Ethernet overhead frame.
[0036] In this embodiment, the local device is set to allow synchronization information configuration, so that the detection of the predetermined synchronization message can be enabled in response to the received detection enable instruction. Exemplarily, the local device can be set to allow synchronization information configuration manually and by sending instructions by a network administrator. Further, the local device is set by default to allow synchronization information configuration, and can be set to prohibit the synchronization information configuration according to the specific situation in the actual application scenario.
[0037] In one embodiment, before step S110, it may also include: S101, reading the values of a predetermined number of bits from the received Ethernet overhead frame; S102, determining the received detection start instruction based on the values of two predetermined bits, wherein the detection start instruction includes clock message detection start, time message detection start, or clock message detection and time message detection are turned on at the same time.
[0038] In the above steps S101 and S102, by reading the contents of two predetermined bits set in the FlexE overhead frame structure, it is determined which type of synchronization message is to be detected.
[0039] In the FlexE overhead frame structure of the embodiment of the present invention, the predetermined number of bits is at least two bits. For example, the content of the two bits can be preset to enable and disable clock message detection and time message detection. Exemplarily, the content of the two bits can be one of 00, 01, 10 and 11, and the corresponding message detection mode is one of clock message detection enabled, time message detection enabled, clock message detection and time message detection enabled at the same time, and clock message detection and time message detection disabled at the same time.
[0040] In this embodiment, if the predetermined number of bits is greater than two bits, the content of the greater than two bits can be preset to indicate one of the above message detection modes. The specific content of the bits corresponding to the greater than two bits of the designated message detection mode can be set according to actual needs.
[0041] From the above description, it can be seen that turning on clock message detection, turning on time message detection, and turning on clock message detection and time message detection at the same time are detection turning on instructions in an embodiment of the present invention, and turning off clock message detection and time message detection at the same time are detection turning off instructions in an embodiment of the present invention.
[0042] In one embodiment, if the predetermined synchronization message is a clock synchronization message, and the corresponding synchronization information includes clock configuration information, the above-mentioned step S120 may specifically include: S21, when the message type of the clock synchronization message is identified from the received Ethernet overhead frame, the clock synchronization message in the Ethernet overhead frame is obtained; S22, if the physical address of the clock source device carried in the clock synchronization message is different from the physical address of the local device, the clock configuration information is generated according to the clock synchronization message, and the clock configuration information is configured to the Ethernet port of the local device.
[0043] In this embodiment, if the physical address of the clock source device carried in the clock synchronization message is the same as the physical address of the local device, it means that the local device is the clock source device of the opposite device. At this time, the local device does not perform clock synchronization configuration, and the clock synchronization message can be discarded; if the physical address of the clock source device carried in the clock synchronization message is different from the physical address of the local device, clock synchronization configuration is performed.
[0044] From the description of the above embodiments, it can be seen that the conditions that need to be met for configuring the synchronization information of the local device include: first, the local device needs to allow the synchronization information configuration; second, start detecting the predetermined synchronization message based on the received Ethernet overhead frame; third, detect the predetermined synchronization message from the received Ethernet overhead frame.
[0045] Specifically, before the detection of the predetermined synchronization message from the received Ethernet overhead frame is enabled, if a message in the Ethernet overhead frame is received, it is not detected whether the message is the predetermined synchronization message, but is directly discarded. Only when the local device enables the detection of the predetermined synchronization message from the received Ethernet overhead frame and identifies that the message type in the Ethernet overhead frame is the message type of the predetermined synchronization message, the clock synchronization message in the Ethernet overhead frame is obtained, and the FlexE port of the local device is synchronously configured.
[0046] As an example, the peer device sends an ESMC message through the FlexE overhead. The local device can receive the ESMC message, but does not identify the message and directly discards it. Only when the local device turns on clock message detection, the ESMC message in the acquired FlexE overhead is analyzed, the message type is identified as 0x88090A, and the clock is configured on the FlexE port of the local device.
[0047] As another example, the peer device sends a PTP message through the FlexE overhead, and the local device can receive the PTP message, but does not identify the message and directly discards it. Only when the local device turns on time message detection, the PTP message in the acquired FlexE overhead is analyzed, the message type is identified as 0x88f7, and the clock is configured on the FlexE port of the local device.
[0048] In one embodiment, when performing clock synchronization configuration, the above step S22 may specifically include: S221, obtaining clock configuration information including a clock quality level carried in a clock synchronization message; S222, detecting whether there is configured clock configuration information on the local device; S223, setting the priority of the generated clock configuration information according to the detection result and the clock quality level; S224, configuring the generated clock configuration information to the Ethernet port of the local device according to the set priority of the clock configuration information.
[0049] Through the above steps S221 to S224, the specific steps of determining the clock configuration information by using the synchronization status message (SSM) algorithm in the embodiment of the present invention are described.
[0050] Specifically, SSM is a set of codes used to identify the quality level of the clock source. Different SSM levels are assigned to multiple clock sources according to the clock accuracy. The higher the clock accuracy, the higher the SSM level. Usually, the clock reference source with the highest SSM level can be used for clock configuration on the local device. When the clock reference source with the highest SSM level fails, the clock board can switch to the clock reference source with the next highest level.
[0051] In this embodiment, when configuring clock configuration information, the higher the clock quality level, the higher the priority of the clock configuration information, and it is necessary to consider whether there is configured clock configuration information on the local device to determine the priority of the clock configuration information in the clock synchronization message.
[0052] In one embodiment, the above step S223 may specifically include: S223-01, if there is no configured clock configuration information, then according to the clock quality level, the priority of the generated clock configuration information is set; S223-02, if there is configured clock configuration information, then according to the clock quality level, the priority of the generated clock configuration information is set, and the priority of the generated clock configuration information is set lower than the priority of the configured clock configuration information.
[0053] In this embodiment, when setting the priority of the clock information, it is necessary to first detect whether there is other clock configuration information of the current device. If not, the configuration starts directly from priority 1. If it exists, the configuration starts from the next priority of the configured clock configuration information. Exemplarily, the other clock configuration information can be a manually configured line extraction clock, which is a clock signal that meets the clock accuracy condition extracted from the received line signal. Exemplarily, the other clock configuration information can be the clock configuration information manually configured by the network administrator.
[0054] It can be seen from the description of the above embodiment that the higher the clock quality level, the higher the priority of the clock configuration information corresponding to the clock quality level, and the priority of the clock configuration information configured first is higher than the priority of the clock configuration information configured later.
[0055] In one embodiment, if the predetermined synchronization message is a time synchronization message, the corresponding synchronization information includes time synchronization configuration information; then the above step S120 may specifically include: S31, when the message type of the time synchronization message is identified from the Ethernet overhead frame, obtaining the detected time synchronization message; S32, obtaining each Ethernet port group of the local device in turn, and generating time synchronization configuration information of the port in each Ethernet port group based on the detected time synchronization message; S33, configuring the time synchronization configuration information to the port in each Ethernet port group.
[0056] In this embodiment, a FlexE link can be used to connect the local device and the opposite device, and an Ethernet port group (FlexE Group) can be configured using the FlexE port of the local device and the FlexE port of the opposite device. A FlexE Group is a group of 1 to N bound Ethernet physical layer ports, where N is an integer greater than or equal to 1. The Ethernet port group ID (FlexE Group ID) can be used to indicate the Ethernet physical layer port being configured among the bound Ethernet physical layer ports. By configuring the FlexE Group, it can be ensured that both sides of the FlexE link can discover each other as neighbors.
[0057] In one embodiment, for each FlexE port in the Ethernet port group, the above step S32 may specifically include the following steps.
[0058] S321, extracting time characteristic information from the time synchronization message, and comparing the extracted time characteristic information with the time characteristic information of the Ethernet port of the local device.
[0059] S322, determining the status of a port in each Ethernet port group through the comparison result, the status of the port being a master port or a slave port, wherein the master port is used to publish synchronization time, and the slave port is used to receive synchronization time.
[0060] S323: Generate time synchronization configuration information of ports in each Ethernet port group at least according to the status of the port.
[0061] Through the above steps S321-S323, the specific steps of determining the time synchronization configuration information by using the Best Master Clock (BMC) algorithm in the embodiment of the present invention are described.
[0062] In one embodiment, the time synchronization configuration information of the ports in each Ethernet port group may also include: the transmission mode of the communication flow, the method of sending messages carrying timestamps during time synchronization, and the PTP message packet sending rate. Among them, the timestamp refers to the moment when each message is sent during the synchronization process. Exemplarily, the transmission mode of the communication flow can be configured as a layer 2 multicast mode, the method of sending messages carrying timestamps during time synchronization can be configured as a two-step clock mode, and the PTP message packet sending rate can be configured as a predetermined device default value.
[0063] Specifically, the optimal clock can be statically specified through manual configuration or dynamically determined through an algorithm based on the BMC. The main process of the algorithm based on the BMC is as follows: different clock nodes (such as the local device and the opposite device) can select a clock node as the optimal clock by exchanging time characteristic information carried in the Announce message, such as time level and time accuracy, and determine the master-slave relationship between the local device and the opposite device and the port status of the local device and the opposite device based on the optimal clock.
[0064] In one embodiment, the above step S33 may specifically include the following steps.
[0065] S331, detecting whether there is a port configured with time synchronization configuration information in each Ethernet port group.
[0066] S332: If there is no port configured with the time synchronization configuration information, configure the time synchronization configuration information to the ports in each Ethernet port group in sequence starting from the second port in the order of the ports.
[0067] S333, if there is a port configured with time synchronization configuration information, then configure the time synchronization configuration information to the ports in each Ethernet port group in sequence starting from the predetermined port in the port order, wherein the predetermined port is the next port of the port configured with time synchronization configuration information.
[0068] In this embodiment, for each FlexE port in the Ethernet port group, first detect whether there is a port in the Ethernet port group of the current device that has been configured with time synchronization configuration information. If not, configure the time synchronization configuration information starting from the second FlexE port; if so, configure the time synchronization configuration information starting from the next port of the port that has been configured with time synchronization configuration information. Among them, the first FlexE port in the Ethernet port group is a reserved port, and the time synchronization configuration information is not configured.
[0069] In one embodiment, if the predetermined synchronization message is a clock synchronization message and a time synchronization message, the corresponding synchronization information includes clock information and time synchronization configuration information; then the above step S120 may specifically include the following steps.
[0070] S41, when identifying the message type of the clock synchronization message and the message type of the time synchronization message from the received Ethernet overhead frame, obtain the clock synchronization message and the time synchronization message in the Ethernet overhead frame.
[0071] In step S41, the step of identifying the message type of the clock synchronization message from the received Ethernet overhead frame has the same process as the step of identifying the message type of the clock synchronization message from the received Ethernet overhead frame in step S21 of the above embodiment; in this step, the step of identifying the message type of the time synchronization message from the received Ethernet overhead frame has the same process as the step of identifying the message type of the time synchronization message from the received Ethernet overhead frame in step S31 of the above embodiment, and the corresponding process in the aforementioned method embodiment may be referred to, which will not be repeated here.
[0072] S42: If the physical address of the clock source device carried in the clock synchronization message is different from the physical address of the local device, generate clock information according to the clock synchronization message, and configure the clock information to the Ethernet port of the local device.
[0073] This step has the same process as step S22 in the above embodiment, and the corresponding process in the above method embodiment may be referred to, and will not be described in detail here.
[0074] S43, if the physical address of the clock source device carried in the clock synchronization message is the same as the physical address of the local device, obtain each Ethernet port group of the local device in turn, generate the time synchronization configuration information of the port in each Ethernet port group according to the detected time synchronization message, and configure the time synchronization configuration information to the port in each Ethernet port group.
[0075] That is to say, if the physical address of the clock source device is different from the physical address of the local device, it means that there is no clock loop in the FlexE network formed by the FlexE link, and the clock synchronization configuration can be performed on the local device; if they are the same, it means that there is a clock loop in the FlexE network formed by the FlexE link. At this time, through the time synchronization configuration, the master-slave relationship between the network devices in the FlexE network can be determined. The clock on the network device that serves as the master node is called the master clock, and the clock on the network device that serves as the slave node is called the slave clock. The port that publishes the synchronized time is called the master port, and the port that receives the synchronized time is called the slave port. After the time synchronization configuration, the hierarchical relationship between the devices and the ports of the devices in the FlexE network is redefined, the clock loop phenomenon is broken, the normal clock configuration and time configuration of the FlexE network are maintained, and the robustness of the system clock configuration and time configuration is improved.
[0076] In this embodiment, when clock message detection and time message detection are enabled at the same time, clock configuration and time configuration are performed on the FlexE port in each Ethernet port group configured on the local device according to the clock synchronization message and time synchronization message detected from the received FlexE overhead frame.
[0077] In one embodiment, the method for configuring synchronization information may further include:
[0078] S130: In response to receiving a detection closing instruction for a predetermined synchronization message, closing detection of a predetermined synchronization message for a received Ethernet overhead frame.
[0079] S140: If the local device has enabled the detection of the scheduled synchronization message, the configured synchronization information corresponding to the scheduled synchronization message is deleted.
[0080] S150: If the local device has manually configured synchronization information, the manually configured synchronization information is retained.
[0081] In this embodiment, when a detection closing instruction for a predetermined synchronization message is received, the predetermined synchronization message is no longer detected from the received Ethernet overhead frame, and the configured synchronization information corresponding to the predetermined synchronization message is deleted. After the configured synchronization information is deleted, when the detection of the predetermined synchronization message from the received Ethernet overhead frame is enabled again, new synchronization information corresponding to the predetermined synchronization message is generated according to the predetermined synchronization message detected again, and the Ethernet port of the local device is configured according to the new synchronization information corresponding to the predetermined synchronization message.
[0082] In addition, the priority of the synchronization information manually configured on the local port can be higher than the priority of the automatically configured synchronization information. Deleting the configured synchronization information corresponding to the predetermined synchronization message and retaining the manually configured synchronization information can ensure that the local device performs time synchronization and / or clock synchronization normally.
[0083] In order to better understand the present invention, the following Figure 5-7 , describing a method for configuring synchronization information according to an exemplary embodiment of the present invention, it should be noted that these embodiments are not intended to limit the scope of the present invention. For ease of description, in the following embodiments, the peer device may be referred to as device A, and the local device may be referred to as device B. And the peer device and the local device in the present invention are network devices that support FlexE ports, such as router devices or switch devices that support FlexE ports.
[0084] like Figure 5 FIG. 2 is a flow chart showing a method for configuring synchronization information according to another embodiment. Figure 5 As shown, the synchronization information configuration method may include the following steps.
[0085] S501, device A synchronizes the clock of the instrument through the Ethernet port.
[0086] In this step, device A is connected to the clock source instrument through an Ethernet port, the SSM algorithm is enabled, the Ethernet clock extraction is configured, and the clock of the synchronization clock source of device A is determined.
[0087] S502: Device A sends an ESMC message to device B through the FlexE port.
[0088] In this step, device A and device B are connected using a FlexE link and a FlexE Group is configured to ensure that the two sides can discover each other's neighbors.
[0089] S503, determine whether device B has enabled clock message detection. If enabled, execute S504; if not, end this process.
[0090] In this step, device B can receive the ESMC message sent by device A, but if it does not identify the message, it will directly discard it. If device B has enabled clock message detection, device B will analyze the ESMC message obtained from the FlexE overhead and identify that the message type is 0x88090A, then device B will perform FlexE clock extraction configuration.
[0091] S504: Whether an ESMC message is detected. If an ESMC message is detected, execute S505; if no ESMC message is detected, execute S507.
[0092] S505, compare the clock source physical address (Media Access Control Address, MAC Address) and the MAC address of device B to see if they are consistent. If not, execute S506; if consistent, execute S507.
[0093] In this step, the MAC address in the message is used to confirm the location of the network device, which can be called an Ethernet address or a hardware address. Get the MAC address of the clock source node in the ESMC message, and compare this MAC address with the MAC address of the current device. If the MAC addresses are different, proceed to the next step. If the MAC addresses are the same, do not configure FlexE clock extraction.
[0094] S506: Device B configures FlexE-based clock synchronization, and this process ends.
[0095] S507: Device B does not configure FlexE-based clock synchronization, and this process ends.
[0096] In the above step 506, when configuring FlexE-based clock synchronization, device B can indicate, according to the FlexE Group ID of the current port, the FlexE port in which Ethernet port group the clock is to be configured, and when setting the priority of the clock configuration information, it can first detect whether there is other clock configuration information for the current device. If not, the configuration starts directly from priority 1. If other clock configuration information exists, the clock configuration starts from the next priority of the configured clock extraction priority.
[0097] In this embodiment, device A and device B are connected through a FlexE port, wherein device A synchronizes the clock of the instrument through the Ethernet port and enables the SSM algorithm to determine the quality level of the clock source. Device A can send ESMC messages containing the clock source quality level on all ports. Device B automatically configures clock synchronization based on the detected ESMC messages containing the clock source quality level, thereby simplifying the configuration steps of the customer's clock synchronization.
[0098] like Figure 6 FIG. 2 is a flow chart showing a method for configuring synchronization information according to another embodiment. Figure 6 As shown, the synchronization information configuration method may include the following steps.
[0099] S601: Device A synchronizes instrument time and configures the FlexE PTP port.
[0100] In this step, FlexE PTP port refers to the FlexE port that performs time synchronization based on the PTP protocol. Device A can synchronize the time of the clock source. Device A and device B are connected using a FlexE link. FlexE Group is configured to ensure that both sides can discover each other's neighbors.
[0101] S602: Device A sends a PTP message to device B through the FlexE port.
[0102] S603, determine whether the local device has enabled time message detection. If enabled, execute S604; if not, end this process.
[0103] S604: Whether a PTP message is detected. If a PTP message is detected, execute S605; if no PTP message is detected, execute S607.
[0104] In the above steps, device A configures the PTP port of the FlexE Group and enables it. Device A sends PTP messages through the overhead of the FlexE port. Device B can receive the PTP messages sent by device A, but does not identify the messages and directly discards them. After device B enables clock message detection, it analyzes the PTP messages obtained from the FlexE overhead and identifies that the message type is 0x88f7. Then device B performs subsequent FlexE PTP configuration.
[0105] S605: Device B configures time synchronization based on the FlexE port.
[0106] In the above steps, when configuring time synchronization based on FlexE ports, the FlexE Group ID indicates the FlexE port in which Ethernet port group the time configuration is performed. When configuring the FlexE ports in the current FlexE Group, first check whether there are other PTP port configurations in the FlexE Group of the current device. If not, start configuring from the FlexE port number PortNum equal to 2; if so, start configuring from the next PortNum of the largest PortNum.
[0107] S606: Device B configures time synchronization of the remaining FlexE ports.
[0108] In this step, all FlexE Groups configured on device B are detected, and the respective FlexE PTP ports are configured in each FlexE Group in the order of FlexE Group IDs. The configuration process is referred to in S605.
[0109] S607: Device B does not configure time synchronization, and the process ends.
[0110] In this example, device A and device B are connected through a FlexE port. Device A synchronizes the instrument time through the Ethernet port, configures the PTP function of the FlexE port, and sends a time synchronization message to device B. Device B enables the BMC algorithm and automatically performs time synchronization configuration based on the FlexE port, simplifying the configuration steps of customer time synchronization.
[0111] like Figure 7 A schematic diagram showing a flow chart of a method for configuring synchronization information according to another embodiment is shown. Figure 7 As shown, the synchronization information configuration method may include the following steps.
[0112] S701, device A synchronizes the instrument clock and time and configures the FlexE PTP port.
[0113] In this step, device A is connected to the time source instrument through an Ethernet port, the SSM and BMC algorithms are enabled, the Ethernet port clock extraction and PTP synchronization are configured, and the clock and time of the synchronization instrument of device A are determined. Device A and device B are connected using a FlexE link, and a FlexE Group is configured to ensure that both sides can discover each other's neighbors.
[0114] S702: Device A sends ESMC messages and PTP messages to device B through the FlexE port.
[0115] S703, determine whether device B has enabled both clock message detection and time message detection. If enabled, execute S704; if not, end this process.
[0116] S704: Check whether ESMC messages and PTP messages are detected. If ESMC messages and PTP messages are detected, execute S705; if ESMC messages and PTP messages are not detected, execute S708.
[0117] In one embodiment, device A sends ESMC and PTP messages through FlexE overhead. Device B can receive ESMC and PTP messages sent by device A, but does not identify the messages and directly discards them. Device B turns on clock message detection and time message detection at the same time. At this time, device B analyzes the ESMC and PTP messages obtained by FlexE overhead and identifies that the message types are 0x88090A and 0x88f7. Then device B configures the clock configuration information of the FlexE port and the time synchronization configuration information of the FlexE port based on PTP.
[0118] S705, compare the MAC address of the clock source with the MAC address of device B to see if they are consistent. If not, execute S706; if consistent, execute S708.
[0119] S706: Device B configures FlexE-based clock synchronization and time synchronization.
[0120] In step S706, device B configures FlexE-based clock synchronization and the above Figure 5 The steps for device B to configure FlexE-based clock synchronization in S506 are consistent, and the steps for device B to configure FlexE-based time synchronization are consistent with the steps for device B to configure FlexE port-based time synchronization in S605 in the above 6. You can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0121] S707: Device B configures time synchronization of the remaining FlexE ports.
[0122] Step S707 is the same as above Figure 6 In S606, the steps for device B to configure time synchronization of the remaining FlexE ports are the same, and reference may be made to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0123] In the above steps, the MAC address of the clock source node in the ESMC message is obtained, and this MAC address is compared with the MAC address of the current device. If the MAC addresses are different, device B is configured with FlexE-based clock synchronization; if the MAC addresses are the same, the time of the FlexE port is synchronized.
[0124] S708: Device B does not configure clock time synchronization.
[0125] In this step, not configuring clock and time synchronization means not performing clock and time synchronization configuration.
[0126] In the method for synchronizing configuration information in this embodiment, in the application scenario where device A and device B are connected through a FlexE port, device A synchronizes the clock and time of the instrument through the Ethernet port, and enables the ESMC and BMC algorithms. Device A will send ESMC messages through all ports, and the PTP message needs to configure the PTP function of the FlexE port. Router B automatically generates clock configuration information and PTP port configuration, which simplifies the configuration steps of customer time synchronization.
[0127] The following describes in detail a device for configuring synchronization information according to an embodiment of the present invention in conjunction with the accompanying drawings. Figure 8 FIG. 2 shows a schematic diagram of a configuration device for synchronization information according to an embodiment of the present invention. Figure 8 As shown, the configuration device of synchronization information may include the following modules.
[0128] The message detection start module 810 is used to start the detection of the predetermined synchronization message for the received Ethernet overhead frame in response to receiving the detection start instruction of the predetermined synchronization message.
[0129] The synchronization information configuration module 820 is used to generate synchronization information corresponding to the predetermined synchronization message according to the detected predetermined synchronization message, and configure the synchronization information to the Ethernet port of the local device.
[0130] In one embodiment, the message detection start module 810 is specifically used to start the detection of the predetermined synchronization message for the received Ethernet overhead frame in response to receiving a detection start instruction of the predetermined synchronization message when the local device allows the synchronization information configuration.
[0131] In one embodiment, the synchronization information configuration device may further include: an information reading module, used to read the values of a predetermined number of bits from the received Ethernet overhead frame; an instruction determination module, used to determine the received detection start instruction based on the values of two predetermined bits, wherein the detection start instruction includes clock message detection start, time message detection start, or clock message detection and time message detection are simultaneously turned on.
[0132] In one embodiment, the predetermined synchronization message is a clock synchronization message, and the synchronization information includes clock configuration information; the synchronization information configuration module 820 may specifically include: a first message acquisition unit, which is used to obtain the clock synchronization message in the Ethernet overhead frame when identifying the message type of the clock synchronization message from the received Ethernet overhead frame; the synchronization information configuration module 820 is also used to generate clock configuration information according to the clock synchronization message if the physical address of the clock source device carried in the clock synchronization message is different from the physical address of the local device, and configure the clock configuration information to the Ethernet port of the local device.
[0133] In one embodiment, the synchronization information configuration module 820 may also include: a clock configuration information acquisition unit, used to acquire the clock configuration information including the clock quality level carried in the clock synchronization message; a clock configured information detection unit, used to detect whether there is configured clock configuration information on the local device; a priority setting unit, used to set the priority of the generated clock configuration information according to the detection result and the clock quality level; a clock information configuration unit, used to configure the generated clock configuration information to the Ethernet port of the local device according to the set priority of the clock configuration information.
[0134] In one embodiment, the priority setting unit is further specifically used to: if there is no configured clock configuration information, set the priority of the generated clock configuration information according to the clock quality level; if there is configured clock configuration information, set the priority of the generated clock configuration information according to the clock quality level, and set the priority of the generated clock configuration information lower than the priority of the configured clock configuration information.
[0135] In one embodiment, the predetermined synchronization message is a time synchronization message, and the synchronization information includes time synchronization configuration information; then the synchronization information configuration module 820 may specifically include: a second message acquisition unit, used to obtain the detected time synchronization message when identifying the message type of the time synchronization message from the Ethernet overhead frame; a time synchronization configuration information generation unit, used to obtain each Ethernet port group of the local device in turn, and generate time synchronization configuration information for the port in each Ethernet port group based on the detected time synchronization message; a time information configuration unit, used to configure the time synchronization configuration information to the port in each Ethernet port group.
[0136] In one embodiment, the time synchronization configuration information generation unit is specifically used to extract time characteristic information from the time synchronization message, and compare the extracted time characteristic information with the time characteristic information of the Ethernet port of the local device; determine the status of the port in each Ethernet port group through the comparison result, the status of the port is a master port or a slave port, wherein the master port is used to publish synchronization time and the slave port is used to receive synchronization time; generate the time synchronization configuration information of the port in each Ethernet port group at least according to the status of the port.
[0137] In one embodiment, the time information configuration unit is further specifically used to detect whether there is a port in each Ethernet port group that has been configured with time synchronization configuration information; if there is no port that has been configured with time synchronization configuration information, the time synchronization configuration information is configured to the ports in each Ethernet port group in sequence starting from the second port in port order; if there is a port that has been configured with time synchronization configuration information, the time synchronization configuration information is configured to the ports in each Ethernet port group in sequence starting from a predetermined port in port order, wherein the predetermined port is the next port of the port that has been configured with time synchronization configuration information.
[0138] In one embodiment, the predetermined synchronization message is a clock synchronization message and a time synchronization message, and the synchronization information includes clock configuration information and time synchronization configuration information; the synchronization information configuration module 820 may specifically include the following units.
[0139] A third message acquisition unit, configured to acquire the clock synchronization message and the time synchronization message in the Ethernet overhead frame when identifying the message type of the clock synchronization message and the message type of the time synchronization message from the received Ethernet overhead frame;
[0140] The clock information configuration unit is further configured to generate clock configuration information according to the clock synchronization message if the physical address of the clock source device carried in the clock synchronization message is different from the physical address of the local device, and configure the clock configuration information to the Ethernet port of the local device;
[0141] The time information configuration unit is also used to obtain each Ethernet port group of the local device in turn if the physical address of the clock source device carried in the clock synchronization message is the same as the physical address of the local device, generate time synchronization configuration information of the ports in each Ethernet port group based on the detected time synchronization message, and configure the time synchronization configuration information to the ports in each Ethernet port group.
[0142] In one embodiment, the synchronization information configuration device may also include: a message detection shutdown module, which is used to respond to the receipt of a detection shutdown instruction for the predetermined synchronization message and shut down the detection of the predetermined synchronization message for the received Ethernet overhead frame; a synchronization information deletion unit, which is used to delete the configured synchronization information corresponding to the predetermined synchronization message if the local device has enabled the detection of the predetermined synchronization message; and a manual configuration retention unit, which is used to retain the manually configured synchronization information if the local device has manually configured synchronization information.
[0143] An embodiment of the present invention provides a configuration device for realizing automatic configuration of synchronization information of clock and / or time synchronization in a flexible Ethernet network, which can perform automatic synchronization configuration of clock and / or time based on a FlexE port, thereby simplifying the steps of the above-mentioned automatic synchronization configuration, avoiding asynchrony caused by manual configuration errors, and further enhancing the stability of the network.
[0144] It should be clear that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.
[0145] Fig. 9 is a structural diagram showing an exemplary hardware architecture of a computing device capable of implementing the configuration method and apparatus for synchronization information according to an embodiment of the present invention.
[0146] like Fig. 9 As shown, the computing device 900 includes an input device 901, an input interface 902, a central processing unit 903, a memory 904, an output interface 905, and an output device 906. The input interface 902, the central processing unit 903, the memory 904, and the output interface 905 are connected to each other via a bus 910, and the input device 901 and the output device 906 are connected to the bus 910 via the input interface 902 and the output interface 905, respectively, and then connected to other components of the computing device 900.
[0147] Specifically, the input device 901 receives input information from the outside (for example, the FlexE port of the opposite device) and transmits the input information to the central processing unit 903 through the input interface 902; the central processing unit 903 processes the input information based on the computer executable instructions stored in the memory 904 to generate output information, temporarily or permanently stores the output information in the memory 904, and then transmits the output information to the output device 906 through the output interface 905; the output device 906 outputs the output information to the outside of the computing device 900 for user use.
[0148] In one embodiment, Fig. 9 The computing device 900 shown may be implemented as a network device, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the synchronization information configuration method described in the above embodiment.
[0149] According to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network, and / or installed from a removable storage medium.
[0150] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0151] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A method for configuring synchronization information, comprising: In response to receiving a detection start instruction of a predetermined synchronization message, starting detection of the predetermined synchronization message for the received Ethernet overhead frame, wherein the detection start instruction includes turning on clock message detection, or turning on time message detection, or turning on both clock message detection and time message detection; According to the detected predetermined synchronization message, synchronization information corresponding to the predetermined synchronization message is generated, and the synchronization information is configured to the Ethernet port of the local device.
2. The method according to claim 1, wherein: In response to receiving a detection start instruction of a predetermined synchronization message, starting detection of the predetermined synchronization message for the received Ethernet overhead frame includes: In the case where the local device allows synchronization information configuration, in response to receiving a detection start instruction for a predetermined synchronization message, detection of the predetermined synchronization message is started for the received Ethernet overhead frame.
3. The method according to claim 1, wherein: Before starting detection of the predetermined synchronization message for the received Ethernet overhead frame in response to receiving a detection start instruction of the predetermined synchronization message, the method further includes: Reading a predetermined number of bit values from a received Ethernet overhead frame; The received detection start instruction is determined according to the values of the predetermined number of bits.
4. The method according to claim 1, wherein: The predetermined synchronization message is a clock synchronization message, and the synchronization information includes clock configuration information; the generating synchronization information corresponding to the predetermined synchronization message according to the detected predetermined synchronization message, and configuring the synchronization information to the Ethernet port of the local device includes: When a message type of a clock synchronization message is identified from a received Ethernet overhead frame, obtaining the clock synchronization message in the Ethernet overhead frame; If the physical address of the clock source device carried in the clock synchronization message is different from the physical address of the local device, clock configuration information is generated according to the clock synchronization message, and the clock configuration information is configured to the Ethernet port of the local device.
5. The method according to claim 4, wherein: The generating clock configuration information according to the clock synchronization message, and configuring the clock configuration information to the Ethernet port of the local device, includes: Obtaining clock configuration information including a clock quality level carried in the clock synchronization message; Check whether the local device has configured clock configuration information; According to the detection result and the clock quality level, setting the priority of the generated clock configuration information; The generated clock configuration information is configured to the Ethernet port of the local device according to the set priority of the clock configuration information.
6. The method according to claim 5, wherein: The step of setting the priority of the generated clock configuration information according to the detection result and the clock quality level includes: If there is no configured clock configuration information, setting the priority of the generated clock configuration information according to the clock quality level; If there is configured clock configuration information, the priority of the generated clock configuration information is set according to the clock quality level, and the priority of the generated clock configuration information is set lower than the priority of the configured clock configuration information.
7. The method according to claim 1, wherein: The predetermined synchronization message is a time synchronization message, and the synchronization information includes time synchronization configuration information; the generating synchronization information corresponding to the predetermined synchronization message according to the detected predetermined synchronization message, and configuring the synchronization information to the Ethernet port of the local device includes: When a message type of a time synchronization message is identified from the Ethernet overhead frame, acquiring the detected time synchronization message; Obtain each Ethernet port group of the local device in turn, and generate time synchronization configuration information of the ports in each Ethernet port group according to the detected time synchronization message; The time synchronization configuration information is configured to the ports in each Ethernet port group.
8. The method according to claim 7, wherein: The step of generating the time synchronization configuration information of the ports in each Ethernet port group according to the detected time synchronization message includes: Extracting time characteristic information from the time synchronization message, and comparing the extracted time characteristic information with the time characteristic information of the Ethernet port of the local device; Determine the state of the port in each Ethernet port group through the comparison result, the state of the port is a master port or a slave port, wherein the master port is used to publish synchronization time, and the slave port is used to receive synchronization time; The time synchronization configuration information of the ports in each Ethernet port group is generated at least according to the status of the port.
9. The method according to claim 7, wherein: The configuring the time synchronization configuration information to the ports in each Ethernet port group includes: Detecting whether there is a port configured with time synchronization configuration information in each Ethernet port group; If there is no port configured with the time synchronization configuration information, configuring the time synchronization configuration information to the ports in each Ethernet port group in sequence starting from the second port in the order of ports; If there is a port configured with time synchronization configuration information, the time synchronization configuration information is configured to the ports in each Ethernet port group in sequence starting from a predetermined port in port order, wherein the predetermined port is the next port of the port configured with time synchronization configuration information.
10. The method according to claim 1, wherein: The predetermined synchronization message is a clock synchronization message and a time synchronization message, and the synchronization information includes clock configuration information and time synchronization configuration information; the generating synchronization information corresponding to the predetermined synchronization message according to the detected predetermined synchronization message, and configuring the synchronization information to the Ethernet port of the local device includes: When identifying the message type of the clock synchronization message and the message type of the time synchronization message from the received Ethernet overhead frame, obtaining the clock synchronization message and the time synchronization message in the Ethernet overhead frame; If the physical address of the clock source device carried in the clock synchronization message is different from the physical address of the local device, generating clock configuration information according to the clock synchronization message, and configuring the clock configuration information to the Ethernet port of the local device; If the physical address of the clock source device carried in the clock synchronization message is the same as the physical address of the local device, obtain each Ethernet port group of the local device in turn, generate time synchronization configuration information for the ports in each Ethernet port group based on the detected time synchronization message, and configure the time synchronization configuration information to the ports in each Ethernet port group.
11. The method according to claim 1, further comprising: In response to receiving a detection closing instruction for a predetermined synchronization message, closing detection of the predetermined synchronization message for the received Ethernet overhead frame; If the local device has enabled detection of the predetermined synchronization message, deleting the configured synchronization information corresponding to the predetermined synchronization message; If the local device has manually configured synchronization information, the manually configured synchronization information is retained.
12. A device for configuring synchronization information, comprising: A message detection start module, used for starting detection of the predetermined synchronization message for the received Ethernet overhead frame in response to receiving a detection start instruction of the predetermined synchronization message, wherein the detection start instruction includes starting clock message detection, or starting time message detection, or starting clock message detection and time message detection at the same time; The synchronization information configuration module is used to generate synchronization information corresponding to the predetermined synchronization message according to the detected predetermined synchronization message, and configure the synchronization information to the Ethernet port of the local device.
13. A network device, characterized in that: including memory and processor; The memory is used to store executable program codes; The processor is used to read the executable program code stored in the memory to execute the synchronization information configuration method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, and when the instructions are executed on a computer, the computer is enabled to execute the method for configuring synchronization information according to any one of claims 1 to 11.
