Method and device for notifying fault state of side link of access circuit
Technical Field
The present invention relates to a protection Switching technique in a two-Layer Virtual Private Network (L2 VPN) of a Multi-Protocol Label Switching (MPLS), and in particular, to a method and an apparatus for notifying an Access Circuit (AC) side link fault state.
Background
A protection Switching scheme provided by a Multi-Protocol Label Switching (MPLS) two-Layer Virtual Private Network (L2 VPN) is a Pseudo Wire (PW) dual-homing protection scheme, and its composition structure is shown in fig. 1: a Customer Edge (CE) device 1 is connected to a Provider Edge (PE, Provider Edge) device 1, and the PE device 1 doubly returns to a PE device 2 and a PE device 3 through a main PW and a standby PW, where the PE device 1 is a network device that manages the main/standby PW, a path between the PE device 1 and the PE device 2 is a path taken by a main pseudo wire PW1, and a path between the PE device 1 and the PE device 3 is a path taken by a standby pseudo wire PW 2; the link between the PE device 2 and the CE device 2 is an AC-side link. The PW dual-homing protection method comprises the following steps: under normal conditions, the working pseudo wire of the PE device 1 is PW1, and when the PE device 1 determines that a device or a link on PW1 or an AC side link fails, the PE device 1 switches the service to a standby pseudo wire PW 2; when PE device 1 determines that the device or link on PW1, or the AC side link, failed, PE device 1 switches service back to PW 1.
In the above PW dual-homing protection method, the PE device 1 determines whether a PW side link fails and whether the failure is eliminated, and the determination is implemented by an Operation, Administration and maintenance (OAM) Connectivity detection (CC) message, specifically: the PE equipment 2 continuously sends OAMC messages to the PE equipment 1, and once the PE equipment 1 detects that the OAMC messages sent by the PE equipment 2 are not received by the PE equipment, a PW side link is judged to be in fault; and when the PE equipment 1 receives the OAMC message again, judging that the PW side link fault is eliminated. In the PW dual-homing protection method, the PE device 1 determines whether the AC side link fails and whether the Failure is eliminated, and both the determination are implemented by detecting a Client Signal Failure (CSF) message, specifically: the PE equipment 1 detects whether the CSF message sent by the PE equipment 2 is received or not in real time, and if the CSF message is received, the PE equipment 1 judges that the AC side fails; after the PE device 1 opens the standby path PW2, it still detects in real time whether a CSF message sent by the PE device 2 is received, and if the PE device 1 does not receive a CSF message sent by the PE device 2 for a plurality of consecutive cycles (usually three cycles), the PE device 1 determines that the AC side link failure is resolved.
However, when determining that the AC side link failure is resolved, compared with the method for determining PW side link failure resolution, since the sending period of the CSF message is long (for example, the sending period of the CSF message is one second in general), and the PE device 1 needs to perform determination by using CSF messages of multiple periods, the switchback is slow; especially, when the system requires zero-delay cutback (WTR), the PE device 1 cannot timely determine whether the AC side link fault is resolved, so that the cutback speed cannot meet the requirement, thereby further affecting the reliability of the network.
It can be seen that, in the existing method for determining whether the AC side link fault is eliminated, due to the fact that much time is spent, the back switching is slow, and then a large amount of packet is lost, which affects the reliability of the network.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method and an apparatus for notifying an AC sidelink fault state, which can enable an OAM state of a PW sidelink to be linked with an OAM state of an AC sidelink, reduce time taken to determine whether an AC sidelink fault is eliminated, improve a back-cut speed, further reduce a network packet loss rate, and improve network reliability.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for notifying an AC side link fault state, which comprises the following steps:
if the state of the AC side link is determined to be changed from the fault to the normal state, restarting to send the OAM CC message;
and if the condition that the link at the AC side is changed from normal to failure is determined, stopping sending the OAMC message.
In the foregoing solution, before determining that the state of the AC-side link changes from the failure to the normal state, the method further includes: judging whether the current AC side link is in a normal working state, if so, detecting whether the state of the AC side link is changed from normal to fault in real time; if not, detecting whether the state of the AC side link is changed from the fault to normal or not in real time.
In the foregoing solution, after the detecting in real time whether the state of the AC side link changes from the fault to normal, the method further includes: if the AC side link is determined to be changed from the fault state to the normal state, restarting sending the OAMC message, and continuing to judge whether the current AC side link is in the normal working state; otherwise, it is continuously detected whether the state of the AC side link changes from failure to normal.
In the foregoing solution, after the detecting in real time whether the state of the AC side link changes from normal to failure, the method further includes: if the AC side link is determined to be changed from normal to fault, stopping sending the OAMCC message, and continuing to judge whether the current AC side link is in a normal working state; otherwise, it is continuously detected whether the state of the AC side link changes from normal to failure.
The present invention also provides an apparatus for notifying an AC side link failure state, the apparatus including: an active party OAM module and a follower party OAM module; wherein,
the active side OAM module is used for informing the following side OAM module to restart sending the OAMC message when the state of the AC side link is determined to be changed from the fault to the normal state; when the state of the AC side link is determined to be changed from normal to fault, informing the following party of the OAM module to stop sending the OAM CC message;
and the following party OAM module is used for sending the OAMCC messages or stopping sending the OAMCC messages according to the notification of restarting sending the OAMCC messages or stopping sending the OAMCC messages sent by the active party OAM module.
In the above scheme, the active OAM module is further configured to determine whether a current AC side link is in a normal operating state, and if so, start to detect whether a state of the AC side link changes from normal to a fault in real time; if not, real-time detection is started to determine whether the state of the AC side link is changed from failure to normal.
In the foregoing solution, the active OAM module is specifically configured to, when it is determined that the state of the AC side link changes from the fault to the normal state, notify the following OAM module to restart sending an OAM CC message, and then continue to determine whether the current AC side link is in the normal working state; otherwise, it is continuously detected whether the state of the AC side link changes from failure to normal.
In the foregoing solution, the active OAM module is specifically configured to notify the following OAM module to stop sending an OAM CC message when it is determined that the state of the AC side link changes from normal to faulty, and then continue to determine whether the current AC side link is in a normal working state; otherwise, it is continuously detected whether the state of the AC side link changes from normal to failure.
The method and the device for notifying the fault state of the AC side link can enable the network equipment to control the sending of the network equipment and stop sending the OAM CC message according to the state of the AC side link, and link the OAM state of the AC side link to the OAM state of the PW side link, so that the corresponding network equipment for managing the main/standby path does not need to make modification, still uses a mechanism for detecting the OAM CC message in the prior art, and carries out switching and back switching along with the state of the AC side link;
in addition, when the invention is used, the OAMC message can be sent again when the state of the AC side link is determined to be changed from the fault to the normal state, so that the control of the sending of the OAMC message according to the state of the AC side link can be realized, and the back switching can be carried out along with the state of the AC side link under the condition that the corresponding network equipment for managing the main/standby path does not need to be modified, therefore, the problem that the back switching speed is influenced because the fault elimination of the AC side link can be determined through a plurality of CSF message periods in the prior art can be avoided, the aims of reducing the time for judging whether the fault of the AC side link is eliminated and improving the back switching speed are achieved, and the network packet loss rate is reduced and the network reliability is improved through improving the back switching speed.
Drawings
FIG. 1 is a schematic structural diagram of a PW dual homing protection scheme;
FIG. 2 is a flow chart of a method for notifying an AC side link fault state according to the present invention;
fig. 3 is a schematic structural diagram of the notification apparatus for AC side link failure state according to the present invention.
Detailed Description
The basic idea of the invention is: if the state of the AC side link is determined to be changed from the fault to the normal state, restarting to send the OAM CC message; and if the condition that the link at the AC side is changed from normal to failure is determined, stopping sending the OAMC message.
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The method for notifying the fault state of the AC side link, as shown in FIG. 2, comprises the following steps:
step 101: judging whether the current AC side link is in a normal working state, if so, executing a step 102; if not, go to step 104.
Here, the determination of whether the current AC side link is in the normal operation state is: according to the OAM function of the ethernet in the prior art (an OAM discovery mechanism in IEEE 802.3ah may be used, or a Connection Fault Management (CFM) function in IEEE 802.1ag may be used), or according to the specified judgment in the Bidirectional Forwarding Detection (BFD) technology in the prior art, the following may be determined: on the AC side link of the PE device, the judgment is performed by turning on its own ethernet OAM function or BFD function, which is not described herein again.
Step 102: detecting whether the state of the AC side link changes from normal to fault in real time, if so, executing step 103; otherwise, step 102 is repeated.
Here, the detecting whether the state of the AC side link changes from normal to failure may be performed according to the existing ethernet OAM function or the specification in the BFD technology, and may be: the PE equipment starts the Ethernet OAM function or BFD function of the PE equipment to detect the state of the AC side link connected with the PE equipment.
Step 103: and stopping sending the OAM CC message, and returning to the step 101.
Here, the composition and the sending method of the OAM CC message are prior art, and are not described herein again.
After the step 103 is completed, if the network device managing the primary/backup path detects that the OAMCC message is not received, the service on the primary path is switched to the backup path according to the prior art, which is not described herein again; the network device for managing the main/standby path is as follows: the network device at the network location where the PE device 1 shown in fig. 1 is located manages switching between the active path and the standby path and back-switching according to the prior art.
Step 104: detecting whether the state of the AC side link is changed from a fault to normal in real time, and if so, executing step 105; otherwise, step 104 is repeated.
Here, the detecting whether the state of the AC side link changes from the failure to the normal state is performed according to the specification of the existing ethernet OAM function or the BFD technology, and may be: the PE device detects the state of the AC side link connected with the PE device by starting the Ethernet OAM function or the BFD function of the PE device.
Step 105: and restarting sending the OAM CC message, and returning to the step 101.
After step 105 is completed, the network device that manages the primary/backup path and receives the OAM CC packet switches back the service to the primary path according to the prior art, which is not described herein.
The present invention provides an apparatus for notifying an AC side link failure state, as shown in fig. 3, including: an active side OAM module 21 and a follower side OAM module 22; wherein,
the active side OAM module 21 is configured to notify the following side OAM module 22 to restart sending an OAM CC message when it is determined that the state of the AC side link changes from a failure to normal; and when determining that the state of the AC side link changes from normal to failure, notifying the following party OAM module 22 to stop sending the OAM CC message;
and the following party OAM module 22 is configured to send an OAM CC message or stop sending the OAM CC message according to the notification that the active party OAM module 21 restarts sending the OAM CC message or stops sending the OAM CC message.
The active OAM module 21 is further configured to determine whether the current AC side link is in a normal operating state, and if so, start to detect whether the state of the AC side link changes from normal to a fault in real time; if not, real-time detection is started to determine whether the state of the AC side link is changed from failure to normal.
The active OAM module 21 may detect whether the current AC side link is in a normal working state, whether the state of the AC side link changes from normal to failure, and whether the state of the AC side link changes from failure to normal by starting its own ethernet OAM function or BFD function, where a specific implementation method is the prior art and is not described herein.
The active OAM module 21 is specifically configured to send a notification to stop sending the OAM CC message to the follower OAM module 22 when it is determined that the state of the AC side link changes from normal to faulty.
The following party OAM module 22 sends an OAM CC message to the corresponding network device according to the technology specified by the existing MPLS-TP OAM function, which is not described herein again.
The active OAM module 21 is specifically configured to send a notification to restart sending an OAM CC message to the following OAM module 22 when it is determined that the state of the AC side link changes from the failure to the normal state.
The active side OAM module and the follower side OAM module can be used as functional modules to be installed in PE equipment connected with an AC side link.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.