CN109525461B - Network equipment testing method, device, equipment and storage medium - Google Patents

Network equipment testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN109525461B
CN109525461B CN201811423258.7A CN201811423258A CN109525461B CN 109525461 B CN109525461 B CN 109525461B CN 201811423258 A CN201811423258 A CN 201811423258A CN 109525461 B CN109525461 B CN 109525461B
Authority
CN
China
Prior art keywords
addresses
data stream
source
destination
address
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
CN201811423258.7A
Other languages
Chinese (zh)
Other versions
CN109525461A (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201811423258.7A priority Critical patent/CN109525461B/en
Publication of CN109525461A publication Critical patent/CN109525461A/en
Application granted granted Critical
Publication of CN109525461B publication Critical patent/CN109525461B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • 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

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, a device, equipment and a storage medium for testing the forwarding performance of network equipment, wherein the method comprises the following steps: when a test instruction is received, acquiring at least two generated source IP addresses and at least two generated destination IP addresses of a target server; sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other; receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server; and generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream, simplifying test networking and realizing the optimal test effect on the tested equipment by a simple method.

Description

Network equipment testing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for testing a network device.
Background
In the functional test of the network device, different data streams are generally generated by a computing device such as a computer to test the forwarding performance of the network device, for example, two computers, one simulation client and one simulation server are adopted during the test to test the forwarding performance of a DUT (device under test) through interaction of the data streams between the client and the server, but with the progress of the technology, the existing network device develops in a trend of multi-core devices, because the data streams include 5 elements, namely, a source IP, a source port, a destination IP, a destination port and a protocol, in the daily functional test, the service of the test is fixed, that is, the protocol is fixed and the destination port is also fixed, if there are only two computers, the source IP and the destination IP are also fixed, that is, the source IP, the destination IP and the destination port are fixed among the 5 elements in the data streams, that is, 4 of the 5 elements are fixed, only the source port is left, but the source port is self-distributed by an operating system and cannot be manually specified, so that under the condition that two computers are adopted for DUT test, only one data flow can be generated at the moment, and the advantage of multi-core cannot be well embodied under the condition that only one data flow exists, the forwarding performance test of the network equipment cannot obtain the optimal test result, and at the moment, a plurality of data flows need to be simulated, wherein at present, the following two methods are mainly used for simulating the plurality of data flows, namely, one method is a method of software simulation, and one end of the data flow is packaged to the other end; the other method is to use a tester to send a packet, and the two ends of the tester can be mutually sent out as a packet.
However, in the process of implementing the present invention, the inventors found that: the method of utilizing software simulation is generally a mechanical message sending, which is a unidirectional simulation behavior, that is, one end sends a message to the other end, generally a client end sends a message to a server end, and the server cannot respond to the client after receiving the message, so that the scheme cannot completely simulate the service data stream with interactive behavior to test the forwarding performance of the network equipment; although the method of using the tester to simulate can simulate the service data flow of the interactive behavior, the tester is a non-public resource, and the problem cannot be solved well when no tester resource exists, and the tester is a non-universal resource, if the tester is an all-optical port or an all-electrical port, and the DUT is an all-electrical port or an all-optical port, or the tester is a full 10G port, and does not support the self-adaptation of 10G and 1G, and the DUT only has a 1G port, then an additional switching device needs to be used, which causes the complexity in the testing process, the testing effect is not good, and the expenditure of the testing cost is increased.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, a device and a storage medium for testing a network device, so as to solve the problem that the data stream simulation in the existing method for testing a network device cannot achieve the best test effect.
According to a first aspect of the embodiments of the present invention, a method for testing a network device is provided, the method including:
when a test instruction is received, acquiring at least two generated source IP addresses and at least two generated destination IP addresses of a target server;
sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other;
receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server;
and generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream.
Preferably, the method further comprises:
receiving configuration information input by a user, wherein the configuration information comprises an existing IP address of a target server, a first IP address field, a second IP address field, a first subnet mask and a second subnet mask; wherein the first IP address segment and the first subnet mask are used to generate at least two source IP addresses;
and sending the second IP address field and the second subnet mask to the target server according to the existing IP address of the target server, so that the target server generates at least two target IP addresses according to the second IP address field and the second subnet mask.
Preferably, the at least two source IP addresses or destination IP addresses are generated by a batch script.
Preferably, before the sending a request data stream to the device under test based on the source IP address and the destination IP address, the method further includes:
establishing at least two FTP connections with the target server according to at least two source IP addresses and at least two destination IP addresses; the FTP connection is used for sending the request data stream.
Preferably, before the sending a request data stream to the device under test based on the source IP address and the destination IP address, the method further includes:
establishing at least two ping connections with the target server according to at least two source IP addresses and at least two destination IP addresses; the ping connection is used to send the request data stream.
Preferably, the request data stream is a traffic flow based on a TCP protocol, and the request data stream is generated according to a batch script.
According to a second aspect of the embodiments of the present invention, there is provided a testing apparatus for a network device, the apparatus including:
the IP address acquisition module is used for acquiring at least two generated source IP addresses and at least two generated destination IP addresses of the target server when receiving the test instruction;
the first sending module is used for sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other;
the receiving module is used for receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server;
and the test result generation module is used for generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream.
Preferably, the method further comprises the following steps:
the configuration module is used for receiving configuration information input by a user, wherein the configuration information comprises an existing IP address of a target server, a first IP address field, a second IP address field, a first subnet mask and a second subnet mask; wherein the first IP address segment and the first subnet mask are used to generate at least two source IP addresses;
and the second sending module is used for sending the second IP address field and the second subnet mask to the target server according to the existing IP address of the target server, so that the target server generates at least two destination IP addresses according to the second IP address field and the second subnet mask.
According to a third aspect of embodiments of the present invention, there is provided a test apparatus, the test apparatus comprising a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a test instruction is received, acquiring at least two generated source IP addresses and at least two generated destination IP addresses of a target server;
sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other;
receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server;
and generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon computer instructions, characterized in that the instructions, when executed by a processor, implement the steps of the method according to any one of the first aspect of embodiments of the present invention.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention sends a plurality of request data streams to the tested equipment according to a plurality of generated source IP addresses and a plurality of generated destination IP addresses of the destination server, the source IP addresses of the request data streams are different from each other or the destination IP addresses are different from each other, receiving a response data stream which is transmitted back by the tested equipment based on the request data stream, and finally generating a transmission performance test result of the tested equipment according to the request data stream and the response data stream, the test equipment generates a plurality of source IP addresses and the target server generates a plurality of destination IP addresses, so that the simulation of a plurality of different data streams with interactive behaviors under the condition of using one test equipment and one server is realized, the test networking is simplified, and no additional test equipment is needed, the expenditure of the test equipment is saved, and the optimal test effect on the tested equipment can be realized by a simple method.
Drawings
FIG. 1 is a flowchart illustrating an embodiment of a method for testing a network device according to an exemplary embodiment of the present invention;
FIG. 2a is a diagram illustrating a forwarding test of a device under test using a test apparatus and a target server according to an exemplary embodiment of the present invention;
FIG. 2b is another schematic diagram illustrating a forwarding test of a device under test using a test apparatus and a target server according to an exemplary embodiment of the present invention;
FIG. 3 is a flow chart illustrating an embodiment of another method for testing network devices in accordance with an illustrative embodiment of the present invention;
FIG. 4 is a flowchart illustrating an embodiment of another method for testing network devices according to an exemplary embodiment of the invention;
FIG. 5 is a block diagram illustrating an embodiment of a testing apparatus for network devices according to an exemplary embodiment of the present invention;
FIG. 6 is a hardware block diagram of a test equipment according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Because the existing network device develops in a multi-core trend, when the network device is tested, only one data stream can be generated because one device only has one IP address, and an optimal test result cannot be obtained, at this time, a plurality of data streams need to be simulated, and the existing method for simulating a plurality of data streams comprises a method for simulating by using software and a method for issuing packets by using a tester, but the method for simulating by using software cannot completely simulate service data streams with interactive behaviors, and the method for issuing packets by using the tester needs to use additional switching equipment, so that the complexity of a test flow is caused, and the expenditure of test cost is increased.
In order to solve the problem that the data stream simulation cannot achieve the optimal test effect in the existing test method for the network device, the invention provides a test method for the network device, which can be executed by the test device, as shown in fig. 1, and the method specifically includes:
s101, when a test instruction is received, at least two generated source IP addresses are obtained, and at least two destination IP addresses generated by a target server are obtained.
S102, based on the source IP address and the destination IP address, sending a request data stream to the tested device; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other.
S103, receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server.
And S104, generating a forwarding performance test result of the tested device according to the request data stream and the response data stream.
In an embodiment, the device under test for executing the test method may be a computer, a tablet computer, a notebook computer, a personal digital assistant, or other computing devices, the test method of the network device is integrated as a functional program in the test device, and the test method is executed by the test device when receiving the test instruction.
In step S101, when receiving a test instruction from a user, where the receiving of the test instruction includes, but is not limited to, confirming that a test instruction process is received when detecting that a preset key is triggered, or confirming that a test instruction is received when recognizing a specified action made by the user, or confirming that a test instruction is received when receiving a voice confirmation message from the user, and the like, the test device first acquires at least two generated source IP addresses after receiving the test instruction, and acquires at least two generated destination IP addresses from a target server.
In an embodiment, after receiving the test instruction, the test device prompts the user to input configuration information on the test device, for example, the test device may display a corresponding input frame on a device interface for user input, and then receives the configuration information input by the user, where the configuration information may include a first IP address field and a first subnet mask, where the first IP address field and the first subnet mask are used to enable the test device to generate at least two source IP addresses, and the device interface may further provide an interface for the user to input a destination IP address, so that the user inputs at least two destination IP addresses generated by a destination server, where the destination IP address may be an IP address generated by the destination server and known in advance by the user. When the target server generates the target IP address, the user may input configuration information such as the second IP address field and the second subnet mask on the target server, and the target server generates at least two target IP addresses according to the second IP address field and the second subnet mask. In the testing process, the user respectively configures the testing device and the server to respectively and independently complete the IP address generating process on the testing device and the server, and completes the simulation generation of a plurality of source IP addresses on one testing device and a plurality of destination IP addresses on one target server, so that the device expenditure and the maintenance expenditure in the testing process are saved, and the energy spent by the user is also reduced.
In another embodiment, the configuration information input by the user on the test device may further include an IP address, a second IP address field, and a second subnet mask that have been generated by the target server, the user first establishes a connection between the test device and the target server through the IP address, then the test device sends the second IP address field and the second subnet mask input by the user to the IP address that has been generated by the target server, and the target server generates at least two destination IP addresses according to the second IP address field and the second subnet mask after receiving the second IP address field and the second subnet mask. In the test process, the user completes configuration at the end of the test equipment, so that the test equipment and the target server can complete the simulation generation of the IP address according to the once configured content, the equipment expenditure and the maintenance expenditure in the test process are saved, the user is further facilitated, and the complicated operation that the user needs to input configuration information at the test equipment and the server respectively is reduced.
In an embodiment, the at least two source IP addresses or destination IP addresses are generated by a batch script. In one implementation, the test device generates at least two source IP addresses through a batch script according to the first IP address segment and the first subnet mask input by the user, and the target server generates at least two destination IP addresses through a batch script according to the second IP address segment and the second subnet mask after receiving the second IP address segment and the second subnet mask. The batch processing script is used for processing a certain object in batches, is applied to DOS and Windows systems, is interpreted and run by a command interpreter (usually command.COM or CMD.EXE) embedded in the DOS or Windows systems, and currently, the common batch processing comprises two types: DOS batch processing and PS batch processing are applied in the embodiment, the DOS batch processing is based on a DOS command, is used for automatically executing the DOS command in batch to realize a script of a specific operation, forms a batch processing file of the batch processing script, or is called a batch processing program, is a common text file formed by a strip of DOS commands, can be directly edited by a notebook or created by the DOS command, or can be edited by a text editor Edit.exe under the DOS, enters the name of the batch processing file under a command prompt, or double-clicks the batch processing file, and a system calls Cmd.exe to run the batch processing program.
In step 102, please refer to fig. 2a and fig. 2b, where fig. 2a is a schematic diagram of a forwarding test performed on a device under test by using a testing apparatus and a target server according to the present invention, fig. 2b is another schematic diagram of a forwarding test performed on a device under test by using a testing apparatus and a target server according to the present invention, and represents a process of simulating a plurality of source IP addresses by using a testing apparatus and a plurality of destination IP addresses by using a target server so as to perform a forwarding test on the device under test, the testing apparatus generates request data streams based on the source IP addresses and the destination IP addresses, and sends the request data streams to the device under test, the number of the request data streams is determined based on the number of the source IP addresses generated by the device under test and the number of the IP addresses generated by the target server, and the source IP addresses corresponding to each request data stream are different from each other or the destination IP addresses are different from each other, for example, the device under test generates 4 source IP addresses, the target server generates 4 destination IP addresses, since a data flow includes 5 elements, which are respectively a source port, a source address, a destination port, a destination address, a protocol, and only one of the 5 elements is different, that is, two different data flows, under the condition that the source port, the destination port, and the protocol are fixed, the device under test can generate 16(4 × 4) request data flows at most based on the generated 4 source IP addresses and 4 destination IP addresses, after the device under test receives the request data flows, the device under test forwards the request data flows to the target server based on the destination IP addresses, it should be noted that the device under test is a network device that needs to be network-processed by a CPU, such as a firewall, a VPN device, and the like, the request data flows are traffic flows based on a TCP protocol, for example, an FTP request data stream, an HTTP request data stream, or the like, the request data stream is generated by a batch script according to the source IP address and the destination IP address, for example, when the request data stream is an FTP file request, the request data stream is generated by a batch script executing an FTP command.
In step 103, after the device under test forwards the request data stream to the target server, the target server generates a response data stream according to the request data stream, sends the response data stream to the device under test, and forwards the response data stream back to the test equipment by the device under test.
In step 104, after receiving the response data stream forwarded back by the device under test, the testing device obtains a test result according to the request data stream with the interactive behavior and the response data stream, that is, tests the maximum data traffic that can be forwarded by the device under test, for example, when the device under test is a firewall device, tests the maximum session number of the firewall device according to the request data stream with the interactive behavior and the response data stream.
The embodiment of the invention sends a plurality of request data streams to the tested equipment according to a plurality of generated source IP addresses and a plurality of generated destination IP addresses of the destination server, the source IP addresses of the request data streams are different from each other or the destination IP addresses are different from each other, receiving a response data stream which is transmitted back by the tested equipment based on the request data stream, and finally generating a transmission performance test result of the tested equipment according to the request data stream and the response data stream, the test equipment generates a plurality of source IP addresses and the target server generates a plurality of destination IP addresses, so that the simulation of a plurality of different data streams with interactive behaviors under the condition of using one test equipment and one server is realized, the test networking is simplified, and no additional test equipment is needed, the expenditure of the test equipment is saved, and the optimal test effect on the tested equipment can be realized by a simple method.
The present application provides another testing method for a network device, as shown in fig. 3, the method includes:
s201, when receiving the test instruction, acquiring at least two generated source IP addresses and at least two generated destination IP addresses of the target server. Similar to step S101 shown in fig. 1, the description is omitted here.
S202, at least two FTP connections are established with the target server according to at least two source IP addresses and at least two destination IP addresses.
S203, generating a data stream based on the source IP address and the destination IP address so as to send a request data stream to the tested device through the FTP connection; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other.
S204, receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server. Similar to step S103 shown in fig. 1, the description is omitted here.
S205, generating a forwarding performance test result of the tested device according to the request data stream and the response data stream. Similar to step S104 shown in fig. 1, the description is omitted here.
In step 202, after the test device obtains the generated source IP address and the IP address generated on the target server, the test device establishes at least two FTP connections with the target server according to at least two source IP addresses and at least two destination IP addresses, for example, the test device generates 4 source IP addresses, and the target server generates 5 destination IP addresses, so that at most 20(4 × 5) FTP connections can be established between the test device and the target server, and a batch processing script of an FTP command is executed by simulating an FTP login behavior, so that the connection between the source IP address generated by the test device and the destination IP address generated by the target server is realized, the operation is simple, and the test device automatically connects to the target server.
In step 203, after the test device and the target server realize automatic connection, the test device generates an FTP request data stream through a batch script according to the source IP address and the target IP address, and sends the FTP request data stream to the device under test based on the FTP connection, so that the device under test sends the FTP request data stream to the target server through a connection link established by the FTP connection.
The present application provides another testing method for a network device, as shown in fig. 4, the method includes:
s301, when receiving the test instruction, acquiring the generated at least two source IP addresses and acquiring the at least two destination IP addresses generated by the target server. Similar to step S101 shown in fig. 1, the description is omitted here.
S302, at least two ping connections are established with the target server according to at least two source IP addresses and at least two destination IP addresses.
S303, generating a data stream based on the source IP address and the destination IP address so as to send a request data stream to the tested device through the ping connection; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other.
S304, receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server. Similar to step S103 shown in fig. 1, the description is omitted here.
S305, generating a forwarding performance test result of the tested device according to the request data stream and the response data stream. Similar to step S104 shown in fig. 1, the description is omitted here.
In step 302, after the test device obtains the generated source IP address and the IP address generated on the target server, the test device establishes at least two ping connections with the target server according to at least two source IP addresses and at least two target IP addresses, for example, the test device generates 5 source IP addresses, the target server generates 5 target IP addresses, and under the condition that the source IP address and the target IP address are used as variation parameters, at most 25(5 × 5) FTP connections can be established between the test device and the target server, and the connection between the source IP address generated by the test device and the target IP address generated by the target server is enabled through a ping protocol, so that the operation is simple, and the test device automatically connects to the target server is realized.
In step 303, after the test device automatically connects to the target server, the test device pings different destination IP addresses according to different source IP addresses to generate multiple request data streams through a batch script, and sends the request data streams to the device under test based on the ping connection, so that the device under test sends the request data streams to the target server according to a connection link established by the ping connection.
Corresponding to the embodiment of the testing method of the network equipment, the application also provides embodiments of a testing device of the network equipment, testing equipment and a computer readable storage medium.
Referring to fig. 5, a block diagram of an embodiment of a testing apparatus for a network device according to the present application includes an IP address obtaining module 401, a sending module 402, a receiving module 403, and a test result generating module 404.
Wherein the content of the first and second substances,
the IP address obtaining module 401 is configured to, when receiving the test instruction, obtain at least two generated source IP addresses and obtain at least two generated destination IP addresses of the target server.
The first sending module 402 is configured to send a request data stream to a device under test based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other.
The receiving module 403 is configured to receive a response data stream that is sent back by the device under test based on the request data stream; wherein the response data stream is generated by the target server.
The test result generating module 404 is configured to generate a forwarding performance test result of the device under test according to the request data stream and the response data stream.
Preferably, the method further comprises the following steps:
the configuration module is used for receiving configuration information input by a user, wherein the configuration information comprises an existing IP address of a target server, a first IP address field, a second IP address field, a first subnet mask and a second subnet mask; wherein the first IP address segment and the first subnet mask are used to generate at least two source IP addresses.
The second sending module is configured to send the second IP address segment and the second subnet mask to the target server according to the existing IP address of the target server, so that the target server generates at least two destination IP addresses according to the second IP address segment and the second subnet mask.
Preferably, the at least two source IP addresses or destination IP addresses are generated by a batch script.
Preferably, before the first sending module 402, the method further includes:
the FTP connection module is used for establishing at least two FTP connections with the target server according to at least two source IP addresses and at least two destination IP addresses; the FTP connection is used for sending the request data stream.
Preferably, before the first sending module 402, the method further includes:
the Ping connection module is used for establishing at least two Ping connections with the target server according to at least two source IP addresses and at least two destination IP addresses; the ping connection is used to send the request data stream.
Preferably, the request data stream is a traffic flow based on a TCP protocol, and the request data stream is generated according to a batch script.
The embodiments of the method for testing the forwarding performance of the network device and the apparatus for testing the forwarding performance of the network device according to the present application can be applied to various test devices that need to be tested by the network device, for example, the test devices can be computers, tablet computers, notebook computers, personal digital assistants, and other computing devices. The method embodiment or the apparatus embodiment may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking a software implementation as an example, as a logical device, the processor 501 of the electronic device reads corresponding computer program instructions in the non-volatile memory 502 into the memory 503 for execution. From a hardware aspect, as shown in fig. 6, a hardware structure diagram of a testing device in which the method or apparatus for testing forwarding performance of a network device according to the present application is located is shown, except for the processor 501, the memory 503, the network interface 504, and the nonvolatile memory 502 shown in fig. 6, in an embodiment, the testing device in which the method or apparatus for testing forwarding performance of a network device is located may also include other hardware generally according to an actual function of the device, and is not shown in fig. 6 one by one.
Correspondingly, the embodiment of the invention also provides the test equipment, and the test equipment comprises a processor.
A memory for storing processor-executable instructions.
Wherein the processor is configured to:
and when the test instruction is received, acquiring the generated at least two source IP addresses and acquiring the generated at least two destination IP addresses of the target server.
Sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other.
Receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server.
And generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream.
The implementation process of the functions and actions of each unit in the test device is specifically described in the implementation process of the corresponding step in the method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of an apparatus to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of a device, enable the device to perform the above-described method.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for testing network equipment is characterized by comprising the following steps:
when a test instruction is received, acquiring at least two generated source IP addresses and at least two generated destination IP addresses of a target server;
sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other;
receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server;
and generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream.
2. The method for testing a network device of claim 1, wherein the method further comprises:
receiving configuration information input by a user, wherein the configuration information comprises an existing IP address of a target server, a first IP address field, a second IP address field, a first subnet mask and a second subnet mask; wherein the first IP address segment and the first subnet mask are used to generate at least two source IP addresses;
and sending the second IP address field and the second subnet mask to the target server according to the existing IP address of the target server, so that the target server generates at least two target IP addresses according to the second IP address field and the second subnet mask.
3. The method for testing a network device of claim 1, wherein the at least two source IP addresses or target IP addresses are generated by a batch script.
4. The method for testing network equipment according to claim 1, wherein before sending the request data stream to the equipment to be tested based on the source IP address and the destination IP address, the method further comprises:
establishing at least two FTP connections with the target server according to at least two source IP addresses and at least two destination IP addresses; the FTP connection is used for sending the request data stream.
5. The method for testing network equipment according to claim 1, wherein before sending the request data stream to the equipment to be tested based on the source IP address and the destination IP address, the method further comprises:
establishing at least two ping connections with the target server according to at least two source IP addresses and at least two destination IP addresses; the ping connection is used to send the request data stream.
6. The method for testing network equipment according to claim 1, wherein the request data stream is traffic based on a TCP protocol, and the request data stream is generated according to a batch script.
7. A testing device of network equipment is characterized by comprising the following steps:
the IP address acquisition module is used for acquiring at least two generated source IP addresses and at least two generated destination IP addresses of the target server when receiving the test instruction;
the first sending module is used for sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other;
the receiving module is used for receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server;
and the test result generation module is used for generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream.
8. The apparatus for testing a network device of claim 7, further comprising:
the configuration module is used for receiving configuration information input by a user, wherein the configuration information comprises an existing IP address of a target server, a first IP address field, a second IP address field, a first subnet mask and a second subnet mask; wherein the first IP address segment and the first subnet mask are used to generate at least two source IP addresses;
and the second sending module is used for sending the second IP address field and the second subnet mask to the target server according to the existing IP address of the target server, so that the target server generates at least two destination IP addresses according to the second IP address field and the second subnet mask.
9. A test apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a test instruction is received, acquiring at least two generated source IP addresses and at least two generated destination IP addresses of a target server;
sending a request data stream to the tested device based on the source IP address and the destination IP address; the number of the request data streams is determined based on the number of the source/destination IP addresses, and the source IP addresses or the destination IP addresses corresponding to the request data streams are different from each other;
receiving a response data stream which is transmitted back by the tested device based on the request data stream; wherein the response data stream is generated by the target server;
and generating a forwarding performance test result of the tested equipment according to the request data stream and the response data stream.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 6.
CN201811423258.7A 2018-11-27 2018-11-27 Network equipment testing method, device, equipment and storage medium Active CN109525461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811423258.7A CN109525461B (en) 2018-11-27 2018-11-27 Network equipment testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811423258.7A CN109525461B (en) 2018-11-27 2018-11-27 Network equipment testing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109525461A CN109525461A (en) 2019-03-26
CN109525461B true CN109525461B (en) 2020-09-08

Family

ID=65794395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811423258.7A Active CN109525461B (en) 2018-11-27 2018-11-27 Network equipment testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109525461B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995614B (en) * 2019-03-29 2020-08-14 新华三信息安全技术有限公司 Alpha testing method and device
CN111193636A (en) * 2019-10-21 2020-05-22 腾讯科技(深圳)有限公司 Method and device for testing availability of single machine
CN111107083B (en) * 2019-12-18 2021-11-23 杭州迪普科技股份有限公司 White list specification testing method and device
CN111106983B (en) * 2019-12-27 2021-09-21 杭州迪普科技股份有限公司 Method and device for detecting network connectivity
CN114257529A (en) * 2021-12-24 2022-03-29 深圳市欣博跃电子有限公司 Network equipment stability testing method, device, equipment, system and medium
CN114401141A (en) * 2022-01-18 2022-04-26 中国建设银行股份有限公司 Method and device for testing protection performance
CN114900450A (en) * 2022-04-27 2022-08-12 北京计算机技术及应用研究所 Network forwarding performance testing method based on high-speed data processing platform
CN115484209B (en) * 2022-09-23 2024-04-02 绿盟科技集团股份有限公司 Network traffic playback method and device, medium and electronic equipment
CN116760756B (en) * 2023-08-15 2023-12-01 湖南天冠电子信息技术有限公司 Method for testing terminal equipment by test switch and test switch networking system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2398189A1 (en) * 2010-06-15 2011-12-21 JDS Uniphase Corporation Method for time aware inline remote mirroring
CN104954205A (en) * 2015-07-22 2015-09-30 上海斐讯数据通信技术有限公司 Soft routing performance test method
CN105763398A (en) * 2016-05-06 2016-07-13 哈尔滨工程大学 Scanning detection optimizing method based on sequence hypothesis testing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2398189A1 (en) * 2010-06-15 2011-12-21 JDS Uniphase Corporation Method for time aware inline remote mirroring
CN104954205A (en) * 2015-07-22 2015-09-30 上海斐讯数据通信技术有限公司 Soft routing performance test method
CN105763398A (en) * 2016-05-06 2016-07-13 哈尔滨工程大学 Scanning detection optimizing method based on sequence hypothesis testing

Also Published As

Publication number Publication date
CN109525461A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
CN109525461B (en) Network equipment testing method, device, equipment and storage medium
CN110351156B (en) Test method and device
CN107277153B (en) Method, device and server for providing voice service
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
US9936027B2 (en) Methods, systems, and computer readable media for application session sharing
US11226883B2 (en) Secure method for managing a virtual test platform
WO2021164261A1 (en) Method for testing cloud network device, and storage medium and computer device
CN110011875B (en) Dial testing method, device, equipment and computer readable storage medium
CN104079571A (en) Method and device for recognizing Android simulator
CN107168844B (en) Performance monitoring method and device
CN109218370A (en) Message method and device, electronic equipment
CN105991679B (en) A kind of implementation method and device of network sharing
CN105117344A (en) Interface integration test method and system based on PB
US20220014457A1 (en) Methods, systems and computer readable media for stateless service traffic generation
CN106708717B (en) A kind of exploitation adjustment method and device
CN112199621B (en) Method and device for quickly generating poster and computer equipment
CN106875765B (en) Electronic classroom implementation method and device based on VDI
US11196686B2 (en) Chatbot context setting using packet capture
US20210176155A1 (en) Systems and methods for dynamic network traffic manipulation
US20180335894A1 (en) Messaging and orchestrating platform in a computer network environment
US11621893B2 (en) Methods, systems, and computer readable media for establishing dynamic agent associations in a cloud computing environment
CN110011894B (en) Barrage message simulation method and device
CN107220092B (en) Method for deploying software, control server, readable medium and storage controller
CN112131095A (en) Pressure testing method and device
CN112738032B (en) Communication system for preventing IP deception

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