CN117014341B - Virtual switch testing method and system - Google Patents

Virtual switch testing method and system Download PDF

Info

Publication number
CN117014341B
CN117014341B CN202310368974.4A CN202310368974A CN117014341B CN 117014341 B CN117014341 B CN 117014341B CN 202310368974 A CN202310368974 A CN 202310368974A CN 117014341 B CN117014341 B CN 117014341B
Authority
CN
China
Prior art keywords
test
virtual
network card
virtual switch
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310368974.4A
Other languages
Chinese (zh)
Other versions
CN117014341A (en
Inventor
宋捷
李洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qinmu Data Technology Co ltd
Original Assignee
Beijing Qinmu Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qinmu Data Technology Co ltd filed Critical Beijing Qinmu Data Technology Co ltd
Priority to CN202310368974.4A priority Critical patent/CN117014341B/en
Publication of CN117014341A publication Critical patent/CN117014341A/en
Application granted granted Critical
Publication of CN117014341B publication Critical patent/CN117014341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/40Constructional details, e.g. power supply, mechanical construction or backplane

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and a system for testing a virtual switch, which are characterized in that preset network message simulation test software is deployed on a virtual machine to serve as a virtual test instrument, a control network card, a first test virtual network card and a second test virtual network card are configured on the virtual test instrument, and then the first test virtual network card and the second test virtual network card are connected and configured on the virtual switch to be tested, so that a network message simulation test program in the network message simulation test software sends test data messages to the virtual switch to be tested through the first test virtual network card, receives return data messages fed back by the virtual switch to be tested through the second test virtual network card to form a message test loop, and a network card driving component in the network message simulation test software records the sending time of the test data messages and the receiving time of the return data messages to form a test report of the virtual switch to be tested, so that the virtual switch to be tested can be tested accurately.

Description

Virtual switch testing method and system
Technical Field
The invention relates to the field of communication equipment testing, in particular to a method and a system for testing a virtual switch.
Background
The Virtual Switch realizes the physical Switch function in a software mode, is a Switch in a Virtual network, and can complete normal network communication only when the Virtual Switch is arranged.
With the years of development of cloud technology, virtual switches are already an undesirable part of virtual networks, and at present, the performance of the virtual switches directly affects the network performance of the cloud. Currently, the industry uses vSwitch in a relatively wide range, including Open vSwitch, VSS with VMware (VSPHERE STANDARD VSWITCH, vssphere standard virtual switch) and VDS (vSphere Distributed vSwitch, vssphere distributed virtual switch).
However, at present, only a method for testing a physical switch exists, and in the method for testing the physical switch, a receiving port and a transmitting port of a network test instrument are connected with the physical switch in series to form a data flow loop, the test instrument sends simulation data messages, and the performance of the main parameter RFC2544 of the physical switch is calculated and counted through the number of the messages of the receiving port and the transmitting port and the time stamp.
The performance of processing data of different virtual switches is different, and even if the same virtual switch has different running performances in cloud environments of different hardware platforms, the performance test of the virtual switch is very important for the cloud environments, and a physical network test instrument cannot directly test the virtual switch and cannot directly test the performance of the virtual switch.
Therefore, a need exists for a method and a system for testing a systematic virtual switch that can accurately test the virtual switch and is suitable for different kinds of virtual switches.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method for testing a virtual switch, so as to solve the problems that different virtual switches have different data processing performances, even if the same virtual switch has different operation performances in cloud environments of different hardware platforms, the performance test of the virtual switch is very important for the cloud environments, and a physical network test instrument cannot directly test the virtual switch and cannot directly perform performance test on the virtual switch.
The invention provides a method for testing a virtual switch, which comprises the following steps:
Deploying preset network message simulation test software to any virtual machine as a virtual test instrument, and configuring a control network card, a first test virtual network card and a second test virtual network card on the virtual test instrument; the control network card is used as a management network port of the virtual test instrument;
The first test virtual network card and the second test virtual network card are connected and configured to a virtual switch to be tested, so that a network message simulation test program in the network message simulation test software sends test data messages to the virtual switch to be tested through the first test virtual network card, receives return data messages fed back by the virtual switch to be tested through the second test virtual network card, forms a message test loop, and simultaneously enables a network card driving assembly in the network message simulation test software to record sending time of sending the test data messages and receiving time of receiving the return data messages;
Calculating test parameters according to the message data in the message test loop, the sending time and the receiving time by the network message simulation test program, and forming a test report of the virtual switch to be tested according to the test parameters.
Preferably, the network message simulation test software is pktSpeed network message simulation test software;
The pktSpeed network message simulation test software comprises a network message simulation test program, a network card driving component and a user management unit, wherein the user management unit is used for being connected with the control network card so as to provide a web management and control interface for a user, execute a control command for the user and send the test parameters and the test report to the user.
Preferably, the virtual switch under test is a Esxi distributed virtual switch, a standard virtual switch, or a openvSwith virtual switch.
Preferably, if the virtual switch to be tested is a Esxi distributed virtual switch or a standard virtual switch, the step of configuring the connection of the first test virtual network card and the second test virtual network card to the virtual switch to be tested includes:
establishing two port groups on the Esxi distributed virtual switch or standard virtual switch;
Placing the first test virtual network card as a first port group in one of the two port groups, and setting the first port group to accept a pseudo transmission mode; and enabling the other port group of the two port groups to be used as a second port group by placing the second test virtual network card, and setting the second port group to accept the promiscuous mode.
Preferably, if the virtual switch to be tested is openvSwith virtual switch, the step of connecting and configuring the first test virtual network card and the second test virtual network card to the virtual switch to be tested is as follows:
The first test virtual network card and the second test virtual network card are configured onto a ovs bridge of the openvSwith virtual switch to configure the first test virtual network card, the second test virtual network card connection onto the openvSwith virtual switch.
Preferably, if the line speed of the virtual switch to be tested exceeds the line speed of the 10G network card, the virtual switch to be tested is connected with at least a first test virtual network card and a second test virtual network card of two virtual test instruments to obtain test parameters generated by each virtual test instrument;
And taking the average value of the test parameters generated by each virtual test instrument as the final test parameter of the virtual switch to be tested, and forming a test report of the virtual switch to be tested according to the final test parameter.
Preferably, the test parameters at least include throughput, packet loss rate, back-to-back value and time delay; wherein the time delay is the difference of the receiving time minus the transmitting time; and
The receiving time and the sending time are acquired by a timer in the network card driving assembly;
The timer is respectively preset in a data message receiving function when receiving the return data message and a data message transmitting function when transmitting the test data message.
Preferably, when the control network card is configured on the virtual test instrument, the method further comprises:
Establishing connection between the network message simulation test software and the control network card, and enabling the control network card to be connected with a preset remote control end through a network by a common virtual switch and a physical network card so as to enable the control network card to be used as a management network port of the virtual test instrument; and the user can remotely control the virtual test instrument based on the user management unit through the management network port, and monitor the test parameters and the test report.
The invention also provides a testing system of the virtual switch, which is based on the testing method of the virtual switch, and comprises the following steps:
The network message simulation test software is deployed on any virtual machine to serve as a virtual test instrument, and a control network card, a first test virtual network card and a second test virtual network card are configured on the virtual test instrument; wherein,
The control network card is used as a management network port of the virtual test instrument; the first test virtual network card and the second test virtual network card are connected with the virtual switch to be tested in a configuration mode;
The network message simulation test software comprises a network message simulation test program and a network card driving component; the network message simulation test program is used for sending a test data message to the virtual switch to be tested through the first test virtual network card, and receiving a return data message fed back by the virtual switch to be tested through the second test virtual network card to form a message test loop;
The network card driving component is used for recording the sending time of sending the test data message and the receiving time of receiving the return data message;
The network message simulation test program is also used for calculating test parameters according to message data in the message test loop, the sending time and the receiving time, and forming a test report of the virtual switch to be tested according to the test parameters.
Preferably, the network message simulation test software further comprises a user management unit;
the user management unit is used for being connected with the control network card so as to provide a web management interface for a user, execute a control command for the user and send the test parameters and the test report to the user.
According to the technical scheme, the method for testing the virtual switch provided by the invention comprises the steps of firstly deploying preset network message simulation test software to any virtual machine as a virtual test instrument, configuring a control network card, a first test virtual network card and a second test virtual network card on the virtual test instrument, connecting the first test virtual network card and the second test virtual network card to the virtual switch to be tested, configuring the network message simulation test program in the network message simulation test software to send test data messages to the virtual switch to be tested through the first test virtual network card, receiving return data messages fed back by the virtual switch to be tested through the second test virtual network card, forming a message test loop, enabling a network card driving component in the network message simulation test software to record the sending time of the test data messages and the receiving time of the return data messages, calculating test parameters according to the message data in the message test loop and the sending time and the receiving time through the network message simulation test program, and forming a virtual test report to be tested according to the test parameters, so that the virtual switch can be tested accurately.
Drawings
Other objects and attainments together with a more complete understanding of the invention will become apparent and appreciated by referring to the following description taken in conjunction with the accompanying drawings. In the drawings:
fig. 1 is a flowchart of a method of testing a virtual switch according to an embodiment of the present invention;
Fig. 2 is a schematic technical logic diagram of a method for testing a virtual switch according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of a test system of a virtual switch according to an embodiment of the present invention;
Detailed Description
The performance of processing data of different virtual switches is different, even if the same virtual switch has different running performances in cloud environments of different hardware platforms, the performance test of the virtual switch is very important for the cloud environments, and a physical network test instrument cannot directly test the virtual switch and cannot directly test the performance of the virtual switch.
In view of the foregoing, the present invention provides a method and a system for testing a virtual switch, and specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
In order to illustrate the method, the system and the electronic device for testing the dynamically weighted virtual switch provided by the invention, fig. 1, fig. 2 and fig. 3 are exemplary labels of the embodiments of the invention.
The following description of the exemplary embodiment(s) is merely exemplary in nature and is in no way intended to limit the invention, its application, or uses. Techniques and equipment known to those of ordinary skill in the relevant art may not be discussed in detail, but should be considered part of the specification where appropriate.
As shown in fig. 1and fig. 2 together, the method for testing a virtual switch according to the embodiment of the present invention includes:
s1: deploying preset network message simulation test software to any virtual machine as a virtual test instrument, and configuring a control network card, a first test virtual network card and a second test virtual network card on the virtual test instrument; the control network card is used as a management network port of the virtual test instrument;
S2: the first test virtual network card and the second test virtual network card are connected and configured to a virtual switch to be tested, so that a network message simulation test program in the network message simulation test software sends test data messages to the virtual switch to be tested through the first test virtual network card, receives return data messages fed back by the virtual switch to be tested through the second test virtual network card, forms a message test loop, and simultaneously enables a network card driving assembly in the network message simulation test software to record sending time of sending the test data messages and receiving time of receiving the return data messages;
S3: calculating test parameters according to the message data in the message test loop, the sending time and the receiving time by the network message simulation test program, and forming a test report of the virtual switch to be tested according to the test parameters.
In this embodiment, step S1 is a process of deploying preset network message simulation test software to any one virtual machine as a virtual test instrument, and configuring a control network card, a first test virtual network card and a second test virtual network card on the virtual test instrument; the control network card is used as a management network port of the virtual test instrument; in this embodiment, when the control network card is configured on the virtual test meter, the method further includes the following steps:
establishing connection between the network message simulation test software and the control network card, and enabling the control network card to be connected with a preset remote control end through a network by a common virtual switch and a physical network card so as to enable the control network card to be used as a management network port of the virtual test instrument; the user can remotely control the virtual test instrument based on the user management unit through the management network port, and monitor the test parameters and the test report, so that the user can conveniently control the virtual test instrument, and monitor and receive the test parameters and the test report.
In this embodiment, the network packet simulation test software is pktSpeed network packet simulation test software which is independently developed; in this embodiment, the pktSpeed network packet simulation test software includes a network packet simulation test program, a network card driving component, and a user management unit, where the user management unit is used to connect with a control network card to provide a web management interface for a user, execute a control command for the user, and send test parameters and test reports to the user.
After the preparation work is done in the step S1, a step S2 is performed, wherein the step S2 is a process of configuring the first test virtual network card and the second test virtual network card on the virtual switch to be tested, so that a network message simulation test program in network message simulation test software sends test data messages to the virtual switch to be tested through the first test virtual network card, receives return data messages fed back by the virtual switch to be tested through the second test virtual network card, forms a message test loop, and simultaneously enables a network card driving assembly in the network message simulation test software to record the sending time of the test data messages and the receiving time of the return data messages; in this embodiment, the receiving time and the sending time are obtained by a timer in the network card driving assembly; the timer is respectively preset in a data message receiving function when the return data message is received and a data message transmitting function when the test data message is transmitted, namely, a timer is respectively added in the data message transmitting function and the data message receiving function of the virtual network card driving assembly, when a time delay test is carried out, a time stamp T1 when one data message is transmitted and a time stamp T2 when one message is received are obtained and are recorded in pairs and written into a shared memory, and a network message simulation test program calculates a time delay value by using the value of T2-T1.
The virtual switch to be tested can be any virtual switch, that is, the method can test any existing virtual switch, for example, the virtual switch to be tested can be a currently ubiquitous Esxi distributed virtual switch, a standard virtual switch or a openvSwith virtual switch, the distributed virtual switch (VDS) and the standard virtual switch (VSS) are all virtual switches in ESXi host machine products of VMware corporation, openvSwitch is an open source virtual switch, many cloud factories in China are own virtual switches developed on the basis of OpenvSwitch, and even the virtual switch to be tested in the embodiment can be a new virtual switch product iterated by functions on the basis of the virtual switches.
However, the first test virtual network card and the second test virtual network card are configured on the virtual switch to be tested in different manners according to each virtual switch.
Specifically, if the virtual switch to be tested is a Esxi distributed virtual switch or a standard virtual switch, the step of connecting and configuring the first test virtual network card and the second test virtual network card to the virtual switch to be tested includes:
establishing two port groups on the Esxi distributed virtual switch or standard virtual switch;
Placing the first test virtual network card as a first port group in one of the two port groups, and setting the first port group to accept a pseudo transmission mode; and enabling the other port group of the two port groups to be used as a second port group by placing the second test virtual network card, and setting the second port group to accept the promiscuous mode.
That is, for Esxi distributed virtual switches or standard virtual switches, two port groups need to be established on the virtual switch, one is used for placing a first test virtual network card of a virtual test instrument and setting the port groups to accept pseudo transmission; the second test virtual network card is used for placing the virtual test instrument and is provided with a port group to accept the mixed mode, so that the virtual switch to be tested can receive the simulation data message sent by the first test virtual network card of the virtual test instrument, and the second test virtual network card of the virtual test instrument to be tested can receive the data on the virtual switch.
If the virtual switch to be tested is openvSwith virtual switch, the step of connecting and configuring the first test virtual network card and the second test virtual network card to the virtual switch to be tested is as follows: the first test virtual network card and the second test virtual network card are configured onto a ovs bridge of the openvSwith virtual switch to configure the first test virtual network card, the second test virtual network card connection onto the openvSwith virtual switch.
The first test virtual network card and the second test virtual network card of the virtual test instrument are configured to the tested ovs network bridge aiming at openvSwith virtual switches, so that configuration connection can be completed.
If the virtual switch to be tested is a new virtual switch product whose functions iterate on the basis of the above virtual switches, the virtual switch to be tested can be improved on the basis of which type of existing virtual switch, and then a proper method is selected according to the type mode to configure the first test virtual network card and the second test virtual network card on the virtual switch to be tested, which is not described again.
After the configuration connection step of the step S2 is performed, performing a step S3, calculating test parameters according to the message data in the message test loop, the sending time and the receiving time by using a network message simulation test program, and forming a test report of the virtual switch to be tested according to the test parameters, wherein in the embodiment, the test parameters at least comprise throughput, packet loss rate, back-to-back value and time delay; wherein the time delay is the difference of the receiving time minus the transmitting time; and the receiving time and the sending time are acquired by timers in the network card driving assembly, wherein the timers are respectively preset in a data message receiving function when the return data message is received and a data message sending function when the test data message is sent.
More specifically, throughput refers to that when test transmission and message data reception are performed, a specified number of fixed-length network data messages are transmitted every second, the transmission number is gradually increased every second until the number of received data packets is smaller than the number of transmitted data packets, and the maximum throughput, pps (transmission packet number per second) and bps (transmission packet bit number per second) of the length data messages are obtained; continuously transmitting a fixed-length data message for 60 seconds from the throughput to different loads of the highest speed of the packet transmitting network card (load step length is generally 10% of the highest speed), and finally calculating (total transmitted packet number-total received packet number)% of total transmitted packet number = packet loss rate to obtain the packet loss rate of the data message with the length; time delay: transmitting 100 fixed-length data messages at a rate smaller than the throughput, calculating a time interval T2-T1 by a time stamp T1 when each data message is transmitted and a time stamp T2 when the data message is received, wherein the time delay of the length message is the average value of T2-T1 of 100 times; back-to-back values: the method comprises the steps of sending a specified number of network number messages at one time at the highest speed of a packet sending network card, and gradually increasing the number of the network number messages sent each time until the received data messages are smaller than the sent data messages, wherein the maximum number of the sending packets at one time is the back-to-back value of the packet length.
In addition, in this embodiment, if the line speed of the virtual switch to be tested exceeds the line speed of the 10G network card, the virtual switch to be tested is connected with at least a first test virtual network card and a second test virtual network card of two virtual test instruments to obtain test parameters generated by each virtual test instrument; and taking the average value of the test parameters generated by each virtual test instrument as the final test parameter of the virtual switch to be tested, and forming a test report of the virtual switch to be tested according to the final test parameter.
As described above, the method for testing a virtual switch provided by the present invention includes deploying a preset network packet emulation test software to any virtual machine as a virtual test instrument, configuring a control network card, a first test virtual network card and a second test virtual network card on the virtual test instrument, connecting the first test virtual network card and the second test virtual network card to a virtual switch to be tested, so that a network packet emulation test program in the network packet emulation test software sends a test data packet to the virtual switch to be tested via the first test virtual network card, receives a return data packet fed back by the virtual switch to be tested via the second test virtual network card, forms a packet test loop, and simultaneously enables a network packet driving component in the network packet emulation test software to record the sending time of the test data packet and the receiving time of the return data packet, and then calculates test parameters according to the message data traffic, sending time and receiving time in the packet test loop by the network packet emulation test program, and forms a test report of the virtual switch to be tested according to the test parameters, so that no matter what virtual switch is tested accurately.
As shown in fig. 3, the present invention further provides a testing system 100 for a virtual switch, which implements the testing method for a virtual switch as described above, including:
Network message emulation test software 110, which is deployed on any virtual machine as virtual test instrument 120, and on which control network card 121, first test virtual network card 122 and second test virtual network card 123 are configured; wherein,
The control network card is used as a management network port of the virtual test instrument; the first test virtual network card and the second test virtual network card are connected with the virtual switch to be tested in a configuration mode;
the network message simulation test software comprises a network message simulation test program 111 and a network card driving component 112; the network message emulation test program 111 is configured to send a test data message to the virtual switch to be tested via the first test virtual network card, and receive a return data message fed back by the virtual switch to be tested via the second test virtual network card, so as to form a message test loop;
the network card driving component 112 is configured to record a sending time of sending the test data packet and a receiving time of receiving the return data packet;
The network message simulation test program 111 is further configured to calculate a test parameter according to the message data in the message test loop, the sending time and the receiving time, and form a test report of the virtual switch to be tested according to the test parameter.
In this embodiment, the network packet simulation test software further includes a user management unit 113; the user management unit 130 is configured to connect with a control network card, so as to provide a web control interface for a user, execute a control command for the user, and send the test parameters and the test report to the user.
The specific implementation method of the test system of the virtual switch may refer to the description of the related steps in the corresponding embodiment of fig. 1, which is not repeated herein.
The invention provides a test system of a virtual switch, which comprises network message simulation test software 110, wherein the network message simulation test software 110 is deployed on any virtual machine as a virtual test instrument 120, a control network card 121, a first test virtual network card 122 and a second test virtual network card 123 are configured on the virtual test instrument, then the first test virtual network card and the second test virtual network card are connected and configured on the virtual switch to be tested, so that a network message simulation test program 111 in the network message simulation test software 110 sends test data messages to the virtual switch to be tested through the first test virtual network card, receives return data messages fed back by the virtual switch to be tested through the second test virtual network card, forms a message test loop, simultaneously, a network card driving component 112 in the network message simulation test software 110 records the sending time of the sent test data messages and the receiving time of the received return data messages, then test parameters are calculated through the network message simulation test program according to the message data sending time and the receiving time in the message test loop, and the receiving time, and the test parameters are formed into a test report to be tested, and thus the virtual switch can be tested accurately.
The test method and system of the virtual switch according to the present invention are described above by way of example with reference to the accompanying drawings. It will be appreciated by those skilled in the art that various modifications may be made to the method and system for testing a virtual switch set forth in the foregoing disclosure without departing from the teachings of the present disclosure. Accordingly, the scope of the invention should be determined from the following claims.

Claims (8)

1. A method for testing a virtual switch, comprising:
Deploying preset network message simulation test software to any virtual machine as a virtual test instrument, and configuring a control network card, a first test virtual network card and a second test virtual network card on the virtual test instrument; the control network card is used as a management network port of the virtual test instrument;
The first test virtual network card and the second test virtual network card are connected and configured to a virtual switch to be tested, so that a network message simulation test program in the network message simulation test software sends test data messages to the virtual switch to be tested through the first test virtual network card, receives return data messages fed back by the virtual switch to be tested through the second test virtual network card, forms a message test loop, and simultaneously enables a network card driving assembly in the network message simulation test software to record sending time of sending the test data messages and receiving time of receiving the return data messages;
Calculating test parameters according to message data in the message test loop, the sending time and the receiving time by the network message simulation test program, and forming a test report of the virtual switch to be tested according to the test parameters;
The test parameters at least comprise throughput, packet loss rate, back-to-back value and time delay; wherein the time delay is the difference of the receiving time minus the transmitting time; and
The receiving time and the sending time are acquired by a timer in the network card driving assembly;
The timer is respectively preset in a data message receiving function when receiving the return data message and a data message transmitting function when transmitting the test data message; the method comprises the steps that a timer is respectively added to a data message sending function and a data message receiving function of a virtual network card driving assembly, when a time delay test is carried out, a time stamp T1 when one data message is sent and a time stamp T2 when the one message is received are obtained, the time stamp T1 and the time stamp T2 are recorded in pairs and written into a shared memory, and a network message simulation test program calculates a time delay value by using the value of T2-T1;
If the line speed of the virtual switch to be tested exceeds the line speed of the 10G network card, the virtual switch to be tested is connected with at least a first test virtual network card and a second test virtual network card of two virtual test instruments to obtain test parameters generated by each virtual test instrument;
And taking the average value of the test parameters generated by each virtual test instrument as the final test parameter of the virtual switch to be tested, and forming a test report of the virtual switch to be tested according to the final test parameter.
2. The method for testing a virtual switch of claim 1,
The network message simulation test software is pktSpeed network message simulation test software;
The pktSpeed network message simulation test software comprises a network message simulation test program, a network card driving component and a user management unit, wherein the user management unit is used for being connected with the control network card so as to provide a web management and control interface for a user, execute a control command for the user and send the test parameters and the test report to the user.
3. The method for testing a virtual switch of claim 2,
The virtual switch to be tested is a Esxi distributed virtual switch, a standard virtual switch or a openvSwith virtual switch.
4. The method for testing a virtual switch as claimed in claim 3, wherein if the virtual switch to be tested is a Esxi distributed virtual switch or a standard virtual switch, the step of configuring the first test virtual network card and the second test virtual network card connection to the virtual switch to be tested comprises:
establishing two port groups on the Esxi distributed virtual switch or standard virtual switch;
Placing the first test virtual network card as a first port group in one of the two port groups, and setting the first port group to accept a pseudo transmission mode; and enabling the other port group of the two port groups to be used as a second port group by placing the second test virtual network card, and setting the second port group to accept the promiscuous mode.
5. The method for testing a virtual switch as claimed in claim 3, wherein if the virtual switch to be tested is openvSwith virtual switch, the step of configuring the first test virtual network card and the second test virtual network card connection to the virtual switch to be tested is:
The first test virtual network card and the second test virtual network card are configured onto a ovs bridge of the openvSwith virtual switch to configure the first test virtual network card, the second test virtual network card connection onto the openvSwith virtual switch.
6. The method for testing a virtual switch according to claim 5, further comprising, when the control network card is configured on the virtual test meter:
Establishing connection between the network message simulation test software and the control network card, and enabling the control network card to be connected with a preset remote control end through a network by a common virtual switch and a physical network card so as to enable the control network card to be used as a management network port of the virtual test instrument; and the user can remotely control the virtual test instrument based on the user management unit through the management network port, and monitor the test parameters and the test report.
7. A virtual switch testing system based on the virtual switch testing method of any of claims 1-6, comprising:
The network message simulation test software is deployed on any virtual machine to serve as a virtual test instrument, and a control network card, a first test virtual network card and a second test virtual network card are configured on the virtual test instrument; wherein,
The control network card is used as a management network port of the virtual test instrument; the first test virtual network card and the second test virtual network card are connected with the virtual switch to be tested in a configuration mode;
The network message simulation test software comprises a network message simulation test program and a network card driving component; the network message simulation test program is used for sending a test data message to the virtual switch to be tested through the first test virtual network card, and receiving a return data message fed back by the virtual switch to be tested through the second test virtual network card to form a message test loop;
The network card driving component is used for recording the sending time of sending the test data message and the receiving time of receiving the return data message;
The network message simulation test program is also used for calculating test parameters according to message data in the message test loop, the sending time and the receiving time, and forming a test report of the virtual switch to be tested according to the test parameters;
The test parameters at least comprise throughput, packet loss rate, back-to-back value and time delay; wherein the time delay is the difference of the receiving time minus the transmitting time; and
The receiving time and the sending time are acquired by a timer in the network card driving assembly;
The timer is respectively preset in a data message receiving function when receiving the return data message and a data message transmitting function when transmitting the test data message; the method comprises the steps that a timer is respectively added to a data message sending function and a data message receiving function of a virtual network card driving assembly, when a time delay test is carried out, a time stamp T1 when one data message is sent and a time stamp T2 when the one message is received are obtained, the time stamp T1 and the time stamp T2 are recorded in pairs and written into a shared memory, and a network message simulation test program calculates a time delay value by using the value of T2-T1;
If the line speed of the virtual switch to be tested exceeds the line speed of the 10G network card, the virtual switch to be tested is connected with at least a first test virtual network card and a second test virtual network card of two virtual test instruments to obtain test parameters generated by each virtual test instrument;
And taking the average value of the test parameters generated by each virtual test instrument as the final test parameter of the virtual switch to be tested, and forming a test report of the virtual switch to be tested according to the final test parameter.
8. The virtual switch testing system of claim 7, wherein the network message emulation test software further comprises a subscriber management unit;
the user management unit is used for being connected with the control network card so as to provide a web management interface for a user, execute a control command for the user and send the test parameters and the test report to the user.
CN202310368974.4A 2023-04-07 2023-04-07 Virtual switch testing method and system Active CN117014341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310368974.4A CN117014341B (en) 2023-04-07 2023-04-07 Virtual switch testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310368974.4A CN117014341B (en) 2023-04-07 2023-04-07 Virtual switch testing method and system

Publications (2)

Publication Number Publication Date
CN117014341A CN117014341A (en) 2023-11-07
CN117014341B true CN117014341B (en) 2024-05-10

Family

ID=88571642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310368974.4A Active CN117014341B (en) 2023-04-07 2023-04-07 Virtual switch testing method and system

Country Status (1)

Country Link
CN (1) CN117014341B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179456A (en) * 2007-12-11 2008-05-14 福建星网锐捷网络有限公司 Network appliance testing approach and device
CN105610641A (en) * 2015-12-21 2016-05-25 武汉微创光电股份有限公司 Switch testing system and testing method based on semi-physical simulation
CN108632110A (en) * 2018-03-23 2018-10-09 广州网测科技有限公司 Equipment performance test method, system, computer equipment and storage medium
WO2018228302A1 (en) * 2017-06-13 2018-12-20 中国银联股份有限公司 Virtual network link detection method and device
CN110011877A (en) * 2019-04-24 2019-07-12 苏州浪潮智能科技有限公司 A kind of switch test method and apparatus
CN110324197A (en) * 2018-03-30 2019-10-11 北京京东尚科信息技术有限公司 The method and apparatus of applied in network performance test
CN112422361A (en) * 2020-10-16 2021-02-26 浪潮思科网络科技有限公司 Switch testing method, device and medium
CN114338492A (en) * 2021-12-31 2022-04-12 苏州浪潮智能科技有限公司 Virtual network performance testing method and device, computer equipment and medium
WO2022121080A1 (en) * 2020-12-11 2022-06-16 网宿科技股份有限公司 Network configuration method, controller, and traffic guide system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10608893B2 (en) * 2017-12-06 2020-03-31 Nokia Technologies Oy SDN control plane performance testing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179456A (en) * 2007-12-11 2008-05-14 福建星网锐捷网络有限公司 Network appliance testing approach and device
CN105610641A (en) * 2015-12-21 2016-05-25 武汉微创光电股份有限公司 Switch testing system and testing method based on semi-physical simulation
WO2018228302A1 (en) * 2017-06-13 2018-12-20 中国银联股份有限公司 Virtual network link detection method and device
CN108632110A (en) * 2018-03-23 2018-10-09 广州网测科技有限公司 Equipment performance test method, system, computer equipment and storage medium
CN110324197A (en) * 2018-03-30 2019-10-11 北京京东尚科信息技术有限公司 The method and apparatus of applied in network performance test
CN110011877A (en) * 2019-04-24 2019-07-12 苏州浪潮智能科技有限公司 A kind of switch test method and apparatus
CN112422361A (en) * 2020-10-16 2021-02-26 浪潮思科网络科技有限公司 Switch testing method, device and medium
WO2022121080A1 (en) * 2020-12-11 2022-06-16 网宿科技股份有限公司 Network configuration method, controller, and traffic guide system
CN114338492A (en) * 2021-12-31 2022-04-12 苏州浪潮智能科技有限公司 Virtual network performance testing method and device, computer equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
程光.网络测量学.南京东南大学出版社,2022,第295页. *
虚拟化网络系统测试探究;马志平;;广东科技(10);第61-62页 *
马志平 ; .虚拟化网络系统测试探究.广东科技.2015,(10),第61-62页. *

Also Published As

Publication number Publication date
CN117014341A (en) 2023-11-07

Similar Documents

Publication Publication Date Title
DE69725971T2 (en) PROTOCOL INTERFACE GATEWAY
US7440415B2 (en) Virtual network addresses
CN101267363A (en) Loop testing method, system and device
CN101145977B (en) A QoS monitoring system and its measuring method of IP data network
CN105897507A (en) Node equipment state detection method and node equipment state detection device
CN113542051B (en) Monitoring flow load balancing method based on software defined network
CN105634840A (en) Method and device for measuring packet loss
CN104917624A (en) Health check system and method for link aggregation path
CN101094121A (en) Method, system and device for detecting Ethernet links among not direct connected devices
CN105099938A (en) Determining method and device of congestion window in network
CN104852828A (en) Network delay detection method, device and system
CN102651702A (en) Ethernet performance measurement method and equipment
CN112311628A (en) Network speed measuring method, system, network equipment and storage medium
CN105553885A (en) FC switch priority testing method
CN110417687A (en) A kind of message sends and receives method and device
CN117014341B (en) Virtual switch testing method and system
CN109714124B (en) Time synchronization system and method for test system
CN101990229B (en) RNC (Radio Network Control) aging test method, equipment, service board and interface board
US20040143781A1 (en) System and method for non-intrusive loopback testing
CN111092788B (en) Switch test system
KR100336495B1 (en) System and method for simulating the packet transmission performance of Internet
Disslbacher-Fink Hardware-based timing synchronization
CN112020090A (en) System and method for testing wired and wireless throughput under flow control condition
CN111008173A (en) Serial communication method, device and system
CN108337101B (en) Link oscillation testing method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant