Background technology
In existing network system, when the primary route device breaks down,, guarantee the continuity and the reliability of communication in order to recover professional as soon as possible, adopt the handover operation between VRRP (Virtual Router Redundacy Protocol) the agreement realization active and standby router more.This agreement has guaranteed when the next hop router of main frame breaks down, and can be replaced by another router that is in Status of Backups timely, thereby when equipment breaks down, automatically recover professional as early as possible.
The operation principle of this VRRP agreement is: the collaborative work of one group of VRRP router constitutes a virtual router jointly.This virtual router externally shows as a router logic with unique fixed ip address and MAC Address.Be in the role that router in the same VRRP group has two kinds of mutual exclusions: primary route device and standby router, there is and has only a router that is in primary role in the VRRP group, can there be one or more to be in backup role's router.The VRRP agreement uses competitive strategy to select one as main usefulness from groups of routers, is responsible for arp response and transmits the IP packet, and other router in the VRRP group is ready as the role of backup.When the primary route device breaks down for a certain reason, backup router can several seconds the time delay and upgrade to the primary route device.
A VRRP groups of routers has unique sign: VRID, and scope is 0-255.This router externally shows as unique virtual mac address, and the form of address is 00-00-5E-00-01-[VRID].
VRRP timed sending control message carries out fault detect, and VRRP control message has only a kind of: VRRP announces (advertisement).It uses the ip multicast packet to encapsulate, and group address is 224.0.0.18, and the scope of release is only limited in the same local area network (LAN).This has guaranteed that VRID can reuse in heterogeneous networks.Just have only the primary route device can periodically send the VRRP notification packet in order to reduce network bandwidth consumption.Backup router can not receive VRRP or receives that priority is to start new one after 0 the announcement to take turns the VRRP election in continuous three announcements at interval.
This VRRP can compatible multiple network technology and link-layer technologies, has obtained extensive use in VPN (Virtual Private Network), traffic engineering, QoS fields such as (service quality) at present.
The subject matter that solves as a kind of VRRP of protocol for error tolerance is to realize the automated back-up and the switching of a plurality of outlets, as shown in Figure 1, at host computer side default router is set usually, and next is jumped and points to a router, thereby realizes communicating by letter of main frame and outside.
Traditional VRRP adopts the mode of timed sending HELLO message to carry out fault detect, the default transmission VRRP protocol massages time interval is 1 second, when standby router is continuous when not receiving the HELLO message of primary route device for 3 times, ownly initiatively become the main active and standby switching that realizes.Because the minimum time granularity of HELLO message is 1 second usually, so at least 3 seconds could be by standby router perception link failure state, this convergence time of real time business for the quick perception link failure of needs state is oversize, the transmission of VRRP protocol massages is to handle at control plane simultaneously, therefore adopt the method for dwindling the VRRP packet sending intervals simply, waste a large amount of system resource on the one hand, can not guarantee in distributed system that on the other hand VRRP restrains, and can not satisfy the requirement of real time communication far away in 50ms.
In order to guarantee to use the network of VRRP agreement after primary route device fault, it is main that standby router becomes fast, so that professional fast quick-recovery guarantees that speech business is uninterrupted, the fault that needs a kind of method of employing that the quick perception of router of Status of Backups is occurred, and informing VRRP protocol module.
Summary of the invention
The object of the present invention is to provide a kind of device and method of real-time recovering service, detect fault by BFD (two-way forwarding detection), the management and control module is given the VRRP module according to described detected fault structure VRRP fault message reporting, all standby routers initiatively become main competition, have realized active and standby quick handover operation with router.
The objective of the invention is to be achieved through the following technical solutions:
A kind of method of real-time recovering service comprises:
After two-way forwarding detection BFD detected primary route device fault, constructing virtual route redundancy protocol VRRP fault message reported the VRRP module, finishes active and standby switching with router by the VRRP module.
Described primary route device fault comprises:
Link failure between primary route device and the standby router; Or,
The control plane of primary route device breaks down.
Loaded information comprises and is used to represent that this message is the type of message information that reports router failure in the described VRRP fault message.
Described type of message information specifically comprises: message version number, type of message.
The pass of described message version number and type of message is:
When the value of message version number is this message of expression of appointment when being VRRP fault message, described type of message value is used to represent concrete fault type information.
Described fault type information is corresponding with the type of message value.
A kind of device of real-time recovering service comprises the BFD module and the VRRP module that is used to handle described fault that are used to detect and judge primary route device failure message, also comprises: the management and control module.
Described management and control module and BFD module and VRRP module connection.
Described management and control module is used to receive the detected failure message of BFD module, and according to described failure message structure VRRP message, sends to the VRRP module.
As seen from the above technical solution provided by the invention, the present invention has realized combining of BFD technology and VRRP, by BFD fault is detected, but fast detecting has overcome the long defective of current VRRP convergence time to fault; BFD gives the VRRP module by a management and control module structure VRRP message reporting after detecting fault, realized active and standby quick switching with router.
Embodiment
BFD (two-way forwarding detection) is a kind of router failure detection protocol of coming through progressively developing from basic transmission technology, it can detect the fault of each layer of network, can be used to the polytype transmission correctness that detects Ethernet, Multi-Protocol Label Switch (MPLS) path, common routed encapsulation and comprise IPSec (IP Security Protocol) tunnel.
In essence, BFD is a kind of independent HELLO agreement of high speed, can set up peer-to-peer with adjacent system, and then, each system is with the speed monitoring the consulted BFD speed from other system, and monitoring speed can be set with the Millisecond increment.When peer system was not received the packet of predetermined amount, it inferred that the software or the hardware infrastructure of BFD protection break down, no matter infrastructure is the tunnel or the Ethernet of label switched path, other types.
The operation principle of BFD as shown in Figure 2, BFD is by regularly sending the fault-detection data bag based on UDP (User Datagram Protocol) layer, not only can detect and judge the outage of transmission link, optical interface and device port, can also detect and judge soft faults such as error code that transport layer, link layer, IP layer and application layer exist, packet loss, remedy at present the deficiency that based on SDH (SDH (Synchronous Digital Hierarchy)) fault detect can only realize the transport layer fault detect.
At present BFD default detection time is 10ms at interval, detectfault 3 times and just judge link failure continuously, just 30ms just can detect and failure judgement, and the BFD technology does not rely on any other agreement or application, can adopt hardware to realize, not influence equipment performance.
Therefore, the present invention proposes a kind of device and method of real-time recovering service, BFD is combined with VRRP, can in the shortest time, realize the switching of Business Stream, thereby satisfy the needs of real time business.
Core concept of the present invention provides a kind of device and method of real-time recovering service, detect fault by BFD, report the management and control module, by management and control module structure VRRP fault message failure message is reported the VRRP module, after being in VRRP module on the stand-by state router and receiving this message, begin standby router immediately and become main competition, the standby router competition high or that priority is identical, the IP address is big of final priority is main using, the primary route device of taking over original fault begins forwarding work, realizes active and standby quick switching with router.
The invention provides a kind of device of real-time recovering service, the module map of described device as shown in Figure 3, this device comprisesBFD module 1, management andcontrol module 2,VRRP module 3; WhereinBFD module 1 is used to detect and judges link failure between primary route device and the standby router and control plane fault of primary route device etc., be 10ms its default detection time at interval, detectfault 3 times and just judge link failure continuously, just 30ms just can detect and failure judgement; Described management andcontrol module 2 and describedBFD module 1 connection, be used to receive the failure message thatBFD module 1 sends, according to failure message structure VRRP fault message, this VRRP fault message loaded information comprises and is used to represent the active and standby router failure type information of using, the position that takes place as fault, type etc.; DescribedVRRP module 3 andcontrol management module 2 connections are used to receive the VRRP fault message that management andcontrol module 2 is sent, and carry out troubleshooting according to institute's loaded information in the message.
The present invention also provides a kind of method of real-time recovering service, is illustrated in figure 4 as the operational flowchart of the method for the invention, and as shown in Figure 4, this method specifically comprises the steps:
Step 10: on the all-router of backup group, enable the BFD module and detect and VRRP;
On the all-router of backup group, adoptBFD module 1 to detect the operating state of primary route device, comprise whether the link that detects between primary route device and the standby router breaks down, and whether primary route device control plane breaks down etc.
Step 11:BFD module 1 detects fault, and notice management andcontrol module 2 is constructed VRRP fault messages and sent it toVRRP module 3 by management andcontrol module 2;
BFD module 1 detected fault comprises: the link failure between primary route device and the standby router, and the control plane of primary route device breaks down.When described fault takes place,
BFD module 1 can fast detecting arrive, and fault message sent to management and
control module 2 by certain form, construct a new VRRP fault message by management and
control module 2 according to fault message, the VRRP fault message reporting that structure is good is given
VRRP module 3, and the version Version of described VRRP fault message extends this as the version number of hope; The type Type of message extends this as the type of message of the representative router failure of agreement, and different faults is filled in different Type values, and the specific fault of each Type value representative can preestablish; The form of described message is as follows:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| Version | Type | Virtual Rtr ID | Priority | Count IP Addrs |
| Auth Type | Adver Int | Checksum |
| IP Address(1) |
| IP Address(2) |
| … |
| IP Address(n) |
| Authentication Data(1) |
| Authentication Data(2) |
Wherein,
Version: version number, be generally 2, in VRRP fault message, can change this version number value as required;
Type: the type of message, be generally 1, the expression broadcasting packet, in VRRP fault message when version is the value of user's appointment, the fault type that the representative of different Type value is different, value are that 1 Type no longer represents broadcasting packet, but a kind of concrete fault, that is to say that 1 has been re-used, the back is described in detail it;
Virtual Rtr ID (VRID): the VRRP backup group number of configuration, 1~255, must join this virtual group of unique sign;
Priority: priority, 0-255 (wherein, 0 and 255 is not configurable), apolegamy is worth greatly more, and priority is high more;
Count IP Addrs: the number of the backup group virtual ip address of configuration, backup group can corresponding a plurality of virtual addresses, must join, and can join a plurality ofly, are at least 1, must be consistent in the backup group, and order can be different;
Auth Type: auth type, stipulated three kinds of auth types in the agreement, 0 expression does not authenticate, 1 expression plain text password, 2 expression IP authentication header
Adver Int: send the time interval of HELLO message, default to 1 second;
Checksum: verification and;
IP Address (es): the virtual ip address tabulation of the backup group of configuration;
Authentication Data authenticates word;
In the VRRP fault message of management andcontrol module 2 structures, when version number changes, the various fault types of Type value representation, this fault type is determined according to the comprehensive back of the testing result ofBFD module 1 by management andcontrol module 2, fill in the new VRRP fault message, concrete mapping relations can be for as follows:
TYPE value fault type
1 active and standby link failure;
The 2 main managing failures of using;
3 is main with a fault in the up link;
4 primary route device Forwarding plane reset;
5 primary route device up links all break down;
These concrete mapping relations can preestablish;
Step 12:VRRP module 3 realizes active and standbyly switching with router;
After aforesaid operations is finished, if active and standby between or primary route device control plane break down, then begin to control standby router and become main competition byVRRP module 3, the backup group medium priority is not the highest, or when the priority level of standby router is identical, the backup router of IP address maximum becomes main and switches, and this process is realized according to the new VRRP fault message of receiving byVRRP module 3.
In sum, the present invention has realized combining of BFD and VRRP, by BFD fault is detected, and can realize that fast detecting to fault and active and standby switching with router, has overcome the long defective of current VRRP convergence time.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.