Background technology
In the communications field, the equipment redundancy backup refers to by certain technology, two physical equipments can be used as an equipment in logic.Take as the router of access controller (AC) as example, present Virtual Router Redundancy Protocol (Virtual Router Redundancy Protocol, VRRP) (with reference to RFC3768), Hot Standy Router Protocol (Hot Standby Router Protocol, HSRP) (with reference to RFC2281) can support routing forwarding redundant.Router provides heterogeneous network interconnected mechanism, realizes the Packet Generation of a network is arrived another network.And route is exactly to instruct the routing information of IP Packet Generation.Routing Protocol is exactly regulation and the standard of appointing in advance in instructing IP Packet Generation process.Routing iinformation transmits between neighboring router, guarantees that all-router knows the path of other router.In Routing Protocol, by creating routing table network topology structure is described.Route Selection and package forward function are carried out in Routing Protocol and route collaborative work.
Fig. 1 is the schematic diagram for the concept that dynamic routing protocol is described.As shown in Figure 1, router-A is only known and the own direct-connected 192.168.1.0/24 network segment and the existence of the 192.168.2.0/24 network segment, does not know the existence of the 192.168.3.0/24 network segment.And router B only knows and the own direct-connected 192.168.2.0/24 network segment and the existence of the 192.168.3.0/24 network segment, does not know the existence of the 192.168.1.0/24 network segment.Pass through Routing Protocol, router-A is at the routing iinformation of interface B issue 192.168.1.0/24, router B is at the routing iinformation of interface A issue 192.168.3.0/24, thereby makes router B know that routing iinformation, the router-A of the 192.168.1.0/24 network segment know the routing iinformation of the 192.168.3.0/24 network segment.In Fig. 1, also show the dynamic routing table of each router and have PC (Personal Computer, the PC) terminal that data send demand.
Fig. 2 illustrates the mechanism that realizes redundancy backup in the prior art by the VRRP agreement.As shown in Figure 2, primary access controller (AC) consists of the redundancy backup group with backup AC.In Fig. 2, a primary AC and a backup AC work simultaneously.Backing up under normal circumstances AC only uses as backup.The network side of primary AC and user side interface are all enabled a VRRP example, back up simultaneously and enable the VRRP example corresponding with the VRRP example of primary AC on the AC.In user's side, primary AC uses down link (Downlink) VRRP virtual address and access point (AP) to set up the tunnel; At network side, primary AC uses up link (Uplink) VRRP virtual address and Radius server to carry out authentication and accounting.
The back-up job flow process of carrying out between primary AC and the backup AC is as follows:
1, at first, create high available network access example (High Available Network Access Instance, HANASI) at primary AC and backup AC, add and enable the AC interface IP address of identical HANASI and the virtual ip address of VRRP thereof.Two virtual ip address of Uplink, Downlink that generally need the primary AC of configuration and backup AC.
2, primary AC and backup AC backup are based on the two-layer protocol of VRRP.For these two virtual addresses can correctly be worked, Uplink, Downlink heartbeat between primary AC and the standby AC must belong to respectively a double layer network separately together.
The Uplink virtual address is mainly used in communicating with network equipments such as Radius servers, Portal server, thereby guaranteeing that authentication and accounting is smooth and easy carries out.The Downlink virtual address is mainly used in AC and sets up the tunnel connection with user side equipments such as AP, guarantees that AC is to AP and user's management and control.In addition, if the gateway of wireless terminal is arranged on the AC, also need to be on AC the virtual address gateway of configure user.
3, determine main and standby relation by the VRRP agreement between the AC.Simultaneously, set up privately owned synchronous tunnel by heartbeat between primary AC and the backup AC, the user profile on synchronous primary AC and the backup AC.
4, behind the AP access network, AP at first sends the DISCOVER broadcasting packet and seeks AC.In the double layer network, then primary AC returns virtual IP address and the virtual MAC address thereof of Downlink to AP if AC and AP coexist, and AP sets up CAPWAP tunnel by virtual MAC address and primary AC, thereby obtains required configuration and upgrade file.
If AP is connected by three-layer network with AC, then AP searches the IP address of AC by DHCP option43 message or DNS message, perhaps obtain the IP address of AC by the address of static configuration among the AP, this IP address is the Downlink virtual address that configures among the HANASI.AP sets up CAPWAP tunnel by this address and primary AC, thereby obtains required configuration and upgrade file.
Meanwhile, primary AC communicates based on network equipments such as Uplink virtual address and Radius server, Portal server.
5, multidate information after will stablizing by privately owned synchronous tunnel of primary AC and backup AC (be managed AP enters stable operation or offline information, the user authenticates by reaching the standard grade or offline information) etc. is synchronized on the backup AC.
6, backup AC continues to accept the hello packet that primary AC sent out by heartbeat, and detects the state of primary AC.In case do not receive the hello packet of primary AC in setting time, then backing up AC thinks and breaks down primary AC (reason of the generation of fault may be machine failure, or certain enables the AC interface fault of HANASI, also can be based on the switching condition of the customizations such as packet loss, time delay, QOS), backup AC is automatically upgraded to primary AC and externally issues gratuitous ARP packet, broadcasts the primary AC identity of oneself.
7, after backup AC enables, all AP all set up the tunnel with backup AC and are connected, and AC authenticates accordingly and manages by backup, and carries out corresponding business.
8, after primary AC recovered, backup AC abandoned primary AC identity and is reduced into backup AC.Original fault AC switches to new primary AC.The CAPWAP tunnel of AP automatically switches on the new primary AC, and the network equipments such as Radius server automatically switch and to communicate by letter with new primary AC.
9, after primary AC reactivated, all new AP all set up the tunnel with primary AC and are connected, and authenticated accordingly and managed by primary AC, and carry out corresponding business.
The shortcoming of prior art scheme
In the scheme of prior art, all be based on the active and standby switching that the VRRP agreement realizes, and the subject matter of VRRP is: primary AC and backup AC can only be in same double layer networks, the switching of link can only change the ARP cache of self by the notice uplink downlink that sends of gratuitous ARP, thereby realizes the switching of link.If active and standby AC is not in same double layer network, then link can't switch, and causes network to interrupt, and can't guarantee the reliability of network, also just can't realize the strange land redundancy backup of equipment.
Summary of the invention
The invention provides a kind of method of utilizing dynamic routing protocol to realize the strange land redundancy backup of router, can come the scope of expansion equipment redundancy by utilizing proprietary protocol and dynamic routing protocol, realize the function of strange land hot stand-by.
To achieve these goals, according to an aspect of the present invention, the strange land redundancy backup method of a kind of access controller system, described access controller system comprises two access controllers, described two access controllers are arranged in different double layer networks, and described method comprises: the interface IP address of each access controller of configuration access control system and proprietary protocol and the dynamic routing protocol that will use in the access controller system; Described two access controllers are consulted main and standby relation by proprietary protocol, determine a primary access controller and a backup access controller from described two access controllers; Primary access controller is by the uplink interface of dynamic routing protocol issue access controller system and the virtual host address of downlink interface; Primary access controller and backup access controller are undertaken synchronously by privately owned synchronous tunnel; When primary access controller abnormal, the backup access controller switches to primary access controller, by the primary access controller identity of proprietary protocol broadcasting oneself, and by the uplink interface of dynamic routing protocol issue access controller system and the virtual host address of downlink interface.
According to an aspect of the present invention, the strange land redundancy backup method also comprises: operate as the backup access controller when former primary access controller recovers normal.
According to an aspect of the present invention, the strange land redundancy backup method also comprises: when former primary access controller recovers normal, described former primary access controller and current primary access controller are again consulted main and standby relation and are again become primary access controller, and current primary access controller switches to the backup access controller and carries out work.
According to an aspect of the present invention, described dynamic routing protocol is any one in routing information protocol RIP, ospf ospf protocol, Intermediate System-to-Intermediate System Intermediate System to Intermediate System and the Border Gateway Protocol (BGP).
According to an aspect of the present invention, primary access controller and backup access controller are set up privately owned synchronous tunnel by heartbeat.
According to an aspect of the present invention, in the switch step of strange land redundancy backup method, if primary access controller does not receive the affirmation message from the backup access controller in the given time, then primary access controller notice backup access controller carries out switch step.
According to an aspect of the present invention, the backup access controller receives the predetermined message that primary access controller sends by synchronous tunnel, if do not receive the described predetermined message of primary access controller in setting time, then back up access controller and determine that primary access controller breaks down and begins switch step.
According to an aspect of the present invention, the backup access controller determines whether to carry out switch step based at least one condition in packet loss, time delay, the service quality QoS.
Embodiment
Below, describe embodiments of the present invention in detail with reference to accompanying drawing.
Fig. 3 is the schematic diagram that illustrates according to the configuration of the access control system that can realize the strange land redundancy backup of the embodiment of the invention.
As shown in Figure 3, the access control system that can realize the strange land redundancy backup according to the embodiment of the invention comprises a primary access controller (AC) and a backup AC.Primary AC and backup AC can reach by network, by the privately owned connection of heartbeat link establishment tunnel.
The access control system of the strange land redundancy backup of Fig. 3 is different from the system with the layer network redundancy backup of the prior art, and its primary AC and backup AC can be not limited in the same double layer network.Primary AC and backup AC consist of the redundancy backup group.
In the access control system according to mobile redundancy backup of the present invention, be in primary AC and the high available network access of the upper establishment of backup AC example (High Available Network Access Instance in the different double layer networks, HANASI), and use proprietary protocol to specify the IP address of the HANASI of opposite end, connect thereby set up synchronously, consult main and standby relation.Set up privately owned synchronous tunnel between primary AC and the backup AC, carry out the synchronous of user profile.Here, can between primary AC and backup AC, set up privately owned synchronous tunnel by heartbeat.In user's side, AC uses Downlink virtual interface and AP to set up the tunnel, AP is connected by three-layer network with AC, AP searches the IP address of AC by option43 message or DNS message, perhaps obtain the IP address of AC by the address of static configuration among the AP, this IP address is the Downlink virtual interface address that configures among the HANASI.AP sets up CAPWAP tunnel by this address and primary AC, thereby obtains required configuration and upgrade file.At network side, AC uses Uplink virtual interface and Radius server to carry out authentication and accounting.The Uplink virtual interface is mainly used in communicating with network equipments such as Radius servers, Portal server, thereby guaranteeing that authentication and accounting is smooth and easy carries out.The Downlink virtual interface is mainly used in AC and sets up the tunnel connection with user side equipments such as AP, guarantees that AC is to AP and user's management and control.For two virtual interfaces of Uplink and Downlink can correctly be routed to by other equipment in the network, primary AC releases the virtual address by dynamic routing protocol as the main frame route.Here, dynamic routing protocol for example can be any one in routing information protocol (RIP), ospf (OSPF) agreement, Intermediate System-to-Intermediate System (IS-IS) agreement, the Border Gateway Protocol (BGP).In addition, if the gateway of terminal is arranged on the AC, also need to be on AC the virtual address gateway of configure user, and release by the route of dynamic routing protocol with terminal.When primary AC abnormal, backup AC switches to primary AC, by the primary AC identity of proprietary protocol broadcasting oneself, and by the Uplink interface of dynamic routing protocol issue access controller system and the virtual host address of Downlink interface.
The below describes redundancy backup method according to the access control system of the embodiment of the invention in detail with reference to Fig. 3 and Fig. 4.
In the present invention, defined following state machine for primary AC and backup AC:
Readiness before Init:HANASI starts;
Master: finish the example major function, for example transmit the message of this AC group, send hello packet for backup AC;
Backup: with backup AC role, monitor the primary AC that is in the Master state;
Learning:Master elects state;
Transfer: the process status that refers in active and standby switching, need to back up some wireless-control or easy-access-gateway data;
Disable: refer to that Uplink, Downlink or heartbeat Link State on the primary AC are the disabled state of state machine behind the link down.
When starting working according to the access control system of the redundancy backup of the embodiment of the invention, at first, in step 410, the interface IP address of each AC of configuration access control system and proprietary protocol and the dynamic routing protocol that will use.Particularly, create the HANASI example at each AC of access control system, specify to add and enable the AC interface of identical HANASI and the virtual ip address of proprietary protocol thereof, and configure the Routing Protocol that will in route is synchronous, use.Here, usually need up link (Uplink) virtual interface and down link (Downlink) virtual interface of each AC of configuration access control system, configuration virtual IP address (this IP address is the loop-back address of 32 bitmasks).This moment, the state of each AC was Init.
As shown in Figure 3, in this example, the Uplink real address of primary AC is 192.168.1.1/24 before active and standby switching, the Uplink virtual address is 192.168.10.1/32, the Downlink real address is 172.16.1.1/24, and the Downlink virtual address is 192.16.20.1/32, and the Uplink real address of the backup AC before switching is 192.168.2.1/24, the Downlink real address is 172.16.2.1/24, and Uplink virtual address and Downlink virtual address do not exist.Can find out, primary AC is in the different double layer networks from backup AC.By specifying opposite end heartbeat (heartbeat) interface IP address, the heartbeat of setting up logic between primary AC and backup AC connects, thereby can use dynamic routing protocol to consult and the switching main and standby relation.
Next, in step 420, each AC of access control system elects primary AC and backup AC.Particularly, after the configuration of step 410 was finished, each AC enabled the HANASI example, and this moment, each AC was in the Learning state, and sent the clean culture hello packet to opposite end AC, announced the correlation attribute information such as HANASI instance number, priority of oneself.The example of hello packet is shown in Figure 5, will be described after a while.After opposite end AC receives this hello packet, extract attribute information, according to self attributes information, select active and standby AC, and selection result is notified the other side's self attribute information and active and standby election results by hello packet, after the other side receives this hello packet, elect main and standby relation, if main and standby relation is consistent, then finish the Learning state, according to selection result, enter separately Master or Backup state.Enter the AC(of Master state namely, primary AC) periodically send hello packet, the AC(of notice Backup state namely, backup AC) safeguard separately state.
Subsequently, in step 430, primary AC and backup AC carry out backed up in synchronization by privately owned synchronous tunnel.Multidate information after will stablizing by privately owned synchronous tunnel of primary AC and backup AC (be managed AP enters stable operation or offline information, the user authenticates by reaching the standard grade or offline information) etc. is synchronized on the backup AC.When the upper multidate information of primary AC changed, the multidate information of change was synchronized on the backup AC.
Then, in step 440, primary AC is by the virtual host address of dynamic routing protocol issue Uplink interface and Downlink interface.Particularly, in the present embodiment, the primary AC that is in the Master state joins its interface Uplink and Downlink in the protocol domain of Routing Protocol, and the virtual host address of interface Uplink and Downlink is released by dynamic routing protocol; Be in the AC of other states outside the Master state, its interface Uplink and Downlink are cancelled from the protocol domain of Routing Protocol, outwards do not issue the fictitious host computer route.
In step 450, when the upper abnormal of primary AC, will back up AC and switch to primary AC.Particularly, according to one embodiment of the invention, if primary AC does not receive the affirmation message of the backup AC of Backup state in the given time, then the state of primary AC is converted to the Transfer state, and notice backup AC carries out active and standby switching.After giving notice, former primary AC state is converted to the Disable state, no longer broadcasts the primary AC identity of oneself, and interface Uplink and Downlink are cancelled from the protocol domain of Routing Protocol, stops outwards to issue the fictitious host computer route.The backup AC that is in the Backup state begins to be transformed into the Transfer state after receiving the active and standby switching message of primary AC.
Alternatively, except the active and standby switching message that receives primary AC, the hello packet that backup AC also can receive primary AC at any time and sent out by heartbeat, and detect the state of primary AC.If do not receive the hello packet of primary AC in setting time, then backing up AC thinks and breaks down primary AC (generation of fault may be machine failure, or certain enables the AC interface fault of HANASI), then back up AC and be transformed into the Transfer state to carry out data synchronous.The condition that backup AC also can be based on the customizations such as packet loss, time delay, service quality (QoS) determines whether to switch.Backup AC enters the Master state from the Transfer state subsequently, and beginning periodically sends hello packet with the Master state of notifying the other side oneself and the primary AC identity of broadcasting oneself.Simultaneously, former backup AC releases the virtual host address of interface Uplink and Downlink by Routing Protocol, will point to the route sensing oneself of former primary AC in network by Routing Protocol.So just realize the route handoff in the active and standby handoff procedure, kept the unimpeded of network.After switching, all AP all set up the tunnel with the AC of new Master state and are connected, and authenticate accordingly and manage by the backup AC that is in the Backup state, and carry out corresponding business.As shown in Figure 3, after active and standby switching was finished, 192.168.10.1/32 was changed in the Uplink virtual address of former backup AC, and Downlink changes into 172.16.2.1/24 in the virtual address, and is identical with the Downlink virtual address with the Uplink of former primary AC.
By above step, former backup AC has finished handover operation.After this, normal if former primary AC recovers, then former primary AC will that is to say as backup AC work, and the state of former primary AC becomes the Backup state from the Disable state, and carries out the backed up in synchronization operation with new primary AC.
Selectively, in according to another embodiment of the present invention, after primary AC recovered normally, each AC of access control system re-started the primary AC that active and standby election makes new advances with election.Particularly, after former primary AC recovered normal operation, each AC of access control system received the hello packet from former primary AC, and each AC of access control system carries out above-mentioned step 420 and re-elects primary AC.New primary AC releases the fictitious host computer routing iinformation of its interface Uplink and Downlink by dynamic routing protocol, broadcast the primary AC identity of oneself.The CAPWAP tunnel of AP automatically switches on the new primary AC, and the network equipments such as Radius server automatically switch and to communicate by letter with new primary AC.After new primary AC enabled, all new AP all set up the tunnel with new primary AC and are connected, and authenticate accordingly and manage by new primary AC, and carry out corresponding business.
Fig. 5 shows the form according to the hello packet that sends of the embodiment of the invention between primary AC and backup AC.
As shown in Figure 5, this message comprises following field:
Version: version, length are 4, are defined as in the present embodiment 2;
Type: type, length are 4, have only defined in the present embodiment a kind type: the announcement data, and value is 1;
Virtual AC ID: the ID of virtual A C, length is 8;
Priority: priority, length is 8, the priority that possesses the equipment of redundant IP address is 255;
IP number of addresses in the Count IP Addrs:hello message, length is 8, comprises the ip address number that Uplink or Downlink interface have;
Command: command field is used for carrying out the mandatory order conversion between primary AC and backup AC;
Adver Int: primary AC process sends the time delay of advertisement message by heartbeat, in the present embodiment, be defaulted as 2;
Checksum: verification and, length is 16, the checking data scope is this hello packet data, the data that namely begin from version field do not comprise the IP head;
IP Address (es): the IP address relevant with virtual A C, quantity is determined by Count IP Addrs;
Reserve: reserved field;
Old master IP: the IP of former primary AC process after backup AC process is received the hello packet of a certain primary AC, deposits the other side's source IP in the Old_master_ip of oneself.When causing backing up AC owing to a certain reason (for example packet receiving is overtime) and upgrade to primary AC, be about to upgrade to primary AC insert Old_master_ip this moment in the hello packet of its transmission, thereby make the judgement of leaving the Master state and determining next state after making other primary AC processes in the current example receive message;
Uplink ip/Downlink IP: the virtual ip address of the Uplink/Downlink of this HANASI example;
Updown flag: indicate current message to belong in logic Uplink or Downlink;
Querry flag: the clock synchronization mark of primary AC and backup AC;
IP Address (n): according to the value of Count IP Addrs and Updown flag, the IP address of n Up/Downlink of current process is write n field successively.
Should be understood that above only is an example of hello packet.Those skilled in the art is the form of self-defining hello packet as required.
By adopting the strange land redundancy backup method of access controller of the present invention, realize active and standby negotiation and switching by proprietary protocol between master/slave device.In addition, according to the present invention, main equipment elect successfully or active and standby handover success after, main equipment is not issued the gratuitous ARP (being the mode of VRRP) of redundant address, but the route by dynamic routing protocol (OSPF, RIP, IS-IS, BGP etc.) issue redundant address.Perhaps directly use the address of loopback interface as redundant address; Active and standby equipment is at the identical loop-back address (32 bitmask) of virtual interface configuration, at interfaces enabled dynamic routing protocol (OSPF, RIP, IS-IS, BGP etc.), the virtual interface acquiescence does not enable or does not activate (being the route that routing module can not issued this loop-back address), when the equipment election is Master equipment, enable or activate or add in the Routing Protocol territory, the address of virtual interface is released.Like this, the VRRP agreement can be do not relied on and the not remote backup in same double layer network of active and standby equipment can be realized.
Although illustrate and described the present invention with reference to some exemplary embodiments of the present invention, but it should be appreciated by those skilled in the art that, in the situation of the spirit and scope of the present invention that do not break away from the restriction of claim and equivalent thereof, can make in form and details various changes.