WO2021217394A1 - 主备链路的切换方法和装置、电子设备、路由器、交换机 - Google Patents
主备链路的切换方法和装置、电子设备、路由器、交换机 Download PDFInfo
- Publication number
- WO2021217394A1 WO2021217394A1 PCT/CN2020/087389 CN2020087389W WO2021217394A1 WO 2021217394 A1 WO2021217394 A1 WO 2021217394A1 CN 2020087389 W CN2020087389 W CN 2020087389W WO 2021217394 A1 WO2021217394 A1 WO 2021217394A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- link
- frame
- backup
- attribute information
- overhead
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/22—Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
Definitions
- the present disclosure relates to the field of Internet technology, and in particular to a method and device for switching between active and standby links, electronic equipment, routers, switches, and storage media.
- Flexible Ethernet is an interface technology based on the decoupling of the MAC layer and the Physical Layer (PHY) of the Medium Access Control (MAC).
- the contradiction problem of the mismatch between the increase in the rate of the flexible Ethernet interface and the increase in the service traffic bandwidth can be solved by the way of active and standby protection of the business ring network.
- a protection link (standby link) is made for the data link (primary link) in the transmission channel, and the active and standby links constitute the ring network link protection , And set up an electronic switch between the main and standby links. If the main link fails, the main link can be switched to the backup link through an electronic switch, so that data can be transmitted based on the backup link.
- the inventor found at least the following problem: If the electronic switch is used to switch directly, it may cause the problem of link connection failure.
- the embodiments of the present disclosure provide a method and device for switching between active and standby links, electronic equipment, routers, switches, and storage media.
- the embodiments of the present disclosure provide a method for switching between active and standby links, and the method includes:
- the main link when the main link is normal, the main link is connected to the next link, and when the main link is abnormal, the main link is switched to the backup link, and the backup link is connected to the next link.
- the attribute information of the backup link and the attribute information of the main link are In the case of the same information, the main and backup links are switched, so that the next link is unaware, thereby realizing rapid recovery of data transmission.
- the attribute information of the overhead frame of the primary link and the attribute information of the overhead frame of the backup link are determined first, and then the overhead frame attribute information of the backup link is compared with the overhead frame of the primary link.
- the attribute information of the backup link is aligned with the attribute information of the overhead frame of the main link, the main and backup links are switched to achieve "lossless switching", and then to realize the switching process, Minimize the damage time of the main and backup link switching services, and realize the rapid recovery of data transmission.
- the method before the extracting the overhead frames in the primary link and the overhead frames in the backup link, the method further includes:
- the overhead frames of the primary and backup links are preset to obtain continuous overhead frame domain segments.
- the continuous overhead frame field segments are obtained in a preset manner, so as to avoid the problem that there may be data field segments between overhead frames, so as to achieve the reliability of subsequent alignment.
- the presetting of the overhead frames of the primary and backup links to obtain continuous overhead frame field segments includes:
- Configure continuous OH frames, PAD frames, and AM frames alternatively, configure continuous OH frames and AM frames.
- the method further includes:
- Time synchronization is performed on the active and standby links.
- the time of the primary and backup links may be the same or different.
- the same time is used as the basis. Therefore, in this embodiment, the primary and backup links Channels are time synchronized to improve the accuracy and reliability of the alignment of the attribute information of the overhead frame.
- aligning the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the primary link includes:
- the tag of the overhead frame of the main link can be generated, and the tag of the overhead frame of the backup link can be generated, and the time stamp sampling is performed based on the tag. For example, the time stamp sampling is performed at the position where the tag occurs to obtain the corresponding time stamp .
- time stamps of the primary and backup links are the same, it means that the attribute information of the overhead frames of the primary and backup links is aligned, and the primary and backup links can be switched directly; if the time stamps of the primary and backup links are different, It means that the attribute information of the overhead frame of the primary and backup links is not aligned, and the attribute information of the overhead frame of the primary and backup links is adjusted based on the time stamp of the primary and backup links, so that the adjusted overhead of the backup link
- the attribute information of the frame is the same as the attribute information of the overhead frame of the main link, and then the main link is switched. Specifically, alignment can be achieved by following the time stamp of the backup link to the time stamp of the primary link.
- the aligning the attribute information of the backup link with the attribute information of the primary link according to the time stamp of the primary link and the time stamp of the backup link includes:
- the OH frame information of the backup link is adjusted according to the difference value and the OH frame information of the primary link.
- the backup link is processed based on the difference value and the OH frame information to perform the main link follow-up process, so as to realize the rapid adjustment of the attribute information of the overhead frame of the backup link, thereby improving the efficiency of adjustment.
- the OH frame information includes OH frame count and OH multiframe count.
- the method further includes:
- the difference may be greater than one cycle or less than one cycle. If the difference is greater than one cycle, time compensation can be given priority to the difference. On the one hand, it can also improve the efficiency of adjustment; on the other hand, relative By making adjustments based on at least one cycle, it is also possible to save adjustment resources.
- the method further includes:
- the deviation prediction method is used to determine whether to bind the active and standby links to be bound, so as to avoid binding failure and return when the deviation is large, thereby saving resources and improving binding. Efficiency and success rate.
- the embodiments of the present disclosure also provide a device for switching between active and standby links, the device including:
- the extraction module is used to extract the overhead frames in the main link and the overhead frames in the backup link;
- the extraction module is also used to extract the attribute information in the overhead frame of the main link and the attribute information in the overhead frame of the backup link respectively, wherein the attribute information is used to characterize the occurrence of the overhead frame in the main and backup links. frequency;
- the switching module is used for aligning the attribute information of the backup link with the attribute information in the main link before switching between the main and backup links.
- the device further includes:
- the presetting module is used for presetting the overhead frames of the primary and backup links to obtain continuous overhead frame domain segments.
- the preset module is used to configure continuous OH frames, PAD frames, and AM frames; or, configure continuous OH frames and AM frames.
- the device further includes:
- the synchronization module is used for time synchronization of the main and backup links.
- the device further includes:
- the alignment module is used to collect the time stamp of the overhead frame of the primary link and the time stamp of the overhead frame of the backup link, according to the time stamp of the primary link and the time stamp of the backup link Align the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the primary link.
- the alignment module is configured to calculate the difference between the time stamp of the primary link and the time stamp of the backup link, and to collect the OH frame information and the time stamp of the overhead frame of the primary link respectively.
- the OH frame information of the backup link adjusts the OH frame information of the backup link according to the difference and the OH frame information of the main link.
- the OH frame information includes OH frame count and OH multiframe count.
- the alignment module is configured to perform time compensation on the overhead frame of the backup link according to the difference.
- the device further includes:
- the predictor module is used to predict the deviation between the attribute information of the overhead frame of the primary and backup links to be bound and the attribute information of the overhead frame of the primary and backup links.
- the embodiments of the present disclosure also provide an electronic device, including:
- At least one processor At least one processor
- a memory communicatively connected with the at least one processor; wherein,
- the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described in any of the above embodiments.
- the embodiments of the present disclosure also provide a router, including the device for switching between active and standby links as described in any of the above embodiments, or the electronic device as described in the above embodiments.
- the embodiments of the present disclosure also provide a switch, including the device for switching between active and standby links as described in any of the above embodiments, or the electronic device as described in the above embodiments.
- the embodiments of the present disclosure also provide a computer storage medium having computer instructions stored thereon, and the computer instructions are used to make the computer execute the method described in any of the above embodiments. .
- the embodiments of the present disclosure provide a method and device for switching between active and standby links, electronic equipment, routers, switches, and storage media, including: extracting overhead frames in the primary link and overhead frames in the standby link, respectively extracting The attribute information in the overhead frame of the primary link and the attribute information in the overhead frame of the backup link, where the attribute information is used to represent the number of times that the overhead frame appears in the primary and backup links, and the attribute information of the backup link is compared with the attribute information in the overhead frame of the backup link. After the attribute information in the main link is aligned, the main link is switched, and the attribute information of the overhead frame of the main link and the attribute information of the overhead frame of the backup link are determined first, and then the attribute information of the overhead frame of the backup link is determined.
- FIG. 1 is a schematic diagram of the basic structure of FlexE according to an embodiment of the disclosure
- FIG. 2 is a schematic structural diagram of FlexE Mux according to an embodiment of the disclosure.
- FIG. 3 is a schematic structural diagram of FlexE (FlexE DeMux) for demultiplexing according to an embodiment of the disclosure
- FIG. 4 is a schematic diagram of protection of active and standby links according to an embodiment of the disclosure.
- FIG. 5 is a schematic flowchart of a method for switching between active and standby links according to an embodiment of the disclosure
- FIG. 6 is a schematic diagram of the data structure of the main link in an embodiment of the disclosure.
- FIG. 7 is a schematic flowchart of a method for switching between active and standby links according to another embodiment of the present disclosure.
- FIG. 8 is a schematic diagram of mapping configuration information of a Client to a flexible Ethernet group according to an embodiment of the present disclosure
- FIG. 9 is a schematic diagram of the principle of presetting overhead frames in an embodiment of the present disclosure.
- FIG. 10 is a schematic flowchart of aligning the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the primary link according to an embodiment of the disclosure
- FIG. 11 is a schematic flowchart of aligning the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the primary link according to the time stamp of the primary link and the time stamp of the backup link according to an embodiment of the present disclosure
- FIG. 12 is a schematic diagram of the principle of alignment of attribute information of overhead frames of active and standby links according to an embodiment of the present disclosure
- FIG. 13 is a schematic diagram of the principle of switching between active and standby links according to an embodiment of the disclosure.
- FIG. 14 is a schematic flowchart of a method for switching between active and standby links according to another embodiment of the present disclosure
- FIG. 15 is a schematic diagram of the principle of deviation prediction according to an embodiment of the disclosure.
- FIG. 16 is a schematic diagram of an apparatus for switching between active and standby links according to an embodiment of the disclosure.
- FIG. 17 is a block diagram of an electronic device according to an embodiment of the disclosure.
- FIG. 18 is a schematic diagram of the interaction between a terminal and an external network based on a router according to an embodiment of the disclosure
- Fig. 19 is a schematic diagram of an application scenario of a switch according to an embodiment of the disclosure.
- Flex Ethernet is an interface technology based on the decoupling of the MAC layer and the physical PHY layer based on Medium Access Control (MAC).
- Figure 1 is a schematic diagram of the basic structure of FlexE.
- flexible Ethernet clients communicate through FlexE, that is, FlexE Clients can transmit data through FlexE.
- FlexE Clients are connected to a flexible Ethernet mezzanine (FlexE Shim), and a flexible Ethernet physical layer PHY is set between the FlexE Shims, and multiple PHYs are bound together to form a flexible Ethernet group (FlexE Group).
- FlexE is improved on the basis of Figure 1, and a multiplexed FlexE (FlexE Mux) is obtained.
- the structure of FlexE Mux can refer to Figure 2.
- one or more PHYs are bound together to form a FlexE Group on the basis of the FlexE in Figure 1; and a medium access control layer can be used as the FlexE Client layer.
- the Client comes from the MAC layer.
- the rate of the Client is adapted to the rate of the physical PHY through the addition and deletion of idle code blocks (Idle); the adjusted Client is mapped to the time slot of FlexE Shim, and then the Overhead Frame (also known as OH, or OH overhead frame). Finally, the data is distributed to multiple PHYs bound in a Group.
- FIG. 2 takes 100G bit Ethernet as an example for an exemplary description.
- the data code block stream consists of 66b code blocks with a period of 20 time slots (slot).
- the data block stream corresponds to 20 slots, and the bandwidth of each slot is about 5G.
- FlexE Shim can realize the three general capabilities of flexible Ethernet, namely bonding, sub-rate and channelization.
- the specific implementation mechanism is to construct a calendar with a size of 20*n 66b code blocks, where n is the number of bound PHYs, each 66b code block represents a 5G time slot, and 66b means to carry 2-bit synchronization
- every 20 66b code blocks can form a sub-calendar sub-Calendar, that is to say, a calendar with a size of 20*n can be regarded as composed of n sub-Calendars, and the client business corresponding to the client (such as The data to be transmitted) is stored in the code block of the sub-calendar.
- a sub-Calendar For each sub-Calendar, an OH frame is added every 20 slots to store the mapping relationship between the client and the time slot.
- the client in each sub-Calendar Services are transmitted in a single 100G Ethernet PHY.
- n sub-Calendars form a 20*n calendar, and the corresponding number of 66b code blocks is extracted from the corresponding number of 66b code blocks according to the client time slot mapping relationship stored in the overhead Customer business.
- FIG. 3 is a schematic diagram of the structure of FlexE (FlexE DeMux) for demultiplexing.
- FlexE Shim first extracts the OH frame, and controls the data alignment between multiple PHYs in the Group according to the boundary of the OH frame; then extracts the client information according to the time slot allocation, adds and deletes through Idle, and adapts the MAC layer. rate.
- FlexE uses OH frame lock to identify the data boundary, and OH frame lock is completed by checking the OH frame header information and the OH frame interval.
- OH frame header information includes synchronization header "01", control word type "0x4B” and data type "0x5".
- the OH frame interval is a fixed n code block. First identify the OH frame header information, and then check the OH frame interval and OH frame header information; if the OH frame header information is recognized twice in a row and the interval is correct, then the OH frame lock is normal.
- OH frame lock-out is a concept opposite to OH frame lock. After the OH frame is locked, the OH frame interval and OH frame header information are continuously checked. If an abnormality occurs in more than 5 consecutive OH frames, then the OH frame is locked.
- the main and backup protection of the business ring network (networking environment) is adopted.
- a protection link (backup link) FlexE Shim backup is made for the data link (main link) FlexE Shim main in the transmission channel, and the main and backup links constitute the ring network main and backup link protection . If the primary link fails, it can be quickly switched to the backup link to achieve rapid switching of the data link, thereby avoiding the above-mentioned problem of abnormal data transmission.
- the schematic diagram of the main and backup link protection can be seen in Figure 4.
- the switching between the main and standby links can be achieved by setting an electronic switch, and the switching between the main and standby links can be realized through the electronic switch.
- FIG. 5 is a schematic flowchart of a method for switching between active and standby links according to an embodiment of the present disclosure.
- the method includes:
- FIG. 6 is a schematic diagram of the data structure of the main link in an embodiment of the disclosure.
- the data code block stream is composed of 66b code blocks with a period of 20 slots, and the data code block stream corresponds to 20 slots, and the bandwidth of each slot is about 5G .
- the data on each FlexE PHY is aligned by periodically inserting the code blocks of the FlexE overhead frame. Assuming there are 1023 PHYs, specifically, every 1023x20 66b code blocks, one 66B overhead is inserted The code block FlexE overhead, and then there is a FlexE overhead before every 1023x20 66B code blocks; among them, the FlexE overhead is a FlexE OH frame.
- the overhead frame includes the OH frame for exemplary description.
- the overhead frame may also include continuously configured OH frames, padding (PAD) frames, and alignment markers (Alignment Markers). , AM frame).
- the overhead frame may also include continuously configured OH frames and alignment markers (Alignment Markers, AM frames).
- S102 Extract the attribute information in the overhead frame of the primary link and the attribute information in the overhead frame of the backup link respectively.
- the attribute information is used to represent the number of occurrences of overhead frames in the primary and backup links, that is, the attribute information in the overhead frames of the primary link is used to represent the number of occurrences of overhead frames in the primary link, and the overhead frames of the backup link.
- the attribute information in is used to characterize the number of occurrences of overhead frames in the backup link.
- the alignment characterizes that the attribute information in the standby link is consistent with the attribute information in the main link.
- the main link transmits data to the next link, and when the main link fails, it switches to the backup link, and because the next link and the main link There is a "seamless link" between the paths. If the attribute information of the main link and the attribute information of the backup link are not aligned, the attribute information of the backup link may be inconsistent with the attribute information of the main link, resulting in downloading A link and a backup link cannot be normally connected, which leads to the need to rebuild the next link, which reduces the efficiency of data transmission.
- the attribute information of the standby link is aligned with the attribute information of the main link, so that when the active and standby links are switched, the next link is unaware.
- a "seamless link" between the backup link and the next link is realized.
- switching from the main link to the backup link may be based on alignment markers (Alignment Markers, AM). That is, when the attribute information of the overhead frames of the primary and backup links is the same, the primary and backup links are switched based on the AM carried in the overhead frame.
- AM alignment Markers
- the overhead frames are seamlessly switched during the switching process of the primary and backup links, and the interval of the overhead frames remains unchanged. Therefore, after the handover, the FlexE Shim overhead frame is normal, and no link down occurs.
- "lossless switching" lossless in the status of the active and standby links
- FIG. 7 is a schematic flowchart of a method for switching between active and standby links according to another embodiment of the present disclosure
- the method may further include:
- S01 Presetting the overhead frames of the primary and backup links to obtain continuous overhead domain segments.
- the overhead frames of the active and standby links can be pre-set, so that the PHY exit of the active and standby links is Consecutive overhead frame field segments, and there will be no data field segments in the continuous overhead frame field segments, so as to ensure that the overhead frames output by FlexE are adjacent in time.
- a continuous OH frame, a PAD frame, and an AM frame are configured, or a continuous OH frame and an AM frame are configured, so as to obtain a continuous overhead field segment.
- the overhead frame field is used to characterize that no data frame is inserted between consecutively configured frames.
- FIG. 8 is a schematic diagram of mapping configuration information of a Client to a flexible Ethernet group in an embodiment of the disclosure.
- Calendar represents a chart of the corresponding relationship between slots and clients in the flexible Ethernet group
- Sub-calendar represents a chart of the corresponding relationship between slots of a certain 100Gbit Ethernet PHY and the client in the flexible Ethernet group.
- 2 slots can be allocated to carry the data of the 10G Client; for a 25G Client, 5 slots can be allocated to carry the data of the 25G Client.
- the configuration information of the Client is obtained through the entrance of the PHY, and the correspondence between the Client (Client 0 to Client n as shown in Figure 8) and the slot is mapped to the calendar calendar; the correspondence between the Client and the slot
- OH frames, PAD frames (if there are PAD frames) and AM frames are continuously inserted at the exit of the PHY. That is, in some embodiments, OH frames, PAD frames, and AM frames can be continuously inserted at the exit of the PHY; in other embodiments, OH frames and AM frames can be continuously inserted at the exit of the PHY.
- the PHY export can be a continuous overhead frame field segment with no data field segment in the middle, so as to ensure the output of the FlexE interface Overhead frames are adjacent in time.
- the overhead frame can include OH frames, OH frames, PAD frames, and AM frames, and can also include OH frames and AM frames. In any of the three cases, it can be based on the backup link.
- the OH frame and the OH frame of the main link realize the alignment of the main and standby links, and the specific alignment method will be described in detail later.
- the main link can be realized based on the OH frame of the backup link and the OH frame of the primary link.
- the general alignment of the backup link is then implemented based on the AM frame of the primary link and the AM frame of the backup link to achieve precise alignment. The specific alignment method will be described in detail later.
- the method before S101, the method further includes:
- time synchronization is performed on the primary and backup links, so that when the attribute information of the subsequent overhead frames are aligned, it is performed on the same time basis, so as to improve the accuracy and reliability of the alignment of the attribute information of the overhead frames.
- FIG. 10 is a schematic flow diagram of aligning the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the main link according to an embodiment of the present disclosure
- S21 Collect the time stamp of the overhead frame of the primary link, and collect the time stamp of the overhead frame of the backup link.
- the time stamp is used to characterize the time of the overhead frame. That is, in this step, the time of the overhead frame of the primary link is determined, and the time of the overhead frame of the backup link is determined.
- time synchronization can be performed on the primary and backup links.
- the time stamps of the overhead frames of the primary and backup links can be collected on the basis of the time synchronization of the primary and backup links. Therefore, it can be ensured that the time stamps of the primary and backup links are collected based on the same time and avoid time stamps.
- the sampling deviation is stamped, so as to improve the accuracy and reliability of the alignment of the attribute information of the overhead frames of the subsequent active and standby links.
- marking processing may be performed on the overhead frame so as to perform time stamp sampling based on the marking. That is, when collecting the time stamps of the active and standby links, it is implemented based on the marking of the active and standby links.
- S22 Align the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the primary link according to the time stamp of the primary link and the time stamp of the backup link.
- the time stamps of the primary and backup links should be the same, and "lossless handover" can be realized when the primary and backup links are switched.
- the time stamps of the active and standby links are different, it means that the attribute information of the overhead of the active and standby links is in a non-aligned state. If the active and standby links are switched at this time, it may cause FlexE Shim down.
- Link attribute information is aligned; if the time stamps of the primary and backup links are not the same, the time of the overhead frame of the primary and backup links is different, because the time of the overhead frame of the primary and backup links is different, the attribute information of the primary and backup links They are not the same, so the attribute information of the active and standby links is not aligned.
- Figure 11 is a flow of aligning the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the primary link according to the time stamp of the primary link and the time stamp of the backup link in an embodiment of the present disclosure (Schematic diagram) It can be seen that, in some embodiments, S22 includes:
- S221 Calculate the difference between the time stamp of the primary link and the time stamp of the backup link.
- S222 Collect the attribute information of the overhead frame of the primary link and the attribute information of the overhead frame of the backup link respectively.
- S223 Adjust the attribute information of the overhead frame of the backup link according to the difference value and the attribute information of the overhead frame of the primary link.
- the attribute information of the overhead frame of the backup link is adjusted so that the attribute information of the overhead frame of the backup link is adjusted.
- the information is adjusted to be the same as the attribute information of the overhead frame of the primary link, that is, the alignment of the attribute information of the overhead frame of the primary and backup link is realized by the way that the backup link follows the primary link.
- OH frame, PAD frame and AM frame Take the overhead frames including OH frame, PAD frame and AM frame as an example. After OH frame, PAD frame and AM frame appear once, OH frame, PAD frame and AM frame appear again for the first time, then OH frame, PAD frame and AM frame appear in the previous time.
- the time length between the AM frame and the reappearance of the OH frame, PAD frame, and AM frame is one cycle. That is, one cycle is the length of time between two adjacent marks. If the difference is greater than one period, the difference can be compensated for the period first, so as to reduce the resources for subsequent alignment and improve the efficiency of alignment.
- the cycle time is 8581965414ns.
- FIG. 12 is now combined with FIG. ) The method for aligning the attribute information of the overhead frames of the primary and backup links in the embodiments of the present disclosure is described in detail.
- the time stamp of the overhead frame of the primary link is sampled to obtain the time stamp TS_M; the time stamp of the overhead frame of the backup link is sampled to obtain the time stamp TS_S.
- the GAP is compensated first, and the specific compensation value is determined based on the relationship between the GAP and a period. As mentioned in the above example, if the GAP is greater than one cycle and less than two cycles, then one cycle is compensated; if the GAP is greater than one cycle and less than three cycles, then two cycles are compensated, and so on.
- the attribute information of the overhead frame is the attribute information of the OH frame.
- the attribute information of the OH frame includes OH count and OH multiframe count, and multiple OH frames form an OH multiframe.
- the OH frame count is used to characterize the number of occurrences of the OH frame
- the OH multiframe count is used to characterize the number of occurrences of the OH multiframe.
- the attribute information of the OH frame of the main link is sampled to obtain the OH frame count and the OH multiframe count of the main link.
- the main link collects the attribute information of the OH frame at position "a", the OH frame count is 27, and the OH multiframe count is 4.
- the attribute information of the OH frame of the backup link is sampled to obtain the OH frame count and the OH multiframe count of the backup link.
- the backup link collects the attribute information of the OH frame at the "1" position, the OH frame count is 22, and the OH multiframe count is 4.
- the OH frame count of the backup link is 27, the OH frame count of the backup link is 22, and the difference between the OH frame count of the main link and the OH frame count of the backup link is 5, it can be determined that the OH frame count of the backup link corresponds to If the compensation value is 5, the OH frame count of the backup link can be set to 28 when the next OH frame of the backup link starts. Among them, the OH multiframe count compensation value of the backup link is 0, that is, no adjustment is required.
- the position of the backup link OH frame "2" can be delayed by the GAP to the position "3".
- the OH frame count is assigned the initial value of 28
- the OH multiframe count is assigned the initial value of 4.
- the attribute information of the OH frame of the primary and backup links is aligned, and the quick adjustment is completed. After the quick adjustment is completed, you can see the alignment of the attribute information of the OH frame of the active and standby links at position "4", and the alignment effect can be checked through the sampling time stamp of the active and standby links.
- the time stamp of the primary link is between the time stamps of the backup link, when the time stamp of the backup link is the same as the time stamp of the primary link, the time stamp of the primary link The link is switched; if the time stamp of the backup link is before the time stamp of the primary link, the primary and backup links can be switched after the difference is delayed.
- the attribute information of the overhead frame includes the attribute information of the OH frame and the attribute information of the AM frame.
- the attribute information of the OH frame includes OH count and OH multiframe count, and multiple OH frames form an OH multiframe, and the OH frame count is used to characterize the number of times the OH frame appears, and the OH multiframe count is used to characterize the OH multiframe.
- the number of occurrences; the attribute information of the AM frame is used to characterize the alignment flag of the overhead frame, and indicates the boundary information of the overhead frame.
- aligning the overhead frame of the backup link with the overhead frame of the primary link may specifically include:
- the alignment method can be referred to the above example, which will not be repeated here; after that, the attribute information of the AM frame of the backup link is compared with that of the main link.
- the attribute information of the AM frame of the road is aligned, and is determined relative to the switching position of the main and standby links.
- FIG. 13 is a schematic diagram of the principle of switching between the main and backup links in the embodiment of the disclosure. The switching principle is explained in detail.
- the main link includes: inserting OH frames, PAD frames, and AM frames (in some embodiments, the insertion may be OH frames and AM frames), generating markers for adjacent overhead frames, and proceeding based on the markers
- the time stamp is sampled, and the attribute information of the OH frame is collected, and the boundary information of the main link overhead frame is determined according to the time stamp and the attribute information of the OH frame.
- the backup link includes: inserting OH frames, PAD frames, and AM frames (in some embodiments, the insertion may be OH frames and AM frames), generating a marker for the overhead frame, performing time stamp sampling based on the marker, and collecting The attribute information of the OH frame determines the boundary information of the overhead frame according to the AM frame.
- time synchronization is performed before time stamp sampling is performed on the primary and backup links, so that time stamp sampling is performed on the same time basis to ensure the comparability between the time stamps of the primary and backup links, and then Realize the reliability and accuracy of subsequent alignment.
- the time stamps of the backup link and the attribute information of the OH frame are respectively compared with the time stamps of the primary link based on the alignment method as in the above example. Align with the attribute information of the OH frame. And after alignment, the main and backup links are switched based on the boundary information of the main and backup links.
- the method includes:
- S104 Perform a deviation prediction between the attribute information of the overhead frame of the primary and backup links to be bound and the attribute information of the overhead frame of the primary and backup links.
- the active and standby links can be dynamically bound on the basis of the FlexE Group, that is, new active and standby links are added on the basis of the original active and standby links of the FlexE Group.
- the attribute information of the overhead frame of the primary and backup links to be bound may be prioritized to perform a skew prediction amount with the attribute information of the overhead frame of the original primary and backup link, for example, the result of the offset prediction amount meets a preset It is required that if the deviation is less than the preset threshold, the active and standby links to be bound can be bound to the FlexE Group.
- FIG. 15 is a schematic diagram of the principle of the deviation prediction of the embodiment of the disclosure.
- the FlexE Group A of the main link is bound to two PHYs, namely PHY1 and PHY2.
- the FlexE Group B of the backup link is bound to two PHYs, namely PHY3 and PHY4.
- the FlexE Group B is aligned to the FlexE Group A through the attribute information of the overhead frame.
- the deviation of the attribute information of the overhead frame is sampled on the receiving side of the FlexE Shim remote end (remote end) in order to evaluate the skew of PHY3 relative to PHY1, and the skew of PHY4 relative to PHY2.
- the embodiments of the present disclosure provide an apparatus for switching between active and standby links.
- FIG. 16 is a schematic diagram of an apparatus for switching between active and standby links according to an embodiment of the present disclosure.
- the device includes:
- the extraction module 10 is used to extract overhead frames in the main link and overhead frames in the backup link;
- the extraction module 10 is also used to extract attribute information in the overhead frame of the primary link and attribute information in the overhead frame of the backup link, respectively, where the attribute information is used to represent the occurrence of the overhead frame in the primary and backup links. The number of times;
- the switching module 20 is configured to switch between the main link and the main link after aligning the attribute information of the backup link with the attribute information in the main link.
- the device further includes:
- the presetting module 30 is used for presetting the overhead of the active and standby links to obtain continuous overhead domain segments.
- the preset module 30 is used to configure continuous OH frames, PAD frames, and AM frames; or, configure continuous OH frames and AM frames.
- the device further includes:
- the synchronization module 40 is configured to perform time synchronization on the main and backup links.
- the device further includes:
- the alignment module 50 is configured to collect the time stamp of the overhead frame of the primary link, and collect the time stamp of the overhead frame of the backup link, according to the time stamp of the primary link and the time stamp of the backup link. Stamp to align the attribute information of the overhead frame of the backup link with the attribute information of the overhead frame of the primary link.
- the alignment module 50 is configured to calculate the difference between the time stamp of the primary link and the time stamp of the backup link, and collect the OH frame information of the primary link and the The OH frame information of the backup link adjusts the OH frame information of the backup link according to the difference and the OH frame information of the main link.
- the OH frame information includes OH frame count and OH multiframe count.
- the alignment module 50 is configured to perform time compensation on the overhead frame of the backup link according to the difference.
- the device further includes:
- the predictor module 60 is used to predict the deviation between the attribute information of the overhead frame of the primary and backup links to be bound and the attribute information of the overhead frame of the primary and backup links.
- the embodiments of the present disclosure also provide an electronic device and a computer storage medium.
- FIG. 17 is a block diagram of an electronic device according to an embodiment of the disclosure.
- the electronic device is intended to mean various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
- the electronic device includes: one or more processors 101, a memory 102, and interfaces for connecting various components, including a high-speed interface and a low-speed interface.
- the various components are connected to each other using different buses, and can be installed on a common motherboard or installed in other ways as needed.
- the processor may process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to an interface).
- an external input/output device such as a display device coupled to an interface.
- multiple processors and/or multiple buses can be used with multiple memories and multiple memories.
- multiple electronic devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
- a processor 101 is taken as an example.
- the memory 102 is the computer storage medium provided by this disclosure.
- the memory stores instructions executable by at least one processor, so that the at least one processor executes the method for switching between active and standby links provided by the present disclosure.
- the computer storage medium of the present disclosure stores computer instructions, and the computer instructions are used to make the computer execute the method for switching between the main and standby links provided by the present disclosure.
- the memory 102 can be used to store non-transitory software programs, non-transitory computer executable programs, and modules.
- the processor 101 executes various functional applications and data processing of the server by running non-transitory software programs, instructions, and modules stored in the memory 102, that is, implements the method for switching between the main and standby links in the foregoing method embodiment.
- the memory 102 may include a program storage area and a data storage area.
- the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the electronic device, and the like.
- the memory 102 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
- the memory 102 may optionally include a memory remotely provided with respect to the processor 101, and these remote memories may be connected to an electronic device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, blockchain networks, mobile communication networks, and combinations thereof.
- the electronic device may further include: an input device 103 and an output device 104.
- the processor 101, the memory 102, the input device 103, and the output device 104 may be connected by a bus or in other ways. In FIG. 17, the connection by a bus is taken as an example.
- a computing program also called a program, software, software application, or code
- machine-readable medium and “computer-readable medium” refer to any computer program product, device, and/or device used to provide machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memory, programmable logic devices (PLD)), including machine-readable media that receive machine instructions as machine-readable signals.
- machine-readable signal refers to any signal used to provide machine instructions and/or data to a programmable processor.
- the embodiments of the present disclosure also provide a router.
- the router includes the device for switching between active and standby links as described in any of the above embodiments, or the electronic device as described in the above embodiments. .
- FIG. 18 is a schematic diagram of the interaction between the terminal 100 and the external network 300 based on the router 200 according to an embodiment of the present disclosure.
- the method for switching between active and standby links in the embodiment of the present disclosure may be applicable to the application scenario shown in FIG. 18.
- a communication link is established between the terminal 100 and the router 200, and a communication link is established between the router 200 and the external network 300.
- the external network 300 transmits data to the terminal 100 through the router 200.
- the terminal 100 The data is transmitted to the external network 300 through the router 200.
- the router 200 includes a main link and a backup link.
- the main link fails, the data input from the external network 300 can be transmitted to the terminal 100 through the backup link, and the terminal 100 can also be input through the backup link.
- the data is transmitted to the external network 300. In this way, the reliability and timeliness of data transmission between the external network 300 and the terminal 100 is achieved.
- the embodiments of the present disclosure also provide a switch, which includes the device for switching between active and standby links as described in any of the above embodiments, or the electronic device as described in the above embodiments .
- FIG. 19 is a schematic diagram of an application scenario of a switch according to an embodiment of the disclosure.
- the network camera 400, the network single dome 500, the network camera 600 and the network dome 700 are respectively connected to the switch 900, and the switch 900 is connected to the display 1000 through the network hard disk video recorder 800, so that the display 1000 can communicate with the network camera 400 and the network
- the data transmitted by one or more of the single ball 500, the web camera 600, and the web ball machine 700 are displayed.
- the method for switching between active and standby links in the embodiment of the present disclosure may be applicable to the application scenario shown in FIG. 19.
- the network camera 400 is taken as an example to explain as follows:
- the network camera 400 is connected to the switch 900 and transmits the collected camera data to the switch 900.
- the switch transmits the received camera data to the network hard disk video recorder 800, so that the network hard disk video recorder 800 can adaptively process the camera data before transmitting to
- the display 1000 displays the processed imaging data.
- the switch 900 includes a main link and a backup link.
- the main link fails, the camera data input by the network camera 400 can be transmitted to the network hard disk video recorder 800 through the backup link, so as to realize the reliable transmission of the camera data.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Telephonic Communication Services (AREA)
Abstract
本公开实施例提供了一种主备链路的切换方法和装置、电子设备、路由器、交换机和存储介质,包括:分别提取主链路中的开销帧,和备链路中的开销帧,分别提取主链路的开销帧中的属性信息,和备链路的开销帧中的属性信息,属性信息用于表征开销帧在主备链路中出现的次数,将备链路的属性信息与主链路中的属性信息对齐后,进行主备链路切换,通过先确定主链路的开销帧的属性信息和备链路开销帧的属性信息,再将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐,而当主备链路的开销帧的属性信息相同时,进行主备链路的切换,可实现"无损切换",进而实现在切换过程中,尽可能地降低主备链路切换造成的业务损伤时间,且实现数据传输的快速恢复。
Description
本公开涉及互联网技术领域,尤其涉及一种主备链路的切换方法和装置、电子设备、路由器、交换机和存储介质。
灵活以太网(Flex Ethernet,FlexE)是基于介质访问控制(Medium Access Control,MAC)MAC层与物理(Physical Layer,PHY)层解耦而实现的接口技术。
在相关技术中,可通过业务环网主备保护的方式解决灵活以太网接口速率增长和业务流量带宽增长不匹配的矛盾的问题。具体地,在业务环网主备保护的组网环境中,对传输通道中的数据链路(主链路)做一个保护链路(备链路),主备链路构成环网链路保护,且在主备链路之间设置一电子开关。如果主链路故障时,可以通过电子开关将主链路切换至备链路,以便基于备链路对数据进行传输。
然而,发明人在实现本发明的过程中,发现至少存在以下问题:若通过电子开关直接进行切换,可能导致链路连接失败的问题。
发明内容
本公开实施例提供了一种主备链路的切换方法和装置、电子设备、路由器、交换机和存储介质。
根据本公开实施例的一个方面,本公开实施例提供了一种主备链路的切换方法,所述方法包括:
提取主链路中的开销帧,和备链路中的开销帧;
分别提取主链路的开销帧中的属性信息,和备链路的开销帧中的属性信息,其中,属性信息用于表征开销帧在主备链路中出现的次数;
将所述备链路的属性信息与主链路中的属性信息对齐后,进行主备链路切换。
例如,在主链路正常的情况下,由主链路与下一条链路链接,而当主链路异常时,由主链路切换至备链路,由备链路与下一条链路链接,为了使得备链路与下一条链路之间“无缝链接”,且不影响下一条链路的正常运行,在本申请实施例中,在当备链路的属性信息与主链路的属性信息相同的情况下,进行主备链路的切换,使得下一条链路无感知,从而实现数据传输的快速恢复。
也就是说,在本公开实施例中,先确定主链路的开销帧的属性信息和备链路的开销帧的属性信息,再将备链路的开销帧属性信息与主链路的开销帧的属性信息对齐,使得备链路的开销帧的属性信息与主链路的开销帧的属性信息相同时,进行主备链路的切换,从而实现“无损切换”,进而实现在切换过程中,最大限度的降低主备链路切换业务损伤时间,且实现数据传输的快速恢复。
在一些实施例中,在所述提取主链路中的开销帧,和备链路中的开销帧之前,所 述方法还包括:
对所述主备链路的开销帧进行预置,得到连续的开销帧域段。
在本公开实施例中,采用预置的方式得到连续的开销帧域段,以避免开销帧之间可能存在数据域段的问题,从而实现后续对齐的可靠性。
在一些实施例中,所述对所述主备链路的开销帧进行预置,得到连续的开销帧域段包括:
配置连续的OH帧、PAD帧和AM帧;或者,配置连续的OH帧和AM帧。
在一些实施例中,所述方法还包括:
对所述主备链路进行时间同步。
值得说明的是,主备链路的时间可能相同,也可能不同,而为了后续在开销帧的属性信息对齐过程中,以相同的时间为基础,因此,在本实施例中,对主备链路进行时间同步,以提高开销帧的属性信息对齐的准确性和可靠性。
在一些实施例中,将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐包括:
采集所述主链路的开销帧的时戳,并采集所述备链路的开销帧的时戳;
根据所述主链路的时戳与所述备链路的时戳,将所述备链路的开销帧的属性信息与所述主链路的开销帧的属性信息对齐。
具体地,可生成主链路的开销帧的标记,且生成备链路的开销帧的标记,以标记为基础进行时戳采样,如在出现标记的位置进行时戳采样,得到相应的时戳。
值得说明地是,若主备链路的时戳相同,则说明主备链路的开销帧的属性信息为对齐状态,可直接进行主备链路切换;若主备链路的时戳不同,则说明主备链路的开销帧的属性信息为非对齐状态,则先基于主备链路的时戳将主备链路的开销帧的属性信息进行调整,使得调整后的备链路的开销帧的属性信息与主链路的开销帧的属性信息相同,再进行主备链路切换。具体可通过将备链路的时戳跟随至主链路的时戳,从而实现对齐。
在一些实施例中,所述根据所述主链路的时戳与所述备链路的时戳,将所述备链路的属性信息与所述主链路的属性信息对齐包括:
计算所述主链路的时戳与所述备链路的时戳的差值;
分别采集所述主链路的OH帧信息和所述备链路的OH帧信息;
根据所述差值和所述主链路的OH帧信息对所述备链路的OH帧信息进行调整。
在本公开实施例中,基于差值和OH帧信息对备链路进行主链路跟随的处理,以实现快速调整备链路的开销帧的属性信息,从而实现提高调整的效率。
在一些实施例中,所述OH帧信息包括OH帧计数和OH复帧计数。
在一些实施例中,在计算所述主链路的时戳与所述备链路的时戳的差值之后,所述方法还包括:
根据所述差值对所述备链路的开销帧进行时间补偿。
值得说明地是,差值可能大于一个周期,也可能小于一个周期,若差值大于一个周期,则可优先对差值进行时间补偿,一方面,也可以提高调整的效率;另一方面,相对于基于至少一个周期进行调整,还可以实现节约调整资源。
在一些实施例中,所述方法还包括:
对待绑定的主备链路的开销帧的属性信息与所述主备链路的开销帧的属性信息进行偏差预测量。
在本实施例中,通过偏差预测量的方式确定是否将待绑定的主备链路进行绑定,以避免当偏差较大时,导致绑定失败而退回,从而实现节约资源,提高绑定效率和成功率。
根据本公开实施例的另一个方面,本公开实施例还提供了一种主备链路的切换装置,所述装置包括:
提取模块,用于提取主链路中的开销帧,和备链路中的开销帧;
所述提取模块还用于,分别提取主链路的开销帧中的属性信息,和备链路的开销帧中的属性信息,其中,属性信息用于表征开销帧在主备链路中出现的次数;
切换模块,用于将所述备链路的属性信息与主链路中的属性信息对齐后,进行主备链路切换。
在一些实施例中,所述装置还包括:
预置模块,用于对所述主备链路的开销帧进行预置,得到连续的开销帧域段。
在一些实施例中,所述预置模块用于,配置连续的OH帧、PAD帧和AM帧;或者,配置连续的OH帧和AM帧。
在一些实施例中,所述装置还包括:
同步模块,用于对所述主备链路进行时间同步。
在一些实施例中,所述装置还包括:
对齐模块,用于采集所述主链路的开销帧的时戳,并采集所述备链路的开销帧的时戳,根据所述主链路的时戳与所述备链路的时戳,将所述备链路的开销帧的属性信息与所述主链路的开销帧的属性信息对齐。
在一些实施例中,所述对齐模块用于,计算所述主链路的时戳与所述备链路的时戳的差值,分别采集所述主链路的开销帧的OH帧信息和所述备链路的OH帧信息,根据所述差值和所述主链路的OH帧信息对所述备链路的OH帧信息进行调整。
在一些实施例中,所述OH帧信息包括OH帧计数和OH复帧计数。
在一些实施例中,所述对齐模块用于,根据所述差值对所述备链路的开销帧进行时间补偿。
在一些实施例中,所述装置还包括:
预测量模块,用于对待绑定的主备链路的开销帧的属性信息与所述主备链路的开销帧的属性信息进行偏差预测量。
根据本公开实施例的另一个方面,本公开实施例还提供了一种电子设备,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上任一实施例所述的方法。
根据本公开实施例的另一个方面,本公开实施例还提供了一种路由器,包括如上任一实施例所述的主备链路的切换装置,或者,如上实施例所述的电子设备。
根据本公开实施例的另一个方面,本公开实施例还提供了一种交换机,包括如上任一实施例所述的主备链路的切换装置,或者,如上实施例所述的电子设备。
根据本公开实施例的另一个方面,本公开实施例还提供了一种计算机存储介质,其上存储有计算机指令,所述计算机指令用于使所述计算机执行如上任一实施例所述的方法。
本公开实施例提供了一种主备链路的切换方法和装置、电子设备、路由器、交换机和存储介质,包括:提取主链路中的开销帧,和备链路中的开销帧,分别提取主链路的开销帧中的属性信息,和备链路的开销帧中的属性信息,其中,属性信息用于表征开销帧在主备链路中出现的次数,将备链路的属性信息与主链路中的属性信息对齐后,进行主备链路切换,通过先确定主链路的开销帧的属性信息和备链路开销帧的属性信息,再将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐,使得备链路的开销帧的属性信息跟随主链路的开销帧的属性信息,以便当主备链路的开销帧的属性信息相同时,进行主备链路的切换,从而实现“无损切换”,进而实现在切换过程中,最大限度的降低主备链路切换业务损伤时间,且实现数据传输的快速恢复。
附图用于更好地理解本公开实施例,不构成对本公开的限定。其中,
图1为本公开实施例的FlexE的基本结构示意图;
图2为本公开实施例的FlexE Mux的结构示意图;
图3为本公开实施例的解复用的FlexE(FlexE DeMux)的结构示意图;
图4为本公开实施例的主备链路保护的示意图;
图5为本公开实施例的主备链路的切换方法的流程示意图;
图6为本公开实施例的主链路的数据结构示意图;
图7为本公开另一实施例的主备链路得切换方法的流程示意图;
图8为本公开实施例的Client的配置信息映射至灵活以太网组的原理图;
图9对本公开实施例的开销帧预置的原理示意图;
图10为本公开实施例的将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐的流程示意图;
图11为本公开实施例的根据主链路的时戳与备链路的时戳将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐的流程示意图;
图12为本公开实施例的主备链路的开销帧的属性信息对齐的原理示意图;
图13为本公开实施例的主备链路切换的原理示意图;
图14为本公开另一实施例的主备链路得切换方法的流程示意图;
图15为本公开实施例的偏差预测量的原理示意图;
图16为本公开实施例的主备链路的切换装置的示意图;
图17为本公开实施例的电子设备的框图;
图18为本公开实施例的基于路由器实现终端与外部网络的交互示意图;
图19为本公开实施例的交换机的应用场景的示意图。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
其中,灵活以太网(Flex Ethernet,FlexE)是基于介质访问控制(Medium Access Control,MAC)MAC层与物理PHY层解耦而实现的接口技术。
请参阅图1,图1为FlexE的基本结构示意图。
如图1所示,灵活以太网客户端(FlexE Clients)之间通过FlexE进行通信,即FlexE Clients可通过FlexE进行数据传输。且,FlexE Clients与灵活以太网夹层(FlexE Shim)连接,FlexE Shim之间设置有灵活以太网物理层PHY,多个PHY绑定在一起构成灵活以太网组(FlexE Group)。
为提高FlexE传输数据的效率,在图1的基础上对FlexE进行了改进,得到多路复用的FlexE(FlexE Mux)。其中,FlexE Mux的结构可参阅图2。
其中,在多路复用的FlexE中,是在图1FlexE的基础上,将一个或者多个PHY绑定在一起构成一个FlexE Group;且可以将一个介质访问控制层作为FlexE Client层。
如图2所示,Client来自MAC层,通过空闲码块(Idle)增删完成Client的速率适配到物理PHY的速率;调整之后的Client映射到FlexE Shim的时隙,之后***Overhead Frame(又称OH,或者OH开销帧)。最后,数据分发到多个绑定在一个Group的PHY。
其中,图2中是以100G比特以太网为例进行示范性的说明,其中,对于100G比特以太网的PHY来说,数据码块流由以20个时隙(slot)为周期的66b码块的构成,进而数据码块流对应20个slot,每个slot带宽约为5G。
其中,FlexE Shim可实现灵活以太网的三种通用能力,即绑定,子速率和通道化。其具体实现机制为构建一个大小为20*n个66b码块的日历Calendar,n为绑定的PHY的个数,每个66b码块代表一个5G的时隙,且66b是指携带2位同步头(sync header)和承载有8个字节的数据码块编码方式。其中,每20个66b码块可以构成一个子日历sub-Calendar,也就是说,大小为20*n的Calendar可视为由n个sub-Calendar组成,且可以将客户端对应的客户业务(如待传输的数据)存储至子日历的码块中,对于每个sub-Calendar,每20个slot添加一个OH帧,用来存储客户端与时隙的映射关系,每个sub-Calendar中的客户业务在单个100G的以太网PHY中传送。在解复用侧(可参阅图3),n个sub-Calendar组成一个大小为20*n的Calendar,根据开销中存储的客户端时隙映射关系从相应个数的66b码块中提取出对应的客户业务。
请参阅图3,图3为解复用的FlexE(FlexE DeMux)的结构示意图。
如图3所示,FlexE Shim首先提取OH帧,按照OH帧的边界控制Group内多PHY之间的数据对齐;之后按照时隙分配的情况抽取Client的信息,通过Idle增删,适配MAC层的速率。
其中,在数据传输过程中,FlexE通过OH帧锁定来识别数据边界,OH帧锁定通 过检查OH帧头信息和OH帧间隔完成。
OH帧头信息包括同步头“01”,控制字类型“0x4B”和数据类型“0x5”。OH帧间隔是固定的n码块。首先识别OH帧头信息,之后,检查OH帧间隔和OH帧头信息;连续两次OH帧头信息识别正常并且间隔正确,那么,OH帧锁定正常。
OH帧失锁为与OH帧锁定相对的概念,OH帧锁定之后,持续检查OH帧间隔和OH帧头信息,如果超过5个连续的OH帧发生异常,那么,OH帧失锁。
当OH帧失锁时,一方面,进行Client抽取时,输出到MAC的Client会断流,即数据无法正常传输;另一方面,OH帧失锁后,需要进行OH帧锁定,而对OH帧重新锁定的时间较长。
为了避免因OH帧失锁而造成的数据无法正常传输,对OH帧重新锁定时间较长的问题,采用业务环网主备保护(组网环境)的方式实现。
具体地,在组网环境中在传输通道中对数据链路(主链路)FlexE Shim main做一个保护链路(备链路)FlexE Shim backup,主备链路构成环网主备链路保护。如果主链路故障时,可以快速切换至备链路,实现数据链路快速切换,进而避免上述数据无法正常传输的问题。其中,主备链路保护的示意图可参阅图4。
且结合图4可知,主备链路之间的切换可通过设置一电子开关switch,通过该电子开关实现主备链路之间的切换。
然而,一方面,由于采用电子开关进行主备链路之间的切换,会使得FlexE Shim连接失败(FlexE Shim link down),且需要相应的软件响应物理链路异常,因此对软件依赖程度高,且恢复时间实时性差;另一方面,在FlexE Shim link down后需要重新建链,恢复时间长。
而本公开实施例为解决上述问题,采用了一种新的主备链路的切换方法。请参阅图5,图5为本公开实施例的主备链路的切换方法的流程示意图。
如图5所示,该方法包括:
S101:分别提取主链路的开销帧,和备链路的开销帧。
请参与图6,图6为本公开实施例的主链路的数据结构示意图。
如图6所示,对于100G比特以太网PHY来说,数据码块流由以20个slot为周期的66b码块的构成,进而数据码块流对应20个slot,每个slot带宽约为5G。FlexE的每条PHY上的数据,通过周期性***FlexE开销帧的码块来实现对齐,假设有1023条PHY,则具体来说是,每隔1023x20个66b的码块,***1个66B的开销码块FlexE overhead,进而每1023x20个66B的码块前具有一个FlexE overhead;其中,FlexE overhead为FlexE的OH帧。
值得说明地是,此处只是开销帧包括OH帧进行示范性地说明,在一些实施例中,开销帧还可以包括连续配置的OH帧、填充(Padding,PAD)帧和对齐标志字(Alignment Markers,AM帧)。在另一些实施例中,开销帧还可以包括连续配置的OH帧和对齐标志字(Alignment Markers,AM帧)。
S102:分别提取主链路的开销帧中的属性信息,和备链路的开销帧中的属性信息。
其中,属性信息用于表征开销帧在主备链路中出现的次数,即主链路的开销帧中的属性信息用于表征主链路中的开销帧出现的次数,备链路的开销帧中的属性信息用 于表征备链路中的开销帧出现的次数。
以OH帧为例,结合图6可知,在主链路中对OH帧周期性地***,因此,当第一次在主链路中***OH帧时,OH帧在主链路中的出现次数为1。
S103:将备链路的属性信息与主链路的属性信息对齐后,进行主备链路切换。
其中,对齐表征备链路中的属性信息与主链路中的属性信息一致。
在该步骤中,相当于将备链路的开销帧的属性信息跟随至主链路的开销帧的属性信息,以便通过备链路开销帧的属性信息跟随主链路开销帧的属性信息的方式实现两条链路的开销帧的属性信息的一致。从而实现当主链路故障时,将传输数据的主链路切换至备链路,以尽量保证FlexE Shim链路linkup正常,数据传输快速恢复。
值得说明地是,在主链路正常的情况下,由主链路将数据传输至下一条链路,而当主链路出现故障时,切换至备链路,而由于下一条链路与主链路之间为“无缝链接”,若在主链路的属性信息和备链路的属性信息没有对齐的情况下,可能由于备链路的属性信息与主链路的属性信息不一致,导致下一条链路与备链路之间无法正常链接,从而导致下一条链路需要重新构建,使得数据传输的效率降低。而通过本申请实施例中,在进行主备链路切换之前,先将备链路的属性信息与主链路的属性信息对齐,使得主备链路在切换时,下一条链路无感知,实现备链路与下一条链路之间的“无缝链接”。
在一些实施例中,可基于对齐标志字(Alignment Markers,AM)从主链路切换至备链路。即,在主备链路的开销帧的属性信息相同时,基于开销帧中携带的AM对主备链路进行切换。
在本公开实施例中,通过将主备链路的开销帧的属性信息对齐,以便在主备链路切换过程中,开销帧无缝切换,开销帧间隔不变。因此,使得切换之后FlexE Shim开销帧正常,不会出现link down的情况。且,通过上述方法,基于开销帧无缝切换,可以实现“无损切换”(主备链路状态无损),极大的降低了主备链路切换业务损伤时间。
结合图7(图7为本公开另一实施例的主备链路得切换方法的流程示意图)可知,在S101之前,该方法还可包括:
S01:对主备链路的开销帧进行预置,得到连续的开销域段。
也就是说,在本公开实施例中,为满足主备链路之间的“无损切换”,可优先对主备链路的开销帧进行预置,使得在主备链路的PHY的出口为连续的开销帧域段,连续的开销帧域段中不会有数据域段,以确保FlexE输出的开销帧的时间相邻。
具体地,配置连续的OH帧、PAD帧和AM帧,或者配置连续的OH帧和AM帧,以便得到连续的开销域段。其中,开销帧域段用于表征连续配置的各帧之间没有被***数据帧。
现结合图8和图9对本公开实施例的开销帧预置的原理进行详细阐述。
其中,图8为本公开实施例的Client的配置信息映射至灵活以太网组的原理图。
如图8所示,日历Calendar表示灵活以太网组中的slot与Client对应关系的图表,Sub-calendar表示灵活以太网组中的某一个100G比特以太网PHY的slot与Client的对应关系的图表。如图8所示,对于一个10G Client,可以分配2个slot承载该10G Client的数据;对于一个25G Client,可以分配5个slot承载来该25G Client 的数据。
如图9所示,通过PHY的入口获取Client的配置信息,并将Client(如图8中所示的Client 0至Client n)与slot的对应关系映射到日历calendar中;Client与slot的对应关系映射完成之后,在PHY的出口连续***OH帧,PAD帧(如果存在PAD帧)以及AM帧。也就是说,在一些实施例中,可在PHY的出口连续***OH帧、PAD帧和AM帧;在另一些实施例中,可在PHY的出口连续***OH帧和AM帧。而不管是连续***OH帧、PAD帧和AM帧,还是连续***OH帧和AM帧,均可使PHY出口是连续的开销帧域段,中间不会有数据域段,以确保FlexE接口输出的开销帧的时间相邻。
基于上述示例可知,开销帧可以包括OH帧,也可以包括OH帧、PAD帧和AM帧,还可以包括OH帧和AM帧,在该三种情况的任意情况下,都可以基于备链路的OH帧和主链路的OH帧实现主备链路的对齐,具体地对齐方法将在后文中进行详细阐述。
值得说明地是,如果是在开销帧包括OH帧、PAD帧和AM帧时,或者开销帧包括OH帧和AM帧时,可以先基于备链路的OH帧和主链路的OH帧实现主备链路的大体对齐,而后基于主链路的AM帧和备链路的AM帧实现精确对齐,具体地对齐方法后续将进行详细阐述。
在一些实施例中,在S101之前,该方法还包括:
S02:对主备链路进行时间同步。
在该步骤中,通过对主备链路进行时间同步,以便后续开销帧的属性信息对齐时,以相同时间为基础进行,以提高开销帧的属性信息对齐的准确性和可靠性。
结合图10(图10为本公开实施例的将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐的流程示意图)可知,S102包括:
S21:采集主链路的开销帧的时戳,并采集备链路的开销帧的时戳。
其中,所述时戳用于表征开销帧的时间。也就是说,在该步骤中,确定主链路的开销帧的时间,并确定备链路的开销帧的时间。
基于上述示例可知,在对进行开销帧的属性信息对齐之前,可对主备链路进行时间同步。在该步骤中,可在主备链路时间同步的基础上,对主备链路的开销帧的时戳进行采集,因此,可以确保主备链路的时戳采集基于相同的时间,避免时戳采样偏差,从而实现提高后续主备链路得开销帧的属性信息对齐的准确性和可靠性。
在一些实施例中,可对开销帧进行打标记处理,以便基于标记进行时戳采样。即,在采集主备链路的时戳时,基于主备链路的标记实现。
S22:根据主链路的时戳与备链路的时戳,将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐。
其中,若主备链路的开销帧的属性信息为对齐的状态,则主备链路的时戳应该相同,则在主备链路切换时,可以实现“无损切换”。然而,若主备链路的时戳不同,则说明主备链路的开销的属性信息处于非对齐的状态,若此时对主备链路进行切换,则可能导致FlexE Shim link down。因此,为了避免FlexE Shim link down,需要将主备链路的开销帧的属性信息进行对齐,而确定主备链路的开销帧的属性信息是否对齐,可基于主备链路的时戳实现。具体地,若主备链路的时戳相同,则主备链路的开 销帧的时间相同,由于主备链路的开销帧的时间相同,则主备链路的属性信息相同,因此主备链路的属性信息对齐;若主备链路的时戳不相同,则主备链路的开销帧的时间不同,由于主备链路的开销帧的时间不同,则主备链路的属性信息不相同,因此主备链路的属性信息没有对齐。
结合图11(图11为本公开实施例的根据主链路的时戳与备链路的时戳,将备链路的开销帧的属性信息与主链路的开销帧的属性信息对齐的流程示意图)可知,在一些实施例中,S22包括:
S221:计算主链路的时戳与备链路的时戳的差值。
在该步骤中,对主备链路的时戳的差值进行计算,具体地,差值=主链路的时戳-备链路的时戳。
S222:分别采集主链路的开销帧的属性信息和备链路的开销帧的属性信息。
S223:根据差值和主链路的开销帧的属性信息对备链路的开销帧的属性信息进行调整。
在该步骤中,在确定出差值,并确定出主链路的开销帧的属性信息的基础上,对备链路的开销帧的属性信息进行调整,以便将备链路的开销帧的属性信息调整至与主链路的开销帧的属性信息相同,即通过备链路跟随主链路的方式实现主备链路的开销帧的属性信息的对齐。
值得说明的是,差值可能大于一个周期,也可能小于一个周期。其中,对周期的解释如下:
以开销帧包括OH帧、PAD帧和AM帧为例,在出现一次OH帧、PAD帧和AM帧之后,首次再次出现OH帧、PAD帧和AM帧,则前一次出现OH帧、PAD帧和AM帧与再次出现OH帧、PAD帧和AM帧之间的时长即为一个周期。即,一个周期即为两个相邻标记之间的时长。若差值大于一个周期,则可优先对差值进行周期补偿,以便减少后续对齐的资源,提高对齐的效率。
例如,若差值大于一个周期而小于两个周期,则对开销帧进行一个周期的补偿;若差值大于一个周期而小于三个周期,则对开销帧进行两个周期的补偿,以此类推。如果为100G比特以太网PHY的相邻的开销帧的周期,则一个周期时间是8581965414ns。
为使更加深刻地理解本公开实施例的主备链路的开销帧的属性信息对齐,现结合图12(图12为本公开实施例的主备链路的开销帧的属性信息对齐的原理示意图)对本公开实施例的主备链路的开销帧的属性信息对齐的方法进行详细阐述。
对主链路的开销帧的时戳进行采样,得到时戳TS_M;对备链路的开销帧的时戳进行采样,得到时戳TS_S。
计算主备链路的时戳的差值GAP,GAP=TS_M-TS_S。
判断GAP是否大于开销帧的一个周期,若是,则先对GAP进行补偿,具体补偿的值基于GAP与一个周期的关系进行确定。如上述示例中所述,若GAP大于一个周期而小于两个周期,则补偿一个周期,若GAP大于一个周期而小于三个周期,则补偿两个周期,以此类推。
若开销帧包括OH帧,则开销帧的属性信息为OH帧的属性信息。其中,OH帧的属 性信息包括OH计数和OH复帧计数,且多个OH帧组成一个OH复帧。且OH帧计数用于表征OH帧出现的次数,OH复帧计数用于表征OH复帧出现的次数。
对主链路的OH帧的属性信息进行采样,得到主链路的OH帧计数和OH复帧计数。如图12所示,主链路在“a”位置采集OH帧的属性信息,OH帧计数是27,OH复帧计数是4。
同理,对备链路的OH帧的属性信息进行采样,得到备链路的OH帧计数和OH复帧计数。如图12所示,备链路在“1”位置采集OH帧的属性信息,OH帧计数是22,OH复帧计数是4。
由于主链路的OH帧计数为27,备链路的OH帧的计算为22,主链路的OH帧计数与备链路OH帧计数相差5,则可确定备链路的OH帧计数对应的补偿值为5,则可在备链路的下一个OH帧启动时,将备链路的OH帧计数赋值为28。其中,备链路的OH复帧计数补偿值是0,即无需调整。
具体地,可将备链路OH帧“2”位置延时GAP到达位置“3”,此时OH帧计数赋初值28,OH复帧计数赋初值是4。在位置“4”主备链路的OH帧的属性信息对齐,快速调整完成。快速调整完成之后,在位置“4”可以看到主备链路的OH帧的属性信息对齐,可以通过主备链路采样时戳检查对齐效果。
也就是说,在本申请实施例中,若主链路的时戳在备链路的时戳之间,则可以当备链路的时戳与主链路的时戳相同时,对主备链路进行切换;若备链路的时戳在主链路的时戳之前,则可以延迟差值之后,对主备链路进行切换。
在另一些实施例中,若开销帧包括OH帧、PAD帧和AM帧,或者开销帧包括OH帧和AM帧,则开销帧的属性信息包括OH帧的属性信息AM帧的属性信息。其中,OH帧的属性信息包括OH计数和OH复帧计数,且多个OH帧组成一个OH复帧,且OH帧计数用于表征OH帧出现的次数,OH复帧计数用于表征OH复帧出现的次数;AM帧的属性信息用于表征开销帧的对齐标志字,表示开销帧的边界信息。且将备链路的开销帧与主链路的开销帧对齐可具体包括:
将备链路的OH帧的属性信息与主链路的OH帧的属性信息对齐,对齐方法可以参见上述示例,此处不再赘述;之后,在备链路的AM帧的属性信息与主链路的AM帧的属性信息对齐,相对于对主备链路的切换的位置点进行确定。
为使更加清楚的理解本公开实施例的备链路的切换方法,现结合图13(图13为本公开实施例的主备链路切换的原理示意图)对本公开实施例的主备链路的切换原理进行详细阐述。
如图13所示,主链路包括:***OH帧、PAD帧和AM帧(在一些实施例中,***的可能为OH帧和AM帧),生成相邻的开销帧的标记,基于标记进行时戳采样,并采集OH帧的属性信息,根据时戳和OH帧的属性信息确定主链路开销帧的边界信息。
同理,备链路包括:***OH帧、PAD帧和AM帧(在一些实施例中,***的可能为OH帧和AM帧),生成开销帧的标记,基于标记进行时戳采样,并采集OH帧的属性信息,根据AM帧确定开销帧的边界信息。
且,如图13所示,在主备链路进行时戳采样之前进行时间同步,以便以相同的时间为基础进行时戳采样,以确保主备链路的时戳之间的可比性,进而实现后续对齐的 可靠性和准确性。
其中,基于上述方法分别确定出主备链路各自的时戳和OH帧的属性信息之后,基于如上述示例的对齐方式将备链路时戳和OH帧的属性信息分别与主链路时戳和OH帧的属性信息对齐。并在对齐后,基于主备链路的边界信息进行主备链路切换。
结合图14所示,在一些实施例中,该方法包括:
S104:对待绑定的主备链路的开销帧的属性信息与主备链路的开销帧的属性信息进行偏差预测量。
S105:判断预测量得到的偏差是否小于预设的偏差阈值,若是,则执行S106;若否,则执行S107。
S106:对待绑定的主备链路进行绑定。
S107:不对待绑定的主备链路进行绑定。
在本公开实施例中,可在FlexE Group的基础上动态绑定主备链路,即在FlexE Group的原有的主备链路的基础上增加新的主备链路。
具体地,可优先对待绑定的主备链路的开销帧的属性信息与原有的主备链路的开销帧的属性信息进行偏差(skew)预测量,如偏差预测量的结果满足预设要求,如偏差小于预设的阈值,则可将待绑定的主备链路绑定至FlexE Group中。
为使更加清楚地理解本公开实施例的偏差预测量的方案和效果,现结合图15(图15为本公开实施例的偏差预测量的原理示意图)对本公开实施例的偏差预测量进行详细阐述。
其中,主链路的FlexE Group A绑定两个PHY,分别为PHY1和PHY2。备链路的FlexE Group B绑定两个PHY,分别为PHY3和PHY4。
在FlexE Shim本地端(local端),FlexE Group B通过开销帧的属性信息对齐到FlexE Group A。在FlexE Shim远程端(remote端)的接收侧采样开销帧的属性信息的偏差,以便评估PHY3相对于PHY1的skew,并评估PHY4相对于PHY2的skew。
若PHY3相对于PHY1的skew小于预设的阈值,即PHY3相对于PHY1几乎没有偏差,则可将PHY3绑定至FlexE Group A。同理,若PHY4相对于PHY2的skew小于预设的阈值,即PHY4相对于PHY2几乎没有偏差,则可将PHY4绑定至FlexE Group A。
反之,若PHY3相对于PHY1的skew大于预设的阈值,即PHY3相对于PHY1的偏差较大,则可能导致绑定失败回退,因此,不再将PHY3绑定至FlexE Group A。同理,若PHY4相对于PHY2的skew大于预设的阈值,即PHY4相对于PHY2的偏差较大,则可能导致绑定失败回退,因此,不再将PHY4绑定至FlexE Group A。
基于上述示例可知,在对待绑定的链路进行绑定之前,预先对待绑定链路与已绑定链路之间的开销帧的属性信息的偏差进行预测,以避免绑定过程中因偏差过大而导致绑定失败回退,从而实现***,节约资源,提高绑定效率和成功率的技术效果。
根据本公开实施例的另一个方面,本公开实施例提供了一种主备链路的切换装置。
请参阅图16,图16为本公开实施例的主备链路的切换装置的示意图。
如图16所示,该装置包括:
提取模块10,用于提取主链路中的开销帧,和备链路中的开销帧;
所述提取模块10还用于,分别提取主链路的开销帧中的属性信息,和备链路的开 销帧中的属性信息,其中,属性信息用于表征开销帧在主备链路中出现的次数;
切换模块20,用于将所述备链路的属性信息与主链路中的属性信息对齐后,进行主备链路切换。
结合图16可知,在一些实施例中,所述装置还包括:
预置模块30,用于对所述主备链路的开销进行预置,得到连续的开销域段。
在一些实施例中,所述预置模块30用于,配置连续的OH帧、PAD帧和AM帧;或者,配置连续的OH帧和AM帧。
结合图16可知,在一些实施例中,所述装置还包括:
同步模块40,用于对所述主备链路进行时间同步。
结合图16可知,在一些实施例中,所述装置还包括:
对齐模块50用于,采集所述主链路的开销帧的时戳,并采集所述备链路的开销帧的时戳,根据所述主链路的时戳与所述备链路的时戳,将所述备链路的开销帧的属性信息与所述主链路的开销帧的属性信息对齐。
在一些实施例中,所述对齐模块50用于,计算所述主链路的时戳与所述备链路的时戳的差值,分别采集所述主链路的OH帧信息和所述备链路的OH帧信息,根据所述差值和所述主链路的OH帧信息对所述备链路的OH帧信息进行调整。
在一些实施例中,所述OH帧信息包括OH帧计数和OH复帧计数。
在一些实施例中,所述对齐模块50用于,根据所述差值对所述备链路的开销帧进行时间补偿。
在一些实施例中,所述装置还包括:
预测量模块60,用于对待绑定的主备链路的开销帧的属性信息与所述主备链路的开销帧的属性信息进行偏差预测量。
根据本公开实施例的另一个方面,本公开实施例还提供了一种电子设备和计算机存储介质。
请参阅图17,图17为本公开实施例的电子设备的框图。
其中,电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。
如图17所示,该电子设备包括:一个或多个处理器101、存储器102,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器***)。图17中以一个处理器101为例。
存储器102即为本公开所提供的计算机存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本公开所提供的主备链路的切换方法。本公开的计算机存储介质存储计算机指令,该计算机指令用于使计算机 执行本公开所提供的主备链路的切换方法。
存储器102作为一种计算机存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块。处理器101通过运行存储在存储器102中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的主备链路的切换方法。
存储器102可以包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需要的应用程序;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器102可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器102可选包括相对于处理器101远程设置的存储器,这些远程存储器可以通过网络连接至电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、区块链网、移动通信网及其组合。
电子设备还可以包括:输入装置103和输出装置104。处理器101、存储器102、输入装置103和输出装置104可以通过总线或者其他方式连接,图17中以通过总线连接为例。
其中,计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。
根据本公开实施例的另一个方面,本公开实施例还提供了一种路由器,路由器包括如上任一实施例所述的主备链路的切换装置,或者,如上述实施例所述的电子设备。
请参阅图18,图18为本公开实施例的基于路由器200实现终端100与外部网络300的交互示意图。
其中,本公开实施例的主备链路的切换方法可以适用于如图18所示的应用场景。
如图18所示,终端100与路由器200之间建立通信链路,且路由器200与外部网络300之间建立通信链路,外部网络300将数据通过路由器200传输至终端100,同理,终端100通过路由器200将数据传输至外部网络300。
基于上述示例可知,路由器200中包括主链路和备链路,当主链路故障时,可通过备链路将外部网络300输入的数据传输至终端100,也可通过备链路将终端100输入的数据传输至外部网络300。从而实现外部网络300与终端100之间数据传输的可靠性和及时性的技术效果。
值得说明地是,上述示例只是示范性地说明路由器的使用场景,而不能理解为对本公开实施例的路由器的应用范围的限定。
根据本公开实施例的另一个方面,本公开实施例还提供了一种交换机,交换机包括如上任一实施例所述的主备链路的切换装置,或者,如上述实施例所述的电子设备。
请参阅图19,图19为本公开实施例的交换机的应用场景的示意图。
如图19所示,网络摄像机400、网络单球500、网络摄像头600和网络球机700分别连接至交换机900,交换机900通过网络硬盘录像机800连接至显示器1000,以便显示器1000对网络摄像机400、网络单球500、网络摄像头600和网络球机700中的一种或多种传输的数据进行显示。
其中,本公开实施例的主备链路的切换方法可以适用于如图19所示的应用场景。
如图19所示,以网络摄像机400为例进行阐述如下:
网络摄像机400连接至交换机900,并将采集到的摄像数据传输至交换机900,交换机将接收到的摄像数据传输至网络硬盘录像机800,以便网络硬盘录像机800对摄像数据进行适应性处理后,传输至显示器1000,显示器1000对处理后的摄像数据进行显示。
基于上述示例可知,交换机900中包括主链路和备链路,当主链路故障时,可通过备链路将网络摄像机400输入的摄像数据传输至网络硬盘录像机800,从而实现摄像数据传输的可靠性和及时性的技术效果。
同理,值得说明地是,上述示例只是示范性地说明交换机的使用场景,而不能理解为对本公开实施例的交换机的应用范围的限定。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。
Claims (22)
- 一种主备链路的切换方法,其特征在于,包括:提取主链路中的开销帧,和备链路中的开销帧;分别提取主链路的开销帧中的属性信息,和备链路的开销帧中的属性信息,其中,属性信息用于表征开销帧在主备链路中出现的次数;将所述备链路的属性信息与主链路中的属性信息对齐后,进行主备链路切换。
- 根据权利要求1所述的方法,其特征在于,在所述提取主链路中的开销帧,和备链路中的开销帧之前,所述方法还包括:对所述主备链路的开销帧进行预置,得到连续的开销帧域段。
- 根据权利要求2所述的方法,其特征在于,所述对所述主备链路的开销帧进行预置包括:配置连续的OH帧、PAD帧和AM帧;或者,配置连续的OH帧和AM帧。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:对所述主备链路进行时间同步。
- 根据权利要求4所述的方法,其特征在于,将备链路的属性信息与主链路的属性信息对齐包括:采集所述主链路的开销帧的时戳,并采集所述备链路的开销帧的时戳;根据所述主链路的时戳与所述备链路的时戳,将所述备链路的属性信息与所述主链路的属性信息对齐。
- 根据权利要求5所述的方法,其特征在于,所述根据所述主链路的时戳与所述备链路的时戳,将所述备链路的属性信息与所述主链路的属性信息对齐包括:计算所述主链路的时戳与所述备链路的时戳的差值;分别采集所述主链路的OH帧信息和所述备链路的OH帧信息;根据所述差值和所述主链路的OH帧信息对所述备链路的OH帧信息进行调整。
- 根据权利要求6所述的方法,其特征在于,所述OH开销帧信息包括OH开销帧计数和OH开销复帧计数。
- 根据权利要求6所述的方法,其特征在于,在计算所述主链路的时戳与所述备链路的时戳的差值之后,所述方法还包括:根据所述差值对所述备链路的开销帧进行时间补偿。
- 根据权利要求1至8中任一项所述的方法,其特征在于,所述方法还包括:对待绑定的主备链路的开销帧的属性信息与所述主备链路的开销帧的属性信息进行偏差预测量。
- 一种主备链路的切换装置,其特征在于,所述装置包括:提取模块,用于提取主链路中的开销帧,和备链路中的开销帧;所述提取模块还用于,分别提取主链路的开销帧中的属性信息,和备链路的开销帧中的属性信息,其中,属性信息用于表征开销帧在主备链路中出现的次数;切换模块,用于将所述备链路的属性信息与主链路中的属性信息对齐后,进行主链路备切换。
- 根据权利要求10所述的装置,其特征在于,所述装置还包括:预置模块,用于对所述主备链路的开销帧进行预置,得到连续的开销帧域段。
- 根据权利要求11所述的装置,其特征在于,所述预置模块具体用于,配置连续的OH帧、PAD帧和AM帧;或者,配置连续的OH帧和AM帧。
- 根据权利要求12所述的装置,其特征在于,所述装置还包括:同步模块,用于对所述主备链路进行时间同步。
- 根据权利要求13所述的装置,其特征在于,所述装置模块还包括:对齐模块,用于采集所述主链路的开销帧的时戳,并采集所述备链路的开销帧的时戳,根据所述主链路的时戳与所述备链路的时戳,将所述备链路的属性信息与所述主链路的属性信息对齐。
- 根据权利要求14所述的装置,其特征在于,所述对齐模块用于,计算所述主链路的时戳与所述备链路的时戳的差值,分别采集所述主链路的OH帧信息和所述备链路的OH帧信息,根据所述差值和所述主链路的OH帧信息对所述备链路的OH帧信息进行调整。
- 根据权利要求15所述的装置,其特征在于,所述OH帧信息包括OH帧计数和OH复帧计数。
- 根据权利要求15所述的装置,其特征在于,所述对齐模块用于,根据所述差值对所述备链路的开销帧进行时间补偿。
- 根据权利要求10至17中任一项所述的装置,其特征在于,所述装置还包括:预测量模块,用于对待绑定的主备链路的开销帧的属性信息与所述主备链路的开销帧的属性信息进行偏差预测量。
- 一种电子设备,其特征在于,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-9中任一项所述的方法。
- 一种路由器,其特征在于,包括如权利要求10至18中任一项所述的主备链路的切换装置,或者,如权利要求19所述的电子设备。
- 一种交换机,其特征在于,包括如权利要求10至18中任一项所述的主备链路的切换装置,或者,如权利要求19所述的电子设备。
- 一种计算机存储介质,其特征在于,其上存储有计算机指令,所述计算机指令用于使所述计算机执行权利要求1-9中任一项所述的方法。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP20934127.0A EP4135242A4 (en) | 2020-04-28 | 2020-04-28 | METHOD AND DEVICE FOR SWITCHING BETWEEN MAIN AND STANDBY CONNECTIONS, ELECTRONIC DEVICE, ROUTER AND SWITCH |
PCT/CN2020/087389 WO2021217394A1 (zh) | 2020-04-28 | 2020-04-28 | 主备链路的切换方法和装置、电子设备、路由器、交换机 |
CN202080099031.0A CN115336214B (zh) | 2020-04-28 | 2020-04-28 | 主备链路的切换方法和装置、电子设备、路由器、交换机 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/087389 WO2021217394A1 (zh) | 2020-04-28 | 2020-04-28 | 主备链路的切换方法和装置、电子设备、路由器、交换机 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021217394A1 true WO2021217394A1 (zh) | 2021-11-04 |
Family
ID=78373259
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/087389 WO2021217394A1 (zh) | 2020-04-28 | 2020-04-28 | 主备链路的切换方法和装置、电子设备、路由器、交换机 |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP4135242A4 (zh) |
CN (1) | CN115336214B (zh) |
WO (1) | WO2021217394A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116684048B (zh) * | 2023-08-02 | 2023-10-31 | 成都电科星拓科技有限公司 | Serdes中继芯片主备链路切换方法及*** |
CN118101554A (zh) * | 2024-04-25 | 2024-05-28 | 中国第一汽车股份有限公司 | 板载双***通信链路备份方法、装置及电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107453905A (zh) * | 2017-07-31 | 2017-12-08 | 烽火通信科技股份有限公司 | 一种灵活以太网1:1保护倒换实现方法 |
CN107888345A (zh) * | 2016-09-29 | 2018-04-06 | 中兴通讯股份有限公司 | 一种信息传输的方法和设备 |
CN108419259A (zh) * | 2018-02-11 | 2018-08-17 | 烽火通信科技股份有限公司 | 基于保留开销字段实现灵活以太网保护倒换的方法及*** |
CN109428840A (zh) * | 2017-08-31 | 2019-03-05 | 华为技术有限公司 | 一种通信方法、设备及存储介质 |
US20190173856A1 (en) * | 2015-12-11 | 2019-06-06 | Ciena Corporation | Flexible ethernet encryption systems and methods |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7167442B2 (en) * | 2001-05-22 | 2007-01-23 | Nortel Networks Limited | Hitless protection switching |
CN108156074B (zh) * | 2016-12-02 | 2020-10-23 | 华为技术有限公司 | 保护倒换方法、网络设备及*** |
CN113316037B (zh) * | 2017-05-02 | 2022-08-09 | 华为技术有限公司 | 一种业务承载的方法、设备和*** |
-
2020
- 2020-04-28 WO PCT/CN2020/087389 patent/WO2021217394A1/zh unknown
- 2020-04-28 CN CN202080099031.0A patent/CN115336214B/zh active Active
- 2020-04-28 EP EP20934127.0A patent/EP4135242A4/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190173856A1 (en) * | 2015-12-11 | 2019-06-06 | Ciena Corporation | Flexible ethernet encryption systems and methods |
CN107888345A (zh) * | 2016-09-29 | 2018-04-06 | 中兴通讯股份有限公司 | 一种信息传输的方法和设备 |
CN107453905A (zh) * | 2017-07-31 | 2017-12-08 | 烽火通信科技股份有限公司 | 一种灵活以太网1:1保护倒换实现方法 |
CN109428840A (zh) * | 2017-08-31 | 2019-03-05 | 华为技术有限公司 | 一种通信方法、设备及存储介质 |
CN108419259A (zh) * | 2018-02-11 | 2018-08-17 | 烽火通信科技股份有限公司 | 基于保留开销字段实现灵活以太网保护倒换的方法及*** |
Non-Patent Citations (1)
Title |
---|
See also references of EP4135242A4 * |
Also Published As
Publication number | Publication date |
---|---|
CN115336214A (zh) | 2022-11-11 |
EP4135242A4 (en) | 2023-05-03 |
CN115336214B (zh) | 2024-04-12 |
EP4135242A1 (en) | 2023-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11552721B2 (en) | Clock synchronization method and apparatus | |
US11824636B2 (en) | Method and apparatus for sending and receiving clock synchronization packet | |
US10903929B2 (en) | Flexible ethernet group establishment method and device | |
CN109600188B (zh) | 数据传输方法、传输设备和传输*** | |
US11223438B2 (en) | Service transmission method, network device, and network system | |
US9866497B2 (en) | Lossless adjustment method of ODUflex channel bandwidth and ODUflex channel | |
US20210111933A1 (en) | Method for adjusting phy in flexe group, related device, and storage medium | |
WO2021217394A1 (zh) | 主备链路的切换方法和装置、电子设备、路由器、交换机 | |
US20190190690A1 (en) | Method and Apparatus for Sending Service, Method and Apparatus for Receiving Service, and Network System | |
US9515919B2 (en) | Method and apparatus for protection switching in packet transport system | |
US9391883B2 (en) | Method and device for label automatic allocation in ring network protection | |
US9465701B2 (en) | Relay device and recovery method | |
JP2020530739A (ja) | サービス周波数をトランスペアレントに伝送する方法およびデバイス | |
US9013977B2 (en) | Method and system for reducing traffic disturbance in a communication network caused by intermittent failure | |
EP4117237A1 (en) | Service flow adjustment method and communication device | |
WO2020038424A1 (zh) | 数据包的传输方法、装置、存储介质及电子装置 | |
WO2023071249A1 (zh) | 一种时隙协商方法及装置 | |
CN117728920A (zh) | 数据发送方法、数据接收方法、设备、介质和程序产品 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20934127 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2020934127 Country of ref document: EP Effective date: 20221108 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |