A method and apparatus for Ethernet Link Up and Link Down

By monitoring the signal status on the line side and setting state machine switching, the problem of unstable switch-side Link state during OLP switching and recovery is solved, and the stability and service continuity of switch-side Link state are achieved.

CN116566928BActive Publication Date: 2025-07-25ACCELINK TECHNOLOGIES CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310569830.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2025-07-25
Estimated Expiration
2043-05-17

AI Technical Summary

Technical Problem

During OLP switching and OLP recovery, the switch-side Link state is unstable, resulting in long service interruption.

Method used

By monitoring the signal status of the line side, setting the state machine and switching different states, including delayed down-subtraction, down-subtraction, delayed up-line, etc., the signal type received by the switch is controlled to ensure the stable Link state on the switch side.

Benefits of technology

The stability of the switch-side Link state during the OLP protection process is achieved, reducing service interruption time and ensuring the continuity of customer services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116566928B_ABST
    Figure CN116566928B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communication technologies, and provides a method and apparatus for Ethernet Link Up and Link Down. It includes: when the state machine is in the normal state, when it is detected that the state of the line-side signal is abnormal, the state machine is switched to the delayed plug-down state; when the state machine is in the delayed plug-down state, an idle frame is sent to the switch, and a delayed plug-down timing is performed. If it is detected that the state of the line-side signal returns to the normal state before the delayed plug-down timing reaches the delayed plug-down time, the state machine is switched to the normal state; otherwise, until the delayed plug-down timing reaches the delayed plug-down time, the state machine is switched to the plug-down state. By setting the state machine, different actions are processed in different states and the state machine is switched, so as to achieve delayed Link Down and delayed Link Up, thereby ensuring the stability of the Link state on the switch side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a method and apparatus for Ethernet Link Up and Link Down. Background Art

[0002] For a DCI (Data Center Interconnect) transport network, OLP (Optical Fiber Line Auto Switch Protection Equipment) protection is provided at the transport layer. OLP has the advantages of short and fast switching time. However, in an old-fashioned switch, the OLP protection switchover will also trigger the protocol layer of the switch to perform re-routing, resulting in service interruption and a long recovery time. During the process of the OLP protection optical path recovery, the optical path may be unstable, and the optical path jitter causes the Link state on the switch side to be unstable. In a DCI transport network, OLP protection exists in large numbers. When the OLP protection link is interrupted, OLP will switch from the working state to the protection state. Although the OLP switching time is short, with a typical value of about 10 ms, during the OLP switching period, error frames will still be sent from the electrical layer board to the switch, and the switch will experience a Link interruption. After the switch Link (connection) is interrupted, the upper layer of the switch will perform protocol layer re-routing, and the service recovery time for re-routing is in seconds. Therefore, although the OLP switching is fast, the customer service will still be interrupted for a long time.

[0003] As Figure 1 and Figure 2 shown, when the OLP line side is restored, in the engineering existing network, fiber splicing is generally performed. During the fiber splicing process, the optical path is unstable, resulting in an uncertain state of the DCI electrical layer single board line side, thereby affecting the signal sent to the switch, and ultimately affecting the switch, resulting in an unstable Link state on the switch side.

[0004] In view of this, overcoming the defects of the existing technology is an urgent problem to be solved in this technical field. Summary of the Invention

[0005] The technical problem to be solved by the present invention is that when an old-fashioned switch performs OLP switching and OLP recovery, the Link state on the switch side is unstable.

[0006] The present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for Ethernet Link Up and Link Down, which monitors the state of the line side signal, including:

[0008] When the state machine is in the normal state, when the state of the line side signal is monitored to be abnormal, the state machine is switched to the delayed downplug state;

[0009] When the state machine is in the delayed downlink state, an idle frame is sent to the switch, and the delayed downlink timing is started. If the state of the line-side signal returns to the normal state before the delayed downlink timing reaches the delayed downlink time, the state machine is switched to the normal state; otherwise, when the delayed downlink timing reaches the delayed downlink time, the state machine is switched to the downlink state.

[0010] When the state machine is in the downlink state, a link fault is sent to the switch. When the state of the line-side signal returns to the normal state, the state machine is switched to the delayed online state.

[0011] When the state machine is in the delayed online state, a link fault is sent to the switch, and the delayed online timing is started. If the state of the line-side signal is abnormal before the delayed online timing reaches the delayed online time, the state machine is switched to the downlink state; otherwise, when the delayed online timing reaches the delayed online time, a normal bitstream is sent to the switch, and the state machine is switched to the normal state.

[0012] Preferably, when it is monitored that the state of the line-side signal is abnormal, switching the state machine to the delayed downlink state specifically includes:

[0013] If the delayed downlink function switch is on and the delayed downlink time is greater than the first preset value, when it is monitored that the state of the line-side signal is abnormal, the state machine is switched to the delayed downlink state.

[0014] If the delayed downlink function switch is off or the delayed downlink time is not greater than the first preset value, when it is monitored that the state of the line-side signal is abnormal, the state machine is switched to the downlink state.

[0015] Preferably, when it is monitored that the state of the line-side signal returns to the normal state, switching the state machine to the delayed online state specifically includes:

[0016] If the delayed online function switch is on and the delayed online time is greater than the second preset value, when it is monitored that the state of the line-side signal returns to the normal state, the state machine is switched to the delayed online state.

[0017] If the delayed online function switch is off or the delayed online time is not greater than the second preset value, when it is monitored that the state of the line-side signal returns to the normal state, the state machine is switched to the normal state.

[0018] Preferably, when the delayed online timing reaches the delayed online time, sending a normal bitstream to the switch and switching the state machine to the normal state specifically includes:

[0019] If the delayed online function switch is turned off before the delayed online timing reaches the delayed online time, the state machine is directly switched to the normal state.

[0020] Otherwise, when the delayed online timing reaches the delayed online time, send a normal bitstream to the switch and switch the state machine to the normal state.

[0021] Preferably, when the delayed downplugging timing reaches the delayed downplugging time, switching the state machine to the downplugging state specifically includes:

[0022] If the delayed online function switch is turned on and the delayed activation time is greater than the third preset value, when the delayed downplugging timing reaches the delayed downplugging time, switch the state machine to the delayed activation state;

[0023] If the delayed online function switch is not turned on, or the delayed activation time is not greater than the third preset value, then when the delayed downplugging timing reaches the delayed downplugging time, switch the state machine to the downplugging state.

[0024] Preferably, the method further includes:

[0025] If the delayed offline function switch is turned off before the delayed downplugging timing reaches the delayed downplugging time, determine whether the delayed online function switch is turned on. If it is determined that the delayed online function switch is turned on, directly switch the state machine to the delayed activation state; if it is determined that the delayed online function switch is not turned on, switch the state machine to the downplugging state.

[0026] Preferably, when the state machine is in the delayed activation state, send a link fault to the switch and perform delayed activation timing;

[0027] If the state of the line-side signal is monitored to return to the normal state before the delayed activation timing reaches the delayed activation time, switch the state machine to the normal state;

[0028] Otherwise, when the delayed activation timing reaches the delayed activation time, switch the state machine to the downplugging state.

[0029] Preferably, the method further includes:

[0030] If the delayed online function switch is turned off before the delayed activation timing reaches the delayed activation time, directly switch the state machine to the downplugging state.

[0031] Preferably, both sending the idle frame to the switch and sending the link fault to the switch are implemented by setting the automatic downplugging code pattern, specifically including:

[0032] After setting the automatic downplugging code pattern to IDLE, when the line-side signal is interrupted, send an idle frame to the switch;

[0033] After setting the automatic downplugging code pattern to LocalFault, when the line-side signal is interrupted, send a link fault to the switch.

[0034] In a second aspect, the present invention further provides a device for Ethernet Link Up and Link Down, which is used to implement the method for Ethernet Link Up and Link Down described in the first aspect. The device includes:

[0035] At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions, when executed by the processor, are used to execute the method for Ethernet Link Up and Link Down described in the first aspect.

[0036] In a third aspect, the present invention further provides a non-volatile computer storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors to complete the method for Ethernet Link Up and Link Down described in the first aspect.

[0037] By setting up a state machine, the present invention processes different actions in different states and switches the state machine to achieve delayed Link Down and delayed Link Up, thereby ensuring the stability of the Link state on the switch side. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments of the present invention. Obviously, the following described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0039] Figure 1 is a schematic diagram of the architecture of a DCI transmission network provided by an embodiment of the present invention;

[0040] Figure 2 is a schematic diagram of the line-side recovery of a DCI transmission network in the prior art provided by an embodiment of the present invention;

[0041] Figure 3 is a schematic flowchart of a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention;

[0042] Figure 4 is a schematic diagram of the state machine in the method for Ethernet Link Up and Link Down provided by an embodiment of the present invention;

[0043] Figure 5It is a schematic diagram of the state of the state machine in a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention;

[0044] Figure 6 It is a schematic diagram of the processing flow of the state machine in a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention;

[0045] Figure 7 It is a schematic diagram of the processing flow of the state machine in a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention in the normal state;

[0046] Figure 8 It is a schematic diagram of the processing flow of the state machine in a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention in the delayed down - plug state;

[0047] Figure 9 It is a schematic diagram of the processing flow of the state machine in a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention in the delayed activation state;

[0048] Figure 10 It is a schematic diagram of the processing flow of the state machine in a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention in the down - plug state;

[0049] Figure 11 It is a schematic diagram of the processing flow of the state machine in a method for Ethernet Link Up and Link Down provided by an embodiment of the present invention in the delayed online state;

[0050] Figure 12 It is a schematic diagram of the architecture of a device for Ethernet Link Up and Link Down provided by an embodiment of the present invention. Detailed implementation manners

[0051] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0052] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0053] Embodiment 1:

[0054] In the prior art, when an old-fashioned switch performs OLP switching and OLP recovery, the Link state on the switch side is unstable. To solve this problem, Embodiment 1 of the present invention provides a method for Ethernet Link Up and Link Down. This method monitors the state of the line-side signal to achieve Link Up Delay (i.e., delayed online) or Link Down Delay (delayed plug-down) of the customer-side Ethernet, as Figure 3 shown, including:

[0055] In step 201, when the state machine is in the normal state and the state of the line-side signal is monitored to be abnormal, the state machine is switched to the delayed plug-down state; wherein, the state machine is not an actual existing hardware module, but refers to a program at the software level for identifying multiple state transitions and performing corresponding processing. Under the initial conditions, that is, when the DCI transmission network connection is normal, the state machine is set to the normal state, and normal communication is carried out between the customer service and the switch. The state machine includes a normal state, a delayed plug-down state, a plug-down state, and a delayed online state.

[0056] In step 202, when the state machine is in the delayed plug-down state, an idle frame is sent to the switch and a delayed plug-down timing is performed. If the state of the line-side signal is monitored to return to the normal state before the delayed plug-down timing reaches the delayed plug-down time, the state machine is switched to the normal state; otherwise, until the delayed plug-down timing reaches the delayed plug-down time, the state machine is switched to the plug-down state; when the switch receives the idle frame, the switch does not Link Down.

[0057] In step 203, when the state machine is in the plug-down state, a link fault is sent to the switch. When the state of the line-side signal is monitored to return to normal, the state machine is switched to the delayed online state; when the switch receives the link fault, the switch Link Down.

[0058] In step 204, when the state machine is in the delayed online state, a link fault is sent to the switch, and the delayed online timing is started. If the abnormal state of the line-side signal is detected before the delayed online timing reaches the delayed online time, the state machine is switched to the plug-in state; otherwise, until the delayed online timing reaches the delayed online time, a normal code stream is sent to the switch, and the state machine is switched to the normal state. That is, before the delayed online timing reaches the delayed online time, the switch still maintains the Link Down state and does not perform Link Up. When the delayed online timing reaches the delayed online time, the signal on the line side is transmitted to the customer side and sent to the switch by the customer side. The switch receives the normal signal from the customer side and performs Link Up. In actual use, the method described in this embodiment is executed by the DCI transport layer device, such as by the DCI electrical layer board, which selectively sends electrical layer signals such as idle frames (IDLE), link faults (LocalFault), or normal code streams to the switch. When the switch receives the electrical layer signal, it performs Link Up or Link Down accordingly.

[0059] The core idea of this embodiment is to control the signal sent by the DCI electrical layer board to the switch to delay Link Up or delay Link Down. Specifically: at the moment when the OLP optical path is interrupted, the state of the line-side signal becomes abnormal, and the state machine is switched to the delayed plug-in state. The DCI electrical layer board automatically converts the electrical layer signal plugged into the switch into an IDLE (idle frame), that is, sends an idle frame to the switch to prevent the switch from Link Down, that is, to maintain the Link state. Then, after a period of time is delayed through the delayed plug-in timing, the state machine is switched to the plug-in state, and the signal automatically plugged into the switch by the DCI electrical layer board is converted from IDLE to LocalFault (link fault), causing the switch to Link Down, thereby achieving the effect of delaying Link Down. During the process of delaying Link Down, if the OLP optical path is restored, the state machine is immediately switched to the normal state, so that during the instantaneous interruption recovery process of the OLP optical path, the Link state of the switch always remains in the Link state, thus ensuring the continuity of customer services.

[0060] When the switch's Link goes Down and then the OLP optical path is restored, the status of the line-side signal returns to normal. The state machine switches to the delayed online state and delays for a period of time through the delayed online timer. That is, within a period of time after the optical path is restored, the forced downlink link failure is continued to be maintained, keeping the switch in the Link Down state until the delayed online timer reaches the delayed online time. Then the state machine switches to the normal state, cancels the forced downlink of the link failure, and restores the service, thus achieving the effect of delayed LinkUp. During the delayed online process, if the OLP optical path is disconnected again, it is considered that the OLP link status is unstable, and the state machine enters the downlink state again, that is, the switch always remains in the LinkDown state until the OLP link recovery time reaches the delayed online time, at which point it is considered that the link is restored and the link status is stable. At this time, the switch's Link is restored. The delayed Link Up is also referred to as Link Up Delay in subsequent embodiments, and the delayed Link Down is also referred to as Link DownDelay in subsequent embodiments.

[0061] In this embodiment, by setting a state machine and handling different actions in different states, delayed Link Down and delayed Link Up are achieved, thus ensuring the stability of the Link state on the switch side.

[0062] In actual use, it may also be possible to select whether to perform delayed Link Down or delayed Link Up according to the needs of users or the network. Therefore, this embodiment also provides several preferred implementation manners, specifically including: setting a delayed downlink function switch and a delayed online function switch. When the delayed downlink function switch is turned on, delayed Link Down is performed; otherwise, Link Down is performed according to the prior art. When the delayed online function switch is turned on, delayed Link Up is performed; otherwise, Link Up is performed according to the prior art, specifically including:

[0063] When the state machine is in the normal state, when it is detected that the status of the line-side signal is abnormal, the state machine is switched to the delayed downlink state, specifically including: if the delayed downlink function switch is turned on and the delayed downlink time is greater than the first preset value, when it is detected that the status of the line-side signal is abnormal, the state machine is switched to the delayed downlink state; if the delayed downlink function switch is not turned on, or the delayed downlink time is not greater than the first preset value, when it is detected that the status of the line-side signal is abnormal, the state machine is switched to the downlink state. Among them, the delayed downlink time and the delayed downlink function switch are set by those skilled in the art or network users according to network requirements, and the first preset value is obtained by those skilled in the art through empirical analysis. The first preset value can be 0.

[0064] When the state machine is in the delayed downlink state, when the delayed downlink timing reaches the delayed downlink time, the state machine is switched to the downlink state, which specifically includes: If the delayed downlink function switch is turned off before the delayed downlink timing reaches the delayed downlink time, the state machine is directly switched to the downlink state; otherwise, when the delayed downlink timing reaches the delayed downlink time, the state machine is switched to the downlink state.

[0065] When the state machine is in the downlink state, when it is monitored that the state of the line-side signal returns to normal, the state machine is switched to the delayed online state, which specifically includes: If the delayed online function switch is turned on and the delayed online time is greater than the second preset value, when it is monitored that the state of the line-side signal returns to normal, the state machine is switched to the delayed online state; If the delayed online function switch is not turned on, or the delayed online time is not greater than the second preset value, when it is monitored that the state of the line-side signal returns to normal, the state machine is switched to the normal state. Among them, the delayed online function switch and the delayed online time are set by those skilled in the art or network users according to network requirements, and the second preset value is obtained by those skilled in the art through empirical analysis, and the second preset value can be 0.

[0066] When the state machine is in the delayed online state, when the delayed online timing reaches the delayed online time, a normal bitstream is sent to the switch, and the state machine is switched to the normal state, which specifically includes: If the delayed online function switch is turned off before the delayed online timing reaches the delayed online time, the state machine is directly switched to the normal state; otherwise, when the delayed online timing reaches the delayed online time, a normal bitstream is sent to the switch, and the state machine is switched to the normal state.

[0067] On the basis of the above embodiments, this embodiment also provides a preferred embodiment. In this embodiment, the state machine not only includes the normal state, the delayed downlink state, the downlink state, and the delayed online state, but also includes the delayed activation state.

[0068] When the state machine is in the delayed downlink state, when the delayed downlink timing reaches the delayed downlink time, the state machine is switched to the downlink state, which specifically includes: If the delayed online function switch is turned on and the delayed activation time is greater than the third preset value, when the delayed downlink timing reaches the delayed downlink time, the state machine is switched to the delayed activation state; If the delayed online function switch is not turned on, or the delayed activation time is not greater than the third preset value, then when the delayed downlink timing reaches the delayed downlink time, the state machine is switched to the downlink state. Among them, the delayed activation time is set by those skilled in the art or network users according to network requirements, and the third preset value is obtained by those skilled in the art through empirical analysis, and the third preset value can be 0.

[0069] The method further includes: if the delayed offline function switch is turned off before the delayed downlink timing reaches the delayed downlink time, it is determined whether the delayed online function switch is turned on. If it is determined that the delayed online function switch is turned on, the state machine is directly switched to the delayed activation state; if it is determined that the delayed online function switch is not turned on, the state machine is switched to the downlink state.

[0070] When the state machine is in the delayed activation state, a link fault is sent to the switch, and delayed activation timing is performed; if the state of the line-side signal is monitored to return to the normal state before the delayed activation timing reaches the delayed activation time, the state machine is switched to the normal state; otherwise, when the delayed activation timing reaches the delayed activation time, the state machine is switched to the downlink state.

[0071] The method further includes: if the delayed online function switch is turned off before the delayed activation timing reaches the delayed activation time, the state machine is directly switched to the downlink state.

[0072] In the above embodiments, both sending an idle frame to the switch and sending a link fault to the switch are implemented by setting an automatic downlink pattern, which specifically includes: after setting the automatic downlink pattern to IDLE, when the line-side signal is interrupted, an idle frame is sent to the switch; after setting the automatic downlink pattern to LocalFault, when the line-side signal is interrupted, a link fault is sent to the switch; when the automatic downlink pattern is set to NONE, the switch does not perform forced downlink, that is, no idle frame or link fault is sent to the switch. At this time, the normal code stream is sent to the switch (that is, the code stream transmitted from the line side to the customer side and sent from the customer side to the switch).

[0073] Embodiment 2:

[0074] Based on the method described in Embodiment 1, the present invention combines specific application scenarios and uses technical expressions in relevant scenarios to elaborate on the implementation process in the characteristic scenarios of the present invention.

[0075] Taking Figure 1 the shown DCI transmission network as an example, this embodiment defines the state machine as Figure 4 shown, including: the state machine state (i.e., the Line state machine in Figure 4 ), the state machine timer, the LinkDown switch state (i.e., the delayed downlink function switch in Embodiment 1), the LinkUp switch state (i.e., the delayed online function switch in Embodiment 1), the LinkDownHold time (i.e., the delayed downlink time in Embodiment 1), the LinkUpHold time (i.e., the delayed online time in Embodiment 1), and the LinkUpActive time (i.e., the delayed activation time in Embodiment 1).

[0076] Define the states of the state machine as Figure 5 shown below, including the following five types:

[0077] 1) EN_LINK_DELAY_SM_UP: Normal state.

[0078] 2) EN_LINK_DELAY_SM_DOWN_HO: Delayed downplug state.

[0079] 3) EN_LINK_DELAY_SM_UP_ACTIVE_HO: Delayed activation state.

[0080] 4) EN_LINK_DELAY_SM_DOWN: Downplug state.

[0081] 5) EN_LINK_DELAY_SM_UP_HO: Delayed online state.

[0082] For the convenience of describing the specific implementation of Link Down Delay or Link Up Delay, the concepts used later are described as follows:

[0083] 1) Link Down Delay Switch: The Link Down Delay function switch (i.e., the delayed downplug function switch in Embodiment 1), abbreviated as LDDS; the currently used LDDS is abbreviated as LDDSA, and the target LDDS (i.e., the LDDS set by the user) is abbreviated as LDDSC. The value is Enable or Disable. When the value is Enable, the delayed downplug function switch is turned on; otherwise, the delayed downplug function switch is not turned on.

[0084] 2) Link Up Delay Switch: The Link Up Delay function switch (i.e., the delayed online function switch in Embodiment 1), abbreviated as LUDS. The currently used LUDS is abbreviated as LUDSA, and the target LUDS (i.e., the LUDS set by the user) is abbreviated as LUDSC. The value is Enable and Disable. When the value is Enable, the delayed online function switch is turned on; otherwise, the delayed online function switch is not turned on.

[0085] 3) Link Down Delay Holdoff: The delay time of Link Down Delay (i.e., the delayed downplug time in Embodiment 1), that is, how long the line side is interrupted to make the switch Link Down, in milliseconds, abbreviated as LDDH. The currently used LDDH is abbreviated as LDDHA, and the target LDDH (i.e., the LDDH set by the user) is abbreviated as LDDHC.

[0086] 4) Link Up Delay Holdoff: The delay time of Link Up Delay (i.e., the delay time for going online in Embodiment 1), which is the time for the line side to recover and let the switch Link Up. The unit is s, abbreviated as LUDH. The currently used LUDH is abbreviated as LUDHA, and the target LUDH (i.e., the LUDH set by the user) is abbreviated as LUDHC.

[0087] 5) Link Up Delay Active: The activation time of Link Up Delay (i.e., the activation delay time in Embodiment 1), which is the time when the line side is interrupted. When the line side recovers later, Link Up Delay processing is to be performed. The unit is ms, abbreviated as LUDA. The currently used LUDA is abbreviated as LUDAA, and the target LUDA (i.e., the LUDA set by the user) is abbreviated as LUDAC.

[0088] 6) Enable is abbreviated as E, and Disable is abbreviated as D.

[0089] 7) CSF: Customer side signal failure, that is, the line side is interrupted and the remote customer side signal fails. The current actual customer side signal failure state is CSFC, and the customer side signal failure state saved in the state machine is CSFS. When CSF disappears, it is considered that OLP recovers and the customer side signal state returns to normal.

[0090] The hardware function support for implementing the Link Down Delay or Link Up Delay function is as follows:

[0091] 1) When the electrical layer board detects an alarm due to the interruption of the line side service, the electrical layer board shall simultaneously convert the electrical signal sent by the customer side to the switch into a specific code stream at the same moment. The code stream type can be configured, and at least IDLE and LocalFault two code streams are supported.

[0092] 2) The electrical layer board can forcibly send a specific code stream to the switch. The code stream type can be configured, and at least LocalFault and NONE (i.e., no forced downplug) are to be supported.

[0093] 3) The priority of forced downplug is higher than that of automatic downplug.

[0094] After defining the above variables, the board starts a timing task and periodically executes the state machine monitoring task. For example Figure 1 , in each periodic task, if it is found that the current state machine is in what state, the corresponding state machine processing is performed. After executing the corresponding state machine process, LDDSA is updated to LDDSC, LUDSA is updated to LUDSC, LDDHA is updated to LDDHC, LUDHA is updated to LUDHC, and LUDAA is updated to LUDAC.

[0095] When the state machine is in the EN_LINK_DELAY_SM_UP state, the process shown below is executed. The key steps will be described below, specifically including: Figure 7 as follows.

[0096] J1: Determine whether the host computer has configured the Link Down Delay function switch, and the program responds to the configuration action.

[0097] J2: If the Link Down Delay function is turned on and the HoldOff time is not 0, the module needs to be set to automatically insert IDLE to prepare for maintaining the Link state when the subsequent service is interrupted.

[0098] J3: Configure the HoldOff time of Link Down Delay and perform relevant response actions.

[0099] J4+J5: If the configured HoldOff time is 0, even if the Link Down Delay switch is on, the automatic insertion of Local Fault needs to be set to meet the HoldOff time requirement.

[0100] J4+J6+J7: When the Link Down Delay function is on and the HoldOff is configured from 0 to non-0, set the automatic insertion of IDLE to prepare for maintaining the Link state when the subsequent service is interrupted.

[0101] J8: When a service interruption occurs, the CSF state is inconsistent with the one saved in the state machine.

[0102] J9: Perform Link Down Delay processing judgment. If the function is on and the HoldOff is not 0, migrate the state machine to EN_LINK_DELAY_SM_DOWN_HO to enter the Link Down Delay timing.

[0103] J10: If the Link Down Delay function is off, enter the Link Up Delay function activation timing process at this time and migrate the state machine to EN_LINK_DELAY_SM_UP_ACTIVE_HO.

[0104] When the state machine is in the EN_LINK_DELAY_SM_DOWN_HO state, the process shown below is executed. The key steps will be described below, specifically including: Figure 8 as follows.

[0105] J1: Here, the CSF status is judged. If the CSF disappears during the Link Down Delay timing process, the state machine needs to be restored to EN_LINK_DELAY_SM_UP.

[0106] J2: According to the setting of Link Down Delay, the restoration module automatically inserts the configuration downward.

[0107] J3: This judgment is to handle turning off the Link Down Delay function during the timing process.

[0108] J4: After processing Link Down Delay, if Link Up Delay is on and the active time is not 0, start the active timing of Link Up Delay, and the state machine migrates to EN_LINK_DELAY_SM_UP_ACTIVE_HO.

[0109] J5: This judgment is for timing. If the timing of Link Down Delay has not reached, no action is taken, and the state machine continues to remain in EN_LINK_DELAY_SM_DOWN_HO.

[0110] J6: If the timing has reached, judge the switch and active time of Link Up Delay. If Link Up Delay is on and the active time is not 0, start the active timing of Link Up Delay, and the state machine migrates to EN_LINK_DELAY_SM_UP_ACTIVE_HO. If Link Up Delay is off, directly enter the service interruption state EN_LINK_DELAY_SM_DOWN, and the module needs to be set to automatically insert Local Fault downward. At this time, the Link state of the switch has been damaged and is already Link Down.

[0111] When the state machine is in the EN_LINK_DELAY_SM_UP_ACTIVE_HO state, execute the process as Figure 9 shown below. The key steps will be described below, specifically including:

[0112] J1 + J2: During the active timing of Link Up Delay, if the state of CSF changes, such as CSF disappearing, since the Link Down Delay has been processed before, the state machine can be directly restored to EN_LINK_DELAY_SM_UP at this time, and the module automatically inserts the pattern according to the Link Down Delay switch and HoldOff to prepare for the next Link Down Delay.

[0113] J3: During the active timing of Link Up Delay, if the Link Up Delay function is turned off, it is directly set to the interrupt state EN_LINK_DELAY_SM_DOWN.

[0114] J4: This is the active timing judgment.

[0115] J5: After the active timing ends, if the Link Up Delay function is on and the Link Up Delay function is activated, even if the service resumes later, it has to go through the Link Up Delay process, and the state machine is migrated to EN_LINK_DELAY_SM_DOWN. At this time, the forced insertion of LF is set, and both the automatic insertion and forced insertion of the module are configured as LF.

[0116] When the state machine is in the EN_LINK_DELAY_SM_DOWN state, the process shown in Figure 10 is executed. The key steps will be described below, specifically including:

[0117] J1 + J2: In the service interruption state, if the Link Up Delay switch function is configured, the LF forced insertion state needs to be set according to the configuration.

[0118] J3 + J4 + J5: In the service interruption state, if the HoldOff of Link Up Delay is configured, the LF forced insertion state needs to be set according to the configuration.

[0119] J6: Determine whether CSF has disappeared. If it has disappeared, subsequent judgments are required.

[0120] J7: CSF has disappeared. If the Link Up Delay function is turned on, it will enter the Link Up Delay process, and the state machine is set to EN_LINK_DELAY_SM_UP_HO.

[0121] J8: After the CSF disappears, if the Link Up Delay is off, the automatic downlink pattern needs to be set according to the Link Down Delay configuration to prepare for the downlink of Link Down Delay, and the state machine is set to EN_LINK_DELAY_SM_UP.

[0122] When the state machine is in the EN_LINK_DELAY_SM_UP_ACTIVE_HO state, the process shown in Figure 11 will be executed. The key steps will be described below, specifically including:

[0123] J1+J2: During the HoldOff timing of Link Up Delay, if the CSF is generated again, the state machine is restored to the service interruption state EN_LINK_DELAY_SM_DOWN, and the forced downlink state is set.

[0124] J3: During the HoldOff timing of Link Up Delay, if the Link Up Delay function is turned off, it is directly restored to the normal service state EN_LINK_DELAY_SM_UP state.

[0125] J5: After migrating the state machine to EN_LINK_DELAY_SM_UP, the automatic downlink pattern is set according to the Link Down Delay configuration to prepare for the next Link Down Delay.

[0126] J4: It is for the timing judgment of Link Up Delay.

[0127] Embodiment 3:

[0128] As shown in Figure 12 is a schematic diagram of the architecture of the Ethernet Link Up and Link Down device according to the embodiment of the present invention. The Ethernet Link Up and Link Down device of this embodiment includes one or more processors 21 and a memory 22. Among them, Figure 12 One processor 21 is taken as an example.

[0129] The processor 21 and the memory 22 can be connected through a bus or other means, Figure 12 Taking the connection through the bus as an example.

[0130] The memory 22 serves as a non-volatile computer-readable storage medium and can be used to store non-volatile software programs and non-volatile computer-executable programs, such as the methods for Ethernet Link Up and Link Down in Embodiment 1. The processor 21 executes the methods for Ethernet Link Up and Link Down by running the non-volatile software programs and instructions stored in the memory 22.

[0131] The memory 22 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 22 optionally includes a memory remotely disposed relative to the processor 21, and these remote memories can be connected to the processor 21 through a network. Examples of the above networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. In an actual usage scenario, the device may be a DCI electrical layer single board.

[0132] The program instructions / modules are stored in the memory 22 and, when executed by the one or more processors 21, execute the methods for Ethernet Link Up and Link Down in Embodiment 1 above.

[0133] It should be noted that, for the information interaction, execution process, etc. between the modules and units within the above device and system, since they are based on the same concept as the method embodiment of the present invention, the specific content can be referred to the description in the method embodiment of the present invention and will not be elaborated here.

[0134] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, an optical disc, or the like.

[0135] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for Ethernet Link Up and Link Down, characterized in that Monitor the status of the line-side signal, including: When the state machine is in the normal state, when the status of the line-side signal is detected to be abnormal, switch the state machine to the delayed downlink state; When the state machine is in the delayed downlink state, send an idle frame to the switch and perform a delayed downlink timing. If the status of the line-side signal is detected to return to the normal state before the delayed downlink timing reaches the delayed downlink time, switch the state machine to the normal state; otherwise, until the delayed downlink timing reaches the delayed downlink time, switch the state machine to the downlink state; When the state machine is in the downlink state, send a link failure to the switch. When the status of the line-side signal is detected to return to the normal state, switch the state machine to the delayed online state; When the state machine is in the delayed online state, forcibly send a link failure to the switch and perform a delayed online timing. If the status of the line-side signal is detected to be abnormal before the delayed online timing reaches the delayed online time, switch the state machine to the downlink state; otherwise, until the delayed online timing reaches the delayed online time, send a normal code stream to the switch and switch the state machine to the normal state.

2. The method for Ethernet Link Up and Link Down according to claim 1, wherein When it is detected that the status of the line-side signal is abnormal, switching the state machine to the delayed downlink state specifically includes: If the delayed downlink function switch is turned on and the delayed downlink time is greater than the first preset value, when it is detected that the status of the line-side signal is abnormal, switch the state machine to the delayed downlink state; If the delayed downlink function switch is not turned on, or the delayed downlink time is not greater than the first preset value, when it is detected that the status of the line-side signal is abnormal, switch the state machine to the downlink state.

3. The method for Ethernet Link Up and Link Down according to claim 1, characterized in that, When it is detected that the status of the line-side signal returns to the normal state, switching the state machine to the delayed online state specifically includes: If the delayed online function switch is turned on and the delayed online time is greater than the second preset value, when it is detected that the status of the line-side signal returns to the normal state, switch the state machine to the delayed online state; If the delayed online function switch is not turned on, or the delayed online time is not greater than the second preset value, when it is detected that the status of the line-side signal returns to the normal state, switch the state machine to the normal state.

4. The method for Ethernet Link Up and Link Down according to claim 1, characterized in that, Until the delayed online timing reaches the delayed online time, sending a normal code stream to the switch and switching the state machine to the normal state specifically includes: If the delayed online function switch is turned off before the delayed online timing reaches the delayed online time, directly switch the state machine to the normal state; Otherwise, when the delayed online timing reaches the delayed online time, send a normal code stream to the switch and switch the state machine to the normal state.

5. The method for Ethernet Link Up and Link Down according to claim 1, wherein Until the delayed downlink timing reaches the delayed downlink time, switching the state machine to the downlink state specifically includes: If the delayed online function switch is turned on and the delayed activation time is greater than the third preset value, when the delayed downlink timing reaches the delayed downlink time, switch the state machine to the delayed activation state; If the delayed online function switch is not turned on, or the delayed activation time is not greater than the third preset value, then when the delayed downlink timing reaches the delayed downlink time, switch the state machine to the downlink state.

6. The method for Ethernet Link Up and Link Down according to claim 5, characterized in that The method further includes: If the delay offline function switch is turned off before the delay downlink time is reached during the delay downlink timing, it is determined whether the delay uplink function switch is turned on. If it is determined that the delay uplink function switch is turned on, the state machine is directly switched to the delay activation state; if it is determined that the delay uplink function switch is not turned on, the state machine is switched to the downlink state.

7. The method for Ethernet Link Up and Link Down according to claim 5, characterized in that, When the state machine is in the delay activation state, a link fault is sent to the switch, and delay activation timing is performed. If the state of the line-side signal is monitored to return to the normal state before the delay activation timing reaches the delay activation time, the state machine is switched to the normal state. Otherwise, when the delay activation timing reaches the delay activation time, the state machine is switched to the downlink state.

8. The method for Ethernet Link Up and Link Down according to claim 7, characterized in that, The method further includes: If the delay uplink function switch is turned off before the delay activation timing reaches the delay activation time, the state machine is directly switched to the downlink state.

9. The method for Ethernet Link Up and Link Down according to any one of claims 1-8, characterized in that, Both the sending of the idle frame to the switch and the sending of the link fault to the switch are implemented by setting the automatic downlink pattern, specifically including: After setting the automatic downlink pattern to IDLE, when the line-side signal is interrupted, an idle frame is sent to the switch. After setting the automatic downlink pattern to LocalFault, when the line-side signal is interrupted, a link fault is sent to the switch.

10. An apparatus for Ethernet Link Up and Link Down, characterized in that, The device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the processor, are used to execute the method for Ethernet Link Up and Link Down according to any one of claims 1-9.

Citation Information

Patent Citations

  • Switching method and device of OLP transmission link, storage medium and OLP

    CN110995336A

  • System, method and device for maintaining network stability of data center

    CN115396308A