Traffic data forwarding method, system, electronic device and computer storage medium

By receiving ARP packets from multiple routers in the VRRP group and generating an ECMP group, the problem of bandwidth waste in the VRRP group is solved, load balancing traffic forwarding is realized, and bandwidth utilization and service forwarding capabilities are improved.

WO2024230201A1PCT designated stage expired Publication Date: 2024-11-14ZTE CORP

Patent Information

Application Number
PCT/CN2023/143505
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-08
Filing Date
2023-12-29
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

Since there has always been one router in the VRRP group, resulting in bandwidth waste, it is difficult for the existing technology to achieve load balancing.

Method used

By receiving ARP messages sent by multiple routers in the VRRP group, an ECMP group is generated, and the target traffic data is distributed to multiple routers according to the virtual MAC address, load balancing is achieved.

Benefits of technology

It effectively avoids the waste of router bandwidth in VRRP groups, improves the bandwidth utilization rate and service traffic forwarding capabilities of VRRP network networks, and realizes the load balancing forwarding of routers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023143505_14112024_PF_FP_ABST
    Figure CN2023143505_14112024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a traffic data forwarding method, a system, an electronic device and a computer storage medium. The traffic data forwarding method comprises: receiving ARP messages sent by a plurality of routers in a VRRP group, and generating an ECMP group according to all of the ARP messages, each ARP message comprising a virtual MAC address corresponding to the router sending the ARP message, the routers being in one-to-one correspondence with the virtual MAC addresses, and the virtual MAC addresses corresponding to the routers being different; and sending target traffic data by means of the ECMP group, the target traffic data being traffic data of a destination address pointing to a virtual IP address of the VRRP group.
Need to check novelty before this filing date? Find Prior Art

Description

Traffic data forwarding method, system, electronic device and computer storage medium

[0001] Related applications

[0002] This application claims priority to Chinese patent application No. 202310517530.2 filed on May 8, 2023, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the technical field of switches, and in particular to a flow data forwarding method, system, electronic device, and computer storage medium. Background Art

[0004] VRRP (Virtual Router Redundancy Protocol) is a routing fault-tolerant protocol, also known as a backup routing protocol. All hosts within a local area network (LAN) are configured with a default route. When a host sends a message to a destination outside the local network segment, the message is sent to an external router via the default route, enabling communication between the host and the external network. If the default router port is disabled, internal hosts will be unable to communicate with the outside world. If VRRP is configured on a router, the virtual router will activate the backup router, enabling network-wide communication.

[0005] However, due to VRRP's forwarding logic, one of the two routers in the VRRP group is always in working state, while the other is in backup state. This results in services being forwarded from only one of the two routers in the VRRP group, and the bandwidth of the other router is wasted due to no data traffic.

[0006] Summary of the Invention

[0007] The main purpose of this application is to provide a traffic data forwarding method, system, electronic device and computer storage medium, aiming to solve the technical problem of how to achieve load balancing of VRRP groups and avoid the waste of router bandwidth in VRRP groups.

[0008] To achieve the above objectives, the present application provides a traffic data forwarding method, which is applied to a network device and includes:

[0009] Receive ARP messages sent by multiple routers in a VRRP group, and generate an ECMP group based on all the ARP messages, wherein the ARP messages include a virtual MAC address corresponding to the router sending the ARP message, each router has a one-to-one correspondence with the virtual MAC address, and the virtual MAC address corresponding to each router is different;

[0010] Target traffic data is sent through the ECMP group, where the target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

[0011] Furthermore, to achieve the above objectives, the present application provides a traffic data forwarding method, which is applied to a VRRP group and includes:

[0012] Constructing an ARP message corresponding to each router in the VRRP group according to the virtual MAC address corresponding to each router, wherein each router corresponds to a virtual MAC address one-to-one, and the virtual MAC address corresponding to each router is different;

[0013] All the ARP messages are sent to each network device, so that the network device can build an ECMP group based on all the received ARP messages, and send target traffic data based on the ECMP group, where the target traffic data is traffic data with a destination address pointing to the virtual IP address of the VRRP group.

[0014] In addition, to achieve the above objectives, the present application provides a traffic data forwarding system, including:

[0015] The VRRP group is configured to construct an ARP message corresponding to each router in the VRRP group based on the virtual MAC address corresponding to each router, wherein each router has a one-to-one correspondence with the virtual MAC address and the virtual MAC address corresponding to each router is different; and send all the ARP messages to each network device;

[0016] The network device is configured to receive ARP packets sent by multiple routers in a VRRP group, generate an ECMP group based on all the ARP packets, and send target traffic data through the ECMP group, where the target traffic data is traffic data with a destination address pointing to the virtual IP address of the VRRP group.

[0017] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a traffic data forwarding program stored on the above-mentioned memory and runnable on the above-mentioned processor. When the above-mentioned traffic data forwarding program is executed by the above-mentioned processor, the steps of the above-mentioned traffic data forwarding method are implemented.

[0018] In addition, to achieve the above-mentioned purpose, the present application also provides a computer storage medium, on which a traffic data forwarding program is stored. When the traffic data forwarding program is executed by a processor, the steps of the traffic data forwarding method as described above are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] FIG1 is a flow chart of a first embodiment of a method for forwarding traffic data according to the present invention;

[0020] FIG2 is a schematic diagram of a scenario of VRRP load balancing;

[0021] FIG3 is a schematic diagram of a scenario of the traffic data forwarding method of the present application;

[0022] FIG4 is a flow chart of a second embodiment of the method for forwarding traffic data of the present application;

[0023] FIG5 is a flow chart of a third embodiment of the method for forwarding traffic data of the present application;

[0024] FIG6 is a flow chart of a fourth embodiment of the method for forwarding traffic data of the present application;

[0025] FIG7 is a schematic diagram of the architecture of the traffic data forwarding system of the present application;

[0026] FIG8 is a schematic diagram of the device structure of the hardware operating environment involved in the traffic data forwarding method of the present application.

[0027] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0028] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0029] The traffic data forwarding method in the embodiments of the present application is applied to switches and routers and can be implemented during VRRP (Virtual Router Redundancy Protocol) networking. This allows the VRRP gateway to not only provide active / standby protection but also implement ECMP (Equal Cost Multi Path) traffic diversion, which is more efficient and effective than current ECMP traffic diversion. It can also improve the bandwidth utilization of VRRP networks, enhance the service traffic forwarding capabilities of switches, routers, and other products in VRRP networks, and enhance the networking and operational capabilities of the devices.

[0030] Moreover, the traffic data forwarding method in the embodiment of the present application only needs to perform special analysis and processing on the ARP message of VRRP in the ARP (Address Resolution Protocol) host route generation link, form different ARP messages of the same virtual IP into an ECMP group, and point the host route to the ECMP group. At the same time, all subnet routes with this host route as the next hop are pointed to this ECMP group, thereby completing the load balancing processing of the VRRP group.

[0031] 1 , the present application provides a traffic data forwarding method, which is applied to a network device, the network device being a downlink device connected to a VRRP group. In a first embodiment of the traffic data forwarding method, the traffic data forwarding method includes:

[0032] Step S10: Receive ARP messages sent by multiple routers in the VRRP group, and generate an ECMP group based on all ARP messages, wherein the ARP message includes the virtual MAC address corresponding to the router sending the ARP message, each router has a one-to-one correspondence with the virtual MAC address, and the virtual MAC address corresponding to each router is different;

[0033] Step S20: sending target traffic data through the ECMP group, where the target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

[0034] Because the current VRRP forwarding logic can lead to bandwidth waste on routers in a VRRP group, it is possible to use multiple routers with different virtual MAC addresses in the VRRP group to send ARP packets to different downstream devices. This allows each downstream device to receive ARP packets from every router in the VRRP group. Instead of adopting the overwriting principle, an ECMP group is generated based on the received ARP packets. Target traffic with a destination address pointing to the VRRP group is sent to a router in the VRRP group through the ECMP group, thus achieving a certain load balancing effect.

[0035] For example, as shown in Figure 2, a VRRP group is connected to downstream devices C and D, and router E is connected to downstream devices C and D, respectively. The VRRP group includes routers A and B, and the VRRP group's virtual IP address is 10.1.1.1. Router A's virtual MAC (network card address) is 00:00:5E:00:00:01. Router B's virtual MAC address is 00:00:5E:00:00:01. The VRRP group's primary and backup routers (i.e., routers A and B) send their virtual MAC addresses to downstream devices C and D, respectively. Downlink devices C and D then establish ARP host routes pointing to the two virtual routers.

[0036] However, this processing method still sends traffic to a VRRP device for downstream devices, which is not a good load balancing method and cannot perform hash balancing calculations on the traffic. Therefore, in this embodiment, a more optimal VRRP load balancing processing method is adopted. Not only can both routers in the VRRP group share and forward traffic, but the traffic of downstream devices can also be shared through a more optimized ECMP mode, rather than statically using a router in the VRRP group as the load balancing outlet. This allows traffic to pass through the VRRP group routers in a more optimized manner in the VRRP network. It can also improve the service traffic forwarding capabilities of products such as switches and routers in VRRP networks, improving the networking and application capabilities of the devices.

[0037] Furthermore, in this embodiment, if there are two devices (such as routers) in a VRRP group, the two devices in the VRRP group each generate a virtual MAC address and notify the downstream devices of the two virtual MAC addresses. Upon receiving two different MAC addresses, if the host route of the downstream device determines that they are the virtual MAC addresses of the VRRP group, an ECMP group is generated to store the two different virtual MAC addresses. The host route pointing to the virtual IP address of the VRRP group is directly directed to this ECMP group, and all subnet routes pointing to the host route of this virtual IP address are also directed to this ECMP group, thereby achieving a true load balancing effect. That is, in this embodiment, upon receiving ARP packets sent by multiple routers in the VRRP group, an ECMP group is formed on each downstream device for the downstream device to forward the acquired traffic data.

[0038] In one embodiment, for step S10, ARP messages sent by multiple routers in the VRRP group are received, and an ECMP group is generated based on all ARP messages, wherein the ARP message includes a virtual MAC address corresponding to the router sending the ARP message, each router has a one-to-one correspondence with the virtual MAC address, and the virtual MAC address corresponding to each router is different.

[0039] In this embodiment, the traffic data forwarding method can be applied to network devices, which may include downstream devices such as network hosts. Furthermore, in this embodiment, multiple network devices can be connected to at least one VRRP group. Each network device performs the same operation, such as generating an ECMP group based on ARP packets received from multiple routers in the VRRP group. This embodiment uses only one network device as an example.

[0040] In one embodiment, when a network device receives multiple ARP messages, such as two ARP messages, it will identify the ARP messages to determine whether they are ARP messages sent by a router in a VRRP group. If so, a corresponding ECMP group will be established. In addition, the ARP message sent by the VRRP group router includes the virtual MAC address corresponding to the router sending the ARP message. The virtual MAC is a special field (such as 00:00:5E:00:XX:XX). Therefore, when the network device recognizes that the ARP message contains this special field, it can determine that it is an ARP message sent by a router in the VRRP group. In one embodiment, each router in the VRRP group has a one-to-one correspondence with a virtual MAC address, and the virtual MAC address corresponding to each router is different. Therefore, the network device can determine the router in the VRRP group that sent the ARP message based on the virtual MAC address in the ARP message.

[0041] In one embodiment, when a network device receives ARP messages sent by multiple routers in a VRRP group, it does not perform an ARP message overwriting operation, but builds an ECMP group based on all ARP messages. The ECMP group is used to store the virtual MAC address in each ARP message.

[0042] In one embodiment, for step S20, target traffic data is sent through the ECMP group, where the target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

[0043] After the ECMP group is built in the network device, the target traffic data can be sent through the ECMP group in the network device, so that the target traffic data can be forwarded by ECMP load balancing through multiple routers in the VRRP group.

[0044] In addition, to help understand the VRRP load balancing implementation principle in this embodiment, an example is given below.

[0045] For example, as shown in Figure 3, a VRRP group is connected to downstream devices C and D, and router E is connected to downstream devices C and D, respectively. The VRRP group includes routers A and B, and the VRRP group's virtual IP address is 10.1.1.1. Router A's virtual MAC address is 00:00:5E:00:00:01. Router B's virtual MAC address is 00:00:5E:00:00:02. Therefore, an ARP message for the VRRP group can be generated. In one embodiment, routers A and B form a VRRP group with a VRRP group virtual IP address of 10.1.1.1. The VRRP group generates two virtual MAC addresses, 00:00:5E:00:00:01 and 00:00:5E:00:00:02, which are sent from routers A and B to downstream devices C and D, respectively. Downlink devices C and D each receive two ARP packets with the IP address 10.1.1.1 and virtual MAC addresses 00:00:5E:00:00:01 and 00:00:5E:00:00:02, respectively. An ECMP group is then generated in each downstream device (e.g., downstream devices C and D). Each downstream device determines that the MAC address carried in the ARP packet is a VRRP virtual MAC address, and that the same virtual IP address receives two different VRRP virtual MAC addresses. The downstream device then combines these two different VRRP virtual MAC addresses and the ports on which they were received into two different next hops. These two different next hops are formed into an ECMP group, and the ARP entry formed by these virtual IP addresses points the virtual IP address egress to this ECMP group. Downlink device-associated routing processing is then performed. That is, if all downstream devices have a subnet route with the virtual IP address 10.1.1.1 as their next hop and find that the host route egress for 10.1.1.1 is an ECMP group, the egress of this subnet route will be modified to this ECMP group. All traffic forwarded by the virtual IP address 10.1.1.1 and the host route egress for all downstream devices will be load balanced through this ECMP group.

[0046] Furthermore, in this embodiment, the VRRP group simultaneously sends ARP packets to the downstream devices. These devices receive two ARP packets from the virtual IP address 10.1.1.1, each carrying a different virtual MAC address. Downstream devices C and D recognize the ARP packets as coming from the VRRP group and generate an ECMP group as the next hop for the host route 10.1.1.1, whose members are the two egress nexthops, pointing to routers A and B, respectively. When forwarding traffic, the corresponding traffic forwarding path is Router E, the downstream device (downstream device C or D), and then Router A or B.

[0047] In this embodiment, an ECMP group is constructed on the network device side based on all received ARP packets, and target traffic data is sent through the ECMP group. Each router has a one-to-one correspondence with a virtual MAC address, and each router corresponds to a different virtual MAC address. This allows multiple routers in a VRRP group to share and forward traffic. Furthermore, the target traffic data is distributed across a more optimized ECMP group, flowing to each router in the VRRP group. This achieves true load balancing for the VRRP group, avoids bandwidth waste among routers in the VRRP group, and improves bandwidth utilization.

[0048] Based on the first embodiment of the present application, a second embodiment of the traffic data forwarding method of the present application is proposed. In this embodiment, referring to FIG. 4 , step S10 generates an ECMP group based on all ARP packets, including:

[0049] Step a: When it is determined that there are at least two ARP messages, determine the virtual MAC address corresponding to the router that sends each ARP message, and determine the next hop information corresponding to the port that receives each ARP message;

[0050] In step b, an ECMP group is generated based on the port correspondence information of all ARP messages, where the port correspondence information of all ARP messages includes the correspondence between the virtual MAC address corresponding to the router sending each ARP message and the next hop information corresponding to the port receiving each ARP message.

[0051] In this embodiment, when a network device determines that two VRRP groups have sent ARP messages, since the ARP messages include the virtual MAC address corresponding to the router that sent the ARP message, it is necessary to determine the virtual MAC address corresponding to the router that sent each ARP message, as well as the next hop information corresponding to the port that received each ARP message. Based on this, the network device determines the corresponding relationship between the two, namely the port correspondence relationship, and then generates an ECMP group based on the port correspondence relationship of all ARP messages.

[0052] In one embodiment, if two ARP messages exist, these two ARP messages are processed, and two egress nexthops can be formed based on the egress information therein. These two egress information are then combined to form an ECMP group, and the host route is then directly directed to the ECMP group. In one embodiment, if the network device's chip directly supports directing host routes to the ECMP group, the host route formed by the ARP message can be directly directed to the ECMP group containing two different virtual MAC addresses. In one embodiment, if the network device's chip does not support directing host routes to the ECMP group, the host route can be written into the subnet routing table as a 24-bit mask subnet route, and the subnet route corresponding to the subnet routing table can be directed to the ECMP group. Alternatively, an ACL (Access Control List) entry can be directly used to match the host route, and its egress can be directed to the ECMP group. In one embodiment, an access control list can be constructed based on the host route; all route entries in the access control list are matched with the ECMP group to obtain a target route entry that matches the ECMP group, and the egress corresponding to the target route entry can be set to point to the ECMP group.

[0053] In one embodiment, other subnet routes pointing to this host route can also find the corresponding ECMP group through this host route and point to this ECMP group. This allows all data that needs to pass through the VRRP group routers to be forwarded to the ECMP group. That is, all traffic data can be load-balanced and forwarded by all routers in the VRRP group (e.g., two routers). At the same time, the VRRP group protocol behavior is not disrupted. Therefore, the VRRP group in this embodiment has the ability to provide active / standby switchover protection.

[0054] In this embodiment, when it is determined that there are at least two ARP messages, the port correspondence information of all ARP messages is determined based on the virtual MAC address corresponding to the router sending each ARP message and the next hop information corresponding to the port receiving each ARP message. This allows an ECMP group to be generated based on this port correspondence information. This ensures the validity of the generated ECMP group.

[0055] In one embodiment, sending target traffic data through an ECMP group includes:

[0056] Step c: when at least one router in the VRRP group fails, the egress corresponding to the at least one router in the ECMP group is invalidated, and target traffic data is forwarded according to the valid egress in the ECMP group.

[0057] In this embodiment, if at least one router in a VRRP group fails, such as the primary router, and a switchover occurs to the backup router, meaning that one of the egresses in the ECMP group fails, then the network device can simply disable one of the egresses in the ECMP group. Specifically, if the network device detects the failure of at least one router in the VRRP group as announced by the VRRP group, it can first determine the egress corresponding to the at least one failed router and disable the identified egress in the ECMP group. However, this does not affect the remaining active egresses in the ECMP group, which can continue to forward target traffic.

[0058] In this embodiment, when at least one router in the VRRP group fails, the exit corresponding to at least one router in the ECMP group is invalidated, and the target traffic data is forwarded according to the valid exit in the ECMP group, thereby ensuring the normal forwarding of the target traffic data.

[0059] In one embodiment, sending target traffic data through an ECMP group includes:

[0060] Step d: When at least one router in the VRRP group recovers information, the egress corresponding to the at least one router in the ECMP group is restored, and target traffic data is sent through the ECMP group.

[0061] In this embodiment, if a router in a VRRP group previously failed and has now recovered, recovery information for at least one router in the VRRP group will be sent to each network device. Upon receiving this recovery information, the network device will select at least one of the previously failed exits corresponding to the router for recovery. Specifically, the exit corresponding to the recovered router will be restored. Target traffic data will then be forwarded based on the restored exit and the valid exits in the ECMP group. For example, if the master router in the VRRP group previously failed and is now back online, the VRRP group will send this master router recovery information to the network device, which will then restore the exit corresponding to the master router in the ECMP group, making it valid and allowing load-balanced forwarding of the target traffic data to continue.

[0062] In one embodiment, the master and backup routers in a VRRP group can perform a master-backup switchover process to provide master-backup protection for the routers in the VRRP group. For example, as shown in Figure 3, if a device or link failure occurs in the VRRP group, a master-backup switchover occurs, with VRRP master router A switching to backup router B. The ARP entry (i.e., ARP message) for master router A in the VRRP group is revoked, and downstream devices C and D are de-linked from their next-hop egress to router A, removing these invalid egresses from the ECMP group. If the failure is resolved and router A comes back online, the corresponding ARP messages are resent to downstream devices C and D, and the ECMP group egresses of downstream devices C and D are re-enabled to the next-hop egress of router A, resuming load-balanced forwarding. This completes the process of generating an ARP entry pointing to the ECMP group using the VRRP virtual IP address. This allows all data packets that use this virtual IP address as the next hop and the routers destined for this virtual IP address to be load-balanced forwarded by downstream devices C and D using ECMP hash calculations.

[0063] In this embodiment, when at least one router in the VRRP group recovers information, the egress corresponding to the at least one router in the ECMP group is recovered, and then the target traffic data is forwarded, thereby continuing to achieve the load balancing effect of the VRRP group.

[0064] In one embodiment, referring to FIG. 5 , the present application provides a traffic data forwarding method, which is applied to a VRRP group. In a third embodiment of the traffic data forwarding method, the traffic data forwarding method includes:

[0065] Step S100: constructing an ARP message corresponding to each router according to the virtual MAC address corresponding to each router in the VRRP group, wherein each router corresponds to a virtual MAC address one-to-one, and the virtual MAC address corresponding to each router is different;

[0066] In step S200, all ARP messages are sent to each network device, so that the network device can build an ECMP group based on all received ARP messages and send target traffic data based on the ECMP group. The target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

[0067] In this embodiment, the VRRP group's virtual IP address remains unchanged. However, when using ARP for the virtual IP address, all ARP messages (including ARP entries) are sent to network devices connected to the VRRP group. For example, two different ARP entries are sent. These two different ARP entries contain the virtual MAC addresses of the VRRP group's primary and backup routers. Furthermore, because the VRRP group's virtual MAC address contains a special field (e.g., 00:00:5E:00:XX:XX), ARP messages sent by the VRRP group to network devices are easily recognized by the network devices.

[0068] Furthermore, the VRRP group in this embodiment may be the VRRP group in the first embodiment or the second embodiment.

[0069] In one embodiment, for step S100, an ARP message corresponding to each router is constructed based on the virtual MAC address corresponding to each router in the VRRP group, wherein each router has a one-to-one correspondence with the virtual MAC address, and the virtual MAC address corresponding to each router is different;

[0070] In this embodiment, multiple routers forming a VRRP group are identified, with only two routers being used as an example. A virtual IP address for the VRRP group is also determined. A virtual MAC address corresponding to each router is generated through VRRP. Each router corresponds to a virtual MAC address, and the virtual MAC addresses corresponding to each router are different. An ARP entry is constructed based on the virtual MAC address and sent to the network device in the form of a message. In other words, the ARP message includes an ARP entry. The ARP entry includes a virtual MAC address. Therefore, an ARP entry corresponding to each router can be constructed, and an ARP message can be determined based on the ARP entry. The virtual MAC address contained in the ARP message corresponding to each router is different.

[0071] In one embodiment, for step S200, all ARP messages are sent to each network device, so that the network device builds an ECMP group based on all received ARP messages and sends target traffic data based on the ECMP group, where the target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

[0072] In this embodiment, after constructing an ARP message corresponding to a router in a VRRP group, it is sent to each network device. Each network device performs the same operations, such as establishing an ECMP group. Specifically, the network device receives ARP messages from multiple routers in the VRRP group, creates an ECMP group based on all ARP messages, and then sends target traffic data through the ECMP group. Target traffic data is traffic data whose destination address points to the VRRP group's virtual IP address.

[0073] In this embodiment, an ARP message is constructed on the VRRP group side based on the virtual MAC address corresponding to each router in the VRRP group and sent to each network device. This allows the network device to construct an ECMP group based on all received ARP messages and send the target traffic data through the ECMP group. Each router has a one-to-one correspondence with a virtual MAC address, and each router has a different virtual MAC address. This allows multiple routers in the VRRP group to share and forward traffic, and allows the target traffic data to be shared across a more optimized ECMP group and distributed to each router in the VRRP group. This achieves true load balancing for the VRRP group, avoids bandwidth waste among routers in the VRRP group, and improves bandwidth utilization among routers in the VRRP group.

[0074] In one embodiment, based on the third embodiment of the present application, a fourth embodiment of the traffic data forwarding method of the present application is proposed. In this embodiment, referring to FIG6 , the above step S200, after sending all ARP packets to each network device, includes:

[0075] Step e: When it is determined that there is at least one faulty router in the VRRP group, at least one router failure message is sent to each network device, wherein the network device performs failure processing on the egress corresponding to the at least one router in the ECMP group according to the at least one router failure message.

[0076] In this embodiment, if at least one failed router in a VRRP group exists, corresponding router failure information is generated and sent to each network device. For example, if the primary router in a VRRP group fails, the primary router is switched to a backup router, and the corresponding failure information is sent to each network device connected to the VRRP group. Upon receiving the at least one router failure information, the network device will disable the outlet corresponding to the at least one router in the ECMP group and forward the target traffic data based on the valid outlets in the ECMP group.

[0077] In this embodiment, when it is determined that there is at least one faulty router in the VRRP group, at least one router failure information is sent to each network device. The network device can perform failure processing on the outlet corresponding to at least one router in the ECMP group based on the at least one router failure information, thereby ensuring the normal forwarding of the target traffic data.

[0078] In one embodiment, after all ARP packets are sent to each network device, the following steps are included:

[0079] Step f: When it is determined that at least one failed router in the VRRP group has been restored, at least one router restoration information is sent to each network device, wherein the network device restores the egress corresponding to the at least one router in the ECMP group according to the at least one router restoration information.

[0080] In this embodiment, if a router in a VRRP group previously failed and then recovered, a corresponding router recovery message is generated. This at least one piece of router recovery information is then sent to each network device connected to the VRRP group. For example, if the master router in a VRRP group previously failed and now comes back online, a corresponding router recovery message is generated and sent to all network devices connected to the VRRP group. Upon receiving the at least one router recovery message from the VRRP group, the network device restores the egress corresponding to the at least one router in the ECMP group and forwards the target traffic data through the active egress in the ECMP group.

[0081] In this embodiment, when it is determined that at least one failed route in the VRRP group has been restored, at least one router restoration information is sent to each network device so that the network device restores the egress corresponding to the at least one router in the ECMP group, thereby continuing to achieve the load balancing effect of the VRRP group.

[0082] In addition, referring to FIG7 , the present application provides a traffic data forwarding system, the traffic data forwarding system including:

[0083] The VRRP group is configured to construct an ARP message corresponding to each router in the VRRP group based on the virtual MAC address corresponding to each router, where each router has a one-to-one correspondence with a virtual MAC address, and the virtual MAC address corresponding to each router is different; and all ARP messages are sent to each network device;

[0084] The network device is configured to receive ARP packets sent by multiple routers in the VRRP group, generate an ECMP group based on all ARP packets, and send target traffic data through the ECMP group, where the target traffic data is traffic data with a destination address pointing to the virtual IP address of the VRRP group.

[0085] In one embodiment, the network device is further configured to, when determining that there are at least two ARP messages, determine a virtual MAC address corresponding to a router that sends each ARP message, and determine next hop information corresponding to a port that receives each ARP message;

[0086] An ECMP group is generated based on the port correspondence information of all ARP messages. The port correspondence information of all ARP messages includes the correspondence between the virtual MAC address corresponding to the router that sends each ARP message and the next hop information corresponding to the port that receives each ARP message.

[0087] In one embodiment, the network device is further configured to, when at least one router in the VRRP group fails, fail the exit corresponding to at least one router in the ECMP group, and forward the target traffic data according to the exit in the ECMP group that is in a valid state.

[0088] In one embodiment, the network device is further configured to restore the egress corresponding to the at least one router in the ECMP group and send the target traffic data through the ECMP group when at least one router in the VRRP group recovers information.

[0089] In one embodiment, the VRRP group is further configured to send at least one router failure message to each network device when it is determined that there is at least one failed router in the VRRP group, wherein the network device performs failure processing on the exit corresponding to the at least one router in the ECMP group based on the at least one router failure message.

[0090] In one embodiment, the VRRP group is further configured to send at least one router recovery message to each network device when it is determined that at least one failed router in the VRRP group has recovered, wherein the network device recovers the exit corresponding to the at least one router in the ECMP group based on the at least one router recovery message.

[0091] The specific implementation of the traffic data forwarding system of the present application is basically the same as the embodiments of the above-mentioned traffic data forwarding method, and will not be repeated here.

[0092] In addition, the present application also provides an electronic device, which includes a memory, a processor, and a traffic data forwarding program stored in the memory and runnable on the processor. When the traffic data forwarding program is executed by the processor, the steps of the traffic data forwarding method described above are implemented.

[0093] In addition, in one embodiment, FIG8 is a schematic diagram of the structure of an electronic device according to one embodiment of the present application. As shown in FIG8 , at the hardware level, the electronic device includes a processor, an internal bus, a network interface, and a memory. The memory may include internal memory, such as high-speed random-access memory (RAM), and may also include non-volatile memory, such as at least one disk storage device. Of course, the electronic device may also include hardware required for other services. The processor, network interface, and memory may be interconnected via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of illustration, FIG8 only uses a single bidirectional arrow, but this does not mean that there is only one bus or one type of bus. The memory is used to store programs. In one embodiment, the program may include program code, which includes computer operating instructions. The processor reads the corresponding computer program from the non-volatile memory and then runs it in the memory, forming a shared resource access control device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the steps of the above-mentioned traffic data forwarding method.

[0094] The specific implementation of the electronic device of the present application is basically the same as the embodiments of the above-mentioned traffic data forwarding method, and will not be repeated here.

[0095] In addition, to achieve the above-mentioned purpose, the present application also provides a computer storage medium, including a computer-readable storage medium, on which a traffic data forwarding program is stored. When the traffic data forwarding program is executed by the processor, the steps of the traffic data forwarding method as described above are implemented.

[0096] The specific implementation of the computer-readable storage medium of the present application is basically the same as the embodiments of the above-mentioned traffic data forwarding method, and will not be repeated here.

[0097] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer-readable storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0098] The above are merely optional embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A flow data forwarding method, applied to a network device, include: Receiving ARP messages sent by multiple routers in a VRRP group, and generating an ECMP group according to all the ARP messages, wherein the ARP message includes a virtual MAC address corresponding to the router that sends the ARP message, each router has a one-to-one correspondence with the virtual MAC address, and the virtual MAC address corresponding to each router is different; The target flow data is sent through the ECMP group, where the target flow data is flow data whose destination address points to the virtual IP address of the VRRP group.

2. The flow data forwarding method according to claim 1, in, Generating an ECMP group according to all the ARP messages includes: When it is determined that there are at least two ARP messages, determine a virtual MAC address corresponding to a router that sends each of the ARP messages, and determine next hop information corresponding to a port that receives each of the ARP messages; An ECMP group is generated according to the port correspondence information of all the ARP messages, wherein the port correspondence information of all the ARP messages includes a correspondence between a virtual MAC address corresponding to a router sending each of the ARP messages and next hop information corresponding to a port receiving each of the ARP messages.

3. The flow data forwarding method according to claim 1, in, The sending of target traffic data through the ECMP group includes: In the case of failure information of at least one router in the VRRP group, the egress corresponding to the at least one router in the ECMP group is failed, and the target flow data is forwarded according to the egress in the ECMP group that is in a valid state.

4. The flow data forwarding method according to claim 3, in, The sending of target traffic data through the ECMP group includes: When at least one router in the VRRP group recovers information, the export corresponding to the at least one router in the ECMP group is recovered, and the Send target traffic data.

5. A flow data forwarding method, applied to a VRRP group, include: According to the virtual MAC address corresponding to each router in the VRRP group, construct an ARP message corresponding to each router, wherein each router corresponds to a virtual MAC address one-to-one, and the virtual MAC address corresponding to each router is different; All the ARP messages are sent to each network device, so that the network device builds an ECMP group according to all the received ARP messages, and sends target traffic data according to the ECMP group, wherein the target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

6. The flow data forwarding method according to claim 5, in, After sending all the ARP messages to each network device, the method includes: When it is determined that there is at least one faulty route in the VRRP group, at least one router failure information is sent to each of the network devices, wherein the network device performs failure processing on an exit corresponding to at least one router in the ECMP group according to the at least one router failure information.

7. The flow data forwarding method according to claim 6, in, After sending all the ARP messages to each network device, the method includes: When it is determined that at least one failed route in the VRRP group is restored, at least one router recovery information is sent to each of the network devices, wherein the network device restores the egress corresponding to at least one router in the ECMP group according to the at least one router recovery information.

8. A flow data forwarding system, in, The traffic data forwarding system comprises: The VRRP group is configured to construct an ARP message corresponding to each router in the VRRP group according to the virtual MAC address corresponding to each router, wherein each router corresponds to a virtual MAC address one by one, and the virtual MAC address corresponding to each router is different; and send all the ARP messages to each network device; The network device is configured to receive ARP messages sent by multiple routers in a VRRP group, generate an ECMP group according to all the ARP messages, and send target flow data through the ECMP group, wherein the target flow data is flow data whose destination address points to the virtual IP address of the VRRP group.

9. An electronic device, in, The electronic device comprises: a memory, a processor, and a traffic data forwarding program stored in the memory and executable on the processor, wherein the traffic data forwarding program implements the steps of the traffic data forwarding method as claimed in any one of claims 1 to 7 when executed by the processor.

10. A computer storage medium, in, The computer storage medium stores a flow data forwarding program, and when the flow data forwarding program is executed by the processor, the steps of the flow data forwarding method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method for realizing equal cost multipath of IP route and device

    CN101572667A

  • Method, device and switch for flooding route

    CN101888344A

  • VRRP (Virtual Router Redundancy Protocol) router switching method, router, VRRP master-standby switching system and storage medium

    CN107911291A

  • Equivalent multipath ECMP switching method, network equipment and system

    CN111092813A

  • Method and device for realizing dynamic ECMP load rebalance, electronic equipment and storage medium

    CN116055405A

Cited By

  • Network interface card testing method and device

    CN121000648A

  • Equal-cost multi-path (ECMP) operations

    US20260342717A1