[go: up one dir, main page]

CN102932249A - Method and device for transmitting virtual router redundancy protocol (VRRP) message - Google Patents

Method and device for transmitting virtual router redundancy protocol (VRRP) message Download PDF

Info

Publication number
CN102932249A
CN102932249A CN2012103815895A CN201210381589A CN102932249A CN 102932249 A CN102932249 A CN 102932249A CN 2012103815895 A CN2012103815895 A CN 2012103815895A CN 201210381589 A CN201210381589 A CN 201210381589A CN 102932249 A CN102932249 A CN 102932249A
Authority
CN
China
Prior art keywords
vrrp
backup
message
master
period
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
CN2012103815895A
Other languages
Chinese (zh)
Other versions
CN102932249B (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.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201210381589.5A priority Critical patent/CN102932249B/en
Publication of CN102932249A publication Critical patent/CN102932249A/en
Application granted granted Critical
Publication of CN102932249B publication Critical patent/CN102932249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for transmitting a virtual router redundancy protocol (VRRP) message. The method comprises the following steps that medium equipment receives a VRRP message from Master equipment within a preset first period, and when the VRRP message from Backup equipment is not received, the medium equipment sends a confirmation message to the Master equipment; and the medium equipment sends the VRRP message to the Backup equipment according to a VRRP period, wherein the preset first period is greater than the VRRP period. According to the method and the device, problems such as conflict of Internet protocol (IP) addresses and interruption of service flow are avoided; and the load of the Master equipment in a backup group can be effectively reduced.

Description

VRRP message transmission method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for transmitting a VRRP (Virtual Router Redundancy Protocol) packet.
Background
The VRRP function adds a group of routers capable of bearing gateway functions in the local area network into a Backup group, wherein the Backup group consists of a Master Router and a plurality of Backup routers, and externally corresponds to a Virtual Router (VR) which has an IP address and is called a Virtual IP address; and the terminal in the local area network only needs to know the IP address of the VR and set the IP address as the IP address of the gateway, and the terminal in the local area network communicates with the external network through the VR.
As shown in fig. 1, which is a networking schematic diagram of a VRRP network, Route1 (router 1), Route2, and Route3 form 3 backup groups, corresponding 3 VRs are VR1, VR2, and VR3, VR1 is a PC1 gateway, VR2 is a PC2 gateway, and VR3 is a PC3 gateway; by configuring the priorities, the Route1 is a Master router of VR1, the Route2 is a Master router of VR2, and the Route3 is a Master router of VR 3. Based on the application scenario, the traffic of the PC1 and the IP network is forwarded through the Route1, the traffic of the PC2 and the IP network is forwarded through the Route2, and the traffic of the PC3 and the IP network is forwarded through the Route 3.
In the prior art, for any Backup group (taking VR1 as an example), in order to make Route2 and Route3 always be Backup routers, a Master router (i.e., Route 1) of VR1 needs to regularly send VRRP messages to SW1, and SW1 forwards the VRRP messages to Route2 and Route3, so that Route2 and Route3 always are Backup routers.
However, when the control plane of the Master router is in a busy state (for example, when the load of a Central Processing Unit (CPU) is too large, and the utilization rate is 100%), the Master router cannot send a VRRP message on time, and the Backup router cannot receive the VRRP message, which causes the Backup router to reselect one Master router, so that a plurality of Master routers exist in the Backup group, and causes problems such as IP address collision in the network, service traffic interruption, and the like.
Disclosure of Invention
The invention provides a method and a device for transmitting a VRRP message, which are used for avoiding service flow interruption.
In order to achieve the above object, an embodiment of the present invention provides a transmission method for a virtual router redundancy protocol VRRP packet, which is applied to a VRRP network including a Master device and a Backup device, where the Master device and the Backup device are routing devices located in a same Backup group, and the Master device and the Backup device are respectively connected to an intermediate device, and the method includes the following steps: the intermediate equipment sends a confirmation message for indicating to stop sending the VRRP message to the Master equipment when receiving the VRRP message from the Master equipment in a preset first period and not receiving the VRRP message from the Backup equipment; the intermediate equipment copies the VRRP message from the Master equipment and sends the copied VRRP message to the Backup equipment according to a VRRP period; wherein the preset first period is greater than the VRRP period.
The intermediate device sends the copied VRRP message to the Backup device according to the VRRP cycle, and then the method further comprises the following steps: when the intermediate device detects a link fault between the intermediate device and the Master device through a Bidirectional Forwarding Detection (BFD) protocol, if the link between the intermediate device and the Master device is not recovered in a preset second period, the intermediate device stops sending the copied VRRP message to the Backup device, so that the Backup device triggers each device in the VRRP network to race for the Master device in the Backup group again by using a VRRP message timeout mechanism; wherein the preset second period is not greater than the VRRP period.
When the link between the intermediate device and the Master device is not restored in a preset second period, and when each device in the VRRP network races for the Master device in the backup group based on the preemption mode, the method further includes: the intermediate device constructs a VRRP message with the priority of 1 by using the copied VRRP message, and sends the VRRP message with the priority of 1 to the Backup device, so that the Backup device triggers each device in the VRRP network to race for Master devices in the Backup group again by using the VRRP message with the priority of 1.
The intermediate device sends the copied VRRP message to the Backup device according to the VRRP cycle, and then the method further comprises the following steps: when the intermediate device receives the VRRP message from the Backup device, the intermediate device stops sending the copied VRRP message to the Backup device, and sends the VRRP message from the Backup device to the Master device, so that the Master device in the Backup group is selected again between the Master device and the Backup device; and when receiving the VRRP message from the Master device, the intermediate device stops sending the copied VRRP message to the Backup device, and sends the VRRP message from the Master device to the Backup device, so that the Master device in the Backup group is reselected between the Master device and the Backup device.
The process that the intermediate device sends the copied VRRP message to the Backup device according to the VRRP cycle further comprises the following steps: if the intermediate device does not receive the VRRP message from the Master device and does not receive the VRRP message from the Backup device within a preset third period after sending a confirmation message for indicating to stop sending the VRRP message to the Master device, the intermediate device sends the copied VRRP message to the Backup device according to the VRRP period; or, if the intermediate device receives the VRRP message from the Master device after sending a confirmation message for instructing to stop sending the VRRP message to the Master device, the intermediate device refuses to send the copied VRRP message to the Backup device according to the VRRP cycle; the preset first period is greater than the preset third period, the preset first period is not greater than 3 times of the VRRP period, and the preset third period is greater than the VRRP period.
The intermediate device sends the copied VRRP message to the Backup device according to the VRRP cycle, and then the method further comprises the following steps: the intermediate equipment sends a free Address Resolution Protocol (ARP) message, the IP corresponding to the free ARP message is the virtual IP of the Backup group corresponding to the Master equipment and the Backup equipment, the Media Access Control (MAC) corresponding to the free ARP message is the virtual MAC of the Master equipment, and the sending period of the free ARP message is determined based on the aging period of ARP table entries; and after the intermediate equipment determines that the intermediate equipment stops sending the copied VRRP message to the Backup equipment, the intermediate equipment stops sending the free ARP message.
The embodiment of the invention provides a transmission device of a Virtual Router Redundancy Protocol (VRRP) message, which is applied to a VRRP network comprising Master equipment and Backup equipment, wherein the Master equipment and the Backup equipment are routing equipment in the same Backup group, the Master equipment and the Backup equipment are respectively connected with intermediate equipment, the intermediate equipment comprises the transmission device, and the intermediate equipment comprises:
the Master side communication module is used for sending a confirmation message for indicating to stop sending the VRRP message to the Master equipment when the VRRP message from the Master equipment is received in a preset first period and the VRRP message from the Backup equipment is not received;
the Backup side communication module is used for copying the VRRP message from the Master equipment and sending the copied VRRP message to the Backup equipment according to the VRRP cycle;
wherein the preset first period is greater than the VRRP period.
The Backup side communication module is further configured to, when a link failure between the device and the Master device is detected through a Bidirectional Forwarding Detection (BFD) protocol, stop sending the copied VRRP message to the Backup device if the link between the device and the Master device is not restored within a preset second period, so that the Backup device triggers each device in the VRRP network to race for the Master device in the Backup group again by using a VRRP message timeout mechanism;
wherein the preset second period is not greater than the VRRP period.
When links between the intermediate devices and the Master devices are not restored in a preset second period, when each device in the VRRP network competitively selects the Master devices in the backup group based on a preemption mode; the Backup side communication module is further configured to construct a VRRP message with a priority of 1 by using the copied VRRP message, and send the VRRP message with the priority of 1 to the Backup device, so that the Backup device triggers each device in the VRRP network to race for Master devices in the Backup group again by using the VRRP message with the priority of 1.
The Backup side communication module is further configured to stop sending the copied VRRP message to the Backup device when receiving the VRRP message from the Backup device; when receiving the VRRP message from the Master device, stopping sending the copied VRRP message to the Backup device, and sending the VRRP message from the Master device to the Backup device, so that the Master device and the Backup device race and select the Master device in the Backup group again;
and the Master side communication module is further configured to send the VRRP message from the Backup device to the Master device when receiving the VRRP message from the Backup device, so that the Master device in the Backup group is reselected between the Master device and the Backup device.
The Backup side communication module is specifically configured to, after sending a confirmation message for instructing to stop sending the VRRP message to the Master device, send the copied VRRP message to the Backup device according to the VRRP cycle if the VRRP message from the Master device is not received within a preset third cycle and the VRRP message from the Backup device is not received; or,
after sending a confirmation message for indicating to stop sending the VRRP message to the Master equipment, if receiving the VRRP message from the Master equipment, refusing to send a copied VRRP message to the Backup equipment according to a VRRP cycle;
the preset first period is greater than the preset third period, the preset first period is not greater than 3 times of the VRRP period, and the preset third period is greater than the VRRP period.
Further comprising: the terminal side communication module is used for sending a free Address Resolution Protocol (ARP) message after sending the copied VRRP message to the Backup device according to a VRRP period, wherein an IP corresponding to the free ARP message is a virtual IP of a Backup group corresponding to the Master device and the Backup device, a Media Access Control (MAC) corresponding to the free ARP message is a virtual MAC of the Master device, and the sending period of the free ARP message is determined based on an aging period of an ARP table entry;
and after determining that the self stops sending the copied VRRP message to the Backup device, stopping sending the free ARP message.
Compared with the prior art, the embodiment of the invention at least has the following advantages: in the embodiment of the invention, the intermediate device proxy Master device is used for sending the VRRP message, when the control plane of the Master device is in a busy state, the Backup device can receive the VRRP message, so that a plurality of Master devices do not exist in the Backup group, the problems of IP address conflict, service flow interruption and the like do not occur, the load of the Master devices in the Backup group can be effectively reduced, and the problem of oscillation generated on the VRRP of the whole network topology and an upper protocol when the Master devices forward normally on the data plane and the control plane is temporarily busy and cannot process protocol messages is solved.
Drawings
Fig. 1 is a networking diagram of a VRRP network in the prior art;
FIG. 2 is a schematic diagram of an application scenario of an embodiment of the present invention;
fig. 3 is a flowchart of a method for transmitting a VRRP packet according to an embodiment of the present invention;
fig. 4 is a structural diagram of a transmission apparatus for a VRRP packet according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
After each device in the Backup group selects the Master device and the Backup device through interactive VRRP messages (which carry priorities and are used for electing the Master device), the Master device needs to send the VRRP messages to enable the Backup device not to become the Master device; aiming at the problems caused by the fact that a plurality of Master devices exist in a Backup group due to the fact that the Master devices cannot send VRRP messages in time in the prior art, the embodiment of the invention provides a VRRP message transmission method which is applied to a VRRP network comprising the Master devices (such as Master routers) and the Backup devices (such as Backup routers), wherein the Master devices and the Backup devices are routing devices located in the same Backup group, and the Master devices and the Backup devices are respectively connected with intermediate devices; the intermediate device needs to be connected to both the Master device and the Backup device, such as a switching device or other devices connected to both the Master device and the Backup device.
In the embodiment of the present invention, taking the application scenario shown in fig. 2 as an example, Route1, Route2, and Route3 constitute 3 VRRP backup groups, where the corresponding 3 VRs are VR1, VR2, and VR3, VR1 is a PC1 gateway, VR2 is a PC2 gateway, and VR3 is a PC3 gateway; by configuring the priorities, Route1 is a Master device of VR1, Route2 and Route3 are Backup devices of VR1, Route2 is a Master device of VR2, Route1 and Route3 are Backup devices of VR2, Route3 is a Master device of VR3, and Route1 and Route2 are Backup devices of VR 3.
Further, for the VRRP Backup group corresponding to VR1, the Master device and the Backup device are respectively connected to SW1, SW2 and SW3, so that one of SW1, SW2 and SW3 may be selected as an intermediate device, taking SW1 as an example; similarly, for the VRRP backup group corresponding to VR2, SW2 may be selected as the intermediate device; for the VRRP backup group corresponding to VR3, SW3 may be selected as the intermediary.
In the embodiment of the present invention, since the VRRP network may include a plurality of different VRRP Backup groups, in order to enable the intermediate device to know the Master device and the Backup device in each Backup group, a report library may be maintained on the intermediate device, where the report library is used to store the receiving/transmitting port corresponding to the Master device of each Backup group and the receiving/transmitting port corresponding to the Backup device.
In addition, since the processing of each VRRP backup group is the same, the following describes in detail the VRRP packet transmission method provided in the embodiment of the present invention in combination with the processing of one backup group (taking the VRRP backup group corresponding to VR1 as an example), as shown in fig. 3, the method includes the following steps:
step 301, when receiving a VRRP message from the Master device within a preset first period and not receiving the VRRP message from the Backup device, the intermediate device sends a confirmation message for instructing to stop sending the VRRP message to the Master device, and then the Master device stops sending the VRRP message.
And step 302, the intermediate device copies the VRRP message from the Master device and sends the copied VRRP message to the Backup device according to the VRRP cycle.
In the embodiment of the invention, the advertisement Timer field of the VRRP message carries information of the VRRP cycle, and the preset first cycle needs to be larger than the VRRP cycle; in a preferred embodiment, the preset first period may be 3 VRRP periods, and the intermediate device may obtain the VRRP period from an advertisement Timer field of the VRRP packet.
In the application scenario shown in fig. 2, for a VRRP Backup group corresponding to VR1, Route1, Route2, and Route3 interact with VRRP messages through SW1, and become Master devices because the priority of Route1 configured in VR1 is the highest, and Route2 and Route3 become Backup devices because the priority is lower than Route 1; afterwards, Route1 sends VRRP packets to SW1 according to the VRRP cycle, and SW1 forwards the VRRP packets to Route2 and Route 3.
In the process, SW1 is an intermediate device, and when SW1 receives only the VRRP message from Route1 and does not receive the VRRP messages from Route2 and Route3 in 3 VRRP cycles, SW1 determines that it needs to proxy the sending process of the VRRP message; further, SW1 needs to send a confirmation message for indicating to stop sending the VRRP message to Route1, and then Route1 stops sending the VRRP message; and SW1 needs to copy the VRRP message from Route1 and sends the copied VRRP message to Route2 and Route3 according to the VRRP cycle.
In the embodiment of the invention, after the intermediate device sends the copied VRRP message to the Backup device according to the VRRP period, under a normal condition, the intermediate device can replace a Master device to send the copied VRRP message to the Backup device all the time until the following conditions occur:
in the first case, when the intermediate device detects a link failure between itself and the Master device through a BFD (Bidirectional Forwarding Detection) protocol, if the link between itself and the Master device is not restored within a preset second period, the intermediate device stops sending the copied VRRP message to the Backup device, so that the Backup device triggers each device in the VRRP network to race for the Master device in the Backup group again by using a VRRP message timeout mechanism.
Wherein the preset second period is not greater than the VRRP period, and in a preferred embodiment, the preset second period may be 1 VRRP period; in addition, the VRRP protocol specifies timeout times as: 3 VRRP period + Skew _ Time (offset Time).
Specifically, in order to ensure that a new Master device can be switched in time when the Master device fails (i.e., cannot be connected to an upper network through the path of the Master device), a BFD function needs to be configured on the intermediate device and the Master device, and if the intermediate device detects a link failure between itself and the Master device through BFD and the failure is not recovered within 1 VRRP period, the intermediate device stops sending the duplicated VRRP messages to the Backup device (before the failure is recovered, any other event cannot trigger the intermediate device to send the duplicated VRRP messages to the Backup device), so that the Backup device triggers each device in the VRRP network to re-select the Master device in the Backup group by using a VRRP message timeout mechanism, that is, when the Backup device does not receive the VRRP messages within the timeout time specified by the VRRP protocol, the Master device in the Backup group is re-selected.
Further, the Master device and the Backup device in the Backup group have the following working modes: (1) in the non-preemptive mode, as long as the Master equipment does not have a fault, the Backup equipment cannot become the Master equipment even if configured with higher priority, and the non-preemptive mode can avoid frequent switching of the Master equipment; (2) and in the preemption mode, once the Backup device finds that the priority of the Backup device is higher than that of the current Master device, the Backup device triggers the Master device to reselect and replaces the original Master device, and the preemption mode can ensure that the Master device bearing the forwarding task is the device with the highest priority in the Backup group.
Based on this, when each device in the VRRP network races for Master devices in the Backup group based on the preemption mode, the intermediate device may also construct a VRRP message with a priority of 1 using the copied VRRP message (i.e., the priority in the VRRP message sent by the Master device is modified to 1), and send the VRRP message with the priority of 1 to the Backup device, so that the Backup device immediately triggers each device in the VRRP network to race for Master devices in the Backup group again using the VRRP message with the priority of 1.
In the application scenario shown in fig. 2, in the process that SW1 proxies Route1 to send VRRP messages to Route2 and Route3, if SW1 and Route1 configure a port down (failure) connected to BFD at the upstream end, that is, cannot communicate with an upper network through the Route of Route1, and SW1 still does not recover after waiting for 1 VRRP period, SW1 immediately stops sending VRRP messages to Route2 and Route3, so that Route2 and Route3 cannot receive VRRP messages within the timeout period specified by the VRRP protocol, and reselects a Master device in the backup group. In addition, if the backup group is in a preemptive mode, SW1 may also construct a VRRP message with priority 1 and send the VRRP message to Route2 and Route3, so that Route2 and Route3 immediately re-select the Master device in the backup group.
In the second situation, when receiving the VRRP message from the Backup device, the intermediate device stops sending the copied VRRP message to the Backup device, and sends the VRRP message from the Backup device to the Master device and other Backup devices, so that the Master device in the Backup group is selected again between the Master device and the Backup device; further, after receiving the VRRP message, the Master device needs to send the VRRP message to the intermediate device, and the intermediate device forwards the VRRP message to other Backup devices, so as to trigger the Master device in the Backup group to be reselected between the Master device and the Backup devices; in the re-election process, the Master device degrades to be Backup device or continue to be used as the Master device by comparing the priority carried in the VRRP message with the priority of the Master device; when the Master device is degraded to become Backup device, the VRRP message needs to be stopped from being sent to the intermediate device; when the Master device continues to serve as the Master device, the Master device needs to continue to send the VRRP messages to the intermediate device until receiving a confirmation message from the intermediate device for instructing to stop sending the VRRP messages, and then the Master device can stop sending the VRRP messages.
In the application scenario shown in fig. 2, in the process that SW1 proxies Route1 to Route2 and Route3 to send VRRP messages, if SW1 receives a VRRP message from Route2 or Route3, proxy Route1 stops sending the VRRP message to Route2 and Route3, and sends the VRRP message from Route2 to Route1 and Route3 (or sends the VRRP message from Route3 to Route1 and Route 2); furthermore, Route1 is currently in a Master state and does not send a VRRP message (sent by SW 1), after receiving a VRRP message of Route2 or Route3, Route1 needs to send the VRRP message to SW1, and SW1 forwards the VRRP message to Route2 or Route3, thereby triggering the Master devices in the backup group to be reselected among Route1, Route2, and Route 3; in the re-election process, the Route1 is degraded to a Backup device or continues to be used as a Master device through the comparison of the priorities; when the Route1 is degraded into Backup equipment, the VRRP message is stopped being sent to the SW 1; when the Route1 continues to be used as the Master device, the VRRP message is sent to the SW1 until an acknowledgement message for indicating that the sending of the VRRP message is stopped is received from the SW1, and then the Route1 stops sending the VRRP message.
And thirdly, when the intermediate equipment receives the VRRP message from the Master equipment, stopping sending the copied VRRP message to the Backup equipment, and sending the VRRP message from the Master equipment to the Backup equipment so as to enable the Master equipment in the Backup group to be selected again between the Master equipment and the Backup equipment. When the configuration of the Master device changes (for example, the priority of the Master device changes), although the VRRP message is not sent currently (sent by the intermediate device), the Master device can immediately recover to send the VRRP message and resend the VRRP message to the intermediate device; further, if the intermediate device only receives the VRRP message of the Master device within 3 VRRP cycles and the configuration field in the VRRP message is unchanged (i.e., the VRRP message is unchanged), the intermediate device starts to proxy the Master device to send the VRRP message to the Backup device.
In the application scenario shown in fig. 2, in the process that SW1 proxies Route1 to Route2 and Route3 send VRRP messages, if SW1 receives a VRRP message from Route1, proxy Route1 stops sending the VRRP message to Route2 and Route3, and sends the newly received VRRP message to Route2 and Route 3; further, if SW1 only receives VRRP messages from Route1 and does not receive VRRP messages from Route2 and Route3 in 3 VRRP cycles, SW1 re-proxies Route1 to send VRRP messages to Route2 and Route 3.
In the above process of the embodiment of the present invention, the Master device needs to support a function of not sending a VRRP message, and it is assumed that the Master device does not support a function of not sending a VRRP message, that is, after receiving a confirmation message for instructing to stop sending the VRRP message, the Master device does not stop sending the VRRP message, and continues to send the VRRP message according to a VRRP cycle; based on this, the process that the intermediate device sends the copied VRRP message to the Backup device according to the VRRP period further includes:
after the intermediate device sends a confirmation message for indicating to stop sending the VRRP message to the Master device, if the VRRP message from the Master device is still received (i.e. the Master device does not support the function of not sending the VRRP message, and continues to send the VRRP message according to the VRRP cycle), the intermediate device refuses to send the copied VRRP message to the Backup device according to the VRRP cycle, i.e. the proxy Master device is not required to send the copied VRRP message to the Backup device.
After the intermediate device sends a confirmation message for instructing to stop sending the VRRP message to the Master device, if the VRRP message from the Master device is not received within a preset third period (the Master device does not support the function of not sending the VRRP message, and continues to send the VRRP message according to the VRRP period, but because the control plane of the Master device is in a busy state, the VRRP message cannot be sent according to the VRRP period within the preset third period), and the VRRP message from the Backup device is not received, the intermediate device sends a copied VRRP message to the Backup device according to the VRRP period, that is, the proxy Master device needs to send the copied VRRP message to the Backup device.
In the embodiment of the invention, the preset first period is greater than a preset third period, the preset first period is not greater than 3 times of VRRP period, and the preset third period is greater than VRRP period; in a preferred embodiment, the preset first period may be 3 VRRP periods, and the preset third period may be 2 (or 1.5) VRRP periods.
In the embodiment of the invention, the intermediate device can also send a free ARP (Address Resolution Protocol) message in the process of sending the VRRP message to the Backup device by the proxy Master device so as to ensure that the ARP request of the terminal to the gateway can obtain a response when the Master device is busy; the IP corresponding to the free ARP message is a virtual IP of the backup group, the corresponding MAC (Media Access Control ) is a virtual MAC of the Master device, and the sending period of the free ARP message is determined based on the aging period of the ARP entry (for example, the sending period is 1/3 of the aging period of the ARP entry); in addition, the intermediate device may also maintain an MAC entry in the lower-layer switching network, where the MAC is a virtual MAC of the Master device, and the output interface is a port connected to the Master device.
Further, after determining that the intermediate device itself stops sending the copied VRRP packet to the Backup device (i.e., the intermediate device stops sending the VRRP packet to the Backup device by the proxy Master device), the intermediate device also needs to immediately stop sending the gratuitous ARP packet, and clear the MAC table entry in the maintained lower-layer switching network.
Based on the same inventive concept as the above method, an embodiment of the present invention further provides a transmission apparatus for a VRRP packet, which is applied to a VRRP network including a Master device and a Backup device, where the Master device and the Backup device are routing devices located in a same Backup group, and the Master device and the Backup device are respectively connected to an intermediate device, where the intermediate device includes the transmission apparatus, and as shown in fig. 4, the intermediate device includes:
the Master side communication module 11 is configured to send, to the Master device, a confirmation message used for instructing to stop sending the VRRP message when the VRRP message from the Master device is received within a preset first period and the VRRP message from the Backup device is not received;
a Backup side communication module 12, configured to copy a VRRP message from the Master device, and send the copied VRRP message to the Backup device according to a VRRP cycle;
wherein the preset first period is greater than the VRRP period.
The Backup side communication module 12 is further configured to, when detecting a link failure between the device and the Master device through a bidirectional forwarding detection BFD protocol, if the link between the device and the Master device is not restored within a preset second period, stop sending the copied VRRP message to the Backup device, so that the Backup device triggers each device in the VRRP network to race for the Master device in the Backup group again by using a VRRP message timeout mechanism;
wherein the preset second period is not greater than the VRRP period.
When links between the intermediate devices and the Master devices are not restored in a preset second period, when each device in the VRRP network competitively selects the Master devices in the backup group based on a preemption mode; the Backup side communication module 12 is further configured to construct a VRRP message with a priority of 1 using the copied VRRP message, and send the VRRP message with the priority of 1 to the Backup device, so that the Backup device triggers each device in the VRRP network to race for Master devices in the Backup group again using the VRRP message with the priority of 1.
The Backup side communication module 12 is further configured to stop sending the copied VRRP message to the Backup device when receiving the VRRP message from the Backup device; when receiving the VRRP message from the Master device, stopping sending the copied VRRP message to the Backup device, and sending the VRRP message from the Master device to the Backup device, so that the Master device and the Backup device race and select the Master device in the Backup group again;
the Master side communication module 11 is further configured to send the VRRP message from the Backup device to the Master device when receiving the VRRP message from the Backup device, so that the Master device in the Backup group is reselected between the Master device and the Backup device.
The Backup side communication module 12 is specifically configured to, after sending a confirmation message for instructing to stop sending the VRRP message to the Master device, send the copied VRRP message to the Backup device according to the VRRP cycle if the VRRP message from the Master device is not received within a preset third cycle and the VRRP message from the Backup device is not received; or,
after sending a confirmation message for indicating to stop sending the VRRP message to the Master equipment, if receiving the VRRP message from the Master equipment, refusing to send a copied VRRP message to the Backup equipment according to a VRRP cycle;
the preset first period is greater than the preset third period, the preset first period is not greater than 3 times of the VRRP period, and the preset third period is greater than the VRRP period.
The intermediate device further comprises: a terminal side communication module 13, configured to send a free address resolution protocol ARP packet after sending the copied VRRP packet to the Backup device according to a VRRP cycle, where an IP corresponding to the free ARP packet is a virtual IP of a Backup group corresponding to the Master device and the Backup device, a media access control MAC corresponding to the free ARP packet is a virtual MAC of the Master device, and a sending cycle of the free ARP packet is determined based on an aging cycle of an ARP entry; and after determining that the self stops sending the copied VRRP message to the Backup device, stopping sending the free ARP message.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above-mentioned serial numbers of the present invention are for description only and do not represent the merits of the embodiments.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (12)

1.A transmission method of a Virtual Router Redundancy Protocol (VRRP) message is applied to a VRRP network comprising a Master device and a Backup device, wherein the Master device and the Backup device are routing devices in the same Backup group, and the Master device and the Backup device are respectively connected with an intermediate device, and the method is characterized by comprising the following steps:
the intermediate equipment receives the VRRP message from the Master equipment in a preset first period, and does not receive the VRRP message from the Backup equipmentSending a confirmation message for indicating to stop sending the VRRP message to the Master equipment;
the intermediate equipment copies the VRRP message from the Master equipment and sends the copied VRRP message to the Backup equipment according to a VRRP period;
wherein the preset first period is greater than the VRRP period.
2.The method of claim 1, wherein the intermediate device sends the copied VRRP packet to the Backup device according to a VRRP cycle, and then further comprising:
when the intermediate device detects a link fault between the intermediate device and the Master device through a Bidirectional Forwarding Detection (BFD) protocol, if the link between the intermediate device and the Master device is not recovered in a preset second period, the intermediate device stops sending the copied VRRP message to the Backup device, so that the Backup device triggers each device in the VRRP network to race for the Master device in the Backup group again by using a VRRP message timeout mechanism;
wherein the preset second period is not greater than the VRRP period.
3.The method of claim 2, wherein when each device in the VRRP network contends for Master devices in a backup group based on a preemption manner without a link between an intermediate device and the Master device being restored within a preset second period, the method further comprises:
the intermediate device constructs a VRRP message with the priority of 1 by using the copied VRRP message, and sends the VRRP message with the priority of 1 to the Backup device, so that the Backup device triggers each device in the VRRP network to race for Master devices in the Backup group again by using the VRRP message with the priority of 1.
4.The method of claim 1, wherein the intermediate device sends the copied VRRP packet to the Backup device according to a VRRP cycle, and then further comprising:
when the intermediate device receives the VRRP message from the Backup device, the intermediate device stops sending the copied VRRP message to the Backup device, and sends the VRRP message from the Backup device to the Master device, so that the Master device in the Backup group is selected again between the Master device and the Backup device;
and when receiving the VRRP message from the Master device, the intermediate device stops sending the copied VRRP message to the Backup device, and sends the VRRP message from the Master device to the Backup device, so that the Master device in the Backup group is reselected between the Master device and the Backup device.
5.The method of claim 1, wherein the process of the intermediate device sending the copied VRRP packet to the Backup device according to a VRRP cycle further comprises:
if the intermediate device does not receive the VRRP message from the Master device and does not receive the VRRP message from the Backup device within a preset third period after sending a confirmation message for indicating to stop sending the VRRP message to the Master device, the intermediate device sends the copied VRRP message to the Backup device according to the VRRP period; or,
if the intermediate equipment receives the VRRP message from the Master equipment after sending a confirmation message for indicating to stop sending the VRRP message to the Master equipment, the intermediate equipment refuses to send the copied VRRP message to the Backup equipment according to the VRRP period;
wherein the preset first period is greater than the preset third period, and the preset first period is not greater than 3 times of the VRRP period, andthe preset third period is greater than the VRRP period.
6.The method of claim 1, wherein the intermediate device sends the copied VRRP packet to the Backup device according to a VRRP cycle, and then further comprising:
the intermediate equipment sends a free Address Resolution Protocol (ARP) message, the IP corresponding to the free ARP message is the virtual IP of the Backup group corresponding to the Master equipment and the Backup equipment, the Media Access Control (MAC) corresponding to the free ARP message is the virtual MAC of the Master equipment, and the sending period of the free ARP message is determined based on the aging period of ARP table entries;
and after the intermediate equipment determines that the intermediate equipment stops sending the copied VRRP message to the Backup equipment, the intermediate equipment stops sending the free ARP message.
7.A transmission device of a Virtual Router Redundancy Protocol (VRRP) message is applied to a VRRP network comprising a Master device and a Backup device, wherein the Master device and the Backup device are routing devices in the same Backup group, the Master device and the Backup device are respectively connected with an intermediate device, and the intermediate device comprises the transmission device, and the transmission device is characterized in that the intermediate device comprises:
the Master side communication module is used for sending a confirmation message for indicating to stop sending the VRRP message to the Master equipment when the VRRP message from the Master equipment is received in a preset first period and the VRRP message from the Backup equipment is not received;
the Backup side communication module is used for copying the VRRP message from the Master equipment and sending the copied VRRP message to the Backup equipment according to the VRRP cycle;
wherein the preset first period is greater than the VRRP period.
8.The apparatus of claim 7,
the Backup side communication module is further configured to, when a link failure between the device and the Master device is detected through a Bidirectional Forwarding Detection (BFD) protocol, stop sending the copied VRRP message to the Backup device if the link between the device and the Master device is not restored within a preset second period, so that the Backup device triggers each device in the VRRP network to race for the Master device in the Backup group again by using a VRRP message timeout mechanism;
wherein the preset second period is not greater than the VRRP period.
9.The apparatus according to claim 8, wherein when each device in the VRRP network contends for Master devices in a backup group based on a preemption manner, when a link between an intermediate device and the Master devices is not restored within a preset second period;
the Backup side communication module is further configured to construct a VRRP message with a priority of 1 by using the copied VRRP message, and send the VRRP message with the priority of 1 to the Backup device, so that the Backup device triggers each device in the VRRP network to race for Master devices in the Backup group again by using the VRRP message with the priority of 1.
10.The apparatus of claim 7,
the Backup side communication module is further configured to stop sending the copied VRRP message to the Backup device when receiving the VRRP message from the Backup device; when receiving the VRRP message from the Master device, stopping sending the copied VRRP message to the Backup device, and sending the VRRP message from the Master device to the Backup device, so that the Master device and the Backup device can send the VRRP message to the Backup deviceMaster equipment in the backup group is selected again in an election mode between the backup groups;
and the Master side communication module is further configured to send the VRRP message from the Backup device to the Master device when receiving the VRRP message from the Backup device, so that the Master device in the Backup group is reselected between the Master device and the Backup device.
11.The apparatus of claim 7,
the Backup side communication module is specifically configured to, after sending a confirmation message for instructing to stop sending the VRRP message to the Master device, send the copied VRRP message to the Backup device according to the VRRP cycle if the VRRP message from the Master device is not received within a preset third cycle and the VRRP message from the Backup device is not received; or,
after sending a confirmation message for indicating to stop sending the VRRP message to the Master equipment, if receiving the VRRP message from the Master equipment, refusing to send a copied VRRP message to the Backup equipment according to a VRRP cycle;
the preset first period is greater than the preset third period, the preset first period is not greater than 3 times of the VRRP period, and the preset third period is greater than the VRRP period.
12.The apparatus of claim 7, further comprising:
a terminal side communication module, configured to send a free Address Resolution Protocol (ARP) message after sending the copied VRRP message to the Backup device according to a VRRP period, where an IP corresponding to the free ARP message is a virtual IP of a Backup group corresponding to the Master device and the Backup device, a Media Access Control (MAC) corresponding to the free ARP message is a virtual MAC of the Master device, and a sending period of the free ARP message is based on a virtual MAC of the Master deviceDetermining an aging period of the ARP table entry;
and after determining that the self stops sending the copied VRRP message to the Backup device, stopping sending the free ARP message.
CN201210381589.5A 2012-10-10 2012-10-10 A kind of transmission method of VRRP message and device Active CN102932249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210381589.5A CN102932249B (en) 2012-10-10 2012-10-10 A kind of transmission method of VRRP message and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210381589.5A CN102932249B (en) 2012-10-10 2012-10-10 A kind of transmission method of VRRP message and device

Publications (2)

Publication Number Publication Date
CN102932249A true CN102932249A (en) 2013-02-13
CN102932249B CN102932249B (en) 2016-01-20

Family

ID=47646956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210381589.5A Active CN102932249B (en) 2012-10-10 2012-10-10 A kind of transmission method of VRRP message and device

Country Status (1)

Country Link
CN (1) CN102932249B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746856B (en) * 2014-01-28 2017-09-19 华为技术有限公司 Method and network device for preventing service interruption
CN109600273A (en) * 2018-11-26 2019-04-09 武汉思普崚技术有限公司 A kind of optimization method and system of UDP message transmission performance
CN110601972A (en) * 2019-09-18 2019-12-20 新华三信息安全技术有限公司 Message transmission method and device and intelligent elastic architecture system
CN111835608A (en) * 2020-05-21 2020-10-27 中国第一汽车股份有限公司 Vehicle control system and vehicle
CN115225708A (en) * 2022-07-28 2022-10-21 天翼云科技有限公司 Message forwarding method, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242254A (en) * 2008-02-26 2008-08-13 中兴通讯股份有限公司 Virtual redundant router system and method for transmitting virtual redundant routing protocol packet

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242254A (en) * 2008-02-26 2008-08-13 中兴通讯股份有限公司 Virtual redundant router system and method for transmitting virtual redundant routing protocol packet

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑艳涛: "VRRP协议应用和改进研究", 《硕士学位论文》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746856B (en) * 2014-01-28 2017-09-19 华为技术有限公司 Method and network device for preventing service interruption
CN109600273A (en) * 2018-11-26 2019-04-09 武汉思普崚技术有限公司 A kind of optimization method and system of UDP message transmission performance
CN110601972A (en) * 2019-09-18 2019-12-20 新华三信息安全技术有限公司 Message transmission method and device and intelligent elastic architecture system
CN111835608A (en) * 2020-05-21 2020-10-27 中国第一汽车股份有限公司 Vehicle control system and vehicle
CN115225708A (en) * 2022-07-28 2022-10-21 天翼云科技有限公司 Message forwarding method, computer equipment and storage medium
CN115225708B (en) * 2022-07-28 2023-08-08 天翼云科技有限公司 Message forwarding method computer equipment and storage medium

Also Published As

Publication number Publication date
CN102932249B (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN100407671C (en) Network communication method for realizing network load sharing function
CN110912780B (en) High-availability cluster detection method, system and controlled terminal
CN107454155B (en) Fault processing method, device and system based on load balancing cluster
WO2012000234A1 (en) Method, apparatus and system for fast switching between links
US7533166B2 (en) Method and system for router misconfiguration autodetection
CN111698158B (en) Method and device for electing master equipment and machine-readable storage medium
JP2004032758A (en) Router interface backup execution method by VRRP (VirtualRouterRedundancyProtocol)
CN103460647A (en) Technique for operating network node
WO2011157151A2 (en) Method, device and system for realizing disaster-tolerant backup
WO2011140951A1 (en) Method, device and system for load balancing
CN101164307A (en) Method for service recovery after state switching of main and standby gateway equipment and gateway equipment
CN102035676A (en) ARP (Address Resolution Protocol) interaction based method and equipment for detecting and recovering link fault
CN102932249B (en) A kind of transmission method of VRRP message and device
CN101197733A (en) Automatic detection method and device for network connectivity
CN101729426A (en) Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)
CN103607293A (en) Flow protection method and equipment thereof
CN101562576B (en) Route distribution method and equipment thereof
CN113328916B (en) BFD detection mode switching method, device and equipment
CN112583708B (en) Connection relation control method and device and electronic equipment
JP5775473B2 (en) Edge device redundancy system, switching control device, and edge device redundancy method
WO2014146541A1 (en) Cdn and network convergence system, scheduling module selection method and computer storage medium
CN105634848A (en) Virtual router monitoring method and apparatus
CN101741740B (en) Method, system and equipment for balancing loads
CN104125079B (en) A kind of method and device for determining two-node cluster hot backup configuration information
CN1738286A (en) A Realization Method of Rerouting in IP Network

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230612

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.