CN101702681A - Switching method and device of main/standby router in virtual route redundancy protocol - Google Patents

Switching method and device of main/standby router in virtual route redundancy protocol Download PDF

Info

Publication number
CN101702681A
CN101702681A CN200910226372A CN200910226372A CN101702681A CN 101702681 A CN101702681 A CN 101702681A CN 200910226372 A CN200910226372 A CN 200910226372A CN 200910226372 A CN200910226372 A CN 200910226372A CN 101702681 A CN101702681 A CN 101702681A
Authority
CN
China
Prior art keywords
priority value
router
routing
routing device
dynamic priority
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.)
Granted
Application number
CN200910226372A
Other languages
Chinese (zh)
Other versions
CN101702681B (en
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.)
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication Co Ltd
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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN2009102263725A priority Critical patent/CN101702681B/en
Publication of CN101702681A publication Critical patent/CN101702681A/en
Application granted granted Critical
Publication of CN101702681B publication Critical patent/CN101702681B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a switching method and a device of a main/standby router in a virtual route redundancy protocol. The method comprises the following steps: the main router in the virtual router group receives the first announcement information which is sent by the first router except for the main router in the group and which carries the first dynamic priority value of the first router; the main router compares the first dynamic priority value with the own second dynamic priority value, if the first dynamic priority value is less than the second dynamic priority value, then the main router state is maintained; and the first dynamic priority value and the second dynamic priority value are respectively the number of the message of which the destination MAC address is the virtual MAC address of the virtual router group which is respectively received in the recent announcement period by the first router and the main router. By introducing the mechanism of dynamic priority to the VRRP protocol, the invention avoids network oscillation caused by unnecessary switching of main/standby router, thus improving the stability of the network.

Description

Method and equipment for switching master and standby router equipment in virtual router redundancy protocol
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for switching a master/standby router in a virtual router redundancy protocol.
Background
With the development of internet technology, people put higher and higher requirements on the reliability and stability of networks, and Virtual Router Redundancy Protocol (VRRP) technology has come into existence, which is a better technical scheme for improving the reliability of networks. As a fault-tolerant protocol, the VRRP can ensure that when the next-hop router of a host in the local area network fails, another router can replace the next-hop router in time, thereby maintaining the continuity and reliability of communication.
Generally, in the VRRP protocol, a virtual router group is composed of a main router and several backup routers in the same network segment. The main router realizes the real message forwarding function, and regularly sends notification information carrying the priority of the main router to the backup router, if the main router fails, other backup routers can not receive the notification information, the main router can be elected, and the backup router with the highest priority succeeds in electing, becomes a new main router and replaces the original main router. In addition, when a virtual router group is in the preemption mode, if the backup router receives the notification information sent by the master router with the lower priority than the backup router, the backup router also switches to the state of the master router actively, and then sends the notification information to perform "preemption" on the master router state of the master router. Generally, the priority referred to herein is a fixed priority value, the size of which is determined by the cost, performance, reliability and other management policies of the router, and for a fixed router, the value is usually a fixed value.
But the inventor finds out in the process of invention that: in practical application, a communication link failure or a self function failure may occur in a main router, and at this time, a backup router cannot receive notification information sent by the backup router and elects to generate a new main router. When the original main router recovers to be normal, if a new main router is generated due to the communication failure of the original main router, two main routers can appear in the group to cause the competition of the new main router, and because the static priority of the original main router is higher than that of the new main router, the original main router can successfully compete again to cause the role switching of the main routers in the group. If the new master router is generated due to the self-failure of the original master router, two situations will occur: if the original master router has the highest priority 255, the original master router directly enters a master routing state to cause the role switching of the master router; even if the original main router does not have the highest priority level, because the static priority of the original main router is always higher than that of the new main router, the original main router can compete to become the main router under the preemption mode, and the role of the main router is switched.
However, in practical applications, the switching process of the main router is completely unnecessary, because the network link is already stable before the original main router returns to normal, but the unnecessary switching process of the main router is the switching process of the main router, which again causes the instability of the network and causes the network to oscillate.
Disclosure of Invention
Embodiments of the present invention provide a method and a device for switching a master/standby router in a virtual router redundancy protocol, so as to solve the problem of network instability caused by unnecessary switching of a master router device due to a new election contention of the master router device or a new preemption of the master router device by the original master router device into the master router device when the original master router device is restored from a fault state to a normal state in a VRRP virtual router device group in the prior art.
The embodiment of the invention provides a method for switching a main router device and a standby router device in a virtual router redundancy protocol, which comprises the following steps:
receiving, by a master routing device in a master routing state in a virtual routing device group, first advertisement information sent by a first routing device in the virtual routing device group, except for the master routing device, where the first advertisement information carries a first dynamic priority value of the first routing device;
the main routing equipment compares the first dynamic priority value with a second dynamic priority value of the main routing equipment, and if the first dynamic priority value is smaller than the second dynamic priority value, the main routing state is maintained;
the first dynamic priority value and the second dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the first routing device and the main routing device in the latest advertisement period.
The embodiment of the invention also provides a method for switching the main and standby router equipment in the virtual router redundancy protocol, which comprises the following steps:
receiving, by a backup routing device in a backup routing state in a virtual routing device group, second notification information sent by a second routing device in the virtual routing device group, the second notification information carrying a third dynamic priority value of the second routing device;
the backup routing equipment compares the third dynamic priority value with a fourth dynamic priority value of the backup routing equipment, and if the third dynamic priority value is greater than the fourth dynamic priority value, the backup routing state is maintained;
the third dynamic priority value and the fourth dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the second routing device and the backup routing device in the latest advertisement period.
An embodiment of the present invention further provides a master routing device in a virtual routing redundancy protocol, including:
a first receiving module, configured to receive first advertisement information sent by a first routing device in a virtual routing device group, where the first advertisement information carries a first dynamic priority value of the first routing device;
a first dynamic priority value comparing module, configured to compare the first dynamic priority value with a second dynamic priority value of the first dynamic priority value, and if the first dynamic priority value is smaller than the second dynamic priority value, maintain a main routing state of the main routing device;
the first dynamic priority value and the second dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the first routing device and the main routing device in the latest advertisement period.
The embodiment of the present invention further provides a backup routing device in a virtual routing redundancy protocol, including:
a second receiving module, configured to receive second notification information sent by a second routing device in the virtual routing device group, where the second notification information carries a third dynamic priority value of the second routing device;
a second dynamic priority value comparing module, configured to compare the third dynamic priority value with a fourth dynamic priority value of the second dynamic priority value, and if the third dynamic priority value is greater than the fourth dynamic priority value, maintain the backup routing state of the backup routing device;
the third dynamic priority value and the fourth dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the second routing device and the backup routing device in the latest advertisement period.
The embodiment of the invention also provides a routing device in the virtual routing redundancy protocol, which comprises a routing state judgment module and a processing module; wherein,
the routing state judging module is used for judging the routing state of the routing equipment in the virtual routing equipment group;
the processing module is used for calling the first processing module if the routing equipment is in the main routing state according to judgment, and calling the second processing module if the routing equipment is in the backup routing state according to judgment;
the first processing module comprises the primary routing device as described above and the second processing module comprises the backup routing device as described above.
According to the switching method and the switching device for the main and standby routing devices in the VRRP provided by the embodiment of the invention, a mechanism of 'dynamic priority' is introduced into the main routing device election of the VRRP protocol, the received target MAC address of each VRRP routing device in the latest notification period is the message number of the virtual MAC address of the virtual routing device and is used as the dynamic priority of the VRRP routing device, so that the priority value of each VRRP routing device in a virtual routing device group changes along with the change of the actual working capacity of the VRRP routing device, the main routing device generated by the VRRP election based on the dynamic priority mechanism is more reasonable, the network oscillation caused by unnecessary role switching of the main routing device is avoided, and the stability of the network is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a first embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention;
fig. 2 is a flowchart of a second embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention;
fig. 3 is a flowchart of a third embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention;
fig. 4 is a flowchart of a fourth embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a master routing device in a virtual routing redundancy protocol according to the present invention;
FIG. 6 is a schematic structural diagram of an embodiment of a backup routing device in a virtual routing redundancy protocol according to the present invention;
fig. 7 is a schematic structural diagram of an embodiment of a routing device in a virtual routing redundancy protocol according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The core of the invention is that: in the VRRP protocol, a concept of dynamic priority is introduced for each VRRP routing device in the virtual routing device group, that is, a dynamic priority value is defined for each routing device, where the dynamic priority value is the number of messages received by the corresponding routing device in the latest notification period, and the received virtual Media Access Control (MAC) address is the virtual MAC address of the virtual routing device group. When election competition of main routing equipment occurs in the virtual routing equipment group, the priority levels of the main routing equipment are determined by comparing the dynamic priority values of the main routing equipment with the dynamic priority values of the main routing equipment, and the static priority values of the main routing equipment are further compared only when the dynamic priority values of the main routing equipment are equal to each other.
According to the technical scheme, the actual workload of each routing device for forwarding the data message in the latest notification period becomes a primary factor for judging the priority level of the routing device, and based on the election of the main routing device on the dynamic priority, unnecessary switching of the main routing device and network oscillation caused by the switching of the main routing device due to the rejoining of the routing device with the higher original static priority level in the virtual routing device group after the main routing device works stably are avoided, and the stability of the network is improved.
Fig. 1 is a flowchart of a first embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention, and as shown in fig. 1, the present embodiment specifically includes the following steps:
step 100, if a master routing device in a master routing state in a virtual routing device group receives first advertisement information sent by a first routing device except the master routing device in the virtual routing device group, extracting a first dynamic priority value of the first routing device from the first advertisement information;
specifically, each routing device in the embodiments of the present invention may be a communication device such as a router and a switch, which has a data forwarding function, and in the embodiments and the following embodiments, only a router is taken as an example for description, but it should be understood that, as long as a device having the corresponding function described in the embodiments of the present invention belongs to the protection scope of the present invention.
In a VRRP virtual router group, only the master router in the master routing state has the function of sending advertisement information to other routers in the group, so in the normal operating state, because only one master router is included in one virtual router group, the master router does not receive the advertisement information sent by other routers. However, in practical application, when a master router fails, a new master router starts to be elected and generated in the virtual router group, and in the election process of the new master router and when the original master router returns to normal after the new master router is generated, it is possible that more than two master routers coexist, and accordingly, the master router in the master router state at this time may receive notification information sent by another master router in the group. Specifically, a master router typically receives advertisement information from another router in the group in three cases:
in the first case: when the main router in the virtual router group fails, each backup router does not receive the notification information sent by the main router in three consecutive notification periods, and the selection of a new main router is started. Firstly, each backup router can directly declare itself to be the main router, the state of the backup router is switched to the state of the main router, and the backup routers send notification information with priority values to each other, so that the backup routers participate in the election process of a new main router. At this time, all the master routers in the master routing state will receive the advertisement information sent by other master routers in the group which are also in the master routing state;
in the second situation, because the VRRP virtual router group is usually in a network environment with insufficient stability or congestion, when a failure of a communication link occurs in the main router in the virtual router group, and another member router elects to generate a new main router, because the election of the new main router is not caused by the failure of the original main router due to a functional failure of the original main router itself, the original main router cannot know the existence of the new main router and will always be in the state of the main router after the new main router is generated because the original main router cannot receive the notification information sent by the new main router all the time. When the original main router recovers from the networking fault state to the networking normal state, the new main router in the group receives the notification information sent by the new main router on the basis that the communication link of the original main router recovers to be normal, and meanwhile, the original main router also receives the notification information sent by the new main router;
in the third situation, when the main router in the virtual router group has a function failure, and another member router elects to generate a new main router, and when the function of the original main router is recovered and enters the virtual router group again, if the static priority owned by the original main router is the highest static priority value 255 in the group, the original main router will directly switch to the state of the main router, and send the notification information to the other routers in the group. At this time, the new master router in the virtual router group will receive the advertisement information sent by the new master router, and at the same time, the original master router will also receive the advertisement information sent by the new master router.
Therefore, the master router in the master routing state in the virtual router group receives the advertisement information sent by another router in the group under at least the three conditions, and thus knows that, in addition to the master router, another router is also in the master routing state at the same time in the virtual router group at the moment, and thus a competition process of one master router between two or more master routers is caused. Specifically, in this embodiment, the advertisement information received by the master router at this time is referred to as first advertisement information, and the router sending the first advertisement information is referred to as a first router in the virtual router group. After receiving the first advertisement information, the main router first extracts the dynamic priority value of the first router carried in the first advertisement information, and in this embodiment, the dynamic priority value extracted at this time is referred to as the first dynamic priority value.
Specifically, in this embodiment, the meaning of the first dynamic priority value is the number of packets whose destination MAC address is the virtual MAC address of the virtual router group to which the first router belongs in the latest advertisement period. For a virtual router group in the VRRP Protocol, it externally represents a unique virtual Internet Protocol (IP) address and a virtual MAC address, and only the main router in the virtual router group possesses the virtual IP address and the virtual MAC address, and is responsible for receiving data packets sent by other network elements in the network through the virtual IP address and receiving and forwarding data packets sent by other network elements in the network through the virtual MAC address. Therefore, in a virtual router group, only the master router can receive the destination IP address or the destination MAC address, which is a packet of the virtual IP address or the virtual MAC address of the virtual router group. Furthermore, in the concept of the packet with the destination MAC address being the virtual MAC address, the concept of the packet with the destination IP address being the virtual IP address is covered. Therefore, defining the dynamic priority value of a router as the number of messages received in the last advertisement period, the destination MAC address of which is the virtual MAC address of the virtual router group, means that the dynamic priority value is determined by the workload of actual data forwarding of each router in the last advertisement period.
Therefore, based on the above definition, as long as the master router in one virtual router group is in a normal operating state, the master router basically and continuously receives the data packets sent by other network elements in the network, and the destination MAC addresses of the data packets are the virtual MAC addresses of the virtual router group to which the master router belongs. And no matter at any moment, the dynamic priority value of each backup router is always zero, while the dynamic priority value of the main router in the working state is always a positive value which is larger than the dynamic priority values of each backup router and the main router not in the working state.
Step 101, the master router compares the first dynamic priority value with the second dynamic priority value, and if the first dynamic priority value is smaller than the second dynamic priority value, the master router maintains the master routing state.
If the main router in the main routing state receives the first advertisement information sent by the first router, it is known that another router also exists in the virtual router group in the main routing state, and a competition process of the main routing state will be generated between the two routers. Specifically, after extracting the first dynamic priority value of the first router from the received first advertisement information, the master router compares the size of the first dynamic priority value with the dynamic priority value of the master router, and decides who is the real master router in the virtual router group according to the comparison result. Specifically, in this embodiment, the dynamic priority value of the master router itself is referred to as the second dynamic priority value. If the main router finds out according to the comparison that the first dynamic priority value of the first router is smaller than the second dynamic priority value of the main router, namely the dynamic priority value of the first router is lower than the dynamic priority value of the main router, the main router will continue to maintain the state of the main router without switching the states of the main router and the backup router.
In particular, the processing procedure of this step applied to the above-mentioned several cases will bring beneficial effects to the stability of the network based on the VRRP protocol. For example, after the original master router in the virtual router group recovers from the networking failure to the networking state, the new master router in the virtual router group receives the advertisement information sent by the original master router, where the advertisement information carries the first dynamic priority value of the original master router. Then, according to this step, the new master router extracts the first dynamic priority value from the received advertisement information, and compares the first dynamic priority value with the second dynamic priority value of the new master router. In the latest notification period, the new router is in a working state in the virtual router group, and continuously receives the data packet of which the destination MAC address is the virtual MAC address of the virtual router group, wherein the second dynamic priority value is determined to be a positive integer; the original primary router cannot receive any data packet due to the failure of the communication link, and although the original primary router is also in the state of the primary route, the first dynamic priority value of the original primary router is zero at the moment. Obviously, according to the comparison result, the first dynamic priority value is smaller than the second dynamic priority value, so that the new master router will maintain the working state of its master router and continue to execute the function of the master router without switching the master router. Compared with the same situation in the prior art, when the new master router compares the static priority value of the original master router with the static priority value of the new master router, because the static priority value of the original master router is always higher than the static priority value of the new master router, the master router is switched once again in a state that the network is restored to be stable, and the network is oscillated.
Further, in the third case, when the original master router in the virtual router group re-enters the virtual router group after recovering to the normal state from the functional failure, if the original master router owns the highest static priority value 255 in the group, it will directly enter the master routing state and send the advertisement message. At this time, the new master router in the virtual router group receives the advertisement information sent by the new master router, where the advertisement information carries the first dynamic priority value of the original master router. According to the step, the new main router extracts the first dynamic priority value from the received notification information and compares the first dynamic priority value with the second dynamic priority value of the new main router. Similarly, in the latest notification period, the new router is always in a working state and continuously receives the data packets of which the destination MAC addresses are the virtual MAC addresses of the virtual router group, and the second dynamic priority value of the data packets is determined to be a positive integer; and the original main router does not work due to the function failure, so the data forwarding workload of the original main router in the last notification period is zero, namely the first dynamic priority value of the original main router is zero at the moment. Obviously, according to the comparison result, the first dynamic priority value is smaller than the second dynamic priority value, so, similarly, the new master router will keep the working state of its master router, and continue to execute the function of the master router without switching the master router, and network oscillation caused by switching the master router is also avoided.
Therefore, in this embodiment, by defining a new dynamic priority value for each router in the virtual router group, when the original master router of the virtual router group recovers from the failure state to the normal state, and when the new master router may receive the advertisement information sent by the original master router, the dynamic priority value of the original master router carried in the advertisement information is first compared with the dynamic priority value of the new master router, so as to ensure that the new master router does not need to switch from the master router state to the backup router state at this time, and avoid network instability caused by unnecessary master router switching.
In the method for switching the main and standby routing devices in the virtual routing redundancy protocol according to the embodiment of the present invention, a mechanism of "dynamic priority" is introduced into the main routing device election of the VRRP protocol, and the received destination MAC address of each VRRP routing device in a latest notification period is the packet number of the virtual MAC address of the virtual routing device, which is used as the dynamic priority of the VRRP routing device, so that the priority value of each VRRP routing device in the virtual routing device group changes with the change of the actual workload thereof, and thus the main routing device generated based on the VRRP election under the dynamic priority mechanism is more reasonable, network oscillation caused by unnecessary role switching of the main routing device is avoided, and the stability of the network is improved.
Fig. 2 is a flowchart of a second embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention, and as shown in fig. 2, the second embodiment includes the following steps:
200, a master router in a master routing state in a virtual router group receives first advertisement information sent by a first router except the master router in the virtual router group, wherein the first advertisement information carries a first dynamic priority value of the first router;
in a VRRP virtual router group, when a master router in the master routing state receives advertisement information sent by another router in the group, it is known that there is another router in the virtual router group in addition to itself and the master router is also in the master routing state at the same time, and thus a competition process of the master router will occur between the two or more master routers. Specifically, the master router will first extract the dynamic priority value of the first router, which is the sender of the first advertisement information contained in the received first advertisement information. In this embodiment, the dynamic priority value is referred to as a first dynamic priority value, and the meaning of the first dynamic priority value is the number of messages received by the corresponding first router in the latest one advertisement period, where the destination MAC address is the virtual MAC address of the virtual router group to which the first router belongs.
Step 201, the main router compares the first dynamic priority value with its own second dynamic priority value, if the first dynamic priority value is less than the second dynamic priority value, step 202 is executed, if the first dynamic priority value is equal to the second dynamic priority value, step 203 is executed, if the first dynamic priority value is greater than the second dynamic priority value, step 205 is executed;
in order to determine the router which is successfully contended by the virtual router group in the competition election of the main router at this time, the main router extracts the first dynamic priority value from the received first notification information, compares the first dynamic priority value with the dynamic priority value of the main router, namely the second dynamic priority value, and executes different operations according to different comparison results.
Step 202, the master router maintains a master routing state;
specifically, in step 201, the master router receiving the advertisement message compares the first dynamic priority value of the first router sending the advertisement message with the second dynamic priority value of the master router, and finds that the first dynamic priority value is smaller than the second dynamic priority value of the master router, so that the master router determines that the priority level of the first router is lower than the priority level of the master router. The primary router then remains in the state of its primary route without switching to the state of the backup route.
In this embodiment, the dynamic priority value of the router, that is, the actual workload of the router forwarding the packet in the latest advertisement period, is used as the primary condition for determining the priority level, so as to avoid the switching of the master router due to the rejoining of the router with a higher original static priority level in the group after the master router in the virtual router group works stably, thereby causing the problem of network oscillation and improving the stability of the network.
Step 203, the main router extracts the first static priority value of the first router from the first notification information;
step 204, the master router compares the first static priority value with the second static priority value thereof, if the first static priority value is smaller than the second static priority value, step 202 is executed, and if the first static priority value is larger than the second static priority value, step 205 is executed;
if in step 201, the master router compares the first dynamic priority value of the first router with the second dynamic priority value of the master router, and finds that the first dynamic priority value is equal to the second dynamic priority value of the master router, that is, the dynamic priority levels of the first and second routers are equal, and the master router cannot determine the priority level of the master router only by the dynamic priority values. Then, the master router further extracts the first static priority value of the first router from the first advertisement message, and compares the first static priority value with its own static priority value, i.e. the second static priority value, so as to determine the priority levels of the two routers. Specifically, the static priority value is a fixed and unchangeable value within a range of 1 to 255 related to the performance of the corresponding router, and is the meaning of the priority value of each router in the virtual router group in the prior art.
If the comparison is made, the master router receiving the advertisement information learns that the first static priority value of the first router is smaller than the second static priority value of the master router, and the master router determines that the priority level of the first router is smaller than the priority level of the master router, so that the master router maintains the state of the master router without switching to the state of the backup router, and then the step 202 is executed. On the contrary, if the master router learns that the first static priority value is greater than the second static priority value of the master router through comparison, that is, the priority level of the first router is greater than the priority level of the master router, then the master router switches from the master routing state to the backup routing state, and exits the competition of the master router.
Specifically, the above situation usually occurs in the VRRP election process of each backup router when the primary router in the virtual router group fails. In the election process, each backup router firstly declares itself to be the main router and switches to the main routing state, so that a plurality of main routers appear in the group at this time. Each main router receives the notification information sent by the other side, and compares the dynamic priority value in the received notification information with the dynamic priority value of the main router. In the last advertisement period, the main routers are all in the state of backup routing, and the respective dynamic priority values are all zero, so that the main routers further determine the priority levels of each other according to the static priority values of each other, and further elect to generate a new main router.
Step 205, the master router switches from the master routing state to the backup routing state.
If in the above step 201, the master router finds that the first dynamic priority value is greater than the second dynamic priority value by comparing the first dynamic priority value of the first router with the second dynamic priority value of the master router, or if in the above step 204, the master router further compares the first static priority value of the first router with the second static priority value of the master router, finds that the first static priority value is greater than the second static priority value. That is, in the process of comparing the priority values representing the priority levels of the two routers, the priority level of the first router is found to be higher than the priority level of the first router, and the main router quits the competition of the main router, and switches from the main router state to the backup router state, so as to change the main router into the backup router.
The method for switching the main routing equipment and the standby routing equipment of the virtual routing redundancy protocol introduces a dynamic priority mechanism into the main routing equipment election of the VRRP protocol, takes the received message number of the target MAC address of each VRRP routing equipment in the latest notification period as the dynamic priority of the VRRP routing equipment, and enables the priority value of each VRRP routing equipment in a virtual routing equipment group to change along with the change of the actual working capacity of the VRRP routing equipment, thereby enabling the main routing equipment generated by VRRP election based on the dynamic priority mechanism to be more reasonable, avoiding network oscillation caused by unnecessary role switching of the main routing equipment and improving the stability of the network.
Fig. 3 is a flowchart of a third embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention, and as shown in fig. 3, the third embodiment includes the following steps:
step 300, a backup router in a backup routing state in the virtual router group receives second notification information sent by a second router in the virtual router group except the backup router, wherein the second notification information carries a third dynamic priority value of the second router;
in a VRRP virtual router group, the backup router in the backup routing state does not undertake the forwarding task of the data message, but is responsible for detecting and monitoring the working state of the main router, if the backup router does not receive the notification information sent by the main router in three consecutive notification periods, the main router is considered to have a fault, and therefore election of the main router is generated among the backup routers. However, for the virtual router group in the preemption mode, after receiving the advertisement information sent by the master router, the backup router in the group compares the priority value carried in the advertisement information with the own priority value, and if the backup router finds that the priority value of the master router is smaller than the own priority value, the backup router switches to the master routing state instead, and then the master routing state in the group is preempted through the competition of the master router.
This situation where the backup router "preempts" the primary routing state within the group typically occurs when the primary master router of the virtual router group reverts back to the virtual router group upon recovery from a functional failure, and will choose to enter the backup routing state when the primary master router reverts back to the virtual router group when its static priority is not the highest priority 255 within the group. However, because the static priority is always higher than the master router generated by new election in the group, in the prior art, after the original master router receives the notification information sent by the new master router and knows that the priority of the new master router is lower than the self priority through comparison of the static priority values, the original master router becomes the master router again through preemption, and then the master router is switched once again. However, in practical applications, the role switching process of the main router is completely unnecessary, because the network has already recovered to be stable at this time, but the unnecessary switching process of the main router again causes the instability of the network and causes the network to oscillate.
Therefore, in this embodiment, a concept of dynamic priority is defined for routers based on the VRRP protocol, and each router has a dynamic priority value, which is the number of messages received by its corresponding router in the latest advertisement period and whose destination MAC address is the virtual MAC address of the virtual router group to which the router belongs, specifically the actual workload of the router for forwarding data messages in the last advertisement period. When a backup router in the virtual router group receives the advertisement information sent by the main router in the group, the backup router first extracts the dynamic priority value of the main router carried in the advertisement information, so as to expect to decide whether to "preempt" the main router according to the dynamic priority value.
Specifically, in this embodiment, the advertisement information received by the backup router in the backup routing state is referred to as second advertisement information, the master router sending the second advertisement information is referred to as a second router in the virtual router group, and the dynamic priority value corresponding to the second router is referred to as a third dynamic priority value.
Step 301, the backup router compares the third dynamic priority value with its own fourth dynamic priority value, and if the third dynamic priority value is greater than the fourth dynamic priority value, the backup router maintains the backup routing state.
In this embodiment, the dynamic priority value of the backup router is referred to as a fourth dynamic priority value, where the fourth dynamic priority value refers to the number of messages, received by the backup router in a latest notification period and having a destination MAC address as a virtual MAC address of a virtual router group to which the backup router belongs. Generally speaking, since the backup router is in the state of the backup router and does not take over the role of the actual data packet, the fourth dynamic priority value of the backup router is usually zero.
Specifically, if the backup router finds out, according to the comparison, that the third dynamic priority value of the second router is greater than the fourth dynamic priority value of the second router, that is, the dynamic priority value of the second router is greater than the dynamic priority value of the second router, the backup router will continue to maintain the state of the backup router, without switching the state of the backup router to the state of the main router.
Thus, when the present processing scheme is applied to the above-described case, it will bring a beneficial effect on the stability of the network. Specifically, when the original master router of the virtual router group is restored to the normal state from the functional failure and returns to the virtual router group, if the static priority of the original master router is not 255 with the highest priority in the group, the original master router enters the backup routing state. At this time, the original master router receives the advertisement information sent by the new master router, extracts the third dynamic priority value of the new master router carried in the advertisement information, and compares the third dynamic priority value with the fourth dynamic priority value of the original master router. Since the new master router is always in the working state of the master router in the last advertisement period, the dynamic priority value of the new master router is necessarily a positive integer, and for the original master router, the new master router is in the backup routing state, and the dynamic priority value is zero. Therefore, by comparing the dynamic priority values of the two, the comparison result is that even if the static priority of the original main router is higher than that of the new main router, the main router still does not preempt the main route state, so that the network oscillation caused by the switching of the main router is not caused at the moment.
In the method for switching the main and standby routing devices in the virtual routing redundancy protocol according to the embodiment of the present invention, a mechanism of "dynamic priority" is introduced into the main routing device election of the VRRP protocol, and the received destination MAC address of each VRRP routing device in a latest notification period is the packet number of the virtual MAC address of the virtual routing device, which is used as the dynamic priority of the VRRP routing device, so that the priority value of each VRRP routing device in the virtual routing device group changes with the change of the actual workload thereof, and thus the main routing device generated based on the VRRP election under the dynamic priority mechanism is more reasonable, network oscillation caused by unnecessary role switching of the main routing device is avoided, and the stability of the network is improved.
Fig. 4 is a flowchart of a fourth embodiment of a method for switching a master/standby router in a virtual router redundancy protocol according to the present invention, and as shown in fig. 4, the embodiment includes the following steps:
step 400, a backup router in a backup routing state in the virtual router group receives second notification information sent by a second router in the virtual router group except the backup router, wherein the second notification information carries a third dynamic priority value of the second router;
specifically, when the backup router in the backup routing state in the VRRP virtual router group receives the advertisement information sent by the master router, the corresponding dynamic priority value is extracted from the advertisement information first. In this embodiment, the advertisement information received by the backup router is referred to as second advertisement information, the router sending the second advertisement information is referred to as a second router, and the dynamic priority value of the second router carried in the second advertisement information is referred to as a third dynamic priority value. The third dynamic priority value is specifically the number of messages of the virtual MAC address of the virtual router group to which the destination MAC address received by the corresponding second router in the latest advertisement period belongs.
Step 401, the backup router compares the third dynamic priority value with its own fourth dynamic priority value, if the third dynamic priority value is greater than the fourth dynamic priority value, step 402 is executed, if the first dynamic priority value is equal to the second dynamic priority value, step 403 is executed;
in order to determine whether the backup router should preempt the main route state of the second router, in this embodiment, after extracting the third dynamic priority value from the received second notification information, the backup router compares the third dynamic priority value with its own dynamic priority value, that is, the fourth dynamic priority value, and executes different operations according to different comparison results.
Step 402, the backup router maintains the backup routing state;
specifically, in step 401, if the backup router finds that the third dynamic priority value is greater than the fourth dynamic priority value of the backup router by comparing the third dynamic priority value of the second router with the fourth dynamic priority value of the backup router, the backup router determines that the priority level of the second router is higher than the priority level of the backup router. The backup router then remains in the state of its backup route without switching to the state of the primary route.
Specifically, the above-mentioned situation generally occurs when the original master router in the virtual router group is restored from the functional failure to the normal state, and the virtual router group is restored. If the static priority of heat generation of the original main router is not 255 highest in the group, the original main router enters a backup routing state at this time and receives the notification information sent by the new main router. And the original main router firstly extracts the third dynamic priority value of the new main router carried in the notification information, and compares the third dynamic priority value with the fourth dynamic priority value of the original main router, so that the priority level of the new main router is still higher than the priority level of the original main router, and even if the static priority of the original main router is higher than that of the new main router, the original main router still cannot preempt the main route state, so that the switching of the main router cannot be caused at the moment.
Step 403, the backup router extracts a third static priority value of the second router from the second notification information;
step 404, the backup router compares the third static priority value with a fourth static priority value of itself, if the third static priority value is greater than the fourth static priority value, step 402 is executed, and if the third static priority value is less than the fourth static priority value, step 405 is executed;
in step 405, the backup router switches from the backup routing state to the primary routing state.
If the backup router compares the third dynamic priority value of the second router with the fourth dynamic priority value of the backup router in step 401, it finds that the third dynamic priority value is equal to the fourth dynamic priority value of the backup router, that is, the dynamic priority levels are the same, and the priority level cannot be determined only by the dynamic priority values. Then the backup router further extracts the third static priority value of the second router from the second notification message and compares the third static priority value with the own static priority value, namely the fourth static priority value, so as to determine the priority levels of the router. Specifically, the static priority value is a fixed and unchangeable value within a range of 1 to 255 related to the performance of the corresponding router, and is the meaning of the priority value of each router in the virtual router group in the prior art.
If the comparison is successful, if the backup router learns that the third static priority value of the second router is greater than the fourth static priority value of the backup router, the backup router determines that the priority level of the second router is greater than the priority level of the backup router, and then the backup router still maintains the state of the backup router without switching to the state of the main router, and the step 402 is executed. On the contrary, if the backup router learns that the third static priority value is smaller than the fourth static priority value of the backup router through comparison, that is, the priority level of the second router is smaller than the priority level of the backup router, then the backup router switches from the backup routing state to the main routing state.
Specifically, if the backup router learns that the priority level of the second router in the group is lower than the priority level of the backup router through comparison between the dynamic priority value and the static priority value, the specific process of switching from the backup router state to the main router state is as follows: the backup router first discards the received second advertisement information and does not perform the work of resetting its own timeout timer. Under normal conditions, after receiving an advertisement message in an advertisement period, the backup router resets and clears the timeout timer of the backup router to count the next advertisement period. Therefore, if the timeout timer of the backup router is not reset, the timeout timer will send an instruction representing timeout after counting to three advertisement periods, so that the backup router will consider that no advertisement information is received in three continuous advertisement periods after receiving the timeout instruction, and thus will switch its own state from the backup routing state to the main routing state.
It should be noted that, for the backup router in the backup routing state in the virtual router group, in the last advertisement period, the number of the received messages whose destination MAC address is the virtual MAC address of the virtual router group is usually zero. Therefore, in the comparison process of the dynamic priority, the situation that the corresponding dynamic priority value in the advertisement information received by the backup router is smaller than the dynamic priority value of the backup router does not occur, and therefore, no description is made in this embodiment.
In the method for switching the main and standby routing devices in the virtual routing redundancy protocol according to the embodiment of the present invention, a mechanism of "dynamic priority" is introduced into the main routing device election of the VRRP protocol, and the received destination MAC address of each VRRP routing device in a latest notification period is the packet number of the virtual MAC address of the virtual routing device, which is used as the dynamic priority of the VRRP routing device, so that the priority value of each VRRP routing device in the virtual routing device group changes with the change of the actual workload thereof, and thus the main routing device generated based on the VRRP election under the dynamic priority mechanism is more reasonable, network oscillation caused by unnecessary role switching of the main routing device is avoided, and the stability of the network is improved.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 5 is a schematic structural diagram of an embodiment of a master routing device in a virtual routing redundancy protocol according to the present invention, and as shown in fig. 5, the master routing device of the present embodiment includes: a first receiving module 11 and a first dynamic priority value comparing module 12. The first receiving module 11 is configured to receive first advertisement information sent by a first routing device in the virtual routing device group, where the first advertisement information carries a first dynamic priority value of the first routing device. The first dynamic priority value comparing module 12 is configured to compare the first dynamic priority value in the first notification message received by the first receiving module 11 with the second dynamic priority value of the first receiving module, and if the first dynamic priority value is smaller than the second dynamic priority value, maintain the main routing state of the main routing device.
The first dynamic priority value and the second dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the first router and the main routing device of this embodiment in the latest advertisement period.
Specifically, in this embodiment, the specific working process related to all modules may refer to the relevant content disclosed in the relevant embodiment related to the method for switching between the main and standby routing devices in the virtual routing redundancy protocol, and is not described herein again.
It should be noted that the routing device referred to in this embodiment may be a communication device such as a router or a switch, which has a data forwarding function, as long as the device having the corresponding function described in this embodiment of the present invention is within the scope of protection of the present invention.
The main routing device in the virtual routing redundancy protocol of the embodiment of the invention introduces a dynamic priority mechanism into the main routing device election of the VRRP protocol, and takes the received target MAC address of each routing device in the latest notification period as the message number of the virtual MAC address of the virtual routing device group as the dynamic priority of the routing device, thereby leading the main routing device generated by the main routing device election based on the dynamic priority mechanism to be more reasonable, avoiding network oscillation caused by unnecessary switching of the main routing device and improving the stability of the network.
Further, on the basis of the above technical solution of this embodiment, the first advertisement information received by the first receiving module 11 further includes a first static priority value of the first routing device, and correspondingly, the main routing device of this embodiment may further include a first static priority value comparing module 13. Specifically, the first static priority value comparing module 13 is configured to, if the comparison result of the first dynamic priority value comparing module 12 is that the first dynamic priority value is equal to the second dynamic priority value, compare the first static priority value with the second static priority value of the master routing device itself, if the first static priority value is less than the second static priority value, keep the master routing state of the master routing device, and if the first static priority value is greater than the second static priority value, switch the master routing device from the master routing state to the backup routing state.
Further, the primary routing device of this embodiment may further include a first routing state switching module 14, configured to switch the primary routing device from the primary routing state to the backup routing state if the comparison result of the first dynamic priority value comparing module 12 is that the first dynamic priority value is greater than the second dynamic priority value.
Similarly, in the above technical solution, the specific working processes related to all modules may refer to the relevant contents disclosed in the relevant embodiments related to the method for switching between the main and standby router devices in the virtual router redundancy protocol, and are not described herein again.
Fig. 6 is a schematic structural diagram of an embodiment of a backup routing device in a virtual routing redundancy protocol according to the present invention, and as shown in fig. 6, the backup routing device of this embodiment includes: a second receiving module 21 and a second dynamic priority value comparing module 22. The second receiving module 21 is configured to receive second notification information sent by a second routing device in the virtual routing device group, where the second notification information carries a third dynamic priority value of the second routing device. The second dynamic priority value comparing module 22 is configured to compare a third dynamic priority value carried in the second notification information received by the second receiving module 21 with a fourth dynamic priority value of the backup routing device itself, and if the third dynamic priority value is greater than the fourth dynamic priority value, maintain a backup routing state of the backup routing device;
the third dynamic priority value and the fourth dynamic priority value are respectively the number of packets of which the destination MAC addresses received by the second routing device and the backup routing device of this embodiment in the latest advertisement period are the virtual MAC addresses of the virtual routing device group.
Specifically, in this embodiment, the specific working process related to all modules may refer to the relevant content disclosed in the relevant embodiment related to the method for switching between the main and standby routing devices in the virtual routing redundancy protocol, and is not described herein again.
It should be noted that the routing device referred to in this embodiment may be a communication device such as a router or a switch, which has a data forwarding function, as long as the device having the corresponding function described in this embodiment of the present invention is within the scope of protection of the present invention.
The backup routing equipment in the virtual routing redundancy protocol of the embodiment of the invention introduces a dynamic priority mechanism into the routing equipment election of the VRRP protocol, takes the received destination MAC address as the message number of the virtual MAC address of the virtual routing equipment group in the latest notification period of each routing equipment as the dynamic priority of the routing equipment, thereby leading the priority value of each VRRP routing equipment in the virtual routing equipment group to change along with the change of the actual workload of the routing equipment, leading the main routing equipment generated by VRRP election based on the dynamic priority mechanism to be more reasonable, avoiding network oscillation caused by unnecessary switching of the main routing equipment and improving the stability of the network.
Further, on the basis of the foregoing technical solution in this embodiment, the second notification information received by the second receiving module 21 in this embodiment further carries a third static priority value of the second routing device, and correspondingly, the backup routing device in this embodiment further includes a second static priority value comparing module 23. Specifically, the second static priority value comparing module 23 is configured to, if the comparison result of the second dynamic priority value comparing module 22 is that the third dynamic priority value is equal to the fourth dynamic priority value, further compare the third static priority value with the fourth static priority value of the backup routing device itself, if the third static priority value is greater than the fourth static priority value, keep the backup routing state of the backup routing device, and if the third static priority value is less than the fourth static priority value, switch the backup routing device from the backup routing state to the master routing state.
Similarly, the specific working processes related to all modules in the above technical solution may refer to the relevant contents disclosed in the related embodiments related to the method for switching between the main and standby router devices in the virtual router redundancy protocol, and are not described herein again.
Fig. 7 is a schematic structural diagram of an embodiment of a routing device in a virtual routing redundancy protocol according to the present invention. Specifically, the routing device of this embodiment is any routing device in the virtual routing device group in the foregoing method. As shown in fig. 7, the routing device of the present embodiment includes a routing state judgment module 1 and a processing module 2. The routing state judging module 1 is configured to judge a routing state of the routing device in the virtual routing device group; and the processing module 2 is configured to invoke the first processing module if the routing device is in the main routing state according to the judgment, and invoke the second processing module if the routing device is in the backup routing state according to the judgment. The first processing module is specifically configured to execute the related function of the main routing device in the above embodiment, and the second processing module is specifically configured to execute the related function of the backup routing device in the above embodiment.
Specifically, in the above technical solution, for a specific working process related to the first processing module and the second processing module, reference may be made to relevant contents disclosed in relevant embodiments related to the switching method of the main and standby routing devices in the virtual routing redundancy protocol, the main routing device, and the backup routing device, which are not described herein again.
The routing equipment in the virtual routing redundancy protocol of the embodiment of the invention introduces a dynamic priority mechanism into the routing equipment election of the VRRP protocol, takes the received destination MAC address as the message number of the virtual MAC address of the virtual routing equipment group in the latest notification period of each routing equipment as the dynamic priority of the routing equipment, thereby leading the priority value of each VRRP routing equipment in the virtual routing equipment group to change along with the change of the actual workload of the routing equipment, leading the main routing equipment generated by VRRP election based on the dynamic priority mechanism to be more reasonable, avoiding network oscillation caused by unnecessary switching of the main routing equipment and improving the stability of the network.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for switching a master/standby router in a virtual router redundancy protocol is characterized by comprising the following steps:
receiving, by a master routing device in a master routing state in a virtual routing device group, first advertisement information sent by a first routing device in the virtual routing device group, except for the master routing device, where the first advertisement information carries a first dynamic priority value of the first routing device;
the main routing equipment compares the first dynamic priority value with a second dynamic priority value of the main routing equipment, and if the first dynamic priority value is smaller than the second dynamic priority value, the main routing state is maintained;
the first dynamic priority value and the second dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the first routing device and the main routing device in the latest advertisement period.
2. The method according to claim 1, wherein the method comprises:
the first advertisement information also carries a first static priority value of the first routing device;
the method further comprises the following steps: if the first dynamic priority value is equal to the second dynamic priority value, the main routing device compares the first static priority value with a second static priority value of the main routing device, if the first static priority value is smaller than the second static priority value, the main routing state is maintained, and if the first static priority value is larger than the second static priority value, the main routing state is switched to a backup routing state.
3. The method for switching between master and standby router devices in virtual router redundancy protocol according to claim 1 or 2, further comprising:
if the first dynamic priority value is greater than the second dynamic priority value, the main routing device switches from the main routing state to a backup routing state.
4. A method for switching a master/standby router in a virtual router redundancy protocol is characterized by comprising the following steps:
receiving, by a backup routing device in a backup routing state in a virtual routing device group, second notification information sent by a second routing device in the virtual routing device group, the second notification information carrying a third dynamic priority value of the second routing device;
the backup routing equipment compares the third dynamic priority value with a fourth dynamic priority value of the backup routing equipment, and if the third dynamic priority value is greater than the fourth dynamic priority value, the backup routing state is maintained;
the third dynamic priority value and the fourth dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the second routing device and the backup routing device in the latest advertisement period.
5. The method according to claim 4, wherein the method comprises:
the second notification information also carries a third static priority value of the second routing device;
the method further comprises the following steps: if the third dynamic priority value is equal to the fourth dynamic priority value, the backup routing device compares the third static priority value with a fourth static priority value of the backup routing device, if the third static priority value is greater than the fourth static priority value, the backup routing state is maintained, and if the third static priority value is less than the fourth static priority value, the backup routing state is switched to the main routing state.
6. A primary routing device in a virtual routing redundancy protocol, comprising:
a first receiving module, configured to receive first advertisement information sent by a first routing device in a virtual routing device group, where the first advertisement information carries a first dynamic priority value of the first routing device;
a first dynamic priority value comparing module, configured to compare the first dynamic priority value with a second dynamic priority value of the first dynamic priority value, and if the first dynamic priority value is smaller than the second dynamic priority value, maintain a main routing state of the main routing device;
the first dynamic priority value and the second dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the first routing device and the main routing device in the latest advertisement period.
7. The master routing device in the virtual routing redundancy protocol according to claim 6, wherein:
the first advertisement information also carries a first static priority value of the first routing device;
the master router device further includes: a first static priority value comparison module, configured to compare the first static priority value with a second static priority value of the master routing device if the first dynamic priority value is equal to the second dynamic priority value, keep the master routing state of the master routing device if the first static priority value is less than the second static priority value, and switch the master routing device from the master routing state to a backup routing state if the first static priority value is greater than the second static priority value.
8. The master routing device in the virtual routing redundancy protocol according to claim 6 or 7, further comprising:
and the first routing state switching module is configured to switch the primary routing device from the primary routing state to a backup routing state if the first dynamic priority value is greater than the second dynamic priority value.
9. A backup routing device in a virtual routing redundancy protocol, comprising:
a second receiving module, configured to receive second notification information sent by a second routing device in the virtual routing device group, where the second notification information carries a third dynamic priority value of the second routing device;
a second dynamic priority value comparing module, configured to compare the third dynamic priority value with a fourth dynamic priority value of the second dynamic priority value, and if the third dynamic priority value is greater than the fourth dynamic priority value, maintain the backup routing state of the backup routing device;
the third dynamic priority value and the fourth dynamic priority value are respectively the number of messages of which the destination MAC addresses are the virtual MAC addresses of the virtual routing device group, which are respectively received by the second routing device and the backup routing device in the latest advertisement period.
10. The backup routing device in virtual routing redundancy protocol according to claim 9, wherein:
the second notification information also carries a third static priority value of the second routing device;
the backup routing device further comprises: and a second static priority value comparison module, configured to compare the third static priority value with a fourth static priority value of the backup routing device if the third dynamic priority value is equal to the fourth dynamic priority value, maintain the backup routing state of the backup routing device if the third static priority value is greater than the fourth static priority value, and switch the backup routing device from the backup routing state to the master routing state if the third static priority value is less than the fourth static priority value.
11. A route device in a virtual route redundancy protocol is characterized by comprising a route state judgment module and a processing module;
the routing state judging module is used for judging the routing state of the routing equipment in the virtual routing equipment group;
the processing module is used for calling the first processing module if the routing equipment is in the main routing state according to judgment, and calling the second processing module if the routing equipment is in the backup routing state according to judgment;
the first processing module comprises a primary routing device according to any one of claims 6 to 8 and the second processing module comprises a backup routing device according to any one of claims 9 to 10.
CN2009102263725A 2009-11-26 2009-11-26 Switching method and device of main/standby router in virtual route redundancy protocol Expired - Fee Related CN101702681B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102263725A CN101702681B (en) 2009-11-26 2009-11-26 Switching method and device of main/standby router in virtual route redundancy protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102263725A CN101702681B (en) 2009-11-26 2009-11-26 Switching method and device of main/standby router in virtual route redundancy protocol

Publications (2)

Publication Number Publication Date
CN101702681A true CN101702681A (en) 2010-05-05
CN101702681B CN101702681B (en) 2012-02-22

Family

ID=42157576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102263725A Expired - Fee Related CN101702681B (en) 2009-11-26 2009-11-26 Switching method and device of main/standby router in virtual route redundancy protocol

Country Status (1)

Country Link
CN (1) CN101702681B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035906A (en) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 IPv6 (Internet Protocol Version 6) protocol address conflict processing method and system based on VRRP (Virtual Router Redundancy Protocol)
CN103441940A (en) * 2013-08-29 2013-12-11 华为技术有限公司 Method and device for switching network device from stand-by state to main state and network device
CN103748843A (en) * 2011-08-23 2014-04-23 瑞典爱立信有限公司 Methods and apparatus for avoiding inter-chassis redundancy switchover to non-functional standby nodes
CN104158642A (en) * 2014-08-08 2014-11-19 上海斐讯数据通信技术有限公司 Method and system for providing backup for software defined network controller
CN106100987A (en) * 2016-08-08 2016-11-09 杭州迪普科技有限公司 A kind of method and device of the secondary router of active router based on VRRP agreement switching
CN106130898A (en) * 2016-08-29 2016-11-16 北京神州绿盟信息安全科技股份有限公司 A kind of virtual flow-line link support method and device
CN106888116A (en) * 2016-12-30 2017-06-23 北京同有飞骥科技股份有限公司 A kind of dispatching method of dual controller cluster shared resource
CN107888492A (en) * 2017-10-16 2018-04-06 闽南师范大学 A kind of method and apparatus of VRRP load balancing
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN108924044A (en) * 2018-06-22 2018-11-30 迈普通信技术股份有限公司 Link maintains method, PE equipment and readable storage medium storing program for executing
CN111277436A (en) * 2020-01-17 2020-06-12 深信服科技股份有限公司 Equipment state switching method and device, electronic equipment and storage medium
CN111464438A (en) * 2020-03-04 2020-07-28 邦彦技术股份有限公司 Method and device for managing state of VRRP node, and method and device for improving equipment
CN112887204A (en) * 2021-01-29 2021-06-01 上海弘积信息科技有限公司 Method for periodically setting VRRP node as main node
CN114070781A (en) * 2020-08-05 2022-02-18 北京威努特技术有限公司 Data communication method, device and system and computer equipment
CN114244735A (en) * 2021-12-09 2022-03-25 南京丰道电力科技有限公司 Main/standby operation switching method and device and storage medium
CN114285795A (en) * 2021-12-02 2022-04-05 中国银联股份有限公司 State control method, device, equipment and storage medium of virtual equipment
CN115396307A (en) * 2022-07-13 2022-11-25 微网优联科技(成都)有限公司 Method, system, storage medium and electronic device for restarting multi-router

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455451B (en) * 2012-06-05 2016-02-03 宏碁股份有限公司 Dual-mode electric device, electronic system and main control end determination methods
CN105681187A (en) * 2014-11-18 2016-06-15 华为技术有限公司 VRRP (Virtual Router Redundancy Protocol) backup set management method and related device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1322716C (en) * 2003-08-15 2007-06-20 华为技术有限公司 Key route information monitoring method based on virtual router redundant protocol
CN1968260B (en) * 2005-11-17 2010-12-01 华为技术有限公司 Method for implementing virtual router redundancy protocol switching between primary/standby devices

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035906A (en) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 IPv6 (Internet Protocol Version 6) protocol address conflict processing method and system based on VRRP (Virtual Router Redundancy Protocol)
CN103748843A (en) * 2011-08-23 2014-04-23 瑞典爱立信有限公司 Methods and apparatus for avoiding inter-chassis redundancy switchover to non-functional standby nodes
CN103441940A (en) * 2013-08-29 2013-12-11 华为技术有限公司 Method and device for switching network device from stand-by state to main state and network device
CN103441940B (en) * 2013-08-29 2017-12-15 华为技术有限公司 The network equipment is by the switching method, device and the network equipment for state to major state
CN104158642A (en) * 2014-08-08 2014-11-19 上海斐讯数据通信技术有限公司 Method and system for providing backup for software defined network controller
CN104158642B (en) * 2014-08-08 2018-03-27 上海斐讯数据通信技术有限公司 A kind of method and system that backup is provided for software defined network controller
CN106100987B (en) * 2016-08-08 2019-06-07 杭州迪普科技股份有限公司 A kind of active router based on VRRP agreement switches the method and device of secondary router
CN106100987A (en) * 2016-08-08 2016-11-09 杭州迪普科技有限公司 A kind of method and device of the secondary router of active router based on VRRP agreement switching
CN106130898A (en) * 2016-08-29 2016-11-16 北京神州绿盟信息安全科技股份有限公司 A kind of virtual flow-line link support method and device
CN106130898B (en) * 2016-08-29 2019-11-19 北京神州绿盟信息安全科技股份有限公司 A kind of virtual flow-line link support method and device
CN106888116B (en) * 2016-12-30 2020-03-10 北京同有飞骥科技股份有限公司 Scheduling method of double-controller cluster shared resources
CN106888116A (en) * 2016-12-30 2017-06-23 北京同有飞骥科技股份有限公司 A kind of dispatching method of dual controller cluster shared resource
CN107888492A (en) * 2017-10-16 2018-04-06 闽南师范大学 A kind of method and apparatus of VRRP load balancing
CN107888492B (en) * 2017-10-16 2020-07-24 闽南师范大学 VRRP load balancing method and device
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN108924044B (en) * 2018-06-22 2020-12-11 迈普通信技术股份有限公司 Link maintenance method, PE device and readable storage medium
CN108924044A (en) * 2018-06-22 2018-11-30 迈普通信技术股份有限公司 Link maintains method, PE equipment and readable storage medium storing program for executing
CN111277436A (en) * 2020-01-17 2020-06-12 深信服科技股份有限公司 Equipment state switching method and device, electronic equipment and storage medium
CN111464438B (en) * 2020-03-04 2023-02-28 邦彦技术股份有限公司 Method and device for managing state of VRRP node, and method and device for improving equipment
CN111464438A (en) * 2020-03-04 2020-07-28 邦彦技术股份有限公司 Method and device for managing state of VRRP node, and method and device for improving equipment
CN114070781A (en) * 2020-08-05 2022-02-18 北京威努特技术有限公司 Data communication method, device and system and computer equipment
CN114070781B (en) * 2020-08-05 2023-08-08 北京威努特技术有限公司 Data communication method, device, system and computer equipment
CN112887204A (en) * 2021-01-29 2021-06-01 上海弘积信息科技有限公司 Method for periodically setting VRRP node as main node
CN114285795B (en) * 2021-12-02 2023-01-31 中国银联股份有限公司 State control method, device, equipment and storage medium of virtual equipment
CN114285795A (en) * 2021-12-02 2022-04-05 中国银联股份有限公司 State control method, device, equipment and storage medium of virtual equipment
CN114244735A (en) * 2021-12-09 2022-03-25 南京丰道电力科技有限公司 Main/standby operation switching method and device and storage medium
CN114244735B (en) * 2021-12-09 2024-01-16 南京丰道电力科技有限公司 Master and slave operation switching method, device and storage medium
CN115396307A (en) * 2022-07-13 2022-11-25 微网优联科技(成都)有限公司 Method, system, storage medium and electronic device for restarting multi-router

Also Published As

Publication number Publication date
CN101702681B (en) 2012-02-22

Similar Documents

Publication Publication Date Title
CN101702681B (en) Switching method and device of main/standby router in virtual route redundancy protocol
CN110912780B (en) High-availability cluster detection method, system and controlled terminal
CN111698158B (en) Method and device for electing master equipment and machine-readable storage medium
EP1697843B1 (en) System and method for managing protocol network failures in a cluster system
CN101699799B (en) Method and network equipment for preventing network loop and spanning tree protocol network system
US8627137B1 (en) Graceful handling of critical traffic blackholing faults
JP5941404B2 (en) Communication system, path switching method, and communication apparatus
EP1994694A2 (en) System and method for preventing loops in the presence of control plane failures
CN101399737A (en) Protection method and apparatus used for link convergence group of loop Ethernet
CN101729426B (en) Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)
CN103200093B (en) A kind of method and apparatus improving the handling property of many VRRP backup group
EP3029883B1 (en) Network protection method and apparatus, next-ring node, and system
CN112787960B (en) Stack splitting processing method, device and equipment and storage medium
US8477655B2 (en) Method, device, and system for establishing label switching path in fast rerouting switching
CN103200109A (en) Method and device for OSPF neighboring node management
CN1859423B (en) Synchronous switching method for host and repeat device
US8817605B2 (en) Cross-layer reconfiguration method for surviving multiple-link network failures
CN102136947A (en) Method and device for processing link faults
CN110912815A (en) Network element ring formation preventing method, device, equipment and readable storage medium
KR101075462B1 (en) Method to elect master nodes from nodes of a subnet
CN111953591A (en) Fault processing method and device
CN112583708B (en) Connection relation control method and device and electronic equipment
CN102932249A (en) Method and device for transmitting virtual router redundancy protocol (VRRP) message
CN112073203A (en) Service recovery method and device, electronic equipment and storage medium
CN115801555B (en) Main-standby switching method and device based on preemption delay and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120222

Termination date: 20151126

CF01 Termination of patent right due to non-payment of annual fee