A test method, device and equipment for multi-path ECMP load sharing and a medium

By using a single physical link to build a virtual LAN and logical interface in ECMP load balancing testing, combined with ACL technology, the problems of high material consumption and high complexity in traditional methods are solved, and efficient load balancing testing is achieved.

CN116389339BActive Publication Date: 2026-03-27INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional ECMP load balancing testing methods require the construction of multiple physical links, which consumes a lot of materials, is complex to set up, and has cumbersome IP address configuration, resulting in high testing complexity.

Method used

The test environment is built using a single physical link. By combining virtual LAN and logical interfaces with access control list (ACL) technology, the logical interface is bound to obtain the number of packets to determine whether the load-sharing link is performing load balancing.

Benefits of technology

It simplifies environment setup, reduces manual labor input, improves testing efficiency, has strong scalability, and is not limited by the number of load-sharing links supported by the switch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389339B_ABST
    Figure CN116389339B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-ECMP load sharing test method, device, equipment and medium, method includes: confirming test task, according to the test task determines main test equipment and auxiliary test equipment;According to the test task, build test environment, the test environment includes single physical link, virtual local area network and the logical interface corresponding to the virtual local area network;In the auxiliary test equipment, the logical interface is bound by access control list ACL technology, to obtain the number of messages;According to the number of messages, judge whether load sharing link carries out load sharing.The application uses a physical link, replaces original multi-physical link, and is simpler on environment building.Moreover, it is not limited by the number of load sharing links supported on the switch.The more ECMP load sharing links supported by the switch, the more efficient the method is, with strong scalability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of equal-cost multi-path routing, and in particular to a method and device for testing multi-path ECMP load sharing, and a medium. BACKGROUND

[0002] Equal-cost multi-path (ECMP) is a network environment in which multiple different links reach the same destination address. If a traditional routing technique is used, data packets sent to the destination address can only use one of the links, and the other links are in a backup state or invalid state. In a dynamic routing environment, the switching between the links requires a certain amount of time. An equal-cost multi-path routing protocol can use multiple links simultaneously in this network environment, thereby increasing the transmission bandwidth and enabling data transmission to be backed up on the failed link without delay and loss of packets.

[0003] A conventional switch supports at most 6 ECMP load sharing links, while a new type of switch project has implemented 32 links. A conventional testing method is to build 32 physical links, configure IP addresses on each link, add all the IP addresses to the same OSPF domain to establish a route, and then check the port statistics on each link to determine whether load sharing is performed on the 32 links.

[0004] This method requires a large amount of material for environment setup, and the setup is relatively complex. In addition, the configuration of a large number of IP addresses on the ports is also troublesome, thereby greatly increasing the testing complexity. SUMMARY

[0005] To solve the above problems, the present application provides a method and device for testing multi-path ECMP load sharing, and a medium. The method comprises the following steps:

[0006] Confirming a test task, determining a main test device and an auxiliary test device according to the test task, building a test environment according to the test task, the test environment comprising a single physical link, a virtual local area network, and a logical interface corresponding to the virtual local area network, binding the logical interface through access control list (ACL) technology on the auxiliary test device to obtain a number of messages, and determining whether load sharing is performed on the load sharing links according to the number of messages.

[0007] In one example, the step of building the test environment according to the test task comprises the following steps: connecting the main test device and the auxiliary test device with a single physical link, and configuring a first test instrument port and a second test instrument port capable of sending IP changed traffic, wherein the first test instrument port is connected to the main test device, and the second test instrument port is connected to the auxiliary test device.

[0008] In one example, it is characterized in that the configuration can be used to send the first tester port and the second tester port of IP change traffic, and the method further comprises: adding a plurality of virtual local area networks on the single physical link between the master test device and the auxiliary test device; the number of virtual local area networks is the same as the number of load sharing links; creating a logical interface corresponding to the plurality of virtual local area networks, and configuring a corresponding plurality of first IP addresses; configuring different mac addresses under each logical interface of the master test device.

[0009] In one example, after configuring different mac addresses under each logical interface of the master test device, the method further comprises: creating a virtual local area network for the first tester port and the port adjacent to the master test device, and the second tester port and the port adjacent to the auxiliary test device, and creating a corresponding logical interface and configuring a second IP address; adding the first IP address and the second IP address to the same OSPF domain.

[0010] In one example, the master test device and the auxiliary test device are the same device.

[0011] In one example, when the logical interface is bound on the auxiliary test device through access control list ACL technology, the statistical key is set to the mac address corresponding to the logical port.

[0012] In one example, the test environment is built according to the test task, specifically comprising: determining an environment building script in a database according to the test task; and configuring the test environment through the environment building script.

[0013] The application also provides a test device for multiple ECMP load sharing, comprising: a task confirmation module for confirming a test task and determining a master test device and an auxiliary test device according to the test task; an environment building module for building a test environment according to the test task, the test environment comprising a single physical link, a virtual local area network and a logical interface corresponding to the virtual local area network; a packet obtaining module for binding the logical interface on the auxiliary test device through access control list ACL technology to obtain a number of packets; and a judgment module for judging whether load sharing links are load shared according to the number of packets.

[0014] The application further provides a test device for multi-path ECMP load sharing, comprising: at least one processor; and a memory connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the following: confirming a test task, determining a main test device and an auxiliary test device according to the test task; according to the test task, building a test environment, wherein the test environment comprises a single physical link, a virtual local area network and a logical interface corresponding to the virtual local area network; binding the logical interface by using an access control list (ACL) technology on the auxiliary test device to obtain a number of messages; and judging whether load sharing is performed on the load sharing link according to the number of messages.

[0015] The application further provides a non-volatile computer storage medium storing computer executable instructions, which are configured to: confirm a test task, determine a main test device and an auxiliary test device according to the test task; according to the test task, build a test environment, wherein the test environment comprises a single physical link, a virtual local area network and a logical interface corresponding to the virtual local area network; bind the logical interface by using an access control list (ACL) technology on the auxiliary test device to obtain a number of messages; and judge whether load sharing is performed on the load sharing link according to the number of messages.

[0016] The method provided by the application can bring the following beneficial effects: the application uses a physical link to replace a plurality of physical links, and the environment building is simpler. Moreover, the application is not limited by the number of load sharing links supported by a switch. The more load sharing links supported by the switch, the more efficient the method is, and the method has strong scalability. When a physical link is added to a plurality of VLANs and a VLANif is created and an IP address is configured, and when a plurality of ACLs are configured on the Device2 and are bound, a script can be directly used to brush the configurations, thereby saving the time of manual input. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0018] Figure 1 FIG. 1 is a test network schematic diagram of a test method in the prior art in the embodiments of the application;

[0019] Figure 2 FIG. 2 is a flowchart of a test method for multi-path ECMP load sharing in the embodiments of the application;

[0020] Figure 3A schematic diagram of an environment for testing network in the embodiments of the present application is shown.

[0021] Figure 4 A structural schematic diagram of a test device for testing multi-path ECMP load sharing in the embodiments of the present application is shown.

[0022] Figure 5 A structural schematic diagram of a test device for testing multi-path ECMP load sharing in the embodiments of the present application is shown. DETAILED DESCRIPTION

[0023] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described in detail below with reference to the embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0024] As shown in Figure 1 , the traditional test method is to build 32 physical links, configure IP addresses on each link, add all IP addresses to the same OSPF domain to punch through the route, and then check the port statistics on each link to determine whether load sharing is performed on the 32 links. This method requires a large amount of material for environment construction, and is relatively complex to build. At the same time, the IP address configuration of a large number of ports is also very troublesome, so the test complexity is greatly improved.

[0025] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the drawings.

[0026] Figure 1 A flowchart of a test method for multi-path ECMP load sharing provided by one or more embodiments of the present specification is shown. The flowchart can be executed by a computing device in the corresponding field, and some input parameters or intermediate results in the flowchart allow manual intervention to adjust to help improve accuracy.

[0027] The implementation of the analysis method related to the embodiments of the present application can be a terminal device or a server, and the present application does not make special limitations thereon. For the convenience of understanding and description, the following embodiments are described in detail with the server as an example.

[0028] It should be noted that the server can be a separate device, or a system composed of multiple devices, i.e., a distributed server, and the present application does not make specific limitations thereon.

[0029] As shown in Figure 1 , the embodiments of the present application provide a test method for multi-path ECMP load sharing, which comprises:

[0030] S101: Confirm the test task, and determine the main test device and the auxiliary test device according to the test task.

[0031] Firstly, the test task published by the staff needs to be confirmed, and the main test device and the auxiliary test device in the test task are determined according to the test task requirements published by the staff.

[0032] S102: According to the test task, a test environment is built, which includes a single physical link, a virtual local area network, and a logical interface corresponding to the virtual local area network.

[0033] Before testing, the test environment needs to be built according to the test requirements of the test task, and here the test environment includes a single physical link, a virtual local area network, and a corresponding logical interface.

[0034] As shown in Figure 2 In one embodiment, when building the test environment, first, a physical link (such as if2 and if3) is used to connect the main test device Device 1 and the auxiliary test device Device 2; then the first tester port (Tc A) and the second tester port (Tc B) capable of sending IP change traffic are configured, and the first tester port is connected to the main test device, and the second tester port is connected to the auxiliary test device.

[0035] In one embodiment, after configuring the tester port, a plurality of virtual local area networks need to be added on the single physical link between the main test device and the auxiliary test device; here the number of virtual local area networks is the same as the number of load sharing links. At the same time, logical interfaces corresponding to the plurality of virtual local area networks are created, and a plurality of first IP addresses are configured. In addition, different mac addresses are configured under each logical interface of the main test device.

[0036] In one embodiment, after configuring the mac address of the logical interface, a virtual local area network needs to be created for the port adjacent to the main test device (such as if1) of the first tester port, and the port adjacent to the auxiliary test device (such as if4) of the second tester port, and a corresponding logical interface is created and a second IP address is configured; the first IP address and the second IP address are added to the same OSPF domain to pass through the route.

[0037] In one embodiment, the main test device and the auxiliary test device need to be the same device, so that the limitation of the ECMP load sharing link remains consistent, which is conducive to establishing the number of virtual links that meet the test requirements.

[0038] S103: Bind the logical interface on the auxiliary test device through access control list (ACL) technology to obtain the number of messages.

[0039] By using Access Control List (ACL) technology on the auxiliary testing device, the number of packets received by each logical interface can be viewed.

[0040] In one embodiment, when binding the logical interface, the statistical keyword is set to the MAC address corresponding to the logical port.

[0041] S104: Determine whether load sharing is performed on the load-sharing link based on the number of messages.

[0042] The number of packets corresponding to the logical interface can be used to determine whether load sharing has been implemented on the load-sharing link.

[0043] In one embodiment, when setting up a test environment, the configuration can be refreshed through a pre-set script, thereby saving manual time. In this case, the pre-written environment setup script needs to be determined by summarizing the test requirements of the test task in the database, and then the test environment is configured through the environment setup script.

[0044] The aforementioned environment setup script can be pre-stored in the computer device's storage. When a test environment needs to be set up, the computer device can select the environment setup script from the storage device. Alternatively, the computer device can also obtain the environment setup script from other external devices. For example, the environment setup script can be stored in the cloud, and when a test environment needs to be set up, the computer device can retrieve the environment setup script from the cloud. This embodiment does not limit the method of obtaining the environment setup script.

[0045] By using a single physical link instead of multiple physical links, environment setup is simpler. Furthermore, it is not limited by the number of load-sharing links supported by the switch. The more ECMP load-sharing links supported by the switch, the more efficient this method becomes, exhibiting strong scalability. Additionally, when adding multiple VLANs to the physical link, creating VLANIFs and configuring IP addresses, or configuring and binding multiple ACLs on Device 2, the configuration can be directly updated using scripts, saving manual time.

[0046] like Figure 4 As shown in the figure, this application embodiment also provides a test device for multiple ECMP load sharing, including:

[0047] Task confirmation module 401 confirms the test task and determines the main test device and auxiliary test device based on the test task.

[0048] Environment setup module 402 sets up a test environment according to the test task. The test environment includes a single physical link, a virtual local area network (VLAN), and the logical interface corresponding to the VLAN.

[0049] The message obtaining module 403 binds the logical interface through access control list (ACL) technology on the secondary measurement device to obtain the number of messages.

[0050] The judging module 404 judges whether the load sharing link is load shared according to the number of messages.

[0051] As shown in the figure, Figure 5 The embodiment of the application further provides a test device for multiple ECMP load sharing, comprising:

[0052] at least one processor; and

[0053] a memory in communication connection with the at least one processor; wherein

[0054] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0055] confirm a test task, determine a primary measurement device and a secondary measurement device according to the test task, build a test environment according to the test task, the test environment comprising a single physical link, a virtual local area network and a logical interface corresponding to the virtual local area network, bind the logical interface through access control list (ACL) technology on the secondary measurement device to obtain the number of messages, and judge whether the load sharing link is load shared according to the number of messages.

[0056] The embodiment of the application further provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are set to:

[0057] confirm a test task, determine a primary measurement device and a secondary measurement device according to the test task, build a test environment according to the test task, the test environment comprising a single physical link, a virtual local area network and a logical interface corresponding to the virtual local area network, bind the logical interface through access control list (ACL) technology on the secondary measurement device to obtain the number of messages, and judge whether the load sharing link is load shared according to the number of messages.

[0058] Each of the embodiments of the application adopts a progressive manner for description, and the same or similar parts of each of the embodiments can be referred to each other. Each of the embodiments mainly describes the difference from other embodiments. Especially, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0059] The device and medium provided by the embodiments of the present application are one-to-one corresponding, and therefore, the device and medium also have similar beneficial technical effects to the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be described here again.

[0060] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. In addition, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0061] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in one or more flows and / or blocks.

[0062] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in one or more flows and / or blocks.

[0063] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in one or more flows and / or blocks.

[0064] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memories.

[0065] Memory can include non-persistent memory, Random Access Memory (RAM), and / or non-volatile memory, such as Read Only Memory (ROM) or flash memory, in computer readable media. Memory is an example of computer readable media.

[0066] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0067] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0068] The above description is only some embodiments of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A test method for load sharing across multiple ECMP lines, characterized in that, include: Confirm the test task, and determine the main test equipment and auxiliary test equipment based on the test task; Based on the test task, a test environment is set up, which includes a single physical link, a virtual local area network (VLAN), and the logical interface corresponding to the VLAN. The logical interface is bound using Access Control List (ACL) technology on the auxiliary testing device to obtain the number of packets; Based on the number of messages, determine whether the load-sharing link is performing load sharing.

2. The method according to claim 1, characterized in that, The step of setting up the test environment according to the test task specifically includes: The main testing device and the auxiliary testing device are connected by a single physical link; Configure a first tester port and a second tester port that can be used to send IP change traffic. The first tester port is connected to the main test device, and the second tester port is connected to the auxiliary test device.

3. The method according to claim 2, characterized in that, After the configuration enables the first tester port and the second tester port to send IP change traffic, the method further includes: Multiple virtual local area networks (VLANs) are added to the single physical link between the main testing device and the auxiliary testing device; the number of VLANs is the same as the number of load-sharing links. Create logical interfaces corresponding to the multiple virtual local area networks and configure the corresponding multiple first IP addresses; A different MAC address is configured under each logical interface of the main testing device.

4. The method according to claim 3, characterized in that, After configuring different MAC addresses under each logical interface of the main testing device, the method further includes: Create a virtual local area network for the port of the first tester adjacent to the main test device and the port of the second tester adjacent to the auxiliary test device, and create corresponding logical interfaces and configure a second IP address; Add the first IP address and the second IP address to the same OSPF domain.

5. The method according to claim 1, characterized in that, The main testing device and the auxiliary testing device are the same type of equipment.

6. The method according to claim 1, characterized in that, When binding the logical interface on the auxiliary testing device using Access Control List (ACL) technology, the statistical keyword is set to the MAC address corresponding to the logical interface.

7. The method according to claim 1, characterized in that, The step of setting up the test environment according to the test task specifically includes: Based on the test task, determine the environment setup script in the database; Configure the test environment using the environment setup script.

8. A test apparatus for load sharing across multiple ECMP lines, characterized in that, include: The task confirmation module confirms the test task and determines the main test device and auxiliary test device based on the test task. The environment setup module sets up a test environment according to the test task. The test environment includes a single physical link, a virtual local area network (VLAN), and the logical interface corresponding to the VLAN. The message acquisition module binds the logical interface on the auxiliary testing device using Access Control List (ACL) technology to obtain the number of messages. The judgment module determines whether load sharing is performed on the load-sharing link based on the number of packets.

9. A test device for multiple ECMP load sharing, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform: Confirm the test task, and determine the main test equipment and auxiliary test equipment based on the test task; Based on the test task, a test environment is set up, which includes a single physical link, a virtual local area network (VLAN), and the logical interface corresponding to the VLAN. The logical interface is bound using Access Control List (ACL) technology on the auxiliary testing device to obtain the number of packets; Based on the number of messages, determine whether the load-sharing link is performing load sharing.

10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: Confirm the test task, and determine the main test equipment and auxiliary test equipment based on the test task; Based on the test task, a test environment is set up, which includes a single physical link, a virtual local area network (VLAN), and the logical interface corresponding to the VLAN. The logical interface is bound using Access Control List (ACL) technology on the auxiliary testing device to obtain the number of packets; Based on the number of messages, determine whether the load-sharing link is performing load sharing.

Citation Information

Patent Citations

  • Chip implementation method and apparatus of remote traffic monitoring load sharing

    CN108418765A

  • Method for realizing ECMP flow load balancing and electronic equipment

    CN114095441A