Testing device and testing method of network switch

By combining central processing units and ports, and utilizing internal loopback and access control list packet flooding mechanisms, the problems of expensive testing equipment and insufficient port numbers in existing technologies are solved, enabling efficient and low-cost testing of multiple network switches.

CN122053447APending Publication Date: 2026-05-15ALPHA NETWORKS INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ALPHA NETWORKS INC
Filing Date
2024-11-15
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies require expensive external equipment and have a limited number of transmission ports when testing network switches, making it impossible to test multiple network switches simultaneously, which leads to longer testing times and increased costs.

Method used

It employs a combination of central processing unit, acceleration port, and transmission port, and implements packet flooding mechanism through internal loopback and access control list. It uses software to set ports as traffic generator groups, requiring only a single acceleration port and at least one transmission port to test multiple network switches.

Benefits of technology

It reduced testing costs, improved testing efficiency, increased the number of network switches that could be tested simultaneously, expanded the testing scope and accuracy, and saved time and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053447A_ABST
    Figure CN122053447A_ABST
Patent Text Reader

Abstract

The invention provides a test device and a test method of a network switch. The testing device comprises a central processing unit, an acceleration port and a transmission port. The central processing unit is used for generating a packet. And the acceleration port empties the packet statistics, stops media access control address learning, and opens an internal loopback and access control list. The transmission port empties the packet statistics and the forwarding list, stops media access control address learning, and connects at least one to-be-tested transmission port of the at least one to-be-tested network switch. The acceleration port and the transmission port are set to be the same virtual local area network, and the central processing unit transmits the packet to the acceleration port. The packet reaches a predetermined line speed at the acceleration port via internal loopback and access control list loopback transmission and is transmitted to the transmission port via a flooding mechanism of the virtual local area network. And the transmission port transmits the packet reaching the predetermined line speed to a to-be-tested transmission port of the to-be-tested network switch. The central processing unit stops the transmission port from transmitting the packet when the test time expires.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to a testing apparatus and a testing method, and more particularly to a testing apparatus and a testing method for a network switch. Background Technology

[0002] The manufacturing process of network switches requires testing their packet forwarding capabilities. With the significant increase in demands for network data transmission speeds, network switches also need to support high-speed data transmission. Currently, industry testing of network switches primarily relies on external network performance testing equipment to send and receive packets and calculate overall transmission speeds. However, commercially available network performance testing equipment (such as Spirent Test Center and IXIA) is very expensive and requires ongoing maintenance, making it uneconomical for production. Furthermore, commercially available network performance testing equipment has a limited number of transmission ports, preventing the simultaneous testing of multiple network switches under test, thus extending testing time and increasing costs.

[0003] Previously, the applicant had developed a technique for testing network switches under test using a tested and compliant network switch as a test device. This technique includes: a central processing unit, a first acceleration port, a second acceleration port, and at least one transmission port, wherein the central processing unit generates at least one packet; the first and second acceleration ports clear packet statistics, stop MAC address learning, and enable internal loopback; the transmission port clears packet statistics and forwarding list, stops MAC address learning, and connects to at least one transmission port under test of at least one network switch under test; the first acceleration port, the second acceleration port, and the transmission port are configured to the same virtual LAN; the central processing unit transmits the packet to the first acceleration port, and the first and second acceleration ports, through internal loopback and the virtual LAN flooding mechanism, make the packet reach a predetermined line rate and transmit it to the transmission port; the transmission port transmits the packet that has reached the predetermined line rate to the transmission port under test of the network switch under test. The quality of the network switch under test is verified by confirming the number of packets sent and received by the testing device.

[0004] While the aforementioned technologies can reduce the cost of using external testing equipment and increase production efficiency, they require two acceleration ports to achieve the predetermined line speed. When testing packets from different VLANs on multiple network switches under test simultaneously, twice the number of acceleration ports are needed, resulting in insufficient available transmission ports for testing and thus limiting the number of network switches under test that can be tested simultaneously. Therefore, the main objective of this application is to further reduce the time and cost of testing high-speed network switches and increase productivity. Summary of the Invention

[0005] The purpose of this application is to provide a testing apparatus for a network switch, including a central processing unit (CPU), an acceleration port, and at least one transmission port. The CPU generates at least one packet. The acceleration port clears packet statistics, stops MAC address learning, and enables internal loopback and access control list (ACL) functionality. The transmission port clears packet statistics and forwarding list functionality, stops MAC address learning, and connects to at least one ACL port of at least one network switch under test. The acceleration port and the transmission port are configured to operate on the same virtual local area network (VLAN). The CPU transmits the packet to the acceleration port. The packet is looped back through the internal loopback and ACL to reach a predetermined line rate at the acceleration port and then flooded to the transmission port via the VLAN. The transmission port transmits the packet, reaching the predetermined line rate, to the ACL port of the network switch under test. The CPU stops the transmission port from transmitting the packet when the test period expires.

[0006] Optionally, different transmission ports can be set with different predetermined line speeds.

[0007] Optionally, the access control list redirects the packet to the acceleration port and the transmission port.

[0008] Another objective of this application is to provide a testing method for a network switch. The testing method includes: providing a testing device and at least one network switch under test, wherein the testing device includes a central processing unit (CPU) and multiple ports, and the network switch under test includes at least one transmission port under test. The CPU removes the virtual local area networks (VLANs) from the multiple ports of the testing device, and sets up an acceleration port and at least one transmission port among the multiple ports. The CPU clears the packet statistics of the acceleration port and the transmission port, and clears the forwarding list of the transmission port. The CPU stops media access control address learning for the acceleration port and the transmission port. The CPU enables the internal loopback and access control list (ILOAR) of the acceleration port. The CPU sets the acceleration port and the transmission port to the same VLAN. The CPU transmits at least one packet to the acceleration port. The packet is looped back through the ILOAR and ILO list to the acceleration port at a predetermined line speed and then flooded to the transmission port via the VLAN's flooding mechanism. The transmission port transmits the packets at the predetermined line speed to the test transmission port of the network switch under test (DSB), and the transmission port or the port receives the packets returned by the test transmission port. The central processing unit stops the transmission port from transmitting packets when a test time expires. The quality of the packets transmitted by the DSB is verified based on the number of packets transmitted and received by the testing device.

[0009] Optionally, the access control list redirects the packet to the acceleration port and the transmission port.

[0010] Optionally, the central processing unit can generate different packets, and different packets can be set to different predetermined line rates at different transmission ports.

[0011] The network switch testing device and method provided in this application allow the software to configure the ports of the testing device into traffic generator groups. Each traffic generator group only needs to be configured with a single acceleration port and at least one transmission port. This increases the number of transmission ports in the traffic generator group and the number of network switches under test being tested simultaneously. Users can adjust the packets according to actual needs and can set different transmission ports to send packets at different predetermined line speeds to simultaneously test multiple network switches under test. This not only meets industry testing requirements and improves the testing scope and accuracy, but also further saves testing time and costs, thereby improving productivity.

[0012] To further illustrate the purpose, technical features, and effects of this application, specific embodiments are described in detail below with reference to the accompanying drawings. However, the drawings provided are for reference and illustration only and are not intended to limit this application. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a block diagram of the test apparatus for the network switch in this application;

[0015] Figure 2 This is a schematic diagram of a network switch testing apparatus according to an embodiment of the present application, which unidirectionally transmits packets to test multiple network switches under test.

[0016] Figure 3 A schematic diagram illustrating a test apparatus for a network switch according to an embodiment of this application, used for bidirectional packet transmission to test multiple network switches under test; and

[0017] Figure 4 This is a flowchart of the testing method for the network switch in this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of the embodiments of the "testing apparatus and testing method for network switches" disclosed in this application is provided in conjunction with specific implementation methods and with reference to the accompanying drawings. Those skilled in the art can understand the advantages and effects of this application from the content disclosed in this specification. This application can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of this application. Furthermore, it should be stated in advance that the accompanying drawings of this application are only simple schematic illustrations and are not depictions based on actual dimensions. Although this document provides examples of parameters containing specific values, it should be understood that the parameters do not need to be exactly equal to the corresponding values, but can approximate the corresponding values ​​within acceptable error tolerances or design constraints. In addition, unless the context clearly indicates or defines otherwise, the meanings of "a," "the," and "the" in this application include the plural.

[0019] It should be understood that although terms such as "first," "second," etc., may be used herein to describe various components or signals, each described component or signal should not be limited by the foregoing terms, which are primarily used to distinguish one component from another or one signal from another. Furthermore, directional terms mentioned in subsequent embodiments, such as "up," "down," "front," "back," "left," and "right," are only for reference to the accompanying drawings. Therefore, the directional terms used are for illustrative purposes and not for limiting the scope of protection of this application. Additionally, the term "or" as used herein may, depending on the specific circumstances, include any combination of one or more of the associated listed items.

[0020] Furthermore, the terms "substantially" or "approximately" as used herein can refer to the average of a numerical or complex numerical value within a range of deviations from a particular value, which can be recognized or determined by those skilled in the art. This includes taking into account certain specific errors that may occur when measuring the particular value due to limitations of the measurement system or equipment. For example, a numerical value referred to "substantially" can include ±5%, ±3%, ±1%, ±0.5%, ±0.1%, or one or more standard deviations of the particular value.

[0021] This application relates to a testing device and method for network switches. Please refer to the following: Figure 1 As shown, it is a block diagram of the test apparatus for the network switch of this application. Figure 1 As shown, the network switch testing device 1 includes a central processing unit 10 and multiple ports 11, and stores the Ethernet Traffic Generator (ETG) software of this application. The network switch testing device 1 can be an Ethernet switch that has been verified to meet predetermined line speeds (e.g., 100Gb / s, 200Gb / s, 400Gb / s, 800Gb / s or higher) and specifications.

[0022] Before testing the network switch under test, the central processing unit 10 performs the following steps: remove the virtual LANs of all ports 11, and set up an acceleration port 111 and at least one transmission port 112 among the multiple ports 11; clear the packet statistics of acceleration port 111, stop the media access control address learning of acceleration port 111, and enable the internal loopback and access control list of acceleration port 111; clear the packet statistics and forwarding list of transmission port 112, and stop the media access control address learning of transmission port 112; set acceleration port 111 and transmission port 112 as Ethernet Traffic Generator (ETG) groups, and set acceleration ports 111 and transmission ports 112 belonging to the same ETG group as the same virtual LAN V1.

[0023] When testing the network switch under test (BSBT), after connecting transmission port 112 to the BSBT's (not shown) BSBT's BSBT BSBT BT transmission port (not shown), the central processing unit 10 generates at least one packet and transmits the packet to acceleration port 111. The packet is internally looped back to acceleration port 111. The packet looping back to acceleration port 111 is redirected to all ports of the same VLAN V1 (i.e., acceleration port 111 and transmission port 112) via access control lists. After the packet is continuously looped back and forth via internal loopback and access control lists for a period of time, it reaches a predetermined line speed at acceleration port 111 and is transmitted to transmission port 112 via the VLAN V1 flooding mechanism. The predetermined line speed can be determined based on the full speed of the BSBT's line. Transmission port 112 transmits the packet that has reached the predetermined line speed to the BSBT's BSBT BT transmission port. The BSBT BSBT BT transmission port then transmits the packet back to transmission port 112 or an undefined port 11. The central processing unit 10 stops transmission port 112 from transmitting packets when the test time ends. The quality of packets transmitted by the network switch under test can be verified by measuring the number of packets transmitted and received by the test device 1 of the network switch. This includes verifying whether the number of packets is correct, whether there are any erroneous packets, and whether the packet size meets expectations.

[0024] Figure 2 This is a schematic diagram illustrating a network switch testing apparatus according to an embodiment of this application, which unidirectionally transmits packets to test multiple network switches under test. Figure 2 As shown, the network switch test device 1 includes a central processing unit (not shown) and multiple ports 11 (e.g., thirty-two or forty-eight ports 11), and stores the ETG software of this application. The multiple ports 11 include one acceleration port 111 and three transmission ports 112. The acceleration port 111 and transmission ports 112 are configured to the same virtual LAN V2. Two transmission ports 211 and 212 of the network switch under test 21 are connected via lines to one transmission port 112 and one unconfigured port 11 of the network switch test device 1, respectively. Two transmission ports 221 and 222 of the network switch under test 22 are connected via lines to one transmission port 112 and one unconfigured port 11 of the network switch test device 1, respectively. Two transmission ports 231 and 232 of the network switch under test 23 are connected via lines to one transmission port 112 and one unconfigured port 11 of the network switch test device 1, respectively. The configuration methods of the acceleration port 111, transmission ports 112, ETG group, and virtual LAN V2 are described below.

[0025] Before testing the network switches 21, 22, and 23 under test, the central processing unit performs the following steps according to the ETG software: Remove the VLAN settings (not belonging to any VLAN) from all ports 11 on the test device 1 of the network switches; select one accelerated port 111 and three transport ports 112 among the ports 11, clear the packet statistics of accelerated port 111, stop the media access control address learning of accelerated port 111, enable the internal loopback and access control list of accelerated port 111, clear the packet statistics and forwarding list of transport port 112, and stop the media access control address learning of transport port 112; set accelerated port 111 and the three transport ports 112 into an ETG group; set the accelerated port 111 and the three transport ports 112 of the ETG group into the same VLAN V2, and keep the remaining ports 11 in a VLAN that does not belong to any VLAN; set the packet content (including: destination address DA, source address SA, Ethernet type, packet data, packet size). (size, tagged or untagged).

[0026] It is worth noting that users can adjust the packet content via the central processing unit to generate the same or different packets according to actual needs. They can also set a predetermined line speed for each transmission port 112 via the central processing unit; the predetermined line speed for transmitting packets on each transmission port 112 can be the same or different. In this embodiment, two types of unlabeled packets are used for testing.

[0027] When testing network switches 21, 22, and 23 under test, the central processing unit generates several quantities (e.g., units, tens, and hundreds digits) of unlabeled packets and transmits them to acceleration port 111. Since acceleration port 111 has internal loopback enabled, the packets are sent back to acceleration port 111. Because acceleration port 111 has access control lists enabled, the packets sent back to acceleration port 111 are redirected by the access control lists to acceleration port 111 and the three transport ports 112 within the same virtual LAN V2. After continuous loopback and access control list transmission for a period of time, the packets reach a predetermined line speed at acceleration port 111. The predetermined line speed can be determined based on the full line speed of individual network switches 21, 22, and 23 under test. For example, the speed of transport port 112 connected to network switches 21 and 22 under test is set to 40. The transmission port 112 connected to the network switch under test 23 is set to a speed of 100G, so that the network switches under test 21 and 22 with a line speed of 400G and the network switch under test 23 with a line speed of 100G can be tested simultaneously. Since the transmission port 112 and the acceleration port 111 are also set in the same virtual LAN V2, packets that reach the predetermined line speed in the acceleration port 111 will be flooded to the three transmission ports 112. The three transmission ports 112 can respectively transmit packets that reach the predetermined line speed to the test transmission ports 211, 221, and 231 of the three network switches under test 21, 22, and 23. After receiving the packets, the three network switches under test 21, 22, and 23 respectively transmit the packets back to the undefined port 11 of the test device 1 of the network switches via another test transmission port 212, 222, and 232.

[0028] Users can preset or determine the test time in real time. For example, if a 5-minute packet transmission is required, the test time can be preset to 5 minutes, or the user can stop packet transmission via command when the 5 minutes expire. When the test time is up, the central processing unit clears the forwarding list of acceleration port 111, stopping packet flooding, and transmission port 112 stops transmitting packets. After a short time (e.g., 0.2 seconds), the user restores the forwarding list of acceleration port 111 and waits for the next test. Users can connect to the central processing unit of test device 1 using an external computer device to examine the line speed and quality (including packet loss rate, error rate, etc.) of the network switches under test 21, 22, and 23 based on the number of packets transmitted by transmission port 112 and received by the unconfigured port 11, and the test time.

[0029] Figure 3 This is a schematic diagram illustrating a network switch testing apparatus according to an embodiment of this application, which bidirectionally transmits packets to test multiple network switches under test. Figure 3As shown, the network switch test device 1 includes a central processing unit (not shown) and multiple ports 11 (e.g., thirty-two ports 11), and stores the ETG software of this application. The multiple ports 11 include two acceleration ports 111a and 111b, two transmission ports 112a and two transmission ports 112b. Acceleration ports 111a and the two transmission ports 112a are configured to the same virtual LAN V3, and acceleration ports 111b and the two transmission ports 112b are configured to the same virtual LAN V4. The two transmission ports 241 and 242 of the network device under test 24 are respectively connected to one transmission port 112a and one transmission port 112b of the network switch test device 1 via lines. The two transmission ports 251 and 252 of the network device under test 25 are respectively connected to one transmission port 112a and one transmission port 112b of the network switch test device 1 via lines. The configuration methods for acceleration ports 111a and 111b, transmission ports 112a and 112b, ETG groups, and virtual LANs V3 and V4 are as follows.

[0030] Before testing the network switches 24 and 25 under test, remove the VLAN settings on all ports 11 of the test device 1 of the network switches; select two accelerated ports 111a and 111b, two transport ports 112a and 112b among the ports 11, clear the packet statistics of accelerated ports 111a and 111b, stop media access control address learning of accelerated ports 111a and 111b, enable internal loopback and access control lists of accelerated ports 111a and 111b, clear the packet statistics and forwarding lists of transport ports 112a and 112b, and stop media access control address learning of transport ports 112a and 112b. Access control address learning; Accelerated port 111a and two transmission ports 112a are set as the first ETG group, and accelerated port 111b and two transmission ports 112b are set as the second ETG group; the accelerated port 111a and two transmission ports 112a of the first ETG group are set in the same VLAN V3, and the accelerated port 111b and two transmission ports 112b of the second ETG group are set in the same VLAN V4, while the remaining ports 11 remain in a VLAN that does not belong to any VLAN; the contents of the first packet and the second packet are set. In this embodiment, both the first packet and the second packet are untagged packets.

[0031] When testing the network switches under test 24 and 25, the central processing unit generates a certain number of first packets and second packets according to the settings. The first packets are sent to the accelerated port 111a of the first ETG group, and the second packets are sent to the accelerated port 111b of the second ETG group. Since accelerated ports 111a and 111b have internal loopback enabled, the first packets are sent back to accelerated port 111a, and the second packets are sent back to accelerated port 111b. Furthermore, because accelerated ports 111a and 111b have access control lists enabled, the first packets from accelerated port 111a are sent back. The first packet will be redirected by the access control list to the accelerated port 111a and two transport ports 112a of the same VLAN V3. The second packet, which is sent back to the accelerated port 111b, will be redirected by the access control list to the accelerated port 111b and two transport ports 112b of the same VLAN V4. After the first and second packets are continuously looped through the internal loopback and access control list for a period of time, they will reach the predetermined line speed at the accelerated ports 111a and 111b respectively. The predetermined line speed can be determined based on the full speed of the individual network switches 24 and 25 under test. With transmission port 112a and acceleration port 111a configured in the same VLAN V3, and transmission port 112b and acceleration port 111b configured in the same VLAN V4, the first packet reaching the predetermined line speed in acceleration port 111a will be flooded to both transmission ports 112a, and the second packet reaching the predetermined line speed in acceleration port 111b will be flooded to both transmission ports 112b. Transmission port 112a can transmit the first packet reaching the predetermined line speed to the transmission ports 241 and 251 under test of the network switches 24 and 25 under test. 112b can transmit the second packet, reaching the predetermined line speed, to the test transmission ports 242 and 252 of the network switch 24 and 25 under test; the test transmission ports 241 and 251 transmit the first packet to the test transmission ports 242 and 252, and the test transmission ports 242 and 252 transmit the second packet to the test transmission ports 241 and 251; the test transmission ports 241 and 251 transmit the second packet to transmission port 112a, and the test transmission ports 242 and 252 transmit the first packet to transmission port 112b (the transmission path of the first packet is as follows). Figure 3 As indicated by the solid arrow, the transmission path of the second packet is as follows: Figure 3(As indicated by the midpoint link arrow). When the test time is up, the central processing unit clears the forwarding lists of acceleration ports 111a and 111b, stopping packet flooding, and transmission ports 112a and 112b stop transmitting packets. After a short time (e.g., 0.2 seconds), the user restores the forwarding lists of acceleration ports 111a and 111b and can wait for the next test. The user can use an external computer device to connect to the central processing unit of test device 1 to verify the line speed and quality (including packet loss rate, error rate, etc.) of the network switches under test 24 and 25 based on the number of first and second packets transmitted and received by transmission ports 112a and 112b and the test time.

[0032] This application utilizes software settings to configure multiple ports of the network switch test device as traffic generator groups. Each traffic generator group only needs to be configured with a single acceleration port, thereby increasing the number of transmission ports in the traffic generator group and the number of network switches under test being tested simultaneously, further saving testing time and costs, and thus improving productivity.

[0033] Figure 4 This is a flowchart illustrating the steps of the network switch testing method described in this application. Figure 4 As shown, the testing method for the network switch in this application includes: Step S40: Providing a testing device and at least one network switch under test, wherein the testing device includes a central processing unit and multiple ports, and the network switch under test includes multiple transmission ports under test; Step S41: The central processing unit removes the virtual LANs of all ports, and sets an acceleration port and at least one transmission port among the multiple ports; Step S42: The central processing unit clears the packet statistics of the acceleration port and the transmission port, and clears the forwarding list of the transmission port; Step S43: The central processing unit stops the media access control address learning of the acceleration port and the transmission port; Step S44: The central processing unit enables the internal loopback and access control list of the acceleration port; Step S45: The central processing unit... The unit sets the acceleration port and the transmission port to the same virtual LAN; Step S46: The central processing unit transmits packets to the acceleration port; Step S47: The packets are looped back via internal loopback and access control list, reaching a predetermined line speed on the acceleration port and then transmitted to the transmission port via the virtual LAN flooding mechanism; Step S48: The transmission port transmits packets that have reached the predetermined line speed to the transmission port under test of the network switch under test, and the transmission port or port receives the packets returned by the transmission port under test; Step S481: Has the test time expired? If not, return to step S48; if yes, proceed to step S49: The central processing unit stops the transmission port from transmitting packets and checks the quality of packets transmitted by the network switch under test based on the number of packets transmitted and received by the test device.

[0034] In one embodiment, the network switch under test (DUT) is, for example, an Ethernet switch, and the testing apparatus can be an Ethernet switch that has been verified to meet predetermined line speeds (e.g., 100Gb / s, 200Gb / s, 400Gb / s, 800Gb / s, or higher) and specifications. Packets can be single or multiple, and can be adjusted according to actual needs, such as, but not limited to, specifying the source address, destination address, Ethernet format, packet data, packet size, and whether packets are marked or unmarked. The predetermined line speed can be configured by setting different transmission ports to send packets at different predetermined line speeds according to the actual needs of individual DUTs, thereby simultaneously testing multiple DUTs.

[0035] It is worth noting that steps S42 to S45 are not restricted by any order. Before proceeding to step S46, the user can utilize the default test time of the central processing unit's timer. By providing the option of a default test time, the user can determine the start and stop times and duration of the test, increasing testing flexibility. In step S49, the central processing unit can stop the transmission of packets on the accelerated port by clearing the forwarding list of the accelerated port. After completing step S49 for a certain period of time (e.g., 0.2 seconds), the central processing unit can restore the forwarding list of the accelerated port, waiting for the next test.

[0036] In summary, the network switch testing apparatus and method of this application configure the ports of the testing apparatus into traffic generator groups via software. Each traffic generator group only needs to be configured with a single acceleration port and at least one transmission port, thereby increasing the number of transmission ports in the traffic generator group and the number of network switches under test being tested simultaneously. Users can adjust the packets according to actual needs and can set different transmission ports to send packets at different predetermined line speeds to simultaneously test multiple network switches under test. This not only meets industry testing requirements and improves the testing scope and accuracy, but also further saves testing time and costs, thereby improving productivity.

[0037] The above description is merely a preferred and feasible embodiment of this application and does not limit the scope of protection of the claims of this application. Therefore, any equivalent changes that can be conceived by those skilled in the art based on the technical content disclosed in this application without creative effort should be included within the scope of protection of the claims of this application.

Claims

1. A testing device for a network switch, characterized in that, The testing apparatus includes: A central processing unit is used to generate at least one packet; One accelerated port, cleared packet statistics, stopped media access control address learning, and enabled internal loopback and access control lists; and Clear packet statistics and forwarding list, stop media access control address learning, and connect at least one transmission port of at least one network switch under test to at least one transmission port under test. The acceleration port and the transmission port are configured to be on the same virtual local area network, and the central processing unit transmits the packet to the acceleration port. The packet is transmitted via loopback and access control list at the acceleration port at a predetermined line speed and then via the flooding mechanism of the virtual LAN to the transmission port. The transmission port transmits the packet at the predetermined line speed to the transmission port under test of the network switch under test. The central processing unit stops transmitting the packet via the transmission port when the test time expires.

2. The testing apparatus according to claim 1, characterized in that, Different transmission ports can be set with different predetermined line speeds.

3. The testing apparatus according to claim 1, characterized in that, The access control list redirects the packet to the acceleration port and the transmission port.

4. A testing method for a network switch, characterized in that, The testing method includes: A test device and at least one network switch under test are provided, wherein the test device includes a central processing unit and multiple ports, and the network switch under test includes at least one transmission port under test. The central processing unit removes the virtual local area network from multiple ports of the test device and sets an acceleration port and at least one transmission port among the multiple ports; The central processing unit clears the packet statistics of the acceleration port and the transmission port, and clears the forwarding list of the transmission port; The central processing unit stops learning the media access control address of the acceleration port and the transmission port; The central processing unit enables the internal loopback and access control list of the acceleration port; The central processing unit sets the acceleration port and the transmission port to the same virtual local area network. The central processing unit transmits at least one packet to the acceleration port; The packet is looped through the internal loopback and access control list to reach a predetermined line speed at the acceleration port and then transmitted to the transmission port via the flooding mechanism of the virtual LAN. The transmission port transmits the packet at the predetermined line speed to the test transmission port of the network switch under test, and the transmission port or the port receives the packet returned by the test transmission port. The central processing unit stops transmitting the packet via the transmission port when a test time expires; and The quality of the packets transmitted by the network switch under test is verified based on the number of packets transmitted and received by the testing device.

5. The test method according to claim 4, characterized in that, The access control list redirects the packet to the acceleration port and the transmission port.

6. The test method according to claim 4, characterized in that, The central processing unit can generate different packets, and different packets can be set to different predetermined line rates at different transmission ports.