CN106301994B - Network communication abnormity testing method and device - Google Patents
Network communication abnormity testing method and device Download PDFInfo
- Publication number
- CN106301994B CN106301994B CN201510353460.7A CN201510353460A CN106301994B CN 106301994 B CN106301994 B CN 106301994B CN 201510353460 A CN201510353460 A CN 201510353460A CN 106301994 B CN106301994 B CN 106301994B
- Authority
- CN
- China
- Prior art keywords
- packet
- data packet
- data
- packet loss
- time
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 74
- 238000004891 communication Methods 0.000 title claims abstract description 33
- 238000012545 processing Methods 0.000 claims abstract description 60
- 238000000034 method Methods 0.000 claims abstract description 31
- 230000002159 abnormal effect Effects 0.000 claims description 16
- 238000012986 modification Methods 0.000 claims description 8
- 230000004048 modification Effects 0.000 claims description 8
- 238000010998 test method Methods 0.000 claims description 5
- 238000010276 construction Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000005856 abnormality Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004622 sleep time Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/28—Flow control; Congestion control in relation to timing considerations
- H04L47/283—Flow control; Congestion control in relation to timing considerations in response to processing delays, e.g. caused by jitter or round trip time [RTT]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/32—Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
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 relates to a network communication anomaly testing method and device. The method comprises the following steps: receiving a data packet from an application; performing proxy service on the data packet; and forwarding the data packet to other applications, wherein performing proxy services on the data packet further comprises: when the packet loss neglect time is exceeded, carrying out packet loss processing on the data packet according to a packet loss strategy; and/or when the delay neglect time is exceeded, executing delay processing on the data packet according to the delay time; and/or performing error packet processing on the data content of the data packet after the error packet neglecting time is exceeded.
Description
Technical Field
The invention relates to a network communication anomaly testing method and device.
Background
In internet applications, network communication is an essential link, typically occurring from system to system, from application to application, and from interface to interface. Whereas communication protocols are typically based on TCP and UDP, and are performed above the network transport layer. Although TCP is a reliable link, problems such as packet loss, packet content transmission errors, transmission timeouts between packets, etc. often occur in real networks. This may cause communication failure and program death, program crash, and data content errors in severe cases may cause economic loss. Although the developer may make an abnormal protection, it is difficult to know whether such protection is effective. Particularly in a distributed system, if a fault such as a transient break occurs in a certain fragment, a system fault processing flow and a backup function need to be started. The tester needs to construct a scene of network communication abnormality to perform the simulation test. Such a scenario is usually only a casual phenomenon and is difficult to reproduce. It is more difficult to implement automated anomaly testing.
Currently, such anomaly scenarios for test team construction are mainly performed by manually manufacturing anomalies and auxiliary tools. It is often difficult for a test team to construct an anomaly scenario. The abnormal test coverage is low. Common methods include: the method comprises the steps of pulling and inserting network wires to construct a network breaking scene, utilizing a packet sending tool to send a large amount of data to construct a network congestion scene, configuring a wrong ip address or port number to cause link failure and the like. However, the method can only simulate an approximate abnormal scene, cannot achieve packet loss, packet error and delay event occurrence, and has the defects of high accidental and high artificial interference factors.
With the development of test tools, network testing may also be performed using some tools. For example: the tcp data packet can be resent by tcpreplay, but test data service is required to be recorded in advance; the tcpwrite can realize the rewriting of the tcp packet protocol header part, but cannot rewrite the packet content; wireshark, tcpdump may intercept network data traffic for analysis of packet content, but cannot be modified; the iptables are a linux management firewall tool, and are widely applied to routing strategies and port forwarding; many agents can also realize network data forwarding, but construction operations of other abnormal scenes cannot be performed in the forwarding process. For a distributed system, there is a chaosmonkey tool that can randomly shut down certain services in the system to achieve instantaneous disconnection. However, in actual testing, it is not easy to integrate with other test flows, and is not advantageous for automatic execution.
In summary, the following disadvantages exist in the prior art:
for artificially constructed abnormal scenes
1. In the test process, the artificial interference factors are more, the problem is not easy to reappear, the operation is complex, and the time and the labor are wasted.
2. The strategies of packet loss, packet error and delay cannot be accurately constructed, and the time and the number cannot be accurately grasped.
3. Manual testing cannot be automated and cannot be quantitatively calculated.
Constructing an anomaly scene for utilizing a network tool
1. Each tool meets a part of test work, can not be called mutually, and is inconvenient for systematic integrated test. And cannot be automated.
2. The lack of a tool to construct test data does not allow simulation of a miscacket anomaly.
3. At present, each tool is mainly used for protocol analysis observation and business reproduction, and can not meet the requirements of scene construction with abnormal delay and flexible data exception.
4. The test process cannot be reserved, test data are difficult to store, multiplexing is not utilized, and an effective and solidified test scene cannot be formed.
Disclosure of Invention
In view of the above problems in the art, the present invention provides a method for testing network communication anomaly, which can solve the problem of the above-mentioned anomaly scene construction, namely, deliberately causing network communication data packet loss, data error and data packet delay phenomena by proxy mode, and thus achieving the purpose of network communication anomaly scene construction. The method mainly utilizes a proxy method to intercept and forward the data packet, and in the process, network abnormity phenomena of packet loss, packet error and large delay are realized through operations of not forwarding the data packet, modifying the content of the data packet and increasing the forwarding delay. And the functions of automatic control and multi-scene construction are realized by adding a command line and a multi-task mechanism on control and maintenance.
By utilizing the method, the hidden faults in the product can be found in time, and the damage to the product caused by the small-probability abnormal event is avoided. The tool device manufactured by the method can help testers construct rich test scenes, ensure test quality, improve the capability of resisting abnormal risks of products and finally bring benefits. Meanwhile, the method is also an automatic method, can be conveniently integrated in an automatic system, and improves efficiency for testers. The technical scheme of the invention has the beneficial effects of realizing the construction of network communication abnormal scenes, improving test coverage, guaranteeing product quality and preventing risks. And the abnormal test is automatically executed, so that the test efficiency is improved, the labor cost is saved, and the artificial risk is reduced. And the extensible and portable abnormal test scene is convenient to execute. Can be transplanted into any network communication anomaly test, and is beneficial to multiplexing to other test teams and product lines. The system can also be used for product admission testing, system testing of multi-scene construction and distributed system function testing.
According to one aspect of the invention, a network communication anomaly testing method is provided. The method comprises the following steps: receiving a data packet from an application; performing proxy service on the data packet; and forwarding the data packet to other applications, wherein performing proxy services on the data packet further comprises: when the packet loss neglect time is exceeded, carrying out packet loss processing on the data packet according to a packet loss strategy; and/or when the delay neglect time is exceeded, executing delay processing on the data packet according to the delay time; and/or performing error packet processing on the data content of the data packet after the error packet neglecting time is exceeded.
According to one embodiment of the present invention, the packet loss policy includes random packet loss and template packet loss, where the random packet loss refers to automatically determining whether to discard a certain data packet according to a random probability, and the template packet loss refers to determining a given n-bit binary string as a packet loss template, and determining whether to discard a certain data packet according to a state of each bit in the string.
According to one embodiment of the invention, wherein the delay time can be set by a user, wherein the details of the erroneous packet processing can be set by a user, and wherein the packet loss ignore time, the delay ignore time, and the erroneous packet ignore time are ignored numbers of packets and can be set by a user.
According to one embodiment of the present invention, it further includes automatically performing a combination of any one or more of the packet loss processing, the delay processing, and the packet misplacement processing in a proxy service.
According to one embodiment of the invention, it further comprises recording the test tasks and a series of exception control udp instructions as an exception test standard scenario.
According to another aspect of the present invention, there is provided a network communication anomaly testing device. The device comprises: receiving means for receiving a data packet from an application; proxy means for performing a proxy service on the data packet; and forwarding means for forwarding the data packet to other applications, wherein the proxy means comprises: the packet loss processing module is used for executing packet loss processing on the data packet according to a packet loss strategy after the packet loss neglect time is exceeded; and/or a delay processing module, which is used for executing delay processing on the data packet according to the delay time after exceeding the delay neglect time; and/or a packet error processing module, configured to execute packet error processing on the data content of the data packet after the packet error neglecting time is exceeded.
According to one embodiment of the present invention, the packet loss policy includes random packet loss and template packet loss, where the random packet loss refers to automatically determining whether to discard a certain data packet according to a random probability, and the template packet loss refers to determining a given n-bit binary string as a packet loss template, and determining whether to discard a certain data packet according to a state of each bit in the string.
According to one embodiment of the invention, wherein the delay time can be set by a user, wherein the details of the erroneous packet processing can be set by a user, and wherein the packet loss ignore time, the delay ignore time, and the erroneous packet ignore time are ignored numbers of packets and can be set by a user.
According to one embodiment of the present invention, the system further comprises a command line control interface for automatically performing any one or more of the packet loss processing, the delay processing, and the packet error processing in the proxy service.
According to one embodiment of the invention, the system further comprises a scenario generator for recording the test tasks and a series of exception control udp instructions as an exception test standard scenario.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow chart of a network communication anomaly testing method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a network communication abnormality testing apparatus 10 according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of a network communication anomaly testing scheme architecture in accordance with an embodiment of the present invention;
FIG. 4 is a schematic flow chart of a packet transmission anomaly construction process according to an embodiment of the present invention; and
FIG. 5 is a schematic flow chart of an automated test procedure according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic flow chart of a network communication anomaly testing method according to an embodiment of the present invention. As shown in fig. 1, the network communication anomaly test method includes: step S01, receiving a data packet from an application; step S02, executing proxy service to the data packet; and step S03, forwarding the data packet to other applications. Wherein the step S02 of performing proxy service on the data packet further comprises: when the packet loss neglect time is exceeded, carrying out packet loss processing on the data packet according to a packet loss strategy; and/or when the delay neglect time is exceeded, executing delay processing on the data packet according to the delay time; and/or performing error packet processing on the data content of the data packet after the error packet neglecting time is exceeded.
According to one embodiment of the invention, in the network communication anomaly testing method, the packet loss strategy comprises random packet loss and template packet loss, wherein the random packet loss refers to whether to discard a certain data packet or not according to random probability, the template packet loss refers to determining a given n-bit binary character string as a packet loss template, and whether to discard a certain data packet or not according to the state of each bit in the character string.
According to an embodiment of the present invention, in the network communication anomaly testing method, the delay time can be set by a user, wherein the specific content of the erroneous packet processing can be set by the user, and wherein the packet loss ignore time, the delay ignore time, and the erroneous packet ignore time are ignored packet numbers and can be set by the user.
According to one embodiment of the present invention, the network communication anomaly testing method further includes automatically performing a combination of any one or more of the packet loss processing, the delay processing, and the packet error processing in a proxy service.
According to one embodiment of the invention, the network communication anomaly testing method further comprises recording a testing task and a series of anomaly control udp instructions as an anomaly testing standard scene.
Fig. 2 is a schematic block diagram of a network communication anomaly testing device 10 according to an embodiment of the present invention. As shown in fig. 2, the network communication abnormality testing apparatus 10 includes: receiving means 110 for receiving a data packet from an application; proxy means 120 for performing proxy services on said data packets; and forwarding means 130 for forwarding the data packet to other applications, wherein the proxy means 120 comprises: the packet loss processing module is used for executing packet loss processing on the data packet according to a packet loss strategy after the packet loss neglect time is exceeded; and/or a delay processing module, which is used for executing delay processing on the data packet according to the delay time after exceeding the delay neglect time; and/or a packet error processing module, configured to execute packet error processing on the data content of the data packet after the packet error neglecting time is exceeded.
The apparatus 10 according to the embodiment of the present invention, wherein the packet loss policy includes random packet loss and template packet loss, wherein the random packet loss refers to automatically determining whether to discard a certain data packet according to a random probability, and the template packet loss refers to determining a given n-bit binary string as a packet loss template, and determining whether to discard a certain data packet according to a state of each bit in the string.
The apparatus 10 according to an embodiment of the present invention, wherein the delay time is settable by a user, wherein the details of the erroneous packet processing are settable by a user, and wherein the packet loss ignore time, the delay ignore time, and the erroneous packet ignore time are ignored numbers of packets and are settable by a user.
The core design of the invention is to construct an abnormal scene in a proxy service mode, and erect proxy service between application A and application B, so that the originally directly-reached data link can reach the opposite end through the proxy service. The proxy works by monitoring the data packet sent by the application A, analyzing and processing the data packet after receiving the data packet, and forwarding the data packet to the monitoring port of the application B. And data processing is performed in the forwarding stage so as to realize the effects of packet loss, packet error and time delay. The anomaly test scheme architecture is shown in FIG. 3.
In the proxy process, the data packet flows from the application A to the proxy service, and is forwarded to the application B after being processed. And respectively carrying out packet loss, packet error and time delay treatment when passing through proxy service. One process or a plurality of processes may be selectively performed according to a task scenario. As shown in fig. 4.
In order to ensure the normal establishment of the communication connection, selecting proper test points when processing the delay task, a plurality of data packets can be ignored first, and when reaching the upper limit of the number of the ignored packets, the delay processing is executed. In the processing thread, the time delay set time is directly waited, and the subsequent task is executed after the sleep time is reached. Thereby achieving the effect of delayed transmission of the data packet. The time delay time length and the neglected packet number can be set by a user.
When the packet loss task is processed, the same is done to judge whether the upper limit of neglect is reached, and then judge whether the data packet should be discarded. The packet loss strategy is divided into random packet loss and template packet loss. Random packet loss refers to: the user gives a random chance (e.g., numbers 0-100) and the generation of a random number automatically determines whether to discard the packet. The template packet loss refers to a character string formed by '1' and '0' given by a user, wherein each bit corresponds to a network data packet. From the beginning of the packet loss task, the string is traversed. Scanning the first digit, if it is "1", not discarding the packet, and if it is "0", executing packet discarding. The next packet scans for the second digit and so on … … rescan the first digit when all n digits are scanned. Wherein n is preferably, for example, 10. The strategy is a method for constructing important protection for the packet loss scene. The packet loss policy and the number of ignored packets can be set by the user.
When processing the wrong packet task, the method and the device judge whether the upper limit of neglect is reached or not in the same way, and modify the data packet after the upper limit of neglect is reached. Firstly, analyzing the protocol according to the protocol type to obtain key fields in the data packet, and modifying the data in the key fields. This approach requires a pre-knowledge of the packet format. The data packet modification content and the number of ignored packets can be set by the user.
The automation interface is required to be configurable in real time, so the invention designs the mode of the udp for command control. As shown in fig. 3, the command line control interface may be controlled by any udp communication interface. In an automatic system, the device can be controlled in real time by adding a udp communication module. The command analysis module is required to analyze the content of the command and execute corresponding service opening and closing operations. As shown in fig. 5.
The command line control interface design includes add, del, close three operations. The interface parameters include:
[-p][-d][--st][--dt][--sdrop][--ddrop][--change]
the p [ proxyIP: proxyPORT ] parameter represents the ip and port of proxy service listening
D [ dstIP: dstPORT ]: target ip and port forwarded by parameter proxy
-dt time-ignore-delay time and number of ignored packets for proxy forwarding to target data
-st time-ignore: -delay time of proxy return to sender data and number of ignored packets
Ddrop [ temp: ignore ]: proxy and target end link packet loss strategy and number of ignored packets before packet loss
-sdrop [ temp: ignore ]: proxy and sender link packet loss strategy and number of ignored packets before packet loss
Change key content, modified data key name and modified data
Examples: add-p 192.168.1.1:8080-d 192.168.171.198:5656- -st10:89
Returning: ok, err
During automated testing, after a test task is completed, the proxy service may be reset using the udp command line. For example, the original concrete proxy service content is deleted, and new proxy service content is added. Upon command setup, the proxy service takes effect immediately for the new instruction. Therefore, the real-time control effect can be realized, and the requirement of automatic test is met. Without manual interface operation, the udp command control can be sent by utilizing the script.
In the illustration of fig. 3, the automated test system includes a scenario generator module. The module can record test tasks and record a series of abnormal control udp instructions as an abnormal test standard scene. By the method, the method can be popularized to other test teams. The process of adding test scenarios is generally:
1. new scenes are created and named.
2. The test object is set, i.e. the proxy service is configured with the command line. Multiple strategies may be performed simultaneously, or a certain strategy may be performed.
3. Setting the execution time length of the strategy in a delay mode.
4. The existing policy is deleted and a new policy setting is made.
5. The process of 2-4 is repeated until the test task ends.
6. And storing all the steps as test scene files.
The invention recommends a default anomaly construction scenario as follows:
udp(add–p 192.168.1.1:8080–d 192.168.171.198:5656--dt 5:20–ddrop 0111111111:40)
the data delay from/A to B is 5s, starting after 20 packets, and the first is discarded every 10 packets, starting with the 40 th packet
sleep(100)
udp(del)
udp(add–p 192.168.1.1:8080–d 192.168.171.198:5656--st 5:20–sdrop 1111111110:40)
The data delay of the return data of the data// B to A is 5s, starting after 20 packets, and the last data packet of every 10 data packets is discarded, starting from the 40 th data packet.
sleep(100)
udp(del)
The above scenario is used for anomaly testing of network condition instability. Events that occur with a small probability are packet loss and delay. The delay time is long, and the time limit of waiting for overtime of network data communication is possibly reached.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (8)
1. A network communication anomaly test method comprises the following steps:
receiving a data packet from an application;
performing proxy service on the data packet; and is also provided with
The data packet is forwarded to other applications,
wherein performing proxy services on the data packet further comprises:
when the packet loss neglect time is exceeded, carrying out packet loss processing on the data packet according to a packet loss strategy; and/or
When the delay neglect time is exceeded, executing delay processing on the data packet according to the delay time; and/or
When the error packet neglecting time is exceeded, executing error packet processing on the data content of the data packet;
the method further comprises the steps of: before executing the step of executing the proxy service on the data packet, receiving a first command line control instruction, and configuring the proxy service according to the first command line control instruction; wherein the first command line control instruction includes at least one of: packet loss neglect time, packet loss strategy, delay neglect time and delay time;
the method further comprises the steps of: recording a test task and a series of first command line control instructions as an abnormal test standard scene;
performing packet staggering processing on the data content of the data packet includes: analyzing the protocol according to the protocol type, acquiring a key field in the data packet, and modifying the data in the key field according to the data packet modification content set by a user; the data packet modification content comprises: modifying the key names of the data and the modified data;
in an automated test procedure, after a test task is completed, the proxy service is reset using the udp command line.
2. The method of claim 1, wherein the packet loss policy includes random packet loss and template packet loss, wherein the random packet loss refers to automatically determining whether to discard a certain data packet according to a random probability, and the template packet loss refers to determining a given n-bit binary string as a packet loss template, and determining whether to discard a certain data packet according to a state of each bit in the string.
3. The method of claim 1, wherein the delay time is settable by a user, wherein the details of the erroneous packet processing are settable by a user, and wherein the packet loss ignore time, the delay ignore time, and the erroneous packet ignore time are ignored numbers of packets and are settable by a user.
4. A method according to any of claims 1-3, further comprising automatically performing a combination of any one or more of the packet loss processing, the delay processing, and the packet misplacement processing in a proxy service.
5. A network communication anomaly testing device, comprising:
receiving means for receiving a data packet from an application;
proxy means for performing a proxy service on the data packet; and
forwarding means for forwarding said data packet to other applications,
wherein the proxy device comprises:
the packet loss processing module is used for executing packet loss processing on the data packet according to a packet loss strategy after the packet loss neglect time is exceeded; and/or
The delay processing module is used for executing delay processing on the data packet according to the delay time after exceeding the delay neglecting time; and/or
The error packet processing module is used for executing error packet processing on the data content of the data packet after the error packet neglecting time is exceeded;
the proxy device is further configured to receive a first command line control instruction and configure the proxy service according to the first command line control instruction before executing the step of performing the proxy service on the data packet; wherein the first command line control instruction includes at least one of: packet loss neglect time, packet loss strategy, delay neglect time and delay time;
the network communication anomaly testing device further comprises: the scene generator is used for recording a test task and a series of first command line control instructions and is used as an abnormal test standard scene;
performing packet staggering processing on the data content of the data packet includes: analyzing the protocol according to the protocol type, acquiring a key field in the data packet, and modifying the data in the key field according to the data packet modification content set by a user; the data packet modification content comprises: modifying the key names of the data and the modified data;
in an automated test procedure, after a test task is completed, the proxy service is reset using the udp command line.
6. The apparatus of claim 5, wherein the packet loss policy includes random packet loss and template packet loss, wherein the random packet loss refers to automatically determining whether to discard a certain data packet according to a random probability, and the template packet loss refers to determining a given n-bit binary string as a packet loss template, and determining whether to discard a certain data packet according to a state of each bit in the string.
7. The apparatus of claim 5, wherein the delay time is configurable by a user, wherein details of the erroneous packet processing are configurable by a user, and wherein the packet loss ignore time, the delay ignore time, and the erroneous packet ignore time are ignored numbers of packets and are configurable by a user.
8. The apparatus of any of claims 5-7, further comprising a command line control interface to automatically perform a combination of any one or more of the packet loss processing, the delay processing, and the error packet processing in a proxy service.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510353460.7A CN106301994B (en) | 2015-06-24 | 2015-06-24 | Network communication abnormity testing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510353460.7A CN106301994B (en) | 2015-06-24 | 2015-06-24 | Network communication abnormity testing method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106301994A CN106301994A (en) | 2017-01-04 |
| CN106301994B true CN106301994B (en) | 2023-11-03 |
Family
ID=57650896
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510353460.7A Active CN106301994B (en) | 2015-06-24 | 2015-06-24 | Network communication abnormity testing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106301994B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109257224B (en) * | 2018-10-08 | 2021-02-09 | 武汉达梦数据库股份有限公司 | Database communication network test simulation method and device |
| CN110661683B (en) * | 2019-09-26 | 2021-07-16 | 苏州浪潮智能科技有限公司 | A method and device for file analysis UDP protocol based on pcap format |
| CN110825062B (en) * | 2019-11-29 | 2021-04-09 | 北京首钢冷轧薄板有限公司 | Emergency processing system and method for strip steel cleaning section signals |
| CN111541583B (en) * | 2020-04-20 | 2022-01-04 | 杭州迪普信息技术有限公司 | System, method and device for testing fragment message cache |
Citations (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5862362A (en) * | 1995-10-05 | 1999-01-19 | Microsoft Corporation | Network failure simulator |
| WO2001041366A2 (en) * | 1999-12-01 | 2001-06-07 | British Telecommunications Public Limited Company | Apparatus for assessing communication equipment |
| CN1725718A (en) * | 2005-04-04 | 2006-01-25 | 杭州华为三康技术有限公司 | Network service quality testing method and system |
| CN1777126A (en) * | 2005-12-12 | 2006-05-24 | 史文勇 | System and method for conducting comprehensive measurement and association analysis to time delay and drop |
| CN1964247A (en) * | 2006-12-04 | 2007-05-16 | 华为技术有限公司 | A method and device to simulate network damage |
| CN101141320A (en) * | 2007-08-07 | 2008-03-12 | 中兴通讯股份有限公司 | Method and device for generating network flux |
| CN101159682A (en) * | 2007-09-28 | 2008-04-09 | 中兴通讯股份有限公司 | Method and equipment of implementing stream conversion |
| CN101753315A (en) * | 2008-11-27 | 2010-06-23 | 百度在线网络技术(北京)有限公司 | Method, device and system for testing DDOS (distributed denial of service) attacks |
| CN101902367A (en) * | 2009-05-31 | 2010-12-01 | 西门子(中国)有限公司 | Method and device for producing test case |
| CN102055626A (en) * | 2010-12-31 | 2011-05-11 | 北京中创信测科技股份有限公司 | Internet protocol (IP) network quality detecting method and system |
| CN102111801A (en) * | 2010-12-23 | 2011-06-29 | 北京宜富泰网络测试实验室有限公司 | Method and system for testing network management interface of third generation mobile communication network |
| CN102209006A (en) * | 2011-03-04 | 2011-10-05 | 北京神州绿盟信息安全科技股份有限公司 | Rule test equipment and method |
| CN102420713A (en) * | 2010-09-28 | 2012-04-18 | 大唐移动通信设备有限公司 | Test data packet packaging method and equipment |
| CN102510346A (en) * | 2011-11-18 | 2012-06-20 | 百度在线网络技术(北京)有限公司 | Method, system and device for testing network equipment |
| CN102868577A (en) * | 2012-10-09 | 2013-01-09 | 盛科网络(苏州)有限公司 | Weighted random early detection (WRED) automated testing method and device |
| CN103001822A (en) * | 2012-08-29 | 2013-03-27 | 五八同城信息技术有限公司 | Network anomaly handling method and device |
| CN103618645A (en) * | 2013-11-28 | 2014-03-05 | 武汉虹旭信息技术有限责任公司 | Complex network environment test system and method with intelligent simulation function |
| EP2725494A1 (en) * | 2012-10-26 | 2014-04-30 | Samsung Electronics Co., Ltd | Automatic testing apparatus for embedded software, automatic testing method thereof and test scenario composing method |
| CN103812607A (en) * | 2013-12-04 | 2014-05-21 | 安徽虹庄微电子有限公司 | Method for simulating packet errors in transmission process of USB 3.0 |
| CN104702466A (en) * | 2015-02-12 | 2015-06-10 | 中国南方电网有限责任公司 | IEC62351 (International Electrotechnical Commission 62351)-based process layer safety test system and method |
-
2015
- 2015-06-24 CN CN201510353460.7A patent/CN106301994B/en active Active
Patent Citations (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5862362A (en) * | 1995-10-05 | 1999-01-19 | Microsoft Corporation | Network failure simulator |
| WO2001041366A2 (en) * | 1999-12-01 | 2001-06-07 | British Telecommunications Public Limited Company | Apparatus for assessing communication equipment |
| CN1725718A (en) * | 2005-04-04 | 2006-01-25 | 杭州华为三康技术有限公司 | Network service quality testing method and system |
| CN1777126A (en) * | 2005-12-12 | 2006-05-24 | 史文勇 | System and method for conducting comprehensive measurement and association analysis to time delay and drop |
| CN1964247A (en) * | 2006-12-04 | 2007-05-16 | 华为技术有限公司 | A method and device to simulate network damage |
| CN101141320A (en) * | 2007-08-07 | 2008-03-12 | 中兴通讯股份有限公司 | Method and device for generating network flux |
| CN101159682A (en) * | 2007-09-28 | 2008-04-09 | 中兴通讯股份有限公司 | Method and equipment of implementing stream conversion |
| CN101753315A (en) * | 2008-11-27 | 2010-06-23 | 百度在线网络技术(北京)有限公司 | Method, device and system for testing DDOS (distributed denial of service) attacks |
| CN101902367A (en) * | 2009-05-31 | 2010-12-01 | 西门子(中国)有限公司 | Method and device for producing test case |
| CN102420713A (en) * | 2010-09-28 | 2012-04-18 | 大唐移动通信设备有限公司 | Test data packet packaging method and equipment |
| CN102111801A (en) * | 2010-12-23 | 2011-06-29 | 北京宜富泰网络测试实验室有限公司 | Method and system for testing network management interface of third generation mobile communication network |
| CN102055626A (en) * | 2010-12-31 | 2011-05-11 | 北京中创信测科技股份有限公司 | Internet protocol (IP) network quality detecting method and system |
| CN102209006A (en) * | 2011-03-04 | 2011-10-05 | 北京神州绿盟信息安全科技股份有限公司 | Rule test equipment and method |
| CN102510346A (en) * | 2011-11-18 | 2012-06-20 | 百度在线网络技术(北京)有限公司 | Method, system and device for testing network equipment |
| CN103001822A (en) * | 2012-08-29 | 2013-03-27 | 五八同城信息技术有限公司 | Network anomaly handling method and device |
| CN102868577A (en) * | 2012-10-09 | 2013-01-09 | 盛科网络(苏州)有限公司 | Weighted random early detection (WRED) automated testing method and device |
| EP2725494A1 (en) * | 2012-10-26 | 2014-04-30 | Samsung Electronics Co., Ltd | Automatic testing apparatus for embedded software, automatic testing method thereof and test scenario composing method |
| CN103618645A (en) * | 2013-11-28 | 2014-03-05 | 武汉虹旭信息技术有限责任公司 | Complex network environment test system and method with intelligent simulation function |
| CN103812607A (en) * | 2013-12-04 | 2014-05-21 | 安徽虹庄微电子有限公司 | Method for simulating packet errors in transmission process of USB 3.0 |
| CN104702466A (en) * | 2015-02-12 | 2015-06-10 | 中国南方电网有限责任公司 | IEC62351 (International Electrotechnical Commission 62351)-based process layer safety test system and method |
Non-Patent Citations (3)
| Title |
|---|
| 分布式存储系统中并行下载相关技术研究;吴庆响;《中国优秀博硕士学位论文全文数据库(硕士)》;20110915;全文 * |
| 应用于流媒体传输研究的网络流量模拟器;赵勇等;《西安工业学院学报》;20041010;全文 * |
| 网络仿真模拟平台的可扩展性与真实性研究;杨艺;《中国优秀博硕士学位论文全文数据库(硕士)》;20130615;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106301994A (en) | 2017-01-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10686671B1 (en) | Methods, systems, and computer readable media for testing network elements of an in-band network telemetry capable network | |
| CN104980317B (en) | A kind of Auto-Test System and method of testing of dispatch data net equipment | |
| US11184267B2 (en) | Intelligent in-band telemetry auto-configuration for IP networks | |
| US9712431B2 (en) | Methods for managing transaction in software defined network | |
| CN104796298B (en) | A kind of method and device of SDN network accident analysis | |
| CN106301994B (en) | Network communication abnormity testing method and device | |
| US20080065760A1 (en) | Network Management System with Adaptive Sampled Proactive Diagnostic Capabilities | |
| EP3101841B1 (en) | Method, system and computer readable medium for network management automation | |
| EP3101842B1 (en) | Method, system and computer readable medium for network management automation | |
| WO2018001326A1 (en) | Method and device for acquiring fault information | |
| CN102546266B (en) | Method and platform for diagnosing network failures | |
| WO2018210213A1 (en) | Method and device for implementing ioam packaging and storage medium | |
| EP3791543B1 (en) | Packet programmable flow telemetry profiling and analytics | |
| US20160299958A1 (en) | Method and apparatus for visual logging in networking systems | |
| CN111698110B (en) | Network equipment performance analysis method, system, equipment and computer medium | |
| CN111294225A (en) | Automatic test system and method for exchange equipment in rail transit system | |
| CN107294856B (en) | Method, equipment and system for determining topology change | |
| JP2014236388A (en) | Packet transfer device, inspection control device, inspection method, inspection control method and program | |
| CN116264558A (en) | Cloud private line quality monitoring method, device, equipment and computer storage medium | |
| US11258702B2 (en) | Routing path analysis method and device | |
| US9118502B2 (en) | Auto VPN troubleshooting | |
| CN101431435B (en) | Connection-oriented service configuration and management method | |
| WO2017114128A1 (en) | Method and device for processing packets | |
| CN115484142B (en) | A network fault diagnosis method, device, medium and network equipment | |
| CN111162962A (en) | Method and system for detecting tunnel state of ring network channel type service |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | 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 |