Background technology
The development of Along with computer technology, internet (Internet) becomes people gradually and obtains one of important platform of information, interchange each other.The fast development of new business such as real time business and multimedia service has caused the internet network performance decrease in rapid expansion and the internet in the world, internet.At present; The main cause that influences network performance has factors such as design and the host computer system of link bandwidth, link bottleneck, application and agreement, and wherein, link bandwidth is most important Internet resources; It also is one of main determining factor of transmission path performance; And closely related with network bottleneck, overall performance analysis, capacity planning etc., therefore, accurately measuring bandwidth just becomes a major issue in the internet research.
In network bandwidth field of measurement, by different estimating, the network bandwidth is measured the measurement that can be divided into different aspects such as link bandwidth, path bandwidth and available bandwidth.Available bandwidth is a key parameter in network route, traffic engineering, the QoS control in engineering, has more practical significance than bottleneck bandwidth.
Link bandwidth refers to the maximum bandwidth of a link, the i.e. maximum data transfer rate of this link, by the physical property decision of link; The link available bandwidth refers to a current bandwidth that is not used of link; Path bandwidth is the minimum value of all link bandwidths on the current path, and path bandwidth also is called as the end-to-end path bandwidth; The path available bandwidth is the minimum value of all the link available bandwidths on the current path, and the path available bandwidth also is called as available bandwidth of end-to-end route.In all links on current path, the minimum link of link available bandwidth is called as the urgent link in this path, and the minimum link of link bandwidth is called as the bottleneck link in this path.
Shown in Figure 1 is the end-to-end bandwidth sketch map, and the path between transmitting terminal and the receiving terminal is by three link L
1, L
2And L
3Form, wherein, C
1, C
2, C
3Be respectively link L
1, L
2, L
3Link bandwidth; Dash area is represented the already used bandwidth of current link, then A
1, A
2, A
3Be respectively link L
1, L
2, L
3The bandwidth that is not used, be the link available bandwidth.As can be seen from the figure C
1<C
2<C
3, be link L
1Link bandwidth minimum, determined the path bandwidth of transmitting terminal, then link L to receiving terminal
1It is the bottleneck link between transmitting terminal and the receiving terminal; In addition, A
3<A
1<A
2, be link L
3The link available bandwidth is minimum, has determined the path available bandwidth of transmitting terminal to receiving terminal, then link L
3Urgent link for this path.
Existing bandwidth measurement method is based on the bag formation algorithm of timestamp more, and main measurement model has probe interval model (PGM, Packet Gap Model) and detection rate model (PRM, Packet Rate Model).Wherein, mainly be that the inter-packet gap of analyzing the detection packet formation changes based on the algorithm of PGM model, confirm the estimated value of bandwidth also to be called as bandwidth measurement method according to variation tendency based on timestamp; Algorithm based on the PRM model mainly is to send the detection packet formation at transmitting terminal with certain speed; Receive the speed of detection packet formation according to receiving terminal; Dynamically adjust the transmission rate of detection packet formation, thereby the critical speed of confirming a coupling is estimated bandwidth to be measured.
But mainly there is following shortcoming in existing bandwidth measurement method based on PGM and PRM:
1. above-mentioned two kinds of method of measurement generally need the cooperating of passive measurement end; That is to say; The passive measurement end need carry out corresponding calculated according to some information of detection packet formation; And these computing informations are returned to initiatively measuring junction, two measuring junctions need cooperating aptitude test outgoing link bandwidth.In this case, need the passive measurement end to take to install ancillary methods such as corresponding process of measurement, reduced the practicality and the flexibility of method of measurement like this.
2. above-mentioned two kinds of method of measurement calculation process are complicated, and particularly based on the bandwidth measurement method of PGM, relatively stricter for requirements such as timing accuracies, the complexity of calculating is higher.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of the utilization to mix the method and apparatus that message is measured available bandwidth, can reduce the complexity of bandwidth measurement.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of the utilization and mix the method that message is measured available bandwidth, this method comprises:
Initiatively measuring junction sends the Internet Control Message Protocol icmp packet to the passive measurement end, the normal icmp packet packet loss of the network that said active measuring junction counts on the passive measurement end;
Initiatively measuring junction sends and mixes message to said passive measurement end, and initiatively measuring junction counts on the icmp packet average packet loss ratio of the said mixing message of passive measurement end;
When initiatively the measuring junction difference of judging said icmp packet average packet loss ratio and the normal icmp packet packet loss of network is greater than the packet loss threshold value preset; Add up said passive measurement termination and receive the Mean Speed of mixing message, as the available bandwidth of active measuring junction to the passive measurement end;
The difference that said active measuring junction is judged said icmp packet average packet loss ratio and the normal icmp packet packet loss of said network is during smaller or equal to preset packet loss threshold value; This method also comprises: said active measuring junction is confirmed the transmission rate of said mixing message again; Be specially: the transmission rate first time with said mixing message is the basis, and the mode that adopts linear raising or index doubly to improve increases said transmission rate.
This method further comprises: said active measuring junction sends icmp packet to the passive measurement end with preset initialization speed; After said passive measurement termination is received said icmp packet; Said icmp packet is returned to said active measuring junction; Said active measuring junction is added up the normal icmp packet packet loss of said network according to the icmp packet that icmp packet that self sends and passive measurement end return.
Wherein, said active measuring junction sends and mixes message to before the said passive measurement end, and this method also comprises: said active measuring junction is confirmed the transmission rate of said mixing message;
Accordingly, confirm the transmission rate of said mixing message, be specially:
When said active measuring junction for the first time when said passive measurement end sends said mixing message, the transmission rate first time of said mixing message is said preset initialization speed, or be the link bandwidth of said active measuring junction to bottleneck link between the passive measurement end.
The mixing message that said active measuring junction sends is that the n group is mixed message, and said mixing message comprises said icmp packet and user datagram protocol UDP message, and wherein n is the integer more than or equal to 1.
This method also comprises: the destination interface of the said UDP message of said active measuring junction is set to wrong destination interface; Accordingly, after said passive measurement termination is received said mixing message, with said UDP packet loss, and the icmp packet in the said mixing message returned to said active measuring junction according to the destination interface of said mistake.
Said active measuring junction is added up said icmp packet average packet loss ratio; Be specially: the icmp packet that said active measuring junction returns according to n group mixing message that self sends and passive measurement end; Add up every group of icmp packet packet loss that mixes message in the said n group; And the icmp packet packet loss that said n group is mixed message averaged, obtain said icmp packet average packet loss ratio.
Said active measuring junction is added up the Mean Speed that said passive measurement termination is received said mixing message; Be specially: the icmp packet that said active measuring junction returns according to n group mixing message that self sends and passive measurement end; Add up said passive measurement termination and receive every group of speed of mixing message in the said n group; And said passive measurement termination is received said n group mix the speed of message and average, obtain the Mean Speed that said passive measurement termination is received said mixing message.
The present invention also provides a kind of the utilization to mix the device that message is measured available bandwidth, and this device comprises: active measuring junction and passive measurement end, wherein,
Said active measuring junction is used to send icmp packet and gives said passive measurement end, and counts on the normal icmp packet packet loss of network of said passive measurement end; Also be used for sending and mix message to said passive measurement end; And count on the said icmp packet average packet loss ratio of said passive measurement end; And during greater than the packet loss threshold value preset, add up the Mean Speed that said passive measurement termination is received said mixing message in the difference of judging said icmp packet average packet loss ratio and the normal icmp packet packet loss of said network;
Said passive measurement end is used to receive said icmp packet and said mixing message;
The difference that said active measuring junction is judged said icmp packet average packet loss ratio and the normal icmp packet packet loss of said network is during smaller or equal to preset packet loss threshold value: said active measuring junction is confirmed said transmission rate of mixing message again; Be specially: the transmission rate first time with said mixing message is the basis, and the mode that adopts linear raising or index doubly to improve increases said transmission rate.
Wherein, said passive measurement end also is used for, and when receiving the icmp packet of said active measuring junction transmission, returns said icmp packet and gives initiatively measuring junction; When receiving the mixing message of said active measuring junction transmission, with the UDP packet loss in the said mixing message, and the icmp packet that will mix in the message returns to initiatively measuring junction.
Bandwidth measurement scheme of the present invention is sent icmp packet to the passive measurement end by the active measuring junction, and counts on the normal icmp packet packet loss of network of passive measurement end; Send the mixing message to the passive measurement end by the active measuring junction, and count on the icmp packet average packet loss ratio of passive measurement end; The difference of judging icmp packet average packet loss ratio and the normal icmp packet packet loss of network when the active measuring junction is during greater than preset packet loss threshold value, and statistics passive measurement termination is received the Mean Speed of mixing message; This Mean Speed is the path available bandwidth of measurement.In addition, in this scheme, initiatively the destination interface of UDP message is set to wrongly in the mixing message that sends of measuring junction, and so, the passive measurement end can only return icmp packet to the active measuring junction directly with the UDP packet loss.This shows that the bandwidth measurement among the present invention does not need the cooperating of passive measurement end, reduced the complexity of surveying work, the practicality of method of measurement of the present invention and flexibility are also than higher simultaneously.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment technical scheme of the present invention further is discussed in more detail.
Bandwidth measurement among the present invention mainly is to the measurement of path available bandwidth end to end, and wherein an end is the active measuring junction, and a then other end is the passive measurement end; Initiatively measuring junction is measured the path available bandwidth at two ends through sending the mode of mixing message to the passive measurement end.
Mix message among the present invention and refer to user datagram protocol (UDP, User Datagram Protocol) message and Internet Control Message Protocol (ICMP, Internet Control Message Protocol) message.
The present invention utilizes the flow process of mixing message measurement available bandwidth as shown in Figure 2, comprising:
Step 201, initiatively measuring junction sends icmp packet to the passive measurement end, and initiatively measuring junction counts on the normal icmp packet packet loss of network of passive measurement end;
Step 202, initiatively measuring junction sends and mixes message to the passive measurement end, and initiatively measuring junction counts on the icmp packet average packet loss ratio in the mixing message of passive measurement end;
Step 203; When initiatively the measuring junction difference of judging icmp packet average packet loss ratio and the normal icmp packet packet loss of network is greater than the packet loss threshold value preset; Statistics passive measurement termination is received the Mean Speed of mixing message, as the available bandwidth of active measuring junction to the passive measurement end.
Below in conjunction with explaining in the concrete enforcement that the present invention measures the method for bandwidth, as shown in Figure 3, comprising:
Step 301, the initiatively normal icmp packet packet loss of measuring junction Measurement Network.
Initiatively measuring junction sends icmp packet to the passive measurement end with preset initialization speed; After the passive measurement termination is received icmp packet; Icmp packet is returned to initiatively measuring junction; Initiatively measuring junction is according to the icmp packet that icmp packet that self sends and passive measurement end return, and adding up initiatively, measuring junction is specially to the normal icmp packet packet loss of network of passive measurement end: initiatively measuring junction is with preset initialization speed V
0Send icmp packet, wherein V to the passive measurement end
0Be a lower transmission rate, when with V
0During for the transmission rate of icmp packet, need guarantee can not cause the congested of network, under this prerequisite, initiatively measuring junction can carry out V according to self needs
0The selection of value.
Suppose that initiatively measuring junction has once sent the individual icmp packet of z (z is a positive integer) to the passive measurement end, and the passive measurement end returned the individual icmp packet of z ' (z ' be positive integer), then the normal icmp packet packet loss of network does on the current path
Step 302, initiatively measuring junction is confirmed the transmission rate of current mixing message.
When sending to the passive measurement end for the first time, the active measuring junction mixes message; And at known current path, when promptly initiatively measuring junction is to the link bandwidth of the bottleneck link of passive measurement end, this transmission rate first time of mixing message can be the link bandwidth of this bottleneck link; Otherwise, can be preset initialization speed V
0
If the transmission rate first time of mixing message can not satisfy the measurement of path available bandwidth, then need improve the transmission rate of mixing message, concrete, can adopt linear raising and index doubly to improve two kinds of means as required.Wherein, when linearity improved transmission rate, the growth rate of transmission rate was slower, cause the testing time longer relatively, but test result is more accurate; When index doubly improved transmission rate, the growth rate of transmission rate was very fast, and the test convergence is fast, but the error of the linear relatively raising transmission rate of test result is bigger.
Step 303, initiatively measuring junction sends to the passive measurement end with current definite transmission rate and mixes message; The passive measurement end returns icmp packet to the active measuring junction.
In the mixing message of the present invention, the quantity of UDP message is more, preferably, can be provided with and send an icmp packet behind the individual UDP message of continuous transmission k (k is a positive integer), is illustrated in figure 4 as one group of structural representation that mixes message, and initiatively transmitting terminal is with ICMP
1Message mixes the initial of message as this group, sends ICMP of transmission behind k the UDP message then continuously
2Message; Send an ICMP after sending k UDP message more continuously
3Message, by that analogy, to send an ICMP behind k UDP message of continuous transmission
sMessage can be called one group of transmission interval of mixing message with k UDP message+1 icmp packet as the end of this group mixing message.The transmission that this shows two continuous icmp packets is at interval very big, and it is also very big that then the passive measurement end returns the interval of icmp packet.
The total individual icmp packet of s (s is a positive integer) in this mixing message, and the numbering of icmp packet is continuous, wherein, and ICMP
1Be first icmp packet, ICMP
sBe last icmp packet; The quantity of UDP message is (s-1) * k.
It is to be noted; Initiatively measuring junction is when sending the UDP message among the present invention, and the destination interface of UDP message is set to wrong destination slogan, and so the passive measurement end is when receiving the mixing message; Because the destination slogan mistake of UDP message; Therefore the passive measurement end is directly with the UDP packet loss, and just receives icmp packet, and returns icmp packet to the active measuring junction.Because icmp packet itself just has and measures data-transformation facility (comprising bandwidth measurement) end to end; And the UDP message is initiatively abandoned by the passive measurement end; Therefore, the passive measurement end need not made any cooperating to bandwidth measurement, has so just reduced the complexity of bandwidth measurement widely.
Above-mentioned UDP message accounts for the ratio of mixing message and is far longer than the ratio that icmp packet accounts for the mixing message; So; In up (initiatively measuring junction sends to the passive measurement end and mixes message) process,, cause the transmission of icmp packet to receive the influence of network condition bigger because the data volume of mixing message is bigger; In descending (the passive measurement end returns icmp packet to the active measuring junction) process; Because the UDP message is dropped, that returns has only icmp packet, and data volume significantly reduces; And the interval between the icmp packet is very big; Therefore, the influence that icmp packet receives network condition reduces greatly, helps to improve the precision of bandwidth measurement like this.
Step 304, initiatively measuring junction statistics icmp packet average packet loss ratio.
The icmp packet that the active measuring junction returns according to n group mixing message that self sends and passive measurement end; Every group of icmp packet packet loss that mixes message in the statistics n group; And the icmp packet packet loss that this n group is mixed message averaged, obtain the icmp packet average packet loss ratio.
Concrete, initiatively measuring junction need be added up the icmp packet average packet loss ratio under current transmission rate.The icmp packet packet loss that only mixes message with single group serves as when coming the measuring route available bandwidth, can produce bigger error, therefore; When carrying out the measurement of a path available bandwidth, needing initiatively in the above-mentioned steps 303, measuring junction once sends n (n=1,2; 3...) group mixing message; Preferably, n can get the integer greater than 1, and calculates every group respectively and mix the icmp packet packet loss of message, i.e. single icmp packet packet loss α that organizes
nGet the mean value of this n group icmp packet packet loss then, obtain the icmp packet average packet loss ratio
So can improve the computational accuracy of icmp packet packet loss.
Down in the face of single group icmp packet packet loss α in this step
nCalculating carry out detailed explanation.
When the active measuring junction receives this group that the passive measurement end returns when mixing last icmp packet in message, confirm whether its icmp packet that receives has to lose; If having, loses icmp packet, then single group icmp packet packet loss α in this step
nCalculating can adopt the computational methods of packet loss in the step 301.
If icmp packet is not lost, the computational methods below then adopting:
Can confirm extreme bandwidth (maximum bandwidth) B in this path can adopt prior art here according to current path situation, repeat no more; According to the transmitting time of icmp packet, the transmission that can calculate first icmp packet and last icmp packet is spaced apart t; Turn back to the initiatively time of measuring junction according to icmp packet, can calculate first icmp packet is t+ Δ t with the time interval that last icmp packet turns back to the active measuring junction, wherein,
L is every group of length of mixing message, and unit is bit; When time that certain icmp packet turns back to measuring junction initiatively with first icmp packet turn back to measuring junction initiatively interval greater than t+ Δ t the time; Think that this icmp packet is the icmp packet of losing, so can draw the number m that this group is mixed the icmp packet of losing in the message
n, then
Step 305, whether the difference of judging the normal icmp packet packet loss of icmp packet average packet loss ratio and network is greater than preset packet loss threshold value, if not, return step 302; If, execution in step 306.
The packet loss threshold gamma can be provided with according to the physical characteristic of current path.
The icmp packet average packet loss ratio is that the normal icmp packet packet loss of α, network is β, and generally speaking, just often the transmission rate of icmp packet is high because the transmission rate of mixing message is than network; Therefore, α is greater than β, if alpha-beta≤γ; Judging that then the icmp packet average packet loss ratio of mixing message under current transmission rate is suitable with the normal icmp packet packet loss of network, explain that the current transmission rate of mixing message is low excessively, serves as according to measuring the most accurate path available bandwidth with current transmission rate; At this moment, initiatively measuring junction stops to send the mixing message with current transmission rate, needs to improve the transmission rate of mixing message; Return execution in step 302; Initiatively the definite again transmission rate of mixing message of measuring junction is the basis with the transmission rate first time of mixing message, and the mode that adopts linear raising or index doubly to improve increases transmission rate; Execution in step 303 then, send once more and mix message to the passive measurement end; It is pointed out that initiatively measuring junction sends when mixing message once more, can select increases the quantity forwarded of mixing message, as compares last pilosity and send several groups to mix messages and/or increase every group of UDP message and quantity of icmp packet of mixing in the message.
If alpha-beta>γ explains that mixing the current transmission rate of message does not need to improve again, for the measurement of path available bandwidth, has been a more rational transmission rate, continue execution in step 306.
Step 306, the icmp packet that the active measuring junction returns according to the passive measurement end, statistics passive measurement termination is received the Mean Speed of mixing message, as the available bandwidth of active measuring junction to the passive measurement end.
The icmp packet that the active measuring junction returns according to n group mixing message that self sends and passive measurement end; Statistics passive measurement termination is received every group of speed of mixing message in this n group; And the passive measurement termination is received the speed that this n group mixes message average, obtain the passive measurement termination and receive the Mean Speed of mixing message.
Be specially, initiatively measuring junction need be measured under current transmission rate, and passive measurement termination receipts n (n=1,2,3...) group is mixed the Mean Speed of message, and is concrete, and initiatively measuring junction calculates the passive measurement termination earlier and receives the speed V that the list group is mixed message
n, and then add up the mean value V of this n group speed, i.e. passive measurement termination is received the Mean Speed of mixing message
Then this Mean Speed be the current path that measures, promptly initiatively measuring junction to the available bandwidth of passive measurement end.
Initiatively measuring junction statistics passive measurement termination is received speed that single group mixes message and is based on this precondition that influences that icmp packet that the passive measurement end returns does not receive network environment; But; In the application of reality; The icmp packet that the passive measurement end returns all can receive the influence of network environment basically; Therefore, initiatively measuring junction need carry out the sample filtration to the icmp packet that returns, and chooses to receive network environment to influence minimum icmp packet as receiving single speed of mixing message of organizing according to adding up the passive measurement termination.
Concrete icmp packet sample of the present invention filters the following method that adopts:
1, suppose that the lowest number that measuring junction initiatively receives the icmp packet that the passive measurement end returns is that i, maximum are numbered j, and the lowest number icmp packet turns back to initiatively with maximum numbering icmp packet, and the time of measuring junction is respectively T
iAnd T
j, then icmp packet turns back to initiatively that the average time interval of measuring junction does
2, establish and be numbered x (icmp packet of i<x≤j) turns back to initiatively, and the ideal time of measuring junction is T
x'=T
i+ (x-i) * Δ T;
3, initiatively measuring junction is chosen T
x(icmp packet that is numbered x turns back to the initiatively time of measuring junction) and T
x' immediate icmp packet, promptly turn back to measuring junction initiatively time near the icmp packet of ideal time, as receiving the speed of this group mixing message according to calculating the passive measurement termination.
Certainly, the sample of icmp packet filters the sample filter algorithm can also adopt in the prior art other.
Suppose that it is l that this group is mixed the length of icmp packet in the message
ICMP, the UDP message length be l
UDP, unit is bit, the speed that then passive measurement termination is received this group mixing message is:
Wherein k is one group of number of sending UDP message in the interval of mixing message.
In order to realize above-mentioned bandwidth measurement method, the present invention also provides a kind of measurement mechanism, and is as shown in Figure 5, comprising: active measuring junction 10 and passive measurement end 20, wherein,
Initiatively measuring junction 10 is used to send icmp packet to passive measurement end 20, and counts on the normal icmp packet packet loss of network of passive measurement end 20; Also be used for sending and mix message, and count on the icmp packet average packet loss ratio of passive measurement end 20 to passive measurement end 20; Also be used in the difference of judging icmp packet average packet loss ratio and the normal icmp packet packet loss of network during greater than preset packet loss threshold value, statistics passive measurement end 20 receives the Mean Speed of mixing messages;
Passive measurement end 20 is used to receive icmp packet and mixes message.Also be used for when receiving the icmp packet of initiatively measuring junction 10 transmissions, returning this icmp packet and giving initiatively measuring junction 10; When receiving the mixing message of initiatively measuring junction 10 transmissions, this is mixed the UDP packet loss in message, and the icmp packet that will mix in the message returns to initiatively measuring junction 10.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.