Method, device and system for testing network equipment reliability

By obtaining the status of switches and servers, arranging and combining them, establishing a test environment and executing operation instructions, the problem that Bonding technology cannot guarantee the reliability of network equipment is solved, and the reliability of network equipment is tested and improved.

CN116170337BActive Publication Date: 2024-10-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310165465.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-10-15
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

In a big data business environment, when using Bonding technology for network port hardware layer redundancy, the reliability of network equipment cannot be ensured.

Method used

By obtaining the backup status and link aggregation status of switches and servers, arrange and combine them, establish different test environments, and execute operating instructions in these environments to test the reliability of network equipment, including controlling interface status and sending data requests to obtain Response results.

Benefits of technology

It effectively solves the problem that Bonding technology cannot guarantee the reliability of the network card network and improves the reliability of network equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170337B_ABST
    Figure CN116170337B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, device and system for testing the reliability of network equipment, wherein the method includes: obtaining the backup status of the switch, the first link aggregation status corresponding to the switch, and obtaining the second link aggregation status corresponding to the server, wherein the switch and the server are in communication connection; arranging and combining the backup status, the first link aggregation status and the second link aggregation status to obtain a test environment for the network equipment; executing the first operation instruction and the second operation instruction of the target object in the test environment to obtain a test result of the network equipment; and determining the reliability of the network equipment based on the test result. Through this application, the problem that the reliability of the network card network cannot be guaranteed when the network card is configured to use Bonding technology for redundancy of the network port hardware layer is solved, thereby achieving the effect of improving the reliability of the network equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method, apparatus, and system for testing the reliability of network equipment. Background Art

[0002] In the big data business environment, as the amount of data increases, the requirement for bandwidth is also getting higher and higher. The current business scenarios all use a 10 Gigabit network port with limited transmission bandwidth, while the machine itself supports two 10 Gigabit network ports. In order to improve bandwidth and resource utilization, the network configuration will use Bonding technology to make the network port hardware layer redundancy to prevent single point failure of a single network port application, but it cannot ensure the reliability of network equipment. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus and system for testing the reliability of network equipment, so as to at least solve the problem in the related art that the reliability of the network card network cannot be guaranteed when the network card is configured using Bonding technology for redundancy of the network port hardware layer.

[0004] According to one embodiment of the present application, a method for testing the reliability of a network device is provided, comprising: obtaining a backup state of a switch, a first link aggregation state corresponding to the switch, and obtaining a second link aggregation state corresponding to a server, wherein the switch and the server are communicatively connected; arranging and combining the backup state, the first link aggregation state, and the second link aggregation state to obtain a test environment for the network device; executing a first operation instruction and a second operation instruction of a target object in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the operating state of the server or an interface in the server, and the second operation instruction is used to send a data request to an interface in the server, and the test result is a response result corresponding to the data request; and determining the reliability of the network device based on the test result.

[0005] In an exemplary embodiment, the backup state, the first link aggregation state, and the second link aggregation state are arranged and combined to obtain a test environment for the network device, including: when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a first test environment is obtained, wherein the first test environment is one of the test environments; when the backup state of the switch is backup off, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a second test environment is obtained, wherein the second test environment is one of the test environments; when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation not configured, a third test environment is obtained, wherein the third test environment is one of the test environments.

[0006] In an exemplary embodiment, the switch includes a first data interface and a second data interface, the server includes a third data interface and a fourth data interface, the first data interface and the third data interface are connected, and the second data interface and the fourth data interface are connected, wherein the third data interface is a management function port, and the fourth data interface is a network card port.

[0007] In an exemplary embodiment, a first operation instruction and a second operation instruction of a target object are executed in a test environment, including: setting the state of a third data interface of a server to a network controller sideband interface, wherein the third data interface is a management function port; executing the first operation instruction and the second operation instruction, wherein the second operation instruction is used to send a data request to the third data interface of the server and the fourth data interface of the server through a terminal device, wherein the third data interface is a management function port, and the fourth data interface is a network card port.

[0008] In an exemplary embodiment, during the process of executing the second operation instruction, the method also includes: when the terminal device is a first IP address, sending a data request to a third data interface and a fourth data interface through the terminal device; when the terminal device is a second IP address, sending a data request to the third data interface and the fourth data interface through the terminal device, wherein the first IP address is used to connect to the server through the first data interface of the switch, and the second IP address is used to connect to the server through the second interface of the switch.

[0009] In an exemplary embodiment, the first operation instruction includes one of the following: first turn on the third interface of the server, and then turn on the fourth interface of the server; or, turn on the fourth interface first, and then turn on the third interface; or, when both the third interface and the fourth interface are turned on, turn off the third interface; or, when the third interface is turned off and the fourth interface is turned on, turn on the third interface; or, restart the server; or, shut down the server; or, power off the server and then power on it.

[0010] In an exemplary embodiment, the switch is configured with a link aggregation control protocol, and the switch enables a forceup function.

[0011] According to another embodiment of the present application, a device for testing the reliability of a network device is provided, including: an acquisition module, used to acquire the backup status of a switch, the first link aggregation status corresponding to the switch, and the second link aggregation status corresponding to the server, wherein the switch and the server are communicatively connected; a combination module, used to arrange and combine the backup status, the first link aggregation status, and the second link aggregation status to obtain a test environment for the network device; an execution module, used to execute a first operation instruction and a second operation instruction of a target object in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the operating status of the server or an interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; a determination module, used to determine the reliability of the network device based on the test result.

[0012] According to another embodiment of the present application, a system for testing the reliability of a network device is provided, comprising: a terminal device, a switch and a server, wherein the switch is used to connect the terminal device and the server; the server is communicatively connected to the switch; the terminal device is used to obtain a backup state of the switch, a first link aggregation state corresponding to the switch, and a second link aggregation state corresponding to the server; the backup state, the first link aggregation state and the second link aggregation state are arranged and combined to obtain a test environment for the network device; a first operation instruction and a second operation instruction of a target object are executed in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the operating state of the server or an interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; the reliability of the network device is determined based on the test result.

[0013] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0014] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0015] Through the present application, the backup status of the switch, the link aggregation status of the switch and the link aggregation status of the server are obtained, and these three statuses are arranged and combined to obtain different test environments, and different operation instructions are executed in each test environment, thereby realizing the test process of the reliability of the network equipment. Therefore, it can solve the problem in the related technology that when the network card is configured to use Bonding technology for redundancy of the network port hardware layer, the reliability of the network card network cannot be guaranteed, thereby achieving the effect of improving the reliability of the network equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a hardware structure block diagram of a mobile terminal according to a method for testing the reliability of a network device according to an embodiment of the present application;

[0017] Figure 2 is a flow chart of a method for testing the reliability of a network device according to an embodiment of the present application;

[0018] Figure 3 is a structural diagram of an apparatus for testing the reliability of a network device according to an embodiment of the present application;

[0019] Figure 4 It is a structural diagram of a system for testing the reliability of network equipment according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0022] First, some nouns or terms that appear in the process of explaining the embodiments of the present application are subject to the following explanations:

[0023] Failover: Failover is a backup operating mode in which the functionality of a system component (such as a processor, server, network, or database) is transferred to a secondary system component when the primary component fails due to failure or scheduled downtime. Failover is an integral part of mission-critical systems that must be used frequently in order to make the system more fault-tolerant.

[0024] NCSI (Network Controller Sideband Interface) is an industrial standard for sideband interface network controllers that support out-of-band management of servers, defined by the Distributed Management Task Force (DMTF). It consists of a management controller and multiple network controllers. DMTF defines a complete Ethernet-based control command request and response standard for NCSI. In addition, NCSI also has single-threaded, timeout retransmission and other mechanisms. This article combines the NCSI standard to simply demonstrate the process of registering and initializing the NCSI protocol in the Linux network protocol stack, and using the socket interface to implement a complete NSCI operation.

[0025] In the related technology, multiple network cards are virtualized into one network card to achieve redundancy. Multiple network cards are displayed as one card with the same IP address. The network configuration uses the bonding technology to make the network port hardware layer redundant to prevent the single point failure of a single network port application. However, the problem is that the reliability of the network card network cannot be ensured. In order to verify the reliability of the server network equipment, the embodiment of the present application provides a corresponding solution, using three hardware interconnection methods of switches, servers, and PCs, and using dynamic link aggregation (bond4) to verify the reliability of network equipment. The following is a detailed description.

[0026] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a method for testing the reliability of a network device according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for testing the reliability of network equipment in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0028] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] In this embodiment, a method for testing the reliability of network equipment running on the above mobile terminal is provided. Figure 2 is a flow chart of a method for testing the reliability of a network device according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0030] Step S202, obtaining a backup state of the switch, a first link aggregation state corresponding to the switch, and a second link aggregation state corresponding to the server, wherein the switch and the server are in communication connection;

[0031] Step S204, arranging and combining the backup state, the first link aggregation state, and the second link aggregation state to obtain a test environment for the network device;

[0032] Step S206, executing the first operation instruction and the second operation instruction of the target object in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the running state of the server or the interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request;

[0033] Step S208: Determine the reliability of the network device according to the test result.

[0034] Through the above steps, the backup state of the switch, the link aggregation state of the switch and the link aggregation state of the server are obtained, and these three states are arranged and combined to obtain different test environments, and different operation instructions are executed in each test environment, thereby realizing the test process of the reliability of the network equipment. Therefore, it can solve the problem in the related technology that when the network card is configured to use Bonding technology for redundancy of the network port hardware layer, the reliability of the network card network cannot be guaranteed, thereby achieving the effect of improving the reliability of the network equipment.

[0035] The execution subject of the above steps may be a terminal device, etc., but is not limited thereto.

[0036] It should be noted that the execution order of the above steps is interchangeable. For example, the execution order of step S102 and step S104 is interchangeable, that is, step S104 can be executed first, and then step S102.

[0037] In the above method for testing the reliability of network equipment, the switch includes a first data interface and a second data interface, the server includes a third data interface and a fourth data interface, the first data interface and the third data interface are connected, and the second data interface and the fourth data interface are connected, wherein the third data interface is a management function port, and the fourth data interface is a network card port.

[0038] In an optional embodiment, the above-mentioned first data interface can be recorded as 1 / 1, the above-mentioned second data interface can be recorded as 1 / 2, and the switch ports 1 / 1 and 1 / 2 perform Ethernet link aggregation (Eth-Trunk); the above-mentioned third data interface is the management function port (BMC) in the server (server), which can be recorded as port1, and the above-mentioned fourth data interface is the network card port (OS) in the server, which can be recorded as port2. The two interfaces port1 and port2 in the above-mentioned server perform bond, the switch port 1 / 1 is connected to the port1 of the server, and the switch port 1 / 2 is connected to the port 1 / 2 of the server.

[0039] The server side is configured with a static IP address. For example, the IP address of the management function port BMC can be set to 10.1.12.254, and the IP address of the network card port OS can be set to 10.1.12.253. It should be noted that the above IP address settings are only examples and do not represent specific limitations. In the actual setting process, it is necessary to ensure that the IP addresses of port 1 and port 2 of the server are in the same network segment. The switch side is configured with a static IP address. For example, the IP address can be set to 10.1.12.1 as the server gateway. One side of the switch is connected to the server, and the other side is connected to the PC side. The PC side also needs to be configured with a static IP address, for example, it can be configured to 10.1.13.1 or 10.1.13.4.

[0040] In an optional embodiment, when the IP address of the PC side is configured as 10.1.13.1, it is connected to the server through the 1 / 1 port of the switch; when the IP address of the PC side is configured as 10.1.13.4, it is connected to the server through the 1 / 2 port of the switch.

[0041] In step S204 of the above-mentioned method for testing the reliability of a network device, the backup state, the first link aggregation state, and the second link aggregation state are arranged and combined to obtain a test environment for the network device, which specifically includes the following steps: when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a first test environment is obtained, wherein the first test environment is one of the test environments; when the backup state of the switch is backup off, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a second test environment is obtained, wherein the second test environment is one of the test environments; when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation not configured, a third test environment is obtained, wherein the third test environment is one of the test environments.

[0042] In step S206 of the above-mentioned method for testing the reliability of network equipment, the first operation instruction and the second operation instruction of the target object are executed in the test environment, which specifically includes the following steps: setting the state of the third data interface of the server to the network controller sideband interface, wherein the third data interface is a management function port; executing the first operation instruction and the second operation instruction, the second operation instruction is used to send a data request to the third data interface of the server and the fourth data interface of the server through the terminal device, wherein the third data interface is the management function port, and the fourth data interface is the network card port.

[0043] In step S206 of the above-mentioned method for testing the reliability of network equipment, during the execution of the second operation instruction, the method also includes the following steps: when the terminal device is a first IP address, sending a data request to the third data interface and the fourth data interface through the terminal device; when the terminal device is a second IP address, sending a data request to the third data interface and the fourth data interface through the terminal device, wherein the first IP address is used to connect to the server through the first data interface of the switch, and the second IP address is used to connect to the server through the second interface of the switch.

[0044] In the above-mentioned method for testing the reliability of network equipment, the first operation instruction includes one of the following: first open the third interface of the server, and then open the fourth interface of the server; or, first open the fourth interface, and then open the third interface; or, when the third interface and the fourth interface are both opened, close the third interface; or, when the third interface is closed and the fourth interface is opened, open the third interface; or, perform a restart operation on the server; or, perform a shutdown operation on the server; or, perform a power-off operation on the server and then a power-on operation.

[0045] In the above method for testing the reliability of network equipment, the switch is configured with a link aggregation control protocol, and the switch has a force up function enabled.

[0046] The testing method in the embodiment of the present application specifically includes three testing schemes, each of which corresponds to a testing environment, which are described in detail below.

[0047] Solution 1, i.e., the first test environment, includes: the backup state of the switch is enabled, i.e., the switch turns on failover. The switch is configured with link aggregation, and the server is also configured with link aggregation, i.e., the switch and the server are both configured with Bond4 mode.

[0048] In the first test environment, the first operation instruction and the second operation instruction are executed, specifically including the following test methods:

[0049] Test A1: The first operation instruction is: first open the third interface of the server, and then open the fourth interface of the server, that is, first open port1, and then open port2, so that the dual link Link UP, and set the port1 port to NCSI (i.e., the above-mentioned network controller sideband interface). Then execute the second operation instruction: send a data request to the third data interface and the fourth data interface of the server through the terminal device (i.e., the PC end). Specifically, use the IP addresses of the PC end as 10.1.13.1 and 10.1.13.4, respectively, to send data requests to the BMC and OS of the server. If the network equipment is normal, use the IP addresses of the PC end as 10.1.13.1 and 10.1.13.4, the BMC and OS of the server can be pinged, and the message sending and receiving status under the port is checked through the switch to confirm that the NCSI is port1.

[0050] Test B1: The first operation instruction is: open the fourth interface first, then open the third interface, that is, open port2 first, then open port1, so that the dual link Link UP, set port1 to NCSI. Then execute the second operation instruction: send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC end). Specifically, use the IP addresses of the PC end as 10.1.13.1 and 10.1.13.4, respectively, to send data requests to the BMC and OS of the server. If the network equipment is normal, use the IP addresses of the PC end as 10.1.13.1 and 10.1.13.4, the BMC and OS of the server can be pinged, and the message sending and receiving status under the port is checked through the switch to confirm that the NCSI is port1.

[0051] Test C1: The first operation instruction is: when the third interface and the fourth interface are both turned on, close the third interface, that is, after the dual link Link UP, close port1 and set port1 to NCSI. Then execute the second operation instruction: send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC). Specifically, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4 to send data requests to the BMC and OS of the server. If the network equipment is normal, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4, and the BMC and OS of the server can be pinged.

[0052] Test D1: When the first operation instruction is: when the third interface is closed and the fourth interface is open, open the third interface, that is, when port1 is closed and port2 is open, open port1 and set port1 to NCSI. Then execute the second operation instruction: send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC end). Specifically, use the IP addresses of the PC end as 10.1.13.1 and 10.1.13.4, respectively, to send data requests to the BMC and OS of the server. If the network equipment is normal, use the IP addresses of the PC end as 10.1.13.1 and 10.1.13.4, the BMC and OS of the server can be pinged, and the message sending and receiving status under the port is checked through the switch to confirm that NCSI is port1.

[0053] Test E1: The first operation instruction is: perform a restart operation on the server. At this time, the switch needs to be configured with the force up function and port1 needs to be set to NCSI. Then execute the second operation instruction: During the server restart process, send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC). Specifically, during the restart process, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4 to send data requests to the BMC and OS of the server. If the network device is normal, then during the restart process, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4, the BMC of the server can be pinged, and wait for a preset time, such as 180s.

[0054] Test F1: When the first operation instruction is: shut down the server, the switch needs to be configured with the force up function and port1 needs to be set to NCSI. Then execute the second operation instruction: after the server is shut down, send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC). Specifically, after the server is shut down, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4 to send data requests to the BMC and OS of the server respectively. If the network device is normal, after the server is shut down, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4, the BMC of the server can be pinged, and wait for the preset time, such as 180s.

[0055] Test G1: The first operation instruction is: After the server is powered off, perform the power-on operation and set port1 to NCSI. Then execute the second operation instruction: After the server is successfully turned on, send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC). Specifically, after the server is successfully turned on, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4 to send data requests to the BMC and OS of the server respectively. If the network equipment is normal, after the server is successfully turned on, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4, and the BMC and OS of the server can be pinged.

[0056] Solution 2, i.e., the second test environment, includes: the backup state of the switch is disabled, i.e., the switch is disabled for failover. The switch is configured with link aggregation, and the server is also configured with link aggregation, i.e., the switch and the server are both configured with Bond4 mode.

[0057] In the second test environment, the first operation instruction and the second operation instruction are executed, specifically including the following test methods:

[0058] Test A2: The first operation instruction is: first open the third interface of the server, and then open the fourth interface of the server, that is, first open port1, and then open port2, so that the dual link Link UP, and set port1 to NCSI (i.e., the above-mentioned network controller sideband interface). Then execute the second operation instruction: send a data request to the third data interface and the fourth data interface of the server through the terminal device (i.e., the PC end). Specifically, if the IP address of the PC end is 10.1.13.1, send a data request to the BMC and OS of the server. If the network device is normal, when the IP address of the PC end is 10.1.13.1, the BMC and OS of the server can be pinged, and the message sending and receiving status under the port is checked through the switch to confirm that NCSI is port1. If the IP address of the PC end is 10.1.13.4, send a data request to the BMC and OS of the server. If the network equipment is normal, the server's BMC can be pinged when the PC's IP address is 10.1.13.4. By checking the message sending and receiving status of the port through the switch, it can be found that port 2 receives data, but port 1 does not reply to data.

[0059] Test B2: The first operation instruction is: open the fourth interface first, then open the third interface, that is, open port2 first, then open port1, so that the dual link Link UP, and set port1 to NCSI. Then execute the second operation instruction: send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC end). Specifically, if the IP address of the PC end is 10.1.13.1, send a data request to the BMC and OS of the server. If the network device is normal, when the IP address of the PC end is 10.1.13.1, the BMC and OS of the server can be pinged, and the message sending and receiving status under the port is checked through the switch to confirm that NCSI is port1. If the IP address of the PC end is 10.1.13.4, send a data request to the BMC and OS of the server. If the network equipment is normal, the server's BMC can be pinged when the PC's IP address is 10.1.13.4. By checking the message sending and receiving status of the port through the switch, it can be found that port 2 receives data, but port 1 does not reply to data.

[0060] Test C2: The first operation instruction is: perform a restart operation on the server. At this time, the switch needs to be configured with the force up function and port1 needs to be set to NCSI. Then execute the second operation instruction: During the server restart process, send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC). Specifically, during the restart process, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4 to send data requests to the BMC and OS of the server. If the network device is normal, then during the restart process, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4, the BMC of the server can be pinged, and wait for a preset time, such as 180s.

[0061] Test D2: When the first operation instruction is: shut down the server, the switch needs to be configured with the force up function and port 1 needs to be set to NCSI. Then execute the second operation instruction: after the server is shut down, send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC). Specifically, after the server is shut down, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4 to send data requests to the BMC and OS of the server respectively. If the network equipment is normal, after the server is shut down, use the IP addresses of the PC as 10.1.13.1 and 10.1.13.4, the BMC of the server can be pinged, and wait for the preset time, such as 180s. Check the port where NCSI is located and confirm that it is on port 1.

[0062] Test E2: The first operation instruction is: After the server is powered off, perform the power-on operation and set port1 to NCSI. Then execute the second operation instruction: After the server is successfully turned on, send a data request to the third data interface and the fourth data interface of the server through the terminal device (ie, the PC side). Specifically, after the server is successfully turned on, use the IP addresses of the PC side as 10.1.13.1 and 10.1.13.4 to send data requests to the BMC and OS of the server. If the network equipment is normal, after the server is successfully turned on, use the IP addresses of the PC side as 10.1.13.1 and 10.1.13.4, and the BMC of the server can be pinged. Check the port where NCSI is located and confirm that it is on port1.

[0063] Solution 3, i.e., the third test environment, includes: the backup state of the switch is enabled, i.e., the switch turns on failover. The switch is configured with link aggregation, but the server is not configured with link aggregation, i.e., the switch is configured with Bond4 mode, but the server is not configured with Bond4 mode.

[0064] In the third test environment, the first operation instruction and the second operation instruction are executed. The specific test method is the same as the steps of executing the first operation instruction and the second operation instruction in Solution 1, and will not be repeated here.

[0065] It should be noted that the switch needs to be configured with the LACP dynamic protocol and the force up function must be enabled, otherwise NCSI will fail.

[0066] Based on the above three test environments and corresponding test methods, the following table can be obtained. The test results can be filled into the following table according to the above test method. Based on the table information, observe whether the connectivity of the network card bond is stable and reliable under different conditions.

[0067]

[0068] The method for testing the reliability of network equipment provided in the embodiment of the present application has the following advantages: 1. It fills the gap in the current test solution design; 2. It adds a relatively special testing technique in the server field; 3. It adds a variety of ways to test the compatibility and application capabilities of server hardware equipment.

[0069] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0070] In the present embodiment, a device for testing the reliability of network equipment is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the descriptions have been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceivable.

[0071] Figure 3 is a structural diagram of a device for testing the reliability of a network device according to an embodiment of the present application, such as Figure 3 As shown, the device comprises:

[0072] An acquisition module 32, used to acquire a backup state of the switch, a first link aggregation state corresponding to the switch, and a second link aggregation state corresponding to the server, wherein the switch and the server are in communication connection;

[0073] A combination module 34, used to arrange and combine the backup state, the first link aggregation state and the second link aggregation state to obtain a test environment for the network device;

[0074] An execution module 36 is used to execute a first operation instruction and a second operation instruction of a target object in a test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the running state of a server or an interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request;

[0075] The determination module 38 is used to determine the reliability of the network device according to the test result.

[0076] In the combined module in the above-mentioned device for testing the reliability of network equipment, the module is also used to obtain a first test environment when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, wherein the first test environment is one of the test environments; to obtain a second test environment when the backup state of the switch is backup off, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, wherein the second test environment is one of the test environments; to obtain a third test environment when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation not configured, wherein the third test environment is one of the test environments.

[0077] In the above-mentioned device for testing the reliability of network equipment, the switch includes a first data interface and a second data interface, the server includes a third data interface and a fourth data interface, the first data interface and the third data interface are connected, and the second data interface and the fourth data interface are connected, wherein the third data interface is a management function port, and the fourth data interface is a network card port.

[0078] In the execution module in the above-mentioned device for testing the reliability of network equipment, the module is also used to set the state of the third data interface of the server to the network controller sideband interface, wherein the third data interface is a management function port; execute the first operation instruction and the second operation instruction, and the second operation instruction is used to send a data request to the third data interface of the server and the fourth data interface of the server through the terminal device, wherein the third data interface is the management function port and the fourth data interface is the network card port.

[0079] In the execution module in the above-mentioned device for testing the reliability of network equipment, the module is also used to send a data request to the third data interface and the fourth data interface through the terminal device when the terminal device is the first IP address; and to send a data request to the third data interface and the fourth data interface through the terminal device when the terminal device is the second IP address, wherein the first IP address is used to connect to the server through the first data interface of the switch, and the second IP address is used to connect to the server through the second interface of the switch.

[0080] In the above-mentioned device for testing the reliability of network equipment, the first operation instruction includes one of the following: first open the third interface of the server, and then open the fourth interface of the server; or, first open the fourth interface, and then open the third interface; or, when the third interface and the fourth interface are both opened, close the third interface; or, when the third interface is closed and the fourth interface is opened, open the third interface; or, perform a restart operation on the server; or, perform a shutdown operation on the server; or, perform a power-off operation on the server and then a power-on operation.

[0081] In the above-mentioned device for testing the reliability of network equipment, the switch is configured with a link aggregation control protocol, and the switch turns on the force up function.

[0082] It should be noted that Figure 3 The apparatus for testing the reliability of network equipment is used to perform Figure 2 The method for testing the reliability of network equipment is shown, so the relevant explanations in the above method for testing the reliability of network equipment are also applicable to the device for testing the reliability of network equipment, and will not be repeated here.

[0083] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0084] Figure 4 is a structural diagram of a system for testing the reliability of network equipment according to an embodiment of the present application, such as Figure 4 As shown, the system 400 for testing the reliability of network equipment includes:

[0085] A terminal device 402, a switch 404 and a server 406, wherein the switch is used to connect the terminal device and the server; the server is communicatively connected to the switch; the terminal device is used to obtain the backup state of the switch, the first link aggregation state corresponding to the switch, and the second link aggregation state corresponding to the server; the backup state, the first link aggregation state and the second link aggregation state are arranged and combined to obtain a test environment for the network device; a first operation instruction and a second operation instruction of the target object are executed in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the operating state of the server or the interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; the reliability of the network device is determined based on the test result.

[0086] In the above-mentioned system for testing the reliability of network equipment, the backup state, the first link aggregation state and the second link aggregation state are arranged and combined to obtain a test environment for the network equipment, which specifically includes the following processes: when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a first test environment is obtained, wherein the first test environment is one of the test environments; when the backup state of the switch is backup off, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a second test environment is obtained, wherein the second test environment is one of the test environments; when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation not configured, a third test environment is obtained, wherein the third test environment is one of the test environments.

[0087] In the above-mentioned system for testing the reliability of network equipment, the switch includes a first data interface and a second data interface, the server includes a third data interface and a fourth data interface, the first data interface and the third data interface are connected, and the second data interface and the fourth data interface are connected, wherein the third data interface is a management function port, and the fourth data interface is a network card port.

[0088] In the above-mentioned system for testing the reliability of network equipment, the first operation instruction and the second operation instruction of the target object are executed in the test environment, which specifically includes the following processes: setting the state of the third data interface of the server to the network controller sideband interface, wherein the third data interface is a management function port; executing the first operation instruction and the second operation instruction, wherein the second operation instruction is used to send a data request to the third data interface of the server and the fourth data interface of the server through the terminal device, wherein the third data interface is the management function port, and the fourth data interface is the network card port.

[0089] In the above-mentioned system for testing the reliability of network equipment, the process of executing the second operation instruction also includes the following process: when the terminal device is the first IP address, a data request is sent to the third data interface and the fourth data interface through the terminal device; when the terminal device is the second IP address, a data request is sent to the third data interface and the fourth data interface through the terminal device, wherein the first IP address is used to connect to the server through the first data interface of the switch, and the second IP address is used to connect to the server through the second interface of the switch.

[0090] In the above-mentioned system for testing the reliability of network equipment, the first operation instruction includes one of the following: first open the third interface of the server, and then open the fourth interface of the server; or, first open the fourth interface, and then open the third interface; or, when the third interface and the fourth interface are both opened, close the third interface; or, when the third interface is closed and the fourth interface is opened, open the third interface; or, perform a restart operation on the server; or, perform a shutdown operation on the server; or, perform a power-off operation on the server and then a power-on operation.

[0091] In the above-mentioned system for testing the reliability of network equipment, the switch is configured with a link aggregation control protocol, and the switch has a force up function enabled.

[0092] It should be noted that Figure 4 The system for testing the reliability of network equipment is used to perform Figure 2 The method for testing the reliability of a network device is shown, so the relevant explanations in the above method for testing the reliability of a network device are also applicable to the system for testing the reliability of a network device, and will not be repeated here.

[0093] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running, specifically including the following steps: obtaining the backup status of the switch, the first link aggregation status corresponding to the switch, and obtaining the second link aggregation status corresponding to the server, wherein the switch and the server are communicatively connected; arranging and combining the backup status, the first link aggregation status, and the second link aggregation status to obtain a test environment for the network device; executing a first operation instruction and a second operation instruction of the target object in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the operating status of the server or an interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; and determining the reliability of the network device based on the test result.

[0094] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0095] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments, specifically including the following steps: obtaining a backup status of a switch, a first link aggregation status corresponding to the switch, and obtaining a second link aggregation status corresponding to the server, wherein the switch and the server are communicatively connected; arranging and combining the backup status, the first link aggregation status, and the second link aggregation status to obtain a test environment for a network device; executing a first operation instruction and a second operation instruction of a target object in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the operating status of the server or an interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; and determining the reliability of the network device based on the test result.

[0096] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0097] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0098] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0099] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for testing the reliability of a network device, characterized in that: include: Acquire a backup state of a switch, a first link aggregation state corresponding to the switch, and acquire a second link aggregation state corresponding to a server, wherein the switch and the server are in communication connection; Arrange and combine the backup state, the first link aggregation state, and the second link aggregation state to obtain a test environment for the network device; Executing a first operation instruction and a second operation instruction of a target object in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the running state of the server or an interface in the server, the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; Determining the reliability of the network device according to the test result; The backup state, the first link aggregation state, and the second link aggregation state are arranged and combined to obtain a test environment for the network device, including: when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a first test environment is obtained, wherein the first test environment is one of the test environments; when the backup state of the switch is backup off, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a second test environment is obtained, wherein the second test environment is one of the test environments; when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation not configured, a third test environment is obtained, wherein the third test environment is one of the test environments.

2. The method according to claim 1, characterized in that The switch includes a first data interface and a second data interface, the server includes a third data interface and a fourth data interface, the first data interface is connected to the third data interface, the second data interface is connected to the fourth data interface, wherein the third data interface is a management function port, and the fourth data interface is a network card port.

3. The method according to claim 1, characterized in that Executing a first operation instruction and a second operation instruction of a target object in the test environment includes: Setting the state of the third data interface of the server to a network controller sideband interface, wherein the third data interface is a management function port; Execute the first operation instruction and the second operation instruction, wherein the second operation instruction is used to send the data request to the third data interface of the server and the fourth data interface of the server through the terminal device, wherein the third data interface is a management function port and the fourth data interface is a network card port.

4. The method according to claim 3, characterized in that During the execution of the second operation instruction, the method further includes: In a case where the terminal device is the first IP address, sending the data request to the third data interface and the fourth data interface through the terminal device; When the terminal device has a second IP address, the data request is sent to the third data interface and the fourth data interface through the terminal device, wherein the first IP address is used to connect to the server through the first data interface of the switch, and the second IP address is used to connect to the server through the second interface of the switch.

5. The method according to claim 3, characterized in that: The first operation instruction includes one of the following: First, open the third interface of the server, and then open the fourth interface of the server; or, First enable the fourth interface, and then enable the third interface; or, When both the third interface and the fourth interface are enabled, the third interface is disabled; or, When the third interface is in a closed state and the fourth interface is in an open state, opening the third interface; or, Restart the server; or Shut down the server; or The server is powered off and then powered on.

6. The method according to claim 1, characterized in that The switch is configured with a link aggregation control protocol, and the switch enables a force up function.

7. A device for testing the reliability of network equipment, characterized in that: include: An acquisition module, used to acquire a backup state of a switch, a first link aggregation state corresponding to the switch, and a second link aggregation state corresponding to a server, wherein the switch and the server are in communication connection; A combination module, used for arranging and combining the backup state, the first link aggregation state and the second link aggregation state to obtain a test environment for the network device; an execution module, configured to execute a first operation instruction and a second operation instruction of a target object in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the running state of the server or an interface in the server, the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; A determination module, used to determine the reliability of the network device according to the test result; The combination module is also used to obtain a first test environment when the backup state of the switch is enabled backup, and the first link aggregation state is configured link aggregation, and the second link aggregation state is configured link aggregation, wherein the first test environment is one of the test environments; to obtain a second test environment when the backup state of the switch is disabled backup, and the first link aggregation state is configured link aggregation, and the second link aggregation state is configured link aggregation, wherein the second test environment is one of the test environments; to obtain a third test environment when the backup state of the switch is enabled backup, and the first link aggregation state is configured link aggregation, and the second link aggregation state is not configured link aggregation, wherein the third test environment is one of the test environments.

8. A system for testing the reliability of network equipment, characterized in that: include: Terminal equipment, switches and servers, among which, The switch is used to connect the terminal device and the server; The server is communicatively connected with the switch; The terminal device is used to obtain the backup state of the switch, the first link aggregation state corresponding to the switch, and the second link aggregation state corresponding to the server; the backup state, the first link aggregation state and the second link aggregation state are arranged and combined to obtain a test environment for the network device; the first operation instruction and the second operation instruction of the target object are executed in the test environment to obtain a test result of the network device, wherein the first operation instruction is used to control the running state of the server or the interface in the server, and the second operation instruction is used to send a data request to the interface in the server, and the test result is a response result corresponding to the data request; the reliability of the network device is determined according to the test result; the backup state, the first link aggregation state and the second link aggregation state are arranged and combined A test environment for the network device is obtained by combining the columns, including: when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a first test environment is obtained, wherein the first test environment is one of the test environments; when the backup state of the switch is backup off, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation configured, a second test environment is obtained, wherein the second test environment is one of the test environments; when the backup state of the switch is backup on, and the first link aggregation state is link aggregation configured, and the second link aggregation state is link aggregation not configured, a third test environment is obtained, wherein the third test environment is one of the test environments.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and equipment for improving timeout of link aggregation protocol

    CN112134797A

  • Network management method and system for cross-device link aggregation, switch and storage medium

    CN115514639A

  • Protocol calculation method, switch, cross-device link aggregation system and storage medium

    CN115514698A

  • Cross-device link aggregation routing calculation method, switch, system and storage medium

    CN115604174A

  • Method and system for automated test and result comparison

    US20150100296A1