A kind of method and system of realizing that activestandby state is synchronous
Technical field
The present invention relates to the communication technology, particularly relate to a kind of synchronous method and system of activestandby state of between different backup groups, realizing.
Background technology
For being provided to user terminal, reliable service protection, IETF formulated Virtual Router Redundancy Protocol (VRRP) technology.The VRRP technology is applied to as on the layer-3 switch and router on the static configuration default gateway, carries out the terminal system that wide area network inserted or visited other local area network (LAN) net territory faster, more effective redundancy fault-tolerant ability is provided for relying on default gateway.At present, the VRRP technology no longer only is confined to the use on the router, but progressively is incorporated into the large-scale switching net, with the redundancy backup of the 3rd layer of exchange realizing high reliability.
When adopting the VRRP technology, a plurality of equipment of network side are formed a virtual equipment group, be referred to as backup group, in backup group, has only an equipment as host apparatus, miscellaneous equipment is then as stand-by equipment, and, at any time, have only host apparatus be responsible for network in miscellaneous equipment carry out data interaction.
In backup group inside, when the host apparatus operate as normal, host apparatus can periodically send a VRRP message to stand-by equipment, like this, if the stand-by equipment in the backup group regularly receives the VRRP message then can determine that host apparatus does not break down, if when the stand-by equipment in the backup group does not receive the VRRP message for a long time then can determine that host apparatus breaks down.At this moment, each stand-by equipment redefines a host apparatus according to the size of each stand-by equipment priority, if priority is identical, the IP address of then comparing each stand-by equipment, the big stand-by equipment in IP address is set to host apparatus, by this host apparatus that redefines be responsible for network in miscellaneous equipment carry out data interaction.
By above description as can be seen, in the prior art, can safeguard the activestandby state of each equipment in backup group inside, guarantee the backup group operate as normal by the VRRP message.Yet but lack the effective ways that carry out active and standby switching synchronously between the different backup groups of assurance at present, like this, the annexation between each backup group is made mistakes, thereby cause the data flow mistake.
Below by an example the asynchronous data flow Problem-Error that causes of activestandby state between the backup group is described.
Fig. 1 be the backup group formed of Softswitch with the backup group of switch composition between the annexation schematic diagram.Referring to Fig. 1, when the equal operate as normal of backup group that the backup group and the switch of Softswitch composition are formed, be by main with Softswitch be Softswitch 1 with main be that switch 1 directly links to each other with switch, standby Softswitch is that Softswitch 2 is that switch 2 directly links to each other with backup switch.When carrying out transfer of data, receive data by main with switch, and with switch the data that receive are sent to the main Softswitch of using by this master.
Fig. 2 is the annexation schematic diagram between the backup group that the backup group of Softswitch composition in the prior art carries out behind active and standby the switching and switch is formed.Referring to Fig. 1 and Fig. 2, such as, under normal operation, the annexation of two backup groups is as shown in Figure 1.In the backup group that Softswitch is formed, after breaking down as main Softswitch 1 with Softswitch, active and standby switching is carried out in backup group inside, by Softswitch 1 as standby Softswitch, use Softswitch by Softswitch 2 as main, the annexation of switching latter two backup group as shown in Figure 2.Referring to Fig. 2, owing in the backup group that Softswitch is formed active and standby switching has taken place, and do not carry out active and standby switching synchronously in the backup group that switch is formed, like this, then causing main is that switch 1 is that Softswitch 1 links to each other with standby Softswitch with switch, when the master is after switch 1 receives data with switch, just these data can be sent to standby Softswitch is Softswitch 1, owing in backup group, can only be that Softswitch 2 receives and deal with data with Softswitch by the master, therefore, then cause the data flow mistake, greatly reduced the service feature of network side.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method that realizes that activestandby state is synchronous, another object of the present invention is to provide a kind of system that realizes that activestandby state is synchronous, to guarantee realizing between the different backup groups that activestandby state is synchronous, avoids the data flow mistake.
In order to achieve the above object, technical scheme of the present invention is achieved in that
A kind of method that realizes that activestandby state is synchronous, this method comprises:
A, after first backup group carries out active and standby switching, host apparatus structure after switching in first backup group carries this host apparatus sign and main message with state information, and with the stand-by equipment that does not switch in second backup group that the message of being constructed is sent to it directly links to each other;
The stand-by equipment that does not switch in B, this second backup group obtains host apparatus sign and the main state information of use from received message, and according to the host apparatus sign of being obtained and master with state information with the host apparatus that self switches in second backup group.
In steps A, described structure carries host apparatus sign and main step with the state information message comprises: the host apparatus structure after switching in first backup group carries host apparatus sign and the main message of using the existing protocol of state information.
This method further comprises: increase specific territory in the Operations,Administration And Maintenance protocol massages;
The message of described existing protocol is the Operations,Administration And Maintenance protocol massages;
In steps A, the step that described structure carries host apparatus sign and main existing protocol message with state information comprises: write described host apparatus sign and master on the special domain that the host apparatus after switching in first backup group is increased and use state information in existing Operations,Administration And Maintenance protocol massages;
In step B, describedly obtain host apparatus sign and main step with state information comprises: the special domain that the stand-by equipment that does not switch in second backup group is increased from received Operations,Administration And Maintenance protocol massages obtains the host apparatus sign and the master uses state information.
The described step that increases special domain in the Operations,Administration And Maintenance protocol massages further comprises: the special domain that is increased is divided into information type subdomain, message length subdomain and information value subdomain;
In steps A, the described step that writes the host apparatus sign and lead with state information on special domain comprises: the host apparatus after switching in first backup group writes the sign and the main state information of using of described host apparatus on the information value subdomain of increasing special domain;
In steps A, the described step that writes the host apparatus sign and lead with state information on special domain further comprises: the host apparatus after switching in first backup group writes the sign of first backup group on the information type subdomain of increasing special domain, and is writing described special domain shared length in current Operations,Administration And Maintenance protocol massages on the message length subdomain;
In step B, describedly obtain host apparatus sign and main step with state information comprises: the stand-by equipment that does not switch in second backup group is according to the length information that writes on the message length subdomain in the Operations,Administration And Maintenance protocol massages, obtains the host apparatus sign and the master uses state information from information value subdomain;
In step B, the described step of obtaining the host apparatus sign and leading with state information further comprises: the stand-by equipment that does not switch in second backup group obtains the sign of first backup group according to the length information that writes on the message length subdomain in the Operations,Administration And Maintenance protocol massages from the information type subdomain;
In step B, the stand-by equipment that does not switch in described second backup group further according to the sign of first backup group that is obtained with the host apparatus that self switches in second backup group.
In step B, described stand-by equipment comprises the step that self switches to host apparatus: the stand-by equipment in described second backup group is adjusted into limit priority in second backup group with self priority, and self is set to host apparatus, by the Virtual Router Redundacy Protocol message self limit priority information is sent to miscellaneous equipment in second backup group then, the miscellaneous equipment in second backup group according to the limit priority information of carrying in the Virtual Router Redundacy Protocol message with the stand-by equipment that self switches in second backup group.
Described first backup group is the backup group that Softswitch is formed; Described second backup group is the backup group that switch is formed.
Described first backup group is the backup group that switch is formed; Described second backup group is the backup group that Softswitch is formed.
A kind of system that realizes that activestandby state is synchronous, this system comprises: the stand-by equipment that does not switch in the host apparatus in first backup group after the active and standby switching and second backup group, comprise Virtual Router Redundacy Protocol control unit and synchronous triggering unit respectively in the stand-by equipment that does not switch in the host apparatus in described first backup group after the active and standby switching and second backup group, and
The described active and standby Virtual Router Redundacy Protocol control unit (A1) that switches in the host apparatus of back, be used for switching when finishing monitoring, with the sign of the host apparatus at self place with mainly be sent to the described active and standby synchronous triggering unit (A2) that switches in the host apparatus of back with state information;
Synchronous triggering unit (A2), be used to receive the sign and the main state information of using of the host apparatus that Virtual Router Redundacy Protocol control unit (A1) sends, and structure carries active and standby back host apparatus sign and the main message with state information of switching, with the synchronous triggering unit (B1) in the cut-in stand-by equipment not in second backup group that the message of being constructed is sent to it directly links to each other;
Synchronous triggering unit (B1), be used to receive and carry described host apparatus sign and lead the message of using state information, from received message, obtain the sign and the main state information of use of described host apparatus, and with the host apparatus sign obtained with lead with state information and be sent to Virtual Router Redundacy Protocol control unit (B2) in the not cut-in stand-by equipment at self place;
Virtual Router Redundacy Protocol control unit (B2) is used for sign and the main state information of use according to the host apparatus that receives, with in second backup group at self place not the stand-by equipment of switching switch to host apparatus in second backup group.
Described synchronous triggering unit (A2), be used to construct and carry described host apparatus sign and main Operations,Administration And Maintenance protocol massages, with the synchronous triggering unit (B1) in the cut-in stand-by equipment not in second backup group that the Operations,Administration And Maintenance protocol massages of being constructed is sent to it directly links to each other with state information;
Synchronous triggering unit (B1) is used for obtaining from the Operations,Administration And Maintenance protocol massages that receives the sign and the main state information of using of described host apparatus.
Described first backup group and second backup group are: the backup group of being made up of any one network equipment of virtual support route redundancy protocol.
Described first backup group is the backup group that Softswitch is formed, and described second backup group is the backup group that switch is formed;
Perhaps, described first backup group is the backup group that switch is formed, and described second backup group is the backup group that Softswitch is formed.
This shows, in the present invention, can be between the different backup groups by message mutual such as Operations,Administration And Maintenance (OAM) protocol massages, realize activestandby state synchronously, avoided the data flow mistake, optimized network performance greatly.In addition, the present invention can utilize the OAM protocol massages to realize the synchronous of activestandby state, and the OAM protocol massages can not have influence on user's data stream as the low rate protocol massages, and the bandwidth of occupying is very limited, generally can not produce big influence to link, and can run on the entity of any support ether agreement, therefore, make the present invention have extremely strong practicality.
Description of drawings
Fig. 1 be the backup group formed of Softswitch with the backup group of switch composition between the annexation schematic diagram.
Fig. 2 is the annexation schematic diagram between the backup group that the backup group of Softswitch composition in the prior art carries out behind active and standby the switching and switch is formed.
Fig. 3 is the structural representation of system of the present invention.
Fig. 4 is the structural representation of system of the present invention in embodiments of the present invention.
Fig. 5 is the flow chart of the embodiment of the invention.
The schematic diagram of the OAM protocol massages that Fig. 6 is in embodiments of the present invention to be constructed.
Embodiment
The present invention proposes a kind of method that realizes that activestandby state is synchronous, its core concept is: after first backup group carries out active and standby switching, host apparatus structure after switching in first backup group carries this host apparatus sign and main message with state information, and with the stand-by equipment that does not switch in second backup group that the message of being constructed is sent to it directly links to each other; The stand-by equipment that does not switch in second backup group carries host apparatus sign and main message with state information with the host apparatus that self switches in second backup group according to what receive.
Wherein, the message that stand-by equipment in second backup group was constructed and be sent to the host apparatus after switching in first backup group can be the self-defining message of the present invention, also can utilize existing message to realize.Such as, utilize existing OAM protocol massages to realize.
Fig. 3 is the structural representation of system of the present invention.Referring to Fig. 3, the invention allows for a kind of system that realizes that activestandby state is synchronous, this system comprises: the stand-by equipment 300B that does not switch in the host apparatus 300A in first backup group after the active and standby switching and second backup group, comprise Virtual Router Redundacy Protocol control unit and synchronous triggering unit respectively among host apparatus 300A in described first backup group and the stand-by equipment 300B in second backup group, and
Virtual Router Redundacy Protocol control unit 301 among the host apparatus 300A is used for switching when finishing monitoring, with the sign of host apparatus 300A with mainly be sent to synchronous triggering unit 302 among the host apparatus 300A with state information;
Synchronous triggering unit 302, be used to receive sign and the main state information of using of the host apparatus 300A that Virtual Router Redundacy Protocol control unit 301 sends, and construct sign and the main message that carries host apparatus 300A with state information, with the synchronous triggering unit 303 among the second backup group stand-by equipment 300B that the message of being constructed is sent to it directly links to each other;
Synchronous triggering unit 303, be used to receive the sign of carrying host apparatus 300A and main message with state information, and with the sign of the host apparatus 300A that carries in this message with mainly be sent to Virtual Router Redundacy Protocol control unit 304 among the stand-by equipment 300B with state information;
Virtual Router Redundacy Protocol control unit 304 is used for sign and the main state information of using according to the host apparatus 300A that receives, and the stand-by equipment 300B at self place is switched to host apparatus in second backup group.
In the present invention, described first backup group and second backup group are: the backup group of being made up of any one network equipment of supporting the VRRP agreement.
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with drawings and the specific embodiments.
In following embodiment, the backup group that the backup group of forming with Softswitch is formed as described first backup group and switch is an example as described second backup group, and specific implementation process of the present invention is described.At this moment, the host apparatus after the described switching is the main Softswitch of using after switching, and the stand-by equipment after the described switching is the backup switch that does not switch.
Fig. 4 is the structural representation of system of the present invention in embodiments of the present invention.Fig. 5 is the flow chart of the embodiment of the invention.Referring to Fig. 4 and Fig. 5, in the backup group that Softswitch is formed, former master breaks down with Softswitch, make a standby Softswitch in the backup group that Softswitch forms switch to the host apparatus in this backup group, promptly the master uses Softswitch, at this moment, and for the backup group that switch is formed also can carry out active and standby switching simultaneously, the realization activestandby state is synchronous, and concrete processing procedure of the present invention may further comprise the steps:
Step 501: main after switching with in the Softswitch, when monitoring, Virtual Router Redundacy Protocol control unit 301 switches when finishing, be sent to synchronous triggering unit 302 with switching main sign and the master in back with state information with Softswitch.
Here, Virtual Router Redundacy Protocol control unit 301 can also further be sent to synchronous triggering unit 302 with switching the main sign with Softswitch place backup group in back.
Step 502: main with in the Softswitch after switching, synchronous triggering unit 302 receive main sign with Softswitch and main with after the state information, and structure carries this master with Softswitch sign and the main message of using state information.
Here, the message that synchronous triggering unit 302 is constructed can be the self-defining protocol massages of the present invention, also can be to utilize the prior protocols message to realize.
When utilizing the prior protocols message to realize, because existing OAM agreement has plurality of advantages, comprise: the OAM agreement is a kind of agreement that is positioned at data link layer, is in the MAC layer or above the MAC CONTROL layer, can have influence on other levels of Ethernet in data link layer; And the OAM protocol massages can not have influence on user's data stream as the low rate protocol massages, and the bandwidth of occupying is very limited, generally can not produce big influence to link; Can run on the entity of any support ether agreement.Therefore, preferably, in this step, switching back master can construct with the synchronous triggering unit 302 in the Softswitch and carry switching back master uses state information with Softswitch sign and master OAM protocol massages, its specific implementation process is: increase specific territory in advance in existing OAM protocol massages, and use the special domain that is increased to carry switching back main sign and the main state information of using with Softswitch.Wherein, when in existing OAM protocol massages, increasing specific territory, can be in parameter I nformation TLV#3, to increase this specific territory.
The schematic diagram of the OAM protocol massages that Fig. 6 is in embodiments of the present invention to be constructed.Referring to Fig. 6, such as, the present invention can increase a specific territory in advance in the parameter I nformation of OAM protocol massages TLV#3, the special domain that is increased can further be divided into 3 subdomains again, is respectively information type (SubInformation Type) subdomain, message length (SubInformation Length) subdomain and information value (SubInformation Value) subdomain.In this step, when structure OAM protocol massages, if further comprise the main information in back of switching in the information that synchronous triggering unit 302 receives with Softswitch place backup group, then synchronous triggering unit 302 can write the main information with Softswitch place backup group in back of switching in the subdomain SubInformation Type that is increased, thereby the transmission source of representing this OAM protocol massages, such as, when the value of SubInformation Type is 0X00, represent that the backup group that current OAM protocol massages is made up of Softswitch forms the message that backup group sends to switch; Synchronous triggering unit 302 writes described special domain shared length in current OAM protocol massages in the subdomain SubInformation Length that is increased; Synchronous triggering unit 302 writes in the subdomain SubInformation Value that is increased and switches main sign and this master with Softswitch in back and use state information with the master of Softswitch.Other parameter in the OAM protocol massages of being constructed is identical with parameter in the existing OAM protocol massages, such as, target MAC (Media Access Control) address is that the value of parameter Destination Address is 01-80-c2-00-00-02 in the OAM protocol massages of being constructed, the value Subtype of parameter is 0x03, and the value of parameters C ode is that 0x00 is expressed as OAM connection message etc.
Step 503: synchronous triggering unit 302 is sent to the message of being constructed the synchronous triggering unit 303 in the not cut-in stand-by switch that directly links to each other with it.
Here, because the backup group that Softswitch is formed switches, and the backup group that switch is formed also switches, main what directly link to each other with the synchronous triggering unit 302 in the Softswitch is the synchronous triggering unit 303 in the cut-in stand-by switch not so this moment is with switching the back, that is to say, in this step, synchronous triggering unit 302 can be sent to the message of being constructed the synchronous triggering unit 303 in the cut-in stand-by switch not.
Step 504: after synchronous triggering unit 303 receives message, obtain after the switching of carrying in the message main with Softswitch sign and the main state information of using.
Here, such as, the message that synchronous triggering unit 303 receives is to carry the main OAM protocol massages of using state information with Softswitch sign and master in switching back, then synchronous triggering unit 303 obtains and mainly after the switching of carrying in the message comprises with Softswitch sign and main process with state information: synchronous triggering unit 303 is according to the length information that writes on the SubInformation Length subdomain in the OAM protocol massages, obtains the host apparatus sign and the master uses state information from SubInformation Value subdomain.And in this step, synchronous triggering unit 303 also can obtain the sign that Softswitch is formed backup group from the SubInformation Type subdomain the OAM protocol massages.
Step 505: synchronous triggering unit 303 is with main with the Softswitch sign with mainly be sent to Virtual Router Redundacy Protocol control unit 304 in the cut-in stand-by switch not with state information after the switching of being obtained.
Here, synchronous triggering unit 303 sign that also Softswitch that obtained can be formed backup group is sent to Virtual Router Redundacy Protocol control unit 304.
Step 506: Virtual Router Redundacy Protocol control unit 304 is according to main with Softswitch sign and the main state information of use after the switchings that receive, and the master that the backup switch at self place is switched in the switch composition backup group uses switch.
Here, the sign that Virtual Router Redundacy Protocol control unit 304 can be further formed backup group according to the Softswitch that receives identifies switches the main Softswitch of use in back, switches to switch and forms the main process of using switch in the backup group thereby carry out backup switch with self place.
In this step, it is prior art that Virtual Router Redundacy Protocol control unit 304 switches to main process with switch with the backup switch at self place, can simply be described as: Virtual Router Redundacy Protocol control unit 304 is adjusted into switch with the priority of self place backup switch and forms limit priority in the backup group, and the backup switch at self place is set to the main switch of using, by the VRRP message self limit priority information is sent to switch then and forms miscellaneous equipment in the backup group, this miscellaneous equipment is formed backup switch in the backup group according to the limit priority information of carrying in the VRRP message with self switching to switch.
In the above-described embodiments, the backup group of being made up of Softswitch is as first backup group of the present invention, promptly at first carry out the backup group of active and standby switching, and the backup group of being made up of switch promptly carries out the backup group of active and standby switching synchronously as second backup group of the present invention.In other embodiments of the invention, also the backup group that can be made up of switch is as described first backup group, and the backup group of being made up of Softswitch is as second backup group, perhaps, the backup group of being made up of the miscellaneous equipment of supporting the VRRP agreement in the network comes respectively as first backup group and second backup group, and the principle of synchronous process of activestandby state and the described process of the foregoing description is identical between its realization backup group.
In a word, the above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.