Search

CN-122027519-A - Flow testing method and system for Ethernet switch

CN122027519ACN 122027519 ACN122027519 ACN 122027519ACN-122027519-A

Abstract

The invention discloses a flow test method and system of an Ethernet switch, the method comprises the steps of building a test topology, configuring an auxiliary switch through a control terminal to create a plurality of vlan, dividing a source port of the auxiliary switch into vlan, configuring test port flow setting of a network tester through the control terminal, configuring data flow mirror image of the auxiliary switch through the control terminal, controlling the test port of the network tester to send test flow at 100% rate through the control terminal, reading message statistical information of the test port of the network tester and a destination port of the auxiliary switch through the control terminal, calculating and verifying overall forwarding performance and throughput of the tested switch according to the read message statistical information, and outputting test results. The invention can realize the performance test of the whole machine of the unmanaged switch by only a small number of ports of the tester, and simultaneously improves the test universality and efficiency.

Inventors

  • Fang Haiqin
  • LU FEN

Assignees

  • 深圳市厚石网络科技有限公司

Dates

Publication Date
20260512
Application Date
20260105

Claims (10)

  1. 1. The method for testing the flow of the Ethernet switch is characterized by comprising the following steps of: S1, building a test topology, wherein the test topology comprises a network tester, an auxiliary exchanger, a tested exchanger and a control terminal, the network tester comprises at least two test ports, the tested exchanger comprises n tested ports, n is a positive integer greater than 1, the auxiliary exchanger comprises n source ports connected with the test ports of the network tester or self-loop and n destination ports connected with the tested ports of the tested exchanger, and the control terminal is respectively connected with the network tester and the auxiliary exchanger; Step S2, configuring the auxiliary switch to create a plurality of vlan through the control terminal, and carrying out vlan division on a source port of the auxiliary switch; S3, configuring test port flow setting of the network tester through the control terminal, and creating a plurality of data streams with different MAC addresses; s4, configuring data stream mirror images of the auxiliary switch through the control terminal, and respectively mirroring the data streams with different MAC addresses to different destination ports of the auxiliary switch; s5, controlling a test port of the network tester to send test flow at a rate of 100% through the control terminal; s6, reading the message statistical information of the test port of the network tester and the destination port of the auxiliary switch through the control terminal; and S7, the control terminal calculates and verifies the overall forwarding performance and throughput of the switch to be tested according to the read message statistical information, and outputs a test result.
  2. 2. The method for testing the flow of the Ethernet switch according to claim 1, wherein in the step S1, when a test topology is built, a1 st source port of the auxiliary switch is connected with a1 st test port of the network tester, an nth source port is connected with a2 nd test port of the network tester, other source ports are mutually looped in pairs according to an adjacent principle, and n destination ports of the auxiliary switch are respectively connected with n tested ports of the tested switch in a one-to-one correspondence manner.
  3. 3. The method according to claim 2, characterized in that in step S2, two adjacent source ports of the auxiliary switch non-interlink are divided into the same vlan.
  4. 4. The method for testing the traffic of the ethernet switch according to claim 3, wherein in step S3, when the traffic setting of the test ports of the network tester is configured, a plurality of data streams with source MAC addresses and destination MAC addresses hopped are respectively created on two test ports of the network tester, the rate ratio of each data stream is the same, and the data streams of the two test ports are known unicast messages.
  5. 5. The method according to claim 4, wherein in step S4, when configuring the data flow mirror of the auxiliary switch, an ACL-based flow mirror rule is created on all source ports of the auxiliary switch, and the data flow carrying the specified source MAC address is mirrored to the corresponding destination port.
  6. 6. The method according to claim 1, wherein in step S5, the control terminal controls the test port of the network tester to transmit the test traffic at a rate of 100%.
  7. 7. The method of claim 1, wherein the auxiliary switch is a managed switch and the switch under test is an unmanaged switch.
  8. 8. The method for testing traffic of an ethernet switch according to claim 1, wherein said control terminal is a PC.
  9. 9. An ethernet switch traffic test system for performing the ethernet switch traffic test method according to any of claims 1 to 8, comprising a network tester, an auxiliary switch, a tested switch and a control terminal, wherein the network tester comprises at least two test ports, the tested switch comprises n tested ports, n is a positive integer greater than 1, the auxiliary switch comprises n source ports connected with the test ports of the network tester or self-loop and n destination ports connected with the tested ports of the tested switch, and the control terminal is respectively connected with the network tester and the auxiliary switch.
  10. 10. The ethernet switch traffic test system according to claim 9, wherein the control terminal is provided with an automatic test module, and is configured to automatically complete vlan configuration, data stream mirror configuration, traffic transmission control, message statistics information reading and performance calculation, and output a test result.

Description

Flow testing method and system for Ethernet switch Technical Field The invention relates to the technical field of communication equipment switching performance test, in particular to a method and a system for testing the flow of an Ethernet switch. Background An ethernet switch is a network device for a local area network for efficiently forwarding data packets between multiple devices. The intelligent forwarding of the data frames is realized through the MAC address table, and the intelligent forwarding method is one of core devices of modern networks. With the development of network technology, higher requirements are put on forwarding performance and reliability of ethernet switches. The forwarding rate of the ethernet switch between ports and the full-load forwarding performance of the whole machine are particularly important. The traditional Ethernet switch complete machine testing method comprises the following two steps: 1. The tested ports of the tested switch are directly in butt joint with the ports of the network tester one by one for testing, and the line speed between the ports of the tester sends and receives messages, as shown in figure 1. This approach is applicable to all types of ethernet switches, including switches in shared VLAN learning and independent VLAN learning modes, but requires a significant amount of network tester ports. 2. Two ports of the switch to be tested are connected with two ports of the network tester, other ports are in butt joint with each other through network cables or optical fibers, and then the flow of the ports of the two network testers is received and forwarded in all ports through VLAN division and isolation, as shown in figure 2. The method is convenient and quick, does not need too many ports of a network tester, but requires to learn the MAC address by an independent VLAN, and is not suitable for a shared VLAN learning and unmanaged switch. Because the non-management type switch is a switch without a network management function, advanced functions such as VLAN division, data filtering and the like are not supported, and only basic two-layer data forwarding is provided. The non-management type exchanger carries out two-layer data forwarding according to the MAC address, and the maintained MAC address table is an MAC+port because the VLAN is not supported, after a data frame is received, the source MAC address and the receiving port of the data frame are recorded in the MAC address table, and then unicast forwarding or flooding is carried out according to whether the destination MAC address of the data frame is in the MAC address table. Therefore, for the whole machine test of the unmanaged switch, only the first test method can be adopted, all ports are connected with the network tester, the network tester simultaneously transmits data streams with different MAC addresses to each tested port at the line speed, and known unicast is formed between every two ports. In this case, for the complete machine test of the multi-port unmanaged switch, a higher requirement is put on the network tester, and abundant test ports need to be provided. Therefore, a test method for realizing the whole performance of the multi-port unmanaged switch by using a small number of ports of the network tester is needed. Disclosure of Invention In order to solve the problems that the number of ports of a network tester is insufficient and the whole performance test of an unmanaged switch cannot be performed in the prior art, the invention provides a flow test method and a flow test system of an Ethernet switch, which can realize the whole performance test of the unmanaged switch by only a small number of ports of the tester and improve the test universality and efficiency. The technical scheme of the invention is as follows: In a first aspect, the present invention provides a method for testing traffic of an ethernet switch, including: S1, building a test topology, wherein the test topology comprises a network tester, an auxiliary exchanger, a tested exchanger and a control terminal, the network tester comprises at least two test ports, the tested exchanger comprises n tested ports, n is a positive integer greater than 1, the auxiliary exchanger comprises n source ports connected with the test ports of the network tester or self-loop and n destination ports connected with the tested ports of the tested exchanger, and the control terminal is respectively connected with the network tester and the auxiliary exchanger; Step S2, configuring the auxiliary switch to create a plurality of vlan through the control terminal, and carrying out vlan division on a source port of the auxiliary switch; S3, configuring test port flow setting of the network tester through the control terminal, and creating a plurality of data streams with different MAC addresses; s4, configuring data stream mirror images of the auxiliary switch through the control terminal, and respectively mirroring the data strea