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

By assigning a unique virtual MAC address to each router in the VRRP group and building an ECMP group, the problem of wasted router bandwidth in the VRRP group is solved, load balancing forwarding of multiple routers is achieved, and bandwidth utilization is improved.

CN118921320APending Publication Date: 2024-11-08ZTE CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310517530.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-08
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The wasted bandwidth of routers in VRRP groups results in services being forwarded only from one router, while the bandwidth of the other router is wasted.

Method used

By assigning a unique virtual MAC address to each router in the VRRP group, an ECMP group is constructed, and an ECMP group is generated on the network device side to achieve load-balanced forwarding of traffic data.

Benefits of technology

This enables traffic sharing and forwarding among multiple routers in a VRRP group, avoiding bandwidth waste and improving bandwidth utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921320A_ABST
    Figure CN118921320A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic data forwarding method and system, electronic equipment and a computer storage medium, and the traffic data forwarding method comprises the steps: receiving ARP messages sent by a plurality of routers in a VRRP group, generating an ECMP group according to all ARP messages, the ARP messages comprising virtual MAC addresses corresponding to the routers sending the ARP messages, and the ECMP group comprising virtual MAC addresses corresponding to the routers sending the ARP messages; the routers are in one-to-one correspondence with the virtual MAC addresses, and the virtual MAC addresses corresponding to the routers are different; and sending target traffic data through the ECMP group, wherein the target traffic data is traffic data of which the destination address points to the virtual IP address of the VRRP group. According to the method and the device, the load balancing of the VRRP group is realized, and the phenomenon of bandwidth waste of routers in the VRRP group is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Generally speaking, VRRP (Virtual Router Redundancy Protocol) is a routing fault-tolerant protocol, also known as a backup routing protocol. All hosts in a local area network are set up with a default route. When the destination address sent by the host in the network is not in the local network segment, the message will be sent to the external router through the default route, thereby realizing the communication between the host and the external network. When the default router port is closed, the internal host will not be able to communicate with the outside world. If the router is set up with VRRP, then at this time, the virtual router will enable the backup router to realize the communication of the entire network.

[0003] However, due to the forwarding logic of VRRP, one of the two routers in the VRRP group is always in working state, while the other is in backup state. As a result, the service can only be forwarded from one of the two routers in the VRRP group, and the bandwidth of the other router is wasted due to no data traffic. Summary of the invention

[0004] The main purpose of the present invention is to provide a flow 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 phenomenon of router bandwidth waste in VRRP groups.

[0005] To achieve the above purpose, the present application provides a flow data forwarding method, which is applied to a network device and includes:

[0006] 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;

[0007] 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.

[0008] In addition, to achieve the above purpose, the present application provides a traffic data forwarding method, which is applied to a VRRP group, including:

[0009] 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;

[0010] 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.

[0011] In addition, to achieve the above purpose, the present application provides a flow data forwarding system, including:

[0012] 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;

[0013] 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.

[0014] 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 executable on the above-mentioned processor, and 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.

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

[0016] The embodiment of the present application constructs an ARP message on the VRRP group side according to the virtual MAC address corresponding to each router in the VRRP group and sends it to each network device. On the network device side, an ECMP group is constructed according to all received ARP messages, and the target traffic data is sent through the ECMP group. Each router corresponds to a virtual MAC address one by one, and the virtual MAC address corresponding to each router is different. Thus, the effect of multiple routers in the VRRP group being able to share and forward traffic can be achieved, and the target traffic data can be shared through a more optimized ECMP group and flow into each router in the VRRP group, achieving a true load balancing effect of the VRRP group, avoiding the phenomenon of router bandwidth waste in the VRRP group, and improving the bandwidth utilization of routers in the VRRP group. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flow chart of the first embodiment of the flow data forwarding method of the present application;

[0018] Figure 2 A scenario diagram of a VRRP load balancing method;

[0019] Figure 3 A schematic diagram of a scenario of the traffic data forwarding method of this application;

[0020] Figure 4 This is a flow chart of the second embodiment of the flow data forwarding method of the present application;

[0021] Figure 5 This is a flow chart of the third embodiment of the flow data forwarding method of the present application;

[0022] Figure 6 This is a flow chart of a fourth embodiment of the method for forwarding traffic data of the present application;

[0023] Figure 7 This is a schematic diagram of the architecture of the traffic data forwarding system of this application;

[0024] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the traffic data forwarding method of this application.

[0025] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0026] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0027] The traffic data forwarding method in the embodiment of the present application is applied to a switch router, and can be performed when VRRP (Virtual Router Redundancy Protocol) network networking is performed, so that the VRRP gateway can not only achieve active-standby protection, but also implement ECMP (Equal Cost Multi Path, Equal Cost Multi Path Routing) diversion processing, which is more reasonable and effective than the current ECMP diversion. It can also improve the bandwidth utilization of VRRP network networking, improve the business traffic forwarding capabilities of products such as switches and routers in VRRP network networking, and improve the networking and application capabilities of equipment.

[0028] 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 an ECMP group with different ARP messages of the same virtual IP, point the host route to the ECMP group, and point all subnet routes with this host route as the next hop to this ECMP group, thereby completing the load balancing processing of the VRRP group.

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

[0030] Step S10, receiving ARP messages sent by multiple routers in the VRRP group, and generating an ECMP group according to 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;

[0031] 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.

[0032] Since the current VRRP forwarding logic will lead to the phenomenon of bandwidth waste of routers in the VRRP group, multiple routers with different virtual MAC addresses in the VRRP group can be used to send to different downstream devices respectively, so that each downstream device can receive the ARP message sent by each router in the VRRP group. Instead of adopting the principle of coverage, an ECMP group is generated based on the received ARP message, and the target traffic with the destination address pointing to the above VRRP group is selected and sent to a router in the VRRP group through the above ECMP group, thereby achieving a certain load balancing effect.

[0033] For example, Figure 2 As shown, the VRRP group is connected to the downstream device C and the downstream device D, and the router E is connected to the downstream device C and the downstream device D respectively. The VRRP group includes router A and router B, and the virtual IP of the VRRP group is 10.1.1.1. The virtual MAC (network card address) of router A is 00:00:5E:00:00:01. The virtual MAC of router B is 00:00:5E:00:00:01. And the master and backup routers of the VRRP group (i.e. router A and router B) send virtual MAC addresses to the downstream devices C and D respectively, and the downstream devices C and D form ARP host routes pointing to the two virtual routers respectively.

[0034] However, this processing method still sends the traffic to a VRRP device for the 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, which can not only achieve the effect that both routers in the VRRP group can share and forward traffic, but also make the traffic of the downstream devices be shared through a more optimized ECMP mode, rather than using a static router in a VRRP group as a load balancing outlet, so that in VRRP networking, traffic can pass through the VRRP group router in a more optimized way. It can also improve the business traffic forwarding capabilities of products such as switches and routers in VRRP network networking, and improve the networking and application capabilities of equipment.

[0035] And in this embodiment, if there are two devices (such as routers) in the VRRP group, the two devices in the VRRP group generate virtual MAC addresses respectively, and notify the two virtual MAC addresses to the downstream devices. When the host route of the downstream device receives two different MAC addresses, if it is determined to be the virtual MAC address of the VRRP group, an ECMP group is generated to store the two different virtual MAC addresses respectively, and the host route pointing to the virtual IP address of the VRRP group is directly pointed to this ECMP group, and all subnet routes pointing to the host route of this virtual IP address are also pointed to this ECMP group, so as to achieve a true load sharing effect. That is, in this embodiment, when the downstream device receives the ARP message sent by multiple routers of the VRRP group, an ECMP group is formed on each downstream device for the downstream device to forward the acquired traffic data.

[0036] Optionally, for step S10, ARP messages sent by multiple routers in the VRRP group are received, and an ECMP group is generated according to 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;

[0037] In this embodiment, the traffic data forwarding method can be applied to a network device, and the network device can include a downstream device, such as a network host, etc. In this embodiment, multiple network devices can be connected to at least one VRRP group. And each network device performs the same operation, such as generating an ECMP group according to receiving ARP messages sent by multiple routers in the VRRP group. In this embodiment, only one network device is used as an example.

[0038] Optionally, when a network device receives multiple ARP messages, such as two ARP messages, it will identify the ARP message to determine whether it is an ARP message sent by a router in the VRRP group. If so, a corresponding ECMP group will be constructed. And the ARP message sent by the VRRP group router includes a virtual MAC address corresponding to the router that sent 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 be determined that it is an ARP message sent by a router in the VRRP group. Optionally, each router in the VRRP group corresponds to a virtual MAC address one by one, and the virtual MAC address corresponding to each router is different. Therefore, the network device can determine the router in the VRRP group that sends the ARP message based on the virtual MAC address in the ARP message.

[0039] Optionally, when receiving ARP messages sent by multiple routers in a VRRP group, the network device will not perform an ARP message overwriting operation, and will build an ECMP group based on all ARP messages, and the ECMP group is used to store the virtual MAC address in each ARP message.

[0040] Optionally, for step S20, target traffic data is sent through the ECMP group, and the target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

[0041] 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.

[0042] In addition, to assist in understanding the VRRP load balancing implementation principle in this embodiment, an example is given below.

[0043] For example, Figure 3As shown, the VRRP group is connected to the downstream device C and the downstream device D, and the router E is connected to the downstream device C and the downstream device D respectively. The VRRP group includes router A and router B, and the virtual IP of the VRRP group is 10.1.1.1. The virtual MAC of router A is 00:00:5E:00:00:01. The virtual MAC of router B is 00:00:5E:00:00:02. Therefore, the ARP message of the VRRP group can be generated first. Optionally, router A and router B form a VRRP group, and the virtual IP address of the VRRP group is 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 router A and router B to the downstream device C and the downstream device D respectively. Downlink device C and downstream device D receive two ARP packets with IP address 10.1.1.1 and virtual MAC addresses 00:00:5E:00:00:01 and 00:00:5E:00:00:02 respectively. Then an ECMP group is generated in each downstream device (such as downstream device C and downstream device D). Each downstream device determines that the MAC address carried in the ARP packet is a VRRP virtual MAC address, and 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 where they are received into two different next hops. The two different next hops are formed into an ECMP group, and the ARP entry formed by this virtual IP address and the virtual IP address exit point to this ECMP group. Then the downstream device is associated with the routing process. That is, if the next hop of all downstream devices is the subnet route of the virtual IP 10.1.1.1, and the host route exit of 10.1.1.1 is found to be an ECMP group, the exit of this subnet route will be modified to this ECMP group. All the route forwarding and host route forwarding of all downstream devices through the virtual IP 10.1.1.1 will be load balanced forwarded through this ECMP group.

[0044] In addition, in this embodiment, the VRRP group sends ARP messages to the downstream devices at the same time, and the downstream devices receive two ARP messages from the virtual IP 10.1.1.1, and the ARP messages carry two different virtual MAC addresses; the downstream devices C and D recognize that the ARP messages are from the VRRP group, and the next hop of the host route 10.1.1.1 is generated as the ECMP group, whose members are two export nexthops (next one), pointing to router A and router B respectively. When forwarding traffic data, the corresponding traffic forwarding path is router E-downlink device (downlink device C or downstream device D)-router A or router B.

[0045] In this embodiment, an ECMP group is constructed on the network device side according to all received ARP messages, and the target traffic data is sent through the ECMP group, and each router corresponds to a virtual MAC address one by one, and the virtual MAC address corresponding to each router is different. Thus, the effect of traffic sharing and forwarding can be achieved for multiple routers in the VRRP group, and the target traffic data can be shared through a more optimized ECMP group and flow into each router in the VRRP group, achieving a true load balancing effect of the VRRP group, avoiding the phenomenon of router bandwidth waste in the VRRP group, and improving the bandwidth utilization of routers in the VRRP group.

[0046] Further, based on the above-mentioned first embodiment of the present application, a second embodiment of the flow data forwarding method of the present application is proposed. In this embodiment, referring to Figure 4 , the above step S10, generating an ECMP group according to all ARP messages, includes:

[0047] 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;

[0048] Step b, generating an ECMP group according to the port correspondence information of all ARP messages, wherein 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.

[0049] In this embodiment, when the network device determines that there are two ARP messages sent by VRRP groups, since the ARP message includes 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, and determine the next hop information corresponding to the port that receives each ARP message, so as to determine the corresponding relationship between the two, that is, the port corresponding relationship, and then generate an ECMP group according to the port corresponding relationship of all ARP messages.

[0050] Optionally, if there are two ARP messages, the two ARP messages are processed, and two exit nexthops can be formed respectively according to the exit information therein, and the two exit information can be used to form an ECMP group, and finally the host route is directly pointed to the ECMP group. Optionally, if the chip of the network device directly supports the host route to point to the ECMP group, the host route formed by the ARP message can be directly pointed to the ECMP group containing two different virtual MAC addresses. Optionally, if the chip of the network device does not support the host route to point directly to the ECMP group, then the host route can be written into the subnet routing table in the form of a 24-bit mask subnet route, and the subnet route corresponding to the subnet routing table can be pointed to the ECMP group, or an ACL (Access Control List) entry can be directly used to match the host route, and its exit can be pointed to the ECMP group. Specifically, 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 exit corresponding to the target route entry is set to point to the ECMP group.

[0051] Optionally, other subnet routes pointing to this host route can also find the corresponding ECMP group through the host route and point to this ECMP group. Thus, all data that needs to pass through the VRRP group router can be forwarded to the ECMP group, that is, all traffic data can be forwarded by all routers (such as two routers) of the VRRP group router for load balancing of the ECMP group. At the same time, the protocol behavior of the VRRP group is not disturbed. Therefore, the VRRP group in this embodiment has the ability of active-standby switching protection.

[0052] 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 according to the virtual MAC address corresponding to the router that sends each ARP message and the corresponding relationship between the next hop information corresponding to the port that receives each ARP message, so as to generate an ECMP group according to the port correspondence information. Thus, the validity of the generated ECMP group is guaranteed.

[0053] Furthermore, the target traffic data is sent through the ECMP group, including:

[0054] 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 the target flow data is forwarded according to the egress in the ECMP group that is in a valid state.

[0055] In this embodiment, if at least one router in the VRRP group fails, such as if the main router fails, when switching to the backup router, that is, one of the exits in the ECMP group fails, at this time, one of the exits in the ECMP group of the network device can be disabled. That is, when the network device detects the failure information of at least one router in the VRRP group sent by the VRRP group notification, at this time, the exit corresponding to the at least one failed router can be determined first, and the exit determined in the ECMP group can be disabled. However, it does not affect the valid exits in the ECMP group, and the target traffic data can still be forwarded.

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

[0057] Furthermore, the target traffic data is sent through the ECMP group, including:

[0058] 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 recovered, and the target flow data is sent through the ECMP group.

[0059] In this embodiment, if a router in the VRRP group fails and is now restored, the recovery information of at least one router in the VRRP group will be sent to each network device. When the network device receives the recovery information of at least one router in the VRRP group, it will select at least one exit corresponding to the router from the previously failed exits for recovery processing, that is, whichever router is restored will restore the exit corresponding to the router. Then, the target traffic data is forwarded according to the restored exit and the exit in the ECMP group that is in a valid state. For example, if the main router in the original VRRP group fails and now the main router is back online, the VRRP group will send the main router recovery information to the network device, and the network device will restore the exit corresponding to the main router in the ECMP group again to become valid, so as to continue the load balancing forwarding of the target traffic data.

[0060] Optionally, the master router and the backup router in the VRRP group can perform master-backup switching to provide master-backup protection for the routers in the VRRP group. Figure 3As shown, if a device or link failure occurs in the VRRP group, a master-slave switch occurs, for example, the VRRP master router A switches to the backup router B. The ARP entry (i.e., ARP message) of the VRRP group's master router A is revoked, and the downstream devices C and D are revoked to the nexthop exit of router A, and this invalid exit is deleted from the ECMP group. If the failure of router A is rectified and it comes back online, the corresponding ARP message is resent to the downstream devices C and D, and the ECMP group exits of the downstream devices C and D are re-enabled to the nexthop exit of router A, and load balancing forwarding continues. In this way, all the virtual IP addresses used in VRRP are used to generate an ARP entry pointing to the ECMP group, so that all data packets that use this virtual IP address as the next hop and the router with the destination address of this virtual IP address can be load-balanced forwarded by ECMP hash calculation on the downstream devices C and D.

[0061] In this embodiment, when at least one router in the VRRP group recovers information, the egress corresponding to at least one router in the ECMP group is recovered, and then the target traffic data is forwarded, so that the load balancing effect of the VRRP group can continue to be achieved.

[0062] Further, refer to Figure 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:

[0063] 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 the virtual MAC address one-to-one, and the virtual MAC address corresponding to each router is different;

[0064] Step S200, all ARP messages are sent to each network device, so that the network device builds an ECMP group according to all received ARP messages, and sends target traffic data according to the ECMP group, where the target traffic data is traffic data whose destination address points to the virtual IP address of the VRRP group.

[0065] In this embodiment, the virtual IP address of the VRRP group remains unchanged, but when the ARP of the virtual IP address is used, all ARP messages (including ARP entries) are notified to the network device connected to the VRRP group, such as sending two different ARP entries. Among them, the two different ARP entries contain the two virtual MAC addresses of the master and backup routers of the VRRP group. Moreover, since the virtual MAC address of the VRRP group is a special field (such as 00:00:5E:00:XX:XX), the ARP message sent by the VRRP group to the network device can be easily recognized by the network device.

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

[0067] Optionally, for step S100, an ARP message corresponding to each router is constructed according to the virtual MAC address corresponding to each router in the VRRP group, wherein each router corresponds to the virtual MAC address one-to-one, and the virtual MAC address corresponding to each router is different;

[0068] In this embodiment, multiple routers constituting a VRRP group are determined, and only two routers are used as examples in this embodiment. The virtual IP address of the VRRP group is 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 address corresponding to each router is different. An ARP entry is constructed according to the virtual MAC address and sent to the network device in the form of a message. That is, 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 the ARP message can be determined based on the ARP entry. Among them, the virtual MAC address contained in the ARP message corresponding to each router is different.

[0069] Optionally, 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.

[0070] In this embodiment, after the ARP message corresponding to the router in the VRRP group is constructed, it is sent to each network device. Each network device performs the same operation, such as constructing an ECMP group. That is, the network device receives the ARP messages sent by multiple routers in the VRRP group, generates an ECMP group based on all ARP messages, and sends target traffic data through the ECMP group. The target traffic data is the traffic data whose destination address points to the virtual IP address of the VRRP group.

[0071] In this embodiment, on the VRRP group side, an ARP message is constructed according to the virtual MAC address corresponding to each router in the VRRP group, and sent to each network device, so that the network device constructs an ECMP group according to all received ARP messages, and sends the target traffic data through the ECMP group, and each router corresponds to a virtual MAC address one by one, and the virtual MAC address corresponding to each router is different. Thus, the effect of multiple routers in the VRRP group being able to share and forward traffic can be achieved, and the target traffic data can be shared through a more optimized ECMP group and flow into each router in the VRRP group, achieving a true load balancing effect of the VRRP group, avoiding the phenomenon of router bandwidth waste in the VRRP group, and improving the bandwidth utilization of routers in the VRRP group.

[0072] Further, based on the third embodiment of the present application, a fourth embodiment of the flow data forwarding method of the present application is proposed. In this embodiment, referring to Figure 6 , after all ARP messages are sent to each network device in step S200, the following steps are included:

[0073] Step e: 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, wherein the network device performs failure processing on the exit corresponding to at least one router in the ECMP group according to the at least one router failure information.

[0074] In this embodiment, if there is at least one failed route in the VRRP group, corresponding router failure information will be generated and sent to each network device. For example, if the main router in the VRRP group fails, the main router will be switched to the backup router, and its corresponding failure information will be sent to each network device connected to the VRRP group. When the network device receives at least one router failure information, it will fail the export corresponding to at least one router in the ECMP group, and forward the target traffic data according to the export in the ECMP group that is in a valid state.

[0075] In this embodiment, by sending at least one router failure information to each network device when it is determined that there is at least one faulty router in the VRRP group, the network device can perform failure processing on the export 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.

[0076] Furthermore, after all ARP packets are sent to each network device, it includes:

[0077] 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 exit corresponding to the at least one router in the ECMP group according to the at least one router restoration information.

[0078] In this embodiment, if a router in the VRRP group fails and is now restored, corresponding router recovery information will be generated. The generated at least one router recovery information is sent to each network device connected to the VRRP group. For example, if the master router in the original VRRP group fails and now the master router is back online, corresponding router recovery information will be generated. The information is sent to all network devices connected to the VRRP group. When the network device receives the at least one router recovery information in the VRRP group, it will restore the exit corresponding to the at least one router in the ECMP group and forward the target traffic data through the exit in the ECMP group that is in a valid state.

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

[0080] In addition, refer to Figure 7 The present application provides a flow data forwarding system, the flow data forwarding system comprising:

[0081] The VRRP group is configured to construct 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 the virtual MAC address one by one, and the virtual MAC address corresponding to each router is different; and all ARP messages are sent to each network device;

[0082] The network device is configured to receive ARP packets sent by multiple routers in the VRRP group, generate an ECMP group according to all ARP packets, and send target flow data 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.

[0083] Optionally, the network device is further configured to determine, when it is determined that there are at least two ARP messages, 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;

[0084] The ECMP group is generated according to the port correspondence information of all ARP messages, which 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.

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

[0086] Optionally, the network device is further configured to restore the exit corresponding to at least one router in the ECMP group when at least one router in the VRRP group restores information, and execute sending of target traffic data through the ECMP group.

[0087] Optionally, the VRRP group is further configured to send at least one router failure information to each network device when it is determined that there is at least one faulty 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 according to the at least one router failure information.

[0088] Optionally, 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 been recovered, wherein the network device recovers the exit corresponding to the at least one router in the ECMP group according to the at least one router recovery message.

[0089] 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.

[0090] 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 executable 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.

[0091] Furthermore, in one embodiment, Figure 8 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 8As shown, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include internal memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services. The processor, network interface and memory can be interconnected through an internal bus, and the internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but it does not mean that there is only one bus or one type of bus. The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, 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 execute the steps of the above-mentioned traffic data forwarding method.

[0092] 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.

[0093] 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 a processor, the steps of the traffic data forwarding method as described above are implemented.

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

[0095] 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 physical components 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 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 disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, 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 of ordinary skill in the art that communication media typically 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.

[0096] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A flow data forwarding method, It is characterized in that Applied to network equipment, including: 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, It is characterized in that 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, It is characterized in that 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, It is characterized in that The sending of target traffic data through the ECMP group includes: When at least one router in the VRRP group recovers information, an egress corresponding to the at least one router in the ECMP group is recovered, and target traffic data is sent through the ECMP group.

5. A flow data forwarding method, It is characterized in that Applicable to VRRP groups, including: 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, It is characterized in that 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, It is characterized in that 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, It is characterized in that 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, It is characterized in that 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, It is characterized in that 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

Cited By

  • Multi-VRRP group and ECMP coordinated load adjustment method and system

    CN121567642A