CN104539470B - Test shunting device whether method, test client and the system of packet loss - Google Patents
Test shunting device whether method, test client and the system of packet loss Download PDFInfo
- Publication number
- CN104539470B CN104539470B CN201410715311.6A CN201410715311A CN104539470B CN 104539470 B CN104539470 B CN 104539470B CN 201410715311 A CN201410715311 A CN 201410715311A CN 104539470 B CN104539470 B CN 104539470B
- Authority
- CN
- China
- Prior art keywords
- test
- shunting device
- address
- stream
- shunting
- 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
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of test shunting device whether method, test client and the system of packet loss, wherein method includes:Test client receives at least one IP address that test server is sent, and the IP address is what the test server was obtained by shunting device;Test client sends the first test stream for each IP address, the first test stream includes predetermined number packet, so that the second test stream that the test server is sent according to each shunting device determine each shunting device whether packet loss, the data flow for the Portable device mark that the second test stream obtains for the described first test stream after shunting device is handled.
Description
Technical field
The present invention relates to data communications test technical field, more particularly to a kind of test shunting device whether the side of packet loss
Method, test client and system.
Background technology
With the continuous development of communication network, broadband network and value-added service are more next including applications such as VOIP, video, P2P
It is more extensive.Network application etc. that Virtual network operator etc. needs to control network traffics flow direction, user is concerned about to guarantee network security and
The normal even running of support business.Therefore the application of various shunting devices and give birth to, whether how to test the shunting device that uses online
Packet loss, the technical problem also paid special attention to as flow analysis.
Existing method of testing is by the connecting test instrument on shunting device, and one is sent to shunting device by tester
The test bag of fixed number amount, receive the packet that shunting device returns, by analyze the quantity of packet received whether with hair
The quantity for the test bag sent is consistent, come determine shunting device whether packet loss.
But the above method in test, it is necessary to individually tested every shunting device, in existing network largely
Shunting device, the above method can not meet to shunting device the needs of testing, and by using tester departing from original
The network state come, changes test environment, so that test result can not accurately react shunting device in original test environment
Under state.
The content of the invention
In view of this, it is an object of the invention to propose it is a kind of test shunting device whether packet loss method, test client
End and system, can fast and accurately test shunting device whether packet loss.
To use following technical scheme up to this purpose, the present invention:
The present invention provide it is a kind of test shunting device whether the method for packet loss, including:
Test client receives at least one IP address that test server is sent, and the IP address is the testing service
Device is obtained by shunting device;
Test client sends the first test stream for each IP address, and the first test stream includes predetermined number data
Bag so that the second each shunting device of test stream determination for being sent according to each shunting device of the test server whether packet loss, institute
State the data flow for the Portable device mark that the second test stream obtains for the described first test stream after shunting device is handled.
Further, before the test client sends the first test stream for each IP address, including:
Test client sends the 3rd test stream for each IP address, so that the test server is set according to each shunting
The 4th test stream that preparation is sent determines that all shunting devices have corresponding IP address, and by IP corresponding to each shunting device
Location is back to the test client, and the 4th test stream the 3rd test stream obtains after shunting device is handled
The data flow of Portable device mark;
It is described to send the first test stream for each IP address, including:
The first test stream is sent for IP address corresponding to each shunting device.
Further, the second test stream that the test server is sent according to each shunting device determines that each shunting device is
No packet loss, including:
The test server parses the second test stream that each shunting device is sent, and counts from IP corresponding to each shunting device
Under the sum of packet that includes in the test stream that receives;
If it is determined that the sum of the packet included in the second test stream that a shunting device is sent is less than the predetermined number,
Then determine the shunting device packet loss;
If it is determined that the sum of the packet included in the second test stream that a shunting device is sent is equal to the predetermined number,
Then determine that the shunting device is normal.
Further, the 4th test stream that the test server is sent according to each shunting device determines that all shuntings are set
There is corresponding IP address, including:
The test server parses the 4th test stream that each shunting device is sent, and obtains the equipment mark of each shunting device
Know;
Device identification with each shunting device prestored is matched one by one;
If the match is successful, it is determined that all shunting devices have corresponding IP address.
Further, the packet is ping packets.
The present invention also provides a kind of test client, including:
First receiving module, for receiving at least one IP address of test server transmission, the IP address is described
Test server is obtained by shunting device;
First sending module, flowed for sending the first test for each IP address, the first test stream is comprising default
Number packet, so that whether the second test stream that the test server is sent according to each shunting device determines each shunting device
Packet loss, the data for the Portable device mark that the second test stream obtains for the described first test stream after shunting device is handled
Stream.
Further, first sending module, it is additionally operable to before the first test stream is sent for each IP address, pin
The 3rd test stream is sent to each IP address, so that the 4th test stream that the test server is sent according to each shunting device is true
Fixed all shunting devices have corresponding IP address, and IP address corresponding to each shunting device is back into the test client
End, the data for the Portable device mark that the 4th test stream obtains for the described 3rd test stream after shunting device is handled
Stream;The first test stream is sent for IP address corresponding to each shunting device.
The present invention also provides a kind of test server, including:
Second sending module, for obtaining at least one IP address by shunting device, and IP address is sent to test
Client, so that the client sends the first test stream for each IP address, the first test stream includes predetermined number
Packet;
Second receiving module, the second test stream sent for receiving each shunting device, the second test stream is described
The data flow for the Portable device mark that first test stream obtains after shunting device is handled;
Judge packet loss module, for according to the described second test stream determine each shunting device whether packet loss.
Further, the judgement packet loss module, the second test sent specifically for parsing each shunting device are flowed, statistics
The sum of the packet included in the test stream received under IP corresponding to each shunting device;If it is determined that what a shunting device was sent
The sum of the packet included in second test stream is less than the predetermined number, it is determined that the shunting device packet loss;If it is determined that one
The sum of the packet included in the second test stream that shunting device is sent is equal to the predetermined number, it is determined that the shunting device
Normally.
The present invention also provide a kind of test shunting device whether the system of packet loss, including above-mentioned test client and above-mentioned
Test server.
The present invention receives at least one IP address of test server transmission by test client, and the IP address is institute
State what test server was obtained by shunting device, and the first test stream, the first test stream are sent for each IP address
Comprising predetermined number packet, so that the second test stream that the test server is sent according to each shunting device determines each shunting
Equipment whether packet loss, the second test stream is the described first Portable device mark for being obtained after shunting device is handled of test stream
The data flow of knowledge.The present invention can be tested multiple shunting devices simultaneously under the original network architecture, so as to quick accurate
True test shunting device whether packet loss.
Brief description of the drawings
Fig. 1 is test scene schematic diagram provided by the invention;
Fig. 2 be the specific embodiment of the invention 1 provide test shunting device whether the method flow schematic diagram of packet loss;
Fig. 3 be the specific embodiment of the invention 2 provide test shunting device whether the method flow schematic diagram of packet loss;
Fig. 4 be the specific embodiment of the invention 3 provide test shunting device whether the method flow schematic diagram of packet loss;
Fig. 5 is the test client structural representation that the specific embodiment of the invention 4 provides;
Fig. 6 is the test server structural representation that the specific embodiment of the invention 5 provides;
Fig. 7 be the specific embodiment of the invention 6 provide test shunting device whether the system structure diagram of packet loss.
Embodiment
Further illustrate technical scheme below in conjunction with the accompanying drawings and by embodiment.It is appreciated that
It is that specific embodiment described herein is used only for explaining the present invention, rather than limitation of the invention.Further need exist for illustrating
, for the ease of description, part related to the present invention rather than full content are illustrate only in accompanying drawing.
As shown in figure 1, Fig. 1 is test scene schematic diagram provided by the invention, increase on the basis of existing network framework
The test client and test server of the present invention.Wherein, test client and test server pass through network and shunting device
Connection.Method and step described in the embodiment of the present invention is performed under the scene shown in Fig. 1.
Fig. 2 be the specific embodiment of the invention 1 provide test shunting device whether the method flow schematic diagram of packet loss, such as
Shown in Fig. 2, comprise the following steps:
Step 101, test client receive at least one IP address that test server is sent, and the IP address is described
Test server is obtained by shunting device.
In the present embodiment, test client receives at least one IP address that test server is sent, the IP address
Obtained for the test server by shunting device.The test client is local computing, and the test server is
Home server.
Wherein, in order that test IP address can quickly cover the fibre circuit of all shunting devices, the IP address is
A large amount of nonlocal public network IPs that server obtains.Specifically, by controlling shunting device only to transmit upstream data, by parsing data
Target ip address i.e. DIP is extracted, nonlocal public network IP is obtained after the duplicate removal that sorts.
Step 102, test client send the first test stream for each IP address, and the first test stream is comprising default
Number packet, so that whether the second test stream that the test server is sent according to each shunting device determines each shunting device
Packet loss, the data for the Portable device mark that the second test stream obtains for the described first test stream after shunting device is handled
Stream.
In the present embodiment, test client sends the first test stream, the first test stream bag for each IP address
Packet containing predetermined number, so that the second test stream that the test server is sent according to each shunting device determines that each shunting is set
It is standby whether packet loss, the Portable device mark that the second test stream obtains for the described first test stream after shunting device is handled
Data flow.
Here, in order to distinguish the different test streams successively occurred in the present invention, the test stream first occurred is referred to as first
Test stream, the test stream subsequently occurred is referred to as to the second test stream, the 3rd test stream and the 4th test successively and flowed.The test stream
Test server is entered by the up incoming line of shunting device.
Wherein, the first test stream includes predetermined number packet, and the packet can be PING packets.Specifically
, test client sends the first test stream using BAT scripts for each IP address, and BAT scripts are then entered by being divided circuit
Enter shunting device, after the shunting device adds the MAC Address of oneself in each packet of the first test stream, form second
Test stream, and the second test stream is sent to test server.The second test that test server is sent according to each shunting device
Stream determine each shunting device whether packet loss.
The present invention receives at least one IP address of test server transmission by test client, and the IP address is institute
State what test server was obtained by shunting device, and the first test stream, the first test stream are sent for each IP address
Comprising predetermined number packet, so that the second test stream that the test server is sent according to each shunting device determines each shunting
Equipment whether packet loss, the second test stream is the described first Portable device mark for being obtained after shunting device is handled of test stream
The data flow of knowledge.The present invention can be tested multiple shunting devices simultaneously under the original network architecture, so as to quick accurate
True test shunting device whether packet loss.
Exemplary, on the basis of above-described embodiment, the test client sends first for each IP address and surveyed
Before examination stream, it can also include:
Test client sends the 3rd test stream for each IP address, so that the test server is set according to each shunting
The 4th test stream that preparation is sent determines that all shunting devices have corresponding IP address, and by IP corresponding to each shunting device
Location is back to the test client, and the 4th test stream the 3rd test stream obtains after shunting device is handled
The data flow of Portable device mark;
Accordingly, it is described to send the first test stream for each IP address, it can include:
The first test stream is sent for IP address corresponding to each shunting device.
It is exemplary, on the basis of above-described embodiment, the test server sent according to each shunting device second
Test stream determine each shunting device whether packet loss, can include:
The test server parses the second test stream that each shunting device is sent, and counts from IP corresponding to each shunting device
Under the sum of packet that includes in the test stream that receives;
If it is determined that the sum of the packet included in the second test stream that a shunting device is sent is less than the predetermined number,
Then determine the shunting device packet loss;
If it is determined that the sum of the packet included in the second test stream that a shunting device is sent is equal to the predetermined number,
Then determine that the shunting device is normal.
It is exemplary, on the basis of above-described embodiment, the test server sent according to each shunting device the 4th
Test stream determines that all shunting devices have corresponding IP address, can include:
The test server parses the 4th test stream that each shunting device is sent, and obtains the equipment mark of each shunting device
Know;
Device identification with each shunting device prestored is matched one by one;
If the match is successful, it is determined that all shunting devices have corresponding IP address.
Fig. 3 be the specific embodiment of the invention 2 provide test shunting device whether the method flow schematic diagram of packet loss, such as
Shown in Fig. 3, comprise the following steps:
Step 201, test client receive at least one IP address that test server is sent, and the IP address is described
Test server is obtained by shunting device.
In the present embodiment, by controlling the configuration decentralization upstream data on shunting device, other data is abandoned, are being tested
Being performed on server " tcpdump-i eth0 " obtain arresting the output upstream data information that shunting device obtains.Such as obtain as
Lower information:
tcpdump-i eth0,
20:41:48.783597 IP 113.105.191.178.3808>202110.100.36.ssh:.61912
(1360):60552 ack 1 win 7840
…
Above- mentioned information is saved as into file allpacket.txt, and by regular expression extract it is all '>DIP ', go
Except above character '>', file _ dip.txt is obtained, such as in the following way:
grep-oE'>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'allpacket.txt
>dip.txt
sed's/>//g'dip.txt>_dip.txt
Then duplicate removal is carried out to the IP in dip.txt using script, obtains including unduplicated multiple IP file uniq_
Ip.txt, such as in the following way:
cat_dip.txt|sort|uniq>uniq_ip.txt
In addition, in order that obtained IP can quickly cover the fibre circuit of all shunting devices, the IP closed on is set to try one's best
From different provinces and cities, be ranked up to obtain file _ uniq_ip.txt according to IP last byte, such IP regions from
Divergence is higher, such as in the following way:
sed's/\.//g'uniq_ip.txt>_uniq_ip.txt
sort-k 4-g_uniq_ip.txt>col4_uniq_ip.txt
cat col4_uniq_ip.txt
sed's//\./g'col4_uniq_ip.txt>_col4_uniq_ip.txt
cat_col4_uniq_ip.txt
Step 202, test client send the 3rd test stream for each IP address.
The 4th test stream that step 203, the test server are sent according to each shunting device determines that all shuntings are set
There is corresponding IP address, and IP address corresponding to each shunting device is back to the test client, the described 4th surveys
The data flow for the Portable device mark that examination stream obtains for the described 3rd test stream after shunting device is handled.
In the present embodiment, test client sends the 3rd test stream, the test server root for each IP address
The 4th test stream sent according to each shunting device determines that all shunting devices have corresponding IP address, the 4th test stream
The data flow of the Portable device mark obtained for the described 3rd test stream after shunting device is handled, to ensure that test stream passes through
All shunting devices.Specifically, the test server parses the 4th test stream that each shunting device is sent, each shunting is obtained
The device identification of equipment, the device identification with each shunting device prestored are matched one by one, i.e., test server is advance
The device identification of all shunting devices is stored, if the device identification for obtaining each shunting device is present in the number of test server
According in storehouse, it is determined that all shunting devices have corresponding IP address.
So that test client sends PING packets as an example, one the 3rd test stream includes 4 PING packets, test visitor
Family end continuously transmits 4 PING packets by BAT scripts for each IP address, and test server parses each shunting device hair
The test stream sent, the corresponding relation between the device identification of each shunting device, IP address is obtained, as shown in following table one:
Table one
Shunting device sequence number | Fibre circuit | Test stream (sip, dip, smac, dmac, n) |
Shunting device 1 | Uplink 1 | X.65.223.250,X.73.79.102,0x0001,0x0002,4 |
Shunting device 2 | Uplink 2 | X.65.223.250,X.101.5.131,0x0101,0x0002,4 |
Shunting device 3 | Uplink 3 | X.65.223.250,X.149.36.171,0x0201,0x0002,4 |
Shunting device 4 | Uplink 4 | X.65.223.250,X.182.71.231,0x0301,0x0002,4 |
Wherein, sip is test client IP address, and dip is that the IP address of the target terminal obtained is to be tested in the present invention
The IP address that server obtains, smac is shunting device address, and dmac is test server address, and n is packet number.Pass through
Shunting device address in above table then may determine whether that all shunting devices have corresponding IP address.
Step 204, test client are directed to IP address corresponding to each shunting device and send the first test stream, and described first surveys
Examination stream includes predetermined number packet.
In the present embodiment, test client is directed to IP address corresponding to each shunting device and sends the first test stream, described
First test stream includes predetermined number packet.Such as the packet can be PING bags, test client is directed to each shunting
IP address corresponding to equipment continuously transmits predetermined number PING bags, forms the first test stream.
Step 205, the test server receive the second test stream that each shunting device is sent, and the second test stream is
The data flow for the Portable device mark that the first test stream obtains after shunting device is handled.
Step 206, the test server parse the second test stream that each shunting device is sent, and count from each shunting device
The sum of the packet included in the test stream received under corresponding IP.
In the present embodiment, test server parses the second test stream that each shunting device is sent, and counts and is set from each shunting
The sum of the packet included in the test stream received under standby corresponding IP, however, it is determined that the second test that some shunting device is sent
The sum of the packet included in stream is less than the predetermined number, it is determined that the shunting device packet loss, performs step 207;If really
The sum of the packet included in the second test stream that a fixed shunting device is sent is equal to the predetermined number, it is determined that the shunting
Equipment is normal, performs step 208.
Step 207, test server determine the shunting device of packet loss, and to client feedback.
Step 208, test server determine that shunting device is normal, and to client feedback.
The present invention receives at least one IP address of test server transmission by test client, and the IP address is institute
State what test server was obtained by shunting device, and the first test stream, the first test stream are sent for each IP address
Comprising predetermined number packet, so that the second test stream that the test server is sent according to each shunting device determines each shunting
Equipment whether packet loss, the second test stream is the described first Portable device mark for being obtained after shunting device is handled of test stream
The data flow of knowledge.The present invention can be tested multiple shunting devices simultaneously under the original network architecture, so as to quick accurate
True test shunting device whether packet loss.
Fig. 4 be the specific embodiment of the invention 3 provide test shunting device whether the method flow schematic diagram of packet loss, such as
Shown in Fig. 4, comprise the following steps:
Step 301, test client receive at least one IP address that test server is sent, and the IP address is described
Test server is obtained by shunting device.
Step 302, test client send the 3rd test stream for each IP address.
The 4th test that step 303, the test server are sent according to each shunting device determines for each shunting device
Predetermined number IP address, and predetermined number IP address corresponding to each shunting device is back to the test client, described
The data flow for the Portable device mark that four test streams obtain for the described 3rd test stream after shunting device is handled.
In the present embodiment, test client sends the 3rd test stream, the test server root for each IP address
The 4th test stream sent according to each shunting device determines IP address corresponding to all shunting devices, and is selected for each shunting device
Determine predetermined number IP address.
So that test client sends PING packets as an example, one the 3rd test stream includes 4 PING packets, test visitor
Family end continuously transmits 4 PING packets by BAT scripts for each IP address, and test server parses each shunting device hair
The test stream sent, the corresponding relation between the device identification of each shunting device, IP address is obtained, be respectively each shunting here
5 IP address of selection of equipment, as shown in following table two:
Table two
Step 304, test client are directed to IP address corresponding to each shunting device and send the first test stream, and described first surveys
Examination stream includes predetermined number packet.
So that test client sends PING packets as an example, one first test stream includes 1000 PING packets, surveys
Examination client continuously transmits 1000 PING packets by BAT scripts for each IP address.
Step 305, the test server receive the second test stream that each shunting device is sent, and the second test stream is
The data flow for the Portable device mark that the first test stream obtains after shunting device is handled.
Step 306, the test server parse the second test stream that each shunting device is sent, and count from each shunting device
The sum of the packet included in the test stream received under corresponding IP.
In the present embodiment, test server parses the second test stream that each shunting device is sent, and counts from each shunting
The sum of the packet included in the test stream received under predetermined number IP corresponding to equipment, however, it is determined that some shunting device is sent
Predetermined number IP under corresponding to the number of packet that includes in the second test stream be respectively less than the default bag number, or,
Have what is included in the second test stream corresponding to 50% (being free of 50%) above IP under the predetermined number IP that some shunting device is sent
The number of packet is respectively less than the default bag number, it is determined that the shunting device packet loss, performs step 307;If it is determined that some
The number of the packet included in second test stream corresponding under the predetermined number IP that shunting device is sent is equal to described default
Bag number, or, there is the second survey corresponding to 50% (being free of 50%) above IP under the predetermined number IP that some shunting device is sent
The number of the packet included in examination stream is equal to the default bag number, it is determined that the shunting device is normal, performs step
308。
Specifically, test server extracts the second test corresponding to all shunting device input optical fibres by shell scripts
The DIP of stream, send to test client, the client sends 1000 PING packets, test server for each DIP
According to the test stream of reception, whether the input and output bag number that each test stream is calculated by program is equal.If some shunting is set
The output bag number of standby corresponding 5 tests stream is all fewer than input number, it is determined that the shunting device packet loss.Such as by as follows
Mode is realized:The information of each test stream is saved in document ip.txt by test server, and all points are extracted by shell scripts
DIP addresses corresponding to flow device, realized using following regular expression:
grep-oE'X\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'flow.txt|sort|uniq>
pure_ip.txt
cat pure_ip.txt
sed'/X.65.223.250/d'pure_ip.txt>_pure_ip.txt
wc-_pure_ip.txt
wc-l_pure_ip.txt
cat_pure_ip.txt
Obtain following 20 DIP addresses:
X.101.5.131, X.108.216.251, X.115.12.22, X.121.15.23, X.125.31.102,
X.125.96.148, X.145.131.42, X.147.196.149, X.14.89.252, X.149.134.132,
X.149.36.171, X.151.124.102, X.153.211.210, X.153.31.23, X.160.234.231,
X.161.55.206, X.167.223.11, X.172.167.171, X.182.71.231, X.192.219.131.
Test client is then forwarded to, test client respectively sends 1000 PING using BAT scripts for each IP
Packet.
BAT content for script
@echo off
ping X.101.5.131-n 1000-w 10>>ping2.txt
ping X.108.216.251-n 1000-w 10>>ping2.txt
……
Finally, test server calculates the bag number of test stream by program, compares the data in the test stream with input
Whether bag number is equal.If the output bag number of 5 test stream corresponding to some shunting device is all fewer than input number, say
Shunting device packet loss corresponding to this bright root input optical fibre.
Step 307, test server determine the shunting device of packet loss, and to client feedback.
Step 308, test server determine that shunting device is normal, and to client feedback.
Fig. 5 is the test client structural representation that the specific embodiment of the invention 4 provides, as shown in figure 5, specific bag
Include:
First receiving module 11, for receiving at least one IP address of test server transmission, the IP address is institute
State what test server was obtained by shunting device;
First sending module 12, flowed for sending the first test for each IP address, the first test stream is comprising pre-
If number packet, so that the second test stream that the test server is sent according to each shunting device determines that each shunting device is
No packet loss, the number for the Portable device mark that the second test stream obtains for the described first test stream after shunting device is handled
According to stream.
Further, first sending module 11, it is additionally operable to before the first test stream is sent for each IP address,
The 3rd test stream is sent for each IP address, so that the 4th test that the test server is sent according to each shunting device is flowed
Determine that all shunting devices have corresponding IP address, and IP address corresponding to each shunting device is back to the test visitor
Family end, the data for the Portable device mark that the 4th test stream obtains for the described 3rd test stream after shunting device is handled
Stream;The first test stream is sent for IP address corresponding to each shunting device.
Test client described in the present embodiment is used to perform the method and step shown in Fig. 2, Fig. 3 and Fig. 4, its technical principle
It is similar with caused technique effect, it is described again here.
Fig. 6 is the test server structural representation that the specific embodiment of the invention 5 provides, as shown in fig. 6, specific bag
Include:
Second sending module 21 is used to obtain at least one IP address by shunting device, and IP address is sent to test
Client, so that the client sends the first test stream for each IP address, the first test stream includes predetermined number
Packet;
Second receiving module 22 is used to receive the second test stream that each shunting device is sent, and the second test stream is described
The data flow for the Portable device mark that first test stream obtains after shunting device is handled;
Judge packet loss module 23 be used for according to the described second test stream determine each shunting device whether packet loss.
Further, it is described to judge that packet loss module 23 is specifically used for parsing the second test stream that each shunting device is sent, system
Count the sum of the packet included in the test stream received under IP corresponding to each shunting device;If it is determined that a shunting device is sent
The second test stream in the sum of packet that includes be less than the predetermined number, it is determined that the shunting device packet loss;If it is determined that
The sum of the packet included in the second test stream that one shunting device is sent is equal to the predetermined number, it is determined that the shunting is set
It is standby normal.
Test server described in the present embodiment is used to perform the method and step shown in Fig. 2, Fig. 3 and Fig. 4, its technical principle
It is similar with caused technique effect, it is described again here.
Fig. 7 be the specific embodiment of the invention 6 provide test shunting device whether the system structure diagram of packet loss, such as
Shown in Fig. 7, specifically include:
Test client 31 is used at least one IP address for receiving the transmission of test server 32, and the IP address is described
Test server 32 is obtained by shunting device;The first test stream, the first test stream bag are sent for each IP address
Packet containing predetermined number, so that the second test stream that the test server 32 is sent according to each shunting device determines each shunting
Equipment whether packet loss, the second test stream is the described first Portable device mark for being obtained after shunting device is handled of test stream
The data flow of knowledge.
Further, test client 31 is additionally operable to before the first test stream is sent for each IP address, for every
Individual IP address sends the 3rd test stream, so that the 4th test stream that the test server 32 is sent according to each shunting device determines
All shunting devices have corresponding IP address, and IP address corresponding to each shunting device is back into the test client
31, the data for the Portable device mark that the 4th test stream obtains for the described 3rd test stream after shunting device is handled
Stream;The first test stream is sent for IP address corresponding to each shunting device.
Test server 32 is used to obtain at least one IP address by shunting device, and IP address is sent to test visitor
Family end, so that the client 31 sends the first test stream for each IP address, the first test stream includes predetermined number
Packet;The second test stream that each shunting device is sent is received, the second test stream is the described first test stream by shunting
The data flow of the Portable device mark obtained after equipment processing;Determine whether each shunting device is lost according to the described second test stream
Bag.
Further, test server is specifically used for parsing the second test stream that each shunting device is sent, and counts from each point
The sum of the packet included in the test stream received under IP corresponding to flow device;If it is determined that the second survey that a shunting device is sent
The sum of the packet included in examination stream is less than the predetermined number, it is determined that the shunting device packet loss;If it is determined that a shunting is set
The sum of the packet included in the second test stream that preparation is sent is equal to the predetermined number, it is determined that the shunting device is normal.
Test system described in the present embodiment is used to performing the method and step shown in Fig. 2, Fig. 3 and Fig. 4, its technical principle and
Caused technique effect is similar, is described again here.
Presently preferred embodiments of the present invention is these are only, is not intended to limit the invention, it is all in the spirit and principles in the present invention
Within, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.
Claims (8)
1. it is a kind of test shunting device whether the method for packet loss, it is characterised in that including:
Test client receives at least one IP address that test server is sent, and the IP address is that the test server is led to
Cross control shunting device and only transmit upstream data, target ip address is extracted by parsing data, obtained after the duplicate removal that sorts
Nonlocal public network IP;
Test client sends the first test stream for each IP address, and the first test stream includes predetermined number packet,
So that the test server parses the second test stream that each shunting device is sent, count and received under IP corresponding to each shunting device
To test stream in the sum of packet that includes;If it is determined that the packet included in the second test stream that a shunting device is sent
Sum be less than the predetermined number, it is determined that the shunting device packet loss;If it is determined that the second test stream that a shunting device is sent
In the sum of packet that includes be equal to the predetermined number, it is determined that the shunting device is normal;
Wherein, the Portable device mark that the second test stream obtains for the described first test stream after shunting device is handled
Data flow.
2. according to the method for claim 1, it is characterised in that the test client sends first for each IP address
Before test stream, including:
Test client sends the 3rd test stream for each IP address, so that the test server is sent out according to each shunting device
The 4th test stream sent determines that all shunting devices have corresponding IP address, and IP address corresponding to each shunting device is returned
It is back to the test client, the carrying that the 4th test stream obtains for the described 3rd test stream after shunting device is handled
The data flow of device identification;
It is described to send the first test stream for each IP address, including:
The first test stream is sent for IP address corresponding to each shunting device.
3. according to the method for claim 1, it is characterised in that the test server sent according to each shunting device the
Four test streams determine that all shunting devices have corresponding IP address, including:
The test server parses the 4th test stream that each shunting device is sent, and obtains the device identification of each shunting device;
Device identification with each shunting device prestored is matched one by one;
If the match is successful, it is determined that all shunting devices have corresponding IP address.
4. according to the method described in any one of claims 1 to 3, it is characterised in that the packet is ping packets.
A kind of 5. test client, it is characterised in that including:
First receiving module, for receiving at least one IP address of test server transmission, the IP address is the test
Server extracts target ip address by controlling shunting device only to transmit upstream data, by parsing data, is gone by sequence
The nonlocal public network IP obtained after weight;
First sending module, flowed for sending the first test for each IP address, the first test stream includes predetermined number
Packet, so that the test server parses the second test stream that each shunting device is sent, count corresponding from each shunting device
IP under the sum of packet that includes in the test stream that receives;If it is determined that included in the second test stream that a shunting device is sent
The sum of packet be less than the predetermined number, it is determined that the shunting device packet loss;If it is determined that a shunting device send the
The sum of the packet included in two test streams is equal to the predetermined number, it is determined that the shunting device is normal;Wherein, described
The data flow for the Portable device mark that two test streams obtain for the described first test stream after shunting device is handled.
6. test client according to claim 5, it is characterised in that first sending module, be additionally operable to for
Before each IP address sends the first test stream, send the 3rd test for each IP address and flow, so that the test server
The 4th test stream sent according to each shunting device determines that all shunting devices have corresponding IP address, and each shunting is set
Standby corresponding IP address is back to the test client, and the 4th test stream passes through shunting device for the described 3rd test stream
The data flow of the Portable device mark obtained after processing;The first test stream is sent for IP address corresponding to each shunting device.
A kind of 7. test server, it is characterised in that including:
Second sending module, for obtaining at least one IP address by shunting device, and IP address is sent to test client
End, so that the client sends the first test stream for each IP address, the first test stream includes predetermined number data
Bag;The IP address be the test server by controlling shunting device only to transmit upstream data, by parse data extract
Go out target ip address, the nonlocal public network IP obtained after the duplicate removal that sorts;
Second receiving module, the second test stream sent for receiving each shunting device, the second test stream is described first
The data flow for the Portable device mark that test stream obtains after shunting device is handled;
Judge packet loss module, the second test stream sent for parsing each shunting device, count from IP corresponding to each shunting device
Under the sum of packet that includes in the test stream that receives;If it is determined that the number included in the second test stream that a shunting device is sent
It is less than the predetermined number according to the sum of bag, it is determined that the shunting device packet loss;If it is determined that the second survey that a shunting device is sent
The sum of the packet included in examination stream is equal to the predetermined number, it is determined that the shunting device is normal.
8. it is a kind of test shunting device whether the system of packet loss, it is characterised in that including described in claim 5 or 6 test visitor
Family end, and the test server described in claim 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410715311.6A CN104539470B (en) | 2014-11-28 | 2014-11-28 | Test shunting device whether method, test client and the system of packet loss |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410715311.6A CN104539470B (en) | 2014-11-28 | 2014-11-28 | Test shunting device whether method, test client and the system of packet loss |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104539470A CN104539470A (en) | 2015-04-22 |
CN104539470B true CN104539470B (en) | 2017-11-21 |
Family
ID=52854939
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410715311.6A Active CN104539470B (en) | 2014-11-28 | 2014-11-28 | Test shunting device whether method, test client and the system of packet loss |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104539470B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10841670B2 (en) | 2018-02-13 | 2020-11-17 | Juniper Networks, Inc. | Methods and apparatus for consistency check in disaggregated dense wavelength-division multiplexing (DWDM) systems |
CN112333044B (en) * | 2020-10-29 | 2022-07-15 | 北京锐安科技有限公司 | Shunting equipment performance test method, device and system, electronic equipment and medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7007209B2 (en) * | 2002-02-25 | 2006-02-28 | Richard Charles Jaworski | System of testing the upstream cable modem channel |
CN101252483A (en) * | 2008-04-10 | 2008-08-27 | 北京星网锐捷网络技术有限公司 | System and method for testing switch |
CN101360015B (en) * | 2008-09-02 | 2010-09-29 | 北京星网锐捷网络技术有限公司 | Method, system and apparatus for test network appliance |
CN102045222B (en) * | 2011-01-30 | 2013-03-20 | 重庆思建科技有限公司 | Real-time overall test method of network system |
CN103209103B (en) * | 2013-03-25 | 2015-12-23 | 华为技术有限公司 | The method of testing of the network equipment and device |
CN103475542A (en) * | 2013-09-04 | 2013-12-25 | 上海斐讯数据通信技术有限公司 | Network equipment handling capacity performance testing system and method |
CN103532779B (en) * | 2013-10-10 | 2017-07-18 | 北京锐安科技有限公司 | A kind of method and system of quick positioning shunting device packet loss |
CN103997433B (en) * | 2014-05-16 | 2017-10-31 | 瑞斯康达科技发展股份有限公司 | A kind of packet loss rate measurement method, measuring apparatus and measuring system |
-
2014
- 2014-11-28 CN CN201410715311.6A patent/CN104539470B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104539470A (en) | 2015-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN201226523Y (en) | System for testing switch stability | |
CN105323121B (en) | A kind of Network status detection method and device | |
CN105227406A (en) | A kind of method of testing of router combination property | |
CN107094104B (en) | A kind of test method and system of WIFI router load-carrying properties | |
CN108092854A (en) | The test method and device of train grade ethernet device based on IEC61375 agreements | |
CN106302017A (en) | High concurrent low discharge network velocity-measuring system and method | |
CN107547290A (en) | Flow rate testing methods and device | |
US20120158830A1 (en) | Apparatus and method for generating virtual game clients | |
CN104539483A (en) | Network testing system | |
CN108737221A (en) | Method for detecting packet loss and communication link system | |
CN104052679B (en) | The load-balancing method of network traffics and device | |
CN104793612A (en) | Unmanned aerial vehicle ground control station testing and data acquiring method and system thereof | |
CN110022259A (en) | Message arrival rate determines method, apparatus, data statistics server and storage medium | |
CN108111367A (en) | Performance test methods and device | |
CN104539470B (en) | Test shunting device whether method, test client and the system of packet loss | |
CN103139014A (en) | Method and device for network quality evaluating based on by-pass | |
CN104601400B (en) | Shunting device performance test methods, test client and test server | |
CN103532931B (en) | Method and system for testing transmission performance of data stream, and server | |
TW202147810A (en) | Virtual service network quality measurement system and method thereof | |
CN104125605B (en) | A kind of implementation method and device for asking to set up WIFI connections | |
CN104065630A (en) | IPv6 network-orientated detection method for counterfeit source address messages | |
US9992073B2 (en) | Network status measuring system and a method for measuring status of a network | |
CN105376099B (en) | Acquire the method and system of virtual network flow in data switching exchane | |
Ciesla et al. | URL extraction on the NetFPGA reference router | |
CN104935520B (en) | A kind of network traffics generation method based on data packet feature |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |