A method and apparatus for managing a virtual router backup group
By transmitting management backup group announcement messages between peers, the problem of excessive protocol announcement messages during the maintenance of state machines of multiple virtual router backup groups is solved, achieving efficient resource utilization and performance improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2023-04-28
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, maintaining the state machine of multiple virtual router backup groups requires sending a large number of protocol announcement messages, resulting in excessive CPU load on the network and routers.
Different virtual router backup groups are added as member backup groups to the management backup group, and management backup group announcement messages are transmitted between peers, reducing the number of protocol announcement messages. Information and state machines of multiple virtual router backup groups can be transmitted by sending a single management backup group announcement message.
This reduces the protocol advertisement message traffic between router devices, saves network bandwidth and CPU resources, and improves the processing performance of the devices.
Smart Images

Figure CN116471227B_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, specifically a method and device for managing virtual router backup groups. Background Technology
[0002] VRRP (Virtual Router Redundancy Protocol) adds multiple routers that act as gateways to a virtual router backup group, forming a single virtual router. Hosts within the local area network only need to know the virtual IP address of this virtual router and set it as the gateway's IP address to communicate with the external network.
[0003] Each router device is configured with multiple virtual router backup groups of different VLANs (Virtual Local Area Networks). However, each backup group needs to maintain its own state machine, which generates a large number of VRRP advertisement messages, placing a heavy load on the CPU performance of the network and the router. Summary of the Invention
[0004] The purpose of this application is to provide a method and device for managing virtual router backup groups, thereby reducing the large number of protocol announcement messages generated by maintaining the state machine of multiple virtual router backup groups.
[0005] To achieve the above objectives, this application provides a method for managing virtual router backup groups. The method includes: setting each peer of the management backup group; adding multiple virtual router backup groups of different VLANs that the device has already joined to the management backup group; recording a local member information table of the management backup group; wherein the local member information table includes at least: information of each virtual router backup group and the state machine of the device; and sending a management backup group announcement message carrying the local member information table to each peer of the management backup group according to the management message announcement period.
[0006] To achieve the above objectives, this application also provides a device for managing virtual router backup groups. The device includes a processor and a memory. The memory stores processor-executable instructions to perform the following operations: setting each peer of the management backup group to add multiple virtual router backup groups of different VLANs that the device has already joined to the management backup group; recording the information of each virtual router backup group and the device's state machine in the local member information table of the management backup group; and sending a management backup group announcement message carrying the local member information table to each peer of the management backup group according to the management message announcement period.
[0007] The beneficial effect of this application is that different virtual router backup groups are added to the backup group as member backup groups, and management backup group announcement messages are transmitted between peers. This reduces the large number of protocol announcement messages generated due to maintaining the state machines of multiple virtual router backup groups. The router device only needs to send one management backup group announcement message to announce the information of multiple virtual router backup groups and their state machines to other peers. Attached Figure Description
[0008] Figure 1 A flowchart illustrating an embodiment of the method for managing virtual router backup groups provided in this application;
[0009] Figure 2 A schematic diagram of the management backup group provided in the embodiments of this application;
[0010] Figure 3 This is a schematic diagram of an embodiment of a device for managing virtual router backup groups provided in this application. Detailed Implementation
[0011] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0012] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0013] Figure 1 The embodiments of the method for managing virtual router backup groups provided in this application, as shown, include:
[0014] Step 101: Configure each peer in the management backup group;
[0015] Step 102: Add the virtual router backup groups of different VLANs that this device has already joined to the management backup group;
[0016] Step 103: Record the information of each virtual router backup group and the state machine of this device in the local member information table that manages the backup group;
[0017] Step 104: Send a management backup group announcement message carrying the local member information table to each peer of the management backup group according to the management message announcement cycle.
[0018] Figure 1The beneficial effect of this embodiment is that different virtual router backup groups are added to the backup group as member backup groups, and management backup group announcement messages are transmitted between peers. This reduces the large number of protocol announcement messages generated due to maintaining the state machines of multiple virtual router backup groups. The router device only needs to send one management backup group announcement message to announce the information of multiple virtual router backup groups and their state machines to other peers.
[0019] Figure 2 This is a schematic diagram of a management backup group provided in an embodiment of this application; Router R1 sets up a management backup group 210, and the peer of the management backup group 210 is router R2; the priority of virtual router backup group 220 is set to high priority 101, and the priority of virtual router backup group 230 is set to low priority 100.
[0020] Router R2 is configured to manage backup group 210, and the peer of management backup group 210 is router R1; the priority of virtual router backup group 220 is set to low priority 120, and the priority of virtual router backup group 230 is set to high priority 121.
[0021] Figure 2 In backup group 210, there are peers R1 and R2; in virtual router backup group 220, router R1 is elected as the Master router; router R2 is the Backup router; in virtual router backup group 230, router R1 is elected as the Backup router; router R2 is the Master router.
[0022] Figure 2 In this scenario, when terminals T1 and T2 belong to VLAN 1, and terminal T3 belongs to VLAN 2, the default gateways for VLAN 1 and VLAN 2 are set to the virtual routers in virtual router backup group 220 and virtual router backup group 230, respectively. Routers R1 and R2 load balance the Layer 3 forwarding traffic of the two virtual router backup groups 220 and 230 for VLAN 1 and VLAN 2.
[0023] Routers R1 and R2 add the virtual router backup groups 220 and 230 that this device has already joined to the management backup group 210; and record the information of the virtual router backup groups 220 and 230 (such as VLAN identifier, backup group identifier, priority, and virtual IP address used as gateway IP address) and the status machine of this device in the member information table of the management backup group 210 locally.
[0024] Table 1-1 shows the local member information table recorded by router R1;
[0025] Virtual machine LAN logo Priority Virtual IP address state machine VLAN1 220 101 1.1.1.1 main equipment VLAN2 230 120 2.2.2.2 Equipment
[0026] Table 1-1
[0027] Table 2-1 is the local member information table recorded by router R2;
[0028] Virtual machine LAN logo Priority Virtual IP address state machine VLAN1 220 100 1.1.1.1 Equipment VLAN2 230 121 2.2.2.2 main equipment
[0029] Table 2-1
[0030] Routers R1 and R2 each send management backup group announcement messages carrying local member information tables to their peers in management backup group 210 according to the management message announcement cycle, and receive management backup group announcement messages sent by their peers.
[0031] In this way, routers R1 and R2, as peers in management backup group 210, send management backup group advertisement messages to each other, eliminating the need for each virtual router backup group to send its own protocol messages. Therefore, the more virtual router backup groups added to routers R1 and R2, the less the network bandwidth and CPU resources between routers R1 and R2 will be consumed by the newly added virtual router backup groups.
[0032] Figure 2 In this scenario, when a physical port of router R1 fails, router R1 identifies that the failed physical port is bound to a virtual router port of virtual router 220. Router R1 sets the state machine of the virtual router backup group 220 to which the failed virtual router port belongs, as shown in Table 1-2, to the initialization state.
[0033]
[0034]
[0035] Table 1-2
[0036] Router R1 sends a management backup group announcement message carrying the member information table in Table 1-2 to its peer router R2 in management backup group 210.
[0037] Router R2 receives a management backup group announcement message sent by peer router R1 of management backup group 210, identifies the virtual router backup group 220 corresponding to the initialization state in the received management backup group announcement message, searches the member information table shown in Table 2-1 to find that the local device state machine of the identified virtual router backup group 220 is in the standby device state, and modifies the found standby device state to the master device state, as shown in Table 2-2.
[0038] Virtual machine LAN logo Priority Virtual IP address state machine VLAN1 220 100 1.1.1.1 main equipment VLAN2 230 121 2.2.2.2 main equipment
[0039] Table 2-2
[0040] When the faulty physical port on router R1 recovers, the router port of the faulty virtual router 220 is also recovered. The state machine of the virtual router backup group 220 to which the recovered virtual router port belongs in Table 1-2 is changed from the initialization state to the recovery state, as shown in Table 1-3:
[0041] Virtual machine LAN logo Priority Virtual IP address state machine VLAN1 220 101 1.1.1.1 recover VLAN2 230 120 2.2.2.2 Equipment
[0042] Table 1-3
[0043] Router R1 sends a management backup group announcement message carrying member information table 1-3 to peer router R2 of management backup group 210, and also receives a management backup group announcement message carrying member information table 2-2 sent by peer router R2.
[0044] Router R2 receives a management backup group announcement message from router R1, identifies the virtual router backup group 220 corresponding to the recovery state in the received management backup group announcement message, searches for the local device state machine of the identified virtual router backup group as the master device state in the local member information table 2-2, and synchronizes the forwarding table entries of virtual router backup group 220 to router R1.
[0045] After receiving the forwarding table entry synchronized from router R2, router R1 will restore the backup device's state machine, as shown in Table 1-4.
[0046] Virtual machine LAN logo Priority Virtual IP address state machine VLAN1 220 101 1.1.1.1 Equipment VLAN2 230 120 2.2.2.2 Equipment
[0047] Table 1-4
[0048] In this way, routers R1 and R2 still send management backup group advertisement messages according to the advertisement cycle of management backup group 210, without having to send additional virtual router backup group protocol messages due to changes in the state machine of virtual router backup group 220, thus reducing the bandwidth and CPU resources occupied by routers in sending and receiving virtual router backup group protocol messages.
[0049] If the router port of virtual router backup group 230 of router R2 fails, send the member information table of local management backup group 210 shown in Table 1-5.
[0050] Virtual machine LAN logo Priority Virtual IP address state machine VLAN1 220 101 1.1.1.1 Equipment VLAN2 230 120 2.2.2.2 initialization
[0051] Table 1-5
[0052] Router R2 receives a management backup group announcement message from router R1 containing member information table 1-5, identifies the virtual router backup group 230 corresponding to the initialization state in the received management backup group announcement message; it searches in the local member information table 2-2 to find that the local device state machine of the identified virtual router backup group is the master device state, and does not modify the state machine in table 2-2.
[0053] After the router port of virtual router backup group 230 of router R1 is restored, the operation of router R1 and router R2 is the same as the above process, and will not be repeated.
[0054] Figure 3 This is a schematic diagram of an embodiment of a device for managing virtual router backup groups provided in this application. The device includes a processor and a memory; the memory is used to store processor-executable instructions to perform the following operations: setting each peer of the management backup group; adding multiple virtual router backup groups of different VLANs that the device has already joined to the management backup group; recording the information of each virtual router backup group and the device's state machine in the local member information table of the management backup group; and sending a management backup group announcement message carrying the local member information table to each peer of the management backup group according to the management message announcement period.
[0055] The processor also performs the following operations by running processor-executable instructions in memory: identifying the faulty virtual router port; setting the local state machine of the virtual router backup group to which the faulty virtual router port belongs in the local member information table to the initial state; and sending a management backup group announcement message carrying the local member information table to each peer of the management backup group.
[0056] The processor also performs the following operations by running processor-executable instructions in memory: identifying the recovery of a faulty virtual router port; setting the virtual router backup group to which the recovered virtual router port belongs from the initialization state to the recovery state; and sending a management backup group announcement message carrying the local member information table to each peer of the management backup group.
[0057] The processor also performs the following operations by running processor-executable instructions in memory: receiving management backup group announcement messages carrying member information tables sent by each peer of the management backup group; identifying the virtual router backup group corresponding to the initialization state in the received management backup group announcement message; searching for the local device state machine of the identified virtual router backup group in the local member information table; if the found local device state machine is a standby device state, modifying the found standby device state to a master device state.
[0058] The processor also performs the following operations by running processor-executable instructions in memory: receiving management backup group announcement messages carrying member information tables sent by each peer of the management backup group; identifying the virtual router backup group corresponding to the recovery state in the received management backup group announcement messages; searching for the local device state machine of the identified virtual router backup group in the local member information table; if the found local device state machine is the master device state, synchronizing the forwarding table entries of the identified virtual router backup group.
[0059] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for managing virtual router backup groups, characterized in that, The method includes: Configure and manage each peer in the backup group; Add the multiple virtual router backup groups that this device has already joined to different VLANs to the management backup group; Record the local member information table of the management backup group; wherein, the local member information table includes at least: information of each virtual router backup group and the state machine of this device; According to the management message notification cycle, a management backup group notification message carrying the local member information table is sent to each peer of the management backup group; Receive a management backup group announcement message carrying the member information table from each of the peers in the management backup group; Identify the virtual router backup group corresponding to the recovery status in the received management backup group announcement message; Search the local member information table for the local device state machine of the identified virtual router backup group; if the found local device state machine is the master device state, synchronize the forwarding table entries of the identified virtual router backup group.
2. The method according to claim 1, characterized in that, The method further includes: Identify faulty virtual router ports; Set the local device state machine of the virtual router backup group to which the faulty virtual router port in the local member information table belongs to the initialization state; Send a management backup group announcement message carrying the local member information table to each of the peers in the management backup group.
3. The method according to claim 1, characterized in that, The method further includes: Identify and restore faulty virtual router ports; Set the virtual router backup group to which the restored virtual router port belongs in the local member information table from the initialization state to the restored state; Send a management backup group announcement message carrying the local member information table to each of the peers in the management backup group.
4. The method according to claim 1, characterized in that, The method further includes: Receive a management backup group announcement message carrying the member information table from each of the peers in the management backup group; Identify the virtual router backup group corresponding to the initialization state in the received management backup group announcement message; Search the local member information table for the local device state machine of the identified virtual router backup group; if the found local device state machine is in standby device state, change the found standby device state to master device state.
5. A device for managing virtual router backup groups, characterized in that, The device includes a processor and a memory; the memory is used to store processor-executable instructions to perform the following operations: Configure and manage each peer in the backup group; Add the multiple virtual router backup groups that this device has already joined to different VLANs to the management backup group; Record the local member information table of the management backup group; wherein, the local member information table includes at least: information of each virtual router backup group and the state machine of this device; According to the management message notification cycle, a management backup group notification message carrying the local member information table is sent to each peer of the management backup group; Receive a management backup group announcement message carrying the member information table from each of the peers in the management backup group; Identify the virtual router backup group corresponding to the recovery status in the received management backup group announcement message; Search the local member information table for the local device state machine of the identified virtual router backup group; if the found local device state machine is the master device state, synchronize the forwarding table entries of the identified virtual router backup group.
6. The device according to claim 5, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Identify faulty virtual router ports; Set the local device state machine of the virtual router backup group to which the faulty virtual router port in the local member information table belongs to the initialization state; Send a management backup group announcement message carrying the local member information table to each of the peers in the management backup group.
7. The device according to claim 5, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Identify and restore faulty virtual router ports; Set the virtual router backup group to which the restored virtual router port belongs in the local member information table from the initialization state to the restored state; Send a management backup group announcement message carrying the local member information table to each of the peers in the management backup group.
8. The device according to claim 5, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Receive a management backup group announcement message carrying the member information table from each of the peers in the management backup group; Identify the virtual router backup group corresponding to the initialization state in the received management backup group announcement message; Search the local member information table for the local device state machine of the identified virtual router backup group; if the found local device state machine is in standby device state, change the found standby device state to master device state.