CN100421396C - Method and system for measuring bottleneck bandwidth and remanent bandwidth - Google Patents

Method and system for measuring bottleneck bandwidth and remanent bandwidth Download PDF

Info

Publication number
CN100421396C
CN100421396C CN 200510123695 CN200510123695A CN100421396C CN 100421396 C CN100421396 C CN 100421396C CN 200510123695 CN200510123695 CN 200510123695 CN 200510123695 A CN200510123695 A CN 200510123695A CN 100421396 C CN100421396 C CN 100421396C
Authority
CN
China
Prior art keywords
packet
token bucket
path
bandwidth
measurement
Prior art date
Application number
CN 200510123695
Other languages
Chinese (zh)
Other versions
CN1770711A (en
Inventor
杨松鹰
宇 林
金跃辉
Original Assignee
史文勇
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 史文勇 filed Critical 史文勇
Priority to CN 200510123695 priority Critical patent/CN100421396C/en
Publication of CN1770711A publication Critical patent/CN1770711A/en
Application granted granted Critical
Publication of CN100421396C publication Critical patent/CN100421396C/en

Links

Abstract

一种在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法和系统,该方法是由发送端与接收端建立连接,进行数据交互,先探测和判断测试路径是否为令牌桶限速的网络路径,如果测试路径是令牌桶限速路径,则计算该路径的各项令牌桶参数、瓶颈带宽和剩余带宽;否则,采用传统方法测量和计算该路径的瓶颈带宽和剩余带宽。 And residual bandwidth bottleneck bandwidth measurement method and a system token bucket rate limiting in the network path, the method is to establish a connection by the sending and receiving ends, for data exchange, to detect and judge whether the token bucket test path speed of the network path, the path is a test if the token bucket speed path, the token bucket parameters, the remaining bandwidth of the bottleneck bandwidth, and calculating the path; otherwise, using conventional methods bottleneck bandwidth measurement and calculation of the path and the remaining bandwidth. 因此,不论路径是否采用令牌桶限速,本发明都能实现端到端的瓶颈带宽和剩余带宽的准确测量,测量精度和效率高;还可测量令牌桶限速路径的关键参数(包括令牌桶大小、分组队列长度、令牌生成时间间隔等),这些参数能帮助运营商和用户更好地了解和维护网络,应用前景很好。 Thus, regardless of whether the path using token bucket rate limit, the present invention can achieve accurate measurement of the remaining end of the bottleneck bandwidth and the bandwidth, high accuracy and efficiency; it may also measure the token bucket parameters critical speed path (including orders brand bucket size, packet queue length, the token generation time interval, etc.), these parameters can help operators and users to better understand and maintain the network, a good prospect.

Description

一种瓶颈带宽和剩余带宽的测量方法和系统技术领域本发明涉及一种网络测量领域中的主动带宽测量方法和系统,确切地说,涉及一种在令牌桶限速网络路径下瓶颈带宽和剩余带宽的测量方法和系统,属于互联网的带宽测量技术领域。 Method for Measuring bottleneck bandwidth and a remaining bandwidth TECHNICAL FIELD The present invention relates to an active bandwidth measurement method and system for network measurement field and, more particularly, to a token bucket bottleneck bandwidth in the network path and speed remaining bandwidth measurement methods and systems, belonging to Internet bandwidth measuring technology. 背景技术网络中的每条路径通常是由几段不同带宽的物理链路连接而成,因此,一条网络路径的瓶颈带宽是指该路径上带宽最窄的那段链路径的物理带宽,即该^^径在没有其他背景流量时的最大传输能力。 BACKGROUND each path network is usually connected by a physical link paragraphs together different bandwidths, and therefore, a network path bottleneck bandwidth is the physical bandwidth refers to a bandwidth on the path of that part of the chain path narrowest, i.e., the ^^ path maximum transmission capacity in the absence of other background traffic. 现在,端到端的瓶颈带宽测量方法主要基于数据包对(Packet Pair)技术和数据包串(Packet Train)技术。 Now, the end of the bottleneck bandwidth measurement method is mainly based on data packets (Packet Pair) sequence and data packet (Packet Train) technology. 下面对其作简要介绍。 Following its brief introduction. 数据包对是指两个等长的背靠背的测量数据包packet^和packets理想情况下,背靠背的两个分组的发送时间间隔为0,经过在某段链路上的传输,数据包packetw最后一个比特到达该链路末端的时刻和数据包packeti最后一个比特的到达时刻之间就有一个时间间隔。 Data packet refers to a packet measurement packets back to back two equal length packets and ^ Ideally, the transmission time interval of two packets back to back to 0 after the transmission of a link, a last packet packetw bit reaches the end of the link and packet packeti time the last bit of a time interval between the arrival time there. 如果忽略路径上其他背景流量的影响, 那么这两个数据包将在瓶颈链路处(比如第n跳)散布成最大到达间隔《O",其中丄为测量包长, "为瓶颈链路的带宽。 If the effect on the background traffic ignore other path, the two packets (such as the first n-hop) at a bottleneck link in the maximum arrival interval interspersed into "O", which is a measure Shang packet length, "for the bottleneck link bandwidth. 此后两个数据包在传输过程中将保持该间隔,当该组数据包对到达接收端(比如第H跳)时,二者间隔r," =〃/,",此时利用公式:A^Z/r广,即可算得所需求解的瓶颈带宽值。 After holding two packets during the transmission of the interval, when the set of data packets arrive receiving end (such as the first jump H), both the interval r, "= 〃 /", this time using the equation: A ^ Z / wide r, it can be regarded as necessary to solve the bottleneck bandwidth value. 数据包串技术是数据包对技术的发展:它从发送端发送N〉2个背靠背的等长(设包长为L)测量包,接收端利用测得的第一个数据包和最后一个数据包之间的间隔<formula>formula see original document page 8</formula> 来估测路径容量:A<formula>formula see original document page 8</formula>由于背景流量的影响,如果直接使用上述两个公式进行计算,可能会导致计算结果不准确。 Packet is a packet string technique for the development of technology: it is transmitted from the transmitting end N> as long as two back to back (set packet length L) measurement packets, the receiving end using the measured first and last data packet the interval between packets <formula> formula see original document page 8 </ formula> to estimate the channel capacity: a <formula> formula see original document page 8 </ formula> due to the effect of background traffic, if used as the above two formula is calculated, it could lead to inaccurate results. 对此,可以用不同的包长进行多次测量来扩散、减小背景流量的影响,再根据多次测量结果的统计分析来得到比较准确的结果;也可以通过时延等其它参数来识别出受到背景流量影响的包对或包串,从而排除不合理结果。 This may be performed multiple times with different packet length diffusion measurements, reduce the effect of background traffic, and then to obtain more accurate results based on statistical analysis of multiple measurement results; may be identified by other parameters like delay bACKGROUND affected by the flow of packets or packet sequence, thereby eliminating unreasonable results. 此外,更完善的测量方法还要考虑进程调度、千兆网卡的中断聚集(Interrupt colaslate)、操作系统的时钟精度等多方面的影响。 In addition, more sophisticated methods of measurement should also be considered process scheduling, interrupt aggregation of Gigabit Ethernet (Interrupt colaslate), and many other effects such as the operating system clock accuracy. 上述的包对和包串方法进行测量时都是突发性的,这种用突发性的探针包对或包串来测量网络的带宽(包括瓶颈带宽、剩余带宽、链路带宽、以及瓶颈定位)的方法都假定了一个前提:突发的探针包感受的网络状况与实际网络的流量情况相同。 Above are bursty packet of the packet sequence and time measuring method, with which a probe packet to burst or packet string measuring bandwidth of the network (including the bottleneck bandwidth, the remaining bandwidth, link bandwidth, and bottleneck positioning), which assumes a premise methods: the same as the network traffic probe packet bursts conditions feeling of the actual network. 这种假定在大部分网络上都是成立的,因而根据这种原理实现的测量方法(如pathrate[l], pathload[2], pathchirp[3]等)在大部分网络上都能测得比较准确的测量结果。 This assumption on most networks are established, and thus the measurement method (e.g. pathrate [l], pathload [2], pathchirp [3], etc.) This principle can be implemented as measured over the majority of the network comparison accurate measurement results. 但在利用令牌桶原理进行限速(或称作流量整形) 的网络上测出的结果偏差非常大。 However, for the measured results on the network is very large speed deviation (or referred to as traffic shaping) in the token bucket principle. 这是因为令牌桶限速网络不能满足前面的假定,这种链路在令牌耗尽的前后,速率会发生急剧变化;探针包感受到的速率会由于令牌桶中剩余令牌的多少而有明显的不同。 This is because the network can not meet the speed limit of the token bucket foregoing assumes, such a link before and after the token is exhausted, the rate will change drastically; feel the probe packet rate due to the remaining tokens in the token bucket how much are quite different. 下面对令牌桶限速的原理及收发包模型分析做简要的介绍说明。 The following principle and transceiver package model token bucket rate limiting analysis to make a brief introduction to explain. 参见图l,该图展示了令牌桶速率限制算法的一般运行方式:强制实现长期平均传输速率,同时允许预先确定突发尺寸。 Referring to Figure L, which illustrates a general mode of operation of the token bucket rate limiting algorithm: enforce long-term average transmission rate, while allowing the burst size determined in advance. 在这种方法中,令牌桶用来管理队列调节器,由队列调节器负责控制分组流进入网络的速率。 In this method, a token bucket is used to manage the queue controller, the queue controller is responsible for controlling the packet flow rate into the network. 令牌生成器以每秒R个令牌(即每隔AT时间产生ATxR个令牌,其中AT为令牌生成的时间间隔)的速度不断生成令牌,并把它放在深度为D个令牌的令牌桶中。 Token generator (i.e., token generates ATxR time interval AT, where AT is the token generation time interval) to R tokens per second speed continues to generate the token, and put it on a depth order of D card token bucket. 假设每个令牌获准传输固定数量的字节,如果令牌桶装满,新生成的令牌将被丢弃;同时,未调节的分组流会到达,并被放入最大长度为L的分组队列中。 Assuming that each token is allowed to transmit a fixed number of bytes, if the token bucket fills, newly generated token is discarded; the same time, the unregulated flow of packets will arrive, and the maximum length L into the packet queue in. 如果分组提供的分组数超过队列可以存储的数量,超过的分组将被丢弃。 If the packet exceeds the number provided by the packet queue can be stored over a packet will be discarded. 在决定能否把由P尺寸的令牌组成的分组转发到网络中时,队列调节器必须考虑下述多个因素:(A)如果令牌桶是满的,分组被转发到网络中,P令牌从桶中清除。 In determining whether to forward the packet size P to the network consisting of the token, a queue regulator following several factors must be considered: (A) if the token bucket is full, the packet is forwarded to the network, P removed from token bucket. (B) 如杲令牌桶是空的,分组在队列头上等待,直到P令牌被生成,并被放在桶中。 (B) if Gao token bucket is empty, the head packets in the queue waiting until P token is generated and placed in the tub. 当桶逐渐包含P个令牌时,P个令牌将从桶中清除,分组^tt送到网络中。 When the bucket P is gradually contains tokens, tokens from the bucket P is cleared, the packet network to ^ tt. (C) 最后,^i殳令牌桶只是部分装满,含有T个令牌。 (C) Finally, ^ i Shu token bucket is only partially filled, the token containing the T. 如果P《T, P个令牌将从桶中清除,分组^皮转发到网络中。 If P "T, P from the token bucket clear, transdermal ^ forwarding the packet to the network. 如果P〉T,则分组必须等待其余的P 减去T个令牌,然后可以发送到网络中。 If P> T, the packet must wait for the rest of the tokens T P is subtracted, and then may be sent to the network. 当桶中包含所需的P个令牌时,P个令牌将从桶中清除,分组被转发到网络中。 When the bucket contains the required tokens P, P from the token bucket clear, the packet is forwarded to the network. 可以使用令牌桶作为速率限制工具,来调节长期平均传输速率,同时允许预先确定的突发尺寸。 It can be used as a token bucket rate limiting means to adjust the long term average transmission rate, while allowing the burst size determined in advance. 令牌生成器的速率决定着长期平均通信速率,令牌桶的深度决定着整形器(即图中的队列调节器)允许的最大突发尺寸,分组队列的长度决定着分组在这个通信整形器上可以引发的延迟数量。 Token generator determines the long-term average rate of the communication speed, determines the depth of the token bucket shaper (i.e., queue in FIG regulator) The maximum allowable burst size, packet queue length in the packet determines the traffic shaper the number of delay that can be thrown. 根据令牌桶限速算法的原理,通常,当令牌桶满且没有其它背景流量的情况下,一个足够长并具有足够大的平均速率的输入串经过令牌桶时,按令牌桶的状态划分时,有三个阶段:第l阶段一突发速率发送(也称为线速转发)阶段, 此时令牌桶中还有足够发送一个包的令牌;第2阶段一平均速率发送且不丢包阶段,此时令牌桶中令牌不足发送一个包,但分组队列未满;第3阶段一平均速率发送但不断丢包阶段,此时令牌桶中的令牌不足发送一个包,且分组队列已满。 Token bucket algorithm according to the principles of speed, typically, when the token bucket is full and no other background traffic case, a sufficiently long and has a sufficiently large average rate of the input string passes the token bucket, according to the token bucket divided state, has three stages: a first stage l burst transmission rate (also referred to as wire-speed forwarding) stage, when the token bucket has enough tokens to send a packet; transmitting a second stage at an average rate and packet loss stage, when the token bucket is less than a token to send a packet, but the packet's queue; stage 3 but continually transmit a packet loss rate of the average phase, when insufficient tokens in the token bucket transmitting a packet , and the packet queue is full. 在某些特殊情况下,第2阶段可能会不出现。 In some special cases, the second stage may not occur. 根据不同速率划分时,有两个阶段: 先是突发速率阶段,然后一直是平均速率阶段。 When divided according to different rates, there are two phases: First phase burst rate, then it has been the average rate stage. 这种令牌桶的状态划分构成了本发明瓶颈带宽测量方法的基础。 This token bucket status partitions constitute the basis of the method of the present invention, the bottleneck bandwidth measurement. 参见图2所示的在华为二层交换机上的实验系统的结构示意图,分别介绍该实验的实测结果在四种不同坐标系中的曲线图(参见图3、图4、图5和图6)。 A schematic structural diagram of the experimental system Huawei switcher shown in FIG 2 Referring to respectively introduce a graph of measured results of the experiment in four different coordinate system (see FIGS. 3, 4, 5, and 6) . 其中X坐标是发送序号或接收序号,Y坐标是相对于前一个包或相对于第一个包的接收时间差(单位为秒)。 Wherein the X coordinate is transmitted or received serial number, Y coordinates with respect to the reception time of the previous packet or a packet with respect to the first difference (in seconds). 该交换机采用令牌桶的限速算法,端口速率为100M,与接收端相连的端口限速为4M。 The switch speed algorithm uses a token bucket, port speed is 100M, and the reception side connected to the line rate is 4M. 发送端和接收端的网卡都是100M。 Card sending and receiving ends are 100M. 测试时,发送端背靠背发送3000个1000字节的UDP探针包串,发送序号编号为0-2999。 Test, UDP probe packets sent back to back end 3000 transmits 1000 bytes string, and transmits serial number 0-2999. 接收时根据收到的包的顺序,在丢弃乱序包后,从0开始进行接收序号的顺序编号,并记下每个包的接收时间。 The order of the packet received out of order after discarding the packet, numbered sequentially starting from 0 the receive sequence number is received, and note the time of reception of each packet. 实测中只收到了822个包,故接收序号的编号为0~821。 Found 822 only received packets, the reception of the serial numbers from 0 to 821. 图3的X坐标是发送序号,Y坐标是相对千前一个收到的包的接收时间差, 即接收包的间隔。 FIG 3 is the X coordinate send sequence number, Y coordinates relative to one thousand times before receiving a difference between the received packet, i.e. packet reception interval. 从该图可以看出,测量结果明显分为按令牌桶的状态划分的三个阶段:从0到520的包为第1阶段,此时令牌桶中还有足够的令牌,探针包以端口的最大速率通过。 As can be seen from this figure, the measurement results clearly divided into three stages according to the state of the token bucket divided: 0-520 from the package to the first stage, when the token bucket there are enough tokens, the probe packet at a maximum rate ports. 包长为1000字节,速率为100M,可以算出包间隔为80微秒,考虑到UDP头(8字节)、IP头(20字节)或以太网顿头(28字节)的影响,实际包间隔应该为85微秒左右,即0.000085秒。 1000 byte packet length, rate of 100M, can calculate the packet interval is 80 microseconds, is the UDP header (8 bytes), IP impact head (20 bytes) or Ethernet Dayton head (28 bytes), The actual packet interval must be about 85 microseconds, i.e. 0.000085 seconds. 与图中的实测结果非常吻合。 And the measured results of the figure is very consistent. 从521到746的包是第2阶段,此时令牌桶中令牌不足发送一个包,但分组队列未满,因而以平均速率发送而不丢包。 From 521 to 746 packet is a second stage, when the token bucket is less than a token packet transmission, but the packet's queue, thereby not transmitting at an average rate of loss. 如同第1阶段,根据平均速率4M可以算出包间隔为2000微秒,考虑到包头的影响,实际包间隔应该是2112拔i秒,即0.002112秒;也与图中的实测结果非常吻合。 As the first stage, can be calculated according to the average rate of 4M packet interval 2000 microseconds, consideration of the influence of the header, the actual packet interval should be 2112 seconds pull i, i.e. 0.002112 seconds; also good agreement with the measured results of FIG. 747以后的包是第3阶段,此时令牌桶中令牌不足发送一个包,且分组队列已满,因而以平均速率通过,但不断丢包。 After packet 747 is a third phase, when the token bucket is less than a token to send a packet, and the packet queue is full, and thus through at an average rate, but continuously lost packets. 包间隔与第2阶段相同。 Packet interval same as the second stage. 图4的X坐标是发送序号,Y坐标是相对于第一个包的时间差,其它情况与图3相同。 X 4 is a graph showing the transmission sequence number, Y coordinates are relative to the time difference between the first packet, otherwise the same as in FIG. 3. 由于相邻两个包之间的时间差比较容易受一些偶然因素的影响, 而相对于第一个包的时间差比较稳定,因此,实际测量中计算测量结果时采用了图4的方式。 Due to the time difference between two adjacent packages easier influenced by some accidental factors, with respect to time of the first packet of the difference is relatively stable, and therefore, the actual measurement result of the measurement is calculated using the embodiment of FIG. 图5和图6都是以接收序号为X坐标。 Figures 5 and 6 are to receive the serial number of the X coordinate. 从这两个图可以看出,测量结果明显分为速率不同的两个阶段:突发速率阶段和平均速率阶段,其中包521是分界点-即本发明所谓的跳变点。 As can be seen from these two figures, the measurement result significantly different rates in two stages: Stage burst rate and the average rate stage, wherein the packet dividing point 521 - i.e., according to the present invention is a so-called trip point. 其变化规律与图3、图4相类似,不再赘述。 Which variation in FIG. 3, FIG. 4 is similar omitted. 现有技术中,主动的端到端剩余带宽的测量方法也是采用包对或包串技术及其改进方法实现的。 In the prior art, the active end measurement method also uses residual bandwidth for packet or packet sequence, and an improved technique implemented method. 发送端发送一定速率的包对或包串,接收端根据包间隔的变化来判断路径的剩余带宽。 The sender sends the packet to a rate or a packet sequence, the receiving end determines the remaining bandwidth path according to a change in packet interval. 常用的剩余带宽测量方法(如pathchirp和pathload)都会预先估计或确定一个剩余带宽测量范围,然后在这个范围内测量网络路径的剩余带宽。 Remaining bandwidth measurement method used (e.g. pathchirp and pathload) are determined or estimated in advance a measurement residual bandwidth range, and then measuring the remaining bandwidth of the network path in this range. 对于令牌桶限速的网络路径,如果能事先把令牌桶的限速范围确定下来,并将其作为剩余带宽的最大上限,则会大大减少测量时间,收敛速度更快,提高测量结果的精确度和测量效率。 For the network path of the token bucket speed, if the speed limit in advance and the token bucket is determined, and the remaining bandwidth as a maximum limit, which will greatly reduce the measurement time, faster convergence and improve the measurement results measurement accuracy and efficiency. 端到端的瓶颈带宽测量具有非常重要的应用,比如网络多服务器的选择、 在对等网络中支持服务质量QoS if各由的建立、虛拟专用网VPN用户以及其它用户对所租用网络带宽的自主监测、网络运营维护和瓶颈故障检测、基于速率的拥塞控制、基于策略的接纳控制以及无线网络中移动切换性能优化等等。 End bottleneck bandwidth measurement has very important applications, such as multi-server network options, support the establishment of the quality of service QoS if each of the peer to peer network, virtual private network VPN users and other users of independent monitoring of the network bandwidth leased , operation and maintenance and network bottlenecks fault detection, based on the rate of congestion control, admission control and policy-based wireless network optimization, etc. mobile handover performance. 但是,采用现有技术在令牌桶限速链路(路径)上进行的测量,无法得到准确结果。 However, with the prior art measurement is performed on the token bucket speed link (path), you can not give accurate results. 而这种链路在接入网中被广泛使用。 And this link is widely used in the access network. 这就导致现有的端到端瓶颈带宽测量技术很难应用于接入网的测量,已经成为接入网测量的一大难题。 This leads to the end of existing bottleneck bandwidth measurement techniques used to measure difficult access network has become a major problem in the access network measurements. 发明内容有鉴于此,本发明的目的是提供一种在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法和系统,本发明不论路径是否采用令牌桶限速,都能实现端到端的瓶颈带宽和剩余带宽的准确测量;还可测量出令牌桶限速^各径的一些关键参数(包括令牌桶的大小、分组队列的长度、令牌生成的时间间隔等)。 SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a bottleneck bandwidth and a remaining bandwidth measurement method and system in a token bucket rate limiting the network path, the path irrespective of whether to use the present invention, the token bucket speed, can be realized end of the bottleneck bandwidth and accurate measurement of residual bandwidth; token bucket may be measured speed ^ critical parameters of each path (including the token bucket size, the length of the packet queue, the token generation time interval, etc.). 这些参数能帮助运营商和用户更好地了解和维护网络。 These parameters can help operators and users to better understand and maintain the network. 本发明的另一目的是提供一种判断某条路径是否为令牌桶限速路径(即以令牌桶限速链路为瓶颈的路径)的方法,以便将该方法与剩余带宽的传统测量方法(如pathchirp, pathload)相结合,使得现有传统的剩余带宽测量方法也适合于令牌桶限速路径。 Another object of the present invention is to provide a path for judging whether a token bucket rate limiting path (i.e., token bucket rate-limiting in the bottleneck link path) method to the conventional measuring methods and residual bandwidth the method (e.g. pathchirp, pathload) combined, so that the remaining bandwidth of the existing traditional method is also suitable for measuring the speed path of the token bucket. 也就是说,在瓶颈带宽的测量过程中,要首先判断是否为令牌桶限速路径,以便将该判断结果与其它测量方法(如剩余带宽测量方法,链路带宽测量方法)结合起来,使得上述这些传统测量方法在发现路径是令牌桶限速路径后,进行一些特殊处理(例如,给用户一个提示或给出一个粗略结果),以提高测量的精度和效率。 That is, the bottleneck bandwidth of the measurement process, to first determine whether the token bucket speed path, so that the determination result in conjunction with other methods of measurement (e.g., Bandwidth Measurement remaining link bandwidth measurement methods) together, such that these conventional measurement methods is that the path of the token bucket speed path, some special treatment (e.g., the user is given a prompt or a rough results), to improve the accuracy and efficiency of measurements. 为了达到上述目的,本发明提供了一种在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:测试路径建立后,发送端发送足够多的探针包,用于耗光令牌桶中的令牌,接收端根据令牌耗光前后速率或时延的显著变化来识别刚好或接近于耗光令牌的传输速率或时延的跳变点,并根据跳变点的存在与否判断是否为令牌桶限速路径,再计算相关路径的瓶颈带宽和剩余带宽;包括下述操作步骤:(1) 发送端与接收端建立连接,进行数据交互,探测和判断测试路径是否为令牌桶限速的网络路径,如果测试路径是令牌桶限速路径,顺序执行后续步骤;否则,跳转执行步骤(5);(2) 计算该测试路径的令牌桶参数,确定传输速率或时延的跳变点;(3 )根据跳变点之后的测量数据计算得出令牌桶限速路径的平均速率,即令牌桶限速路径的的瓶颈带宽 To achieve the above object, the present invention provides a method for measuring the bottleneck bandwidth and the remaining bandwidth in the token bucket rate limiting the network path, wherein: the test path is established, the sender sends enough probe packets, with to run out of tokens in the token bucket, the receiving end to identify exactly or approximately the same throughput delay trip point or token according to deplete significantly the rate of change before and after the run out of tokens or delay, according to the hop and (1) establishing the transmitting side and the receiving terminal is connected, to exchange data, and detection: comprising the following steps; the presence or absence of the change point is determined whether the token bucket path speed, and then calculate the residual bandwidth bottleneck bandwidth relative path determining whether the network path test path token bucket rate-limiting, if the token bucket test path is the path speed, subsequent steps sequentially performed; otherwise, skip to step (5); (2) calculates the token test path bucket parameters, the transmission rate determining transition point or delay; (3) the token bucket rate gives an average speed path measurement data after the transition point calculated, i.e., the token bucket rate limiting bottleneck bandwidth of the path (4)将令牌桶限速路径的瓶颈带宽作为剩余带宽测量算法中的最大带宽上限值,再运用包括pathchirp或pathload的传统剩余带宽测量方法计算得出令牌桶限速路径的剩余带宽;测量结束;(5 )采用包括pathchirp或pathload的传统剩余带宽测量方法分别测量和计算该路径的瓶颈带宽和剩余带宽。 (4) The path bottleneck bandwidth token bucket speed upper limit as the remaining bandwidth of the maximum bandwidth measurement algorithm, then use the remaining bandwidth of a conventional measuring method comprising the remaining bandwidth pathload pathchirp or token bucket speed is calculated path ; end of the measurement; (5) using a conventional method comprising measuring the residual bandwidth or pathchirp pathload are measured and calculated, and the residual bandwidth bottleneck bandwidth of the path. 所述步骤(1 )进一步包括下述操作内容:(11 )发送端和接收端建立控制连接和数据连接:如果采用TCP的控制连接,就是双方建立一条TCP连接;所述数据连接包括用户数据报协议UDP的连接;(12) 发送端和接收端交换初始参数:发送端把用户输入或默认的初始参数发送给接收端,初始参数的帧结构至少包括串长、包长、总串数;接收端也把至少包括接收探针包的端口号的初始参数返回给发送端;(13) 发送端向接收端发送测量数据包序列:发送端以背靠背或等间隔的方式向接收端逐个发送测量数据包序列,其中每个分组数据包又称探针包,即发送探针包串;该探针包串的帧结构至少包括下述字节:串号、包号、时间戳秒、时间戳微秒、用于补足包长而随机生成的负栽;(14) 发送端将探针包串发送完后,发送一个串结束控制信号给接收端; 接收端收到该串结 Said step (1) further comprises operation content: establishing a data connection and a control connection (11) sending and receiving ends: If control of the TCP connection, a TCP connection is established both; the data connection comprises a User Datagram connection protocol of UDP; (12) sending and receiving ends exchanged initial parameters: the transmitting end transmits the user input or default initial parameters to the receive side, the frame structure of initial parameters comprising at least a string length, packet length, the total number of strings; receiving also includes at least the end of the initial parameters of the received port number of the probe packet back to the transmitting end; (13) measuring the sender sends the data packet sequence to the receiving end: the measurement data sending end to the receiving end or back to back individually equal intervals sequence of packets, wherein each packet also known as packet probe packet, i.e. packet transmission sequence probe; the probe packet string frame structure includes at least the following bytes: serial number, packet number, time stamp seconds, the micro-stamp second, the packet length used to complement randomly generated negative plant; (14) the transmission side probe packet sequence is sent, sends a control signal to the end of the string receiving terminal; receiving end receives the serial junction 控制信号后,由分析装置对刚收到的该串进行分析处理, 得出初步结果,判断是否为令牌桶限速路径;如果确定为令牌桶限速路径,结—束该操作步骤;如果不能确定令牌桶限速路径,执行后续操作;(15)接收端重新设定至少包括串长、包长、等待时间的初始参数,再加上串开始信号一起发送给发送端,发送端收到该串开始信号后,等待令牌桶恢复的相应时间后,将重复执行步骤(13)和(14),直到串数达到总串数时,接收端计算出测量结果后,向发送端发送一个测量结束控制信号后,结束操作; 发送端接收到该测量结束控制信号后,结束操作。 After the control signal, by means of analyzing the sequence analysis just received, preliminary results obtained, it is determined whether the token bucket path speed; determining if the token bucket path speed, knot - This procedure beam; If the token bucket speed is not determined path, subsequent operations; (15) including at least a receiving terminal reset string length, packet length, the initial waiting time parameter, coupled with a string start signal to the transmitting side, the transmitting end after the string after receiving the start signal, waiting a respective time recovery token bucket, to repeat steps (13) and (14), until the number reaches the total number of sequence strings, the receiving side calculates the measurement results to the sender after sending a measurement control signal ends, the operation ends; sender receives the end of the measurement control signals, the operation ends. 所述串长是一个测量数据包序列中数据包的个数,其数值>30;包长是每个数据包的字节数,其数值>20;总串数是整个测量过程中设定发送的测量数据包序列的个数,即探针包串的最大数;所述串结束信号的帧结构至少包括类型和串号,串开始信号的帧结构至少包括下述字段:类型、串长、包长、串号、等待时间;其中串开始信号的帧结构类型字段用整数表示:l为串开始、2为串结束、3为测量结束;当类型字段为3时,后面的字段没有意义。 The string length is a packet sequence number of data packets measured, its value> 30; packet length is the number of bytes of each data packet has a value> 20; the total number of strings is transmitted throughout the measurement set measuring packet sequence number, i.e. the maximum number of the probe packet string; the string end signal frame structure comprises at least a frame structure type and serial number, a string start signal includes at least the following fields: type, string length, packet size, serial number, waiting time; wherein the frame type field string start signal is represented by an integer: l is the string begins 2 to end the string 3 to the end of the measurement; when the type field is 3, the back of the field has no meaning. 所述步骤(1 )发送端与接收端的数据交互是由两端的相关装置互相配合、 共同完成的,其中发送端^l行的梯:作步骤如下所述: (101 )获取输入参数,建立控制连接;(102) 向接收端发送初始参数,并接收来自接收端的初始参数,建立数据连接;(103) 逐个发送探针包串后,间隔一段时间,发送串结束控制信号;再等待接收端的返回控制信号;(104) 如果收到的接收端返回控制信号是串开始信号,则返回步骤(103 ); 如果收到的接收端返回控制信号是测量结束信号,则结束操作。 Said step (1) transmits data exchange and the receiver means are associated with the ends of each other, have completed, wherein the transmitting end of the line l ^ ladder: Procedures as follows: (101) obtain input parameters, establish control connection; (102) transmits to the receiving end the initial parameters and receives the initial parameters from the receiving end, establishing a data connection; (103) one by one after sending the probe packet sequence, time to time between the transmit cluster end control signal; wait for the receiving end to return control signal; (104) if the receiving terminal returns the received control signal is a sequence start signal returns to step (103); If the receiving terminal returns the received control signal is a measurement end signal, the operation is ended. 所述步骤(1)发送端与接收端的数据交互是由两端的相关装置互相配合、 共同完成的,其中接收端用于配合发送端完成令牌桶探测过程,其执行的操作步骤如下所述:(111) 获取输入参数,建立控制连接;(112) 接收来自发送端的初始参数,并向发送端发送接收端的初始参数, 建立数据连接;(113) 等待发送端的数据,如果收到的是探针包,先根据串号和包号,判断是否为合法包,以便丢弃乱序包和因网络延迟时间过长而滞后收到的属于上一个包串的非法包,并丢弃报文的QoS字段不符合要求的包;如杲判断为合法包,顺序执行后续操作;如果收到的不是探针包,而是串结束控制信号时,表明已经接收了一个探针包串,跳转执行步骤(115);(114) 记录下述测量参数:至少包括串号、作为发送序号的包号、发送时间、接收时间rcvTime、接收序号;而后返回执行步 Said step (1) transmits data exchange and the receiver means are associated with the ends of each other, have completed, wherein the transmitting end a receiving end for mating completion token bucket detection process, the steps which are performed as follows: (111) obtain input parameters, control connection is established; (112) receives the initial parameters from the sender, and the sending end an initial parameter receiving end, establishing a data connection; (113) waits for the data transmitting side, if the received the probe package, in accordance with the first serial number and packet number, determines whether the packet is valid, in order to discard the packet out of order because of network packet delay and illegal lag time is too long to receive a packet belonging to the string, and discards packets without QoS field compliant packet; Gao is determined as a legitimate packet, the subsequent sequence of operations performed; if the received packet is not the probe, but when the end of the string a control signal indicating that a probe has been received packet sequence, skip to step (115 ); (114) record the following measured parameters: at least comprises a serial number, a packet number as the transmission number, the transmission time and reception time to RCVTIME, receive sequence number; then returns to perform step 骤(113 ),继续准备记录后续的串分组数据;(115) 对该探针包串进行分析处理,记录检测结果和调整参数,并判断该测试路径是否为令牌桶限速路径:即判断测量序列中是否存在跳变点;如果判断测试路径是令牌桶限速路径,则结束探测过程;否则,执行步骤(116);(U6)判断探针包串长是否超过设定的最大串长值,如果没有超过设定的最大串长值,则将探针包串的长度加20或设定的正整数,并将该新的串长参数反馈给发送端,让发送端重新开始测试发送,接收端返回执行步骤(113);如果超过设定的最大串长值,仍然没有找到跳变点,则判断该测试路径为非令牌桶限速路径,结束探测过程。 Step (113), continue to be recorded subsequent packet data string; (115) to the probe packet sequence analysis and processing, and records the detection result of the adjustment parameter, and determining whether the test path speed token bucket path: determining i.e. maximum string (U6) determining whether a probe packet string length exceeds the set; measuring point if there hopping sequence; if the token bucket is determined test speed path is the path, the detection process is terminated; otherwise, proceed to step (116) length value, if the maximum run length is not more than the set value, then the positive integer plus the length packet sequence 20 or a probe set, and the new string length parameter back to the transmitting side, the transmitting side so that the test starts again sending, receiving terminal returns to step (113); if the maximum run length exceeds the set value, the trip point is still not found, the test path is determined non-token bucket speed path detection process ends. 所述步骤(115 )中判断路径是否为令牌桶限速路径的依据是判断时延或速率的测量序列中是否存在跳变点,跳变点的接收序号j的判断基准是同时满足以下三个条件,其中i为探针包的接收序号,其取值范围是[O,串长最大值]:A、 为避免偶然因素的影响,该跳变点要满足公式:p<j<Nlp;其中, 边界门限p是自然数,p值不能超过令牌桶本身大小,否则会导致把令牌桶限速路径判定为非令牌桶限速路径;N是是接收到的包的个数,Nl是接收到的最后一个包的接收序号;B、 该跳变点前后的採:针包的平均时延timeDiff或速率的差别达到最大: 序号为i的探针包的前后平均时延timeDiff的计算公式如下:timeDi即]=(rcvTime[Nl] - rcvTime[i])/(N-1-i) - (rcvTime[i] - rcvTime[0])/(i-0), 其中,rcvTime为接收时间,rcvTime[i]为第i个分组的接收时间;求解跳变点的接收序号j的计算公式如下:j = max{ timeD Said step (115) determines whether the token bucket path speed based on whether there is a path hopping sequence determines the measurement point in the delay or rate, number j received hopping determination reference point is simultaneously satisfy the following three condition, where i is the receive sequence number of the probe packet, which is in the range [O, maximum string length]: a, in order to avoid the influence of accidental factors, to the transition point satisfies the equation: p <j <Nlp; wherein the boundary threshold p is a natural number, the value of p can not exceed the size of the token bucket itself, otherwise it will lead to a non-token bucket path determination token bucket rate limiting speed path; N is the number of a received packet, Nl receive sequence number is the last received packet; B, taken before and after the transition point: timeDiff average delay difference or rate of packets reaches the maximum needle: calculating an average number of probe before and after the delay timeDiff packet i, formula is as follows: timeDi i.e.] = (rcvTime [Nl] - rcvTime [i]) / (N-1-i) - (rcvTime [i] - rcvTime [0]) / (i-0), wherein, rcvTime to receive time, rcvTime [i] is the i-th reception time of packets; formula solving trip point number j received as follows: j = max {timeD iff[i] |对于任意i, p < i < Nlp };C、跳变点的接收序号j前后的时延差异比例要大于差异因子X, A>1,以防止误判:在实际的令牌桶限速路径中,突发速率和平均速率往往相差^f艮大(如把物理带宽100M限速为10M或2M),故其相应的时延也往往差异很大,如果相差太小,则很可能是非令牌桶限速路径;在测量中,差异因子X是预设的大于1的数值,即跳变点的接收序号j要满足下述等式: (rcvTime[Nl] - rcvTime[j]) / (N陽lj) > X x ((rcvTime[j] - rcvTime[O]) / (j-0))。 iff [i] | For any i, p <i <Nlp}; delay difference before and after receiving a number C, trip point j is greater than the ratio difference factor X, A> 1, in order to prevent false: The actual order in token bucket speed path, burst rate, and average rate is often a difference ^ f Gen large (e.g., speed limit of the physical bandwidth of 10M or 100M 2M), so the corresponding delays are often very different, if the difference is too small, it is likely that a non-token bucket speed path; in the measurement, the difference factor X is greater than a predetermined value, i.e., the received transition point number j to satisfy the following equation: (rcvTime [Nl] - rcvTime [ j]) / (N male lj)> X x ((rcvTime [j] - rcvTime [O]) / (j-0)). 所述步骤(2)进一步包括下迷操作内容:(21 )用跳变点之前的测量数据计算令牌桶限速路径的突发速率maxRate, 也就是突发阶段的发送速率,即突发带宽;计算公式如下:maxRate = jx 1000 x 8 / ( rcvTime[j] - rcvTime[O]);式中,j是^兆变点的接收序号,rcvTime为接收时间,rcvTime[O]是接收序号为0的包,即第一个包的接收时间,rcvTime田是发生跳变点的接收时间;(22)用跳变点之后的测量数据计算令牌桶限速路径的平均速率avgRate, 也就是长期平均得到的发送速率,即平均带宽或瓶颈带宽;计算公式如下:avgRate = (N-1 -j) x 1000 x 8 / ( rcvTime[N-1 ] - rcvTime[j]);式中,N是接收到的包的个数,N-1是接收到的最后一个包的接收序号,rcvTime[N-1 ]是"t妾收最后一个包的接收时间;(23 )按照下述公式计算令牌桶的大小D: D = jx 1000 - avgRate x ( rcvTime[j] - rcvThne[O] ) / 8; (24)按照下述公式计算分组队列 Said step (2) further includes a lower fan operation content: (21) maxRate token bucket rate with burst speed measurement data before calculating the path transition point, i.e. transmission rate burst phase, i.e., burst bandwidth ; calculated as follows: maxRate = jx 1000 x 8 / (rcvTime [j] - rcvTime [O]); wherein, j is ^ receive sequence number mega transformation point, rcvTime receive time, rcvTime [O] is the receive sequence number is packet 0, i.e., the reception time of the first packet, a reception time field to RCVTIME of hops point; (22) calculating the average data rate of the token bucket speed measurement path after the transition point avgRate, i.e. the long-term averaged transmission rate, i.e., average bandwidth or bottleneck bandwidth; calculated as follows: avgRate = (N-1 -j) x 1000 x 8 / (rcvTime [N-1] - rcvTime [j]); the formula, N is the number of received packets, N-1 is the receive sequence number received last packet, rcvTime [N-1] is "t concubine receiving time of the last received packet; (23) according to the following formula token bucket size D: D = jx 1000 - avgRate x (rcvTime [j] - rcvThne [O]) / 8; (24) packet queue is calculated according to the formula 长度L:L = ( Q — j) x 1000 — avgRate x (rcvTime[Q] - rcvTime[j]) / 8'其中'Q为第一个丢包开始的前一个点的接收序号,也就是在Q点及Q点之前一直没有丢包, 之后发生了丟包,即Q为最后一个接收序号和发送序号相同的包; (25 )按照下述公式计算每个令牌的生成时间间隔AT:AT - (rcvTime[R] - rcvTime[Q]) / P,其中,R为最后一次丢包之前的第一个接收到的包的序号,P为连续丢包的次数;1/AT表示令牌桶的令牌生成速率,也就是令牌桶限速的平均带宽。实际测量瓶颈带宽或其它参数时,接收端选取多个探针包串分别计算其相关的令牌桶参数,这些探针包串要符合下述条件:将所有包串中的第一个被丢弃分组的接收序号进行排名,接收端选取其中接收序号排名最大的前5%~15 %的多个探针包串(此时令牌桶被消耗完了;由于网络存在背景流量,除了测量分组外,背景流量也会消耗 Length L: L = (Q - j) x 1000 - avgRate x (rcvTime [Q] - rcvTime [j]) / 8 'where' Q is the first point of a packet loss before the start of the reception sequence number, that is, prior to the point Q and point Q has no packet loss, packet loss occurs after, i.e., Q is a last received sequence number and transmits the same packet sequence number; (25) is calculated according to the following equation for each token generation time interval AT: AT - (rcvTime [R] - rcvTime [Q]) / P, where R is the first number before the last received packet loss, P is the number of consecutive packet loss; 1 / AT represents the token bucket when a token generation rate, i.e. the average bandwidth token bucket rate limiting actual bottleneck bandwidth measurement or other parameters, select a plurality of terminal receiving probe packets strings are calculated token bucket related parameters, such probes packet string to meet the following conditions: first of all the packets are discarded string received packet sequence number rank, wherein the receiving end to select a plurality of probe packets received sequence number rank 5% to 15% before the maximum (in this case order brand is consumed over the tub; the presence of background traffic network, in addition to measurement packet, the background traffic will consume 令牌桶的令牌,因此测量串丢弃的分组序号大, 表示背景流量的干扰小)分别计算其相关的令牌桶的参数;再求其算术平均值作为最后结果,以消除背景流量和偶然因素的影响。所述步骤(3)中,令牌桶限速路径瓶颈带宽的测量结果是所述步骤(22) 的平均速率avgRate计算结果值。 Token bucket token, thus measuring a large number string dropped packets, showing small interfering background traffic) token bucket related parameters which were calculated; then seek the arithmetic average as the final result, in order to eliminate background traffic and incidental average rate factors. the step (3), the measurement result of the token bucket path bottleneck bandwidth is the rate-limiting step (22) avgRate value calculation result. 所述步骤(4)中,计算令牌桶限速路径的剩余带宽是将令牌桶的限速值或瓶颈带宽作为剩余带宽测量算法中的最大带宽上界值,再运行包括pathchirp或pathload的传统剩余带宽的测量方法,获得剩余带宽测量结果。 Said step (4), the remaining band calculation speed path of the token bucket value is a rate-limiting or bottleneck bandwidth token bucket as the cutoff remaining bandwidth measurement algorithms maximum bandwidth, then the operation including pathchirp or pathload traditional methods of measurement residual bandwidth, the remaining bandwidth measurement result is obtained. 为了达到上述目的,本发明还提供了一种用于在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法的测量系统,其特征在于:该系统由位于发送端的发送探针包的发送装置和位于接收端的接收探针包的接收装置以及对测量数据进行计算处理的分析装置所组成,所述发送装置与接收装置之间采用用户数据报协议UDP实现数据连接。 To achieve the above object, the present invention further provides a measuring system and a remaining bandwidth bottleneck bandwidth measurement method for token bucket rate limiting in the network path, characterized by: transmitting the probe packet is sent by the end system is located in the transmitting means and receiving means for receiving probe packets on the receiving end, and means for analyzing measurement data is composed of calculation processing, transmission using the user datagram protocol UDP between the means and receiving means for data connection. 所述发送端和接收端分别设有用于相互传送控制信号的发送端控制装置和接收端控制装置,该两个控制装置分别与发送装置与接收装置组成为同一实体, 两个控制装置之间采用传输控制协议TCP实现数据连接,并保证控制信号的可靠传输。 The sending end and the receiving end are provided for each end of the transmission control signal transmitting device and a receiving end controlling the control means, the control means are two transmitting and receiving devices composed of the same entity, using control means between two transmission control protocol TCP connection for data, and to ensure reliable transmission of control signals. 本发明的测量方法具有如下优点:本发明解决了现有的瓶颈带宽测量算法不能在令牌桶限速路径上准确测量的问题,该方法既能用于普通路径的测量,也能用于令牌桶限速路径的测量。 The measuring method of the present invention has the following advantages: The present invention solves the problems of the prior bottleneck bandwidth measurement algorithm can not accurately measure the speed in the path of the token bucket, the method for measuring both normal path, can also be used to make speed measurement card barrel path. 本发明可用于令牌桶限速路径的判断方法,并与其它传统的测量方法(包'括剩余带宽、链路带宽、或其它瓶颈带宽测量方法)相互结合,在一定程度上解决了令牌桶限速路径上的带宽测量问题。 The method of the present invention can be used in determining the path of the token bucket rate-limiting, in combination with each other and with other conventional measuring methods (for 'including residual bandwidth, link bandwidth, or other bottleneck bandwidth measurement methods), the token is solved to a certain extent bandwidth measurement speed path problems on the barrel. 特别是与剩余带宽测量方法(至少包括pathchirp、 pathload)结合来解决令牌桶限速路径下的剩余带宽测量问题。 In particular the remaining bandwidth measurement method (including at least pathchirp, pathload) measuring binding to solve the problem of the remaining bandwidth token bucket speed path. 本发明还可以同时测算出令牌桶算法的一些关键参数,例如令牌桶的大小、 分组队列的长度、产生令牌的时间间隔。 The present invention may also simultaneously measure the critical parameters of the token bucket algorithm, such as the size of the token bucket, the length of the packet queue, the token generation time interval. 总之,本发明具有很好的应用前景。 In summary, the present invention has a good prospect. 本发明的一种最简单的应用是用户对所租用网络带宽的自主监测。 One inventive simplest application is the monitoring of user customize the network bandwidth leased. 比如A 用户向电信运营商租用了1M的ADSL,或者B网吧向电信运营商租用了20M 的专线。 A user such as telecom operators to lease the ADSL 1M or 20M Line B Internet leased to telecom operators. A用户或B网吧很想确知运营商到底是不是真的给了那么多带宽,A 或B当然不太可能登陆到运营商的交换机上去查看,此时就需要用端到端瓶颈测量工具去主动测量一下,以确定所提供的带宽资源。 A or B Internet users would like to ascertain operator in the end is not really so much to the bandwidth, A or B, of course, is unlikely to log in to the operator's switch up the view, then you need to go end to end with a bottleneck measurement tools measure the initiative to determine the bandwidth provided. 同时,本发明能够测量令牌桶限速链路(路径)的一些关键参数(包括令牌桶的大小、分组队列的长度、令牌生成的时间间隔等),这些参数能帮助运营商和用户更好地了解和维护网络。 Meanwhile, the present invention is capable of measuring critical parameters token bucket speed link (path) (including the token bucket size, the length of the packet queue, the token generation time interval, etc.), these parameters can help operators and users to better understand and maintain the network. 另夕卜,当前B网吧租用的20M专线很可能是交换机采用令牌桶算法限制而提供的,其实际的物理端口和网线都是IOOM。 Another evening Bu, currently leased 20M Dedicated Internet B is likely to switch to limit the use of the token bucket algorithm provided, the actual physical ports and cables are IOOM. 此时用现有的测量工具(如pathrate,参考文章:"分组散布分析技术和路径容量估测"《Packet Dispersion Techniques and Capacity Estimation》刊于In Proc IEEE INFOCOM 2001.)进行测试,很有可能发现结果居然是100M,这与用户所期望的测量结果相差甚大。 At this time, with the existing measurement tools (e.g. pathrate, refer to the article: "Packet analysis and spreading the channel capacity estimation" "Packet Dispersion Techniques and Capacity Estimation", published in In Proc IEEE INFOCOM 2001.) tested, it is likely to find the results actually 100M, which is desired by the user of the measurement results vary considerably. 如果使用本发明方法就能对这种路径进行准确测量。 If the method of the present invention is able to accurately measure this path. 附图说明图1是目前使用的令牌桶限速算法的工作原理示意图。 BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic view of the working principle of the token bucket rate limiting algorithm currently in use. 图2是本发明在交换机上进行瓶颈带宽测试的实验系统结构组成示意图。 FIG 2 is a system configuration of the present invention experimental bottleneck bandwidth test composition on the switch schematic. 图3 ~图6分别是图2实验系统进行测量得到的测试数据的四个分析图表。 3 to 6 are experimental system in FIG. 2 for the test data measured four analysis charts. 图7是本发明在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量系统结果组成示意图。 FIG 7 is a result of the measurement system of the present invention bottleneck bandwidth and the remaining bandwidth of the network path of the token bucket rate-limiting schematic composition. 图8是本发明在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法总体流程方框图。 FIG 8 is a block diagram showing the overall flow of the measuring method of the present invention, the bottleneck bandwidth and the remaining bandwidth in the token bucket rate limiting the network path. 图9是本发明测试过程中的数据交互示意图。 9 is a schematic diagram of data interaction during the test of the present invention. 图IO是本发明中发送端操作步骤流程方框图。 FIG IO is a flow chart showing the steps of the present invention in the transmitting end. 图11 (A) 、 (B) 、 (C) 、 (D) 、 (E)分別是本发明中发送端的初始参数、接收端的初始参数、探针包、串结束信号和串开始信号的各个帧结构的示意图。 FIG 11 (A), (B), (C), (D), (E) are the initial parameters of the invention in the transmitting end, each frame of the initial parameters of the receiving side, the probe packet, the string end signal and a sequence start signal schematic structure. 图12是本发明中接收端操作步骤流程方框图。 FIG 12 is a flow chart showing the steps of the present invention in the receiving end. 具体实施方式为使本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明作进一步的详细描述。 DETAILED DESCRIPTION To make the objectives, technical solutions, and advantages of the present invention will become apparent in conjunction with the accompanying drawings of the present invention will be further described in detail. 参见图7,本发明是在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测賢系统,该系统由位于发送端的发送探针包的发送装置和位于接收端的接收探针包的接收装置以及对相关测量数据进行处理的分析装置组成,该发送端与接收端的连接采用UDP协议的数据连接。 Referring to Figure 7, the present invention is the bottleneck bandwidth and the remaining bandwidth of the measurement system in the token bucket Yin speed network path, the system is located in the probe packet received by the receiving end of the transmission means transmits the probe packet and the transmit and receiving apparatus and associated measurement data analysis means for processing, which connects the transmitter and the receiver of a data connection UDP protocol. 其中,发送装置、接收装置、分析装置为实线框,表示这三个装置为基本装置,不可或缺。 Wherein the transmitting means, receiving means, analyzing means is a solid-line box to indicate that this device is a three basic means indispensable. 两个控制装置为虚线框, 表示在简单的实现中,可以省略该两个装置。 Two control devices as a dashed box, represents a simple implementation, the two devices may be omitted. 图中所有装置都是逻辑实体。 FIG all devices are logical entities. 两个虚线的椭圓表示其内部装置往往(但不局限于)实现为一个物理实体,左边的虚线椭圆为发送端,右边的虚线椭圆为接收端。 The dashed line represents two elliptical devices tend therein (but not limited to) is implemented as a physical entity, on the left side to send dashed oval, elliptical broken line on the right is the receiver. 图中带箭头的线表示数据流, 发送装置到接收装置的单箭头线段用于探针包的发送,通常是(但不限于)UDP 连接,以下称为数据连接。 FIG line with arrows indicate data flow, single arrow transmitting apparatus to the receiving apparatus transmits a probe packet segments, usually (but not limited to) the UDP connection, hereinafter referred to as the data connection. 发送端控制装置与接收端控制装置之间的双箭头线段表示控制信号的双向传递,通常是(但不限于)TCP连接,控制信号要保证可靠传输,以下称为控制连接。 The double arrow sending end controlling means between the control means and the receiving end indicates the bidirectional transmission control signal, usually (but not limited to) the TCP connection, to ensure reliable transmission of a control signal, hereinafter referred to as a control connection. 参见图8,介绍本发明方法的主流程的各个操作步骤:(1)发送端与接收端建立连接,进行数据交互,探测和判断测试路径是否为令牌桶限速的网络路径,如果测试路径是令牌桶限速路径,顺序执行后续步骤;否则,跳转执行步骤(5);(2) 计算该测试路径的令牌桶参数;(3) 进行令牌桶限速路径的瓶颈带宽的测量和计算;(4) 进行令牌桶限速路径的剩余带宽的测量和计算;(5) 采用传统方法分别测量和计算该路径的瓶颈带宽和剩余带宽。 Referring to Figure 8 describes the various steps of the main flow of the process of the invention: (1) establishing the transmitting side and the receiving terminal is connected to exchange data and to detect whether the test path is determined network path of the token bucket rate-limiting, if the test path token bucket speed path is sequentially perform subsequent steps; otherwise, skip to step (5); (2) calculated token bucket parameter of the test path; and (3) the token bucket rate limiting bottleneck bandwidth of the path measured and calculated; (4) measured and calculated residual bandwidth token bucket speed path; (5) were measured by a conventional method and calculating bottleneck bandwidth and a remaining bandwidth of the path. 参见图9,上述步骤(l)中,令牌桶的探测过程是由发送端和接收端的相关装置进行数据交互、共同完成的。 Referring to Figure 9, the above step (l), the token bucket detection process is carried out by the relevant data interaction means for transmitting and receiving ends of the completed joint. 图9说明了该测试过程中的数据交互状况。 9 illustrates the situation in the data exchange during the test. 图中带箭头的实线段表示探针包的发送(即数据连接),由发送装置和接收装置处理;带箭头的虚线段表示控制信号的传输,由发送端控制装置和接收端控制装置处理,对于简单实现,可以没有控制信号。 The solid lines in the figure with arrows indicate the transmission of probe packets (i.e., data connections), are processed by the transmitting apparatus and a receiving apparatus; broken line segment with arrows indicate transmission of control signals, processing means controlled by the sender and receiver control means, for simple implementation, there may be no control signal. 图中省略了控制连接和数据连接的建立过程。 FIG omitted in the process of establishing the control and data connections. 参见图9和图10,介绍探测令牌桶的数据交互过程的各项操作(以发送端为主,其中各帧中的参数都为整数)。 Referring to FIGS. 9 and 10, the operation of the data interaction process described detection of the token bucket (mainly at the transmitting end, wherein the parameters of each frame are integer). (U )发送端和接收端建立控制连接和数据连接:如果采用TCP的控制连接,就是双方建立一条TCP连接;所述数据连接包括但不限于用户数据报协议UDP的连接;(12) 发送端和接收端交换初始参数:控制连接建立后,发送端和接收端交换初始参数。 (U) transmitting and receiving ends to establish control and data connections: a TCP connection if the control is to establish a TCP connection sides; the data connection including but not limited to the connection of the User Datagram Protocol UDP; (12) transmitting side and the receiver exchange initial parameters: the control connection is established, the sender and receiver to exchange initial parameters. 发送端把用户输入或默认的初始参数发送给接收端,其帧结构(参见图11 (A))至少包括串长、包长、总串数;接收端也把至少包括接收探针包的端口号的必要的初始参数返回给发送端(对于数据连接为UDP连接的帧结构为接收探针包的UDP端口号,参见图11 (B))。 Port includes at least the receiving end receiving the probe packet; transmitting end transmits the user input or default initial parameters to the receive side, which frame structure (see FIG. 11 (A)) comprises at least string length, packet length, the total number of strings the necessary number of initial parameters is returned to the sender (for UDP port number for the data connection frame structure connected to receive the UDP packet is a probe, see FIG. 11 (B)). (注:串长是指一个测量数据包序列中数据包的个数,其数值>30,默认值为3000;包长是每个数据包的字节数,其数值>20,默认值为1000;总串数是整个测量过程中设定发送的测试数据包序列的最大数,即探针包串的最大数,默认值为50;(13) 发送端向接收端发送测量数据包序列,即发送探针包串:初始参数交换完成后,发送端开始向接收端以背靠背或等间隔的方式发送探针包串,探针包串的帧结构至少包括下述字节:串号、包号、时间戳秒、时间戳^t秒、用于补足包长而随机生成的负栽(参见图11 (C))(14)发送端发完探针包串,发送一个串结束控制信号给接收端,串结束控制信号的帧结构至少包括类型和串号(参见图11 (D))。接收端收到串结束信号后,由分析装置对刚收到的这个串进行分析处理,得出初步结果;判断是否为令牌桶限速路径;如杲确定为令牌桶 (Note: refers to a string length of the number of packets in the data packet sequence measured, its value> 30, the default value is 3000; packet length is the number of bytes of each data packet has a value> 20, the default value 1000 ; is the total number of strings in the whole measurement process the maximum number of the test sequence of packets transmitted is set, i.e., the maximum number of the probe packet sequence, the default value of 50; (13) measuring the sender sends the data packet sequence to the receiving end, i.e., transmitting a probe packet string: the initial parameter exchange is completed, the transmitting end to the receiving end starts transmission intervals in a manner or back to back packet sequence probe, the probe packet sequence frame structure comprises at least the following bytes: serial number, packet number , second time stamp, the time stamp ^ t seconds, the packet length used to complement randomly generated negative plant (see FIG. 11 (C)) (14) After transmitting side send a probe packet sequence, sending a control signal to the receiving end of the string end, the end of the string frame structure comprises at least a control signal type and serial number (see FIG. 11 (D)). after the receiver receives the end signal string, the string of just received is analyzed by the analysis processing means, preliminary results results; token bucket speed is determined whether the path; token bucket as determined Gao 速路径,结束该流程操:作;如果不能确定令牌桶限速路径,执行后续操作;U5)接收端重新设定至少包括类型、串长、包长、等待时间的初始参数, 再加上串开始信号一起发送给发送端,串开始信号的帧结构如图11 (E)所示。 Speed ​​path, the flow ends operation: for; not determined if the token bucket speed path, subsequent operations; U5) comprises at least a receiving terminal reset type, string length, packet length, the initial waiting time parameter, coupled with serial transmission start signal to the sender with a frame structure as shown in FIG string start signal 11 (E) shown in FIG. 发送端收到该串开始信号后,等待相应时间(即等令牌桶恢复);然后,将重复执行上述步骤(13)和(14),直到串数达到总串数时,接收端计算出测量结果后,向发送端发送一个测量结束控制信号后,结束操作;发送端接收到该测量结束控制信号后,结束操作。 The string after the sender receives the start signal, the respective waiting time (i.e., the recovery token bucket); then, repeat the above steps (13) and (14), until the number reaches the total number of strings strings, the receiving end is calculated after the measurement, the transmitting end sends a control signal after the end of a measurement, the end of the operation; sender receives the end of the measurement control signals, the operation ends. (其中类型用整数表示,l为串开始、2为串结束、 3为测量结束)。 (Where type is represented by an integer, l is the start sequence, is terminated string 2, 3 for the end of the measurement). 参见图12,介绍本发明接收端在完成令牌桶探测过程中的各项操作步骤: (111 )接收端获取输入参数,建立控制连接;(112) 接收来自发送端的初始参数,并向发送端发送接收端的初始参数, 建立数据连接;(113) 等待发送端的数据,如果收到的是探针包,先根据串号和包号,判断是否为合法包,以便丢弃因网络延迟时间过长而滞后收到的属于上一个包串的非法包和乱序包,并丢弃报文的QoS字段不符合要求的包,来满足某些特殊的令牌桶限速方法的要求;如果判断为合法包,顺序执行后续操作;如果收到的不是探针包,而是串结束信号时,表明已经接收了一个探针包串,跳转执行步骤(115);(114) 记录下述测量参数:至少包括串号、作为发送序号的包号、发送时间、接收时间rcvTime、接收序号;而后返回执行步骤(113 ),继续准备记录后续的串分组数据;(115) Referring to Figure 12, the steps described in the token bucket to complete the detection process of the present invention, the receiving terminal: (111) obtain input parameters the receiving end, control connection is established; (112) receives the initial parameters from the transmitting side, the transmitting side and transmitting an initial parameter receiving end, establishing a data connection; (113) waits for the data transmitting side, if the received packet is a probe, in accordance with the first serial number and packet number, it determines whether the packet is valid, for disposal and long delays due to network滞后收到的属于上一个包串的非法包和乱序包,并丢弃报文的QoS字段不符合要求的包,来满足某些特殊的令牌桶限速方法的要求;如果判断为合法包,顺序执行后续操作;如果收到的不是探针包,而是串结束信号时,表明已经接收了一个探针包串,跳转执行步骤(115);(114) 记录下述测量参数:至少包括串号、作为发送序号的包号、发送时间、接收时间rcvTime、接收序号;而后返回执行步骤(113 ),继续准备记录后续的串分组数据;(115) 对该探针包串进行分析处理,记录检测结果和调整参数,并判断该路径是否为令牌桶限速路径:即判断测量序列中是否存在跳变点;如果判断路径是令牌桶限速路径,则结束探测过程;否则,执行步骤(116);(116)判断探针包串长是否超过设定的最大串长值,如果没有超过设定的最大串长值,则将探针包串的长度加20或设定的某个正整数,并将该新的串长参数反馈给发送端,让发送端重新开始测试发送,接收端返回执行步骤(113); 如果超过设定的最大串长值,仍然没有找到跳变点,则判断该路径为非令牌桶限速路径,结束探测过程;所述串长最大值的默认值为10000。步骤(115 )中判断路径是否为令牌桶限速路径的依据是判断时延或速率的测量序列中是否存在跳变点,为了避免错误判断,跳变点j的判断基准是要同时满足以下三个条件,其中j为探针包的接收序号或发送序号,其取值范围是[0,串长最大值N]:A、 该跳变点不能过于靠近两端,以避免偶然因素的影响,即要满足公式: p<j<Nlp ;其中,边界门限p是自然数,p值不能太大,以免超过令牌桶本身大小,导致把令牌桶限速路径判定为非令牌桶限制路径,其经验值为10,或由用户通过命令行参数设定;串长最大值N是自然数;B、 该跳变点前后的探针包的平均时延timeDiff (应该用速率,用时延只是简单起见)的差别达到最大;序号为i的探针包的前后平均时延timeDiff的计算公式如下:<formula>formula see original document page 22</formula>, 其中,rcvTime为接收时间,rcvTime[i]为第i个分组的接收时间;求解跳变点j的计算公式如下: <formula>formula see original document page 22</formula>C、 跳变点j前后的时延差异要足够大,以防止误判:在实际的令牌桶限速路径中,突发速率和平均速率往往相差很大(如把物理带宽IOOM限速为10M 或2M),故其相应的时延也往往差异很大,如果相差太小,则很可能是非令牌桶限速路径;在测量中,可以设定差异因子X(H)为1.5,跳变点j要满足下述等式:<formula>formula see original document page 22</formula>对于令牌桶限速路径,本发明的步骤(2 )中要计算该路径令牌桶的各项参数,具体介绍如下;(21) 用跳变点之前的测量数据计算令牌桶限速路径的突发速率maxRate -突发阶段的发送速率,即突发带宽;计算公式如下:maxRate = jx 1000 x 8 / (rcvTime[j] - rcvTime[O]);(22) 用跳变点之后的测量数据计算令牌桶限速路径的平均速率avgRate -长期平均得到 发送速率,即平均带宽或瓶颈带宽;计算公式如下:avgRate = (Nlj) x 1000 x 8 / (rcvTime[Nl] - rcvTime[j]);(23) 按照下述^^式计算令牌桶的大小D:D = jx 1000 - avgRate x (rcvTime[j] - rcvTime[O]) / 8;(24) 按照下述公式计算分组队列长度L:L = ( Q — j) x 1000 — avgRate x (rcvTime[Q] — rcvTime[j]) / 8 ,其中,Q为第一个丢包开始的前一个点的接收序号或发送序号;(25 )按照下述公式计算每个令牌的生成时间间隔AT: △T = (rcvTime[R] - rcvTime[Q]) / P,其中,R为最后一次丟包之前的第一个收到的包的序号,P为连续丟包的次数。在令牌桶限速路径上,背景流量会影响参数的计算精度。因为背景流量会导致令牌桶提前用完,队列提前满,从而导致测量探针包的丟包提前。也就是说,丢包开始比较晚的情况受到背景流量的影响会比较小。实际测量时,根据前述接收端收到的每个存在间断点的数据包串都可分别计算一个令牌桶参数的结杲,可以选取丟包开始最晚的5% ~15%的多个探针包串的计算结果,然后再求其算术平均值作为最后瓶颈带宽结果。之所以进行多次(多个串)测量的因素是要消除背景流量和其它偶然因素的影响。此外,其它各个参数也可采用同样的处理方法,来提高最后结果的准确程度。本发明的步骤(3 )中令牌桶限速路径瓶颈带宽或接入带宽的测量结果就是步骤(22)的平均速率avgRate的测量计算结果值。本发明的步骤(4)中计算令牌桶限速路径的剩余带宽则是将令牌桶的限速值或瓶颈带宽作为剩余带宽测量算法中的最大带宽上界值,再运行剩余带宽测量方法,获得剩余带宽测量结果;所述传统的剩余带宽测量方法包括但不限于pathchirp、 pathload。本发明已经采用C语言编制了一个能在Iinux机器上运行的瓶颈带宽测量方法,并且在实验网上做了验证,其试验系统的架构图如图2所示。其中华为二层交换机的限速算法为令牌桶算法,端口速率为100M,与接收端相连的端口限速在两次测试中分别限制成2M和10M,发送端和接收端的网卡都是100M。在没有背景流量时,实验测量的结果如下表l所示:测量方法 P^iM2M时的结勒Mbps) ffiM画时的结果(Mbps)Pathrate(瓶颈带宽工具) 98~99 97~98Pathload(可用带宽工具) 23.78 ~ 25.37 94.59 ~ 100.94Pathneck (船贞带宽工具) 98.075 ~ 98.444 98.201 — 98.920Pathchirp (可用带宽工具) 65.5 ~ 97.4 67.4 ~ 99.3Stab(链路带宽工具) 41.4 ~ 55.0 42.7-62.2本发明方法 突发带宽93M 平均(弁K^)带宽1.9M 突发带宽93M 平均(并B贞)带宽9.5M从表中可以看出,在令牌桶限速路径上,上面所列的几种主要的端到端瓶颈带宽、可用带宽、链路带宽测量工具都无法正确的测量;而本发明可以能相当准确的测出突发带宽和平均带宽。为了验证背景流量对本方法的影响,申请人又做了一个实验。即在图2的试验系统的拓朴中再增加一个背景流量的发送端,发送匀速的包长为1472字节的UDP背景流量,背景流量的接收端还是采用本方法的接收端。该实验结果数据如下表2所示(单位为Mbps):<table>table see original document page 24</column></row> <table><table>table see original document page 25</column></row> <table>从该结杲数据表格中可以看出:背景流量对测量结果会有一些影响,特别是对突发带宽的影响比较明显,但对平均(瓶颈)带宽的影响不是很大。相关特性,因此,本发明对于有线或无线的数据网络都能够适用。

Claims (12)

1. 一种在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:测试路径建立后,发送端发送足够多的探针包,用于耗光令牌桶中的令牌,接收端根据令牌耗光前后速率或时延的变化来识别耗光令牌时的传输速率或时延的跳变点,并根据跳变点的存在与否判断是否为令牌桶限速路径,再计算相关路径的瓶颈带宽和剩余带宽;包括下述操作步骤: (1)发送端与接收端建立连接,进行数据交互,探测和判断测试路径是否为令牌桶限速的网络路径,如果测试路径是令牌桶限速路径,顺序执行后续步骤;否则,跳转执行步骤(5); (2)计算该测试路径的令牌桶参数,确定传输速率或时延的跳变点; (3)根据跳变点之后的测量数据计算得出令牌桶限速路径的平均速率,即令牌桶限速路径的瓶颈带宽; (4)将令牌桶限速路径的瓶颈带宽作为剩余带宽测 1. A method for measuring the bottleneck bandwidth and the remaining bandwidth of the network path of the token bucket rate limiting, wherein: the test path is established, the sender sends enough probe packets for the token bucket swallowed token, the receiver recognizes the transmission rate transition point or run out when the delay token tokens run out before and after the change rate or time delay, and depending on the presence or absence of the jump point is determined whether a token bucket path speed, and then calculate the residual bandwidth bottleneck bandwidth associated path; comprising the following steps: (1) the sending end and the receiving end to establish a connection, exchange data, and determines whether the test path detection token bucket rate-limiting network path, if the token bucket test path is the path speed, subsequent steps sequentially performed; otherwise, skip to step (5); (2) calculate the path test token bucket parameter, determining a transmission rate or delay jumping change point; (3) the token bucket rate gives an average speed path measurement data after the transition point calculated, i.e., the token bucket rate limiting bottleneck bandwidth path; (4) the token bucket speed bottleneck path as the bandwidth of the measured residual bandwidth 量算法中的最大带宽上限值,再运用包括pathchirp或pathload的剩余带宽测量方法计算得出令牌桶限速路径的剩余带宽;测量结束; (5)采用包括pathchirp或pathload的传统剩余带宽测量方法分别测量和计算该测试路径的瓶颈带宽和剩余带宽。 Upper limit amount of the maximum bandwidth of the algorithm, then use the remaining bandwidth measurement method comprising pathchirp or pathload the calculated remaining bandwidth token bucket speed path; end of the measurement; (5) comprises a conventional measuring residual bandwidth of pathchirp or pathload methods to measure and calculate the bottleneck bandwidth and a remaining bandwidth of the test path.
2、 根据权利要求1所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所述步骤(1 )进一步包括下述操作内容:(11 )发送端和接收端建立控制连接和数据连接:如果采用TCP的控制连接,就是双方建立一条TCP连接;所述数据连接包括用户数据报协议UDP的连接;(12) 发送端和接收端交换初始参数:发送端把用户输入或默认的初始参数发送给接收端,初始参数的帧结构至少包括串长、包长、总串数;接收端也把至少包括接收探针包的端口号的初始参数返回给发送端;(13) 发送端向接收端发送测量数据包序列:发送端以背靠背或等间隔的方式向接收端逐个发送测量数据包序列,其中每个分组数据包又称探针包,即发送探针包串;该探针包串的帧结构至少包括下述字节:串号、包号、时间戳秒、时间戳微秒、用于补足包长而随机生 2. The measuring method of bottleneck bandwidth and a remaining bandwidth in the network path of the token bucket rate limiting claim, wherein: said step (1) further comprises operation content: (11) transmitting side and receiver establishing the control and data connections: a TCP connection if the control is to establish a TCP connection sides; the data connection comprises a connection of a user datagram protocol UDP; (12) sending and receiving ends exchanged initial parameters: transmission terminal sends a user input or a default initial parameters to the receive side, the initial parameters of the frame structure comprising at least a string length, packet length, the total number of strings; receiving end the initial parameters including at least port numbers of the received packet back to the transmitting probe end; (13) measuring the sender sends the data packet sequence to the receiving end: the transmitting side or back to back an equal interval measurement data are transmitted one by one sequence of packets to the receiving end, wherein each packet also known as packet probe packet, i.e. send a sounding needle packet string; the packet probe train frame structure includes at least the following bytes: serial number, packet number, time stamp seconds, microseconds stamp, packet length used to complement randomly born 的负载;(14) 发送端将探针包串发送完后,发送一个串结束控制信号给接收端; 接收端收到该串结束控制信号后,由分析装置对刚收到的该串进行分析处理, 得出初步结果,判断是否为令牌桶限速路径;如果确定为令牌桶限速路径,结束该操作;如果不能确定令牌桶限速路径,执行后续操作;(15) 接收端重新设定至少包括串长、包长、等待时间的初始参数,再加上串开始信号一起发送给发送端,发送端收到该串开始信号后,等待令牌桶恢复的相应时间后,将重复执行步骤(13)和(14),直到串数达到总串数时,接收端计算出测量结果后,向发送端发送一个测量结束控制信号后,结束操作;发送端接收到该测量结束控制信号后,结束纟喿作。 Load; (14) the transmission side probe packet sequence is sent, sends a control signal to the serial receiving terminal end; the end of the string a control signal received by the receiver, the sequence analyzed by the analysis means just received process, preliminary results obtained, it is determined whether the token bucket path speed; determining if the token bucket speed path, the operation is finished; not determined if the token bucket speed path, subsequent operations; (15) receiving end re-setting at least comprises a string length, packet length, the initial waiting time parameter, coupled with a string start signal to the transmitting end, the transmitting end receives the string start signal, waiting a respective time recovery token bucket, the repeating steps (13) and rear (14), until the number reaches the total number of sequence strings, the receiving side calculates the measurement results, a measurement end after sending a control signal to the transmitting end, the end of the operation; transmitting end receives the measurement control after the signal for the end of Si Qiao.
3、 根据权利要求2所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所述串长是一个测量数据包序列中数据包的个数, 其数值>30;包长是每个数据包的字节数,其数值>20;总串数是整个测量过程中设定发送的测试数据包序列的个数,即探针包串的最大数;所述串结束控制信号的帧结构至少包括类型和串号,串开始信号的帧结构至少包括下迷字段: 类型、串长、包长、串号、等待时间;其中串开始信号的帧结构的类型字4殳用整数表示:l为串开始、2为串结束、3为测量结束;当类型字段为3时,后面的字段没有意义。 3, the measurement method of claim 2 bottleneck bandwidth and a remaining bandwidth in the token bucket rate limiting network path according to claim, wherein: said run-length is a number of data packets in the packet measurement which value> 30; packet length is the number of bytes of each data packet has a value> 20; the total number of strings is set during the whole measurement sequence of test packets sent, i.e. the maximum number of the probe packet string; end of the string frame structure comprises at least a control signal type and serial number, a string start signal frame structure comprises at least a fan fields: type, string length, packet length, the serial number, the waiting time; wherein the frame structure of the start signal sequence Shu word type represented by an integer 4: l is the start sequence, is terminated string 2, 3 to the end of measurement; when the type field is 3, the back of the field has no meaning.
4、 根据权利要求1所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所述步骤(1 )发送端与接收端的数据交互是由两端的相关装置互相配合、共同完成的,其中发送端执行的操作步骤如下所述:(101) 获取输入参数,建立控制连接;(102) 向接收端发送初始参数,并接收来自接收端的初始参数,建立数据连接;(103) 逐个发送探针包串后,间隔一段时间,发送串结束控制信号;再等待接收端的返回控制信号;(104)如果收到的接收端返回控制信号是串开始信号,则返回步骤(103); 如杲收到的接收端返回控制信号是测量结束控制信号,则结束操作。 4. The measuring method of bottleneck bandwidth and a remaining bandwidth in the network path of the token bucket rate limiting claim, wherein: said step (a) transmitting data exchange and the receiver is associated at both ends by a means cooperate with each other, together to complete the operation wherein the step of transmitting end performs as follows: (101) obtain input parameters, control connection is established; (102) transmitting initial parameters to a receiving end, and receives the initial parameters from the receiving end, establishing a data connection; (103) one by one after sending the probe packet sequence, time to time between the end of the serial transmission control signal; wait for the return control signal receiving end; (104) if the receiving terminal returns the received control signal is a sequence start signal is returned step (103); Gao receiver end the received control signal is a return signal measurement end control, the operation is ended.
5、 根据权利要求1所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所迷步骤(1)发送端与接收端的数据交互是由两端的相关装置互相配合、共同完成的,其中接收端用于配合发送端完成令牌桶探测过程,其执行的操作步骤如下所述:(111) 获取输入参数,建立控制连接;(112) 接收来自发送端的初始参数,并向发送端发送接收端的初始参数, 建立数据连接;(113) 等待发送端的数据,如果收到的是探针包,先根据串号和包号,判断是否为合法包,以便丟弃乱序包和因网络延迟时间过长而滞后收到的属于上一个包串的非法包,并丢弃报文的QoS字段不符合要求的包;如果判断为合法包,顺序执行后续操作;如果收到的不是探针包,而是串结束控制信号时,表明已经接收了一个探针包串,跳转执行步骤(115);(114) 记录下述测量 5. The measuring method of bottleneck bandwidth and a remaining bandwidth in the network path of the token bucket rate limiting claim, characterized in that: the fans in step (1) transmits data exchange and the receiver is associated at both ends by a means cooperate with each other, together to complete, wherein the receiving end of the transmitting end for mating completion token bucket detection process, that performs the steps as follows: (111) obtain input parameters, control connection is established; (112) receiving from the sender initial parameters, the initial parameters of the sender and the receiving end, establishing a data connection; (113) waits for the data transmitting side, if the received packet is a probe, in accordance with the first serial number and packet number, determines whether the packet is valid, lost to scrambled packets discarded due to network delay and long time lag illegal packet received packet belonging to a series of dropped packets and QoS field does not meet the requirements of the packet; if it is determined as a legitimate packet, the subsequent sequence of operations performed; if a probe packet not received, but the end of the string a control signal indicating that a probe has been received packet sequence, skip step (115); (114) record the following measured 数:至少包括串号、作为发送序号的包号、发送时间、接收时间rcvTime、接收序号;而后返回执行步骤(113 ),继续准备记录后续的串分组数据;(115) 对该探针包串进行分析处理,记录检测结果和调整参数,并判断该测试路径是否为令牌桶限速路径:即判断测量序列中是否存在跳变点;如果判断测试路径是令牌桶限速路径,则结束探测过程;否则,执行步骤(116);(116) 判断探针包串长是否超过设定的最大串长值,如果没有超过设定的最大串长值,则将探针包串的长度加20或设定的正整数,并将该新的串长参数反馈给发送端,让发送端重新开始测试发送,接收端返回执行步骤(113);如果超过设定的最大串长值,仍然没有找到跳变点,则判断该测试路径为非令牌桶限速路径,结束探测过程。 Number: at least serial number, the packet number as the transmission number, the transmission time and reception time to RCVTIME, receive sequence number; then returns to step (113), continue to be recorded subsequent packet data string; (115) to the probe packet string analysis and processing, and records the detection result of the adjustment parameter, and determining whether the test path speed token bucket path: i.e., determines whether there is the measurement point hopping sequence; test path is determined if the token bucket speed path is terminated detection process; otherwise, proceed to step (116); (116) determines whether the value of the maximum run length longer than the probe packet string set, if the maximum run length is not more than the set value, then the packet sequence length plus probe 20 is set or a positive integer, and the new string length parameter back to the transmitting side, the transmitting side again so that the test starts transmitting, the receiver returns to step (113); if the maximum run length exceeds the set value, still no find the trip point, the test path is determined a non-token bucket speed path detection process ends.
6、 根据权利要求5所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所述步骤(115)中判断路径是否为令牌桶限速路径的依据是判断时延或速率的测量序列中是否存在跳变点,跳变点的接收序号j 的判断基准是同时满足以下三个条件,其中i为探针包的接收序号,其取值范围是[O,串长最大值]:A、为避免偶然因素的影响,该跳变点要满足公式:p<_j<Nlp ;其中, 边界门限p是自然数,p值不能超过令牌桶本身大小,否则会导致把令牌桶限速路径判定为非令牌桶限速路径;N是接收到的包的个数,Nl是接收到的最后一个包的接收序号;B 、该跳变点前后的探针包的平均时延timeDiff或速率的差别达到最大:序号为i的探针包的前后平均时延timeDiff的计算公式如下: timeDiff[i] = (rcvTime[Nl〗- rcvTime[i])/(Nli) - (rcvTime[i] - rcv'fime[0])/(i-0), 其中,rcvTim 6. The method of measuring the bottleneck bandwidth and the remaining bandwidth in the network path of the token bucket rate limiting claim, wherein: said step (115) determines whether the token bucket path speed path based on determining whether there is delay trip point or rate measurement sequence, the receive sequence number j is determined trip point reference the following three conditions is satisfied, where i is the receive sequence number of the probe packet, which ranges [O, run-length maximum value]: a, to avoid the influence of the accident of the transition point to satisfy the equation: p <_j <Nlp; wherein the boundary threshold p is a natural numbers, p can not exceed the token bucket itself size, otherwise it will lead to a non-token bucket path determination token bucket rate limiting speed path; N is the number of the received packet, Nl is the receive sequence number of the last packet received; B, before and after the transition point timeDiff average delay difference or a probe packet rate reaches a maximum: number average delay is calculated before and after the timeDiff probe packet i as follows: timeDiff [i] = (rcvTime [Nl〗 - rcvTime [i]) / (Nli) - (rcvTime [i] - rcv'fime [0]) / (i-0), wherein, rcvTim e为接收时间,rcvTime[i]为第i个分组的接收时间;求解if兆变点j的计算7>式如下: j = max{ timeDi即]|对于任意i, p < i < Nlp };C、跳变点j前后的时延差异比例要大于差异因子X, X>1,以防止误判; 差异因子义是预设的大于1的数值,即跳变点的接收序号j要满足下述等式: (rcvTime[Nl] — rcvTime[j]) / (Nlj) > ?ix ((rcvTime[j〗—rcvTime[O]) / (j-0))。 e is the reception time, rcvTime [i] is the reception time of the i th packet; Solving if Mega transformation point j Calculation 7> the formula: j = max {timeDi i.e.] | for any i, p <i <Nlp}; C, the delay difference before and after the trip point j is greater than the difference in the proportion of factor X, X> 1, in order to prevent false positives; Yi factor difference is a preset value greater than 1, i.e. the reception transition point number j to satisfy the following said equation: (rcvTime [Nl] - rcvTime [j]) / (Nlj)> ix ((rcvTime [j〗 -rcvTime [O]) / (j-0))?.
7、根据权利要求1所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所述步骤(2)进一步包括下述操作内容:(21 )用跳变点之前的测量数据计算令牌桶限速路径的突发速率maxRate, 也就是突发阶段的发送速率,即突发带宽;计算公式如下:maxRate = jx 1000 x 8 / ( rcvTime[j] - rcvTime[O]);式中,j是跳变点的接收序号,rcvTime为接收时间,rcvTime[O]是接收序号为0的包,即第一个包的接收时间,rcvTime[j]是发生跳变点的接收时间;(22)用跳变点之后的测量数据计算令牌桶限速路径的平均速率avgRate, 也就是长期平均得到的发送速率,即平均带宽或瓶颈带宽;计算公式如下:avgRate = ( N-1 -j) x 1000 x 8 / ( rcvTime[N-1 ] - rcvTime[j]);式中,N是接收到的包的个数,Nl是接收到的最后一个包的接收序号,rcvTime[Nl]是接收最后一个包的接收时间;(23 )按照下述公式 7, according to the measurement method of bottleneck bandwidth and a remaining bandwidth in the network path of the token bucket rate limiting claim, wherein: said step (2) further comprises operation content: (21) with hops before measurement the critical point of the path of the token bucket speed burst rate MaxRate, i.e. transmission rate burst phase, i.e., burst bandwidth; calculated as follows: maxRate = jx 1000 x 8 / (rcvTime [j] - rcvTime [O]); wherein, j is the receive sequence number of the transition points, to receive a time to RCVTIME, rcvTime [O] 0 is the receive sequence number for the packet, i.e., the reception time of the first packet, rcvTime [j] is occurring jump reception time of the change point; (22) calculating the average data rate of the token bucket speed measurement path after the transition point avgRate, i.e. resulting long-term average transmission rate, i.e., average bandwidth or bottleneck bandwidth; calculated as follows: avgRate = (N-1 -j) x 1000 x 8 / (rcvTime [N-1] - rcvTime [j]); in the formula, N is the number of the received packet, Nl is the last received packet reception sequence number, rcvTime [Nl] is the last received packet reception time; (23) according to the formula 计算令牌桶的大小D: D = jx 1000 - avgRate x ( rcvTime[j] - rcvTime[O] ) / 8;(24)按照下述公式计算分组队列长度L:<formula>formula see original document page 6</formula>,其中,Q为第一个丢包开始的前一个点的接收序号,也就是在Q点及Q点之前一直没有丢包, 之后发生了丢包,即Q为最后一个接收序号和发送序号相同的包; (25 )按照下述公式计算每个令牌的生成时间间隔AT:<formula>formula see original document page 6</formula>,其中,R为最后一次丟包之前的第一个接收到的包的序号,P为连续丢包的次数;1/AT表示令牌桶的令牌生成速率, 也就是令牌桶限速的平均带宽。 Calculating the size of the token bucket D: D = jx 1000 - avgRate x (rcvTime [j] - rcvTime [O]) / 8; (24) packet queue length L is calculated according to the following equation: <formula> formula see original document page 6 </ formula>, wherein, Q is a loss of a point before the start of the received sequence number, i.e. it has no loss until the point Q and point Q after the packet loss occurs, i.e., the last received Q transmitting the same packet number and serial number; (25) each token generation time is calculated according to the following equation interval AT: <formula> formula see original document page 6 </ formula>, wherein, R is the last previous loss the first sequence number of a received packet, P is the number of consecutive packet loss; 1 / AT represents a token generation rate token bucket, that is, the average bandwidth token bucket rate limiting.
8、 根据权利要求7所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:实际测量瓶颈带宽或其它参数时,将所有包串中的第一个被丢弃分组的接收序号进行排名,接收端选取其中接收序号排名最大的前5% ~15%的多个探针包串,分别计算其相关的令牌桶参数,再求其算术平均值作为最后结果,以消除背景流量和偶然因素的影响。 8, the measuring method according to claim 7, bottleneck bandwidth and a remaining bandwidth, token bucket rate limiting in the network path, characterized in that: when the bottleneck bandwidth or other parameters of the actual measurement, all of the first packet in the string discarded packets received rank number, wherein the receive sequence number the receiving side to select the largest rank of 5% to 15% before the packet sequence plurality of probes, each token bucket related calculated parameter, and then seek the arithmetic average as the final As a result, in order to eliminate the effects of background traffic and accidental factors.
9、 根据权利要求7所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所述步骤(3)中,令牌桶限速路径瓶颈带宽的测量结果是所述步骤(22)的平均速率avgRate计算结果值。 9, according to the measurement method of claim 7 bottleneck bandwidth and a remaining bandwidth in the network path of the token bucket rate limiting claim, wherein: said step (3), the token bucket rate limiting bottleneck bandwidth measurement path As a result of the step (22) the average rate avgRate calculation result value.
10、 根据权利要求1或7或8所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法,其特征在于:所述步骤(4)中,计算令牌桶限速路径的剩余带宽是将令牌桶的限速值或瓶颈带宽作为剩余带宽测量算法中的最大带宽上界值,再运行包括pathchirp或pathload的传统剩余带宽的测量方法,获得剩余带宽测量结果。 10, or a measuring method according to claim 7 or 8 bottleneck bandwidth and a remaining bandwidth in the network path of the token bucket rate limiting claim, wherein: said step (4), the computing speed token bucket the remaining bandwidth path is the token bucket rate limit bandwidth or bottleneck bandwidth as the maximum value of the remaining bound bandwidth measurement algorithms, and then run a conventional method comprising measuring the residual bandwidth pathchirp or pathload obtain the remaining bandwidth measurement result.
11、 一种根据权利要求1所述的在令牌桶限速网络路径下的瓶颈带宽和剩余带宽的测量方法进行测量的系统,其特征在于:该系统由位于发送端的发送探针包的发送装置和位于接收端的接收探针包的接收装置以及对测量数据进行计算处理的分析装置所组成,所述发送装置与接收装置之间采用用户数据报协议UDP实现数据连接。 11. A measuring method according to claim 1 of the bottleneck bandwidth and the remaining bandwidth in the token bucket rate limiting requires a network path measuring system, wherein: the transmitting end transmits the probe packet is sent by the system is located probe means and receiving means for receiving packets on the receiving end, and means for analyzing measurement data is composed of calculation processing, transmission using the user datagram protocol UDP between the means and receiving means for data connection.
12、根据权利要求11所述的测量系统,其特征在于:所述发送端和接收端分别设有用于相互传送控制信号的发送端控制装置和接收端控制装置,该两个控制装置分别与发送装置与接收装置组成为同一实体,两个控制装置之间采用传输控制协议TCP实现数据连接,并保证控制信号的可靠传输。 12. The measuring system according to claim 11, wherein: the sending end and the receiving end are provided for each end of the transmission control signal transmitting device and a receiving end controlling the control means, the control means respectively transmits two and receiving devices composed of the same entity, transmission control protocol TCP between two control devices for data connections, and to ensure reliable transmission of control signals.
CN 200510123695 2005-11-18 2005-11-18 Method and system for measuring bottleneck bandwidth and remanent bandwidth CN100421396C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200510123695 CN100421396C (en) 2005-11-18 2005-11-18 Method and system for measuring bottleneck bandwidth and remanent bandwidth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200510123695 CN100421396C (en) 2005-11-18 2005-11-18 Method and system for measuring bottleneck bandwidth and remanent bandwidth

Publications (2)

Publication Number Publication Date
CN1770711A CN1770711A (en) 2006-05-10
CN100421396C true CN100421396C (en) 2008-09-24

Family

ID=36751732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200510123695 CN100421396C (en) 2005-11-18 2005-11-18 Method and system for measuring bottleneck bandwidth and remanent bandwidth

Country Status (1)

Country Link
CN (1) CN100421396C (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2008225072B2 (en) * 2007-03-12 2013-01-17 Citrix Systems, Inc. Systems and methods for dynamic bandwidth control by proxy
CN100448205C (en) 2006-05-15 2008-12-31 西安西电捷通无线网络通信有限公司 Method for co-collecting IP network performance by active type measure and passive type measure
CN101453422B (en) 2008-11-07 2011-03-16 广东科达机电股份有限公司;武汉理工大学 Network bandwidth allocation method and device
CN102710480B (en) * 2008-12-25 2015-11-18 三菱电机株式会社 Communication management apparatus, a communication apparatus and communication method
CN101483603B (en) 2009-02-04 2011-12-28 北京华力创通科技股份有限公司 Method for controlling data traffic equipment and apparatus
EP2550775A4 (en) * 2010-03-22 2013-11-06 Freescale Semiconductor Inc Token bucket management apparatus and method of managing a token bucket
CN102739518B (en) * 2012-05-30 2015-12-09 杭州华三通信技术有限公司 A flow load sharing method and apparatus
US9674086B2 (en) * 2013-11-05 2017-06-06 Cisco Technology, Inc. Work conserving schedular based on ranking
CN103825775B (en) * 2013-12-31 2017-04-05 广东工业大学 Adaptive packet length detecting multi-hop wireless networks available bandwidth real-time detection method
CN105634842B (en) * 2014-10-29 2019-01-11 华为技术有限公司 A kind of method, apparatus and system of detection bandwidth
CN105245399B (en) * 2015-09-08 2019-01-18 海南大学 The measure of bottleneck link in a kind of end to end network communication path
CN105553781A (en) * 2016-01-12 2016-05-04 腾讯科技(深圳)有限公司 Method and device for measuring bottleneck bandwidth
CN107438013A (en) * 2016-05-27 2017-12-05 中兴通讯股份有限公司 Port optimization method, device and system
CN106302017A (en) * 2016-08-18 2017-01-04 成都网优力软件有限公司 High-concurrency small-flow network speed measurement system and method
CN106302016A (en) * 2016-08-18 2017-01-04 成都网优力软件有限公司 Method and system for quickly acquiring network physical bandwidth with small traffic

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1047223A2 (en) 1999-04-21 2000-10-25 KDD Corporation Band width measuring method and apparatus for a packet switching network
CN1545277A (en) 2003-11-19 2004-11-10 北京邮电大学 An end-to-end network bottleneck bandwidth measuring method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1047223A2 (en) 1999-04-21 2000-10-25 KDD Corporation Band width measuring method and apparatus for a packet switching network
CN1545277A (en) 2003-11-19 2004-11-10 北京邮电大学 An end-to-end network bottleneck bandwidth measuring method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
What do packect dispersion techniques measure? Dovrolis, C., Ramanathan, P., Moore, D.Proceeding of IEEE INFOCOM2001,Vol.2 . 2001
端到端网络带宽测量技术研究. 张峰,雷振明.电信科学,第2005卷第4期. 2005

Also Published As

Publication number Publication date
CN1770711A (en) 2006-05-10

Similar Documents

Publication Publication Date Title
Ramakrishnan et al. The Ethernet capture effect: Analysis and solution
Jain et al. End-to-end available bandwidth: measurement methodology, dynamics, and relation with TCP throughput
Prasad et al. Bandwidth estimation: metrics, measurement techniques, and tools
US7349977B2 (en) Fast dynamic measurement of bandwidth in a TCP network environment
Song et al. Compound TCP: A scalable and TCP-friendly congestion control for high-speed networks
Dischinger et al. Characterizing residential broadband networks
US7596096B2 (en) Method and apparatus for providing trace route and timing information for media streams
Ahn et al. Supporting service differentiation for real-time and best-effort traffic in stateless wireless ad hoc networks (SWAN)
US20050232227A1 (en) Method and apparatus for characterizing an end-to-end path of a packet-based network
US7817568B2 (en) Method for measuring characteristics of path between nodes by using active testing packets based on priority
Navratil et al. ABwE: A practical approach to available bandwidth estimation
US20070153816A1 (en) Methods and apparatus for characterizing a route in a fibre channel fabric
Bruno et al. Throughput analysis and measurements in IEEE 802.11 WLANs with TCP and UDP traffic flows
Chen et al. Ad hoc probe: path capacity probing in wireless ad hoc networks
CN1185829C (en) Method of controlling Ethernet data flow quantity on SDH transmission network
CN100356740C (en) System and method for conducting comprehensive measurement and association analysis to time delay and drop
Lakshminarayanan et al. Bandwidth estimation in broadband access networks
CN1492630A (en) Network operation parameter for measuring network experience operation flow
CN1953392A (en) Detection method for abnormal traffic and packet relay apparatus
US9094315B2 (en) Systems and methods for measuring available capacity and tight link capacity of IP paths from a single endpoint
US7558202B2 (en) Estimating available bandwidth with multiple overloading streams
WO2002087276A3 (en) Method and device for robust real-time estimation of bottleneck bandwidth
JP5048184B2 (en) Transmission rate monitoring apparatus and a transmission rate monitoring method
CN1274120C (en) Method and apparatus for automatic congestion avoidance for differentiated service flows
Lee et al. Bandwidth estimation in wireless LANs for multimedia streaming services

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted