CN112311666A - Fast switching method for redundancy protocol - Google Patents
Fast switching method for redundancy protocol Download PDFInfo
- Publication number
- CN112311666A CN112311666A CN202011217674.9A CN202011217674A CN112311666A CN 112311666 A CN112311666 A CN 112311666A CN 202011217674 A CN202011217674 A CN 202011217674A CN 112311666 A CN112311666 A CN 112311666A
- Authority
- CN
- China
- Prior art keywords
- router
- master
- priority
- vrrp
- state
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/22—Alternate routing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2002—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where interconnections or communication control functionality are redundant
- G06F11/2012—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where interconnections or communication control functionality are redundant and using different communication protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/28—Routing or path finding of packets in data switching networks using route fault recovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/38—Flow based routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/58—Association of routers
- H04L45/586—Association of routers of virtual routers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
Abstract
The invention discloses a method for rapidly switching a redundancy protocol, which judges the priority level of a notification message of a redundancy protocol VRRP when the notification message is received, and adjusts whether to enter an election state or not and whether to need switching according to the judgment result so as to realize the purpose of rapid switching. The patent provides a method for quickly switching a redundancy protocol, which is based on a VRRP preemption mode, improves a waiting Sview _ time delay time mechanism of an original Backup router, can immediately switch the Backup router into a Master state when the Master router fails, effectively shortens the switching time, and has better adaptability when being applied to a network environment with high real-time performance requirement.
Description
Technical Field
The invention relates to a method for quickly switching Virtual Router Redundancy Protocol (VRRP) in a network environment.
Background
The virtual Router Redundancy protocol vrrp (virtual Router Redundancy protocol) combines several Router devices to form a virtual device, and uses the IP address of the virtual Router device as the default gateway of the user to implement communication with the external network. The router actually having the external IP is MASTER, and the other device status is BACKUP. When the gateway equipment fails, the BACKUP takes over the network function of the original MASTER, thereby ensuring the reliable communication of the network, and the standard VRRP working flow is as follows:
a) and equipment in the VRRP backup group elects Master according to the priority. The Master device informs the virtual MAC address to the device or the host connected with the Master device by sending a free ARP message, thereby undertaking the message forwarding task.
b) The Master device periodically sends VRRP notification messages to all Backup devices in the Backup group to publish configuration information (priority and the like) and working conditions of the Backup devices.
c) And if the Master equipment fails, the Backup equipment in the VRRP Backup group reselects a new Master according to the priority.
d) When the VRRP backup group state is switched, the Master equipment is switched to another equipment from one equipment, the new Master equipment can immediately send a free ARP message carrying the virtual MAC address and the virtual IP address information of the virtual router, and the MAC table entries in the host or the equipment connected with the new Master equipment are refreshed, so that the user flow is guided to the new Master equipment, and the whole process is completely transparent to the user.
e) When the original Master device fails, the Backup device needs to wait for the Skew _ time offset time, and the Backup device is switched to the Master device. Sview _ time is calculated as (256-priority of Backup switch)/256.
When a plurality of Backup devices compete for Master, the higher priority device Skaew _ time is smaller, and the device Skaew _ time can be switched to Master first, which is very necessary in a VRRP Backup group formed by a plurality of router devices, but if the Backup group formed by two router devices is used, the delay mechanism of Skaew _ time can cause slow Master-slave switching. If the priority of the Backup switch is 100 and the Sew _ time is calculated to be around 600ms, at least the switching time of the Sew _ time is obviously not suitable for the network environment with high real-time performance requirement.
Disclosure of Invention
An object of the present invention is to solve at least the above problems and/or disadvantages and to provide at least the advantages described hereinafter.
In order to achieve these objects and other advantages, the present invention provides a method for fast switching between redundant protocols, which comprises the steps of judging the priority level of a notification packet of a redundant protocol VRRP when the notification packet is received, and adjusting whether to enter an election state or not and whether to need to switch the state according to the judgment result, thereby achieving the purpose of fast switching.
Preferably, the hierarchical judgment of the priority is configured to include:
s1, when the equipment receives the VRRP notification message, the equipment carries out primary judgment on whether the priority is 0, if so, the equipment enters Master election, otherwise, the equipment enters secondary judgment;
s2, in the second grade judgement, judge whether the priority in VRRP announced message is higher than or equal to the local machine, if high, admit Master valid, reset the overtime timer of the host computer; otherwise, the Master is switched immediately.
Preferably, in S1, the Master election is configured to include switching the device operating mode to the Master router immediately when the priority field of the VRRP advertisement message is 0, and executing all actions of the Master router.
Preferably, in S1, the Master election is configured to further include switching the device operating mode after judging to select to wait for the Skew _ time when the priority field of the VRRP advertisement message is 0.
Preferably, in S2, the secondary judgment is configured to include:
s21, when the data priority of the notification message is larger than or equal to the local priority, the local router resets a Master _ Down _ Timer to Master _ Down _ Interval, otherwise, whether the local router is in the preemption mode is judged, if the local router is in the non-preemption mode, S22 is executed, otherwise, S23 is executed;
s22, when the router is in the non-preemptive mode, the local router resets the Master _ Down _ Timer to Master _ Down _ Interval, otherwise, the router enters the next step;
and S23, in the non-preemption mode, if the priority of the notification message is greater than or equal to the local priority, discarding the VRRP notification message without any processing, otherwise, immediately switching the Backup router to the Master router and executing all actions of the Master router.
Preferably, the method further comprises deploying an operation administration maintenance OAM link detection mechanism in the interface or link state monitored by the VRPP router, so as to switch the work state of the VRPP router in the Backup state according to the link or interface state.
Preferably, the deployment of the OAM link detection mechanism is configured to include:
s1', VRRP and OAM linkage monitoring interface or link state;
s2', when the interface or link monitored by VRPP router is Down, the priority is reduced, otherwise, the priority is restored;
s3', when VRRP router is in Backup state, comparing saved Master _ Priority with changed Priority, if high, not processing, otherwise sending notification message immediately, switching state to Master;
and S4 'and the VRRP router sends the notification message with the changed priority when the VRRP router is in the Master state, and the VRRP router in the Backup state returns to S3' after receiving the notification message.
The invention at least comprises the following beneficial effects: firstly, the invention improves the waiting Sew _ time delay time mechanism of the original Backup router based on the VRRP preemption mode, can immediately switch the Backup router into the Master state when the Master router fails, effectively shortens the switching time, and has better adaptability when being applied to the network environment with high real-time performance requirement.
Secondly, the VRRP fast switching technology of the invention combines an OAM link detection mechanism, when Master equipment fails or a link fails, Backup equipment is fast switched to Masetr to bear network flow, and the switching time is only the system level operations of the inherent ARP message sending, IP address setting and the like.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Drawings
FIG. 1 is a flow chart of the process of the present invention when receiving a VRRP notification message, a VRPP router in Backup state receives the VRRP notification message;
FIG. 2 is a flow chart of the process of the VRPP router of the present invention when the monitored interface or link status changes;
FIG. 3 is a timing diagram of Master/Backup switching according to the present invention.
Detailed Description
The present invention is further described in detail below with reference to the attached drawings so that those skilled in the art can implement the invention by referring to the description text.
The invention mainly aims at a redundant Backup network, so that the VRRP router in the Backup state can realize the following two functions:
when receiving a VRRP notification message, if the priority is 0, indicating to enter Master election; otherwise, judging whether the priority of the data is higher than that of the host, if so, acknowledging that the Master is valid, and resetting the timeout timer of the host; otherwise, switching to the Master immediately;
when the external state (such as the state of a monitoring interface) of the local machine is changed, judging whether the main priority is higher than that of the local machine, if so, admitting that the MASTER is effective, and resetting a host timeout timer; otherwise, immediately sending an announcement message and switching the state to the Master;
further, the embodiments of the present invention rely on the standard VRRP workflow, and detailed embodiments are described with respect to the above inventive mechanism.
When receiving a VRRP advertisement message, a processing flow when a VRPP router in Backup state receives the VRRP advertisement message is shown in fig. 1, and the specific processing steps are as follows:
a) the VRRP router in the Backup state receives a VRRP notification message;
b) the Priority of the VRRP notification message is saved as Master _ Priority;
c) when the priority field of the VRRP notification message is 0, immediately switching to a Master router and executing all actions of the Master router;
d) if the priority is not 0, the local router resets the Master _ Down _ Timer to Master _ Down _ Interval in the non-preemptive mode.
e) If the priority is not 0, the priority of the notification message is greater than or equal to the local priority, and the local router resets the Master _ Down _ Timer to Master _ Down _ Interval;
f) if the priority is not 0, in the preemption mode, the priority of the notification message is larger than or equal to the local priority, and the VRRP notification message is discarded without any processing.
g) If the priority is not 0, under the preemption mode, the priority of the notification message is less than or equal to the local priority, the Backup router is immediately switched to the Master router, and all actions of the Master router are executed;
in the step a) and the step g), based on a VRRP preemption mode, the Skaew _ time delay time waiting mechanism of the original Backup router is improved, and the Master is immediately switched.
In order to realize the fast switching when the link fails, an OAM link detection mechanism is deployed in the link, VRRP is configured to monitor an OAM session, when a Master interface or a link goes, a Master router reduces the local priority, and the state of the interface or the link monitored by the VRPP router receives an announcement message with lower priority than the self priority, and is immediately switched to the Master to undertake service forwarding so as to reduce the influence of the failure on service transmission.
As shown in fig. 2, the process flow when the interface or link status monitored by the VRPP router changes is as follows:
a) VRRP and OAM linkage monitor interface or link state;
b) when the VRPP router monitors the interface or link Down, the priority is lowered; when the router monitors the interface or the link Up, the priority is restored;
c) when the VRRP router is in a Backup state, comparing the saved Master _ Priority with the changed Priority, if the Priority is high, not processing, otherwise, immediately sending a notification message, and switching the state to the Master;
d) and when the VRRP router is in a Master state, sending the notification message after the priority is changed, and the VRRP router in a Backup state receives the notification message and then processes the notification message.
In step c), based on VRRP preemption mode, the immediate switching technique in the invention is applied to realize the quick switching of Backup router to Master without waiting for Skaew _ time.
The Master/Backup switching sequence is shown in fig. 3, so the invention mainly aims at the Backup-state VRRP router, and realizes that the Backup-state VRRP router is switched to the Master immediately without waiting for the Skaew _ time after the Master-state VRRP router fails. This approach does not result in frequent switching of VRRP backup group member states.
The above scheme is merely illustrative of a preferred example, and is not limiting. When the invention is implemented, appropriate replacement and/or modification can be carried out according to the requirements of users.
The number of apparatuses and the scale of the process described herein are intended to simplify the description of the present invention. Applications, modifications and variations of the present invention will be apparent to those skilled in the art.
While embodiments of the invention have been disclosed above, it is not intended to be limited to the uses set forth in the specification and examples. It can be applied to all kinds of fields suitable for the present invention. Additional modifications will readily occur to those skilled in the art. It is therefore intended that the invention not be limited to the exact details and illustrations described and illustrated herein, but fall within the scope of the appended claims and equivalents thereof.
Claims (7)
1. A method for fast switching over redundant protocol is characterized in that when receiving the notice message of redundant protocol VRRP, the method judges the priority level, and adjusts whether entering into election state or not and whether needing to switch over state according to the judgment result, thus realizing the purpose of fast switching over.
2. The redundancy protocol fast switching method of claim 1, wherein the hierarchical determination of the priority is configured to include:
s1, when the equipment receives the VRRP notification message, the equipment carries out primary judgment on whether the priority is 0, if so, the equipment enters Master election, otherwise, the equipment enters secondary judgment;
s2, in the second grade judgement, judge whether the priority in VRRP announced message is higher than or equal to the local machine, if high, admit Master valid, reset the overtime timer of the host computer; otherwise, the Master is immediately switched to.
3. The fast switching method for redundancy protocols according to claim 2, wherein in S1, the Master election is configured to include immediately switching the device operating mode to the Master router and performing all actions of the Master router when the priority field of the VRRP advertisement message is 0.
4. The fast switching method for redundancy protocol according to claim 3, wherein in S1, the Master election is configured to further include switching the device operation mode after selecting the wait Skew _ time by determining when the priority field of the VRRP advertisement message is 0.
5. The method for fast switching of redundancy protocol according to claim 2, wherein in S2, the secondary judging is configured to include:
s21, when the data priority of the notification message is larger than or equal to the local priority, the local router resets a Master _ Down _ Timer to Master _ Down _ Interval, otherwise, whether the local router is in the preemption mode is judged, if the local router is in the non-preemption mode, S22 is executed, otherwise, S23 is executed;
s22, when the router is in the non-preemptive mode, the local router resets the Master _ Down _ Timer to Master _ Down _ Interval, otherwise, the router enters the next step;
and S23, in the non-preemption mode, if the priority of the notification message is greater than or equal to the local priority, discarding the VRRP notification message without any processing, otherwise, immediately switching the Backup router to the Master router and executing all actions of the Master router.
6. The method of claim 1, further comprising deploying an operation, administration and maintenance, OAM, link detection mechanism in the interface or link state monitored by the VRPP router to switch the VRPP router status state of Backup state according to the link or interface state.
7. The redundancy protocol fast switching method of claim 6, wherein the deployment of the OAM link detection mechanism is configured to include:
s1', VRRP and OAM linkage monitoring interface or link state;
s2', when the interface or link monitored by VRPP router is Down, the priority is reduced, otherwise, the priority is restored;
s3', when VRRP router is in Backup state, comparing saved Master _ Priority with changed Priority, if high, not processing, otherwise sending notification message immediately, switching state to Master;
and S4 'and the VRRP router sends the notification message with the changed priority when the VRRP router is in the Master state, and the VRRP router in the Backup state returns to S3' after receiving the notification message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011217674.9A CN112311666A (en) | 2020-11-04 | 2020-11-04 | Fast switching method for redundancy protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011217674.9A CN112311666A (en) | 2020-11-04 | 2020-11-04 | Fast switching method for redundancy protocol |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112311666A true CN112311666A (en) | 2021-02-02 |
Family
ID=74326004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011217674.9A Pending CN112311666A (en) | 2020-11-04 | 2020-11-04 | Fast switching method for redundancy protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112311666A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114221902A (en) * | 2021-11-26 | 2022-03-22 | 上海弘积信息科技有限公司 | Method for switching VRRP master and slave according to specified sequence |
CN114978987A (en) * | 2022-05-17 | 2022-08-30 | 北京交通大学 | Server redundancy backup method |
Citations (4)
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 |
CN1968260A (en) * | 2005-11-17 | 2007-05-23 | 华为技术有限公司 | Method for implementing virtual router redundancy protocol switching between primary/standby devices |
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) |
CN107911291A (en) * | 2017-11-28 | 2018-04-13 | 中国移动通信集团湖北有限公司 | VRRP routers switching method, router, VRRP active-standby switch system and storage medium |
-
2020
- 2020-11-04 CN CN202011217674.9A patent/CN112311666A/en active Pending
Patent Citations (4)
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 |
CN1968260A (en) * | 2005-11-17 | 2007-05-23 | 华为技术有限公司 | Method for implementing virtual router redundancy protocol switching between primary/standby devices |
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) |
CN107911291A (en) * | 2017-11-28 | 2018-04-13 | 中国移动通信集团湖北有限公司 | VRRP routers switching method, router, VRRP active-standby switch system and storage medium |
Non-Patent Citations (1)
Title |
---|
S. KNIGHT ET AL.: ""Virtual Router Redundancy Protocol"", 《IETF 》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114221902A (en) * | 2021-11-26 | 2022-03-22 | 上海弘积信息科技有限公司 | Method for switching VRRP master and slave according to specified sequence |
CN114978987A (en) * | 2022-05-17 | 2022-08-30 | 北京交通大学 | Server redundancy backup method |
CN114978987B (en) * | 2022-05-17 | 2023-08-29 | 北京交通大学 | Server Redundancy Backup Method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20040139179A1 (en) | Method and system for router misconfiguration autodetection | |
KR101591102B1 (en) | Method for router of virtual router redundancy protocol and communication system therefor | |
CN102148677B (en) | Method for updating address resolution protocol table entries and core switch | |
US20040085965A1 (en) | Redundant router network | |
WO2009023996A1 (en) | Method for implementing network interconnect via link aggregation | |
CN101951345B (en) | Message transmitting method and equipment | |
CN101420381B (en) | Method and apparatus for enhancing forwarding reliability in VRRP load balance | |
CN112311666A (en) | Fast switching method for redundancy protocol | |
EP2698948A1 (en) | Method and device for determining failure elimination based on oam protocol | |
EP1547311A2 (en) | Monitoring telecommunication network elements | |
US6977890B2 (en) | Decision-making route control system and decision-making route controlling method | |
CN111585797B (en) | Ethernet link switching method, device, equipment and computer readable storage medium | |
CN105577444A (en) | Wireless controller management method and wireless controller | |
KR20100057885A (en) | Method and system for checking automatically connectivity status of an ip link on ip network | |
CN111817885A (en) | Network-based master-slave machine distinguishing and switching method and device | |
CN101437175A (en) | Method, apparatus and system for processing disaster-tolerating switch | |
CN100484044C (en) | Method for detecting operating state of default gateway and apparatus thereof | |
CN101909006A (en) | BFD (Bidirectional Forwarding Detection) message sending and receiving methods as well as device and communication system thereof | |
CN109586986B (en) | Method, device, equipment and storage medium for switching network equipment | |
CN112543143B (en) | Method, chip, equipment and storage medium for multicast service fast protection switching | |
CN110661705A (en) | Hardware network switching engine and network fault processing system and method | |
CN113645312A (en) | Method and device for protecting sub-ring network link based on ERPS protocol | |
US7860090B2 (en) | Method for processing LMP packets, LMP packet processing unit and LMP packet processing node | |
CN106470429A (en) | A kind of method for processing business being suitable to wireless dilatation and device | |
CN101686199A (en) | Method, device and system for processing control message in Ethernet protection system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210202 |
|
RJ01 | Rejection of invention patent application after publication |