CN115086216A - Multi-virtual terminal testing method and system - Google Patents

Multi-virtual terminal testing method and system Download PDF

Info

Publication number
CN115086216A
CN115086216A CN202210682540.7A CN202210682540A CN115086216A CN 115086216 A CN115086216 A CN 115086216A CN 202210682540 A CN202210682540 A CN 202210682540A CN 115086216 A CN115086216 A CN 115086216A
Authority
CN
China
Prior art keywords
virtual
terminal
equipment
virtual terminal
protocol stack
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.)
Granted
Application number
CN202210682540.7A
Other languages
Chinese (zh)
Other versions
CN115086216B (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.)
Shanghai Huan Chong Communications Technology Co ltd
Original Assignee
Shanghai Huan Chong Communications 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 Shanghai Huan Chong Communications Technology Co ltd filed Critical Shanghai Huan Chong Communications Technology Co ltd
Priority to CN202210682540.7A priority Critical patent/CN115086216B/en
Publication of CN115086216A publication Critical patent/CN115086216A/en
Application granted granted Critical
Publication of CN115086216B publication Critical patent/CN115086216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

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

Abstract

The invention relates to the technical field of network equipment testing, in particular to a method and a system for testing multiple virtual terminals, wherein the method comprises the following steps: s1: aiming at a task to be tested, a terminal protocol stack is established on a simulation device, and then at least one virtual terminal corresponding to the task to be tested is established; s2: recording all virtual terminals into a terminal protocol stack; s3: and accessing the virtual terminal to a test network by adopting a terminal protocol stack, and then executing a task to be tested on the virtual terminal. The invention has the beneficial effects that: the virtual terminals are established on the simulation equipment, and the terminal protocol stack is established, so that the virtual terminals can be simultaneously accessed into the test network, the simulation of the multi-terminal condition in the actual scene to be tested is realized, and the problem that the actual scene to be tested is difficult to simulate in the laboratory environment in the prior art is avoided. And the virtual terminal is established on the simulation equipment for testing, so that the equipment cost in the whole testing process is saved.

Description

Multi-virtual terminal testing method and system
Technical Field
The invention relates to the technical field of network equipment testing, in particular to a method and a system for testing multiple virtual terminals.
Background
The network device is a special hardware device for interconnecting various nodes such as servers, PCs, application terminals and the like to form an information communication network. The network device test refers to a test process of performing manual test or automatic test by using the network device as an object through a corresponding test case, and further checking whether the network device can realize a predetermined function. At present, because the types and suppliers of network devices are complicated, it is of great importance to test the network devices according to the situations that can be encountered in the actually erected network environment.
In the prior art, relatively mature solutions exist for testing the network environment of the external field. For example, some communication manufacturers usually collect actual data, devices, and the like for an error scene that may occur in an equipment environment of an external field, and then reproduce the actual data, the devices, and the like in a laboratory environment, thereby solving the problem. However, in the actual implementation process, the inventor finds that, in some projects, such as projects like high-performance gateways and proxy billing, because the number of the related terminal devices is large, the types of the related terminal devices are large, and the usage scenario is complex, it is difficult for the conventional manual test mode based on a small number of devices to effectively simulate the actual network environment in the laboratory environment, and further, the problem cannot be completely reproduced, and the implementation cost is relatively high.
Disclosure of Invention
In order to solve the above problems in the prior art, a method and a system for testing multiple virtual terminals are provided.
The specific technical scheme is as follows:
a test method of multiple virtual terminals is suitable for simulation equipment, wherein the simulation equipment is connected to a test network through gateway equipment;
the test method comprises the following steps:
step S1: aiming at a task to be tested, establishing a terminal protocol stack on the simulation equipment, and then establishing at least one virtual terminal corresponding to the task to be tested;
step S2: recording all the virtual terminals into a terminal protocol stack;
step S3: and accessing the virtual terminal to the test network by adopting the terminal protocol stack, and then executing the task to be tested on the virtual terminal.
Preferably, the step S2 includes:
step S21: adding each virtual terminal in a forwarding information table of the terminal protocol stack;
step S22: adopting a virtual device pair corresponding to the virtual terminal, and enabling a first device of the virtual device pair to point to the forwarding information table, and enabling a second device of the virtual device pair to point to a virtual network bridge;
and at least one virtual terminal is mapped to the virtual equipment pair through the forwarding information table, and the virtual network bridge is connected to a physical network port.
Preferably, the step S21 includes:
step S211: adding the virtual terminal in the terminal protocol stack;
step S212: allocating a first IP address and a MAC address for the virtual terminal;
step S213: and recording the first IP address and the MAC address in the forwarding information table.
Preferably, the step S22 includes:
step S221: judging whether the virtual equipment pair which can be used for the virtual terminal to access exists currently;
if yes, go to step S223;
if not, go to step S222;
step S222: creating a set of virtual device pairs, pointing a second device of the virtual device pair to the virtual bridge;
step S223: and establishing a mapping relation between the first equipment of the virtual equipment pair and the virtual terminal in the forwarding information table.
Preferably, the step S3 further includes:
and when the virtual terminal is accessed to the test network, authenticating the virtual terminal by adopting an authentication server.
A test system of multiple virtual terminals is used for implementing the test method, and comprises the following steps:
the simulation equipment is used for creating a virtual terminal corresponding to the task to be tested aiming at the task to be tested;
the simulation equipment is connected to the gateway equipment, and the simulation equipment is accessed to a test network through the gateway equipment;
the simulation equipment is provided with a terminal protocol stack module, and the virtual terminal is connected to the gateway equipment through the terminal protocol stack module so as to be accessed to the test network;
the virtual terminal is used for executing the task to be tested in the testing network.
Preferably, the terminal protocol stack includes:
a forwarding information storage submodule, in which a forwarding information table corresponding to the virtual terminal is stored;
the simulation apparatus further includes:
the virtual equipment creating sub-module generates a group of virtual equipment pairs according to the virtual terminal;
a device mapping sub-module, which directs a first device of the virtual device pair to the forwarding information table and directs a second device of the virtual device pair to a virtual bridge;
and at least one virtual terminal is mapped to the virtual equipment pair through the forwarding information table, and at least one virtual network bridge is connected to the gateway equipment through a physical network port.
Preferably, the forwarding information storage sub-module includes:
a device allocation sub-module that allocates a set of a first IP address and a MAC address to each of the virtual terminals;
and the information input sub-module inputs the virtual terminal, the first IP address and the MAC address into the forwarding information table.
Preferably, the simulation apparatus further comprises:
a judging submodule, configured to obtain an existing virtual device pair, and judge whether the virtual device pair can be used for accessing the virtual terminal;
when the existing virtual equipment pair cannot be used for accessing the virtual terminal, the judgment sub-module outputs a creation instruction to the virtual equipment creation sub-module to form a new virtual equipment pair;
when the existing virtual device pair can be used for accessing the virtual terminal, the judging submodule outputs a mapping instruction to the mapping submodule so as to bind the virtual device pair with the virtual terminal.
Preferably, an authentication server is disposed in the test network, and the authentication server authenticates the virtual terminal accessing the test network.
Preferably, the simulation apparatus further comprises:
and the cleaning submodule removes the virtual terminal from the terminal protocol stack and stops the virtual terminal after the task to be tested is executed.
The technical scheme has the following advantages or beneficial effects: the virtual terminals are established on the simulation equipment, and the terminal protocol stack is established, so that the virtual terminals can be simultaneously accessed into the test network, the simulation of the multi-terminal condition in the actual scene to be tested is realized, and the problem that the actual scene to be tested is difficult to simulate in the laboratory environment in the prior art is avoided. And the virtual terminal is established on the simulation equipment for testing, so that the equipment cost in the whole testing process is saved.
Drawings
Embodiments of the present invention will now be described more fully hereinafter with reference to the accompanying drawings. The drawings are, however, to be regarded as illustrative and explanatory only and are not restrictive of the scope of the invention.
FIG. 1 is an overall schematic diagram of an embodiment of the present invention;
FIG. 2 is a schematic diagram of a test network in an embodiment of the invention;
FIG. 3 is a diagram illustrating the substep of step S2 according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an internal forwarding link of the simulation device according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating the substep of step S21 according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating the sub-step S22 according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating step S4 according to an embodiment of the present invention;
FIG. 8 is a diagram of a test system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The invention is further described with reference to the following drawings and specific examples, which are not intended to be limiting.
The invention comprises the following steps:
a test method of multiple virtual terminals is suitable for simulation equipment, wherein the simulation equipment is connected to a test network through gateway equipment;
the test method comprises the following steps:
step S1: aiming at a task to be tested, a terminal protocol stack is established on a simulation device, and then at least one virtual terminal corresponding to the task to be tested is established;
step S2: recording all virtual terminals into a terminal protocol stack;
step S3: and accessing the virtual terminal to a test network by adopting a terminal protocol stack, and then executing a task to be tested on the virtual terminal.
Specifically, in this embodiment, at least one virtual terminal that needs to be used in a task to be tested is created on the analog device based on a test scenario corresponding to the task to be tested, and a terminal protocol stack on the analog device is modified, so that a large number of virtual terminals can be accessed into a test network through the analog device, and further, simulation of multiple terminals in the test network is realized to execute the test task.
In implementation, the method is embodied as a software embodiment deployed on a simulation device. Before the test is started, a network environment for the test is constructed in advance. As shown in fig. 2, the network environment mainly includes a simulation device a1 and a gateway device a2 for building a network. In order to realize the test process, other test equipment a3 may be accessed for simulating external network interaction or testing actual network equipment, etc. The test device A3 may also be replaced by a virtual terminal during implementation, for example, a virtual terminal may simulate a communication process of the test device A3. Other devices may be further accessed for other functions, such as a file server a4 for downloading test programs, files, an authentication server a5 for performing verification, authentication steps, a wireless access point a6 for testing access to wireless devices, and so forth. It should be noted that some of the block diagrams shown in fig. 2 are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices. The virtual terminal is a virtual terminal device created on a simulation device based on some existing container program, and can be used for simulating hardware devices in an actual network environment and various programs executed on the hardware devices.
As an optional implementation manner, before implementation, the IP of the physical network card of the simulation device needs to be set to be null, and the IP of the terminal protocol stack is allocated by the gateway device, which is not null.
In a preferred embodiment, as shown in fig. 3, step S2 includes:
step S21: adding each virtual terminal in a forwarding information table of a terminal protocol stack;
step S22: adopting a virtual device pair corresponding to a virtual terminal, enabling a first device of the virtual device pair to point to a forwarding information table, and enabling a second device of the virtual device pair to point to a virtual network bridge;
at least one virtual terminal is mapped to the virtual equipment pair through the forwarding information table, and the virtual network bridge is connected to the physical network port.
Specifically, to solve the problem that it is difficult for a computer device in the prior art to simulate a large number of virtual terminals on a single hardware device and enable all the virtual terminals to normally access a network, in this embodiment, a terminal protocol stack as shown in fig. 4 is constructed, in which a virtual bridge B3 for accessing a virtual terminal is constructed in advance, and the virtual bridge B3 is bound to a physical port B4 to perform an access process. Meanwhile, in the inside of the simulation device, in order to support a larger number of virtual terminals, in this scheme, a form of a forwarding information table (FIB table) is adopted, communication data of a plurality of virtual terminals B61, B62, and B63 is subjected to virtual route forwarding in advance in the simulation device, and then is sent to a virtual device pair (veth pair), where a first device B1 in the virtual device pair points to the forwarding information table, that is, is used for being mapped to corresponding virtual terminals B61, B62, and B63 through the forwarding information table B5, and then is forwarded to a virtual bridge B3 through an associated second device B2. Through the process, when the user generates the virtual terminal, the user can add the virtual terminal only by maintaining the forwarding information table, and automatically generate the virtual device pair which can be used for accessing the virtual bridge B3, so that the high expansibility of the simulation device is realized, and a large number of virtual terminals B3 can be added in the network testing process for testing.
In implementation, the above-mentioned pair of virtual devices may be set as one or more pairs, and is used for carrying communication data of at least one virtual terminal.
In a preferred embodiment, as shown in fig. 5, step S21 includes:
step S211: adding a virtual terminal in a terminal protocol stack;
step S212: allocating a first IP address and a MAC address for the virtual terminal;
step S213: and recording the first IP address and the MAC address in a forwarding information table.
Specifically, in order to implement the process of forwarding routing data to the virtual terminal at the terminal protocol stack layer, in this embodiment, a first IP address and a MAC address are allocated to the virtual terminal in the terminal protocol stack, so as to implement the process of labeling the virtual terminal. The MAC address is used for marking hardware equipment simulated by the virtual terminal, and the first IP address is used for performing a virtual routing forwarding process on the virtual terminal in a terminal protocol stack. The first IP addresses and the MAC addresses of the virtual terminals are maintained in the forwarding information table, so that different first IP addresses and different MAC addresses are provided among the virtual terminals, and a terminal protocol stack can access a large number of virtual terminals in a virtual device pair mode.
In a preferred embodiment, as shown in fig. 6, step S22 includes:
step S221: judging whether a virtual device pair available for virtual terminal access exists currently;
if yes, go to step S223;
if not, go to step S222;
step S222: creating a group of virtual device pairs, and pointing the second device of the virtual device pair to the virtual bridge;
step S223: and establishing a mapping relation between the first equipment of the virtual equipment pair and the virtual terminal in the forwarding information table.
In particular, in the prior art, there is a technical solution for directly connecting to a virtual machine program by creating a virtual bridge so that the virtual machine program has access to an external network. In the implementation process of the technical scheme, because the corresponding virtual bridge needs to be created on the driving level of the system, the creation process is relatively complicated, and it is difficult to effectively manage the mapping relationship when a large number of virtual terminals need to be created. In this embodiment, for the above technical problem, a way of creating a virtual device pair (path pair) is selected to connect a forwarding outlet of a virtual router and a virtual bridge, so that a simpler connection process is implemented, the connection way is easily adjusted and newly established in a subsequent test process, and the problem that maintenance is difficult to perform through direct connection of a bridge in the prior art is avoided.
In a preferred embodiment, step S3 includes: the virtual terminal requests a second IP address for the gateway equipment, and the gateway equipment allocates the second IP address to the virtual terminal by adopting an IP address allocation program.
The IP address assignment program (dhclient) is modified to assign a second IP address to the physical device and the virtual terminal, where the second IP address is used for the physical device and the virtual terminal to perform communication connection in the test network.
In a preferred embodiment, step S3 further includes:
when the virtual terminal accesses the test network, an authentication server is adopted to authenticate the virtual terminal.
Specifically, for a test scenario in which the virtual terminal needs to be authenticated, in this embodiment, an authentication server is further arranged in the test network, and an authentication process is performed when the virtual terminal accesses the test network. To implement this process, the TCP protocol needs to be supported in the virtual terminal, and the virtual terminal sending the TCP request cannot share the IP and MAC addresses.
In a preferred embodiment, the testing task of step S3 includes: automatically executing tasks and expanding tasks;
in the automatic task execution, the virtual terminal executes specific tasks such as IP allocation, downloading, webpage access, ICMP request, sleep time and the like through a script file which is constructed in advance or sent by a file server;
in the extended task, the virtual terminal can be caused to execute other types of tasks in a programming mode, such as concurrent quantity control, concurrent interval time adjustment and the like
In a preferred embodiment, as shown in fig. 7, after step S3, the method further includes:
step S4: and after the task to be tested is executed, removing the virtual terminal from the terminal protocol stack, and stopping the virtual terminal.
Specifically, after the current task to be tested is executed, resource recovery needs to be performed on the virtual terminal so as to create a new virtual terminal for the next task to be tested. In the implementation process, the above process is embodied as follows: stopping the dhclient process for distributing the second IP address to the virtual terminal to recover the IP address, deleting the information of the virtual terminal in the forwarding information table, disconnecting the mapping between the second device of the virtual device pair and the forwarding information table, and finally stopping the virtual terminal to realize the recovery of the resource.
A testing system with multiple virtual terminals, configured to implement the testing method described above, as shown in fig. 8, includes:
the simulation equipment C1, the simulation equipment C1 creates a virtual terminal C2 corresponding to the task to be tested for the task to be tested;
the gateway device C3, the analog device C1 is connected to the gateway device C3, and the analog device C1 accesses a test network through the gateway device C3;
the simulation equipment is provided with a terminal protocol stack module C4, and the virtual terminal C2 is connected to the gateway equipment C3 through the terminal protocol stack module C4 so as to access the test network;
virtual terminal C2 is used to perform a task to be tested in the test network.
Specifically, in this embodiment, at least one virtual terminal C2 that needs to be used in a task to be tested is created on the analog device C1 based on a test scenario corresponding to the task to be tested, and a terminal protocol stack module C4 on the analog device C1 is modified, so that a large number of virtual terminals C2 can be accessed to a test network through the analog device C1, and simulation of multiple terminals in the test network is realized to execute the test task.
In a preferred embodiment, the terminal protocol stack module C4 includes:
a forwarding information storage submodule C41 for storing a forwarding information table corresponding to the virtual terminal in the forwarding information storage submodule C41;
the simulation apparatus further includes:
the virtual device creating submodule C5 is used for generating a group of virtual device pairs by the virtual device creating submodule C5 according to the virtual terminal C2;
a device mapping submodule C6, the device mapping submodule C6 directing a first device of the virtual device pair to the forwarding information table and directing a second device of the virtual device pair to the virtual bridge;
at least one virtual terminal C2 is mapped to a virtual device pair by a forwarding information table, and at least one virtual bridge is connected to the gateway device C3 through a physical portal.
Specifically, aiming at the problem that computer equipment in the prior art is difficult to simulate a large number of virtual terminals on a single hardware device and all the virtual terminals can be normally accessed to a network, in this embodiment, a forwarding information table is maintained in a terminal protocol stack module C4, so that connection mapping between a virtual device pair and a virtual terminal C2 is realized, a forwarding link of a virtual terminal C2-a terminal protocol stack module C4-a virtual device pair-a virtual bridge-a physical network port is constructed, and further, the simulation equipment C1 can bear a large number of virtual terminals C2 to access to a test network.
In a preferred embodiment, forwarding information storage submodule C41 includes:
a device assigning unit C411, the device assigning submodule C411 assigning a set of a first IP address and a MAC address to each virtual terminal C2;
the information entry unit C412 and the information entry submodule C412 enter the virtual terminal C2, the first IP address and the MAC address into the forwarding information table.
Specifically, in order to implement the process of forwarding routing data to the virtual terminal at the terminal protocol stack layer, in this embodiment, the device allocation unit C411 allocates the first IP address and the MAC address to the virtual terminal C2, so as to implement the tagging process to the virtual terminal. The MAC address is used for marking hardware equipment simulated by the virtual terminal, and the first IP address is used for performing a virtual routing forwarding process on the virtual terminal in a terminal protocol stack. By maintaining the first IP address and the MAC address of the plurality of virtual terminals C2 in the forwarding information table so as to have different first IP addresses and MAC addresses between the virtual terminals, the terminal protocol stack module C4 can access a large number of virtual terminals for virtual device pairs.
In a preferred embodiment, the simulation apparatus C1 further includes:
a judgment sub-module C7, configured to acquire the existing virtual device pair from the judgment sub-module C7, and judge whether the virtual device pair can be used for accessing the virtual terminal;
when the existing virtual equipment pair cannot be used for accessing the virtual terminal, the judgment submodule outputs a creation instruction to the virtual equipment creation submodule to form a new virtual equipment pair;
when the existing virtual equipment pair can be used for the virtual terminal to access, the judgment submodule outputs a mapping instruction to the mapping submodule so as to bind the virtual equipment pair with the virtual terminal.
In particular, in the prior art, there is a technical solution for directly connecting to a virtual machine program by creating a virtual bridge so that the virtual machine program has access to an external network. In the implementation process of the technical scheme, because the corresponding virtual bridge needs to be created on the driving level of the system, the creation process is relatively complicated, and it is difficult to effectively manage the mapping relationship when a large number of virtual terminals need to be created. In this embodiment, for the above technical problem, a mode of creating a virtual device pair (path pair) is selected, and when a new virtual terminal needs to be loaded, the currently existing virtual device pair is determined by the determining submodule C7, so that the virtual device creating submodule C5 is controlled to create a new virtual device pair in time, a simpler connection process is implemented, the connection mode is easily adjusted and newly created in a subsequent test process, and the problem that maintenance is difficult due to direct connection through a bridge in the prior art is avoided.
In a preferred embodiment, the test network is provided with an authentication server, and the authentication server authenticates the virtual terminal accessing the test network.
In a preferred embodiment, the simulation apparatus further comprises:
and the cleaning submodule C8 is used for removing the virtual terminal from the terminal protocol stack and stopping the virtual terminal after the task to be tested is executed.
The invention has the beneficial effects that: the virtual terminals are established on the simulation equipment, and the terminal protocol stack is established, so that the virtual terminals can be simultaneously accessed into the test network, the simulation of the multi-terminal condition in the actual scene to be tested is realized, and the problem that the actual scene to be tested is difficult to simulate in a laboratory environment in the prior art is solved. And the virtual terminal is established on the simulation equipment for testing, so that the equipment cost in the whole testing process is saved.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.

Claims (10)

1. The test method of the multiple virtual terminals is characterized by being suitable for simulation equipment, wherein the simulation equipment is connected to a test network through gateway equipment;
the test method comprises the following steps:
step S1: aiming at a task to be tested, establishing a terminal protocol stack on the simulation equipment, and then establishing at least one virtual terminal corresponding to the task to be tested;
step S2: recording all the virtual terminals into the terminal protocol stack;
step S3: and accessing the virtual terminal to the test network by adopting the terminal protocol stack, and then executing the task to be tested on the virtual terminal.
2. The testing method according to claim 1, wherein the step S2 includes:
step S21: adding each virtual terminal in a forwarding information table of the terminal protocol stack;
step S22: adopting a virtual device pair corresponding to the virtual terminal, and enabling a first device of the virtual device pair to point to the forwarding information table, and enabling a second device of the virtual device pair to point to a virtual network bridge;
and at least one virtual terminal is mapped to the virtual equipment pair through the forwarding information table, and the virtual network bridge is connected to a physical network port.
3. The testing method according to claim 2, wherein the step S21 includes:
step S211: adding the virtual terminal in the terminal protocol stack;
step S212: allocating a first IP address and a MAC address for the virtual terminal;
step S213: and recording the first IP address and the MAC address in the forwarding information table.
4. The testing method according to claim 2, wherein the step S22 includes:
step S221: judging whether the virtual equipment pair which can be used for the virtual terminal to access exists currently;
if yes, go to step S223;
if not, go to step S222;
step S222: creating a set of virtual device pairs, pointing a second device of the virtual device pairs to the virtual bridge;
step S223: and establishing a mapping relation between the first equipment of the virtual equipment pair and the virtual terminal in the forwarding information table.
5. The testing method according to claim 1, further comprising, after step S3:
step S4: and after the task to be tested is executed, removing the virtual terminal from the terminal protocol stack, and stopping the virtual terminal.
6. A multi-virtual terminal test system for implementing the test method of any one of claims 1 to 5, comprising:
the simulation equipment is used for creating a virtual terminal corresponding to the task to be tested aiming at the task to be tested;
the simulation equipment is connected to the gateway equipment, and the simulation equipment is accessed to a test network through the gateway equipment;
the simulation equipment is provided with a terminal protocol stack module, and the virtual terminal is connected to the gateway equipment through the terminal protocol stack module so as to be accessed to the test network;
the virtual terminal is used for executing the task to be tested in the testing network.
7. The test method of claim 6, wherein the terminal protocol stack comprises:
a forwarding information storage submodule, in which a forwarding information table corresponding to the virtual terminal is stored;
the simulation apparatus further includes:
the virtual equipment creating sub-module generates a group of virtual equipment pairs according to the virtual terminal;
a device mapping sub-module, which directs a first device of the virtual device pair to the forwarding information table and directs a second device of the virtual device pair to a virtual bridge;
and at least one virtual terminal is mapped to the virtual equipment pair through the forwarding information table, and at least one virtual network bridge is connected to the gateway equipment through a physical network port.
8. The test method of claim 7, wherein the forwarding information storage sub-module comprises:
a device allocation unit, wherein the device allocation submodule allocates a set of first IP address and MAC address for each virtual terminal;
and the information input sub-module inputs the virtual terminal, the first IP address and the MAC address into the forwarding information table.
9. The testing method of claim 7, wherein the simulation device further comprises:
a judging submodule, configured to obtain an existing virtual device pair, and judge whether the virtual device pair can be used for accessing the virtual terminal;
when the existing virtual equipment pair cannot be used for accessing the virtual terminal, the judgment sub-module outputs a creation instruction to the virtual equipment creation sub-module to form a new virtual equipment pair;
when the existing virtual device pair can be used for accessing the virtual terminal, the judging submodule outputs a mapping instruction to the mapping submodule so as to bind the virtual device pair with the virtual terminal.
10. The testing method of claim 6, wherein the simulation device further comprises:
and the cleaning submodule removes the virtual terminal from the terminal protocol stack and stops the virtual terminal after the execution of the task to be tested is finished.
CN202210682540.7A 2022-06-16 2022-06-16 Test method and system for multiple virtual terminals Active CN115086216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210682540.7A CN115086216B (en) 2022-06-16 2022-06-16 Test method and system for multiple virtual terminals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210682540.7A CN115086216B (en) 2022-06-16 2022-06-16 Test method and system for multiple virtual terminals

Publications (2)

Publication Number Publication Date
CN115086216A true CN115086216A (en) 2022-09-20
CN115086216B CN115086216B (en) 2024-05-03

Family

ID=83252487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210682540.7A Active CN115086216B (en) 2022-06-16 2022-06-16 Test method and system for multiple virtual terminals

Country Status (1)

Country Link
CN (1) CN115086216B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656637A (en) * 2009-09-11 2010-02-24 中国科学院计算技术研究所 Virtual trunk measuring device and method for network protocol
US7702764B1 (en) * 2004-01-30 2010-04-20 Cisco Technology, Inc. System and method for testing network protocols
CN102421112A (en) * 2011-11-18 2012-04-18 展讯通信(上海)有限公司 Testing method of mobile terminal, mobile terminal simulator, testing equipment and testing system
CN102420891A (en) * 2011-09-23 2012-04-18 展讯通信(上海)有限公司 Mobile terminal and test method, equipment and system thereof
US9007922B1 (en) * 2013-05-23 2015-04-14 Juniper Networks, Inc. Systems and methods for testing and analyzing controller-based networks
CN105049435A (en) * 2015-07-21 2015-11-11 重庆邮电大学 Cloud testing framework oriented to protocol conformance of heterogeneous wireless sensor network
US20170324617A1 (en) * 2016-05-03 2017-11-09 Verizon Patent And Licensing Inc. Testing and validation of user equipment for a cellular network
CN109005080A (en) * 2018-06-25 2018-12-14 烽火通信科技股份有限公司 A kind of distributed packet forwarding implementation method realizes system and automated testing method
KR20190054229A (en) * 2017-11-13 2019-05-22 쿨클라우드(주) Machine learning based network automation system method
CN110838954A (en) * 2019-11-07 2020-02-25 中国人民解放军国防科技大学 Lightweight large-scale autonomous network protocol function test method
CN111343654A (en) * 2020-02-29 2020-06-26 中国电子科技集团公司第五十四研究所 Protocol stack integrated self-testing system of mobile communication system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7702764B1 (en) * 2004-01-30 2010-04-20 Cisco Technology, Inc. System and method for testing network protocols
CN101656637A (en) * 2009-09-11 2010-02-24 中国科学院计算技术研究所 Virtual trunk measuring device and method for network protocol
CN102420891A (en) * 2011-09-23 2012-04-18 展讯通信(上海)有限公司 Mobile terminal and test method, equipment and system thereof
CN102421112A (en) * 2011-11-18 2012-04-18 展讯通信(上海)有限公司 Testing method of mobile terminal, mobile terminal simulator, testing equipment and testing system
US9007922B1 (en) * 2013-05-23 2015-04-14 Juniper Networks, Inc. Systems and methods for testing and analyzing controller-based networks
CN105049435A (en) * 2015-07-21 2015-11-11 重庆邮电大学 Cloud testing framework oriented to protocol conformance of heterogeneous wireless sensor network
US20170324617A1 (en) * 2016-05-03 2017-11-09 Verizon Patent And Licensing Inc. Testing and validation of user equipment for a cellular network
KR20190054229A (en) * 2017-11-13 2019-05-22 쿨클라우드(주) Machine learning based network automation system method
CN109005080A (en) * 2018-06-25 2018-12-14 烽火通信科技股份有限公司 A kind of distributed packet forwarding implementation method realizes system and automated testing method
CN110838954A (en) * 2019-11-07 2020-02-25 中国人民解放军国防科技大学 Lightweight large-scale autonomous network protocol function test method
CN111343654A (en) * 2020-02-29 2020-06-26 中国电子科技集团公司第五十四研究所 Protocol stack integrated self-testing system of mobile communication system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
MASAHIRO KURODA: "Large-scale Hybrid Testbed for Cognitive Radio Networks by Real-and-Virtual Execution", 《2007 3RD INTERNATIONAL CONFERENCE ON TESTBEDS AND RESEARCH INFRASTRUCTURE FOR THE DEVELOPMENT OF NETWORKS AND COMMUNITIES》 *
刘渊, 范晓岚, 王开云, 姜建国: "网络协议栈软件的自动化测试研究与实现", 计算机工程与应用, no. 15, 1 March 2006 (2006-03-01) *
李毅;顾健;顾铁军;: "基于虚拟TCP/IP协议栈的仿真反垃圾邮件产品测试系统", 信息网络安全, no. 10 *
赵小鸥;: "多功能MPLS网络测试仪的设计和实现", 教育信息化, no. 17, 15 September 2005 (2005-09-15) *

Also Published As

Publication number Publication date
CN115086216B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
US7334162B1 (en) Dynamic distribution of test execution
CN110460457B (en) Data transmission method and device
CN101924693A (en) Be used for method and system in migrating processes between virtual machines
CN108183975A (en) A kind of method and system of domain name mapping
CN114205342B (en) Service debugging routing method, electronic equipment and medium
CN110716787A (en) Container address setting method, apparatus, and computer-readable storage medium
CN107070752B (en) Testing method and testing system for long connection capacity
CN110855488B (en) Virtual machine access method and device
CN112162927A (en) Test method, medium and device of cloud computing platform and computing equipment
CN113676564B (en) Data transmission method, device and storage medium
CN116204933B (en) Method for isolating PCIe network card based on jailhouse under ARM64 architecture
CN112003794B (en) Floating IP current limiting method, system, terminal and storage medium
CN106875765B (en) Electronic classroom implementation method and device based on VDI
CN108289047A (en) A kind of RMT test methods and device
CN115086216B (en) Test method and system for multiple virtual terminals
CN116264538A (en) Data processing method, device, equipment and computer storage medium
US7191099B2 (en) System for testing network devices
CN112449024B (en) Intranet penetration method, equipment and storage medium of NAT (network Address translation) simulation gateway
CN104683178B (en) A kind of test method and system of the more DUT of identical IP address
CN112953790A (en) Test system and method for devices with same IP address
CN109450682B (en) IB network card communication configuration method and device, terminal and storage medium
CN113472558B (en) Network deployment method and device
CN112242910B (en) Network element fault positioning method and device, computing equipment and computer storage medium
CN111107178B (en) Method and equipment for designating local address used by message
US11061666B1 (en) Distributing computing tasks to individual computer systems

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