Port connectivity test method and system

By connecting multiple ports of the auxiliary test equipment to the device under test one by one, and sending and comparing data messages, the problem of low test efficiency and high cost in the existing technology is solved, and efficient and low-cost port connectivity is achieved. sex test.

CN119341942AActive Publication Date: 2025-01-21MAIPU COMM TECH CO LTD

Patent Information

Application Number
CN202310890004.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2025-01-21
Estimated Expiration
2043-07-19

AI Technical Summary

Technical Problem

When testing the port connectivity of low-end switches without software, the test efficiency is low and costly. It is impossible to test multiple ports at once, and the cables of the flow meter need to be frequently replaced.

Method used

Multiple ports of the auxiliary test device and the device under test are connected one by one. The auxiliary test device sends data packets. The device under test copies and forwards the data packets. The auxiliary test device compares the number of received data packets to determine port connectivity. sex.

Benefits of technology

It realizes the simultaneous testing of port connectivity of multiple devices under test, is easy to operate, improves testing efficiency and reduces testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341942A_ABST
    Figure CN119341942A_ABST
Patent Text Reader

Abstract

The invention provides a port connectivity testing method and system, and the method comprises the steps: enabling a plurality of auxiliary testing ports of an auxiliary testing device to be connected with a plurality of to-be-tested ports of a to-be-tested device one by one, enabling the auxiliary testing device to transmit a data message to the connected to-be-tested port through at least one auxiliary testing port, and enabling the to-be-tested device to carry out the testing of the to-be-tested port through the to-be-tested port which receives the data message, and copying and forwarding the data message to other ports to be tested. And each auxiliary testing port of the auxiliary testing equipment receives the data message returned by each to-be-tested port connected with the auxiliary testing port. And comparing the number of the received data messages with the number of the sent data messages so as to judge whether the connectivity between the to-be-tested ports of the to-be-tested equipment is normal or not. According to the scheme, testing is achieved in the mode that the auxiliary testing device and the testing mechanism are combined, testing of multiple devices to be tested can be completed at a time, the connecting mode does not need to be replaced in the process, operation is easy and convenient, testing efficiency can be improved, and testing cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer networks, and in particular to a port connectivity testing method and system. Background Art

[0002] In computer networks, there are a large number of switches to realize the exchange of data messages between devices in the network, and there are many low-end switches without software. Low-end switches without software cannot interact through messages, nor can they configure virtual local area networks (VLANs) through serial ports. Therefore, the port connectivity of such devices can usually be tested by using a flow meter. However, in this method, the tester can provide relatively few test ports. When a single port of the device under test corresponds to multiple forwarding ports, it cannot be tested at one time. It is necessary to frequently replace the cable of the other port of the flow meter to the corresponding test port, which has low test efficiency and high test cost. Therefore, the method of using a flow meter to make a flow has been abandoned by the industry in mass production and testing scenarios due to its low efficiency and high cost. Summary of the invention

[0003] The purpose of the present invention includes, for example, providing a port connectivity test method and system, which can complete the test of multiple devices under test at the same time, and has simple operation and high test efficiency.

[0004] The embodiments of the present invention can be implemented as follows:

[0005] In a first aspect, the present invention provides a port connectivity test method, which is applied to a port connectivity test system including an auxiliary test device and a device under test, wherein a plurality of auxiliary test ports of the auxiliary test device are respectively connected one by one with a plurality of ports under test of the device under test, and the method comprises:

[0006] The auxiliary testing device sends a data message to at least one port under test of the device under test connected to the at least one auxiliary testing port through at least one auxiliary testing port;

[0007] The device under test copies and forwards the data message to other ports under test through at least one port under test that receives the data message;

[0008] Each of the ports under test of the device under test returns the received data message to the auxiliary test device;

[0009] The auxiliary testing device compares the number of data packets received by each of the auxiliary testing ports with the number of data packets sent through the at least one auxiliary testing port to determine whether the connectivity between the ports to be tested of the device to be tested is normal.

[0010] In an optional implementation, the device under test has a DIP switch for switching a forwarding mode of the device under test;

[0011] Before the step of the auxiliary testing device sending a data message to at least one port under test of the device under test connected to the at least one auxiliary testing port through at least one auxiliary testing port, the method further includes:

[0012] The auxiliary testing device obtains a current forwarding mode determined by a current state of a DIP switch on the device under test;

[0013] The auxiliary test device runs a test script corresponding to the current forwarding mode, and determines a port to be tested in the device to be tested for receiving data packets according to the current forwarding mode;

[0014] The auxiliary testing device determines at least one auxiliary testing port connected to the port to be tested in the device to be tested for receiving data packets.

[0015] In an optional embodiment, the method further comprises:

[0016] When the result of the determination is that the connectivity between the ports under test of the device under test is abnormal, the auxiliary test device runs other test scripts corresponding to other forwarding modes of the device under test to perform the test under the other test scripts;

[0017] The auxiliary testing device determines whether the corresponding relationship between the state of the DIP switch of the device under test and the forwarding mode of the device under test is incorrect based on the test results under the other test scripts.

[0018] In an optional implementation manner, the step of the auxiliary testing device determining whether the correspondence between the state of the DIP switch of the device under test and the forwarding mode of the device under test is incorrect based on the test results under the other test scripts includes:

[0019] When the auxiliary test device determines that the connectivity between the ports under test of the device under test is abnormal after executing the test based on the other test script, the auxiliary test device retains the determination result of the abnormal connectivity and determines that the correspondence between the state of the DIP switch of the device under test and the forwarding mode of the device under test is correct;

[0020] If the auxiliary test device determines that the connectivity between the ports under test of the device under test is normal after executing the test based on the other test scripts, the determination result is modified to normal connectivity, and it is determined that the correspondence between the state of the dip switch of the device under test and the forwarding mode of the device under test is incorrect.

[0021] In an optional implementation manner, the step of the auxiliary testing device comparing the number of data packets received by each of the auxiliary testing ports and the number of data packets sent by the at least one auxiliary testing port to determine whether the connectivity between the ports to be tested of the device to be tested is normal includes:

[0022] The auxiliary testing device determines the number of data packets received by each of the auxiliary testing ports and the number of data packets sent by each of the auxiliary testing ports in the at least one auxiliary testing port, wherein the number of data packets sent by each of the auxiliary testing ports is equal;

[0023] When the number of data packets received by the auxiliary test device at each of the auxiliary test ports is equal to the number of data packets sent through each of the auxiliary test ports, or when the number of data packets received at each of the auxiliary test ports is a set multiple of the number of data packets sent through each of the auxiliary test ports, it is determined that the connectivity between the ports under test of the device under test is normal, and the set multiple is the port number of the auxiliary test ports that send data packets.

[0024] In an optional embodiment, the method further comprises:

[0025] The auxiliary testing device obtains the cyclic redundancy check CRC record result of each auxiliary testing port to determine whether the data message received by the auxiliary testing port generates a CRC error code during transmission and the number of CRC error codes when a CRC error code is generated.

[0026] In an optional implementation manner, the step of the device under test copying and forwarding the data message to other ports under test through at least one port under test that receives the data message includes:

[0027] The device under test determines the port rate when the auxiliary test device sends the data message;

[0028] The device under test copies and forwards the data message to other ports under test at the port rate through at least one port under test that receives the data message.

[0029] In a second aspect, the present invention provides a port connectivity test system, the port connectivity test system comprising an auxiliary test device and a device to be tested, wherein a plurality of auxiliary test ports of the auxiliary test device are respectively connected one by one with a plurality of ports to be tested of the device to be tested;

[0030] The auxiliary testing device is used to send a data message to at least one port to be tested of the device to be tested connected to the at least one auxiliary testing port through at least one auxiliary testing port;

[0031] The device under test is used to copy and forward the data message to other ports under test through at least one port under test that receives the data message;

[0032] The device under test is further configured to return the received data packets to the auxiliary test device through each of the ports under test;

[0033] The auxiliary testing device is further used to compare the number of data packets received by each auxiliary testing port with the number of data packets sent through the at least one auxiliary testing port to determine whether the connectivity between the test ports of the device under test is normal.

[0034] In an optional implementation, the device under test has a DIP switch for switching a forwarding mode of the device under test;

[0035] The auxiliary test device is further used to obtain a current forwarding mode determined by a current state of a DIP switch on the device under test, run a test script corresponding to the current forwarding mode, and determine a port under test in the device under test for receiving data packets according to the current forwarding mode;

[0036] The auxiliary testing device is further used to determine at least one auxiliary testing port connected to the port to be tested in the device to be tested for receiving data messages.

[0037] In an optional implementation manner, the auxiliary test device is further used to run other test scripts corresponding to other forwarding modes of the device under test when the determination result is that the connectivity between the ports under test of the device under test is abnormal, so as to perform the test under the other test scripts;

[0038] The auxiliary testing device is further used to determine whether the corresponding relationship between the state of the DIP switch of the device under test and the forwarding mode of the device under test is incorrect based on the test results under the other test scripts.

[0039] The beneficial effects of the embodiments of the present invention include, for example:

[0040] The present application provides a port connectivity test method and system, which connects multiple auxiliary test ports of an auxiliary test device to multiple test ports of a device under test one by one, and then the auxiliary test device sends a data message to the connected port under test through at least one auxiliary test port, and the device under test copies and forwards the data message to other ports under test through the port under test that receives the data message. Each auxiliary test port of the auxiliary test device receives the data message returned by each port under test connected to it. The number of received data messages and sent data messages is compared to determine whether the connectivity between the ports under test of the device under test is normal. This solution uses a combination of auxiliary test equipment and a test mechanism to implement testing, which can complete the testing of multiple devices under test at one time, and there is no need to change the connection method during the process. It is easy to operate, can improve test efficiency and reduce test costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 A structural block diagram of a port connectivity test system provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of the port connection between the device under test and the auxiliary test device provided in an embodiment of the present application;

[0044] Figure 3 A flow chart of a port connectivity testing method provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of multiple forwarding modes of a device under test provided in an embodiment of the present application;

[0046] Figure 5 A flowchart of a method for determining an auxiliary test port provided in an embodiment of the present application;

[0047] Figure 6 Another schematic diagram of the port connection between the device under test and the auxiliary test device provided in the embodiment of the present application;

[0048] Figure 7 A flowchart of a correspondence detection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0050] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0052] In the description of the present invention, it should be noted that the features in the embodiments of the present invention can be combined with each other without conflict.

[0053] See also Figure 1 , is a schematic diagram of an application scenario of the port connectivity test method provided in an embodiment of the present application, wherein the application scenario includes a port connectivity test system composed of an auxiliary test device and a device to be tested. The device to be tested is a low-end switch without software, and the auxiliary test device can be a three-layer switch. The auxiliary test device can be one or more, and the device to be tested can be one or more. Multiple auxiliary test devices can be used to test the port connectivity of multiple devices to be tested, and one auxiliary test device can also be used to test the port connectivity of one or more devices to be tested.

[0054] Specifically, the auxiliary testing device may include multiple auxiliary testing ports, and the device under test includes multiple test ports. When one auxiliary testing device is used to test the port connectivity of multiple devices under test, the total number of auxiliary testing ports of the auxiliary testing device is greater than or equal to the total number of test ports of the multiple devices under test.

[0055] The multiple auxiliary test ports of the auxiliary test device are respectively connected one-to-one with the multiple test ports of the device to be tested. The one-to-one connection here means that each test port of the device to be tested can have a connected auxiliary test port on the auxiliary test device. When the number of auxiliary test ports is greater than the number of ports to be tested, there are auxiliary test ports among the multiple auxiliary test ports on the auxiliary test device that are not connected to the port to be tested.

[0056] Please refer to Figure 2For example, when there are k devices under test and each device under test has m test ports, the number of auxiliary test ports of the auxiliary test device used may be n, where n is greater than or equal to k*m. Figure 2 In which, the test ports 1 to m of the device under test 1 are connected one by one with the auxiliary test ports 1 to m of the auxiliary test device in sequence, and the test ports 1 to m of the device under test 2 are connected one by one with the auxiliary test ports m+1 to 2m of the auxiliary test device in sequence, and this connection method is used until the test ports 1 to m of the device under test k are connected one by one with the auxiliary test ports km-m+1 to km of the auxiliary test device in sequence.

[0057] The present application also provides a port connectivity test method, which can be applied to the above-mentioned port connectivity test system to test the port connectivity of the device to be tested. Figure 3 As shown, the port connectivity testing method provided in this embodiment is introduced in detail below.

[0058] S11, the auxiliary testing device sends a data message to at least one port to be tested of the device to be tested that is connected to the at least one auxiliary testing port through at least one auxiliary testing port.

[0059] S12: The device under test copies and forwards the data message to other ports under test through at least one port under test that receives the data message.

[0060] S13, each tested port of the tested device returns the received data message to the auxiliary testing device.

[0061] S14, the auxiliary testing device compares the number of data packets received by each auxiliary testing port and the number of data packets sent through at least one auxiliary testing port to determine whether the connectivity between the test ports of the device under test is normal.

[0062] In this embodiment, the device to be tested is connected to the auxiliary test device through ports, and multiple auxiliary test ports of the auxiliary test device can be connected one by one with multiple test ports of the device to be tested. The number of auxiliary test ports of the auxiliary test device is greater than or equal to the number of test ports of the device to be tested. When there are multiple devices to be tested, the number of test ports of the device to be tested is the total number of test ports of the multiple devices to be tested. When there are multiple auxiliary test devices, the number of auxiliary test ports of the auxiliary test device is the total number of auxiliary test ports of the multiple auxiliary test devices.

[0063] After establishing a connection relationship between the auxiliary test device and the device under test, a data message can be sent to at least one port under test of the device under test through at least one auxiliary test port of the auxiliary test device. The auxiliary test port used to send data messages to the device under test can be determined based on the port under test used to copy and forward data messages on the device under test. That is, after determining the port under test used for copying and forwarding data messages on the device under test, data messages can be sent to the determined port under test through the auxiliary test port connected to the determined port under test.

[0064] The port under test on the device under test for copying and forwarding data packets can be at least one, that is, one or more (the multiple in this application is two or more). Therefore, the number of auxiliary test ports determined to send data packets to the device under test is correspondingly at least one, that is, one or more.

[0065] The number of data packets sent by the auxiliary test device through each of the at least one auxiliary test port can be set according to the requirements, for example, the number can be four, five, etc. In the case where the number of auxiliary test ports for sending data packets to the device under test exceeds one, the number of data packets sent from each auxiliary test port can be equal to facilitate subsequent statistical analysis.

[0066] After receiving the data message through at least one of the ports under test, the device under test will copy the received data message and forward it to other ports under test. If the connectivity between the ports under test is normal, the data message will be successfully forwarded to other ports under test, but if the connectivity between the ports under test is abnormal, the data message may not be transmitted to other ports under test.

[0067] In addition, the device under test can also feed back data packets to the auxiliary test device. Specifically, each port under test can return data packets to the auxiliary test device through the connected auxiliary test port. After receiving the data packets returned by the port under test connected to it, each auxiliary test port can compare the number of data packets received and sent by each auxiliary test port to determine whether the connectivity between the ports under test of the device under test is normal.

[0068] When the connectivity between the ports under test of the device under test is normal, each port under test will successfully receive the data message. According to the setting of the forwarding mode inside the device under test, the data message received by each port under test may be a data message that is copied and forwarded, or multiple data messages that are copied and forwarded. When the connectivity between the ports under test of the device under test is abnormal, the port under test may not receive the copied and forwarded data message, or may only receive part of the copied and forwarded data message.

[0069] Therefore, after receiving the data message sent by the connected port to be tested, each auxiliary test port can judge whether the connectivity between the ports to be tested of the device to be tested is normal according to the number of received data messages and the number of sent data messages. It should be understood that when the auxiliary test port does not receive the data message sent by the connected port to be tested, it can be understood that when the number of data messages received by the auxiliary test port is 0, it can be determined that the connectivity of the port to be tested is abnormal.

[0070] The port connectivity test method provided in this embodiment connects an auxiliary test device to the device under test, sends a data message to the port under test of the device under test through the auxiliary test port of the auxiliary test device, and then uses each auxiliary test port to receive the returned data message of the port under test connected to it. Compare the number of sent data messages and received data messages to determine whether the connectivity between the ports under test of the device under test is normal. This solution uses a combination of auxiliary test devices and test mechanisms to implement testing, and can complete the testing of multiple devices under test at one time, and there is no need to change the connection method during the process. It is easy to operate, can improve test efficiency and reduce test costs.

[0071] In this embodiment, the forwarding mode inside the device under test may include multiple modes, for example, Figure 4 As shown in FIG. 1 , the first forwarding mode (Mode 1) is to receive a data message sent by the auxiliary test device through a test port A, and then copy and forward the data message to other test ports BH through the test port A. Figure 4 As shown in , the second forwarding mode (Mode 2) is that the data message sent by the auxiliary test device can be received through the two test ports A and B, and the test ports A and B respectively copy the received data message and forward it to the other test port CH. Figure 4 As shown in the third forwarding mode (Mode 3), the data message sent by the auxiliary test device can be received through the two ports A and B under test, and then the port A under test copies the data message and forwards it to the port CE under test, and the port B under test copies the data message and forwards it to the port FH under test.

[0072] It should be noted that the above three forwarding modes are only for illustration and are not used to limit the forwarding mode of the device under test. For example, the device under test can also receive data packets sent by the auxiliary device under test through the three ports under test and copy and forward them. In the actual test process, the corresponding test mechanism can be set based on the actual forwarding mode inside the device under test.

[0073] The device under test has a DIP switch, and the forwarding mode of the device under test can be switched by adjusting the DIP switch. In this embodiment, when the device under test is tested using the auxiliary test device, various forwarding modes of the device under test can be tested. In different forwarding modes, data packets need to be sent to different test ports of the device under test, and correspondingly, the auxiliary test ports used to send data packets to the device under test are also different. Figure 5 In this embodiment, before the auxiliary testing device sends a data message to at least one tested port of the tested device connected to at least one auxiliary testing port through at least one auxiliary testing port, the at least one auxiliary testing port can be determined in the following manner.

[0074] S21, the auxiliary test device obtains the current forwarding mode determined by the current state of the DIP switch on the device under test.

[0075] S22, the auxiliary test device runs a test script corresponding to the current forwarding mode, and determines a port to be tested in the device to be tested for receiving data packets according to the current forwarding mode.

[0076] S23, the auxiliary testing device determines at least one auxiliary testing port connected to the port under test for receiving data packets in the device under test.

[0077] In this embodiment, when the dip switch on the device under test is in different states, the forwarding mode of the device under test can be switched to different modes accordingly. For example, when the dip switch is turned to one position, it switches to the first forwarding mode, and when the dip switch is turned to another position, it switches to the second forwarding mode.

[0078] When testing, after the auxiliary test equipment and the network environment of the device under test are connected, the state of the DIP switch on the device under test can be determined first, and then the current forwarding mode of the device under test can be determined. Assume that the current forwarding mode of the device under test is the first forwarding mode.

[0079] At one end of the auxiliary test device, multiple test scripts may be pre-loaded, and the multiple test scripts may correspond to multiple forwarding modes of the device under test. After determining the current forwarding mode of the device under test, the test script corresponding to the current forwarding mode may be run. For example, the test script corresponding to the first forwarding mode may be run.

[0080] The auxiliary test device may have a display device, through which a pop-up box may be popped up, and a test mode corresponding to the first forwarding mode may be input in the pop-up box, so as to run a test script that executes the test mode.

[0081] When the current forwarding mode of the device under test is determined, the port under test currently used by the device under test to receive data packets can be determined. For example, in the first forwarding mode, Figure 4The port A to be tested receives the data message sent by the auxiliary test device.

[0082] Then, the auxiliary test port on the auxiliary test device connected to the test port A can be determined. Under the execution logic of the test script, the processor of the auxiliary test device will send a data message to the test device through the determined auxiliary test port and execute the above test process.

[0083] After completing the test in one forwarding mode, you can adjust the DIP switch on the device under test to switch to another forwarding mode and perform the test. In this way, you can test the connectivity of the ports of the device under test in different forwarding modes in turn.

[0084] For example, combined with Figure 4 and Figure 6 As shown in , when the auxiliary test device is a three-layer switch with 48 ports, the number of devices under test is 6, and each device under test has 8 ports. Figure 4 As shown in , each device under test has Figure 4 First, connect the test port A of the device under test to the auxiliary test port 1 of the auxiliary test device, connect B to 2, and H to 8. When a total of 6 devices under test are tested simultaneously, connect them in the same way.

[0085] After building the above networking environment, first turn the DIP switches of all devices under test to position 1, that is, the forwarding mode of the corresponding devices under test is the first forwarding mode. Run the test script corresponding to the first forwarding mode on the auxiliary test device. For example, you can enter mode 1 in the display pop-up box of the auxiliary test device to trigger the execution of the corresponding test script. At this time, the auxiliary test device will send data packets through auxiliary test ports 1, 9...41, and then count the data packets received by auxiliary test ports 2 to 8, 10 to 16,...42 to 47. By comparing the data of the sent data packets and the number of received data packets, it can be determined whether the connectivity of each channel of the device under test is normal in the first forwarding mode, and the test results can be displayed through the display pop-up box of the auxiliary test device.

[0086] In addition, the DIP switches of all devices under test can be turned to position 2, that is, the forwarding mode of the corresponding device under test is the second forwarding mode. Run the test script corresponding to the second forwarding mode on the auxiliary test device. For example, enter mode 2 in the display pop-up box of the auxiliary test device to trigger the execution of the corresponding test script. The auxiliary test device sends data packets through auxiliary test ports 1, 2, 9, 10...41, 42, and then counts the data packets received through auxiliary test ports 3 to 8, 11 to 16...43 to 47. Compare the number of received data packets and the number of sent data packets to determine whether the connectivity of each channel of the device under test is normal in the second forwarding mode.

[0087] In addition, the DIP switches of all devices under test can be turned to position 3, that is, the forwarding mode of the corresponding device under test is the third forwarding mode. Run the test script name corresponding to the third forwarding mode on the auxiliary test device. The auxiliary test device sends data packets through auxiliary test ports 1, 2, 9, 10...41, 42, and then receives data packets through auxiliary test ports 3 to 8, 11 to 16...43 to 47. By comparing the number of sent data packets with the number of received data packets, it can be determined whether the connectivity between the channels of the device under test is normal in the third forwarding mode.

[0088] In this embodiment, when the auxiliary test device sends a data message to the device under test, the data message can also be sent at different port rates. Accordingly, after receiving the data message, the device under test can copy and forward the data message in the following manner:

[0089] The device under test determines the port rate when the auxiliary device under test sends a data message, and copies and forwards the data message to other ports under test at the port rate through at least one port under test that receives the data message.

[0090] In this embodiment, considering that different port rates in the device under test have different effects on the copying and forwarding of data packets, when the auxiliary test device sends data packets to the device under test at multiple different port rates, the device under test can switch to the corresponding port rate by self-negotiation, so that the connectivity between the channels of the device under test can be tested to see whether it is normal at different port rates.

[0091] In this embodiment, after the auxiliary test device receives the data message fed back by the device under test, it can be implemented in the following manners to determine whether the connectivity between the ports under test of the device under test is normal by comparing the number of data messages received by each auxiliary test port and the number of data messages sent by the auxiliary test port:

[0092] First, the auxiliary test device determines the number of data packets received by each auxiliary test port and the number of data packets sent by each auxiliary test port in at least one auxiliary test port, wherein the data of the data packets sent by each auxiliary test port is equal. For example, if data packets are sent by two auxiliary test ports, the number of data packets sent by the two auxiliary test ports is the same.

[0093] When the number of data packets received by each auxiliary test port is equal to the number of data packets sent through each auxiliary test port, or when the number of data packets received by each auxiliary test port is a set multiple of the number of data packets sent through each auxiliary test port, it is determined that the connectivity between the test ports of the test device is normal, wherein the set multiple is the port number of the auxiliary test ports that send data packets.

[0094] It should be noted that the above is a judgment mechanism for a single device under test. When multiple devices under test are tested, the above judgment mechanism can be used for each device under test.

[0095] For example, in Figure 4 In the case where the device under test is in the first forwarding mode, the auxiliary test device sends a data message through an auxiliary test port (for one device under test). If the number of data messages received by each auxiliary test port is equal to the number of data messages sent, it is determined that the port connectivity of the device under test is normal in the first forwarding mode. However, if there is an auxiliary test port that receives a number of data messages that is not equal to the number of data messages sent, it is determined that the port connectivity of the device under test is abnormal in the first forwarding mode.

[0096] For example, in Figure 4 When the device under test is in the second forwarding mode, the auxiliary test device sends data packets through two auxiliary test ports (for one device under test). If the number of data packets received by each auxiliary test port is twice the number of data packets sent by each auxiliary test port (that is, the number of auxiliary test ports that send data packets), it is determined that the port connectivity of the device under test in the second forwarding mode is normal. If there is an auxiliary test port that receives data packets that is not equal to twice the number of data packets sent, it is determined that the port connectivity of the device under test in the second forwarding mode is abnormal.

[0097] In this embodiment, there is a corresponding relationship between the state of the DIP switch and the forwarding mode of the device under test, and the forwarding mode of the device under test determines the test script executed on the auxiliary test device. Therefore, if the corresponding relationship between the DIP switch on the device under test and the forwarding mode is incorrect, the current forwarding mode determined based on the current state of the DIP switch of the device under test is not the actual forwarding mode, and the test script executed on the auxiliary test device corresponds to the so-called current forwarding mode, that is, it does not correspond to the actual forwarding mode. In this case, the test result obtained cannot accurately reflect the actual situation of the port connectivity of the device under test.

[0098] Based on the above considerations, please refer to Figure 7 In this embodiment, a method for detecting whether the correspondence between the DIP switch of the device under test and the forwarding mode is incorrect can also be provided, which can be implemented in the following way:

[0099] S31, when the auxiliary testing device determines that the connectivity between the ports under test of the device under test is abnormal, the auxiliary testing device runs other test scripts corresponding to other forwarding modes of the device under test to perform tests under the other test scripts.

[0100] S32, the auxiliary test device determines whether the corresponding relationship between the state of the DIP switch of the device under test and the forwarding mode of the device under test is correct based on the test results under other test scripts.

[0101] As can be seen from the above, when performing the test, the test script corresponding to the current forwarding mode of the device under test is run on the auxiliary test device to perform the test. The current forwarding mode of the device under test is determined based on the current state of the dip switch. If the correspondence between the state of the dip switch and the forwarding mode is incorrect, the current forwarding mode determined will not be the actual forwarding mode. If after executing the test script corresponding to the current forwarding mode of the device under test, the result of the determination is that the connectivity between the ports under test of the device under test is abnormal, other test scripts corresponding to other forwarding modes of the device under test can be run, and the test can be performed under the other test scripts. The other test script can be a test script other than the test script for the current forwarding mode among multiple test scripts.

[0102] Based on the determination results obtained under other test scripts, the final determination of the port connectivity of the device under test can be made, and whether the correspondence between the DIP switch and the forwarding mode is incorrect can be determined.

[0103] In this embodiment, as a possible implementation, whether the corresponding relationship between the state of the DIP switch of the device under test and the forwarding mode of the device under test is incorrect can be determined by the following method:

[0104] When the auxiliary test device determines that the connectivity between the ports under test of the device under test is abnormal after testing based on other test scripts, it retains the determination result of the abnormal connectivity and determines that the correspondence between the DIP switch of the device under test and the forwarding mode of the device under test is correct.

[0105] For example, Figure 4 As shown in , if the DIP switch of the device under test is in position 1, it corresponds to the first forwarding mode of the device under test. After running the test script corresponding to the first forwarding mode on the auxiliary test device to perform the test, the result is that the connectivity between the ports under test of the device under test is abnormal. The test script corresponding to the second forwarding mode can be run on the auxiliary test device to perform the test. If the connectivity between the ports under test of the device under test is determined to be abnormal after the test, the test script corresponding to the third forwarding mode can be run on the auxiliary test device to perform the test. If the connectivity between the ports under test of the device under test is determined to be abnormal after the test. In this case, it can be finally determined that the connectivity between the ports of the device under test is abnormal, and the correspondence between the state of the DIP switch and the forwarding mode is correct.

[0106] In addition, when the auxiliary testing device determines that the connectivity between the ports under test of the device under test is normal after executing the test based on other test scripts, it modifies the determination result to normal connectivity and determines that the correspondence between the state of the dip switch of the device under test and the forwarding mode of the device under test is incorrect.

[0107] Similarly, based on the above, if the connectivity between the ports of the device under test is determined to be normal after the test script corresponding to the second forwarding mode is switched to execute the test, or if the connectivity between the ports is determined to be abnormal after the test script corresponding to the second forwarding mode is switched to execute the test, but the connectivity between the ports is determined to be normal after the test script corresponding to the third forwarding mode is switched to execute the test. Then the abnormal connectivity result previously determined can be modified to a normal connectivity determination result. In addition, it is determined that the correspondence between the state of the dip switch and the forwarding mode is incorrect.

[0108] In this embodiment, based on the above test mechanism, when testing the port connectivity of the device under test, a fast and effective identification method is provided to detect whether there is a welding mix-up, in which the factory easily confuses the correspondence between the state of the dip switch and different eeproms during welding production in the scenario where multiple forwarding modes of the device under test correspond to multiple electrically erasable programmable read-only memories (eeproms), so as to ensure the factory quality of the product and improve production efficiency.

[0109] In this embodiment, in addition to using the above method of comparing the number of sent and received data packets to determine whether the connectivity between the ports of the device under test is normal, it is also possible to monitor whether a cyclic redundancy check (CRC) error code is generated during the packet sending and receiving process. Based on this, the test method provided in this embodiment may also include the following steps:

[0110] The auxiliary test device obtains the cyclic redundancy check CRC record result of each auxiliary test port to determine whether the data message received by the auxiliary test port generates a CRC error code during transmission and the number of CRC error codes when a CRC error code is generated.

[0111] In this embodiment, the test script running on the auxiliary test device may have the function of counting the CRC record results on each auxiliary test port. The CRC record result may indicate whether the data message received by the auxiliary test port generates a CRC error code during the transmission process.

[0112] The CRC record result can be recorded based on the number of packets in the data message. For example, if the number of packets in the data message is 5 and the CRC record result is 0, it indicates that no CRC error code is generated during the transmission of the data message. For example, when the CRC record result is 2, it indicates that 2 data packets have generated CRC error codes during the transmission of the data message.

[0113] In summary, the port connectivity test method provided in this embodiment connects the auxiliary test port of the auxiliary test device to the test port of the device under test, executes the corresponding test script to send data packets, and compares the number of received data packets with the number of sent data packets to test the connectivity between the test ports of the device under test.

[0114] Furthermore, when the device under test has multiple forwarding modes, the test scripts can be switched to complete the test under various forwarding modes. The test results under multiple test scripts can also be combined to determine whether there is an error in the correspondence between the state of the DIP switch of the device under test and its forwarding mode.

[0115] In addition, in this embodiment, the port connectivity test of the device under test can be completed at a variety of different port rates, and the CRC record results of the auxiliary test device port can be automatically queried through the test script to monitor whether a CRC error code is generated during the test.

[0116] Under the test scheme provided in this embodiment, after the networking environment is built, there is no need to frequently change the cable connection mode, and the port connectivity test under multiple forwarding modes and multiple port rates, as well as the EEPROM device welding correctness test can be automatically completed. This test scheme supports simultaneous testing of multiple devices under test, is simple to operate, and helps to improve production efficiency. Testing based on auxiliary test equipment and combined with test scripts has good scalability. When batch production equipment is required, it only needs to increase the number of ports and equipment of the auxiliary test equipment, without adding expensive test instruments, which can save production costs.

[0117] Based on the same inventive concept, the embodiment of the present application provides a port connectivity test system, and the functions of each device in the port connectivity test system are implemented as follows:

[0118] The auxiliary testing device is used to send a data message to at least one port to be tested of the device to be tested connected to the at least one auxiliary testing port through at least one auxiliary testing port;

[0119] The device under test is used to copy and forward the data message to other ports under test through at least one port under test that receives the data message;

[0120] The device under test is also used to return the received data message to the auxiliary test device through each port under test;

[0121] The auxiliary testing device is further used to compare the number of data messages received by each auxiliary testing port with the number of data messages sent through at least one auxiliary testing port to determine whether the connectivity between the test ports of the device under test is normal.

[0122] The port connectivity test system can achieve the technical effects of the port connectivity test method in any of the above-mentioned implementations, which will not be described in detail here.

[0123] In a possible implementation, the device under test has a DIP switch for switching a forwarding mode of the device under test;

[0124] The auxiliary test device is further used to obtain the current forwarding mode determined by the current state of the DIP switch on the device under test, run the test script corresponding to the current forwarding mode, and determine the port under test for receiving the data message in the device under test according to the current forwarding mode;

[0125] The auxiliary testing device is further used to determine at least one auxiliary testing port connected to the port to be tested in the device to be tested for receiving data messages.

[0126] In a possible implementation, the auxiliary test device is further configured to, when the determination result is that the connectivity between the ports under test of the device under test is abnormal, run other test scripts corresponding to other forwarding modes of the device under test, so as to perform the test under the other test scripts;

[0127] The auxiliary test device is also used to determine whether the corresponding relationship between the state of the DIP switch of the device under test and the forwarding mode of the device under test is correct based on the test results under other test scripts.

[0128] In a possible implementation, the auxiliary test device is used to retain the determination result of abnormal connectivity when determining that the connectivity between the ports under test of the device under test is abnormal after executing the test based on other test scripts, and to determine that the correspondence between the state of the DIP switch of the device under test and the forwarding mode of the device under test is correct;

[0129] The auxiliary test device is also used to modify the determination result to normal connectivity when it is determined that the connectivity between the ports under test of the device under test is normal after executing tests based on other test scripts, and to determine that the correspondence between the state of the dip switch of the device under test and the forwarding mode of the device under test is incorrect.

[0130] In a possible implementation, the auxiliary testing device is used to determine the number of data packets received by each auxiliary testing port and the number of data packets sent by each auxiliary testing port of at least one auxiliary testing port, wherein the number of data packets sent by each auxiliary testing port is equal;

[0131] The auxiliary test device is used to determine that the connectivity between the ports under test of the device under test is normal when the number of data packets received at each auxiliary test port is equal to the number of data packets sent through each auxiliary test port, or when the number of data packets received at each auxiliary test port is a set multiple of the number of data packets sent through each auxiliary test port, and the set multiple is the port number of the auxiliary test ports that send data packets.

[0132] In a possible implementation, the auxiliary test device is further used to obtain the cyclic redundancy check (CRC) record results of each auxiliary test port to determine whether the data message received by the auxiliary test port generates a CRC error code during transmission and the number of CRC error codes when a CRC error code is generated.

[0133] In a possible implementation, the device under test is used to determine the port rate when the auxiliary test device sends a data message;

[0134] The device under test is further configured to copy and forward the data message to other ports under test at a port rate through at least one port under test that receives the data message.

[0135] In summary, the port connectivity test method and system provided in the embodiment of the present application, after connecting multiple auxiliary test ports of the auxiliary test device to multiple test ports of the device to be tested one by one, the auxiliary test device sends a data message to the connected port to be tested through at least one auxiliary test port, and the device to be tested copies and forwards the data message to other ports to be tested through the port to be tested that receives the data message. Each auxiliary test port of the auxiliary test device receives the data message returned by each port to be tested connected to it. The number of received data messages and sent data messages is compared to determine whether the connectivity between the ports to be tested of the device to be tested is normal. This scheme adopts a combination of auxiliary test equipment and test mechanism to implement testing, which can complete the testing of multiple devices to be tested at one time, and there is no need to change the connection method during the process. It is easy to operate, can improve test efficiency and reduce test costs.

[0136] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A port connectivity testing method, characterized in that: Applied to a port connectivity test system including an auxiliary test device and a device under test, wherein a plurality of auxiliary test ports of the auxiliary test device are respectively connected one by one with a plurality of ports under test of the device under test, the method comprising: The auxiliary testing device sends a data message to at least one port under test of the device under test connected to the at least one auxiliary testing port through at least one auxiliary testing port; The device under test copies and forwards the data message to other ports under test through at least one port under test that receives the data message; Each of the ports under test of the device under test returns the received data message to the auxiliary test device; The auxiliary testing device compares the number of data packets received by each of the auxiliary testing ports with the number of data packets sent through the at least one auxiliary testing port to determine whether the connectivity between the ports to be tested of the device to be tested is normal.

2. The port connectivity testing method according to claim 1, characterized in that: The device under test has a DIP switch for switching a forwarding mode of the device under test; Before the step of the auxiliary testing device sending a data message to at least one port under test of the device under test connected to the at least one auxiliary testing port through at least one auxiliary testing port, the method further includes: The auxiliary testing device obtains a current forwarding mode determined by a current state of a DIP switch on the device under test; The auxiliary test device runs a test script corresponding to the current forwarding mode, and determines a port to be tested in the device to be tested for receiving data packets according to the current forwarding mode; The auxiliary testing device determines at least one auxiliary testing port connected to the port to be tested in the device to be tested for receiving data packets.

3. The port connectivity testing method according to claim 2, characterized in that: The method further comprises: When the result of the determination is that the connectivity between the ports under test of the device under test is abnormal, the auxiliary test device runs other test scripts corresponding to other forwarding modes of the device under test to perform the test under the other test scripts; The auxiliary testing device determines whether the corresponding relationship between the state of the DIP switch of the device under test and the forwarding mode of the device under test is incorrect based on the test results under the other test scripts.

4. The port connectivity testing method according to claim 3, characterized in that: The step of the auxiliary testing device judging whether the correspondence between the state of the DIP switch of the device under test and the forwarding mode of the device under test is incorrect based on the test results under the other test scripts includes: When the auxiliary test device determines that the connectivity between the ports under test of the device under test is abnormal after executing the test based on the other test script, the auxiliary test device retains the determination result of the abnormal connectivity and determines that the correspondence between the state of the DIP switch of the device under test and the forwarding mode of the device under test is correct; When the auxiliary testing device determines that the connectivity between the ports under test of the device under test is normal after executing the test based on the other test scripts, the auxiliary testing device modifies the determination result to normal connectivity and determines that the correspondence between the state of the dip switch of the device under test and the forwarding mode of the device under test is incorrect.

5. The port connectivity testing method according to claim 1, characterized in that: The step of the auxiliary testing device comparing the data packets received by each of the auxiliary testing ports and the number of data packets sent by the at least one auxiliary testing port to determine whether the connectivity between the ports to be tested of the device to be tested is normal includes: The auxiliary testing device determines the number of data packets received by each of the auxiliary testing ports and the number of data packets sent by each of the auxiliary testing ports in the at least one auxiliary testing port, wherein the number of data packets sent by each of the auxiliary testing ports is equal; When the number of data packets received by the auxiliary test device at each of the auxiliary test ports is equal to the number of data packets sent through each of the auxiliary test ports, or when the number of data packets received at each of the auxiliary test ports is a set multiple of the number of data packets sent through each of the auxiliary test ports, it is determined that the connectivity between the ports under test of the device under test is normal, and the set multiple is the port number of the auxiliary test ports that send data packets.

6. The port connectivity testing method according to claim 1, characterized in that: The method further comprises: The auxiliary testing device obtains the cyclic redundancy check CRC record result of each auxiliary testing port to determine whether the data message received by the auxiliary testing port generates a CRC error code during transmission and the number of CRC error codes when a CRC error code is generated.

7. The port connectivity testing method according to claim 1, characterized in that: The step of the device under test duplicating and forwarding the data message to other ports under test through at least one port under test that receives the data message comprises: The device under test determines the port rate when the auxiliary test device sends the data message; The device under test copies and forwards the data message to other ports under test at the port rate through at least one port under test that receives the data message.

8. A port connectivity test system, characterized in that: The port connectivity test system comprises an auxiliary test device and a device to be tested, wherein a plurality of auxiliary test ports of the auxiliary test device are respectively connected one by one with a plurality of ports to be tested of the device to be tested; The auxiliary testing device is used to send a data message to at least one port to be tested of the device to be tested connected to the at least one auxiliary testing port through at least one auxiliary testing port; The device under test is used to copy and forward the data message to other ports under test through at least one port under test that receives the data message; The device under test is further configured to return the received data packets to the auxiliary test device through each of the ports under test; The auxiliary testing device is further used to compare the number of data packets received by each auxiliary testing port with the number of data packets sent through the at least one auxiliary testing port to determine whether the connectivity between the test ports of the device under test is normal.

9. The port connectivity test system according to claim 8, characterized in that: The device under test has a DIP switch for switching a forwarding mode of the device under test; The auxiliary test device is further used to obtain a current forwarding mode determined by a current state of a DIP switch on the device under test, run a test script corresponding to the current forwarding mode, and determine a port under test in the device under test for receiving data packets according to the current forwarding mode; The auxiliary testing device is further used to determine at least one auxiliary testing port connected to the port to be tested in the device to be tested for receiving data messages.

10. The port connectivity test system according to claim 8, characterized in that: The auxiliary testing device is further configured to, when the determination result is that the connectivity between the ports under test of the device under test is abnormal, run other test scripts corresponding to other forwarding modes of the device under test, so as to perform the test under the other test scripts; The auxiliary testing device is further used to determine whether the corresponding relationship between the state of the DIP switch of the device under test and the forwarding mode of the device under test is incorrect based on the test results under the other test scripts.

Citation Information

Patent Citations

  • Method, device and system for testing switchboard connectivity

    CN101296131A

  • Connectivity test method, apparatus and system

    CN107634871A

  • Network equipment testing method and system

    US20070047448A1

Cited By

  • Multi-rate switching error code testing device and working method thereof

    CN121056361A