High-speed port testing method and device

By configuring the virtual LAN VLAN and forwarding flow direction, using low-bandwidth testing instruments to test the high-speed port of the Ethernet switch, the problem of high testing costs in the existing technology is solved and low-cost port performance testing is achieved.

CN119109845APending Publication Date: 2024-12-10北京傲星科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411301549.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The prior art requires two Ethernet performance testers to be used to perform performance testing of low-speed and high-speed ports of Ethernet switches, resulting in higher testing costs.

Method used

By obtaining 2 high-speed ports and 2n low-speed ports, respectively, and forwarding the VLANs of the low-speed ports to the flow configuration, the high-speed ports are tested using a low-bandwidth Ethernet performance tester.

Benefits of technology

The cost of testing Ethernet switch ports is reduced, and the use of high-bandwidth testing instruments is avoided, and the purpose of low-bandwidth testing instruments is achieved to complete high-speed port performance testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109845A_ABST
    Figure CN119109845A_ABST
Patent Text Reader

Abstract

The invention provides a high-speed port testing method and device, and relates to the technical field of hardware testing. When the method is executed, two high-speed ports and 2n low-speed ports are obtained firstly, and n is an integer larger than 1; the method comprises the following steps of: firstly, respectively configuring a virtual local area network (VLAN) for two high-speed ports and n low-speed ports, then configuring a forwarding flow direction for the VLANs corresponding to 2n low-speed ports, and finally, testing the first low-speed port and the 2nth low-speed port to obtain test results of the two high-speed ports. Thus, the low-speed port and the high-speed port are configured with the VLAN, and the high-speed port and the low-speed port are configured, so that the low-speed port and the high-speed port are connected with the VLAN, the purpose that the performance test of the high-speed port of the Ethernet switch can be completed by using a low-bandwidth Ethernet performance tester is achieved, the use of a high-bandwidth test instrument is avoided, and the test efficiency is improved. And the cost of testing the Ethernet switch port is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of hardware testing, and in particular to a high-speed port testing method and device. Background Art

[0002] Ethernet switches are network devices used to achieve data transmission and exchange. The main functions are: providing network interfaces for network devices to achieve interconnection between devices. Network interfaces can be expanded and stacked to meet network needs. Network range can be expanded, MAC addresses can be cached and mapped to corresponding ports, forwarding / filtering functions can be used, and loop elimination functions can be used. In the prior art, it is necessary to use a low-bandwidth Ethernet performance tester to perform performance tests on the low-speed ports of Ethernet switches, and to use a high-bandwidth Ethernet performance tester to perform performance tests on the high-speed ports of Ethernet switches. That is, two types of Ethernet performance testers are required to perform performance tests on the ports of Ethernet switches, and the testing cost is relatively high.

[0003] In summary, how to reduce the cost of testing Ethernet switch ports is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0004] In view of this, the present application provides a high-speed port testing method and device, aiming to reduce the cost of testing Ethernet switch ports.

[0005] In a first aspect, the present application provides a high-speed port testing method, comprising:

[0006] Acquire 2 high-speed ports and 2n low-speed ports; wherein n is an integer greater than 1;

[0007] Configure a virtual local area network VLAN with the two high-speed ports and the n low-speed ports respectively;

[0008] Configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports;

[0009] By testing the first low-speed port and the 2nth low-speed port, test results of the two high-speed ports are obtained.

[0010] Optionally, after acquiring the two high-speed ports and the 2n low-speed ports, the method further includes:

[0011] The 2n low-speed ports are numbered in order from 1 to 2n; the numbers are integers.

[0012] Optionally, configuring a virtual local area network VLAN with the two high-speed ports and the n low-speed ports respectively includes:

[0013] The odd-numbered low-speed port and the first high-speed port are configured with a VLAN; the two high-speed ports are the first high-speed port and the second high-speed port respectively;

[0014] A VLAN is configured for the even-numbered low-speed port and the second high-speed port.

[0015] Optionally, the configuration of forwarding directions of the VLANs corresponding to the 2n low-speed ports includes:

[0016] The VLANs corresponding to the 2n low-speed ports are configured with forwarding directions according to the numbering sequence of the 2n low-speed ports;

[0017] Optionally, the configuration of forwarding directions of the VLANs corresponding to the 2n low-speed ports according to the numbering sequence of the 2n low-speed ports includes:

[0018] Configure the VLANs corresponding to two low-speed ports with adjacent numbers to have a bidirectional forwarding relationship.

[0019] Optionally, after configuring the forwarding direction of the VLANs corresponding to the 2n low-speed ports, the method further includes:

[0020] The low-speed ports except those numbered 1 and 2n among the 2n low-speed ports are interconnected in pairs using cables according to the order of their numbers;

[0021] The two high-speed ports are interconnected using a network cable.

[0022] Optionally, before obtaining the test results of the two high-speed ports by testing the first low-speed port and the 2nth low-speed port, the method further includes:

[0023] Configuring the two high-speed ports as hybrid ports;

[0024] The 2n low-speed ports are configured as Access ports.

[0025] Optionally, before obtaining the test results of the two high-speed ports by testing the first low-speed port and the 2nth low-speed port, the method further includes:

[0026] The forwarding functions of the VLANs configured for the low-speed ports except the ports numbered 1 and 2n among the 2n low-speed ports and the two high-speed ports are configured as a VLAN mapping relationship.

[0027] In a second aspect, the present application provides a high-speed port testing device, comprising:

[0028] An acquisition module, used to acquire 2 high-speed ports and 2n low-speed ports; wherein n is a positive integer greater than 1;

[0029] A first configuration module is used to configure a virtual local area network VLAN for each of the two high-speed ports and the n low-speed ports;

[0030] A second configuration module is used to configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports;

[0031] The testing module is used to obtain the test results of the two high-speed ports by testing the first low-speed port and the 2nth low-speed port.

[0032] Optionally, the device further comprises:

[0033] The numbering module is used to number the 2n low-speed ports in order from 1 to 2n; the numbers are integers.

[0034] Optionally, the first configuration module includes:

[0035] A first configuration unit is used to configure a VLAN for an odd-numbered low-speed port and a first high-speed port; the two high-speed ports are respectively the first high-speed port and the second high-speed port;

[0036] The second configuration unit is used to configure a VLAN for the low-speed port with an even number and the second high-speed port.

[0037] Optionally, the second configuration module includes:

[0038] A third configuration unit is used to configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports according to the numbering sequence of the 2n low-speed ports;

[0039] Optionally, the third configuration unit includes:

[0040] The configuration subunit is used to configure the VLANs corresponding to two low-speed ports with adjacent numbers to be in a bidirectional forwarding relationship.

[0041] Optionally, the device further comprises:

[0042] A first connection module is used to interconnect the low-speed ports of the 2n low-speed ports except those numbered 1 and 2n in pairs using cables according to the order of their numbers;

[0043] The second connection module is used to interconnect the two high-speed ports using a network cable.

[0044] Optionally, the device further comprises:

[0045] A third configuration module, configured to configure the two high-speed ports as hybrid ports;

[0046] The fourth configuration module is used to configure the 2n low-speed ports as Access ports.

[0047] Optionally, the device further comprises:

[0048] The fifth configuration module is used to configure the forwarding function of the VLANs configured for the low-speed ports among the 2n low-speed ports except the ports numbered 1 and 2n and the two high-speed ports as a VLAN mapping relationship.

[0049] The present application provides a high-speed port testing method. When executing the method, first obtain 2 high-speed ports and 2n low-speed ports, where n is an integer greater than 1; then, configure the virtual local area network VLAN for the 2 high-speed ports and the n low-speed ports respectively, and then configure the forwarding flow direction of the VLAN corresponding to the 2n low-speed ports, and finally, test the first low-speed port and the 2n low-speed port to obtain the test results of the 2 high-speed ports. In this way, by configuring the low-speed port and the high-speed port with VLAN, and configuring the high-speed port and the low-speed port, the low-speed port and the high-speed port are connected with the VLAN, so as to achieve the purpose of completing the performance test of the high-speed port of the Ethernet switch using a low-bandwidth Ethernet performance tester, avoiding the use of a high-bandwidth test instrument, and reducing the cost of testing the Ethernet switch port. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flowchart of a high-speed port testing method provided in an embodiment of the present application;

[0052] Figure 2 A schematic diagram of the structure of an Ethernet switch provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of the structure of a high-speed port testing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. The present application provides a high-speed port testing method and device for use in the field of hardware testing technology. The above is only an example and does not limit the application field of the method and device provided by the present application.

[0055] Ethernet switches are network devices used to achieve data transmission and exchange. The main functions are: providing network interfaces for network devices to achieve interconnection between devices. Network interfaces can be expanded and stacked to meet network needs. Network range can be expanded, MAC addresses can be cached and mapped to corresponding ports, forwarding / filtering functions can be used, and loop elimination functions can be used. In the prior art, it is necessary to use a low-bandwidth Ethernet performance tester to perform performance tests on the low-speed ports of Ethernet switches, and to use a high-bandwidth Ethernet performance tester to perform performance tests on the high-speed ports of Ethernet switches. That is, two types of Ethernet performance testers are required to perform performance tests on the ports of Ethernet switches, and the testing cost is relatively high.

[0056] After research, the inventor proposed the technical solution of the present application. When executing the method, first obtain 2 high-speed ports and 2n low-speed ports, where n is an integer greater than 1; then, configure the virtual local area network VLAN for the 2 high-speed ports and the n low-speed ports respectively, and then configure the forwarding flow direction of the VLAN corresponding to the 2n low-speed ports; finally, test the first low-speed port and the 2n low-speed port to obtain the test results of the 2 high-speed ports. In this way, by configuring the low-speed port and the high-speed port with VLAN, and configuring the high-speed port and the low-speed port, the low-speed port and the high-speed port are connected with the VLAN, so as to achieve the purpose of completing the performance test of the high-speed port of the Ethernet switch using a low-bandwidth Ethernet performance tester, avoiding the use of high-bandwidth test instruments, and reducing the cost of testing the Ethernet switch port.

[0057] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. It should be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0058] See also Figure 1 , Figure 1 A flowchart of a high-speed port testing method provided in an embodiment of the present application includes:

[0059] S101: Acquire 2 high-speed ports and 2n low-speed ports.

[0060] The low-speed port is a 100M port or a 1000M port, and the high-speed port is a 1000M port or a 10G port.

[0061] Get 2 high-speed ports and 2n low-speed ports of the Ethernet switch, where n is an integer greater than 1. You can first number the 2n low-speed ports and the 2 high-speed ports, that is, number the 2n low-speed ports in order from 1 to 2n, and the number is an integer, such as Figure 2 As shown, Figure 2 for Figure 2 A schematic diagram of the structure of an Ethernet switch provided in an embodiment of the present application, wherein the numbered 2n low-speed ports are respectively low-speed port P1, low-speed port P2, low-speed port P3, ..., low-speed port P2n-1, and low-speed port P2n. The two high-speed ports are respectively high-speed port X1 and high-speed port X2.

[0062] S102: Configure the two high-speed ports and n low-speed ports as virtual local area network VLANs respectively.

[0063] Configure VLANs for odd-numbered low-speed ports and the first high-speed port, and configure VLANs for even-numbered low-speed ports and the second high-speed port. That is, configure low-speed port P1 and high-speed port X1 as VLAN a0, low-speed port P3 and high-speed port X1 as VLAN a1, low-speed port P5 and high-speed port X1 as VLAN a2, and so on, low-speed port 2n-1 and high-speed port X1 as VLAN a(n-1); configure low-speed port P2 and high-speed port X2 as VLAN b0, low-speed port P4 and high-speed port X2 as VLAN b1, low-speed port P6 and high-speed port X2 as VLAN b2, and so on, low-speed port P2n and high-speed port X2 as VLAN b(n-1).

[0064] S103: Configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports.

[0065] The VLANs corresponding to the 2n low-speed ports are configured for forwarding directions according to the order of the numbers of the 2n low-speed ports, that is, the VLANs corresponding to the two low-speed ports with adjacent numbers are configured to have a bidirectional forwarding relationship. Figure 2As shown in the figure, the forwarding direction relationship of the configured VLANs is VLAN a0, VLAN b0, VLAN a1, VLAN b1, VLAN a2, VLAN b2, ..., VLAN a(n-1), VLAN b(n-1). The specific configuration is as follows: configure VLAN a0 and VLAN b0 as a bidirectional forwarding relationship, configure VLAN b0 and VLAN a1 as a bidirectional forwarding relationship, configure VLAN a1 and VLAN b1 as a bidirectional forwarding relationship, and so on, configure VLAN a(n-1) and VLAN b(n-1) as a bidirectional forwarding relationship.

[0066] S104: By testing the first low-speed port and the 2nth low-speed port, test results of the two high-speed ports are obtained.

[0067] Before executing step S104, the low-speed ports except those numbered 1 and 2n among the 2n low-speed ports can be interconnected in pairs using cables according to the order of numbers; and the two high-speed ports can be interconnected using network cables. That is, the low-speed port P2 of the switch under test can be interconnected with the low-speed port P3, the low-speed port P4 can be interconnected with the low-speed port P5, the low-speed port P6 can be interconnected with the low-speed port P7, ... the low-speed port P2n-2 can be interconnected with the low-speed port P2n-1, and the high-speed ports X1 and X2 can be interconnected with the network cable.

[0068] It is also necessary to configure 2 high-speed ports as hybrid ports and 2n low-speed ports as Access ports. Access ports only allow one VLAN to pass through, while hybrid ports allow multiple VLANs to pass through. Configure the forwarding function of VLAN a1, VLAN a2, ... VLAN a(n-1) and VLAN b0, VLAN b1, ... VLAN b(n-2) as VLAN mapping relationships.

[0069] Finally, if Figure 2 As shown, the ports of the low-bandwidth Ethernet performance tester can be connected to the low-speed port P1 and the low-speed port P2n respectively, and the performance test of the high-speed port X1 and the high-speed port X2 can be achieved by using the two ports of the low-bandwidth Ethernet performance tester to send data streams simultaneously.

[0070] In the embodiment of the present application, firstly, 2 high-speed ports and 2n low-speed ports are obtained, wherein n is an integer greater than 1; then, the 2 high-speed ports are respectively configured with virtual local area network VLANs with the n low-speed ports, and then the VLANs corresponding to the 2n low-speed ports are configured with forwarding directions, and finally, the test results of the 2 high-speed ports are obtained by testing the first low-speed port and the 2nth low-speed port. In this way, by configuring the low-speed port and the high-speed port with VLANs, and configuring the high-speed port and the low-speed port, the low-speed port is connected with the high-speed port and the VLAN, so as to achieve the purpose of completing the performance test of the high-speed port of the Ethernet switch using a low-bandwidth Ethernet performance tester, avoiding the use of high-bandwidth test instruments, and reducing the cost of testing the Ethernet switch port.

[0071] The above are some specific implementations of the high-speed port test method provided in the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided in the embodiment of the present application will be introduced from the perspective of functional modularization.

[0072] See also Figure 3 , Figure 3 A schematic diagram of the structure of a high-speed port test device provided in an embodiment of the present application, the high-speed port test device 300 includes:

[0073] The acquisition module 310 is used to acquire 2 high-speed ports and 2n low-speed ports; wherein n is a positive integer greater than 1;

[0074] A first configuration module 320, configured to configure a virtual local area network VLAN for each of the two high-speed ports and the n low-speed ports;

[0075] The second configuration module 330 is used to configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports;

[0076] The testing module 340 is used to obtain the test results of the two high-speed ports by testing the first low-speed port and the 2nth low-speed port.

[0077] Optionally, the device 300 further includes:

[0078] The numbering module is used to number the 2n low-speed ports in order from 1 to 2n; the numbers are integers.

[0079] Optionally, the first configuration module 320 includes:

[0080] A first configuration unit is used to configure a VLAN for an odd-numbered low-speed port and a first high-speed port; the two high-speed ports are respectively the first high-speed port and the second high-speed port;

[0081] The second configuration unit is used to configure a VLAN for the low-speed port with an even number and the second high-speed port.

[0082] Optionally, the second configuration module 330 includes:

[0083] A third configuration unit is used to configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports according to the numbering sequence of the 2n low-speed ports;

[0084] Optionally, the third configuration unit includes:

[0085] The configuration subunit is used to configure the VLANs corresponding to two low-speed ports with adjacent numbers to be in a bidirectional forwarding relationship.

[0086] Optionally, the device 300 further includes:

[0087] A first connection module is used to interconnect the low-speed ports of the 2n low-speed ports except those numbered 1 and 2n in pairs using cables according to the order of their numbers;

[0088] The second connection module is used to interconnect the two high-speed ports using a network cable.

[0089] Optionally, the device 300 further includes:

[0090] A third configuration module, configured to configure the two high-speed ports as hybrid ports;

[0091] The fourth configuration module is used to configure the 2n low-speed ports as Access ports.

[0092] Optionally, the device 300 further includes:

[0093] The fifth configuration module is used to configure the forwarding function of the VLANs configured for the low-speed ports among the 2n low-speed ports except the ports numbered 1 and 2n and the two high-speed ports as a VLAN mapping relationship.

[0094] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.

[0095] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the method described in any embodiment of the present application.

[0096] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements the method described in any embodiment of the present application.

[0097] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0098] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0099] It should also be noted that the various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the equipment and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The device embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components prompted as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0100] The above is only a specific implementation of the present application, but the protection scope of the present application 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 in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A high-speed port testing method, characterized in that: include: Get 2 high-speed ports and 2n low-speed ports; Said n is an integer greater than 1; Configure a virtual local area network VLAN with the two high-speed ports and the n low-speed ports respectively; Configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports; By testing the first low-speed port and the 2nth low-speed port, test results of the two high-speed ports are obtained.

2. The method according to claim 1, characterized in that After acquiring the two high-speed ports and the 2n low-speed ports, the method further includes: The 2n low-speed ports are numbered in order from 1 to 2n; the numbers are integers.

3. The method according to claim 2, characterized in that The configuring the two high-speed ports and the n low-speed ports to form a virtual local area network VLAN respectively includes: The odd-numbered low-speed port and the first high-speed port are configured with a VLAN; the two high-speed ports are the first high-speed port and the second high-speed port respectively; A VLAN is configured for the even-numbered low-speed port and the second high-speed port.

4. The method according to claim 2, characterized in that: The configuration of forwarding the VLANs corresponding to the 2n low-speed ports includes: The VLANs corresponding to the 2n low-speed ports are configured with forwarding directions according to the numbering sequence of the 2n low-speed ports.

5. The method according to claim 4, characterized in that The configuration of forwarding the VLANs corresponding to the 2n low-speed ports according to the numbering sequence of the 2n low-speed ports includes: Configure the VLANs corresponding to two low-speed ports with adjacent numbers to have a bidirectional forwarding relationship.

6. The method according to claim 2, characterized in that After configuring the forwarding direction of the VLANs corresponding to the 2n low-speed ports, the method further includes: The low-speed ports except those numbered 1 and 2n among the 2n low-speed ports are interconnected in pairs using cables according to the order of their numbers; The two high-speed ports are interconnected using a network cable.

7. The method according to claim 1, characterized in that Before obtaining the test results of the two high-speed ports by testing the first low-speed port and the 2nth low-speed port, the method further includes: Configuring the two high-speed ports as hybrid ports; The 2n low-speed ports are configured as Access ports.

8. The method according to claim 2, characterized in that: Before obtaining the test results of the two high-speed ports by testing the first low-speed port and the 2nth low-speed port, the method further includes: The forwarding functions of the VLANs configured for the low-speed ports except the ports numbered 1 and 2n among the 2n low-speed ports and the two high-speed ports are configured as a VLAN mapping relationship.

9. A high-speed port testing device, characterized in that: include: An acquisition module, used to acquire 2 high-speed ports and 2n low-speed ports; Said n is an integer greater than 1; A first configuration module is used to configure a virtual local area network VLAN for each of the two high-speed ports and the n low-speed ports; A second configuration module is used to configure the forwarding direction of the VLANs corresponding to the 2n low-speed ports; The testing module is used to obtain the test results of the two high-speed ports by testing the first low-speed port and the 2nth low-speed port.

10. The device according to claim 9, characterized in that The device also includes: The numbering module is used to number the 2n low-speed ports in order from 1 to 2n; the numbers are integers.