CN101667927B - Method and device for rapidly restoring service - Google Patents
Method and device for rapidly restoring service Download PDFInfo
- Publication number
- CN101667927B CN101667927B CN2009100927543A CN200910092754A CN101667927B CN 101667927 B CN101667927 B CN 101667927B CN 2009100927543 A CN2009100927543 A CN 2009100927543A CN 200910092754 A CN200910092754 A CN 200910092754A CN 101667927 B CN101667927 B CN 101667927B
- Authority
- CN
- China
- Prior art keywords
- routing device
- value
- vrrp
- message
- backup group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000001514 detection method Methods 0.000 claims abstract description 54
- 238000012544 monitoring process Methods 0.000 claims abstract description 31
- 230000006855 networking Effects 0.000 claims description 15
- 101000641224 Homo sapiens Vimentin-type intermediate filament-associated coiled-coil protein Proteins 0.000 claims description 12
- 102100034331 Vimentin-type intermediate filament-associated coiled-coil protein Human genes 0.000 claims description 12
- 238000011084 recovery Methods 0.000 claims 1
- 238000004891 communication Methods 0.000 abstract description 11
- 206010024119 Left ventricular failure Diseases 0.000 description 33
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a method and a device for rapidly restoring service. The method is applied to a VRRPE backup group consisting of a plurality of routers, each router is positioned in a plurality of VFs, each VF comprises a router taking charge of an AVF and at least one router taking charge of an LVF; the method comprises the following steps: A. the router with the highest priority is selected from the router taking charge of an LVF in each VF as a candidate device of the router taking charge of an AVF in the VFs, and the total number of the routers with the highest priority to take charge of AVFs in the current VF is minimum; and B. the candidate device of the router taking charge of an AVF in the VFs is used for establishing a rapid detection session for monitoring the router taking charge of an AVF in the VFs and is also used for replacing the work of the router with failure through the rapid detection session after finding out the fact that the router taking charge of an AVF is out of service. By adopting the method and the device, the requirements on real-time communication can be met.
Description
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and a device for quickly recovering a service.
Background
In the network communication technology, a standard Virtual Router Redundancy Protocol (VRRP) is a Virtual router which adds a plurality of router devices having gateway functions to a VRRP backup group, and the VRRP backup group externally represents a Virtual router having a unique fixed primary IP address (Virtual IP address) and a Virtual MAC address. The multiple routing devices in the VRRP Backup group select a routing device (MR) which takes the main role as a Master Router according to a VRRP election mechanism and is responsible for forwarding the flow, and the other routing devices (BR) which take the standby roles as Backup routers are responsible for monitoring the MR, and reselect the MR when monitoring that the MR fails.
In the VRRP backup group, the MR is responsible for sending VRRP messages at intervals of notification time so as to indicate that the forwarding performance is normal. The notification time interval is 1 second, namely the MR sends VRRP messages every 1 second; correspondingly, each BR in the VRRP backup group is responsible for monitoring the VRRP messages sent by the MR. When the MR fails, each BR waits for at least 1 × 3 ═ 3 seconds before receiving the VRRP message, determines that the MR in the VRRP backup group where the BR is located fails, then elects the MR again according to the VRRP election mechanism, and the elected MR replaces the service processing work of the failed MR. It can be seen that in the standard VRRP, when an MR fails, each BR needs to wait at least 3 seconds before reselecting the MR, so that the service processed by the failed MR is interrupted for at least 3 seconds. For some applications of high-reliability services, the service interruption time is usually required to be less than 50 milliseconds (ms), while the existing service interruption time is relatively long and far cannot meet the requirements of real-time communication.
The above technical problems also exist in the developing Virtual Router Redundancy Protocol Extension (VRRPE). In the VRRPE, the routing devices in the same VRRPE backup group may be in multiple Virtual forwarders (VFs, Virtual forwarders), each VF includes a routing device that serves as an Active Virtual Forwarder (AVF) and is responsible for forwarding traffic, and at least one routing device that serves as a monitoring Active Virtual Forwarder (LVF), and it can be seen that the routing device in the VRRPE backup group may serve as an AVF in one VF or as an LVF in another VF. As shown in fig. 1, if the routing devices a to D are in the same VRRPE backup group, where the routing devices a to D are respectively in 4 VFs, specifically, the routing device a serves as AVF, the routing device B to D serves as VF1 of LVF, the routing device B serves as AVF, the routing device a, C and D serve as VF2 of LVF, the routing device C serves as AVF, the routing device a, B and D serve as VF3 of LVF, and the routing device D serves as VF4 of LVF.
In the VRRPE backup group, the routing equipment which acts as AVF in each VF is responsible for sending VRRPE messages at intervals of notification time, wherein the notification time interval is 1 second, namely, the routing equipment which acts as AVF sends the VRRPE messages at intervals of 1 second; correspondingly, each routing device serving as the LVF in the VF is responsible for monitoring the VRRPE packet sent by the routing device serving as the AVF, when the routing device serving as the AVF fails, each routing device serving as the LVF waits for at least 1 × 3 ═ 3 seconds before receiving the VRRPE packet, then determines that the routing device serving as the AVF in the VF in which the routing device is located fails, and then re-elects the routing device serving as the AVF according to a preset competition policy, and the elected routing device actively takes over the operation of the failed routing device. It can be seen that, in VRRPE, when a router functioning as an AVF fails, each router functioning as an LVF needs to wait at least 3 seconds before reselecting the router functioning as the AVF, so that the service processed by the failed AVF is interrupted for at least 3 seconds. For some applications of high-reliability services, the service interruption time is usually required to be less than 50 milliseconds (ms), while the existing service interruption time is relatively long and far cannot meet the requirements of real-time communication.
Therefore, it is a technical problem to be solved at present to quickly recover the service within the time required by the real-time communication requirement.
Disclosure of Invention
The invention provides a method and equipment for rapidly recovering service so as to meet the requirement of real-time communication.
A method for fast recovering service is applied to virtual router redundancy protocol extension VRRPE backup group containing multiple routing devices, each routing device is in multiple virtual forwarders VF, each VF contains a routing device which is used as an active virtual forwarder AVF and at least one routing device which is used as a monitoring active virtual forwarder LVF; the method comprises the following steps:
selecting a routing device with the highest priority from the routing devices which are contained in each VF and are used as a candidate device corresponding to the routing device which is used as the AVF in the VF, wherein the total number of the routing devices with the highest priority used as the AVF in the current VF is the minimum;
and B, the selected candidate device establishes a rapid detection session for monitoring the routing device which plays the role of AVF in the corresponding VF, and when the rapid detection session learns that the routing device which plays the role of AVF has a fault, the selected candidate device takes over the work of the routing device which has the fault.
A method for fast recovering service is applied to Virtual Router Redundancy Protocol (VRRP) networking containing a plurality of routing devices, each routing device takes the main role in different VRRP backup groups, and takes the standby roles in other VRRP backup groups except the VRRP backup group taking the main role; pre-configuring the priority of each routing device in each VRRP backup group; the method comprises the following steps:
a, selecting a routing device with the highest priority from routing devices BR which are contained in each VRRP backup group and play a standby role as a candidate device of a routing device MR which plays a main role in the VRRP backup group;
and B, the candidate device of the MR in the VRRP backup group establishes a rapid detection session for monitoring the MR, and takes over the work of the failed MR when the MR is known to be failed through the rapid detection session.
An apparatus for fast recovering service, the apparatus is applied to a virtual router redundancy protocol extension VRRPE backup group including a plurality of routing devices, each routing device is located in a plurality of virtual forwarders VF, each VF includes a routing device functioning as an active virtual forwarder AVF and at least one routing device functioning as a monitoring active virtual forwarder LVF, the apparatus includes: the device comprises a first selection unit, a first session establishing unit and a first switching unit;
the first selecting unit selects a routing device with the highest priority as a candidate device corresponding to a routing device which serves as an AVF in each VF and is included in the VF, wherein the total number of the routing devices with the highest priority serving as the AVF in the existing VF is the minimum;
the first session establishing unit is used for establishing a rapid detection session between the candidate device and the routing device which serves as the AVF in the corresponding VF;
the first switching unit is used for triggering the candidate device corresponding to the routing device functioning as the AVF to take over the work of the routing device functioning as the AVF with the fault when the fact that the routing device functioning as the AVF has the fault is obtained through the rapid detection session.
A device for rapidly recovering service is applied to VRRP networking of a virtual router redundancy protocol containing a plurality of routing devices, wherein each routing device plays a main role in different VRRP backup groups, and plays backup roles in other VRRP backup groups except the VRRP backup group playing the main role; the apparatus comprises: the device comprises a configuration unit, a second selection unit, a second session establishment unit and a second switching unit; wherein,
the configuration unit is used for configuring the priority of each routing device in each VRRP backup group in advance;
the second selection unit is used for selecting the routing equipment with the highest priority from the routing equipment BR which is contained in each VRRP backup group and plays a standby role as the candidate equipment of the routing equipment MR which is in the VRRP backup group and plays a main role;
the second session establishing unit is used for establishing a rapid detection session for monitoring the MR between the candidate device of the MR in the VRRP backup group and the MR in the VRRP backup group;
the second switching unit is used for triggering the candidate equipment of the MR in the VRRP backup group to take over the work of the failed MR when the failure of the MR in the VRRP backup group is known through the rapid detection session.
It can be seen from the above technical solutions that, in the method and the device for quickly recovering a service provided by the present invention, a corresponding candidate device is selected for a device responsible for traffic forwarding, such as a routing device acting as an AVF in a VRRPE backup group or an MR in a VRRP, and the selected candidate device establishes a quick detection session for monitoring the corresponding device responsible for traffic forwarding; and when the equipment responsible for the traffic forwarding is known to be out of order by using the rapid detection session, the equipment which is out of order is taken over. Compared with the prior art, the method provided by the embodiment of the invention has the advantages that when the equipment responsible for traffic forwarding fails, the operation of the equipment responsible for traffic forwarding does not need to be reselected within the time of waiting for at least 3 seconds in the prior art, but the candidate equipment directly takes over the work of the equipment when knowing that the equipment responsible for traffic forwarding fails by using the rapid detection session, generally, the detection time of the rapid detection session is less than 50ms, so that the purpose of rapidly recovering the service when the equipment responsible for traffic forwarding fails is realized, and the requirement of real-time communication can be met.
Drawings
Fig. 1 is a diagram of VRRPE networking in the prior art;
FIG. 2 is a flow chart provided by an embodiment of the present invention;
FIG. 3 is a detailed flow chart corresponding to FIG. 2 provided by an embodiment of the present invention;
FIG. 4 is another detailed flow chart provided by an embodiment of the present invention;
FIG. 5 is a diagram of a VRRP networking provided by an embodiment of the invention;
fig. 6 is a block diagram of the apparatus of fig. 2 or fig. 3 according to an embodiment of the present invention;
fig. 7 is a block diagram of the apparatus corresponding to fig. 4 according to an embodiment of the present invention.
Detailed Description
The method provided by the embodiment of the invention mainly comprises the following steps: selecting a corresponding candidate device for a device responsible for traffic forwarding, such as a routing device acting as an AVF in a VRRPE backup group or an MR in a VRRP, and establishing a fast detection session for monitoring the corresponding device responsible for traffic forwarding by the selected candidate device; and when the equipment responsible for the traffic forwarding is known to be out of order by using the rapid detection session, the equipment which is out of order is taken over. Compared with the prior art, the method provided by the embodiment of the invention has the advantages that when the equipment responsible for traffic forwarding fails, the operation of the equipment responsible for traffic forwarding does not need to be reselected within the time of waiting for at least 3 seconds in the prior art, but the candidate equipment directly takes over the work of the equipment when knowing that the equipment responsible for traffic forwarding fails by using the rapid detection session, generally, the detection time of the rapid detection session is less than 50ms, so that the purpose of rapidly recovering the service when the equipment responsible for traffic forwarding fails is realized, and the requirement of real-time communication can be met.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Referring to fig. 2, fig. 2 is a flow chart provided by the embodiment of the invention. In this embodiment, the process is applied to a VRRPE backup group including a plurality of routing devices, each routing device is located in a plurality of virtual forwarders VF, and each VF includes a routing device functioning as an AVF and at least one routing device functioning as an LVF; as shown in fig. 2, the process may include the following steps:
Here, the total number of AVFs that the highest priority routing device can assume among currently existing VFs is the smallest. For example, the VRRPE backup group has 3 routing devices, which are respectively routing device a to routing device C, wherein, each routing device can be in 3 VFs, and the route device A is used as AVF, the route device B to the route device D are used as VF1 of LVF, with routing device a acting as an AVF, routing device B to routing device D acting as a VF2 for LVF, with routing device C acting as an AVF, routing device a, routing device B, and routing device D acting as VFs 3 for LVFs, since routing device a is currently acting as an AVF for two VFs (VF1 and VF2), routing device C is acting as an AVF for 1 VF, thus, for VF1, routing device B to routing device C act as LVFs for VF1 in step 201, since routing device C is currently also acting as the AVF for VF3, while routing device B is not currently acting as the AVF for any VF, in this manner, the candidate device of the routing device a that serves as an AVF in the VF1 is determined to be routing device C.
In step 202, the selected candidate device establishes a fast detection session for monitoring the routing device serving as AVF in the corresponding VF.
Here, the fast detection session in step 202 may be implemented as a Bidirectional Forwarding Detection (BFD) session, or other sessions with a fast detection function, and the embodiment of the present invention is not limited in particular. The following embodiments are all exemplified by BFD sessions for ease of description.
And step 203, when the candidate device learns that the corresponding routing device serving as the AVF fails through the rapid detection session, taking over the operation of the failed routing device.
Here, after the rapid detection session is established, the candidate device receives the rapid detection session message sent by the corresponding routing device functioning as the AVF every detection time, and when the rapid detection session message sent by the corresponding routing device functioning as the AVF is not received within a detection time, the candidate device considers that the routing device functioning as the AVF is faulty, and thus, the candidate device actively takes over the faulty routing device to process the service. It can be seen that, in the method provided in the embodiment of the present invention, it is not necessary for the candidate device to wait for at least 3 seconds to take over the processing service of the failed routing device, but instead, after failing to receive the rapid detection session packet in a detection time, it is actively taken over the processing service of the failed routing device, and those skilled in the art know that the detection time of the rapid detection session, for example, the detection time of the BFD session, is at most 40ms, so that the candidate device can know that the routing device serving as the AVF is failed in 40ms, and can quickly recover the service in 40ms, and meet the requirement of real-time communication (the required service interruption time is less than 50 ms).
To make the process shown in fig. 2 clearer, the process is described in detail below with reference to specific embodiments.
Referring to fig. 3, fig. 3 is a detailed flowchart corresponding to fig. 2 according to an embodiment of the present invention. The present embodiment is applied to VRRPE networking, and specifically takes the VRRPE networking shown in fig. 1 as an example. As shown in fig. 1, the routing devices a to D are in the same VRRPE backup group, such as backup group 1, where the routing device a is an MR. There are 4 VFs in backup group 1, which are VF1 with which the routing device a, routing device B, to routing device D, LVF, VF2 with which the routing device a, routing device C, to routing device D, LVF, VF3 with which the routing device C, routing device a, routing device B, and routing device D, and VF4 with which the routing device a, to routing device C, LVF, and routing device D, respectively. Then, as shown in fig. 3, the process may include the following steps:
step 301, for each VF currently existing, if the routing device acts as an AVF in the VF, the candidate flag bit of the routing device in the VF is set to a second value, and if the routing device acts as an LVF in the VF, the candidate flag bit of the routing device in the VF is set to a first value.
Preferably, in this embodiment, the first value is True (True), and the second value is False (False) for example.
As can be seen from fig. 1, there are currently a VF2 in which the routing device a serves as an AVF, the routing device B to the routing device D serves as an LVF, the routing device a, the routing device C to the routing device D serves as an LVF, the routing device C to the routing device D serves as an AVF, the routing device a, the routing device B, and the routing device D serves as a VF3 of the LVF, and the routing device D serves as an AVF, and the routing device a to the routing device C serve as a VF4 of the LVF, so that, when step 301 is executed, the values of candidate flag bits of the routing device a in the VF1 are False, the values of candidate flag bits of the VF2 to VF4 are True, the values of candidate flag bits of the routing device B in the VF2 are False, the values of candidate flag bits of the VF1, VF3 and 4 are True, the values of candidate flag bits of the routing device B in the VF2 are False flag bits of the VF 7384 and the routing device C are VF 4642, the candidate flag bit of the routing device D in VF4 has the value False and the candidate flag bits in VF1 to VF3 have the value True.
Step 302, each routing device which is responsible for AVF in backup group 1 sends a first VRRPE message every preset time 1, and each routing device which is not responsible for AVF in any VF currently existing in backup group 1 sends a second VRRPE message.
Here, the preset time 1 may be VRRPE message sending time, and typically, the VRRPE message sending time is 1 second.
The first VRRPE message sent by the routing device serving as the AVF carries the total number of AVFs that the routing device serves as in the currently existing 4 VFs, for example, if the routing device a only serves as the AVF in VF1 of the currently existing 4 VFs and serves as the LVF in other VFs, the total number of AVFs carried by the first VRRPE message sent by the routing device a is 1.
Here, the purpose of sending the second VRRPE packet by the routing device not serving as the AVF in any currently existing VF in the backup group 1 is mainly to participate in election of the candidate device, which is specifically described below. The second VRRPE packet does not carry any VF option compared to the first VRRPE packet, and may be specifically similar to a VRRP packet in a VRRP. Because the second VRRPE packet does not carry any VF option, here, when the routing device receives the second VRRPE packet, it can directly default that the total number of AVFs carried by the second VRRPE packet is 0.
Here, since the second VRRPE packet does not carry any VF option compared to the first VRRPE packet, in this step 303, it can be determined whether the received packet is the first VRRPE packet or the second VRRPE packet according to whether the received packet carries a VF option.
Generally, each routing device records the operation status of itself in each VF, for example, the routing device a records the status information of itself acting as AVF in VF1 and acting as LVF in VF2 to VF4, so that the routing device can determine whether itself acts as AVF in this VF according to the recorded operation status in this step 304. Taking the example that the routing device a receives the first VRRPE message sent by the routing device B which serves as the AVF in the VF2, in step 304, the routing device a determines that it itself serves as the AVF in the VF1 according to the recorded operating state for the VF1 in which it is located, and then step 305 is executed. The routing device a performs similar processing to the VF1 for the VF2, the VF3, and the VF4 where it is located, for example, if it determines that it is acting as an LVF in the VF2 according to the recorded running state, step 306 is performed.
Here, taking the example that the routing device a receives the first VRRPE packet sent by the routing device B which serves as an AVF in the VF2, in step 304, the routing device a determines that itself serves as an AVF in the VF1, and thus, when this step 305 is executed, the routing device a maintains the value of the candidate flag bit in the VF 1. Since the candidate flag bit value of the routing device a in the VF1 in step 301 is False, the value of the candidate flag bit of the routing device a in the VF1 is still False when the present step 305 is executed.
Here, taking the example that the routing device a receives the first VRRPE packet sent by the routing device B that serves as the AVF in the VF2, in step 304, the routing device a determines that itself does not serve as the AVF in the VF2, and thus, step 306 is executed. When step 306 is executed, if the VF currently addressed by the routing device a is the VF2 where the routing device a is located, because the first VRRPE packet is sent by the routing device B serving as an AVF in the VF2, the VMAC address of the VF carried by the first VRRPE packet is obviously the VMAC address of VF2, so that the routing device a obviously determines that the VMAC address carried by the received VRRPE packet is the same as the VMAC address of the VF2, and goes to step 305; otherwise, step 307 is executed. Here, since step 305 is to maintain the value of the candidate flag bit of the router in the VF, and the candidate flag bit of the router a in the VF2 is set to True in step 302, when this step 306 is executed, if the VMAC address is the same, the value of the candidate flag bit of the router a in the VF2 is still set to True.
It should be noted that step 306 may not be executed in this embodiment; but directly performs step 307 described below. The step 306 is executed mainly to determine that the currently received first VRRPE packet is sent by a routing device that serves as an AVF in which VF, for example, if the VMAC address carried by the first VRRPE packet is the VMAC address corresponding to VF2, when the step 306 is executed, it is determined that the currently received first VRRPE packet is sent by a routing device that serves as an AVF in VF 2. If the VF2 serves as the LVF, it may be used as a candidate device for the AVF in the VF2, and thus the process returns to step 305, that is, the operation that the value of the candidate flag bit in the VF2 of the routing device a is still True is maintained.
Here, the total number of AVFs carried in the first VRRPE packet is specifically the total number of AVFs that the routing device sending the first VRRPE packet plays in the currently existing 4 VFs.
It should be noted that, in this step 307, if the two are equal, the step 305 may be executed instead of the following step 308, however, the number of candidate devices for AVF in one VF may be larger than 1. For example, as shown in fig. 1, taking VF1 as an example, if it is determined in step 307 that the values are equal, step 305 is executed, and it can be obtained according to the description in step 301 that the candidate flag bits in VF1 of the routing device serving as the LVF in VF1 are all True, so that when step 313 is executed, the number of candidate devices serving as routing device a of the LVF in VF1 is 3, and these candidate devices are routing device B to routing device D, respectively. Therefore, the present embodiment preferably executes step 308 when it is determined that the two are equal.
Here, the relevant attribute value carried in the first VRRPE packet is a relevant attribute value of the routing device that sends the first VRRPE packet, where the relevant attribute value of the routing device may be implemented in various forms, for example, the relevant attribute value may be an interface IP address of the routing device or a number of the routing device, and the embodiment of the present invention is not limited in particular. Taking the relevant attribute value as the interface IP address as an example, the determination in step 308 includes: and judging whether the interface IP address carried by the first VRRPE message is less than or equal to the own interface IP address.
Therefore, the value taking operation of the candidate zone bits on each routing device is realized through the operation.
Here, each routing device in the network is not time-synchronized, and thus, each routing device that needs to send a VRRPE packet (including the first VRRPE packet and the second VRRPE packet) does not send the VRRPE packet at the same time, and therefore, before executing this step 313, it is necessary to estimate, according to the actual situation, the time that all the routing devices that need to send the VRRPE packet in the VRRPE backup group 1 complete sending, that is, the preset time 2 in step 313. Generally, the preset time 2 may be 2 times the preset time 1.
Here, when the routing device determines that the value of the candidate flag bit in the VF is True, it indicates that the routing device itself serves as a candidate device of the routing device serving as the AVF in the VF; if the value of the candidate flag bit in the VF is determined to be False, it indicates that the VF itself is not a candidate device for serving as a routing device of the AVF. For example, if the routing device D determines that the value of the candidate flag bit in the VF1 is True, it indicates that it is a candidate device of the routing device (specifically, the routing device a) serving as the AVF in the VF 1.
It should be noted that, the execution of step 314 may specifically be: the routing equipment judges whether a BFD session of the routing equipment used for monitoring the AVF in the VF exists currently, and if so, the VF is directly registered to the BFD session; otherwise, a BFD session is established for monitoring the routing devices in the VF that are acting as AVFs. For example, if a BFD session for monitoring the routing device serving as AVF in VF1 is established on the routing device D, and if the process goes to step 313, the routing device D determines that the value of the candidate flag bit in VF3 is True, where the routing device serving as AVF in VF3 is routing device a, and thus when the process goes to this step 314, since a BFD session corresponding to VF1 exists between the routing device D and the routing device a, in order to save network resources, VF3 is directly registered in the BFD session, that is, the routing device serving as AVF in VF1 and the routing device serving as AVF in VF3 are monitored through the same BFD session.
Thus, through steps 313 to 315, a BFD session is established between the candidate device and the corresponding routing device functioning as an AVF.
And step 316, when the candidate device monitors that the corresponding routing device serving as the AVF fails through the BFD session, taking over the service processed by the failed routing device.
For example, the routing device D establishes a BFD session for monitoring the routing device a serving as the AVF in the VF1, and as can be known from the prior art, the BFD is mainly used for monitoring the status of link and IP route forwarding in the network, so that when the routing device a fails, the routing device D does not receive the BFD session packet sent by the routing device a, and thus, the routing device D can directly take over the work of the routing device a and serve as the AVF in the VF 1.
It should be noted that, in the embodiment of the present invention, the candidate device is not unchanged after the determination, but dynamically changes. Therefore, the process returns to step 301.
So far, the detailed flow provided by the embodiment of the invention is realized through the steps.
The above is a description of the flow applied to VRRPE provided by the embodiment of the present invention, and the following is a description of the flow applied to VRRP provided by the embodiment of the present invention.
The method applied to the VRRP provided by the embodiment of the present invention is similar to the method applied to the VRRP in fig. 2 and fig. 3, and the method is applied to a VRRP networking including a plurality of routing devices, each routing device plays a primary role in different VRRP backup groups, and plays a backup role in other VRRP backup groups except the VRRP backup group playing the primary role; pre-configuring the priority of each routing device in each VRRP backup group; selecting a routing device with the highest priority from the routing devices BR which are contained in each VRRP backup group and play the standby role as a candidate device of the routing device MR which is in the VRRP backup group and plays the main role; and when the candidate device of the MR in the VRRP backup group is informed of the failure of the MR through the rapid detection session, the candidate device is switched to the MR in the VRRP backup group to take over the work of the failed MR. The method is described in detail below.
Referring to fig. 4, fig. 4 is another flow chart provided by the embodiment of the invention. The present embodiment is applied to the VRRP networking shown in fig. 5, as shown in fig. 5, there are 4 VRRP backup groups, which are respectively the VRRP backup group 1 to the VRRP backup group 4, where 4 routing devices (respectively routing device a to routing device D) in the VRRP networking play a primary role in different VRRP backup groups, and play a backup role in other remaining VRRP backup groups. Because only MR is responsible for flow forwarding in VRRP backup group, and other BR are in idle state, 4 routing devices are enabled to play main role in 4 different VRRP backup groups, mainly in order to enable 4 routing devices to be responsible for flow forwarding through own network, thereby realizing load sharing. As shown in fig. 5, the routing device a is an MR in the VRRP backup group 1, BRs in the VRRP backup groups 2 to 4, the routing device B is an MR in the VRRP backup group 2, BRs in the VRRP backup groups 1, 3, and 4, the routing device C is an MR in the VRRP backup group 3, BRs in the VRRP backup groups 1, 2, and 4, and the routing device D is an MR in the VRRP backup group 4, and BRs in the VRRP backup groups 1 to 3. Based on the VRRP networking shown in fig. 5, as shown in fig. 4, the process may include the following steps:
step 401, pre-configuring the priority of each routing device in each VRRP backup group where the routing device is currently located.
Taking the VRRP networking shown in fig. 5 as an example, when step 401 is executed, for each routing device, the priority of the routing device in 4 different VRRP backup groups is configured, which is specifically shown in the following table
TABLE 1
Router A | Router B | Router C | Router D | |
|
Highest (MR1) | High (BR1) | Middle (BR1) | Low (BR1) |
VRRP backup group 2 | Middle (BR2) | Highest (MR2) | Low (BR2) | High (BR2) |
VRRP backup group 3 | High (BR3) | Low (BR3) | Highest (MR) | Middle (BR3) |
VRRP backup group 4 | Low (BR4) | Middle (BR4) | High (BR4) | Highest (MR4) |
As can be seen from Table 1, the MR in the VRRP backup group has the highest priority. For example, as shown in fig. 5, if the routing device a is an MR in the VRRP backup group 1, the routing device a has the highest priority in the VRRP backup group 1.
Step 402, aiming at each existing VRRP backup group, if the routing device acts as an MR in the VRRP backup group, the candidate flag bit value of the routing device in the VRRP backup group is set to a second value, and if the routing device acts as a BR in the VRRP backup group, the candidate flag bit value of the routing device in the VRRP backup group is set to a first value.
Preferably, in this embodiment, the first value is True (True), and the second value is False (False) for example.
As shown in fig. 5, it can be known that there are currently VRRP backup groups 1 to 4, where the routing device a is an MR in the VRRP backup group 1, a BR in the VRRP backup groups 2 to 4, the routing device B is an MR in the VRRP backup group 2, a BR in the VRRP backup groups 1, 3, and 4, the routing device C is an MR in the VRRP backup group 3, a BR in the VRRP backup groups 1, 2, and 4, the routing device D is an MR in the VRRP backup group 4, and a BR in the VRRP backup groups 1 to 3; in this way, when step 402 is executed, the value of the candidate flag bit in the VRRP backup group 1 of the routing device a is False, and the value of the candidate flag bit in the VRRP backup groups 2 to 4 is True; the value of the candidate flag bit of the routing device B in the VRRP backup group 2 is False, and the value of the candidate flag bit in the VRRP backup group 1, the VRRP backup group 3 and the VRRP backup group 4 is True; the value of the candidate flag bit of the routing device C in the VRRP backup group 3 is False, and the value of the candidate flag bit of the routing device C in the VRRP backup group 1, the VRRP backup group 2 and the VRRP backup group 4 is True; the candidate flag bit value of the routing device D in the VRRP backup group 4 is False, and the candidate flag bit values in the VRRP backup groups 1 to 3 are True.
Here, the first preset time may be a VRRP message transmission time, and typically, the VRRP message transmission time is 1 second.
In this embodiment, the VRRP packet sent by the MR is specifically a standard VRPP packet, and the VRRP packet sent by the BR is specifically an extended VRPP packet, where the standard VRRP packet is the same as the VRRP packet in the prior art, and carries information of a VRRP backup group where the MR sending the standard VRRP packet is currently located and a source IP address, where the source IP address is a primary IP address of the VRRP backup group where the MR is currently located. The extended VRPP message is a message complying with the VRRP protocol, which is newly added in the embodiment of the present invention, carries information of the current VRRP backup group where the BR is located and the priority of the BR in the current backup group, and has some differences from the standard VRRP message, mainly including, but not limited to, the following differences:
firstly, the method comprises the following steps: the value of the type field in the standard VRRP message is 1, and the value of the type field in the extended VRRP message is a value other than 1, such as 255;
secondly, the method comprises the following steps: the source MAC address field of the standard VRRP message is filled with the virtual MAC address of the MR which sends the standard VRRP message, and the source MAC address field of the extended VRRP message is filled with the real MAC address of the BR which sends the extended VRRP message;
thirdly, the method comprises the following steps: the source IP address field in the standard VRRP message is filled with the main IP address of the backup group where the MR sending the standard VRRP message is currently located, and the source IP address field of the extended VRRP message is filled with the real interface IP address of the BR sending the extended VRRP message.
Of course, this embodiment may also determine whether the received packet is a standard VRRP packet or an extended VRRP packet according to a preset configuration by using the second or third differences as a basis, and the embodiment of the present invention is not particularly limited.
Here, step 405 is performed mainly to facilitate finding the primary IP address of each VRRP backup group when the BFD session is subsequently established (see step 412).
Usually, each routing device records the running status of itself in each VRRP backup group, for example, the routing device a records the status information of itself acting as MR in the VRRP backup group 1 and BR in the VRRP backup groups 2 to 4, so that in this step 406, the routing device a can determine whether itself acts as MR in the determined VRRP backup group according to the recorded running status. For example, if the routing device a receives an extended VRRP packet sent by the routing device B (or the routing device C, or the routing device D) serving as BR in the VRRP backup group 1, the routing device a determines that it is an MR of the VRRP backup group 1 according to the recorded running state, and then step 407 is executed; if the routing device a receives the extended VRRP packet sent by the routing device B (or the routing device D) acting as the BR in the VRRP backup group 3, the routing device a determines that it is not the MR of the VRRP backup group 3 according to the recorded operating state, and performs step 408.
For example, the routing device a determines in step 406 that itself serves as an MR in the VRRP backup group 1, and thus, when executing this step 407, the routing device a maintains the value taking operation of the candidate flag bit in the VRRP backup group 1. Here, since the candidate flag bit of the routing device a in the VRRP backup group 1 is already set to False in step 402, the candidate flag bit of the routing device a in the VRRP backup group 1 is still False when step 407 is executed.
It should be noted that, in this step 408, if the two are equal, step 407 may be executed instead of the step 410 described below, however, this may result in the number of candidate devices of MR in the determined VRRP backup group being greater than 1. For example, as shown in fig. 5, taking VRRP backup group 2 as an example, if it is determined in step 408 that the two are equal, step 407 is executed, and it can be obtained from the description in step 402 that all the candidate flag bits of the router serving as BR in VRRP backup group 2 have a value of True, and when step 411 is executed, it is obtained that the number of candidate devices serving as router B of MR in VRRP backup group 2 is 3, and these candidate devices are router a, router C and router D, respectively. Therefore, the embodiment preferably executes step 410 when it is determined that the two are equal.
And step 409, setting the candidate mark position of the self in the determined VRRP backup group as False. And finishing the value taking operation of the candidate zone bit of the determined VRRP backup group at present. Thereafter, step 411 is performed.
The relevant attribute value carried by the extended VRRP packet is a relevant attribute value of the routing device that sends the extended VRRP packet, where the relevant attribute value of the routing device may be implemented in various ways, such as an interface IP address of the routing device or a serial number of the routing device, and the embodiment of the present invention is not limited in particular. Taking the relevant attribute value as the interface IP address as an example, the determination in step 410 includes: and judging whether the interface IP address carried by the expanded VRRPE message is less than or equal to the own interface IP address. In summary, it can be seen that the routing devices in the above steps 408 to 410 are mainly based on the principle of priority maximization; or, when the priorities are equal and are the maximum, the candidate zone bits of the VRRP backup group are evaluated according to the principle of maximum interface IP address.
Taking the relevant attribute value as an interface IP address as an example, if the interface IP addresses from the routing device a to the routing device D in the VRRP networking shown in fig. 5 sequentially increase, taking the priority shown in table 1 as an example, after the above steps 406 to 410 are performed, it can be obtained that the candidate flag bit value of the routing device a in the VRRP backup group 3 is True, the candidate flag bit value of the routing device B in the other VRRP backup group is False, the candidate flag bit value of the routing device B in the VRRP backup group 1 is True, the candidate flag bit value of the routing device C in the other VRRP backup group is False, the candidate flag bit value of the routing device C in the VRRP backup group 4 is True, the candidate flag bit value of the routing device B in the other VRRP backup group is False, the candidate flag bit value of the routing device D in the VRRP backup group 2 is True, and the candidate flag bit value of the other VRRP backup group is False.
Here, the second preset time is the time when all BRs in all VRRP backup groups currently existing complete sending the extended VRRP packet. Each routing device in the network is not time-synchronized, that is, each routing device that plays a standby role in the VRRP backup group does not simultaneously send the extended VRRP packet, and therefore, before executing step 411, it is necessary to estimate, according to actual conditions, the time when all BRs in all VRRP backup groups complete sending the extended VRRP packet, that is, the second preset time in step 411. Typically, the second preset time may be 2 times the first preset time.
In step 412, the candidate device finds the primary IP address of the VRRP backup group in the correspondence recorded in step 405, and establishes a BFD session for monitoring the primary IP address of the VRRP backup group. Thereafter, step 414 is performed.
Here, the establishment in step 412 may specifically be: the candidate device establishes a BFD session with the MR in the VRRP backup group.
Thus, a BFD session is established between the candidate device and the MR of the corresponding VRRP backup group through steps 411 and 412.
In step 413, if the candidate device currently has a BFD session for monitoring the primary IP address of the VRRP backup group, the BFD session is cancelled. Thereafter, step 414 is performed.
And step 414, when the candidate device monitors that the MR of the corresponding VRRP backup group has a fault through the BFD session, taking over the service processed by the failed MR.
For example, if the value of the candidate flag bit of the routing device B in the VRRP backup group 1 is True, it indicates that the routing device B can currently serve as a candidate device of an MR (routing device a) in the VRRP backup group 1, and when this step 414 is executed, if an MR in the VRRP backup group 1 fails, the routing device B easily detects that the MR fails by using a BFD session, and then takes over the operation of the failed MR.
It should be noted that, in the embodiment of the present invention, the candidate device is not unchanged after the determination, but dynamically changes. Because the VRRP messages are sent periodically, when the BR in each VRRP backup set arrives at the first preset time, the operation in step 402 needs to be returned to execute.
So far, the process provided by the embodiment of the invention can be realized through the steps.
The method provided by the embodiment of the invention is described above, and the device provided by the invention is described below with reference to the specific embodiment.
Referring to fig. 6, fig. 6 is a block diagram of an apparatus corresponding to fig. 2 or fig. 3 according to an embodiment of the present invention. The device is applied to a virtual router redundancy protocol extension VRRPE backup group including a plurality of routing devices, each routing device is located in a plurality of virtual forwarders VF, each VF includes a routing device serving as an active virtual forwarder AVF and at least one routing device serving as a monitoring active virtual forwarder LVF, as shown in fig. 6, the device includes: a first selection unit 601, a first session establishing unit 602 and a first switching unit 603.
A first selecting unit 601 selects a routing device with the highest priority as a candidate device corresponding to a routing device serving as an AVF in each existing VF, where the total number of the routing devices serving as AVFs in the existing VF is the minimum;
the first session establishing unit 602 is configured to establish a fast detection session between the candidate device and a routing device serving as an AVF in a corresponding VF;
the first switching unit 603 is configured to, when it is known through the fast detection session that the routing device functioning as the AVF fails, trigger the candidate device corresponding to the routing device functioning as the AVF to take over the operation of the routing device functioning as the AVF that fails.
Preferably, as shown in fig. 6, the first selecting unit 601 may include: a first set subunit 6011, a first judgment subunit 6012, and a first determination subunit 6013.
The first setting subunit 6011 is configured to, for each VF that exists currently, if a routing device serves as an AVF in the VF, take a value of a candidate flag bit of the routing device in the VF as a second value, and if the routing device serves as an LVF in the VF, take a value of a candidate flag bit of the routing device in the VF as a first value;
when receiving a VRRPE packet, the first determining subunit 6012 determines, in a currently existing VF, the total number of AVFs that a routing device that sends the VRRPE packet plays a role in, where the VRRPE packet is sent every preset time 1 by a routing device that needs to send the VRRPE packet in the VRRPE backup group; for each VF where each routing device receiving the VRRPE message is located, if the routing device does not act as AVF in the VF, judging whether the determined total number of AVFs is smaller than the total number of AVFs which the routing device acts as in the current VF, if so, setting the candidate flag bit of the routing device in the VF to be a second value, otherwise, maintaining the value of the candidate flag bit of the routing device in the VF;
the first determining subunit 6013 is configured to, when a preset time 2 is reached, determine that the preset time 2 is a time when all routing devices that need to send a VRRPE packet in the VRRPE backup group complete sending, determine whether a value of a candidate flag bit of a routing device in each VF is a first value or a second value, determine, if the value is the first value, that the routing device is currently a candidate device of a routing device that serves as an AVF in the VF, and, if the value is the second value, determine that the routing device is not currently a candidate device of a routing device that serves as an AVF in the VF.
Preferably, the VRRPE message carries a relevant attribute value of the routing device that sends the VRRPE message; when determining that the number of AVFs is equal, first determining subunit 6012 determines whether to maintain the value of the candidate flag bit of the routing device in the VF according to the relevant attribute value of the routing device in the VF and the relevant attribute value carried in the VRRPE packet, if so, maintains the operation of maintaining the value of the candidate flag bit of the routing device in the VF, otherwise, sets the candidate flag bit of the routing device in the VF to be the second value. Here, the relevant attribute value of the routing device is specifically an interface IP address of the routing device; thus, the first determining subunit 6012 determines as follows: and judging whether the interface IP address carried by the VRRPE message is less than or equal to the interface IP address of the routing equipment where the VRRPE message is located.
Here, the VRRPE message received by the first determining subunit 6012 includes: a first VRRPE message sent by a routing device used for playing the role of AVF in VF and a second VRRPE message sent by a routing device not playing the role of AVF in any VF currently existing, wherein the first VRRPE message carries VF option fields at least comprising the total number of AVF played by the routing device sending the first VRRPE message in the VF currently existing; the second VRRPE message does not carry a VF option field, and the total number of AVFs carried by the second VRRPE message by default is 0;
here, the first determining subunit 6012 determines whether the received VRRPE packet carries a VF option field, and if so, determines that the VRRPE packet is a first VRRPE packet, and determines the total number of AVFs carried by the received first VRRPE packet as the total number of AVFs in the currently existing VF of the routing device that sends the VRRPE packet; if not, determining that the VRRPE message is a second VRRPE message, and determining that the total number of the routing equipment which sends the second VRRPE message and acts as AVFs in the currently existing VF is 0.
The present embodiment also provides an apparatus corresponding to the method shown in fig. 4. Referring to fig. 7, fig. 7 is a block diagram of an apparatus corresponding to the method shown in fig. 4 according to an embodiment of the present invention. The equipment is applied to a Virtual Router Redundancy Protocol (VRRP) networking containing a plurality of routing equipment, each routing equipment plays a main role in different VRRP backup groups, and other VRRP backup groups except the VRRP backup group playing the main role play a standby role; as shown in fig. 7, the apparatus may include: a configuration unit 701, a second selection unit 702, a second session establishing unit 703 and a second switching unit 704;
the configuration unit 701 is configured to configure in advance the priority of each routing device in each VRRP backup group where the routing device is located;
the second selecting unit 702 is configured to select a routing device with the highest priority from the routing devices BR serving as standby roles included in each currently existing VRRP backup group, as a candidate device of the routing device MR serving as a primary role in the VRRP backup group;
the second session establishing unit 703 is configured to establish a fast detection session for monitoring the MR between the candidate device of the MR in the VRRP backup group and the MR in the VRRP backup group;
the second switching unit 704 is configured to trigger the candidate device of the MR in the VRRP backup group to take over the work of the failed MR when it is known that the MR in the VRRP backup group fails through the fast detection session.
Preferably, as shown in fig. 7, the second selection unit 702 may include: a second set subunit 7021, a second judgment subunit 7022, and a second determination subunit 7023.
For each currently existing VRRP backup group, if the routing device serves as an MR in the VRRP backup group, the second set bit subunit 7021 makes the candidate flag bit value of the routing device in the VRRP backup group be the second value, and if the routing device serves as a BR in the VRRP backup group, makes the candidate flag bit value of the routing device in the VRRP backup group be the first value;
when receiving the extended VRRP packet, the second determining subunit 7022 sends the extended VRRP packet every other first preset time in the VRRP backup group, and carries the information of the VRRP backup group where the BR is currently located and the priority of the BR in the VRRP backup group where the BR is currently located; determining a corresponding VRRP backup group according to the VRRP backup group information carried by the extended VRRP message, if the routing equipment does not act as an MR in the determined VRRP backup group, judging whether the priority carried by the extended VRRP message is greater than the priority of the routing equipment in the determined VRRP backup group, and if so, setting the candidate flag position of the routing equipment in the determined VRRP backup group as a second value; if not, maintaining the value of the candidate zone bit of the routing equipment in the determined VRRP backup group;
the second determining subunit 7023 is configured to, when a second preset time is reached, determine that the second preset time is a time when all BRs in all currently existing VRRP backup groups complete sending the extended VRRP packet, determine that a value of a candidate flag bit of the routing device in each VRRP backup group is a first value or a second value, determine, if the value is the first value, that the routing device is currently a candidate device of the routing device that serves as an MR in the VRRP backup group, and determine, if the value is the second value, that the routing device is not currently a candidate device of the routing device that serves as an MR in the VRRP backup group.
Preferably, the extended VRRP packet also carries a relevant attribute value of the routing device that sends the extended VRRP packet; thus, when judging that the priorities are equal, the second judging subunit 7022 determines, according to the relevant attribute value of the routing device in the determined VRRP backup group and the relevant attribute value carried by the VRRP packet, whether to maintain the value of the candidate flag bit of the routing device in the determined VRRP backup group, and if so, maintains the value of the candidate flag bit of the routing device in the determined VRRP backup group; otherwise, the candidate flag position of the routing device in the determined VRRP backup group is set as a second value. The relevant attribute value of the routing device may specifically be an interface IP address of the routing device, and thus the determination of the second determining subunit 7022 specifically is: and judging whether the interface IP address carried by the expanded VRRP message is less than or equal to the interface IP address of the routing equipment where the expanded VRRP message is located.
It can be seen from the above technical solutions that, in the method and the device for quickly recovering a service provided by the present invention, a corresponding candidate device is selected for a device responsible for traffic forwarding, such as a routing device acting as an AVF in a VRRPE backup group or an MR in a VRRP, and the selected candidate device establishes a quick detection session for monitoring the corresponding device responsible for traffic forwarding; and when the equipment responsible for the traffic forwarding is known to be out of order by using the rapid detection session, the equipment which is out of order is taken over. Compared with the prior art, the method provided by the embodiment of the invention has the advantages that when the equipment responsible for traffic forwarding fails, the operation of the equipment responsible for traffic forwarding does not need to be reselected within the time of waiting for at least 3 seconds in the prior art, but the candidate equipment directly takes over the work of the equipment when knowing that the equipment responsible for traffic forwarding fails by using the rapid detection session, generally, the detection time of the rapid detection session is less than 50ms, so that the purpose of rapidly recovering the service when the equipment responsible for traffic forwarding fails is realized, and the requirement of real-time communication can be met.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (17)
1. A method for fast recovering service is applied to virtual router redundancy protocol extension VRRPE backup group containing multiple routing devices, each routing device is in multiple virtual forwarders VF, each VF contains a routing device which is used as an active virtual forwarder AVF and at least one routing device which is used as a monitoring active virtual forwarder LVF; the method is characterized by comprising the following steps:
selecting a routing device with the highest priority from the routing devices which are contained in each VF and are used as a candidate device corresponding to the routing device which is used as the AVF in the VF, wherein the total number of the routing devices with the highest priority used as the AVF in the current VF is the minimum;
and B, the selected candidate device establishes a rapid detection session for monitoring the routing device which plays the role of AVF in the corresponding VF, and when the rapid detection session learns that the routing device which plays the role of AVF has a fault, the selected candidate device takes over the work of the routing device which has the fault.
2. The method of claim 1, wherein step a comprises:
a1, for each VF existing currently, if the routing device acts as AVF in the VF, making the candidate flag bit of the routing device in the VF take the value of the second value, and if the routing device acts as LVF in the VF, making the candidate flag bit of the routing device in the VF take the value of the first value;
a2, each routing device determines the total number of AVFs in the current VF of the routing device sending the VRRPE message according to the received VRRPE message, the VRRPE message is sent by the routing device sending the VRRPE message in the VRRPE backup group every preset time 1, and for each VF where the routing device is located, if the routing device does not act as an AVF in the VF, whether the determined total number of AVFs is smaller than the total number of AVFs in the current VF or not is judged, if so, the candidate flag bit of the routing device in the VF is set as a second value, otherwise, the value of the candidate flag bit of the routing device in the VF is maintained;
a3, when each routing device arrives at the preset time 2, judging whether the value of the candidate flag bit in each VF is a first value or a second value, if the value is the first value, determining that the routing device is currently the candidate device of the routing device which plays the AVF in the VF, and if the value is the second value, determining that the routing device is not currently the candidate device of the routing device which plays the AVF in the VF.
3. The method according to claim 2, wherein the VRRPE message in step a2 carries the relevant attribute value of the routing device that sent the VRRPE message;
in step a2, if the routing device determines that the number of AVFs is equal, it determines whether to maintain the value of the candidate flag bit in the VF according to the correlation attribute value of the routing device in the VF and the correlation attribute value carried in the VRRPE packet, and if so, performs an operation of maintaining the value of the candidate flag bit;
and if the value of the candidate flag bit is determined not to be maintained, setting the candidate flag bit in the VF as a second value.
4. The method according to any one of claims 2 to 3, wherein the VRRPE message in step A2 includes: a first VRRPE message sent by a routing device used for playing the role of AVF in VF and a second VRRPE message sent by a routing device not playing the role of AVF in any VF currently existing, wherein the first VRRPE message carries VF option fields at least comprising the total number of AVF played by the routing device sending the first VRRPE message in the VF currently existing; the second VRRPE message does not carry a VF option field, and the total number of AVFs carried by the second VRRPE message by default is 0;
the determination in step a2 includes: judging whether the received VRRPE message carries a VF option field, if so, determining that the VRRPE message is a first VRRPE message, and determining the total number of AVFs carried by the received first VRRPE message as the total number of AVFs carried in the current VF of the routing equipment which sends the VRRPE message; if not, determining that the VRRPE message is a second VRRPE message, and determining that the total number of the routing equipment which sends the second VRRPE message and acts as AVFs in the currently existing VF is 0.
5. The method according to claim 4, characterized in that the first VRRPE packet sent by the routing device functioning as AVF in VF also carries the virtual media access control VMAC address corresponding to the VF;
in step a2, if the routing device receives the first VRRPE packet, before performing the AVF number determination, the method includes: judging whether the VMAC address carried by the received first VRRPE message is the same as the VMAC address corresponding to the VF, if so, maintaining the value of the candidate zone bit of the routing equipment in the VF; otherwise, continuing to execute the AVF number judgment.
6. A method for fast recovery service is characterized in that the method is applied to a Virtual Router Redundancy Protocol (VRRP) networking containing a plurality of routing devices, each routing device takes the main role in different VRRP backup groups, and takes the standby roles in other VRRP backup groups except the VRRP backup group taking the main role; pre-configuring the priority of each routing device in each VRRP backup group; the method comprises the following steps:
a, selecting a routing device with the highest priority from the routing devices BR which are contained in each VRRP backup group and play the standby role as a candidate device of the routing device MR which is in the VRRP backup group and play the main role;
and B, the candidate device of the MR in the VRRP backup group establishes a rapid detection session for monitoring the MR, and takes over the work of the failed MR when the MR is known to be failed through the rapid detection session.
7. The method of claim 6, wherein step A comprises:
a1, aiming at each VRRP backup group existing at present, if the routing equipment takes the role of MR in the VRRP backup group, the candidate zone bit value of the routing equipment in the VRRP backup group is a second value, and if the routing equipment takes the role of BR in the VRRP backup group, the candidate zone bit value of the routing equipment in the VRRP backup group is a first value;
a2, when each router device receives an extended VRRP message, the extended VRRP message is sent by a BR in a VRRP backup group every a first preset time and carries the current VRRP backup group information of the BR and the priority of the BR in the current VRRP backup group, the corresponding VRRP backup group is determined according to the VRRP backup group information carried by the extended VRRP message, if the extended VRRP message does not carry an MR in the determined VRRP backup group, whether the priority carried by the extended VRRP message is greater than the priority of the extended VRRP backup group is judged, and if the extended VRRP message is not carried by the routing device, the candidate flag position of the extended VRRP message in the determined VRRP backup group is set to be a second value; if not, maintaining the value of the candidate zone bit of the VRRP backup group;
a3, when each routing device arrives at the second preset time, judging whether the value of the candidate flag bit in each VRRP backup group is the first value or the second value, if the value is the first value, determining that the routing device is currently the candidate device of the routing device which serves as the MR in the VRRP backup group, and if the value is the second value, determining that the routing device is not currently the candidate device of the routing device which serves as the MR in the VRRP backup group.
8. The method of claim 7, wherein the extended VRRP packet sent by the BR further carries a related attribute value of the BR;
in the step a2, if the routing device determines that the priority carried by the extended VRRP packet is equal to the priority of the self in the determined VRRP backup group, it determines whether to maintain the candidate flag value of the self in the VRRP backup group according to the relevant attribute value of the self in the determined VRRP backup group and the relevant attribute value carried by the extended VRRP packet, and if so, performs an operation of maintaining the candidate flag value;
and if the value of the candidate flag bit is determined not to be maintained, setting the candidate flag bit of the VRRP backup group as a second value.
9. The method of claim 7, wherein the step A2 further comprises: the routing equipment also receives a standard VRRP message sent by the routing equipment which serves as the MR in the VRRP backup group every other first preset time, wherein the standard VRRP message sent by the MR carries the information of the VRRP backup group where the MR is currently located and the main IP address of the VRRP backup group where the MR is currently located; recording the corresponding relation between the VRRP backup group information carried by the standard VRRP message and the main IP address;
the establishment of the step B comprises the following steps:
and the candidate equipment of the MR in the VRRP backup group searches the main IP address of the VRRP backup group in the recorded corresponding relation, and establishes a rapid detection session for monitoring the main IP address of the VRRP backup group.
10. The method of claim 9 wherein the type field in the extended VRRP message is a value other than 1; the type field in the standard VRRP message is 1;
after receiving the message, the routing equipment judges whether the value of the type field in the message is 1 or a value except 1, and if the value is 1, the received message is determined to be a standard VRRP message; and if the value is other than 1, determining that the received message is the extended VRRP message.
11. An apparatus for fast recovering service, the apparatus is applied to a virtual router redundancy protocol extension VRRPE backup group including a plurality of routing devices, each routing device is located in a plurality of virtual forwarders VF, each VF includes a routing device functioning as an active virtual forwarder AVF and at least one routing device functioning as a monitoring active virtual forwarder LVF, and the apparatus is characterized in that the apparatus includes: the device comprises a first selection unit, a first session establishing unit and a first switching unit;
the first selecting unit selects a routing device with the highest priority as a candidate device corresponding to a routing device which serves as an AVF in each VF and is included in the VF, wherein the total number of the routing devices with the highest priority serving as the AVF in the existing VF is the minimum;
the first session establishing unit is used for establishing a rapid detection session between the candidate device and the routing device which serves as the AVF in the corresponding VF;
the first switching unit is used for triggering the candidate device corresponding to the routing device functioning as the AVF to take over the work of the routing device functioning as the AVF with the fault when the fact that the routing device functioning as the AVF has the fault is obtained through the rapid detection session.
12. The apparatus of claim 11, wherein the first selection unit comprises:
a first setting subunit, configured to, for each VF that currently exists, if the routing device serves as an AVF in the VF, take a value of a candidate flag bit of the routing device in the VF as a second value, and if the routing device serves as an LVF in the VF, take a value of a candidate flag bit of the routing device in the VF as a first value;
the first judging subunit determines the total number of AVFs served by the routing equipment sending the VRRPE message in the currently existing VF when the routing equipment receives the VRRPE message, wherein the VRRPE message is sent by the routing equipment needing to send the VRRPE message in the VRRPE backup group every preset time 1; for each VF where each routing device receiving the VRRPE message is located, if the routing device does not act as AVF in the VF, judging whether the determined total number of AVFs is smaller than the total number of AVFs which the routing device acts as in the current VF, if so, setting the candidate flag bit of the routing device in the VF to be a second value, otherwise, maintaining the value of the candidate flag bit of the routing device in the VF;
the first determining subunit, when the preset time 2 is reached, determines whether the value of the candidate flag bit in each VF of the routing device is a first value or a second value, if the value is the first value, determines that the routing device is currently a candidate device of the routing device serving as the AVF in the VF, and if the value is the second value, determines that the routing device is not currently a candidate device of the routing device serving as the AVF in the VF.
13. The device according to claim 12, wherein the VRRPE packet carries a value of an attribute associated with a routing device that sent the VRRPE packet;
and when judging that the number of AVFs is equal, the first judging unit determines whether to maintain the value of the candidate flag bit of the routing equipment in the VF according to the relevant attribute value of the routing equipment in the VF and the relevant attribute value carried by the VRRPE message, if so, the first judging unit maintains the operation of the value of the candidate flag bit of the routing equipment in the VF, and otherwise, the first judging unit makes the candidate flag bit of the routing equipment in the VF be a second value.
14. The device according to any of claims 12 to 13, wherein the VRRPE message comprises: a first VRRPE message sent by a routing device used for playing the role of AVF in VF and a second VRRPE message sent by a routing device not playing the role of AVF in any VF currently existing, wherein the first VRRPE message carries VF option fields at least comprising the total number of AVF played by the routing device sending the first VRRPE message in the VF currently existing; the second VRRPE message does not carry a VF option field, and the total number of AVFs carried by the second VRRPE message by default is 0;
the first judging subunit judges whether the received VRRPE message carries a VF option field, if so, the VRRPE message is determined to be a first VRRPE message, and the total number of AVFs carried by the received first VRRPE message is determined to be the total number of AVFs carried in the currently existing VF by the routing equipment which sends the VRRPE message; if not, determining that the VRRPE message is a second VRRPE message, and determining that the total number of the routing equipment which sends the second VRRPE message and acts as AVFs in the currently existing VF is 0.
15. A device for rapidly recovering service is characterized in that the device is applied to a Virtual Router Redundancy Protocol (VRRP) networking containing a plurality of routing devices, each routing device plays a main role in different VRRP backup groups, and plays backup roles in other VRRP backup groups except the VRRP backup group playing the main role; the apparatus comprises: the device comprises a configuration unit, a second selection unit, a second session establishment unit and a second switching unit; wherein,
the configuration unit is used for configuring the priority of each routing device in each VRRP backup group in advance;
the second selection unit is used for selecting the routing equipment with the highest priority from the routing equipment BR which is contained in each VRRP backup group and plays a standby role as the candidate equipment of the routing equipment MR which is in the VRRP backup group and plays a main role;
the second session establishing unit is used for establishing a rapid detection session for monitoring the MR between the candidate device of the MR in the VRRP backup group and the MR in the VRRP backup group;
the second switching unit is used for triggering the candidate equipment of the MR in the VRRP backup group to take over the work of the failed MR when the failure of the MR in the VRRP backup group is known through the rapid detection session.
16. The apparatus of claim 15, wherein the second selection unit comprises:
a second setting subunit, configured to, for each currently existing VRRP backup group, if the routing device serves as an MR in the VRRP backup group, set a candidate flag bit value of the routing device in the VRRP backup group to a second value, and if the routing device serves as a BR in the VRRP backup group, set a candidate flag bit value of the routing device in the VRRP backup group to a first value;
the second judgment subunit, when the routing device receives the extended VRRP message, the extended VRRP message is sent every other first preset time by the BR in the VRRP backup group, and carries the information of the VRRP backup group where the BR is currently located and the priority of the BR in the VRRP backup group where the BR is currently located; determining a corresponding VRRP backup group according to the VRRP backup group information carried by the extended VRRP message, if the routing equipment does not act as an MR in the determined VRRP backup group, judging whether the priority carried by the extended VRRP message is greater than the priority of the routing equipment in the determined VRRP backup group, and if so, setting the candidate flag position of the routing equipment in the determined VRRP backup group as a second value; if not, maintaining the value of the candidate zone bit of the routing equipment in the determined VRRP backup group;
and the second determining subunit judges whether the value of the candidate flag bit of the routing device in each VRRP backup group is a first value or a second value when the second preset time arrives, determines that the routing device is currently a candidate device of the routing device which serves as the MR in the VRRP backup group if the value of the candidate flag bit of the routing device is the first value, and determines that the routing device is not currently a candidate device of the routing device which serves as the MR in the VRRP backup group if the value of the candidate flag bit of the routing device is the second value.
17. The apparatus according to claim 16, wherein the extended VRRP packet further carries a relevant attribute value of a routing device that sent the extended VRRP packet;
if the second judging subunit judges that the priorities are equal, whether to maintain the value of the candidate flag bit of the routing equipment in the determined VRRP backup group is determined according to the relevant attribute value of the routing equipment in the determined VRRP backup group and the relevant attribute value carried by the VRRP message, and if so, the value of the candidate flag bit of the routing equipment in the determined VRRP backup group is maintained; otherwise, the candidate flag position of the routing device in the determined VRRP backup group is set as a second value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100927543A CN101667927B (en) | 2009-09-16 | 2009-09-16 | Method and device for rapidly restoring service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100927543A CN101667927B (en) | 2009-09-16 | 2009-09-16 | Method and device for rapidly restoring service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101667927A CN101667927A (en) | 2010-03-10 |
CN101667927B true CN101667927B (en) | 2012-02-01 |
Family
ID=41804381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009100927543A Active CN101667927B (en) | 2009-09-16 | 2009-09-16 | Method and device for rapidly restoring service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101667927B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106559326A (en) * | 2015-09-28 | 2017-04-05 | 中兴通讯股份有限公司 | Flow forwarding method and device |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102447615A (en) * | 2010-10-15 | 2012-05-09 | 中兴通讯股份有限公司 | Switching method and router |
CN102025551A (en) * | 2010-12-23 | 2011-04-20 | 中兴通讯股份有限公司 | Method and device for switching master device to backup device based on access gateway |
CN102255750B (en) * | 2011-06-28 | 2017-05-10 | 中兴通讯股份有限公司 | Method and device for service disaster recovery protection |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1863198A (en) * | 2005-09-01 | 2006-11-15 | 华为技术有限公司 | Apparatus and method of real-time recovering service |
CN1933442A (en) * | 2005-09-15 | 2007-03-21 | 华为技术有限公司 | Method and system for realizing virtual router redundant protocol master and standby equipment switching |
CN1968260A (en) * | 2005-11-17 | 2007-05-23 | 华为技术有限公司 | Method for implementing virtual router redundancy protocol switching between primary/standby devices |
-
2009
- 2009-09-16 CN CN2009100927543A patent/CN101667927B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1863198A (en) * | 2005-09-01 | 2006-11-15 | 华为技术有限公司 | Apparatus and method of real-time recovering service |
CN1933442A (en) * | 2005-09-15 | 2007-03-21 | 华为技术有限公司 | Method and system for realizing virtual router redundant protocol master and standby equipment switching |
CN1968260A (en) * | 2005-11-17 | 2007-05-23 | 华为技术有限公司 | Method for implementing virtual router redundancy protocol switching between primary/standby devices |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106559326A (en) * | 2015-09-28 | 2017-04-05 | 中兴通讯股份有限公司 | Flow forwarding method and device |
Also Published As
Publication number | Publication date |
---|---|
CN101667927A (en) | 2010-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8489913B2 (en) | Network system and network relay apparatus | |
US7206309B2 (en) | High availability packet forward apparatus and method | |
US8339940B2 (en) | Multi-active detection method and stack member device | |
CN107454155B (en) | Fault processing method, device and system based on load balancing cluster | |
US8027246B2 (en) | Network system and node apparatus | |
US8817593B2 (en) | Method and apparatus providing failover for a point to point tunnel for wireless local area network split-plane environments | |
US8825844B2 (en) | Notifying network operator when virtual addresses do not match on network elements configured for interchassis redundancy | |
WO2016023436A1 (en) | Fault detection method for virtual router redundancy protocol and router device | |
US8064338B2 (en) | HVPLS hub connectivity failure recovery with dynamic spoke pseudowires | |
US20030233473A1 (en) | Method for configuring logical connections to a router in a data communication system | |
EP2599270B1 (en) | A network device and method of routing traffic | |
CN101355486A (en) | Method, equipment and system for switching route | |
KR20150067365A (en) | Virtual chassis system control protocols | |
US20190334808A1 (en) | Data plane forwarding table downed link updating | |
CN101667927B (en) | Method and device for rapidly restoring service | |
WO2014146541A1 (en) | Cdn and network convergence system, scheduling module selection method and computer storage medium | |
US9246796B2 (en) | Transmitting and forwarding data | |
CN102932249A (en) | Method and device for transmitting virtual router redundancy protocol (VRRP) message | |
CN110830310B (en) | Cross-data-center disaster backup method and BRAS system | |
CN110138656B (en) | Service processing method and device | |
CN104717143A (en) | Method and equipment for many-one reducibility scene multicast data transmission | |
CN108234358A (en) | A kind of multicast message transmission method, device and machine readable storage medium | |
CN112231153A (en) | Equipment switching method and network equipment | |
CN114268581B (en) | Method for realizing high availability and load sharing of network equipment | |
CN112511419B (en) | Distributed forwarding system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |