CN103595594B - Flow detection method and electronic equipment - Google Patents
Flow detection method and electronic equipment Download PDFInfo
- Publication number
- CN103595594B CN103595594B CN201310637335.XA CN201310637335A CN103595594B CN 103595594 B CN103595594 B CN 103595594B CN 201310637335 A CN201310637335 A CN 201310637335A CN 103595594 B CN103595594 B CN 103595594B
- Authority
- CN
- China
- Prior art keywords
- test port
- port
- packet
- characteristic parameter
- test
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 83
- 238000012360 testing method Methods 0.000 claims abstract description 276
- 230000005540 biological transmission Effects 0.000 claims description 17
- 238000000034 method Methods 0.000 claims description 17
- 230000007423 decrease Effects 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 8
- 230000003247 decreasing effect Effects 0.000 claims 1
- 238000007689 inspection Methods 0.000 claims 1
- 230000007246 mechanism Effects 0.000 abstract description 6
- 238000012546 transfer Methods 0.000 description 12
- 101150077194 CAP1 gene Proteins 0.000 description 6
- 101100438378 Neurospora crassa (strain ATCC 24698 / 74-OR23-1A / CBS 708.71 / DSM 1257 / FGSC 987) fac-1 gene Proteins 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 101100273112 Pseudomonas aeruginosa cap8 gene Proteins 0.000 description 3
- 101150071218 cap3 gene Proteins 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 101150014715 CAP2 gene Proteins 0.000 description 2
- 101100326803 Neurospora crassa (strain ATCC 24698 / 74-OR23-1A / CBS 708.71 / DSM 1257 / FGSC 987) fac-2 gene Proteins 0.000 description 2
- 230000000052 comparative effect Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 101150009194 cap4 gene Proteins 0.000 description 1
- 101150003037 cap6 gene Proteins 0.000 description 1
- 101150059976 cap7 gene Proteins 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
- 230000005945 translocation Effects 0.000 description 1
Abstract
The embodiment of the invention provides a flow detection method and electronic equipment. A flow detection mechanism is provided, and correctness of a snake-shaped flow test result is guaranteed. The flow detection method includes the steps that after characteristic parameters of data packages passing a link to the detected are acquired on a test port, the characteristic parameters acquired on the test port are compared with characteristic parameter theoretical values of the test port, if the errors between the characteristic parameters and the characteristic parameter theoretical values are within a preset range, it is determined that flow detection of the test port succeeds, and if the errors between the characteristic parameters in package capture files and the characteristic parameter theoretical values are larger than the preset range, it is determined that flow detection of the test port fails. The flow detection method is used for detecting snake-shaped flow in a router.
Description
Technical field
The present invention relates to the communications field, more particularly to a kind of flow rate testing methods and electronic equipment.
Background technology
With IP(Internet Protocol, Internet protocol)The application of technology, mobile operator is generally using route
Device is building communication network, and during network is built, the whole machine of the packet transfer capability of router, i.e. router is gulped down
The amount of telling is the important indicator of equipment performance.Now, the test of the whole machine handling capacity of router is particularly important.
Conventionally, as the restriction of the huge and testing level of router port quantity, it is impossible to take full interconnection
Connected mode is tested, and is typically only capable to take the method for snakelike flow rate test to test the whole machine handling capacity of router.
Snakelike flow rate test only achieves that the flow rate test of whole router by 2 test instrumentation ports, can test out route
The whole machine handling capacity of device.
In yet with prior art, the test flow in snakelike flow rate test may be forwarded so that test result without
The whole machine handling capacity of method correct response router, then, generally guarantees that serpentine flow measures test result using wire break detection method
Correctness.
Wire break detection method passes through randomly to disconnect some interfaces in snakelike flow rate test, to disconnect some sections of corresponding surveys
Whether examination flow, have test flow in a certain section after then detection disconnects, and in theory the section should not test flow, in
Can be by testing result to detect that serpentine flow measures test result.
But conventionally, as router understands interrupt test flow on one's own initiative after detecting interface and disconnecting
Forwarding, the correct illusion of forward-path can be caused, it is impossible to ensure that serpentine flow measures the correctness of test result, so as to cause cannot
The whole machine handling capacity of correct test router, causes the inconvenience of the loss and user of network packet in equipment choice.
The content of the invention
Embodiments of the invention provide a kind of flow rate testing methods and electronic equipment, there is provided a kind of mechanism of flow detection,
Ensure that serpentine flow measures the correctness of test result.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
First aspect, there is provided a kind of flow rate testing methods, the method includes:
Obtain the characteristic parameter of the packet passed through on link to be detected in test port, the link to be detected include to
Few two test ports;Wherein, the every feature behind a pair of in the link to be detected forwarding ports of the packet
Parameter decreases or increases a unit value, and the pair of forwarding port includes inbound port and exit port;
It is right that the characteristic parameter that the test port is obtained is carried out with the characteristic parameter theoretical value of the test port
Than if the error of the characteristic parameter and the characteristic parameter theoretical value is in preset range, it is determined that the test port
Flow detection success, if the characteristic parameter is more than the preset range with the error of the characteristic parameter theoretical value, it is determined that
The flow detection failure of the test port.
With reference in a first aspect, in the first possible implementation, obtaining in test port and being passed through on link to be detected
Packet characteristic parameter before, methods described also includes:
M bar lines in the link to be detected are set to into open circuit, the M bars line is previously selected router
Line between port, so that the link to be detected is divided into into M+1 cross-talk links, wherein, the two ends per sub-links connect
It is connected to test port.
With reference to the first possible implementation of first aspect or first aspect, in second possible implementation
In, the characteristic parameter includes life span or propagation delay time;The packet often in the link to be detected a pair
The characteristic parameter decreases or increases a unit value behind forwarding port includes:
If the characteristic parameter is the life span, the packet often in the link to be detected a pair
The life span reduces by a unit value behind forwarding port;Or
If the characteristic parameter is the propagation delay time, the packet often in the link to be detected a pair
The propagation delay time increases a unit time delay behind forwarding port, and the unit time delay is packet from the pair of forwarding port
Inbound port to exit port time delay.
It is described to survey in the third possible implementation with reference to second possible implementation of first aspect
Examination port obtains the characteristic parameter of the packet passed through on link to be detected to be included:
Packet capturing is carried out to the packet passed through on the link to be detected in the test port, the test port is generated
Corresponding packet capturing file, the packet capturing file includes the life span of the packet;Or
The packet passed through on the link to be detected is detected in the test port, obtains the packet
Propagation delay time.
With reference to the third possible implementation of first aspect, in the 4th kind of possible implementation, by the survey
The characteristic parameter that examination port obtains is contrasted with the characteristic parameter theoretical value of the test port, if the characteristic parameter
With the error of the characteristic parameter theoretical value in preset range, it is determined that the flow detection success of the test port, if institute
State characteristic parameter and be more than the preset range with the error of the characteristic parameter theoretical value, it is determined that the flow of the test port
Detection unsuccessfully includes:
Life span in the corresponding packet capturing file of the test port is theoretical with the life span of the test port
Value is contrasted;
If the life span in the packet capturing file is equal with the life span theoretical value of the test port, it is determined that institute
State each port that packet have passed through in test port institute's surveyor's chain road, represent the flow detection of the test port into
Work(;
If the life span in the packet capturing file is unequal with the life span theoretical value of the test port, it is determined that
The packet has skipped the section ports in test port institute's surveyor's chain road, and the flow detection for representing the test port is lost
Lose.
With reference to the third possible implementation of first aspect, in the 5th kind of possible implementation, by the survey
The characteristic parameter that examination port obtains is contrasted with the characteristic parameter theoretical value of the test port, if the characteristic parameter
With the error of the characteristic parameter theoretical value in preset range, it is determined that the flow detection success of the test port, if institute
State characteristic parameter and be more than the preset range with the error of the characteristic parameter theoretical value, it is determined that the flow of the test port
Detection unsuccessfully includes:
It is right that the propagation delay time that the test port is obtained is carried out with the propagation delay time theoretical value of the test port
Than;
If the error of the propagation delay time that the test port is obtained and the propagation delay time theoretical value of the test port
In the preset range, it is determined that the packet have passed through each port in test port institute's surveyor's chain road, table
Show the flow detection success of the test port;
If the error of the propagation delay time that the test port is obtained and the propagation delay time theoretical value of the test port
More than the preset range, it is determined that the packet has skipped the section ports in test port institute's surveyor's chain road, represent
The flow detection failure of the test port.
Second aspect, there is provided a kind of electronic equipment, the equipment includes:
Acquiring unit, it is described to treat for obtaining the characteristic parameter of the packet passed through on link to be detected in test port
Detection link includes at least two test ports;Wherein, the packet a pair of forwardings often in the link to be detected
The characteristic parameter decreases or increases a unit value behind port, and the pair of forwarding port includes inbound port and exit port;
Processing unit, for the error of parameter theory value that obtains the test port in preset range, it is determined that
The flow detection success of the test port, if the characteristic parameter and the error of the characteristic parameter theoretical value are more than described pre-
If scope, it is determined that the flow detection failure of the test port.
With reference to second aspect, in the first possible implementation, the equipment also includes:
Default value cell, for the M bar lines in the link to be detected to be set to into open circuit, the M bars line is pre-
Line between the port of the router first selected, so that the link to be detected is divided into into M+1 cross-talk links, wherein, often
The two ends of sub-links are connected with test port.
With reference to the first possible implementation of second aspect or second aspect, in second possible implementation
In,
The characteristic parameter includes life span or propagation delay time;The packet is often in the link to be detected
The characteristic parameter decreases or increases a unit value behind a pair of forwarding ports includes:
If the characteristic parameter is the life span, the packet often in the link to be detected a pair
The life span reduces by a unit value behind forwarding port;Or
If the characteristic parameter is the propagation delay time, the packet often in the link to be detected a pair
The propagation delay time increases a unit time delay behind forwarding port, and the unit time delay is packet from the pair of forwarding port
Inbound port to exit port time delay.
With reference to second possible implementation of second aspect, in the third possible implementation,
The acquiring unit to the packet passed through on the link to be detected in the test port specifically for carrying out
Packet capturing, generates the corresponding packet capturing file of the test port, and the packet capturing file includes the life span of the packet;Or
Person
The acquiring unit to the packet passed through on the link to be detected in the test port specifically for carrying out
Detection, obtains the propagation delay time of the packet.
With reference to the third possible implementation of second aspect, in the 4th kind of possible implementation, the process
Unit also particularly useful for:
Life span in the corresponding packet capturing file of the test port is theoretical with the life span of the test port
Value is contrasted;
If the life span in the packet capturing file is equal with the life span theoretical value of the test port, it is determined that institute
State each port that packet have passed through in test port institute's surveyor's chain road, represent the flow detection of the test port into
Work(;
If the life span in the packet capturing file is unequal with the life span theoretical value of the test port, it is determined that
The packet has skipped the section ports in test port institute's surveyor's chain road, and the flow detection for representing the test port is lost
Lose.
With reference to the third possible implementation of second aspect, in the 5th kind of possible implementation, the process
Unit also particularly useful for:
It is right that the propagation delay time that the test port is obtained is carried out with the propagation delay time theoretical value of the test port
Than;
If the error of the propagation delay time that the test port is obtained and the propagation delay time theoretical value of the test port
In the preset range, it is determined that the packet have passed through each port in test port institute's surveyor's chain road, table
Show the flow detection success of the test port;
If the error of the propagation delay time that the test port is obtained and the propagation delay time theoretical value of the test port
More than the preset range, it is determined that the packet has skipped the section ports in test port institute's surveyor's chain road, represent
The flow detection failure of the test port.
A kind of flow rate testing methods are embodiments provided, the number passed through on link to be detected is obtained in test port
After characteristic parameter according to bag, the characteristic parameter that test port is obtained is contrasted with the characteristic parameter theoretical value of test port,
If the error of characteristic parameter and characteristic parameter theoretical value is in preset range, it is determined that the flow detection success of test port, if
Characteristic parameter is more than preset range with the error of characteristic parameter theoretical value, it is determined that the flow detection failure of test port.So as to
There is provided a kind of mechanism of flow detection, it is ensured that serpentine flow measures the correctness of test result.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of flow rate testing methods provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of flow rate testing methods provided in an embodiment of the present invention;
Fig. 3 is a kind of connection diagram of the router port of flow rate testing methods provided in an embodiment of the present invention;
Fig. 4 is a kind of connection diagram of the router port of flow rate testing methods provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic flow sheet of flow rate testing methods provided in an embodiment of the present invention;
Fig. 6 is a kind of schematic flow sheet of flow rate testing methods provided in an embodiment of the present invention;
Fig. 7 is a kind of connection diagram of the router port of flow rate testing methods provided in an embodiment of the present invention;
Fig. 8 is the structural representation of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The embodiment of the present invention provides a kind of flow rate testing methods, as shown in figure 1, the method includes:
101st, obtain the characteristic parameter of the packet passed through on link to be detected in test port, link to be detected include to
Few two test ports;Wherein, often characteristic parameter is reduced or increased packet behind a pair of forwarding ports in link to be detected
Plus a unit value, a pair of forwarding ports include inbound port and exit port.
102nd, the characteristic parameter for obtaining test port and the characteristic parameter theoretical value of test port are contrasted, if feature
Parameter is with characteristic parameter theoretical value error in preset range, it is determined that the flow detection success of test port, if characteristic parameter
It is more than preset range with the error of characteristic parameter theoretical value, it is determined that the flow detection failure of test port.
A kind of flow rate testing methods are embodiments provided, the number passed through on link to be detected is obtained in test port
After characteristic parameter according to bag, the characteristic parameter that test port is obtained is contrasted with the characteristic parameter theoretical value of test port,
If the error of characteristic parameter and characteristic parameter theoretical value is in preset range, it is determined that the flow detection success of test port, if
Characteristic parameter is more than preset range with the error of characteristic parameter theoretical value, it is determined that the flow detection failure of test port.So as to
There is provided a kind of mechanism of flow detection, it is ensured that serpentine flow measures the correctness of test result.
The embodiment of the present invention additionally provides a kind of flow rate testing methods, in embodiments of the present invention, for convenience of explanation, raw
The time of depositing can be expressed as TTL(Time To Live), life span theoretical value can be expressed as ExpTTL(Expected
Time To Live), propagation delay time can be expressed as PDi(Propagation Delay), propagation delay time theoretical value can represent
For ExpPD(Expected Propagation Delay), packet capturing file can be expressed as capi, wherein, i is cap or PD
Numbering, the value of i is positive integer, and the initial value of i is 1, as shown in Figure 2:
201st, the M bar lines in link to be detected are set to into open circuit, obtain M+1 cross-talk links.
Specifically, the link to be detected in router includes two or more ports, and the M bar lines are Yu Xianxuanding
Router port between line, for convenience of explanation, as shown in Figure 3, it is assumed that the link to be detected in router includes
D0~D23 24 ports altogether, the value of M is 3, and the line between D1 and D2, D9 and D10 and D17 and D18 is set to break
Road, obtains D0~D1, D2~D9, D10~D17 and D18~D23 totally 4 sub-links.
Optionally, the M bar lines in link to be detected can be set to into open circuit when predetermined detection cycle starts,
M bar lines in link to be detected can be set to, to obtain M+1 cross-talk links by open circuit by artificial setting.
202nd, it is M+1 cross-talk link connection test ports, so as to packet by test port into test port correspondence
Sublink.
Exemplary, it is assumed that at least 8 test ports of the test instrumentation of selection, respectively 1~test lead of test port
Mouthfuls 8, then as shown in figure 4, by D0 connecting tests port 1, by D1 connecting tests port 2, in the same manner, by D2, D9, D10, D17, D18
With D23 respectively correspondingly connecting test port 3, test port 4, test port 5, test port 6, test port 7 and test lead
Mouth 8, so that packet enters sublink D0~D1 by test port 1 or test port 2, by test port 3 or test lead
Mouth 4 enters sublink D2~D9, sublink D10~D17 is entered by test port 5 or test port 6, by test port 7
Or test port 8 enters sublink D18~D23.
Then, the characteristic parameter of the packet passed through on link to be detected, wherein feature ginseng can be obtained in test port
Number can be TTL or PD, and different characteristic parameters, the method for acquisition is also different, exemplary:
If characteristic parameter is TTL, the ttl value in packet is obtained by packet capturing, accordingly perform 203 and follow-up step
Suddenly;
If characteristic parameter is PD, test port passes through the time delay during test port by detection data bag, accordingly
207 and subsequent step are performed, as shown in Figure 5.
203rd, test port carries out packet capturing and generates the corresponding capi of the test port to the packet passed through in sublink.
It is transmitted in both directions when being transmitted in sublink due to packet, electronic equipment can be to the number of positive transmission in sublink
Corresponding cap is generated according to exit port of the bag in sublink, in the same manner, electronic equipment also can be to the packet of reverse transfer in sublink
Corresponding cap is generated in the exit port of sublink.
Specifically, test port 2 carries out packet capturing to the packet of positive transmission in sublink D0~D1, generates cap1;Survey
Examination port 1 carries out packet capturing to the packet of reverse transfer in sublink D0~D1, generates cap2;
In the same manner, the corresponding cap3 of packet of positive transmission in sublink D2~D9, the data of reverse transfer can be obtained
Wrap corresponding cap4;The corresponding cap5 of packet of the positive transmission of sublink D10~D17, the packet of reverse transfer is corresponding
cap6;The corresponding cap7 of packet, the corresponding cap8 of packet of reverse transfer of the positive transmission of sublink D18~D23.
Wherein, packet includes TTL, and often TTl accordingly subtracts packet behind a pair of forwarding ports in sublink
A few unit value, so also including TTL in corresponding capi.
204th, the TTL and corresponding TTL theoretical values in capi is judged(ExpTTL can be expressed as)It is whether equal, if capi
In TTL be equal to corresponding ExpTTL, it is determined that the flow detection success of the test port, accordingly perform 205;If in capi
TTL be not equal to corresponding ExpTTL, it is determined that the failure of the flow detection of the test port, accordingly perform 206.
Specifically, the initial value of TTL can be 255, corresponding, for the data in the positive transmission of sublink D0~D1
Bag, the corresponding ExpTTL of TTL should be 254 in cap1;For the packet of the reverse transfer in sublink D0~D1, in cap2
The corresponding ExpTTL of TTL should be 254.
If the test value of TTL is equal to the corresponding ExpTTL of cap1 in cap1, it is determined that packet is in the positive transmission of sublink
When test port 1 flow detection success;
If the test value of TTL is not equal to the corresponding ExpTTL of cap1 in cap1, it is determined that packet is in the positive biography of sublink
The flow detection failure of test port 1 when defeated.
In the same manner, the corresponding ExpTTL of TTL being obtained in cap3~cap8 are respectively:251st, 251,251,251,252 and
252, it is compared with the corresponding ExpTTL of TTL in cap3~cap8, comparative result is obtained, as shown in table 1:
Table 1
Determine sublink D0~D1 and sublink D18~D23 flow detection failure.Remaining test port flow detection into
Work(.
205th, the flow detection success of the test port is determined.
206th, the flow detection failure of the test port is determined.
207th, test port carries out test to the packet in sublink and obtains the corresponding PD of the test port.
In the same manner, it is transmitted in both directions when being transmitted in sublink due to packet, electronic equipment can be passed to positive in sublink
Defeated packet is detected that obtain corresponding PD, in the same manner, electronic equipment also can be to anti-in sublink in the exit port of sublink
Detected in the exit port of sublink to the packet for transmitting, obtained corresponding PD.
Specifically, test port 2 detects to the packet of positive transmission in sublink D0~D1, generates PD1;Test
Port 1 detects to the packet of reverse transfer in sublink D0~D1, generates PD2;
In the same manner, the corresponding PD3 of packet of positive transmission in sublink D2~D9, the packet of reverse transfer can be obtained
Corresponding PD4;The corresponding PD5 of packet, the corresponding PD6 of packet of reverse transfer of the positive transmission of sublink D10~D17;
The corresponding PD7 of packet, the corresponding PD8 of packet of reverse transfer of the positive transmission of sublink D18~D23.
208th, whether the difference between PD and corresponding ExpPD is judged more than preset range N, if PD and corresponding ExpPD
Between difference be more than preset range N, determine the test port flow detection failure, accordingly perform 209;If PD with it is corresponding
ExpPD between difference determine the flow detection success of the test port less than or equal to preset range N, accordingly perform
210。
Specifically, PD initial values should be 0ms, and packet often forwards the time delay of port to be generally 50ms through a pair, therefore,
For the packet of transmission positive in sublink D0~D1, the corresponding ExpPD of PD1 should be 50ms;For sublink D0~
The packet of reverse transfer in D1, the corresponding ExpPD of PD2 should be 50ms;
If the difference between PD1 and corresponding ExpPD is less than or equal to N, it is determined that packet is in the positive transmission of sublink
When test port 1 flow detection success;
If the difference between PD1 and corresponding ExpPD is more than N, it is determined that packet is tested in the positive transmission of sublink
The flow detection failure of port 1;
In the same manner, the corresponding ExpPD of PD1~PD8 are obtained to be respectively:50ms、50ms、200ms、200ms、200ms、
The test value of PD is compared in 200ms, 150ms and 150ms, with PD1~PD8, obtains the difference between PD and ExpPD, then
The difference is compared with N, comparative result is obtained, it is assumed that N is 50ms, as shown in table 2:
Table 2
Determine sublink D0~D1 and sublink D18~D23 flow detection failure.Remaining test port flow detection into
Work(.
209th, the flow detection failure of the test port is determined.
210th, the flow detection success of the test port is determined.
Optionally, as shown in fig. 6, before 201, can also include:
It is corresponding to perform 211 if the port number in router is odd number.
211st, 3 adjacent ports are chosen and does full interconnection test.
Specifically, as shown in fig. 7, the port in router is D0~D26, now, choose D24~D26 and do complete mutually translocation
Examination, remaining port is D0~D23, is even number port.
After 211, remaining even number port performs 201 and 201 follow-up steps.
A kind of flow rate testing methods are embodiments provided, the number passed through on link to be detected is obtained in test port
After characteristic parameter according to bag, the characteristic parameter that test port is obtained is contrasted with the characteristic parameter theoretical value of test port,
If the error of characteristic parameter and characteristic parameter theoretical value is in preset range, it is determined that the flow detection success of test port, if
Characteristic parameter is more than preset range with the error of characteristic parameter theoretical value, it is determined that the flow detection failure of test port.So as to
There is provided a kind of mechanism of flow detection, it is ensured that serpentine flow measures the correctness of test result.
A kind of electronic equipment 1 is embodiments provided, as shown in figure 8, the electronic equipment includes:
Acquiring unit 11, it is to be checked for obtaining the characteristic parameter of the packet passed through on link to be detected in test port
Surveyor's chain road includes at least two test ports;Wherein, the every feature behind a pair of in link to be detected forwarding ports of packet
Parameter decreases or increases a unit value, and a pair of forwarding ports include inbound port and exit port;
Processing unit 12, for the parameter that obtains test port and theoretical value error in preset range, it is determined that
The flow detection success of test port, if characteristic parameter is more than preset range with the error of characteristic parameter theoretical value, it is determined that survey
The flow detection failure of examination port.
Optionally, the electronic equipment 1 also includes:
Default value cell 13, for the M bar lines in link to be detected to be set to into open circuit, M bar lines are Yu Xianxuanding
Router port between line, so that link to be detected is divided into into M+1 cross-talk links, wherein, per sub-links
Two ends are connected with test port.
Optionally,
Characteristic parameter includes life span or propagation delay time;Packet a pair of forwarding ports often in link to be detected
Afterwards characteristic parameter decreases or increases a unit value and includes:
If characteristic parameter time for survival, when packet is often survived behind a pair of forwarding ports in link to be detected
Between reduce by a unit value, unit value pre-sets;Or
If characteristic parameter is propagation delay time, when packet is often transmitted behind a pair of forwarding ports in link to be detected
Prolong one unit time delay of increase, unit time delay is packet from the inbound port of a pair of forwarding ports to the time delay of exit port.
Optionally,
Acquiring unit 11 is generated and surveyed specifically for packet capturing is carried out to the packet passed through on link to be detected in test port
The corresponding packet capturing file in examination port, packet capturing file includes the life span of packet;Or
Acquiring unit obtains data specifically for detecting to the packet passed through on link to be detected in test port
The propagation delay time of bag.
Optionally, processing unit 12 specifically for:
It is right that life span in the corresponding packet capturing file of test port and the life span theoretical value of test port are carried out
Than;
If the life span in packet capturing file is equal with the life span theoretical value of test port, it is determined that packet is passed through
Each port in test port institute's surveyor's chain road, represents the flow detection success of test port;
If the life span in packet capturing file is unequal with the life span theoretical value of test port, it is determined that packet is jumped
The section ports crossed in test port institute's surveyor's chain road, represent the flow detection failure of test port.
Optionally, processing unit 12 also particularly useful for:
The propagation delay time that test port is obtained is contrasted with the propagation delay time theoretical value of test port;
If the error of the propagation delay time theoretical value of the propagation delay time that test port is obtained and test port is in preset range,
Then determine that packet have passed through each port in test port institute's surveyor's chain road, represent the flow detection success of test port;
If the propagation delay time that test port is obtained is more than preset range with the error of the propagation delay time theoretical value of test port,
Then determine that packet has skipped the section ports in test port institute's surveyor's chain road, represent the flow detection failure of test port.
A kind of electronic equipment is embodiments provided, the electronic equipment obtains Jing on link to be detected in test port
After the characteristic parameter of the packet crossed, the characteristic parameter that test port is obtained is carried out with the characteristic parameter theoretical value of test port
Contrast, if the error of characteristic parameter and characteristic parameter theoretical value is in preset range, it is determined that the flow detection of test port into
Work(, if characteristic parameter is more than preset range with the error of characteristic parameter theoretical value, it is determined that the flow detection failure of test port.
So as to provide a kind of mechanism of flow detection, it is ensured that serpentine flow measures the correctness of test result.
Term "and/or" in the present invention, only a kind of incidence relation of description affiliated partner, represents there may be three kinds
Relation, for example, A and/or B can be represented:Individualism A, while there is A and B, individualism B these three situations.In addition, this
Character "/" in text, typicallys represent forward-backward correlation pair as if a kind of relation of "or".
In several embodiments provided herein, it should be understood that disclosed method and apparatus, it can be passed through
Its mode is realized.For example, device embodiment described above is only schematic, and for example, the division of unit is only
A kind of division of logic function, can there is an other dividing mode when actually realizing, such as multiple units or component can with reference to or
Person is desirably integrated into another system, or some features can be ignored, or does not perform.Another, shown or discussed is mutual
Between coupling or direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, device or unit
Connect, can be electrical, mechanical or other forms.
Can be as the unit of separating component explanation or may not be physically separate, show as unit
Part can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks
On unit.Some or all of unit therein can according to the actual needs be selected to realize the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to
It is that the independent physics of unit includes, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list
Unit both can be realized in the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit to realize.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in an embodied on computer readable and deposit
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
Equipment(Can be personal computer, server, or network equipment etc.)Perform the part step of each embodiment method of the invention
Suddenly.And aforesaid storage medium includes:USB flash disk, portable hard drive, read only memory(Read-Only Memory, abbreviation ROM), with
Machine accesses memorizer(Random Access Memory, abbreviation RAM), magnetic disc or CD etc. are various can be with store program codes
Medium.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by the scope of the claims.
Claims (12)
1. snakelike flow rate testing methods of a kind of router, it is characterised in that methods described includes:
The characteristic parameter of the packet passed through on link to be detected is obtained in test port, the link to be detected includes at least two
Individual test port;Wherein, the every characteristic parameter behind a pair of in the link to be detected forwarding ports of the packet
A unit value is decreased or increased, the pair of forwarding port includes inbound port and exit port;
The characteristic parameter that the test port is obtained is contrasted with the characteristic parameter theoretical value of the test port, if
The error of the characteristic parameter and the characteristic parameter theoretical value is in preset range, it is determined that the flow inspection of the test port
Survey successfully, if the characteristic parameter is more than the preset range with the error of the characteristic parameter theoretical value, it is determined that the survey
The flow detection failure of examination port;Wherein, the theoretical value port to be passed through of the packet set in advance is individual
Several respective value.
2. method according to claim 1, it is characterised in that the data passed through on link to be detected are obtained in test port
Before the characteristic parameter of bag, methods described also includes:
M bar lines in the link to be detected are set to into open circuit, the M bars line is the company between previously selected port
Line, so that the link to be detected is divided into into M+1 cross-talk links, wherein, the two ends per sub-links are connected with test port.
3. method according to claim 1 and 2, it is characterised in that when the characteristic parameter includes life span or transmission
Prolong;Often the characteristic parameter decreases or increases one to the packet behind a pair of forwarding ports in the link to be detected
Unit value includes:
If the characteristic parameter is the life span, the packet a pair of forwardings often in the link to be detected
The life span reduces by a unit value behind port;Or
If the characteristic parameter is the propagation delay time, the packet a pair of forwardings often in the link to be detected
The propagation delay time increases a unit time delay behind port, and the unit time delay is packet entering from the pair of forwarding port
Time delay of the port to exit port.
4. method according to claim 3, it is characterised in that described to obtain what is passed through on link to be detected in test port
The characteristic parameter of packet includes:
Packet capturing is carried out to the packet passed through on the link to be detected in the test port, the test port correspondence is generated
Packet capturing file, the packet capturing file includes the life span of the packet;Or
The packet passed through on the link to be detected is detected in the test port, obtains the transmission of the packet
Time delay.
5. method according to claim 4, it is characterised in that the characteristic parameter for obtaining the test port and institute
The characteristic parameter theoretical value for stating test port is contrasted, if the characteristic parameter exists with the error of the characteristic parameter theoretical value
In preset range, it is determined that the flow detection success of the test port, if the characteristic parameter is theoretical with the characteristic parameter
The error of value is more than the preset range, it is determined that the flow detection of the test port unsuccessfully includes:
Life span in the corresponding packet capturing file of the test port and the life span theoretical value of the test port are entered
Row contrast;
If the life span in the packet capturing file is equal with the life span theoretical value of the test port, it is determined that the number
Each port in test port institute's surveyor's chain road is have passed through according to bag, the flow detection success of the test port is represented;
If the life span in the packet capturing file is unequal with the life span theoretical value of the test port, it is determined that described
Packet has skipped the section ports in test port institute's surveyor's chain road, represents the flow detection failure of the test port.
6. method according to claim 4, it is characterised in that the characteristic parameter for obtaining the test port and institute
The characteristic parameter theoretical value for stating test port is contrasted, if the characteristic parameter exists with the error of the characteristic parameter theoretical value
In preset range, it is determined that the flow detection success of the test port, if the characteristic parameter is theoretical with the characteristic parameter
The error of value is more than the preset range, it is determined that the flow detection of the test port unsuccessfully includes:
The propagation delay time that the test port is obtained is contrasted with the propagation delay time theoretical value of the test port;
If the error of the propagation delay time that the test port is obtained and the propagation delay time theoretical value of the test port is in institute
State in preset range, it is determined that the packet have passed through each port in test port institute's surveyor's chain road, represent institute
State the flow detection success of test port;
If the propagation delay time that the test port is obtained is more than with the error of the propagation delay time theoretical value of the test port
The preset range, it is determined that the packet has skipped the section ports in test port institute's surveyor's chain road, represents described
The flow detection failure of test port.
7. a kind of electronic equipment for the snakelike detection of router, it is characterised in that the electronic equipment includes:
Acquiring unit, it is described to be detected for obtaining the characteristic parameter of the packet passed through on link to be detected in test port
Link includes at least two test ports;Wherein, the packet a pair of forwarding ports often in the link to be detected
Afterwards the characteristic parameter decreases or increases a unit value, and the pair of forwarding port includes inbound port and exit port;
Processing unit, for the error of parameter theory value that obtains the test port in preset range, it is determined that described
The flow detection success of test port, if the characteristic parameter is more than the default model with the error of the characteristic parameter theoretical value
Enclose, it is determined that the flow detection failure of the test port;Wherein, the theoretical value packet set in advance is wanted
Through port number respective value.
8. equipment according to claim 7, it is characterised in that the equipment also includes:
Default value cell, for the M bar lines in the link to be detected to be set to into open circuit, the M bars line is choosing in advance
Line between the port of fixed router, so that the link to be detected is divided into into M+1 cross-talk links, wherein, per strip
The two ends of link are connected with test port.
9. the equipment according to claim 7 or 8, it is characterised in that when the characteristic parameter includes life span or transmission
Prolong;Often the characteristic parameter decreases or increases one to the packet behind a pair of forwarding ports in the link to be detected
Unit value includes:
If the characteristic parameter is the life span, the packet a pair of forwardings often in the link to be detected
The life span reduces by a unit value behind port;Or
If the characteristic parameter is the propagation delay time, the packet a pair of forwardings often in the link to be detected
The propagation delay time increases a unit time delay behind port, and the unit time delay is packet entering from the pair of forwarding port
Time delay of the port to exit port.
10. equipment according to claim 9, it is characterised in that
The acquiring unit specifically for carrying out packet capturing to the packet passed through on the link to be detected in the test port,
The corresponding packet capturing file of the test port is generated, the packet capturing file includes the life span of the packet;Or
The acquiring unit specifically for detecting to the packet passed through on the link to be detected in the test port,
Obtain the propagation delay time of the packet.
11. equipment according to claim 10, it is characterised in that the processing unit specifically for:
Life span in the corresponding packet capturing file of the test port and the life span theoretical value of the test port are entered
Row contrast;
If the life span in the packet capturing file is equal with the life span theoretical value of the test port, it is determined that the number
Each port in test port institute's surveyor's chain road is have passed through according to bag, the flow detection success of the test port is represented;
If the life span in the packet capturing file is unequal with the life span theoretical value of the test port, it is determined that described
Packet has skipped the section ports in test port institute's surveyor's chain road, represents the flow detection failure of the test port.
12. equipment according to claim 10, it is characterised in that the processing unit also particularly useful for:
The propagation delay time that the test port is obtained is contrasted with the propagation delay time theoretical value of the test port;
If the error of the propagation delay time that the test port is obtained and the propagation delay time theoretical value of the test port is in institute
State in preset range, it is determined that the packet have passed through each port in test port institute's surveyor's chain road, represent institute
State the flow detection success of test port;
If the propagation delay time that the test port is obtained is more than with the error of the propagation delay time theoretical value of the test port
The preset range, it is determined that the packet has skipped the section ports in test port institute's surveyor's chain road, represents described
The flow detection failure of test port.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310637335.XA CN103595594B (en) | 2013-12-02 | 2013-12-02 | Flow detection method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310637335.XA CN103595594B (en) | 2013-12-02 | 2013-12-02 | Flow detection method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103595594A CN103595594A (en) | 2014-02-19 |
CN103595594B true CN103595594B (en) | 2017-04-26 |
Family
ID=50085585
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310637335.XA Active CN103595594B (en) | 2013-12-02 | 2013-12-02 | Flow detection method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103595594B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109379255B (en) * | 2018-12-12 | 2021-10-08 | 国网宁夏电力有限公司电力科学研究院 | Intelligent switch based process layer network flow monitoring and early warning method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004023745A1 (en) * | 2002-09-06 | 2004-03-18 | Infineon Technologies Ag | Method and system for controlling bandwidth allocation |
CN1909487A (en) * | 2006-08-24 | 2007-02-07 | 华为数字技术有限公司 | Method and system for set testing of router |
CN1917452A (en) * | 2005-08-19 | 2007-02-21 | 上海亿人通信终端有限公司 | Method for testing forwarding performance of Ethernet exchange, and method for configuring network |
CN102130800A (en) * | 2011-04-01 | 2011-07-20 | 苏州赛特斯网络科技有限公司 | Device and method for detecting network access abnormality based on data stream behavior analysis |
CN102377606A (en) * | 2010-08-11 | 2012-03-14 | 鸿富锦精密工业(深圳)有限公司 | Network connection device and port test method thereof |
CN103078770A (en) * | 2013-01-22 | 2013-05-01 | 浪潮电子信息产业股份有限公司 | Method for testing stability of switch |
-
2013
- 2013-12-02 CN CN201310637335.XA patent/CN103595594B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004023745A1 (en) * | 2002-09-06 | 2004-03-18 | Infineon Technologies Ag | Method and system for controlling bandwidth allocation |
CN1917452A (en) * | 2005-08-19 | 2007-02-21 | 上海亿人通信终端有限公司 | Method for testing forwarding performance of Ethernet exchange, and method for configuring network |
CN1909487A (en) * | 2006-08-24 | 2007-02-07 | 华为数字技术有限公司 | Method and system for set testing of router |
CN102377606A (en) * | 2010-08-11 | 2012-03-14 | 鸿富锦精密工业(深圳)有限公司 | Network connection device and port test method thereof |
CN102130800A (en) * | 2011-04-01 | 2011-07-20 | 苏州赛特斯网络科技有限公司 | Device and method for detecting network access abnormality based on data stream behavior analysis |
CN103078770A (en) * | 2013-01-22 | 2013-05-01 | 浪潮电子信息产业股份有限公司 | Method for testing stability of switch |
Also Published As
Publication number | Publication date |
---|---|
CN103595594A (en) | 2014-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102255910B (en) | Method and device for testing performance of intrusion prevention product | |
JP5673805B2 (en) | Network device, communication system, abnormal traffic detection method and program | |
CN103959722B (en) | The system for improving ethernet network | |
CN103986548B (en) | A kind of method and terminal for determining packet loss reason | |
CN102685007A (en) | Method and device for processing member links in multi-link bundled link group | |
CN103957155B (en) | Message transmitting method, device and interconnecting interface | |
CN102404170B (en) | Detection method, device and system of message loss | |
CN102082707A (en) | Parallel processing performance test method for multinuclear firewall | |
CN107959599A (en) | A kind of Bus_Off fault test systems and test method | |
CN109714190A (en) | A kind of load balancing based on application level and failure transfer system and its method | |
CN109361559A (en) | A kind of detection method and device of parallel redundancy network failure | |
CN108989152A (en) | Obtain the method and device and computer storage medium of network delay | |
CN101656642B (en) | Method, device and system for testing authentication performance of network access equipment | |
CN105323121A (en) | Network condition detection method and device | |
CN103595594B (en) | Flow detection method and electronic equipment | |
CN104283716B (en) | Data transmission method, equipment and system | |
CN105871661A (en) | Public network server detection method and detection server | |
CN106027284A (en) | Network fault diagnosis method and device | |
CN109981385A (en) | A kind of methods, devices and systems for realizing packet loss detection | |
CN113132253B (en) | Bandwidth current limiting method and electronic equipment | |
CN114531264A (en) | Authentication and data channel control | |
CN110247823A (en) | A kind of fault detection method, device and relevant device | |
CN106502944A (en) | The heartbeat detecting method of computer, PCIE device and PCIE device | |
CN108574644A (en) | A kind of TCP connection restoration methods, device, electronic equipment and storage medium | |
CN207652457U (en) | A kind of Bus_Off fault test systems |
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 |