CN102447615A - Switching method and router - Google Patents

Switching method and router Download PDF

Info

Publication number
CN102447615A
CN102447615A CN2010105100648A CN201010510064A CN102447615A CN 102447615 A CN102447615 A CN 102447615A CN 2010105100648 A CN2010105100648 A CN 2010105100648A CN 201010510064 A CN201010510064 A CN 201010510064A CN 102447615 A CN102447615 A CN 102447615A
Authority
CN
China
Prior art keywords
router
alternate
route device
primary route
fast detecting
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.)
Pending
Application number
CN2010105100648A
Other languages
Chinese (zh)
Inventor
翟洪军
龚协丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2010105100648A priority Critical patent/CN102447615A/en
Priority to PCT/CN2011/076077 priority patent/WO2012048585A1/en
Publication of CN102447615A publication Critical patent/CN102447615A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a switching method and router, wherein the switching method comprises: detecting whether the master router works properly by the rapid detection conversation established between the Alternate routers and the master router, wherein the Alternate router is elected from the standby routers; upon detection failure of the master router, the Alternate router switches to master state from Alternate sate and switches to a new master router. The invention solves the problem of fast switching of main router in fault in prior art.

Description

A kind of changing method and router
Technical field
The present invention relates to network communication field, in particular to a kind of in VRRP (Virtual Router Redundancy Protocol, Virtual Router Redundancy Protocol) network environment the changing method of VRRP active and standby router and the router in the VRRP backup group.
Background technology
Universal day by day along with internet (Internet), people are also more and more stronger to the dependence of network, and the reliability of network has become the key factor in the current local area network (LAN).For this reason, IETF has formulated VRRP.This protocol application is on three-tier switch and router, and the terminal system of carrying out extranet access for the dependence default gateway provides faster, more effective redundancy fault-tolerant ability, has strengthened the reliability of LAN gateway.
The operation principle of VRRP is: two or more router aggregations together; Form a virtual router (or being called the VRRP backup group); And consistent virtual IP address (Internet Protocol is provided externally; Internet protocol) and virtual MAC (Media Access Control, medium access control) address.Main frame in the local area network (LAN) is jumped the visit that realizes external network through next that this virtual IP address is appointed as acquiescence.Any moment, have only a router to be responsible between inside and outside, transmitting data in the backup group, be called primary route device or Master, other router is as standby router or Backup router.The primary route device is declared the existence of oneself through periodically sending the keep-alive message, and alternate routing is through receiving the state that the keep-alive message detects the primary route device.If in continuous several cycles (second level cycle), do not receive the keep-alive message, standby router just thinks that the primary route device lost efficacy, and initiates the election contest of primary route device.The standby router of optimum (comprising: priority is the highest or priority is identical but primary ip address is maximum) will become new primary route device, and takes over the message forwarding work of former primary route device, thereby guarantees the unimpeded of local area network (LAN) and external network communication.
The keep-alive message of second level sends the cycle, the detection that causes the VRRP failed router with also be switching time second grade to satisfy the Millisecond requirement of real time business such as voice far away.For this reason; Generally set up the session of fault fast detecting (such as BFD (Bidirectional Forwarding Detection through frequency or the employing of between the VRRP active and standby router, accelerating the transmission of keep-alive message; Two-way forwarding detects) session) wait technological; With the detection of quickening fault and the switch speed of equipment, satisfy the needs of real time business.But these technology are also brought some new problems when satisfying the real time business needs.
Wherein, adopt the principle of the method for setting up the BFD session to be:, to reach the purpose that fault fast detecting and equipment switch fast through between the VRRP active and standby router, setting up the state that the BFD session detects the primary route device.In VRRP, after the primary route device broke down, the primary route device can be moved to another from an equipment.For the VRRP backup group that has many routers, detect the state of primary route device in order to use the BFD session all the time, all need set up a BFD session between any two routers in the backup group.Like this, just need in comprising the VRRP backup group of many routers, set up Full mesh BFD session, not only can consume massive band width, also can increase equipment (especially primary route device) burden.
What is more important when the VRRP backup group comprises the router more than two, detects the state of primary route device merely through the BFD session, can not guarantee that the primary route device lost efficacy after, the equipment switching capability that necessarily has the submicrosecond level.
For example; As shown in Figure 1; Link together through Layer 2 switch between the lan device (H1, H2, H3, H4), wherein router-A, router B and router C form virtual router, and router-A is the primary route device; For the state of fast detecting primary route device, router B and router C have set up the BFD session with router-A.
Fault has taken place in router-A sometime, and behind tens of milliseconds, router B and router C have almost found this fault simultaneously, just launch the election contest of primary route device through the mode of sending the keep-alive message.Suppose that router B sends to the keep-alive message on the network earlier, the MAC indumentum of switch is upgraded, and the outbound port that promptly arrives the virtual MAC of virtual router changes to port B.After router C has put into the buffer queue of transmit port with the keep-alive message of oneself, the VRRP module just receive router B the keep-alive message (such as, process scheduling or system load heavily wait reason).Subsequently, the keep-alive message of router C is sent on the network, and the MAC indumentum of switch is upgraded once more, and port C has become the outbound port of virtual MAC.
Because the priority of router B is higher, thus be chosen as new primary route device, but the message that mails to virtual router has but been sent to router C (not bearing message forwarding work) by switch, thus cause the interruption of intranet and extranet visit.This problem only could solve after the next keep-alive of the transmission of router B, and this is the time of needs more than 1 second at least, is difficult to satisfy the needs of real time business.
Summary of the invention
Main purpose of the present invention is to provide a kind of changing method and router, the quick switching problem when having solved primary route device fault in the prior art.
According to an aspect of the present invention; A kind of changing method is provided; Comprise: preparation (Alternate) router through and the primary route device between the fast detecting session of setting up detect the primary route device and whether lost efficacy, wherein, the Alternate router is elected from standby router; After detecting the primary route device and losing efficacy, the Alternate router from the Alternate state exchange to main with state and switch to new primary route device.
Further; The Alternate router through and the primary route device between the fast detecting session of setting up detect before whether the primary route device lost efficacy; Also comprise: the primary route device is initiated the election of Alternate router, and the standby router of election optimum is as the Alternate router; Fast detecting session between foundation of primary route device and the Alternate router.
Further; The primary route device is initiated the election of Alternate router; The optimum standby router of election comprises as the Alternate router: the primary route device periodically sends the keep-alive message, and initiates the election of Alternate router through send Alternate router election request message to standby router; Standby router returns the response message that the Alternate router is elected request message to the primary route device, wherein, carries the priority and/or the primary ip address of standby router in the response message; The standby router that the election of primary route device has limit priority is as the Alternate router, and perhaps, under the identical situation of priority, the standby router of primary route device election primary ip address maximum is as the Alternate router; Having the maximum standby router of limit priority or primary ip address is transformed into the Alternate state and switches to the Alternate router from stand-by state.
Further; Before the fast detecting session between foundation of primary route device and the Alternate router; Also comprise: the primary route device is respectively through fast detecting conversation type negotiation packet and fast detecting session parameter negotiation packet, with the type and the parameter of Alternate router negotiation fast detecting session; Then the fast detecting session between foundation of primary route device and the Alternate router comprises: after consulting successfully, the primary route device is according to the fast detecting session between the type that consults and parameter foundation and the Alternate router.
Further, in above-mentioned method, also comprise: as if setting up failure or consulting failure, then the Alternate router also switches to standby router again from the Alternate state exchange to stand-by state; Standby router is intercepted the keep-alive message that the primary route device sends; If do not receive keep-alive message within a certain period of time from the primary route device; Then standby router is initiated the election of primary route device; The new primary route device of standby router conduct that election is optimum; Go forward side by side to become owner of with router and initiate the election of Alternate router, the standby router of election optimum is as the step of Alternate router.
Further; At the Alternate router from the Alternate state exchange to main with state and after switching to new primary route device; New primary route device gets into the primary route device and initiates the election of Alternate router, elects the step of optimum standby router as the Alternate router.
Further, the fast detecting session includes but not limited to: two-way forwarding detects (BFD) session, SDH (SDH) session, heartbeat session.
According to a further aspect in the invention; A kind of router is provided; Comprise: detection module, be used under the situation of this router for preparation (Alternate) router, through and the primary route device between the fast detecting session of setting up detect the primary route device and whether lost efficacy; Wherein, the Alternate router is elected from standby router; Handover module, being used at this router is under the situation of Alternate router, after detection module detects the primary route device and lost efficacy, from the Alternate state exchange to main with state and switch to the primary route device.
Further; Also comprise: transceiver module; Being used at this router is under the situation of primary route device; Initiate the election of Alternate router, the standby router that election has limit priority is as the Alternate router or when priority is identical, and the standby router of election primary ip address maximum is as the Alternate router; Set up module, be used for after transceiver module elects the Alternate router, whether the fast detecting session between foundation and the Alternate router lost efficacy so that the Alternate router detects router through the fast detecting session; Wherein, it is under the situation of primary route device that handover module also is used at this router, after detection module detects this router and lost efficacy, from main with state exchange to stand-by state and switch to standby router.
Further; Also comprise: negotiation module; Be used for before the fast detecting session of setting up between module foundation and the Alternate router; Respectively through fast detecting conversation type negotiation packet and fast detecting session parameter negotiation packet, with the type and the parameter of Alternate router negotiation fast detecting session; Wherein, set up module after negotiation module is consulted successfully, be used for according to the fast detecting session between the type that consults and parameter foundation and the Alternate router.
Through the present invention; Only between Master router and Alternate router, set up the fast detecting session; And need not all to set up between any two routers in backup group a fast detecting session; Therefore, the quick switching problem when having solved primary route device fault of the prior art has guaranteed to have guaranteed that the submicrosecond level between the active and standby router switches fast.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 utilizes the BFD session to detect the sketch map of the state of primary route device among the VRRP according to correlation technique;
Fig. 2 is the flow chart according to the changing method of the embodiment of the invention;
Fig. 3 is the state transition graph of router among the VRRP according to the preferred embodiment of the invention;
Fig. 4 is the flow chart of changing method according to the preferred embodiment of the invention;
Fig. 5 is the state variation flow chart of Backup router according to the preferred embodiment of the invention;
Fig. 6 is the state variation flow chart of Alternate router according to the preferred embodiment of the invention;
Fig. 7 is the state variation flow chart of Master router according to the preferred embodiment of the invention;
Fig. 8 is the sketch map according to the router of the embodiment of the invention;
Fig. 9 is the sketch map of router according to the preferred embodiment of the invention.
Embodiment
Hereinafter will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
Consume massive band width and the problem that increases facility load in order to solve the meeting that exists in the correlation technique; And when the VRRP backup group comprises the standby router more than two; The simple state that detects the primary route device through the BFD session; Can not guarantee necessarily to have after the primary route device lost efficacy the submicrosecond level the equipment switching capability problem one of at least, following examples of the present invention are through the existing VRRP agreement of expansion, i.e. VRRP agreement (Enhanced Virtual Redundant Router Protocol through expansion; EVRRP) realize the fast switching method of VRRP active and standby router, this EVRRP mainly comprises:
(1) expansion of VRRP state except three kinds of the original Initialize of VRRP router (initially), Backup (subsequent use) and Master (main with) the state, is expanded a kind of Alternate (preparation) state.The router (promptly being called the Alternate router) that is in the Alternate state can detect the state (whether promptly detect the primary route device lost efficacy) of Master router through the fast detecting session; After discovery Master router breaks down (promptly losing efficacy); Take over its work immediately, promptly switch to new primary route device.
(2) expansion of protocol massages; Except the Advertisement message (being the keep-alive message) of existing VRRP, expanded the Alternate router and elected request message (Alternate Request), Alternate router to elect response message (Alternate Reply), fast detecting conversation type negotiation packet (Session Type Negotiate) and the fast detecting session parameter negotiation packet (Session Parameters Negotiate) of request message.
Wherein, the form of the above-mentioned various messages that expand can be according to the actual requirements, voluntarily or unified regulation.
Fig. 2 is according to the flow chart of the changing method of the embodiment of the invention, may further comprise the steps:
Step S202, the Alternate router through and main detect the primary route device with the fast detecting session of setting up between (Master) router and whether lost efficacy, wherein, this Alternate router is from current all subsequent use (Backup) routers, to elect;
Step S204, after detecting the primary route device and losing efficacy, the Alternate router from the Alternate state exchange to main with state (as shown in Figure 3) and switch to new primary route device.
Present embodiment is only set up the fast detecting session between Master router and Alternate router; And need not all to set up between any two routers in backup group a fast detecting session; Therefore, solved the meeting that exists in the correlation technique and consumed massive band width and the problem that increases facility load, thereby in a VRRP backup group, only set up a fast detecting session; Bandwidth occupancy is little, and has alleviated the burden of equipment (especially standby router).
In addition, the quick switching problem when present embodiment has also solved primary route device fault of the prior art, thus guaranteed to have guaranteed that the submicrosecond level between the active and standby router switches fast.
As shown in Figure 4, changing method comprises following concrete treatment step according to the preferred embodiment of the invention:
Step S402, Backup router intercept the keep-alive message that the Master router sends;
Step S404, the Backup router judges whether receive the keep-alive message from the Master router within a certain period of time, if not, then initiates the election of Master router, and gets into step S406; If then go to step S402;
Particularly, standby router is initiated the election of primary route device, and election has optimum standby router as new Master router (as shown in Figure 3, as to be elected to new router promptly to switch to the Master state from stand-by state).
Wherein, optimum standby router is meant standby router with limit priority or under the identical situation of priority, the standby router that primary ip address is maximum.
Step S406, new Master router initiate the election of Alternate router, and the standby router of election optimum is as the Alternate router;
The same, optimum standby router is meant standby router with limit priority or under the identical situation of priority, the standby router that primary ip address is maximum.
For example, this step S406 may further comprise the steps 1-4:
Step 1; New Master router externally sends periodic keep-alive message (promptly periodically sending the keep-alive message), and initiates the election of Alternate router through send Alternate Request message (Alternate router election request message) to the Backup router;
Step 2 after all Backup routers are received Alternate Request message, is responded Alternate Reply message, wherein, carries the information such as priority and primary ip address of standby router in the Alternate Reply message;
Step 3, new primary route device elect optimum standby router in view of the above as the Alternate router;
Step 4, this optimum standby router (standby router that is promptly elected) is transformed into Alternate state (as shown in Figure 3) and switches to the Alternate router from stand-by state.
Obviously, in step 1-2, the primary route device also can adopt the message of other types to initiate the election of Alternate router, and the message that standby router also can be responded other types carries information such as own priority and primary ip address and elects with completion.
Step S408; Between Master router and the Alternate router; Through sending Session Type Negotiate message (fast detecting conversation type negotiation packet) and Session Parameters Negotiate message (fast detecting session parameter negotiation packet); Consult the type and the parameter of fast detecting session,, then get into step S410 if consult successfully; Otherwise, go to step S418;
Step S410 sets up the fast detecting session between Master router and the Alternate router, if session is set up successfully, then gets into step S412, otherwise goes to step S418;
Particularly, type and the parameter according to the fast detecting session that consults set up the fast detecting session between Master router and the Alternate router.
Here it should be noted that: in the VRRP backup group, only set up the fast detecting session between Master router and the Alternate router, promptly the Master router only set up and the Alternate router between the fast detecting session.
Step S412, the Alternate router through among the step S410 and the fast detecting session of setting up between the Master router detect the state (promptly detect Master router whether lost efficacy or break down) of Master router, and get into step S414;
This step S412 is corresponding to the step S202 among Fig. 2.
Step S414 lost efficacy if find the Master router, got into step S416, otherwise went to step S414;
Step S416, the Alternate router is promoted as the Master router, and is as shown in Figure 3, and its state is the Master state from the Alternate state exchange also, goes to step S406;
Above-mentioned steps S414-step S416 is corresponding to the step S204 among Fig. 2.
Step S418, the Alternate router return back to the Backup router, and is as shown in Figure 3, its state also from the Alternate state exchange to the Backup state; Go to step S402.
In like Fig. 2 and embodiment shown in Figure 4, the fast detecting session can be quick fault testing sessions such as BFD session, SDH (Synchronous Digital Hierarchy, SDH) session or heartbeat session.
The above-mentioned preferred embodiment of the present invention is through the expansion (being the EVRRP agreement) to the VRRP agreement; In the state of VRRP, increased a kind of Alternate state, be in the Backup router of the router of Alternate state as the most qualified alternative Master router work in all Backup routers.When carrying out active and standby switching or fast detecting; The Master router only and dynamically set up the fast detecting session between the Alternate router; Through this session, the Alternate router can detect the inefficacy of Master router apace, and takes over the work (promptly switching to the primary route device) of Master router at once; Thereby realize the quick switching of faulty equipment, and improved the switch speed of equipment.
In addition, in the above-mentioned preferred embodiment, the fast detecting session between Master router and the Alternate router is automatic foundation of mode through consultation, can not increase network management personnel's maintenance load, therefore safeguards simple.And the type of fast detecting session and parameter are that mode is confirmed through consultation, can expand as required in the enforcement, thereby have extensibility preferably.
It should be noted that the VRRP agreement that EVRRP agreement that the embodiment of the invention proposes can compatibility standard, support the equipment of EVRRP agreement, except sending the EVRRP amplifying message, also can send the VRRP message of standard.So; In EVRRP equipment and VRRP apparatus interconnection environment, will carry out work according to the VRRP mechanism of standard between the equipment, and in the environment that has only EVRRP equipment; Through dynamically setting up the fast detecting conversation mechanism, realize that the submicrosecond level of faulty equipment is switched fast between the equipment.
From above-mentioned Fig. 2 and embodiment shown in Figure 4, can find out that as shown in Figure 3, the EVRRP state of each router in the VRRP backup group comprises following four kinds of states according to the preferred embodiment of the invention:
(1) Initial (initially) state: the initial state of EVRRP router, under this state, equipment is not handled any message, and after Startup (startup) incident occurring, whether router will be 255 to transit to Master or Backup state according to the priority of oneself;
(2) Backup (subsequent use or backup) state: the router that is under this state is not done any data message forwarding work; But can intercept the keep-alive message of Master router, intercept and reply Alternate router election message and fast detecting session negotiation message (comprising fast detecting conversation type negotiation packet and fast detecting session parameter negotiation packet).Participate in the election contest of Alternate router, just transit to the Alternate state if win; Otherwise under the Backup state, detect the keep-alive message of Master router;
(3) Alternate (preparation) state: the router that is under this state does not E-Packet; But can detect the state of Master router through the fast detecting session; Lost efficacy if find the Master router, and just be promoted as the Master router, otherwise continue to intercept the state of Master router;
(4) Master (main using) state: the router that is under this state is born actual message forwarding work, and regularly sends the keep-alive message, declares the existence of oneself.Simultaneously; Also be responsible for to initiate the election of Alternate router, the foundation of fast detecting session, and send fast detecting keep-alive message so that the Alternate router can utilize the fast detecting session of foundation and whether lose efficacy or break down through receiving state that this fast detecting keep-alive message detects the Master router through the fast detecting session of setting up.
Wherein, except the Initial state,, other any states Shutdown (stopping) incident will return back to the Initial state at once as long as receiving down.
Come to explain respectively the flow process of the state variation of Backup router, Alternate router and Master router below through Fig. 5, Fig. 6 and Fig. 7.
As shown in Figure 5, the state variation flow process of Backup router may further comprise the steps S502-step S520 according to the preferred embodiment of the invention:
Step S502: intercept protocol massages, intercept the keep-alive message of Master router and the Alternate election request message of Master router initiation.After receiving the keep-alive message, with replacement Master keep-alive timer.
Step S504: if Master keep-alive timer expiry (promptly in continuous several cycles, not receiving the keep-alive message of Master router) just thinks that the Master router lost efficacy, and continued step S506, otherwise went to step S512;
Step S506: the election contest of beginning Master router, the Backup router is initiated the election contest of Master router through externally sending the keep-alive message;
Step S508: carry an election, optimum Backup router will be won in the Master election contest, if win, continue step S510; Otherwise, go to step S502;
Step S510: switch to the Master state, the router of carry an election can externally send the gratuitous ARP packet that comprises virtual IP address and virtual MAC, upgrades the MAC table of mutual machine and the ARP table of main frame.Then, router finishes Backup flow process, the state processing flow process that gets into Master router as shown in Figure 7;
Step S512:, continue step S514, otherwise go to step S502 if receive Alternate router election message;
Step S514: for the Alternate router election request message of receiving, reply response message, wherein, carry information such as own current priority and primary ip address in this response message;
Step S516-S518: the standby router that the Alternate response message that the primary route device is responded according to Alternate election request message and Backup router elects optimum as the Alternate router after; Standby router judges whether the Alternate election wins; If in the Alternate election, win; Then continue step S520, otherwise go to step S502;
Step S520: be promoted as the Alternate router from standby router, be transformed into the Alternate state, finish the handling process of Backup router, the state processing flow process that gets into Alternate router as shown in Figure 6 from stand-by state.
As shown in Figure 6, for the Alternate router, its state variation flow process may further comprise the steps S602-step S616:
Step S602: through and the Master router between mutual Session TypeNegotiate message and Session Parameters Negotiate message, consult the type of fast detecting session and set up the required parameter of session;
Step S604: if to conversation type and parameter, reach an agreement with Master (promptly consulting successfully) then continued step S606, otherwise goes to step S616;
Step S606: according to the conversation type that consults with set up the required parameter of session, set up fault fast detecting session (being the fast detecting session) between Alternate router and the Master router;
Step S608:Alternate router detects the state of Master router through the fast detecting session, if receive quick keep-alive message through the fast detecting session, and the quick keep-alive timer of then resetting;
Step S610: if quick keep-alive timer expiry; Promptly do not receive quick keep-alive message in the cycle in continuous several fast detecting; The Alternate router just thinks that the Master router lost efficacy, if lost efficacy then continue step S610, otherwise goes to step S614;
After step S612:Alternate router finds that the Master router lost efficacy; Can move to the Master state immediately; And take over the message forwarding work of Master, finish the state processing flow process of Alternate router, the handling process that gets into the state of Master router as shown in Figure 7;
Step S614: after Alternate router and Master router were set up the fast detecting session, the Alternate router still can detect keep-alive message and Alternate router election/response message.If under contention mode, find these messages sender more excellent (be that priority is higher, or priority is identical but its primary ip address is bigger), just show the existences router more excellent in the network, continuation step S616, otherwise go to step S608 than Master;
Step S616: remove and the Master router between the fast detecting session, abandon oneself Alternate identity, return back to the Backup state, get into the state processing flow process of Backup router as shown in Figure 5.
As shown in Figure 7, the state variation flow process of Master router may further comprise the steps S702-S722:
Step S702: check that whether and between the Alternate router oneself exist the session of fault fast detecting;
Step S704: and if have the fast detecting session between the Alternate router, then explain to have had the Alternate router in the network, go to step S716, otherwise continue step S706;
Step S706: through external transmission Alternate Request message, the Master router is initiated the election of Alternate router.After receiving this message, the Backup router can be responded Alternate Reply message.Utilize above-mentioned two kinds of information that message carries, optimum router will be the Alternate router by election;
Step S708: if exist certain Backup router to be elected router, will continue step S710, otherwise go to step S716 for Alternate;
Step S710: consult to set up the conversation type and the desired parameters of the session of fault fast detecting with the Alternate router.In the negotiation, use Session Type Negotiate and two kinds of messages of Session Parameters Negotiate;
Step S712:, if Master and Alternate reach an agreement (promptly consulting successfully) with regard to the type and the parameter of fast detecting session, continue step S714, otherwise go to step S716;
Step S714:, set up the session of fault fast detecting with the Alternate router according to conversation type that consults and parameter;
Step S716: send VRRP keep-alive message and detect the session keepalive message, intercept messages such as keep-alive message that other routers send, Alternate Reply.Priority through carrying in priority and primary ip address and these messages with oneself is compared (priority and the primary ip address that are the message sender) with primary ip address, can check whether there is more excellent router in the network;
Step S718:, continue step S720, otherwise go to step S716 if having more excellent router on contention mode and the discovery network;
Step S720: the fault fast detecting session of setting up between dismounting and the Alternate router;
Step S722: return back to the Backup state, abandon the Master identity, return the Backup state, get into the state processing flow process of Backup router as shown in Figure 5.
Fig. 8 is according to the router in the VRRP backup group of the embodiment of the invention; This router (also can be called the EVRRP router) comprising: detection module 10; Being used at this router is under the situation of Alternate router (promptly being in the Alternate state); Through and the primary route device between the fast detecting session of setting up detect the primary route device and whether lost efficacy, wherein, the Alternate router is elected from all standby routers; Handover module 20, being used at this router is under the situation of Alternate router (promptly being in the Alternate state), after detection module 10 detects the primary route device and lost efficacy, from the Alternate state exchange to main with state and switch to the primary route device.
When reality is implemented; For the election that realizes the Alternate router and set up the primary route device and the Alternate router between the fast detecting session; This router can also comprise: transceiver module 30; Being used at this router is under the situation of primary route device (promptly being in the Master state), initiates the election of Alternate router, and the optimum standby router of election is as the Alternate router; Set up module 40; Be used for after transceiver module 30 has elected the Alternate router, the fast detecting session between foundation and the Alternate router was so that whether the Alternate router can lose efficacy through the state of this fast detecting session detection oneself; Then also to be used at this router be under the situation of primary route device to handover module 20, after detection module 10 detects this router and lost efficacy, enable this router from main with state exchange to stand-by state and switch to standby router.
Wherein, it is under the situation of primary route device that transceiver module 30 also is used at this router, periodically sends the keep-alive message, and initiates the election of Alternate router through send Alternate router election request message to all standby routers; Also being used at this router is under the situation of standby router (promptly being in stand-by state); Return the response message of the Alternate router election request message that receives to the primary route device; Wherein, Carry in this response message oneself priority and/or primary ip address so that the primary route device elect have limit priority standby router as the Alternate router or under the identical situation of priority, elect the maximum standby router of primary ip address as the Alternate router; Wherein, this standby router with limit priority or primary ip address maximum is transformed into the Alternate state and switches to the Alternate router from stand-by state.
Can set up the fast detecting session in order to make automatically between Master router and the Alternate router; This router can also comprise: negotiation module 50; Be used for set up that module 40 is set up and the Alternate router between the fast detecting session before, the type and the parameter of consulting above-mentioned fast detecting session through fast detecting conversation type negotiation packet and fast detecting session parameter negotiation packet and Alternate router respectively; Wherein, set up module 40 after negotiation module 50 is consulted successfully, be used for according to the fast detecting session between the type that consults and parameter foundation and the Alternate router.
Wherein, If set up type and parameter failure that module 40 is set up fast detecting conversation failure or negotiation module 50 negotiation fast detecting sessions; Then handover module 20 also is used for to be under the situation of Alternate router, also to switch to standby router from the Alternate state exchange to stand-by state again at this router.
It is under the situation of standby router that transceiver module 30 in this router also is used at this router; Intercept the keep-alive message that the primary route device sends; If do not receive keep-alive message within a certain period of time from the primary route device, then initiate the election of primary route device, elect optimum standby router as new primary route device; And getting into the election of initiation Alternate router, the standby router of election optimum is as the step of Alternate router.
Wherein, optimum is meant to have the highest priority or under the identical situation of priority, and primary ip address is maximum.
Wherein, above-mentioned fast detecting session can be quick fault testing sessions such as BFD session, SDH session or heartbeat session.
As shown in Figure 9; In actual implementation process; Transceiver module 30 can be realized by packet sending and receiving module 901, VRRP packet sending and receiving module 902 and VRRP state management module 903 with handover module 20; Negotiation module 50 can realize by fast detecting session management module 904, detection module 10 with set up module 40 and can realize by fault fast detecting module 905.The concrete function of each functional module is following:
Packet sending and receiving module 901 is used for being responsible for the reception and the transmission of data message, protocol massages and fault detect message.For the message that receives, this module can realize message forwarding or according to type of message message is distributed to VRRP packet sending and receiving module 902 or fault fast detecting module 905.Message for from VRRP packet sending and receiving module 902 and fault fast detecting module 905 modules after this module suitably encapsulates, sends from corresponding outbound port.In addition, the reception of this module message and transmission also receive the influence of VRRP state management module 903 control informations;
VRRP packet sending and receiving module 902, Extended Protocol (or being called the EVRRP agreement) message that is used for accomplishing VRRP standard agreement message and the present invention receives and sends.The protocol massages relevant with this module comprises: the Alternate Request/Reply message of VRRP keep-alive message, EVRRP agreement and Session Type/Parameters Negotiate message.Through to analyzing, distinguish control protocol state machine and the session of fault fast detecting from the protocol massages of packet sending and receiving module 901.This module also makes up protocol massages according to the state of router, and is handed down to the 901 completion protocol massages transmissions of packet sending and receiving module;
VRRP state management module 903 is used for being responsible for the condition managing of VRRP router, is Master etc. such as election Alternate router, Alternate router upgrade from the Backup router.The factor that influences the VRRP condition managing mainly comprises transmitting-receiving of VRRP message (from VRRP packet sending and receiving module 902) and fast detecting session management information (from fast detecting session management module 904).Conversely, the state information of router can influence the transmitting-receiving of VRRP message, data message and detection messages and the management of fast detecting session again;
Fast detecting session management module 904 is used to accomplish the negotiation of fast detecting conversation type and session parameter, and the fast detecting session is set up or removed to notice fault fast detecting module 905.Session status can influence the transition between states of VRRP router;
Fault fast detecting module 905 is used for foundation, maintenance and the dismounting of fast detecting session, and detects the state of opposite equip..If the discovering device fault will be notified fast detecting session management module 904, and then influence the state of VRRP router.
From above description, can find out that the present invention has realized following technique effect:
The Master router can be selected an optimum in the Backup router router is as the Alternate router, and the mode between that utilization is consulted is set up the session of a fault fast detecting.Through this session, the Alternate router can detect the state of Master router in real time, in case the Master router lost efficacy, the Alternate router can be taken over the work of Master router immediately, satisfies the needs of real time business.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the storage device and carry out, and in some cases, can carry out step shown or that describe with the order that is different from here by calculation element; Perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a changing method is characterized in that, comprising:
Preparation Alternate router through and the primary route device between the fast detecting session of setting up detect said primary route device and whether lost efficacy, wherein, said Alternate router is elected from standby router;
After detecting said primary route device and losing efficacy, said Alternate router from the Alternate state exchange to main with state and switch to new primary route device.
2. method according to claim 1 is characterized in that, the Alternate router through and the primary route device between the fast detecting session of setting up detect before whether said primary route device lost efficacy, also comprise:
Said primary route device is initiated the election of Alternate router, and the standby router of election optimum is as the Alternate router;
Said fast detecting session between said primary route device foundation and the said Alternate router.
3. method according to claim 2 is characterized in that, said primary route device is initiated the election of Alternate router, and the optimum standby router of election comprises as the Alternate router:
Said primary route device periodically sends the keep-alive message, and initiates said Alternate router election through send Alternate router election request message to said standby router;
Said standby router returns the response message that said Alternate router is elected request message to said primary route device, wherein, carries the priority and/or the primary ip address of said standby router in the said response message;
The standby router that said primary route device election has limit priority is as the Alternate router, and perhaps, under the identical situation of priority, the standby router of said primary route device election primary ip address maximum is as the Alternate router;
Said standby router with limit priority or primary ip address maximum is transformed into the Alternate state and switches to the Alternate router from stand-by state.
4. method according to claim 2 is characterized in that,
Before the said fast detecting session between said primary route device foundation and the said Alternate router; Also comprise: said primary route device is respectively through fast detecting conversation type negotiation packet and fast detecting session parameter negotiation packet, the type and the parameter of consulting said fast detecting session with said Alternate router;
Said fast detecting session between said primary route device foundation and the said Alternate router comprises: after consulting successfully, said primary route device is according to the said fast detecting session between the said type that consults and parameter foundation and the said Alternate router.
5. method according to claim 4 is characterized in that, also comprises:
As if setting up failure or consulting failure, then said Alternate router also switches to standby router again from the Alternate state exchange to stand-by state;
Said standby router is intercepted the keep-alive message that said primary route device sends;
If do not receive keep-alive message within a certain period of time from said primary route device; Then said standby router is initiated the election of primary route device; The new primary route device of standby router conduct that election is optimum; And getting into the election of said primary route device initiation Alternate router, the standby router of election optimum is as the step of Alternate router.
6. method according to claim 1; It is characterized in that; At said Alternate router from the Alternate state exchange to main with state and after switching to new primary route device; Said new primary route device gets into said primary route device and initiates the election of Alternate router, and the standby router of election optimum is as the step of Alternate router.
7. according to each described method in the claim 1 to 6, it is characterized in that said fast detecting session includes but not limited to: two-way forwarding detects BFD session, SDH SDH session, heartbeat session.
8. a router is characterized in that, comprising:
Detection module; Be used under the situation of said router for preparation Alternate router; Through and the primary route device between the fast detecting session of setting up detect said primary route device and whether lost efficacy, wherein, said Alternate router is elected from standby router;
Handover module, being used at said router is under the situation of Alternate router, after said detection module detects said primary route device and lost efficacy, from the Alternate state exchange to main with state and switch to the primary route device.
9. router according to claim 8 is characterized in that, also comprises:
Transceiver module; Being used at said router is under the situation of primary route device; Initiate the election of Alternate router; The standby router that election has limit priority is as the Alternate router or when priority is identical, and the standby router of election primary ip address maximum is as the Alternate router;
Set up module; Be used for after said transceiver module elects the Alternate router, whether the fast detecting session between foundation and the said Alternate router lost efficacy so that said Alternate router detects said router through said fast detecting session;
Wherein, it is under the situation of primary route device that handover module also is used at said router, after said detection module detects said router and lost efficacy, from main with state exchange to stand-by state and switch to standby router.
10. router according to claim 9; It is characterized in that; Also comprise: negotiation module; Be used for said set up module set up with said Alternate router between said fast detecting session before, pass through fast detecting conversation type negotiation packet and fast detecting session parameter negotiation packet respectively, the type and the parameter of consulting said fast detecting session with said Alternate router;
Wherein, the said module of setting up is used for according to the said fast detecting session between the said type that consults and parameter foundation and the said Alternate router after said negotiation module is consulted successfully.
CN2010105100648A 2010-10-15 2010-10-15 Switching method and router Pending CN102447615A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2010105100648A CN102447615A (en) 2010-10-15 2010-10-15 Switching method and router
PCT/CN2011/076077 WO2012048585A1 (en) 2010-10-15 2011-06-21 Switching method and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105100648A CN102447615A (en) 2010-10-15 2010-10-15 Switching method and router

Publications (1)

Publication Number Publication Date
CN102447615A true CN102447615A (en) 2012-05-09

Family

ID=45937871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105100648A Pending CN102447615A (en) 2010-10-15 2010-10-15 Switching method and router

Country Status (2)

Country Link
CN (1) CN102447615A (en)
WO (1) WO2012048585A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312605A (en) * 2013-05-29 2013-09-18 华为技术有限公司 Gateway device identity setting method and management gateway device
CN104113476A (en) * 2014-07-22 2014-10-22 深圳市邦彦信息技术有限公司 Communication line switching method and system
CN106302152A (en) * 2015-05-21 2017-01-04 中兴通讯股份有限公司 A kind of control method generating route and routing device
WO2017005165A1 (en) * 2015-07-06 2017-01-12 中兴通讯股份有限公司 Static tunnel status information synchronization method and apparatus
CN106411574A (en) * 2016-09-05 2017-02-15 杭州昆海信息技术有限公司 Management control method and device
CN107395531A (en) * 2016-05-16 2017-11-24 中兴通讯股份有限公司 A kind of address distribution method and device and interchanger
CN110233746A (en) * 2019-06-19 2019-09-13 烽火通信科技股份有限公司 A kind of home intranet method and home intranet AP

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11343137B2 (en) 2019-08-23 2022-05-24 Cisco Technology, Inc. Dynamic selection of active router based on network conditions
WO2021127458A1 (en) * 2019-12-20 2021-06-24 Lutron Technology Company Llc Handling loss or removal of devices in a mesh network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949767A (en) * 2005-10-11 2007-04-18 华为技术有限公司 Method for switching master-slave back-up route apparatus based on virtual router redundant protocol
CN101030966A (en) * 2006-02-28 2007-09-05 华为技术有限公司 Method for establishing two-way transmitted inspecting session
US20070230472A1 (en) * 2006-02-02 2007-10-04 Nortel Networks Limited Method and apparatus for learning VRRP backup routers
CN101667927A (en) * 2009-09-16 2010-03-10 杭州华三通信技术有限公司 Method and device for rapidly restoring service
CN101729426A (en) * 2009-12-29 2010-06-09 中兴通讯股份有限公司 Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949767A (en) * 2005-10-11 2007-04-18 华为技术有限公司 Method for switching master-slave back-up route apparatus based on virtual router redundant protocol
US20070230472A1 (en) * 2006-02-02 2007-10-04 Nortel Networks Limited Method and apparatus for learning VRRP backup routers
CN101030966A (en) * 2006-02-28 2007-09-05 华为技术有限公司 Method for establishing two-way transmitted inspecting session
CN101667927A (en) * 2009-09-16 2010-03-10 杭州华三通信技术有限公司 Method and device for rapidly restoring service
CN101729426A (en) * 2009-12-29 2010-06-09 中兴通讯股份有限公司 Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
孙文胜 等: "利用双向转发检测技术实现MPLS L3 VPN的快速检测", 《电子器件》, vol. 32, no. 6, 20 December 2009 (2009-12-20), pages 1094 - 1097 *
高鑫: "双向转发检测(BFD)协议研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 6, 15 December 2007 (2007-12-15), pages 1136 - 125 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10419531B2 (en) 2013-05-29 2019-09-17 Huawei Technologies Co., Ltd. Method for setting gateway device identity, and management gateway device
EP2993838A4 (en) * 2013-05-29 2016-09-21 Huawei Tech Co Ltd Method for setting identity of gateway device and management gateway device
CN103312605A (en) * 2013-05-29 2013-09-18 华为技术有限公司 Gateway device identity setting method and management gateway device
CN103312605B (en) * 2013-05-29 2017-06-20 华为技术有限公司 A kind of gateway device identity setting method and management gateway equipment
CN104113476A (en) * 2014-07-22 2014-10-22 深圳市邦彦信息技术有限公司 Communication line switching method and system
CN106302152A (en) * 2015-05-21 2017-01-04 中兴通讯股份有限公司 A kind of control method generating route and routing device
WO2017005165A1 (en) * 2015-07-06 2017-01-12 中兴通讯股份有限公司 Static tunnel status information synchronization method and apparatus
CN106341245A (en) * 2015-07-06 2017-01-18 中兴通讯股份有限公司 State information synchronization method and device of static tunnel
CN106341245B (en) * 2015-07-06 2020-02-18 中兴通讯股份有限公司 State information synchronization method and device of static tunnel
CN107395531A (en) * 2016-05-16 2017-11-24 中兴通讯股份有限公司 A kind of address distribution method and device and interchanger
CN106411574A (en) * 2016-09-05 2017-02-15 杭州昆海信息技术有限公司 Management control method and device
CN106411574B (en) * 2016-09-05 2020-01-03 新华三信息技术有限公司 Management control method and device
CN110233746A (en) * 2019-06-19 2019-09-13 烽火通信科技股份有限公司 A kind of home intranet method and home intranet AP

Also Published As

Publication number Publication date
WO2012048585A1 (en) 2012-04-19

Similar Documents

Publication Publication Date Title
CN102447615A (en) Switching method and router
CN1980230B (en) Method for managing VRRP group
US8509059B2 (en) Method for operating a virtual router redundancy protocol router and communication system therefor
EP3373547B1 (en) Method for realizing disaster tolerance backup
CN100407671C (en) Network communication method for carrying out load division
CN102377666B (en) Flooding-based routing protocol having average-rate and burst-rate control
CN101582773B (en) Redundant failover system, redundancy managing apparatus and application processing apparatus
CN102315975B (en) Fault processing method based on intelligent resilient framework (IRF) system and equipment thereof
EP1763204B1 (en) System and method for redundant switches taking into account learning bridge functionality
CN101557616B (en) Method for accessing AP (access point) to switch backup access controller and AP (access point) and AC (access controller)
US8804486B2 (en) Base stations routing traffic over a packet backhaul network to multiple routing elements
CN102510408B (en) Method for realizing TCP (transmission control protocol) application main and standby changeover
CN102075343B (en) An out-of-band management realization method, a system for the same and an out-of-band management switch
WO2009023996A1 (en) Method for implementing network interconnect via link aggregation
CN104104570A (en) Aggregation processing method in IRF (Intelligent Resilient Framework) system and device
CN101860492A (en) Quick switching method, device and system
CN101355515B (en) Method for restarting link aggregation control protocol with elegance
CN102123105B (en) Method and equipment for switching between standard VRRP (Virtual Router Redundancy Protocol) and load balancing VRRP
JP6389956B2 (en) Method and system for managing network traffic
EP1615392B1 (en) Routing control method, router, and terminal
CN107769984B (en) Low-cost active/standby hot switching system and method based on gateway
WO2014075216A1 (en) Method and network device for establishing virtual cluster
CN103607293A (en) Flow protection method and equipment thereof
CN113259235A (en) IPv 6-based dual-active route redundancy method and system
WO2012051895A1 (en) Method for maintaining communication device and network 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
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120509