Test method and device of ethernet interface pair, electronic equipment and storage medium
By sending PRBS configuration commands to the Ethernet interface from the chassis network device and confirming the execution results, the problems of inaccurate test results and low efficiency are solved, and accurate judgment and efficient testing are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DPTECH TECH
- Filing Date
- 2023-05-31
- Publication Date
- 2026-04-21
AI Technical Summary
In chassis-type network devices, existing technologies cannot accurately determine the reasons for Ethernet interface test failures, and the excessively long waiting time leads to low test efficiency.
The main control board sends PRBS configuration commands to the first and second target interfaces in the Ethernet interface pair, respectively. After receiving and confirming the command execution results, it sends PRBS test result acquisition commands and determines the test results based on the execution results.
It improves the interpretability of test results, accurately identifies the causes of test failures, and increases testing efficiency.
Smart Images

Figure CN116684322B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of network communication technology, and more particularly to a method, apparatus, electronic device, and storage medium for testing Ethernet interface pairs. Background Technology
[0002] During factory overhaul of chassis network equipment, communication quality tests need to be performed on each Ethernet interface in the chassis network equipment to ensure that the chassis network equipment can communicate normally.
[0003] Because the Ethernet interfaces inside chassis network devices are not visible and cannot be connected to traffic transceiver instruments used for testing, PRBS (Pseudo-Random Binary Sequence) testing is usually used to test the communication quality of Ethernet interfaces.
[0004] For example, a chassis-type network device may include a main control board and interface boards. When testing a specific Ethernet interface on an interface board using PRBS detection, the main control board can first send a PRBS configuration command to the interface board, causing the interface board to send a PRBS stream. Then, after waiting 3 seconds, the main control board can send a PRBS result retrieval command to the interface board to determine the communication quality of the Ethernet interface based on the actual PRBS stream received by the interface board. The 3-second wait time is a preset duration based on engineering experience and is merely an example.
[0005] Therefore, in the embodiments shown above, on the one hand, since the interface board may not have completed configuration after a 3-second wait, the cause of failure cannot be accurately determined when the test result for the Ethernet interface fails. On the other hand, if the preset waiting time is too long, it will reduce the efficiency of testing the Ethernet interface. Summary of the Invention
[0006] This application provides a testing method for Ethernet interface pairs, the method being applied to a main control board included in a chassis network device; the chassis network device further includes a first interface board and a second interface board; the Ethernet interface pair includes a first target interface on the first interface board and a second target interface on the second target interface board; the method includes:
[0007] A first PRBS configuration command is issued to the first interface board and the second interface board respectively, so that the first interface board responds to the first PRBS configuration command and enables the first target interface to send a PRBS stream to the second target interface, and so that the second interface board responds to the first PRBS configuration command and enables the second target interface to send a PRBS stream to the first target interface;
[0008] Receive the execution results of the first PRBS configuration command returned by the first interface board and the second interface board;
[0009] In response to the success of the execution results of the first PRBS configuration command returned by the first interface board and the second interface board, a PRBS detection result acquisition command is sent to the first interface board and the second interface board respectively;
[0010] The system receives the execution results of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board, and determines the test results for the Ethernet interface pair based on the received execution results of the PRBS detection result acquisition instruction.
[0011] Optionally, the method further includes:
[0012] After receiving the execution results of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board, a second PRBS configuration instruction is issued to the first interface board and the second interface board respectively, so that the first target interface stops sending PRBS stream to the second target interface in response to the second PRBS configuration instruction, and the second target interface stops sending PRBS stream to the first target interface in response to the second PRBS configuration instruction.
[0013] Optionally, if the execution result of the first PRBS configuration instruction returned by the first interface board is successful, it indicates that the first target interface is successfully enabled to send the PRBS stream to the second target interface; if the execution result of the first PRBS configuration instruction returned by the second interface board is successful, it indicates that the second target interface is successfully enabled to send the PRBS stream to the first target interface.
[0014] Optionally, the method further includes:
[0015] If the execution result of the first PRBS configuration command returned by the first interface board or the second interface board is a failure, it is determined that the test result for the Ethernet interface pair is a failure.
[0016] Optionally, the method further includes:
[0017] After issuing the first PRBS configuration command to the first interface board and the second interface board respectively, if the execution result of the first PRBS configuration command is not received from the first interface board and the second interface board within a preset time period, the test result for the Ethernet interface pair is determined to be a failure.
[0018] Optionally, the first target interface includes one or more interfaces on the first interface board; the second target interface includes one or more interfaces on the second interface board.
[0019] Wherein, when the first target interface includes multiple interfaces on the first interface board, the execution result of the first PRBS configuration instruction returned by the first interface board is success, which is used to indicate that each interface in the first target interface is successfully enabled to send PRBS code stream to the second target interface.
[0020] When the second target interface includes multiple interfaces on the second interface board, the execution result of the first PRBS configuration instruction returned by the second interface board is successful, which indicates that each interface in the second target interface is successfully enabled to send PRBS streams to the first target interface.
[0021] Optionally, the chassis network device is a chassis firewall or a chassis switch.
[0022] This application also provides a testing device for Ethernet interface pairs, the device being applied to a main control board included in a chassis network device; the chassis network device further includes a first interface board and a second interface board; the Ethernet interface pair includes a first target interface on the first interface board and a second target interface on the second target interface board; the device includes:
[0023] The sending unit is configured to send a first PRBS configuration command to the first interface board and the second interface board respectively, so that the first interface board responds to the first PRBS configuration command to enable the first target interface to send a PRBS stream to the second target interface, and so that the second interface board responds to the first PRBS configuration command to enable the second target interface to send a PRBS stream to the first target interface.
[0024] The receiving unit is used to receive the execution result of the first PRBS configuration instruction returned by the first interface board and the second interface board;
[0025] The sending unit is further configured to, in response to the fact that the execution results of the first PRBS configuration command returned by the first interface board and the second interface board are both successful, send PRBS detection result acquisition commands to the first interface board and the second interface board respectively;
[0026] The receiving unit is further configured to receive the execution result of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board;
[0027] The determining unit is used to obtain the execution result of the instruction based on the received PRBS detection result, and to determine the test result for the Ethernet interface pair.
[0028] This application also provides an electronic device, including a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus;
[0029] The memory stores machine-readable instructions, and the processor executes the above method by invoking the machine-readable instructions.
[0030] This application also provides a machine-readable storage medium storing machine-readable instructions, which, when called and executed by a processor, implement the above-described method.
[0031] Through the above embodiments, when testing Ethernet interface pairs in a chassis network device, after the main control board sends the first PRBS configuration command to the first interface board where the first target interface in the Ethernet interface pair is located and the second interface board where the second target interface in the Ethernet interface pair is located, in response to the successful execution results of the first PRBS configuration command returned by the first interface board and the second interface board, the main control board sends the PRBS detection result acquisition command to the first interface board and the second interface board respectively, and determines the test result for the Ethernet interface pair based on the execution result of the received PRBS detection result acquisition command.
[0032] By using the above methods, on the one hand, when the test result for the Ethernet interface fails, the interpretability of the test result can be guaranteed, which is conducive to accurately determining the reason for the test failure and avoiding the situation where the main control board continues to send PRBS test result acquisition instructions to the first interface board and the second interface board before the first interface board or the second interface board has successfully executed the first PRBS configuration instruction.
[0033] On the other hand, since there is no need to set an excessively long waiting time, it can be ensured that after the first interface board and the second interface board successfully execute the first PRBS configuration command, the main control board will then send the PRBS test result acquisition command to the first interface board and the second interface board. This ensures the interpretability of the test results and helps to improve the efficiency of testing Ethernet interfaces using the PRBS detection method. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a schematic diagram of the hardware structure of a chassis network device, as shown in an exemplary embodiment.
[0036] Figure 2 This is a flowchart illustrating a test method for an Ethernet interface pair, as shown in an exemplary embodiment.
[0037] Figure 3 This is a schematic diagram of the structure of an electronic device containing a test apparatus for an Ethernet interface pair, as shown in an exemplary embodiment.
[0038] Figure 4 This is a block diagram illustrating a test apparatus for an Ethernet interface pair, as shown in an exemplary embodiment. Detailed Implementation
[0039] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0040] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0041] With the continuous development of network communication technology, the market demands for the packet forwarding capabilities of network devices are gradually increasing. To test the factory quality of network devices, it is essential to test the communication quality of their Ethernet interfaces. An Ethernet interface is the interface through which a network device sends and receives Ethernet packets to and from other network devices. By observing the statistical data of each Ethernet interface (such as whether it can communicate normally, packet loss rate, bit error rate, etc.), it is possible to determine whether the communication quality of the Ethernet interface is up to standard.
[0042] In a chassis-type network device, the interface boards are connected by connectors, forming Ethernet interface pairs based on the Ethernet interfaces on each board that need to communicate. Since the Ethernet interfaces of a chassis-type network device are internal, it's impossible to connect traffic transceiver instruments used for testing. Therefore, PRBS (Pressure Probability and Quality) testing is typically used to test the Ethernet interface communication quality.
[0043] A chassis-based network device may include a main control board and interface boards. When performing PRBS testing on a specific Ethernet interface on an interface board, the main control board first sends a PRBS configuration command to the interface board, instructing the interface board to send a PRBS stream. Further, after a 3-second wait, the main control board sends a PRBS result retrieval command to the interface board. The main control board determines the communication quality of the Ethernet interface based on the PRBS stream sent by the interface board and the actual received PRBS stream. The 3-second wait time is a preset duration based on engineering experience and is merely an example.
[0044] Therefore, in the embodiments shown above, on the one hand, since the interface board may not have completed configuration after a 3-second wait, the cause of failure cannot be accurately determined when the test result for the Ethernet interface fails. On the other hand, if the preset waiting time is too long, it will reduce the efficiency of testing the Ethernet interface.
[0045] In view of this, this specification aims to propose a technical solution in which the main control board can know the execution result of each instruction issued to the interface board when testing Ethernet interface pairs using the PRBS detection method.
[0046] In this specification, a chassis network device may include a main control board and multiple interface boards. The chassis network device includes an Ethernet interface pair to be tested, which may include a first target interface located on a first interface board and a second target interface located on a second interface board. Specifically, the first target interface may be one or more interfaces located on the first interface board, and the second target interface may be one or more interfaces located on the second interface board.
[0047] When testing the Ethernet interface pair under test, the main control board in the chassis network device can issue a first PRBS configuration command to both the first interface board and the second interface board. In response to the first PRBS configuration command, the first interface board enables the first target interface to send a PRBS stream to the second target interface. In response to the first PRBS configuration command, the second interface board enables the second target interface to send a PRBS stream to the first target interface.
[0048] Furthermore, the main control board can receive the execution results of the first PRBS configuration command returned by the first interface board and the second interface board. If the execution results of the first PRBS configuration command returned by the first interface board and the second interface board are both successful, the main control board will issue PRBS detection result acquisition commands to the first interface board and the second interface board respectively. Further still, the main control board can receive the execution results of the PRBS detection result acquisition commands returned by the first interface board and the second interface board, and determine the test results for the Ethernet interface pair based on the received execution results of the PRBS detection result acquisition commands.
[0049] Therefore, the technical solution in this specification can ensure the interpretability of the test results when the test result for the Ethernet interface fails, which is conducive to accurately determining the cause of the test failure and avoiding the situation where the main control board continues to send PRBS test result acquisition instructions to the first interface board and the second interface board before the first interface board or the second interface board has successfully executed the first PRBS configuration instruction.
[0050] On the other hand, since there is no need to set an excessively long waiting time, it can be ensured that after the first interface board and the second interface board successfully execute the first PRBS configuration command, the main control board will then send the PRBS test result acquisition command to the first interface board and the second interface board. This ensures the interpretability of the test results and helps to improve the efficiency of testing Ethernet interfaces using the PRBS detection method.
[0051] The present application will now be described through specific embodiments and in conjunction with specific application scenarios.
[0052] Please see Figure 1 , Figure 1 This is a schematic diagram of a chassis-type network device hardware structure, illustrating an exemplary embodiment. (As shown...) Figure 1 As shown, the chassis network device may include a main control board 101, an interface board 102, and an interface board 103.
[0053] In this manual, the main control board is responsible for the centralized control and management of the chassis network device, as well as data exchange. The main control board includes a Central Processing Unit (CPU) and a forwarding engine. The CPU is responsible for centralized control and management, while the forwarding engine is responsible for packet forwarding. After a packet enters the main control board's network port, it is forwarded by the forwarding engine and then sent to the CPU for processing.
[0054] An interface board, also known as a line processing unit, is a module on a physical device used to provide data forwarding functionality, offering optical and electrical ports at different rates. The switching network board is responsible for providing a high-speed, non-blocking data channel for the entire system, enabling service exchange between various service modules. Both the interface board and the switching network board contain switching chips (hereinafter referred to as switching chips) for forwarding network packets, forming the control and management plane of the entire device together with the main control board. Interface boards are connected to each other via the switching network board, and communication between interface boards is uniformly forwarded by the switching network board. The interface board mentioned in this manual may also be referred to as a single board, service board, or card, etc., and this manual does not impose any restrictions on these terms.
[0055] Figure 1 The chassis network device includes several interface boards and several slots (not shown in the figure). One interface board can be inserted into each slot, and each interface board is equipped with a switching chip. The specific number of interface boards and slots is not limited in this specification.
[0056] In another embodiment shown, to increase bandwidth, improve packet forwarding capabilities, and meet the data transmission needs of network devices, a switching chip can be added to the main control board. Besides the main control CPU, the switching chip can also forward packets. Adding a dedicated switching chip for packet forwarding to the main control board allows the board to have more Ethernet interfaces, enhancing the network device's packet forwarding service capabilities.
[0057] The chassis network device can be a chassis firewall, chassis switch, or chassis router, etc. It should be noted that the hardware structure and specific form of the chassis network device shown in the above embodiments are merely exemplary descriptions and do not constitute a limitation of this specification.
[0058] In such Figure 1 In the chassis-type network device shown, interface board 102 or interface board 103 may include at least one Ethernet interface. It should be noted that... Figure 1 The interface port_1 on interface board 102 and interface port_2 on interface board 103 are shown only as examples and are not intended to impose any particular limitations on this specification.
[0059] Please see Figure 2 , Figure 2 This is a flowchart illustrating a testing method for an Ethernet interface pair, as shown in an exemplary embodiment. The method can be applied to, for example... Figure 1 The chassis-type network device shown includes a main control board 101. The method can perform the following steps:
[0060] Step 202: Send a first PRBS configuration command to the first interface board and the second interface board respectively, so that the first interface board responds to the first PRBS configuration command to enable the first target interface to send a PRBS stream to the second target interface, and so that the second interface board responds to the first PRBS configuration command to enable the second target interface to send a PRBS stream to the first target interface.
[0061] For example, such as Figure 1 As shown, the first interface board is interface board 102, and the second interface board is interface board 103. The first target interface is interface port_1 on interface board 102, and the second target interface is interface port_2 on interface board 103. The main control board 101 can issue a first PRBS configuration command to interface board 102, so that interface board 102, in response to the first PRBS configuration command, enables interface port_1 on interface board 102 to send a PRBS stream to interface port_2 on interface board 103. The main control board 101 can also issue a first PRBS configuration command to interface board 103, so that interface board 103, in response to the first PRBS configuration command, enables interface port_2 on interface board 103 to send a PRBS stream to interface port_1 on interface board 102.
[0062] In step 202, the first interface board and the second interface board can be any two interface boards on the chassis network device that require PRBS testing. The first target interface can be one or more interfaces on the first interface board that require PRBS testing. The second target interface can be one or more interfaces on the second interface board that require PRBS testing. The Ethernet interface pair requiring PRBS testing for communication quality consists of interface port_1 on interface board 102 and interface port_2 on interface board 103.
[0063] In step 202, the main control board issues first PRBS configuration instructions to the first interface board and the second interface board respectively. Specifically, this may include the CPU of the main control board 101 accessing the switching chip of the main control board through the PCI-Express (peripheral component interconnect express) bus, and issuing the first PRBS configuration instructions to the first interface board and the second interface board by writing to the registers of the switching chip. It should be noted that the implementation of issuing the first PRBS configuration instructions in the above-described embodiments is merely an exemplary description and does not represent a limitation of this specification.
[0064] In some possible embodiments, in step 202, the first PRBS configuration instruction includes at least the Ethernet interfaces on interface boards 102 and 103 that require PRBS detection, and the type of PRBS detection. The PRBS detection configuration instruction is issued by the CPU of the main control board, and transmitted via a forwarding engine or switching chip to the switching chip of the first interface board where the first target interface is located, and the switching chip of the second interface board where the second target interface is located, for processing.
[0065] Regarding the types of PRBS detection, they can be divided into 31 PRBS detection methods, ranging from PRBS1 to PRBS31, based on the different PRBS code orders. Currently, the main PRBS detection types used are PRBS7, PRBS15, PRBS23, and PRBS31. This specification does not limit the types of PRBS detection described herein.
[0066] In some possible embodiments, in step 202, the PRBS bitstream is emitted by a PRBS pattern generator. It should be noted that the method of PRBS bitstream emission in the embodiments shown above is merely an exemplary description and does not constitute a limitation of this specification.
[0067] In this specification, the order in which the first interface board and the second interface board respond to the first PRBS configuration command and the second interface board respond to the first PRBS configuration command are not limited in this specification.
[0068] Step 204: Receive the execution results of the first PRBS configuration command returned by the first interface board and the second interface board.
[0069] In one embodiment shown, the method may further include:
[0070] The execution result of the first PRBS configuration command returned by the first interface board is "successful", which indicates that the first target interface is successfully enabled to send the PRBS stream to the second target interface; the execution result of the first PRBS configuration command returned by the second interface board is "successful", which indicates that the second target interface is successfully enabled to send the PRBS stream to the first target interface.
[0071] For example, such as Figure 1As shown, the first interface board is interface board 102, and the second interface board is interface board 103. The main control board 101 can receive the execution result of the first PRBS configuration command returned by interface board 102, and it can also receive the execution result of the first PRBS configuration command returned by interface board 103. If the main control board 101 receives a successful execution result of the first PRBS configuration command returned by interface board 102, it indicates that interface port_1 has successfully enabled the sending of the PRBS stream to interface port_2. If the main control board 101 receives a successful execution result of the first PRBS configuration command returned by interface board 103, it indicates that interface port_2 has successfully enabled the sending of the PRBS stream to interface port_1.
[0072] In step 204, the CPU of the main control board 101 accesses the interface board switching chip via the PCI-Express bus. The main control board 101 obtains the execution result of the first PRBS configuration instruction by reading the registers of the interface board switching chip. It should be noted that the implementation of receiving the execution result in the above-described embodiments is merely an exemplary description and does not constitute a limitation of this specification.
[0073] In step 204, if the execution result of the first PRBS configuration command returned by the first interface board is successful, it indicates that the first PRBS configuration command was successfully executed on the first interface board, meaning that the first interface board successfully configured the Ethernet interface requiring PRBS detection and the type of PRBS detection. This indicates that the first target interface on the first interface board has been successfully enabled to start sending PRBS streams to the second target interface on the second interface board. The case where the execution result of the first PRBS configuration command returned by the second interface board is successful is similar to that of the first interface board and will not be described again here.
[0074] In step 204, if the execution result of the first PRBS configuration command returned by the first interface board is a failure, it indicates that the first target interface failed to successfully send the PRBS stream to the second target interface. Conversely, if the execution result of the first PRBS configuration command returned by the second interface board is a failure, it indicates that the second target interface failed to successfully send the PRBS stream to the first target interface.
[0075] In this specification, the order in which the first interface board and the second interface board execute the first PRBS configuration command is not specified.
[0076] Step 206: In response to the successful execution results of the first PRBS configuration command returned by the first interface board and the second interface board, a PRBS detection result acquisition command is sent to the first interface board and the second interface board respectively.
[0077] For example, such as Figure 1 As shown, if the execution results of the first PRBS configuration command returned by the interface board 102 and the interface board 103 are both successful, the main control board 101 will continue to send PRBS detection result acquisition commands to the interface board 102 and the interface board 103 respectively.
[0078] In step 206, the main control board 101 sends PRBS detection result acquisition instructions to the first interface board and the second interface board, respectively. This specification does not specify the order in which the PRBS detection result acquisition instructions are sent to the first and second interface boards.
[0079] In step 206, the CPU of the main control board 101 accesses the interface board switching chip via the PCI-Express bus. The main control board 101 sends the PRBS detection result acquisition instructions to the switching chips of the first and second interface boards respectively by writing to the registers of the interface board switching chips. It should be noted that, in the embodiments shown above, the method of issuing the result acquisition instructions is not limited in this specification.
[0080] Step 208: Receive the execution result of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board, and determine the test result for the Ethernet interface pair based on the received execution result of the PRBS detection result acquisition instruction.
[0081] For example, such as Figure 1 As shown, the main control board 101 receives the execution result of the PRBS detection result acquisition instruction returned by the interface board 102 and the interface board 103. Based on the received execution result of the PRBS detection result acquisition instruction, the main control board 101 determines the test result of the Ethernet interface pair consisting of the first target interface and the second target interface.
[0082] In step 208, if the main control board 101 successfully receives the PRBS detection result acquisition instruction returned by the first interface board, it indicates that the main control board 101 has successfully acquired the PRBS detection result returned by the first target interface on the first interface board. If the main control board 101 fails to receive the PRBS detection result acquisition instruction returned by the first interface board, it indicates that the main control board 101 has failed to successfully acquire the PRBS detection result returned by the first target interface on the first interface board. The situation regarding the PRBS detection result acquisition instruction returned by the second interface board is similar to that of the first interface board and will not be described again here.
[0083] In step 208, the CPU of the main control board 101 accesses the interface board switching chip via the PCI-Express bus. The main control board 101 obtains the PRBS detection result acquisition instruction execution result by reading the registers of the interface board switching chip. It should be noted that the implementation method of receiving the PRBS detection result acquisition instruction execution result in the above-described embodiment is merely an exemplary description and does not represent a limitation of this specification.
[0084] In step 208, when the PRBS detection result acquisition instruction returned by the first interface board is successful, it indicates that the first target interface on the first interface board has successfully performed the PRBS detection, and compares the PRBS bitstream sent out and the PRBS bitstream received back to obtain the communication quality result.
[0085] In step 208, when the PRBS detection result acquisition instruction returned by the first interface board is successful, the main control board 101 can also acquire the communication quality result of the first target interface on the first interface board, thereby determining the communication quality of the first target interface. The evaluation criterion for qualified communication quality is based on the bit error rate and packet loss rate obtained from PRBS detection being lower than a preset threshold. The communication quality evaluation criterion for the second target interface of the second interface board is similar to that for the first target interface of the first interface board, and will not be repeated here. It should be noted that in the embodiments shown above, the communication quality evaluation criteria are merely an exemplary description and do not represent a limitation of this specification.
[0086] In one embodiment shown, to terminate the entire PRBS detection process after the first PRBS configuration command and the PRBS detection result acquisition command are successfully executed, the method may further include:
[0087] After receiving the execution results of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board, a second PRBS configuration instruction is issued to the first interface board and the second interface board respectively, so that the first target interface stops sending PRBS stream to the second target interface in response to the second PRBS configuration instruction, and the second target interface stops sending PRBS stream to the first target interface in response to the second PRBS configuration instruction.
[0088] For example, such as Figure 1As shown, after receiving the execution results of the PRBS detection result acquisition instruction returned by the interface boards 102 and 103, the main control board 101 then issues a second PRBS configuration instruction to the interface boards 102 and 103 respectively, so that the interface board 102 responds to the second PRBS configuration instruction and the interface port_1 stops sending the PRBS stream to the interface port_2, and the interface board 103 responds to the second PRBS configuration instruction and the interface port_2 stops sending the PRBS stream to the interface port_1.
[0089] The second PRBS configuration command is a command to disable PRBS stream transmission. After the main control board 101 successfully receives the execution results of the PRBS detection result acquisition command returned by the first and second interface boards, i.e., after successfully completing step 208, the main control board 101 issues the command to disable PRBS stream transmission to the first and second interface boards respectively. In this specification, the order in which the first and second interface boards receive and execute the second PRBS configuration command is not specified.
[0090] It should be noted that in the embodiments shown above, when the main control board 101 fails to successfully receive the execution result of the PRBS detection result acquisition instruction returned by the first interface board or the second interface board, the reason for the PRBS detection failure can be investigated, and the second PRBS configuration instruction will not be issued temporarily. The embodiments shown above improve the convenience of PRBS detection.
[0091] In one embodiment shown, to avoid invalid detection by not continuing to send PRBS result acquisition commands to the first and second interface boards in the event that the first PRBS command fails, the method may further include:
[0092] If the execution result of the first PRBS configuration command returned by the first interface board or the second interface board is a failure, it is determined that the test result for the Ethernet interface pair is a failure.
[0093] For example, such as Figure 1 As shown, if the main control board 101 receives a failure message from the interface board 102 indicating that the execution result of the first PRBS configuration command has failed, it means that the PRBS stream transmission from interface port_1 to interface port_2 has not been successfully enabled. If the main control board 101 receives a failure message from the interface board 103 indicating that the execution result of the first PRBS configuration command has failed, it means that the PRBS stream transmission from interface port_2 to interface port_1 has not been successfully enabled.
[0094] The failure of the first PRBS configuration command returned by the first interface board indicates that the command failed to execute on the first interface board, meaning the first interface board failed to successfully configure the Ethernet interface requiring PRBS detection and the type of PRBS detection. The first target interface on the first interface board failed to send the PRBS stream to the second target interface on the second interface board. The failure of the first PRBS configuration command returned by the second interface board is similar to that of the first interface board and will not be described further.
[0095] In one embodiment shown, in order to further improve detection efficiency after issuing the first PRBS configuration command, the method may further include:
[0096] After issuing the first PRBS configuration command to the first interface board and the second interface board respectively, if the execution result of the first PRBS configuration command is not received from the first interface board and the second interface board within a preset time period, the test result for the Ethernet interface pair is determined to be a failure.
[0097] For example, such as Figure 1 As shown, after the main control board 101 sends the first PRBS configuration command to the interface board 102, if the main control board 101 does not receive the execution result of the first PRBS configuration command returned by the interface board 102 within a preset time period, it indicates that the PRBS stream transmission from interface port_1 to interface port_2 has not been successfully enabled. After the main control board 101 sends the first PRBS configuration command to the interface board 103, if the main control board 101 does not receive the execution result of the first PRBS configuration command returned by the interface board 103 within a preset time period, it indicates that the PRBS stream transmission from interface port_2 to interface port_1 has not been successfully enabled.
[0098] If, within a preset time period, the main control board 101 does not receive the execution result of the first PRBS configuration command returned by the first interface board, it indicates that the first PRBS configuration command failed to execute on the first interface board, meaning that the first interface board failed to successfully configure the Ethernet interface requiring PRBS detection and the type of PRBS detection. The first target interface on the first interface board failed to send the PRBS stream to the second target interface on the second interface board. The situation where the main control board 101 does not receive the execution result of the first PRBS configuration command returned by the second interface board within the preset time period is similar to that of the first interface board and will not be described further here.
[0099] In one embodiment shown, to further improve detection efficiency by performing batch testing on multiple Ethernet interface pairs on the first interface board and the second interface board, the method may further include:
[0100] The first target interface includes one or more interfaces on the first interface board; the second target interface includes one or more interfaces on the second interface board; wherein, when the first target interface includes multiple interfaces on the first interface board, the execution result of the first PRBS configuration instruction returned by the first interface board is successful, indicating that each interface in the first target interface is successfully enabled to send PRBS streams to the second target interface; when the second target interface includes multiple interfaces on the second interface board, the execution result of the first PRBS configuration instruction returned by the second interface board is successful, indicating that each interface in the second target interface is successfully enabled to send PRBS streams to the first target interface.
[0101] For example, such as Figure 1 As shown, Figure 1 The example only shows interface port_1 on interface board 102. In practical applications, the first interface board may include multiple interfaces. For example, interface board 102 may include interface 1, interface 2, and interface 3, and interface board 103 may include interface 4, interface 5, and interface 6. Interface 1 and interface 4 form one Ethernet interface pair to be tested, interface 2 and interface 5 form another, and interface 3 and interface 6 form yet another. In this case, the first PRBS configuration command enables interfaces 1, 2, and 3 on interface board 102 to send PRBS streams to interfaces 4, 5, and 6 on interface board 103, respectively. If the main control board 101 receives a successful execution result from the first PRBS configuration command returned by interface board 102, it indicates that interfaces 1, 2, and 3 on interface board 102 have successfully enabled the sending of PRBS streams to interfaces 4, 5, and 6 on interface board 103. If the execution result of the first PRBS configuration command returned by the interface board 103 is successful, it means that the interfaces 4, 5 and 6 on the interface board 103 are successfully enabled to send PRBS streams to the interfaces 1, 2 and 3 on the interface board 102 respectively.
[0102] The first target interface includes one or more interfaces on the first interface board. The second target interface includes one or more interfaces on the second interface board. When the first target interface includes multiple interfaces on the first interface board, the execution result of the first PRBS configuration command returned by the first interface board is success, indicating that each interface in the first target interface is successfully enabled to send PRBS streams to the second target interface. When the second target interface includes multiple interfaces on the second interface board, the situation is similar to that of the first target interface including multiple interfaces, and will not be described further here.
[0103] Corresponding to the embodiments of the above-described test method for Ethernet interface pairs, this specification also provides an embodiment of a test apparatus for Ethernet interface pairs.
[0104] Please see Figure 3 , Figure 3 This is an exemplary embodiment illustrating the hardware structure of an electronic device housing a test apparatus for an Ethernet interface pair. At the hardware level, the device includes a processor 302, an internal bus 304, a network interface 306, memory 308, and non-volatile memory 310, and may also include other necessary hardware. One or more embodiments of this specification can be implemented in software, for example, the processor 302 reads the corresponding computer program from the non-volatile memory 310 into memory 308 and then runs it. Of course, besides software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0105] Please see Figure 4 , Figure 4 This is a block diagram illustrating a testing apparatus for an Ethernet interface pair, as shown in an exemplary embodiment. This testing apparatus for Ethernet interface pairs can be applied to, for example... Figure 3 The electronic device shown implements the technical solution of this specification. The testing device for the Ethernet interface pair is applied to the main control board of the chassis network device; the chassis network device further includes a first interface board and a second interface board; the Ethernet interface pair includes a first target interface on the first interface board and a second target interface on the second target interface board; the device may include:
[0106] The sending unit 402 is configured to send a first PRBS configuration command to the first interface board and the second interface board respectively, so that the first interface board responds to the first PRBS configuration command to enable the first target interface to send a PRBS stream to the second target interface, and so that the second interface board responds to the first PRBS configuration command to enable the second target interface to send a PRBS stream to the first target interface.
[0107] The receiving unit 404 is used to receive the execution result of the first PRBS configuration instruction returned by the first interface board and the second interface board;
[0108] The determining unit 406 is used to obtain the execution result of the instruction based on the received PRBS detection result, and to determine the test result for the Ethernet interface pair.
[0109] In this embodiment, the sending unit 402 is specifically used to: in response to the fact that the execution results of the first PRBS configuration command returned by the first interface board and the second interface board are both successful, send PRBS detection result acquisition commands to the first interface board and the second interface board respectively;
[0110] The sending unit 402 is further configured to, in response to the execution result of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board, respectively issue a second PRBS configuration instruction to the first interface board and the second interface board, so that the first interface board responds to the second PRBS configuration instruction and the first target interface stops sending PRBS stream to the second target interface, and so that the second interface board responds to the second PRBS configuration instruction and the second target interface stops sending PRBS stream to the first target interface;
[0111] The receiving unit 404 is specifically used to: receive the execution result of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board;
[0112] The determining unit 406 is specifically used to: respond to the execution result of the first PRBS configuration instruction returned by the first interface board being successful, to indicate that the first target interface is successfully enabled to send the PRBS code stream to the second target interface; and the execution result of the first PRBS configuration instruction returned by the second interface board being successful, to indicate that the second target interface is successfully enabled to send the PRBS code stream to the first target interface.
[0113] The determining unit 406 is further configured to determine that the test result for the Ethernet interface pair is a failure when the execution result of the first PRBS configuration instruction returned by the first interface board or the second interface board is a failure, or when the sending unit 402 sends the first PRBS configuration instruction and does not receive the execution result of the first PRBS configuration instruction returned by the first interface board and the second interface board within a preset time period.
[0114] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0115] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0116] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0117] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0118] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0119] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0120] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0121] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0122] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0123] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0124] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to a determination," or "when," or "in the event of a determination."
[0125] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the scope of protection of one or more embodiments of this specification.
Claims
1. A testing method for Ethernet interface pairs, characterized in that, The method is applied to a main control board included in a chassis network device; the chassis network device further includes a first interface board and a second interface board; the Ethernet interface pair includes a first target interface on the first interface board and a second target interface on the second interface board; the method includes: A first PRBS configuration command is issued to the first interface board and the second interface board respectively, so that the first interface board responds to the first PRBS configuration command and enables the first target interface to send a PRBS stream to the second target interface, and so that the second interface board responds to the first PRBS configuration command and enables the second target interface to send a PRBS stream to the first target interface; Receive the execution results of the first PRBS configuration command returned by the first interface board and the second interface board; In response to the success of the execution results of the first PRBS configuration command returned by the first interface board and the second interface board, a PRBS detection result acquisition command is sent to the first interface board and the second interface board respectively; The system receives the execution results of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board, and determines the test results for the Ethernet interface pair based on the received execution results of the PRBS detection result acquisition instruction.
2. The method according to claim 1, characterized in that, The method further includes: After receiving the execution results of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board, a second PRBS configuration instruction is issued to the first interface board and the second interface board respectively, so that the first target interface stops sending PRBS stream to the second target interface in response to the second PRBS configuration instruction, and the second target interface stops sending PRBS stream to the first target interface in response to the second PRBS configuration instruction.
3. The method according to claim 1, characterized in that, The execution result of the first PRBS configuration command returned by the first interface board is "successful", which indicates that the first target interface is successfully enabled to send the PRBS stream to the second target interface; the execution result of the first PRBS configuration command returned by the second interface board is "successful", which indicates that the second target interface is successfully enabled to send the PRBS stream to the first target interface.
4. The method according to claim 1, characterized in that, The method further includes: If the execution result of the first PRBS configuration command returned by the first interface board or the second interface board is a failure, it is determined that the test result for the Ethernet interface pair is a failure.
5. The method according to claim 1, characterized in that, The method further includes: After issuing the first PRBS configuration command to the first interface board and the second interface board respectively, if the execution result of the first PRBS configuration command is not received from the first interface board and the second interface board within a preset time period, the test result for the Ethernet interface pair is determined to be a failure.
6. The method according to claim 1, characterized in that, The first target interface includes one or more interfaces on the first interface board; the second target interface includes one or more interfaces on the second interface board. Wherein, when the first target interface includes multiple interfaces on the first interface board, the execution result of the first PRBS configuration instruction returned by the first interface board is success, which is used to indicate that each interface in the first target interface is successfully enabled to send PRBS code stream to the second target interface. When the second target interface includes multiple interfaces on the second interface board, the execution result of the first PRBS configuration instruction returned by the second interface board is successful, which indicates that each interface in the second target interface is successfully enabled to send PRBS streams to the first target interface.
7. The method according to claim 1, characterized in that, The chassis network device is a chassis firewall or a chassis switch.
8. A testing device for Ethernet interface pairs, characterized in that, The device is applied to the main control board of a chassis network device; the chassis network device further includes a first interface board and a second interface board; the Ethernet interface pair includes a first target interface on the first interface board and a second target interface on the second interface board; the device includes: The sending unit is configured to send a first PRBS configuration command to the first interface board and the second interface board respectively, so that the first interface board responds to the first PRBS configuration command to enable the first target interface to send a PRBS stream to the second target interface, and so that the second interface board responds to the first PRBS configuration command to enable the second target interface to send a PRBS stream to the first target interface. The receiving unit is used to receive the execution result of the first PRBS configuration instruction returned by the first interface board and the second interface board; The sending unit is further configured to, in response to the fact that the execution results of the first PRBS configuration command returned by the first interface board and the second interface board are both successful, send PRBS detection result acquisition commands to the first interface board and the second interface board respectively; The receiving unit is further configured to receive the execution result of the PRBS detection result acquisition instruction returned by the first interface board and the second interface board; The determining unit is used to obtain the execution result of the instruction based on the received PRBS detection result, and to determine the test result for the Ethernet interface pair.
9. An electronic device, comprising a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 7 by invoking the machine-readable instructions.
10. A machine-readable storage medium storing machine-readable instructions that, when invoked and executed by a processor, implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Link detection method and apparatus, and server
CN109450738A
Five-tuple table item issuing device and method
CN114422164A