A method and system for rapid detection of network port functions of multi-port devices

The method for rapid testing of network port functions of multi-port devices utilizes test cables and system scripts to automatically test network port functions, solving the problems of low testing efficiency and insufficient automation in existing technologies, and achieving efficient and accurate network port function testing.

CN117221156BActive Publication Date: 2026-11-17JWIPC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311222706.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2026-11-17
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

Existing technologies require extensive manual operation for network function testing of multi-port devices, cannot automatically identify different Linux systems and port types, have low testing efficiency, cannot test odd and even numbers of ports simultaneously, and cannot perform rapid testing in environments without external network access.

Method used

A rapid testing method for the network functions of multi-port devices is adopted. By making test cables, the network cables at the ends of the network ports are connected to each other. The system-defined script performs cyclic testing, automatically identifies the Linux system and configures the configuration file, and tests the communication function, throughput and stability of the network ports at different speeds.

Benefits of technology

It can automatically identify different Linux systems, support rapid detection of odd and even number of network ports, reduce manual operation, improve testing efficiency and accuracy, and can perform loopback communication function testing in environments without external network access, and output test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117221156B_ABST
    Figure CN117221156B_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for rapid testing of network port functions in multi-port devices. The method includes the following steps: fabricating test cables according to the number of network ports on the device under test; connecting the network port connectors on the test cables to the corresponding network ports on the device under test; running a system-defined script to perform network port testing; compatible with different Linux systems, enabling automatic testing of both odd and even number of network ports; unlimited number of network ports can be tested, and corresponding cables can be fabricated based on the number of ports; in the absence of an external network, the network port loopback communication function can be tested, with the script automatically testing the communication function and network throughput data of all network ports and outputting the test results; in the presence of an external network, the function of automatically obtaining an IP address for external communication can be achieved, with the script automatically testing all network ports and outputting the test results; this method can run automatically after connecting the cables and running the script, greatly reducing manual operation and improving testing efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network port function testing technology, and more specifically, to a method and system for rapid testing of network port functions of multi-port devices. Background Technology

[0002] Network security and server products are characterized by numerous network interfaces and are mostly equipped with Linux systems. Network security products, in particular, can have dozens of network interfaces. Different customers use various Linux systems, leading to different system configurations during testing. Some testing methods involve connecting the network ports one by one with multiple network cables or testing each port individually before moving on to the next. The drawbacks of these methods are:

[0003] 1. For multi-port network devices, many network cables need to be connected, or the cables need to be connected to the corresponding network ports to test which two network ports are being tested, as the system cannot automatically identify the ports.

[0004] 2. It can only be used to test even-numbered network ports; it cannot test odd-numbered network ports.

[0005] 3. Different Linux systems require different configuration files; it cannot automatically recognize various system versions and configurations.

[0006] 4. The testing function is limited, and multiple functions need to be manually debugged and tested one by one.

[0007] 5. To test the external network connection, you have to connect each network port to the external network one by one, and then connect to the other network port after testing one port. This operation is time-consuming and laborious.

[0008] Therefore, a method is needed to quickly detect the communication function of the network port at various speeds and to quickly test the network throughput. Summary of the Invention

[0009] The technical problem to be solved by the present invention is to provide a method for rapid detection of network functions of multi-port devices, and a system for rapid detection of network functions of multi-port devices, in view of the above-mentioned defects of the prior art.

[0010] The technical solution adopted by this invention to solve its technical problem is:

[0011] A method for rapid detection of network port functions of multi-port devices is constructed, which includes the following steps:

[0012] Step 1: Fabricate test cables according to the number of network ports on the device under test;

[0013] The test cable includes multiple network port connectors that correspond one-to-one with the network ports, and the network cables at the ends of the connectors are connected to each other.

[0014] Step 2: Connect the network port connectors on the test cable to the corresponding network ports on the device under test;

[0015] Step 3: Run the system-defined script to perform network port testing;

[0016] The loop test will continue according to the settings until all network ports have been tested as reference ports. The loop test rules are as follows:

[0017] Select one network port as the reference network port, and use the other network ports as the network ports to be tested, and conduct communication tests with the reference network port in turn.

[0018] Turn on the reference network port and any one of the network ports to be tested, and keep the other network ports to be tested closed.

[0019] Perform network port communication function tests according to the set rules, output the test results and return to the previous step to perform another untested network port test operation, until all network ports under test have been tested.

[0020] The method for rapid detection of network port functions of multi-port devices according to the present invention includes the following steps for testing network port communication functions according to set rules:

[0021] Configure the network properties of the reference network port and the network port under test to enable them to communicate with each other.

[0022] Test the network port's communication capabilities at different speeds;

[0023] Test network port throughput;

[0024] Test the external network;

[0025] Test the stability of the network port connection.

[0026] The method for rapid detection of network port functions of multi-port devices according to the present invention, wherein the method for testing the communication function of the network port at different speeds is as follows:

[0027] Test the various speeds supported by the network ports, set up the routing for the reference network port and the network port under test, ping each other at different network speeds, output the test results at various network speeds, and save the results to a file.

[0028] The method for rapid detection of network functions of multi-port devices according to the present invention, wherein the method for testing network port throughput is as follows:

[0029] The iperf software is used to test the throughput data between the reference network port and the network port under test. The required throughput value is set as the test standard value. The test data is compared with the standard value, the final test data result is output, and the result is saved to a file.

[0030] The method for rapid detection of network port functions of multi-port devices according to the present invention, wherein the method for testing the external network is as follows:

[0031] Connect any network cable to the external network, and have the other network ports obtain IP addresses in sequence. Perform ping tests with the external network and save the results to a file.

[0032] The method for rapid detection of network port functions of multi-port devices according to the present invention includes a method for testing the stability of the network port connection:

[0033] Configure the reference network port and the network port under test to connect and disconnect repeatedly, and set the number of tests. Test the stability of the reference network port and the network port under test when frequently connected and disconnected, and save the results to a file.

[0034] The method for rapid detection of network port functions of multi-port devices according to the present invention, wherein the network cables at the tail end of the network port connectors are connected to each other using the following color-matching method:

[0035] White orange to white orange, orange to orange, white green to white green, blue to blue, white blue to white blue, green to green, white brown to white brown, brown to brown.

[0036] A rapid testing system for the network function of a multi-port device is provided to implement the rapid testing method for the network function of a multi-port device as described above. The system includes a test cable and a testing system.

[0037] The testing cable is made according to the number of network ports of the device under test, and includes multiple network port connectors that correspond one-to-one with the network ports, with the network cables at the ends of the network port connectors connected to each other.

[0038] The detection system performs cyclic detection according to a set configuration until all network ports have been tested as reference ports. The cyclic detection rules are as follows:

[0039] Select one network port as the reference network port, and use the other network ports as the network ports to be tested, and conduct communication tests with the reference network port in turn.

[0040] Turn on the reference network port and any one of the network ports to be tested, and keep the other network ports to be tested closed.

[0041] Perform network port communication function tests according to the set rules, output the test results and return to the previous step to perform another untested network port test operation, until all network ports under test have been tested.

[0042] The multi-port device network function rapid detection system of the present invention includes a method for testing the network port communication function according to set rules:

[0043] Configure the network properties of the reference network port and the network port under test to enable them to communicate with each other.

[0044] Test the network port's communication capabilities at different speeds;

[0045] Test network port throughput;

[0046] Test the external network;

[0047] Test the stability of the network port connection;

[0048] The method used to test the communication function of the network port at different speeds is as follows:

[0049] Test the various speeds supported by the network interface, set up the routing for the reference network interface and the network interface under test, ping each other at different network speeds, output the test results at various network speeds, and save the results to a file;

[0050] The method used to test the network port throughput is as follows:

[0051] The throughput data between the reference network interface and the network interface under test is tested using iperf software. The required throughput value is set as the test standard value. The test data is compared with the standard value, the final test data result is output, and the result is saved to a file.

[0052] The method used for testing the external network is as follows:

[0053] Connect any network cable to the external network, and have the other network ports obtain IP addresses in sequence. Perform a ping test with the external network and save the results to a file.

[0054] The method used to test the stability of the network port connection is as follows:

[0055] Configure the reference network port and the network port under test to connect and disconnect repeatedly, and set the number of tests. Test the stability of the reference network port and the network port under test when frequently connected and disconnected, and save the results to a file.

[0056] The multi-port device network function rapid detection system of the present invention wherein the network cables at the tail end of the network port connector are connected to each other in the following color matching method: white-orange to white-orange, orange to orange, white-green to white-green, blue to blue, white-blue to white-blue, green to green, white-brown to white-brown, and brown to brown.

[0057] The beneficial effects of this invention are as follows:

[0058] 1. It can be compatible with different Linux systems, automatically detecting and identifying the system and automatically configuring relevant files;

[0059] 2. It can automatically test the number of network ports, both odd and even;

[0060] 3. There is no limit to the number of network ports that can be tested; dozens of network ports can be tested, and corresponding cables can be made according to the number of network ports.

[0061] 4. In the absence of an external network, the script can test the network port loopback communication function. The script will automatically test the communication function and network throughput data of all network ports and output the test results.

[0062] 5. When there is an external network connection, the script can automatically obtain an IP address for external communication. The script will automatically test all network ports and output the test results.

[0063] This method allows for automatic operation after the cables are connected and the script is run, greatly reducing manual intervention and improving testing efficiency and accuracy. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort:

[0065] Figure 1 This is a flowchart of a preferred embodiment of the method for rapid detection of network functions of multi-port devices.

[0066] Figure 2 This is a schematic diagram of the test cable fabrication for the rapid testing method of network port function of multi-port devices according to a preferred embodiment of the present invention;

[0067] Figure 3 This is a flowchart of a method for rapid testing of network functions of multi-port devices according to a preferred embodiment of the present invention. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, a clear and complete description will be provided below in conjunction with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0069] A preferred embodiment of the present invention provides a method for rapid detection of network port functions in multi-port devices, such as... Figure 1 As shown, see also Figure 2 and Figure 3 This includes the following steps:

[0070] S01: Prepare test cables according to the number of network ports of the device under test;

[0071] The test cable includes multiple network port connectors that correspond one-to-one with the network ports, and the network cables at the ends of the connectors are connected to each other.

[0072] S02: Connect the network port connectors on the test cable to the corresponding network ports on the device under test;

[0073] S03: Run the system configuration script to perform network port detection;

[0074] The loop test will continue according to the settings until all network ports have been tested as reference ports. The loop test rules are as follows:

[0075] Select one network port as the reference network port, and use the other network ports as the network ports to be tested, and conduct communication tests with the reference network port in turn.

[0076] Turn on the reference network port and any one of the network ports to be tested, and keep the other network ports to be tested closed.

[0077] Perform network port communication function tests according to the set rules, output the test results and return to the previous step to perform another untested network port test operation until all network ports under test have been tested.

[0078] The beneficial effects of this invention are as follows:

[0079] 1. It can be compatible with different Linux systems, automatically detecting and identifying the system and automatically configuring relevant files;

[0080] 2. It can automatically test the number of network ports, both odd and even;

[0081] 3. There is no limit to the number of network ports that can be tested; dozens of network ports can be tested, and corresponding cables can be made according to the number of network ports.

[0082] 4. In the absence of an external network, the script can test the network port loopback communication function. The script will automatically test the communication function and network throughput data of all network ports and output the test results.

[0083] 5. When there is an external network connection, the script can automatically obtain an IP address for external communication. The script will automatically test all network ports and output the test results.

[0084] This method allows for automatic operation after the cables are connected and the script is run, greatly reducing manual intervention and improving testing efficiency and accuracy.

[0085] like Figure 2 and Figure 3 As shown, more specifically:

[0086] 1. How to make a test network cable:

[0087] Based on the number of network ports required for testing, according to... Figure 2 The methods shown are interconnected to make a cable that can test multiple network ports, taking a 6-port cable as an example;

[0088] The following color-matching method can be used when connecting:

[0089] White orange to white orange, orange to orange, white green to white green, blue to blue, white blue to white blue, green to green, white brown to white brown, brown to brown.

[0090] 2. Cable connection method:

[0091] Connect the test cables to the network ports being tested in any order.

[0092] 3. Script implementation method under the system:

[0093] Network port detection and settings (hereinafter, "down" means to disable the network port, and "up" means to enable the network port).

[0094] The system automatically detects all network ports and shuts them down.

[0095] Use the first network port as the reference network port for testing, and test all other network ports in turn with this network port;

[0096] After bringing up the first network port, keep it in the "up" state. Then bring up the other network ports to be tested, and keep the network ports not to be tested in the "down" state. Then test them one by one until the last network port is tested.

[0097] For example: The device has 10 network ports, namely eth0, eth1...eth10;

[0098] Test eth0 and eth1 first, then test eth0 and eth2, and finally test eth0 and eth10.

[0099] The specific method is as follows: after bringing eth0 up, keep it in the up state. When eth1 needs to be tested, bring eth1 up while keeping other network interfaces in the down state.

[0100] After eth1 is tested, shut it down and bring eth2 up for testing, and so on.

[0101] Network port communication function test:

[0102] Configure communication between two network ports, such as testing eth0 and eth1.

[0103] Configure the IP addresses and routing settings for both network ports, and set up the routing conversion so that the two network ports can communicate with each other after being connected.

[0104] The communication functions include the following:

[0105] Test the communication function of the network port at different speeds. Test the various speeds supported by the network port, such as 10M / 100M / 1000M / 10000M, etc. After the settings are completed, configure the routing conversion of the two network ports. They can ping each other at different network speeds. Output the test results of various network speeds as FAIL or PASS and save the results to a file.

[0106] Network port throughput test: The iperf software is used to test the throughput data between two network ports. The required throughput value is set as the test standard value. The test data is compared with the standard value, and the final test result is output as FAIL or PASS, and the result is saved to a file.

[0107] To test the external network, connect one network cable to the external network, and obtain IP addresses for the other network ports in sequence. Perform a ping test with the external network, output the results, and save the results to a file.

[0108] To test the stability of the network port connection, set the network port to cycle through down and up, and set the number of tests. Then, test the stability of the network port under frequent connection and disconnection, output the test results, and save the results to a file.

[0109] A rapid testing system for the network function of a multi-port device is provided to implement the rapid testing method for the network function of a multi-port device as described above. The system includes a test cable and a testing system.

[0110] The testing cable is made according to the number of network ports of the device under test, and includes multiple network port connectors that correspond one-to-one with each network port. The network cables at the ends of the network port connectors are all connected to each other.

[0111] The testing system performs cyclic testing according to the settings until all network ports have been tested as reference ports. The cyclic testing rules are as follows:

[0112] Select one network port as the reference network port, and use the other network ports as the network ports to be tested, and conduct communication tests with the reference network port in turn.

[0113] Turn on the reference network port and any one of the network ports to be tested, and keep the other network ports to be tested closed.

[0114] Perform network port communication function tests according to the set rules, output the test results and return to the previous step to perform another untested network port test operation until all network ports under test have been tested.

[0115] The beneficial effects of this invention are as follows:

[0116] 1. It can be compatible with different Linux systems, automatically detecting and identifying the system and automatically configuring relevant files;

[0117] 2. It can automatically test the number of network ports, both odd and even;

[0118] 3. There is no limit to the number of network ports that can be tested; dozens of network ports can be tested, and corresponding cables can be made according to the number of network ports.

[0119] 4. In the absence of an external network, the script can test the network port loopback communication function. The script will automatically test the communication function and network throughput data of all network ports and output the test results.

[0120] 5. When there is an external network connection, the script can automatically obtain an IP address for external communication. The script will automatically test all network ports and output the test results.

[0121] This method allows for automatic operation after the cables are connected and the script is run, greatly reducing manual intervention and improving testing efficiency and accuracy.

[0122] For detailed implementation methods, please refer to the above description, which will not be repeated here.

[0123] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for detecting network interface network function of a multi-network interface device quickly, characterized in that, Includes the following steps: Step 1: Fabricate test cables according to the number of network ports on the device under test; The test cable includes multiple network port connectors that correspond one-to-one with the network ports, and the network cables at the ends of the connectors are connected to each other. Step 2: Connect the network port connectors on the test cable to the corresponding network ports on the device under test; Step 3: Run the system-defined script to perform network port testing; The loop test will continue according to the settings until all network ports have been tested as reference ports. The loop test rules are as follows: Select one network port as the reference network port, and use the other network ports as the network ports to be tested, and conduct communication tests with the reference network port in turn. Turn on the reference network port and any one of the network ports to be tested, and keep the other network ports to be tested closed. Perform network port communication function tests according to the set rules, output the test results and return to the previous step to perform another untested network port test operation, until all network ports under test have been tested.

2. The method of claim 1, wherein the method further comprises: The method for testing the network interface communication function according to the set rules includes: Configure the network properties of the reference network port and the network port under test to enable them to communicate with each other. Test the network port's communication capabilities at different speeds; Test network port throughput; Test the external network; Test the stability of the network port connection.

3. The method of claim 2, wherein the method further comprises: The method used to test the communication function of the network port at different speeds is as follows: Test the various speeds supported by the network ports, set up the routing for the reference network port and the network port under test, ping each other at different network speeds, output the test results at various network speeds, and save the results to a file.

4. The method of claim 2, wherein the method further comprises: The method used to test the network port throughput is as follows: The iperf software is used to test the throughput data between the reference network port and the network port under test. The required throughput value is set as the test standard value. The test data is compared with the standard value, the final test data result is output, and the result is saved to a file.

5. The method of claim 2, wherein the method further comprises: The method used for testing the external network is as follows: Connect any network cable to the external network, and have the other network ports obtain IP addresses in sequence. Perform ping tests with the external network and save the results to a file.

6. The method of claim 2, wherein the method further comprises: The method used to test the stability of the network port connection is as follows: Configure the reference network port and the network port under test to connect and disconnect repeatedly, and set the number of tests. Test the stability of the reference network port and the network port under test when frequently connected and disconnected, and save the results to a file.

7. The method of claim 1-6, wherein the method further comprises: The network cables at the ends of the network port connectors are connected to each other using the following color-matching method: White orange to white orange, orange to orange, white green to white green, blue to blue, white blue to white blue, green to green, white brown to white brown, brown to brown.

8. A multi-network port device network port function quick detection system, used for implementing the multi-network port device network port function quick detection method in any of claims 1-7, characterized in that, This includes test cables and testing systems; The test cable is made according to the number of network ports of the device under test, and includes multiple network port connectors that correspond one-to-one with the network ports, with the network cables at the ends of the network port connectors connected to each other. The detection system performs cyclic detection according to a set configuration until all network ports have been tested as reference ports. The cyclic detection rules are as follows: Select one network port as the reference network port, and use the other network ports as the network ports to be tested, and conduct communication tests with the reference network port in turn. Turn on the reference network port and any one of the network ports to be tested, and keep the other network ports to be tested closed. Perform network port communication function tests according to the set rules, output the test results and return to the previous step to perform another untested network port test operation, until all network ports under test have been tested.

9. The multi- net device net network function fast detection system of claim 8, wherein, The method for testing the network interface communication function according to the set rules includes: Configure the network properties of the reference network port and the network port under test to enable them to communicate with each other. Test the network port's communication capabilities at different speeds; Test network port throughput; Test the external network; Test the stability of the network port connection; The method used to test the communication function of the network port at different speeds is as follows: Test the various speeds supported by the network interface, set up the routing for the reference network interface and the network interface under test, ping each other at different network speeds, output the test results at various network speeds, and save the results to a file; The method used to test the network port throughput is as follows: The throughput data between the reference network interface and the network interface under test is tested using iperf software. The required throughput value is set as the test standard value. The test data is compared with the standard value, the final test data result is output, and the result is saved to a file. The method used for testing the external network is as follows: Connect any network cable to the external network, and have the other network ports obtain IP addresses in sequence. Perform a ping test with the external network and save the results to a file. The method used to test the stability of the network port connection is as follows: Configure the reference network port and the network port under test to connect and disconnect repeatedly, and set the number of tests. Test the stability of the reference network port and the network port under test when frequently connected and disconnected, and save the results to a file.

10. The multi-portal device portal network function quick detection system of claim 8, wherein, The network cables at the ends of the network ports are connected to each other using the following color matching method: white-orange to white-orange, orange to orange, white-green to white-green, blue to blue, white-blue to white-blue, green to green, white-brown to white-brown, and brown to brown.

Citation Information

Patent Citations

  • Test method and device for crystal head of network cable

    CN109100606A

  • High and low temperature test method and system for communication equipment with Internet access

    CN109870620A