11
arXiv:cs/0409022v1 [cs.NI] 13 Sep 2004 1 Two Models for the Study of Congested Internet Connections Ian Frommer, Eric Harder, Brian Hunt, Ryan Lance, Edward Ott, James Yorke Abstract— In this paper, we introduce two deterministic models aimed at capturing the dynamics of congested Internet connections. The first model is a continuous-time model that combines a system of differential equations with a sudden change in one of the state variables. The second model is a discrete-time model with a time step that arises naturally from the system. Results from these models show good agreement with the well-known ns network simulator, better than the results of a previous, similar model. This is due in large part to the use of the sudden change to reflect the impact of lost data packets. We also discuss the potential use of this model in network traffic state estimation. Index Terms— Simulations, Mathematical Modeling I. INTRODUCTION An Internet connection consists of the exchange of data packets between a source and destination through intermediate computers, known as routers. The transmis- sion of data in the majority of Internet connections is controlled by the Transport Control Protocol (TCP) [1], [2]. TCP is responsible for initializing and completing connections, controlling the rate of flow of data pack- ets during a connection, ensuring that lost packets are retransmitted, etc. Congestion can occur when the rate of flow of the connection is limited by some link on the path from source to destination. This link is known as the bottle- neck link. Routers have buffers in which to store packets in case one of their outgoing links reaches full capacity. If new packets arrive at a router whose buffer is full, that router must drop packets. There exist various strategies, known as active queue management (AQM) policies, for determining how and when to drop packets prior to the buffer filling. One commonly used AQM is Random Early Detection (RED) [3]. In this paper we model the interaction between TCP and RED for a simple network connection experiencing This work was supported by AFOSR grant # FA95500410319. Ian Frommer, Brian Hunt, Ryan Lance, Edward Ott and James Yorke are with the University of Maryland, College Park, MD 20742, USA, 301-405-1000. Eric Harder is with the US De- partment of Defense. The authors can be contacted by email at [email protected]. congestion. This scenario, or ones similar to it, have been modeled previously for the purposes of evaluating RED [4], [5], [6], [7], obtaining throughput expres- sions [8], [9], and obviating the need for time-consuming simulation [4], [10], [11], [12], among others. There are stochastic [9] and deterministic models [4], [5], [6], continuous-time [4] and discrete-time models [5], [6]. Our models are closest to that of Misra et al. [4]. That model successfully captures the average network state in a variety of situations. This allows the authors to analyze RED from a control theoretic basis. Our aim is to develop a model of greater accuracy that will be useful in estimation not only of the average network state, but of additional quantities. For example, a model capable of capturing the mean queue length allows one to estimate the mean round-trip time. But a model that can capture the range, and better still, the variance of the queue length, will allow one to estimate the range and variance of the round-trip time. While this level of model accuracy can be useful, it is necessary in a model that is to be used for our ultimate goal of network traffic state estimation. Given some knowledge of the state of the network, an accurate model may be combined with a filter-based state-estimation scheme (which we discuss briefly in Sec. IV), in order to estimate the full network state at the current time. Network state estimation can be useful from the perspectives of both security and performance. We make several assumptions about the Internet con- nection we are modeling. First, we assume it involves the transfer of a very large amount of data over an extended period of time. In this so-called bulk transfer, the senders always have data to transmit for the duration of the connection. Common TCP traffic such as FTP (File Transfer Protocol) file transfers, and non-streaming music and video downloads can all constitute bulk trans- fer. Second, we assume that the path from source to destination is fixed for the duration of the connection. Third, we assume the transfer is one-way, i.e., the data packets travel in only one direction. (Acknowledgments packets only travel in the other direction.) Fourth, any cross-traffic through the path is negligible. Fifth, the path contains one bottleneck link whose capacity is less

Two Models for the Study of Congested Internet Connections

  • Upload
    cga

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

arX

iv:c

s/04

0902

2v1

[cs.

NI]

13

Sep

200

41

Two Models for the Studyof Congested Internet Connections

Ian Frommer, Eric Harder, Brian Hunt, Ryan Lance, Edward Ott, James Yorke

Abstract— In this paper, we introduce two deterministicmodels aimed at capturing the dynamics of congestedInternet connections. The first model is a continuous-timemodel that combines a system of differential equations witha sudden change in one of the state variables. The secondmodel is a discrete-time model with a time step that arisesnaturally from the system. Results from these models showgood agreement with the well-knownns network simulator,better than the results of a previous, similar model. Thisis due in large part to the use of the sudden change toreflect the impact of lost data packets. We also discussthe potential use of this model in network traffic stateestimation.

Index Terms— Simulations, Mathematical Modeling

I. INTRODUCTION

An Internet connection consists of the exchange ofdata packets between a source and destination throughintermediate computers, known as routers. The transmis-sion of data in the majority of Internet connections iscontrolled by the Transport Control Protocol (TCP) [1],[2]. TCP is responsible for initializing and completingconnections, controlling the rate of flow of data pack-ets during a connection, ensuring that lost packets areretransmitted, etc.

Congestion can occur when the rate of flow of theconnection is limited by some link on the path fromsource to destination. This link is known as thebottle-neck link. Routers have buffers in which to store packetsin case one of their outgoing links reaches full capacity.If new packets arrive at a router whose buffer is full, thatrouter must drop packets. There exist various strategies,known as active queue management (AQM) policies, fordetermining how and when to drop packets prior to thebuffer filling. One commonly used AQM is RandomEarly Detection (RED) [3].

In this paper we model the interaction between TCPand RED for a simple network connection experiencing

This work was supported by AFOSR grant # FA95500410319.Ian Frommer, Brian Hunt, Ryan Lance, Edward Ott and James

Yorke are with the University of Maryland, College Park, MD20742, USA, 301-405-1000. Eric Harder is with the US De-partment of Defense. The authors can be contacted by email [email protected].

congestion. This scenario, or ones similar to it, havebeen modeled previously for the purposes of evaluatingRED [4], [5], [6], [7], obtaining throughput expres-sions [8], [9], and obviating the need for time-consumingsimulation [4], [10], [11], [12], among others. Thereare stochastic [9] and deterministic models [4], [5], [6],continuous-time [4] and discrete-time models [5], [6].

Our models are closest to that of Misra et al. [4].That model successfully captures theaverage networkstate in a variety of situations. This allows the authorsto analyze RED from a control theoretic basis. Our aimis to develop a model of greater accuracy that will beuseful in estimation not only of the average networkstate, but of additional quantities. For example, a modelcapable of capturing the mean queue length allows oneto estimate the mean round-trip time. But a model thatcan capture the range, and better still, the variance ofthe queue length, will allow one to estimate the rangeand variance of the round-trip time. While this level ofmodel accuracy can be useful, it is necessary in a modelthat is to be used for our ultimate goal of network trafficstate estimation. Given some knowledge of the state ofthe network, an accurate model may be combined witha filter-based state-estimation scheme (which we discussbriefly in Sec. IV), in order to estimate the full networkstate at the current time. Network state estimation canbe useful from the perspectives of both security andperformance.

We make several assumptions about the Internet con-nection we are modeling. First, we assume it involvesthe transfer of a very large amount of data over anextended period of time. In this so-calledbulk transfer,the senders always have data to transmit for the durationof the connection. Common TCP traffic such as FTP(File Transfer Protocol) file transfers, and non-streamingmusic and video downloads can all constitute bulk trans-fer. Second, we assume that the path from source todestination is fixed for the duration of the connection.Third, we assume the transfer is one-way, i.e., the datapackets travel in only one direction. (Acknowledgmentspackets only travel in the other direction.) Fourth, anycross-traffic through the path is negligible. Fifth, thepath contains one bottleneck link whose capacity is less

2

Fig. 1. Network configuration

than that of all other links in the path. Most of theseassumptions reflect typical network scenarios with thepossible exceptions of the cross-traffic and bottleneckassumptions.

Data traveling from the sender to the receiver is likelyto pass through several intervening routers. However,based on our assumption that there is one bottlenecklink, we need only consider the router whose outgoinglink is this bottleneck link. All other routers simplyforward the data along the path, and have unoccupiedbuffers. Combining all of the above assumptions, we canmodel the network we are attempting to represent witha network of one sender and one receiver separated byone router (see Fig. 1).

II. THE MODELS

The primary mechanism used by TCP to regulatethe flow of data is thecongestion window on thesender’s computer. A window size ofW means thatthe number of unacknowledged packets from the senderthat may be outstanding on the network at any onetime is at mostW . According to TCP, the sender’swindow size follows the additive-increase/multiplicative-decrease (AIMD) scheme. Typically, the window sizeWincreases additively by1/W with each successful packettransmission and decreases multiplicatively by a factorof 2 when packets are dropped.

Packets needing to be stored in a router’s bufferdue to congestion are placed in a queue. The REDmodule operating at this router keeps track of the queuelength as well as of an exponentially-weighted averageof the queue length, which we denote byx. When xexceeds a pre-defined minimum threshold, RED willcause the router to drop arriving packets with probabilitythat increases withx. Note that this adds a stochasticelement to the connection. We attempt to capture thesystem behavior with a deterministic model; our modelwill not reflect the random component of the dynamics.However, as we will show below, the random componentis reasonably small, and so a purely deterministic modelcan be useful for state estimation.

Previous attempts to model this scenario determinis-tically have made use of either discrete-time maps [5],

[6] or differential equations [4]. Continuous-time modelsemploying delay differential equations may do well incapturing the aspects of network behavior that evolve onsmall-time scales, such as flow rate increases. However,they are likely to smooth out the effects of suddenlarge changes in state (such as flow rate reductions).Furthermore, systems of delay differential equations canbe cumbersome to express and solve due to the delay.

We address the above issues through innovations inour models, namely, a discrete impulse in the continuous-time model, the choice of time-step in the discrete-time model, and a packet-based frame of reference usedby both models. The continuous-time model presentedin this work combines a system of differential equa-tions to capture the evolution of the small-time scalechanges with a discrete impulse (sudden change in oneof the state variables) to represent sudden large changes.The discrete-time model takes advantage of the factthat a congested bottleneck will impose uniform packetspacing. Using this spacing as the time step allowsthe discrete-time model to nicely capture the systembehavior. In addition, as explained below, both modelsutilize a packet-based frame of reference for the state,which simplifies handling of the delay in the system,making the models easier to express and execute.

To describe the system, we consider the state variables,all of which have units of “packets” but are allowed totake non-integer values:

• W – the congestion window size of the sender;• q – the length of the queue at the router;• x – the exponentially-weighted average of the queue

length at the router.In our packet-based frame of reference,W (t) representsthe congestion window in effect for a packetarriving atthe queue at time t. This was the sender’s congestionwindow at an earlier time, when the packet left thesender.

In developing the models we will often refer to theround-trip time, R. The round-trip time is the timebetween the departure of a packet from the sender andthe return to the sender of the acknowledgment for thatpacket. It consists of a fixed propagation delay,a, anda queuing delay. For a packet encountering a singlecongested router with queue lengthq, and outgoinglink capacityc (measured in packets per unit time), thequeuing delay isq/c. Thus,

R(q) = a +q

c. (1)

A. THE CONTINUOUS-TIME MODEL

Our continuous-time model consists of two distinctparts. The first part is a system of differential equations

3

similar to the one found in [4]. It is used to model theadditive-increase of the window size, and both instanta-neous and averaged queue lengths. The second part ofthe model is an impulse in which the window size statevariables are instantaneously reset. This is used to modelthe multiplicative decrease in the window size caused bya dropped packet.

1) MODELING THE ADDITIVE INCREASE: Ac-cording to TCP, the window size,W , will normallyincrease by1/W upon receipt of each acknowledgment.(We do not model the “slow start” phase in which thewindow size increases by one per received acknowledg-ment.) SinceW specifies the number of unacknowledgedpackets that can be out in the network at any one time,it follows that about W packets are sent per round-triptime, R. Thus, in approximately one round-trip time,W acknowledgments return (assuming no lost packets),causingW to increase by1. Although network datais transmitted in discrete packets, during the period ofadditive-increase and in the absence of dropped packets,quantities appear to vary smoothly when viewed over thetime-scales we are interested in (on the order of1 to 100seconds) for our network settings. Hence we model theadditive-increase of the window size continuously:

dW (t)

dt=

1

R(q(t)). (2)

The rate of change of the queue length at a given timeis equal to the difference between the flows into and outof the router. By the explanation above, the flow intothe router at timet is W (t)/R(q(t)). If the queue isoccupied, the flow rate out will be equal to the capacityof the router’s outgoing link,c. Otherwise the flow out isequal to the minimum ofc and the incoming flow rate.

dq(t)

dt=

W (t)R(q(t)) − c whenq(t) > 0,

max(

W (t)R(q(t)) − c, 0

)

whenq(t) = 0.

(3)The exponentially-weighted average queue is deter-

mined by RED upon each packet arrival as follows:

xn+1 = wqn+1 + (1 − w)xn, (4)

where w is the exponential-weighting parameter,0 ≤

w ≤ 1, and the subscripts denote successive measure-ments ofq and x (which occur at packet arrivals) fora given router. This equation describes a low-pass filter,and, making use of the fact thatw is small in practice,it can be approximated by the differential equation:

dx(t)/dt = w(q(t) − x(t))(W (t)/R(q(t))). (5)

The termW (t)/R(q(t)) expresses the rate of packetsarriving at the queue. The model is summarized byequations (2), (3), and (5).

Because of our bulk-transfer and bottleneck assump-tions (see Sec. I), the network is often congested tothe point of saturation. This allows us to simplify themodel by discarding theq = 0 case in equation (3), andreplacing the packet rate term in equation (5) with thebottleneck link capacity,c, as follows:

dW (t)

dt=

1

R(q(t))(6)

dq(t)

dt=

W (t)

R(q(t))− c (7)

dx(t)

dt= wc(q(t) − x(t)). (8)

2) MODELING THE MULTIPLICATIVEDECREASE: In a real network situation, a routerusing RED will drop an arriving packet with probabilityp given by:

p(x) =

0 whenx < qmin,x−qmin

qmax−qminpmax whenqmin ≤ x ≤ qmax ,

1 whenx > qmax.(9)

In practice, this usually causes a packet to be droppedsoon afterx exceedsqmin. For the purposes of keepingour model simple and deterministic, we assume a dropoccurs as soon asx exceedsqmin. We continue to evolvethe continuous system for one round-trip time to reflectthe delay in notification of the sender that a packet hasbeen dropped. Then we cut the window state variable,W , in half. Next the continuous evolution resumes butwe hold the window state variable constant for oneround-trip time1. This is done in order to represent theFast Recovery/Fast Retransmit(FRFR) algorithm in theNewReno2 version of TCP. Once this round-trip timehas elapsed, the model resumes continuous evolution asdescribed in Section II-A.1.

Denoting the continuous-time system of equations(6), (7), and (8) byA, we can summarize the continuous-time model in hybrid systems form as in Fig. 2, whereTis a timer variable. The use of a hybrid system to expressthe model was suggested by [10]. Our model beginsin the congestion avoidance phase, following the set ofequations,A. Oncex exceedsqmin, the model assumesa drop occurs, and it transitions to the delayed dropnotification phase. In this phase, it continues followingthe original set of equations but now it also utilizes acount-down timer,T , which expires one round-trip time

1For simplicity, we are neglecting the period in which no dataaretransmitted which would necessarily occur after the windowcut.

2Recent indications are that NewReno appears to be the mostwidely used variant of TCP [1].

4

Fig. 2. Hybrid systems view of the continuous-time model.A standsfor equations (6), (7), and (8).T ′

= dT/dt andW ′= dW/dt.

from the timex exceedsqmin. Once this timer expires,the model transitions into the recovery phase, first cuttingW in half and initializing a new count-down timer atthe value of the present round-trip time. In the recoveryphase, the equations still hold, but with one exception:Wis now held fixed. Finally, when this count-down timerexpires, the model returns to the congestion avoidancephase.

3) MODELING MULTIPLE SENDERS: Thecontinuous-time model can be easily generalized tohandle more than one sender. As in the case of onesender, we assume each additional sender is upstreamfrom the bottleneck link and engaged in bulk transfer,sending data as fast as allowed by TCP. Following [4],denote the window size of theith sender byWi. Wekeep track of each sender’s window separately. Thequeue equation (3) is replaced by:

dq(t)

dt=

(∑N

i=1Wi(t)

Ri(q(t))) − c whenq(t) > 0,

max((∑N

i=1Wi(t)

Ri(q(t))) − c, 0) whenq(t) = 0.

(10)The connections need not all share the same fixedpropagation delay, as theRi terms indicate. We use aseparate copy of (2) for each windowWi, and a separatetimer variable for each connection.

B. TOWARDS A DISCRETE-TIME MODEL

In practice, the differential equations in thecontinuous-time model can be solved by numericalintegration using a simple scheme such as Euler’smethod. The main requirement is that the time step besmall enough to reflect system behavior occurring onthe smallest time-scale. In the given network scenario,the smallest time scale is the spacing between packets,which, as dictated by the bottleneck link, is equal to

1/c. We will now show that the use of1/c as a timestep allows us to express the model in a simplified wayas a discrete-time system.

The Euler numerical integration step for theW equa-tion (2), is

Wk+1 = Wk + h1

a + qk/c, (11)

whereh represents the time step. Settingh = 1/c, wehave

Wk+1 = Wk +1

ac + qk

. (12)

For theq equation (3), neglecting theq(t) = 0 term forthe moment, the Euler step is

qk+1 = qk + h

(

Wk

a + qk/c− c

)

, (13)

which simplifies to

qk+1 = qk +Wk

ac + qk

− 1, (14)

using the time step1/c. Note that in the above equation,the middle term represents the flow in per time step andthe final term, the−1, represents the flow out per timestep. In case the queue is empty, we omit the−1 termas no packets will leave within that time step:

qk+1 =

{

qk + Wk

ac+qk− 1 whenqk > 0,

qk + Wk

ac+qk= Wk

acwhenqk = 0.

(15)

Finally, it is easy to show that this choice of time stepreturns the equation forx back to its original form.

xk+1 = wqk+1 + (1 − w)xk. (16)

Note, we are still using the assumption that RED isupdating the average queue size as if packets werearriving at the queue at a rate ofc.

Summarizing these equations, we have a discrete-time model representation of the original continuous-time system that gives an intuitive description of theTCP dynamics on the shortest time-scale. We can utilizethe same overall procedure as the continuous-time model(see Fig. 2), substituting the maps (12), (15) and (16)above for the differential equations (6), (7) and (8).

C. THE DISCRETE-TIME MODEL

We can derive a similar but even more simplifieddiscrete-time model by making the assumption that thesystem is saturated. As with the continuous-time model,the discrete-time model uses the three state variablesW ,q, andx and consists of two primary components. Thefirst component is a discrete-time map used to model thechange in each of the state variables during the additive

5

increase phase. The second part is an impulse that workssimilar to the one in the continuous-time model – itaccounts for the sudden adjustment in the window sizedue to a dropped packet.

1) MODELING THE ADDITIVE INCREASE: Inpractice, after an initial transient, the bottleneck linkin the scenario we model will reach saturation and aqueue will form at the router. Packets leave the queueat evenly spaced intervals of lengthδ = 1/c, wherecis the capacity of the outgoing link. For instance, if thelink has a capacity of200 packets per second, the out-going packets will be spaced (front-to-front) by1/200sor .005s.3 When these packets reach their destination,acknowledgment packets are sent out, with the samespacing. The arrival of the acknowledgment packets atthe sender results in the sending of new data packets.Receipt of an acknowledgment frees one packet positionin the TCP send window,W , and causesW to increaseby 1/W . Typically this means that one packet is sent foreach arriving acknowledgment. Occasionally, whenWreaches the next integer value, two packets are sent uponreceipt of an acknowledgment. In other words, usuallyone packet arrives at the queue everyδ seconds whileone packet leaves the queue everyδ seconds, resultingin no net change in queue length. But occasionally,2packets arrive at the queue in aδ-second interval whilestill only one leaves. This is the primary cause of queuelength increase in this scenario.

The description above refers to what is sometimesknown as theself-clocking nature of TCP. That is, a TCPsender has the ability to determine the limiting capacityin its flow path and send its packets at that rate. We takeadvantage of this behavior in our model, by employingδas the time step in a discrete-time model of this system.

The time step is given by:

tk = t0 + kδ, k = 0, 1, 2, . . . (17)

where the timet0 marks the start of saturation. Ourequation forW follows directly from the rules of TCP:

Wk+1 = Wk +1

Wk

. (18)

We express the change in the queue length as follows:

qk+1 = qk +1

Wk

. (19)

While this yields fractional-valued queues, it doesresult in the queue length increasing by1 each timeWincreases by1, as described above, and is simpler to

3Throughout this paper we assume uniform packet size unlessspecified otherwise.

express than the more realistic alternative. The equationfor x is the actual equation used by RED (the assumptionof saturation means packets arrive each time step and sox is updated each time step):

xk+1 = wqk + (1 − w)xk. (20)

The round-trip time, from (1), is:

R(qk) = a +qk

c=

(

a

δ+ qk

)

δ. (21)

In multiples of the time stepδ, the round-trip time isthus best approximated bymk = nint(a/δ + qk) where“nint” means the nearest integer.

We initialize the additive-increase phase of the modelat the start of saturation, or, in other words, at the onset ofqueuing. Just prior to this time, there is an exact balancebetween the flow in and out of the router. The flow inis equal toW (t0)/R(q(t0)) = W (t0)/(a + q(t0)/c).Since q(t0) = 0 at this point, the flow in isW (t0)/aand the flow out isc. Thus the initial conditions for thediscrete-time model areq0 = 0 and W0 = ca. (Notethat W0 corresponds to the so-calledbandwidth-delayproduct which is often used to estimate buffering fornetwork resources.)

2) MODELING THE MULTIPLICATIVEDECREASE: We model the multiplicative decreasehere in much the same way as in the continuous-timemodel but with one additional element. As in thecontinuous-time model, we assume a drop occurs assoon asx exceedsqmin: If xk > qmin then at timek + mk − 1, replace (18) with

Wk+mk=

1

2Wk+mk−1, (22)

which reflects the delay of1 round-trip time in drop no-tification. We take advantage of the packet-level timingof this model to incorporate an additional aspect of whatoccurs to a network sender following a window cut. Ina network, after cutting its window fromW to W/2,the sender will not send packets forW/2 time steps.This reflects the fact that acknowledgments for packetsin the half of the window that is no longer accessiblewill not trigger the transmission of any new packets.As a result, the queue length will decrease. We modelthis by using the following equations for the nextW/2timesteps whereW is the window size just prior to thewindow cut:

Wk+1 = Wk, (23)

qk+1 = qk − 1. (24)

Note that Wk remains fixed following the rules ofFast Recovery/Fast Retransmit, as was done in the

6

Fig. 3. Hybrid systems view of the discrete-time model.

continuous-time model. Next we continue to holdWk

constant and now also holdqk constant to reflect therest of the recovery period. In other words, the senderis sending packets but not increasing its window, hencethe queue length should remain fixed:

qk+1 = qk. (25)

As with the continuous-time model, we can present thediscrete-time model in hybrid systems form as picturedin Fig. 3. Each rounded rectangle contains the numbersof the equations to be used, and a timer variable,Tk, isutilized. The model begins in the congestion avoidancephase, obeying equations (18) , (19), and (20). Oncexexceedsqmin, the model assumes a drop occurs, and ittransitions to the delayed drop notification phase. In thisphase, it continues to obey the original set of equations,but now it also utilizes the count-down timer,Tk, whichexpires one round-trip time from the timex exceedsqmin. (The round-trip time is given bymk, which wasdefined following equation (21).) Once this timer expires,the model cutsWk in half, initializes a new count-downtimer at the value of the present round-trip time (whichwe label m) and transitions into the recovery phasein which no packets are being sent. In this phase ofthe recovery, replace equations (18) and (19) used inthe earlier phases, with (23) and (24), respectively. Asmentioned above, this phase should lastW/2 time steps.It is not difficult to show that thisW/2 is equal to.5mthough we leave this result out for the sake of brevity.When the timer has been reduced by.5m, the modelmoves into the final state – recovery with transmission.Here it uses equations (23), (25) and (20). Finally, whenthe count-down timer expires, the model returns to thecongestion avoidance phase.

3) MODELING MULTIPLE SENDERS: In order toaccount for multiple senders, we must modify the

TABLE I

PARAMETER SETTINGS

Variable Description Valuea Fixed propagation delay .01 sc Bottleneck link capacity 1.5 Mbps

qmin RED parameter 50qmax RED parameter 100pmax RED parameter .1

w RED parameter .003—- Packet size 1000 bytes

discrete-time model. Consider the case of two senders,with window sizes ofW (1) and W (2). Typically thesenders will alternate sending windows of packets. Asa result, acknowledgments will arrive at a given senderin bunches. Thus, the1/Wk increase per time stepδindicated in (18), will not actually occur each time stepfor each sender. However, each connection’s window willstill increase by1 per round-trip time. One way to reflectthis in the model is to choose a time step of2δ, use theoriginal W equation (18) for both senders, and changethe queue equation to

qk+1 = qk +1

W(1)k

+1

W(2)k

. (26)

For n senders, use a time step ofnδ and include theterm 1/W

(j)k in the queue equation for each senderj =

1, 2, ..., n.

D. RESULTS

In this section we compare results obtained fromapplying our models to the network set-up mentionedabove with those obtained using the ns simulator on anequivalent network. We used the settings listed in Table I.

We implemented the models in MATLAB. Since wedo not model the slow-start behavior of TCP, we beginthe comparison after an initial transient has ended. InFig. 4, the top plot shows a comparison of the queuelength in the continuous-time model with the resultsfrom the ns network simulator. The middle plot showsthe results of the discrete-time model compared to thesimulator. The bottom plot compares results from thefluid model of Misra et al. [4] with the simulator [13].

Despite their lack of a stochastic component as wellas several of the details of the TCP implementation,our models show good qualitative agreement with thesimulator. We believe that the models have capturedthe essential behavior of this network under these flowconditions. The use of an impulse helps the modelsaccount for the sharp declines in the queue length causedby drop events. Lacking this feature, the fluid model of

7

10 20 30 40 50 60 70 80 900

50

100

# of

pac

kets

Instantaneous queue length

ns simulatorcontinuous−time model

10 20 30 40 50 60 70 80 900

50

100

# of

pac

kets

ns simulatordiscrete−time model

10 20 30 40 50 60 70 80 900

50

100

time (s)

# of

pac

kets

ns simulatorMisra et al. fluid model

Fig. 4. Comparison for one sender

Misra et al. does not perform as well in this case of onesender.

One of the continuous-time model’s inaccuracies isthat the queue length drops down too far. Lacking theno-send phase of the recovery that was included in thediscrete-time model, the continuous-time model’s queuedoes not drop as much during the recovery period. Thisin turn causesx to stay artificially high, high enoughso that after the recovery is complete, it is still aboveqmin. As a result, a subsequent drop occurs, followedby an additional window cut and recovery period, allresulting in a further drop in the queue length. Theconsecutive recoveries’ negative contribution to queuelength outweigh the positive contribution on the queuelength of the lack of a no-send phase. The discrete-timemodel does not have this problem due to the use of theno-send recovery phase.

Another discrepancy found between our models andthe simulator is in the period length of the queueoscillations. The discrete-time model’s period is too shortbecause of the assumption of an instantaneous drop. Atthese settings, it takes, on average, around one secondfrom the time RED turns on until a packet is dropped.In Sec. III we introduce a method to estimate this delayand incorporate it in the models. The continuous model’speriod is too long because of the dual recovery periodswhich outweigh the effect just mentioned.

Fig. 5 shows a similar comparison except now weconsider two senders on the network with identical fixed

10 20 30 40 50 60 70 80 900

50

100

# of

pac

kets

Instantaneous queue length

ns simulatorcontinuous−time model

10 20 30 40 50 60 70 80 900

50

100

# of

pac

kets

ns simulatordiscrete−time model

10 20 30 40 50 60 70 80 900

50

100

time (s)

# of

pac

kets

ns simulatorMisra et al. fluid model

Fig. 5. Comparison for two senders

delays. The network has become harder to model asevidenced by the increased randomness in queue vari-ations. Around the region60 ≤ t ≤ 80, the simulator’sbehavior is analogous to its typical behavior in theone-sender case. Hence, the statements made in theprevious paragraph apply there. What is occurring inthat region is one drop for each sender for each dropevent. For much of the rest of the time interval shown,the variation is due to different drop occurrences such astwo drops for one sender, only one drop, three drops andothers. This suggests a modeling approach more directedtowards statistical agreement than short-term qualitativeagreement for cases of anything but a small number ofsenders.

For larger numbers of senders the model of Misra etal. shows better agreement with the simulator than ourmodels do. Thus our models are advantageous mainlyin cases when the bottleneck link congestion is due toa small number of senders. We propose extensions toour models in the following section to improve theirperformance.

III. EXTENSIONS

Model simplicity is important if we are interestedin being able to concisely describe a system, and foramenability to mathematical analysis. On the otherhand, for the purpose of traffic state estimation, thekey attributes we desire in a model are accuracy andcomputational efficiency. With this in mind, we introduceextensions to the models to improve their accuracy while

8

still keeping the models simpler than a full-fledgedpacket-level simulator. The primary modification weconsider is to implement a more realistic packet droppingmechanism within the models, one that more closelyresembles RED.

A. ESTIMATING THE INTERDROP TIME

As was mentioned in the previous section, one of thediscrepancies between the models and simulator is thatthe models assume a drop occurs as soon as RED turnson. In reality, there tends to be a delay of about onesecond under the settings we are using. Here we describea method to estimate this delay that we can incorporateinto the models while still keeping them deterministic.

In practice, RED has an added layer of complexity.Namely, it has been designed so that effectively, thedrop time is chosen from a uniform distribution on atime interval of length1/p, given a constant RED dropprobability p. As implemented in the ns simulator [13],an additionalwait parameter is used, which causes thistime interval to lie between1/p and2/p from the timeof the last drop. (This spacing also applies to the timebetween RED turning on and the first drop.) As a result,the expected time between drops is3/(2p).

More precisely, whenx exceedsqmin and RED turnson, it begins counting packets in order to determine whena packet drop should occur. The actual drop probabilityused by RED, which we denotepdrop, is given by:

pdrop(p, k) =

0 whenk < 1/p,p/(2 − kp) when1/p ≤ k < 2/p,1 whenk ≥ 2/p,

(27)where k is the number of packets that have arrivedsince RED turned on, or since the previous packet drop.Let K be the random variable representing the numberof packets that arrive between drops, or between REDturning on and the first drop. Ifx is constant, thenpis constant, in which case it can be shown thatK isuniformly distributed between1/p and2/p. This meansE[K] = 3/2p.

Of coursex is generally not constant, and in our modelwe make the rough approximation thatE[K] is thesolution to the equationkdrop = 3/[2p(xkdrop

)], wherexk is the value ofx when the packet counter reachesk. We further approximatex as a linear function ofkbetween packet drops. Rewriting (4) as

xk = xk−1 + w(qk − xk−1), (28)

we replaceqk − xk−1 by q0 − x0:

xk = x0 + kw(q0 − x0) (29)

15 20 25 30 35 40 45 50 55 6020

30

40

50

60

70

80

90Instantaneous queue length

# of

pac

kets

ns simulatorcontinuous−time model

15 20 25 30 35 40 45 50 55 6020

30

40

50

60

70

80

90

time (s)

# of

pac

kets

ns simulatorMisra et al. model

Fig. 6. Comparison of models with ns simulator for the one-senderscenario described in Sec. II-D.

Assuming thatxk remains betweenqmin andqmax,

p(k) = a1k + a2 (30)

where a1 and a2 are constants determined by equa-tions (9) and (29).

Since we want to findkdrop such that kdrop =3/[2p(xkdrop

)], we substitute (30) into this equation.Solving the resulting quadratic produces the followingsolution:

kdrop =−a2 +

a22 + 6a1

2a1(31)

If a22 + 6a1 < 0, then sincea1 < 0, p(k) is a decreasing

function ofk, and we assume that it becomes zero beforeanother drop occurs.

We change the model as follows. When RED turnson, we computek, the expected time until the nextpacket drop. A timer variable counts down this amountand when it expires, we consider the drop to have oc-curred and follow the same procedure as in the previousmodels. This scheme can be implemented for both thecontinuous-time and discrete-time models. In Fig. 6, wepresent results of its application to the continuous-timemodel. The figure shows that using this extension, themodel is able to very closely reproduce the behavior ofthe simulator. However, the accuracy of this approachdiminishes as the number of senders increases. Foreven greater accuracy, we fully implement RED as itis executed in the ns simulator. This is described in thefollowing section.

B. FULL RED IMPLEMENTATION

In order to fully model RED, we begin by followingthe procedure laid out in the previous section up toequation (27). At that point, a uniform random number

9

Fig. 7. Comparison for four senders between the ns simulatorand a realization of the continuous-time model using the full REDimplementation. In both plots, the upper two curves represent theinstantaneous and exponentially averaged queues. (The exponentiallyaveraged queue is the curve showing less variation.) The lower fourcurves in both plots represent the window sizes of the four senders.

between0 and1 is generated and if this number is lessthanpdrop, a drop occurs. In the case of multiple senders,the probability of a given sender experiencing the drop isproportional to that sender’s share(Wi

Ri)/(

∑Nj=1

Wj

Rj) of

the overall flow. This introduces a greater degree of com-plexity and a stochastic component to the model. Sinceour ultimate goal is network traffic state estimation, ourmain priorities are model accuracy and computationalefficiency.

We applied this model to the network described earlier,but now with four senders at varying fixed propagationdelays from the receiver. Fig. 7 shows that there isgood qualitative agreement between the model and thesimulator. The additional jitter in the simulator’s queueis due to packet level activity. The model shows goodstatistical agreement with the simulator as well. Fig. 8shows a comparison of queue histograms. Note thatthe model correctly captures the range in queue values,which can be used to calculate the range of round-triptimes.

In order to evaluate the model’s responsiveness tonetwork changes, we tested it on a network with twoclasses of flows, one of which turns off for part of therun. The classes both consist of five bulk transfer senders,but the fixed propagation delay is different for each class:20 ms for class1 senders,35 ms for class2 senders. Theclass2 senders turn off from75 to 125 seconds after thestart of the run. In practice, this effect could be caused

30 35 40 45 50 55 60 65 70 750

2000

4000

6000

8000

Fre

quen

cy

Instantaneous queue value

Simulator

30 35 40 45 50 55 60 65 70 750

2000

4000

6000

8000

Instantaneous queue value

Fre

quen

cy

Continuous−time model with full RED implementation

Fig. 8. Comparison of instantaneous queue histograms for the four-sender network. The model is using the full RED implementation.Model queue values, which may be fractional, have been roundedfor the purposes of comparison.

by the sender-side application not having data to send forthat stretch of time. Another possibility could be that theclass2 senders are temporarily rerouted.

The results, shown in Fig. 9, indicate that the modeldoes a good job of capturing the changes in the networkstate caused by the senders turning off. This includesthe sudden drop in the queue just after the senders turnoff. The model also reproduces the overall decreasedlevel of the queue and increased level of the class 1senders’ windows during the class 2 off period. Sinceboth simulator and model have stochastic components,each plot represents a realization rather than the expectedperformance. Nevertheless, based on our observationsof many realizations for both model and simulator, weexpect the average performance to show good correspon-dence as well. For the time being, we give statisticsfrom sample realizations in Table II, indicating the closestatistical match between model and simulator. Note thatthe model is able to estimate the variance of the queueto within 10%. This implies that by using the modelin conjunction with the round-trip time equation (1), areasonable estimate of the variance of the round-trip timecan be obtained.

IV. TOWARDS NETWORK STATE ESTIMATION

Ultimately, we plan to use these models in a networktraffic state estimation scheme. The state estimationproblem can be posed as follows: Consider a network ofN senders and one bottleneck router, whose state can becharacterized by the sender window sizes and the routerqueue and exponentially averaged queue lengths. Givenonly a series of observations of some subset of the full

10

40 60 80 100 120 140 160 180 2000

20

40

60

80

100

time (s)

# of

pac

kets

Continuous−time model with full RED implementation

queueewa queuewindows

40 60 80 100 120 140 160 180 2000

20

40

60

80

100

time (s)

# of

pac

kets

Simulator

queueewa queuewindows

Fig. 9. Comparison for two classes with five senders per class. Class2 senders are off from 75 to 125 seconds.

TABLE II

STATISTICAL COMPARISON

Variable Quantity Simulator ModelAll Flows On

q mean 65.5 66.7q st.dev. 4.8 4.4

Half of the Flows Offq mean 56.0 56.0q st.dev. 7.0 6.5

network state, such as the window sizes and round-triptimes of a small number of senders, what is our bestestimate of the state of the system at the current time?That is, we must estimate all of the sender window sizes,using only the past history of some observed portion ofthe state of the network.

The estimation scheme we have in mind can bedescribed as a particle filter or, more generally, a sequen-tial Monte Carlo method [14], [15]. The basic idea isrelated to that of a Kalman filter. But unlike the Kalmanfilter, the particle filter makes no assumptions about thelinearity of the model, or about probability distributions

being Gaussian. Thus it is a better fit for our model andsystem.

The particle filter starts off with a random ensembleof states. It uses the observation to filter and re-weightthe ensemble members based on how consistent they arewith the observation. Then the ensemble members areadvanced in time using the model, and the filter and re-weighting process repeats. We are currently testing thisprocedure in a variety of network scenarios.

V. CONCLUSION

We have developed two deterministic models with adiscrete impulse that successfully capture the networkbehavior of TCP/RED in simple cases. Extending themodels by adding a stochastic dropping mechanismconsistent with RED, the models shows good correspon-dence in more complicated network situations, includingthose with larger numbers of senders and flows turningon and off.

Aside from network traffic state estimation describedin Sec. IV, other works in progress include estimation ofsome dynamical properties such as period length, max-imum sender window size and drop rate. Additionally,we are applying our models to networks subject to cross-traffic, including one that is prone to irregular behaviordue to the presence of a source that sends large burstsof packets at regular intervals.4

REFERENCES

[1] A. Medina, M. Allman and S. Floyd, “Measuring the Evolutionof Transport Protocols in the Internet”, preprint, available fromhttp://www.icir.org/tbit.

[2] M. Fomenkov, K. Keys, D. Moore and k claffy, “LongitudinalStudy of Internet Traffic in 1998-2003”, technical report, Coop-erative Association for Internet Data Analysis (CAIDA), 2003.

[3] S. Floyd and V. Jacobson, “Random Early Detection Gatewaysfor Congestion Avoidance,”IEEE Trans. on Networking, Vol.1,no. 7, pp. 397-413, 1993.

[4] V. Misra, W. Gong, D. Towsley. “Fluid-based Analysis of aNetwork of AQM Routers Supporting TCP Flows with anApplication to RED,”Proc. of SIGCOMM 2000.

[5] V. Firoiu and M. Borden, “Study of Active Queue Managementfor Congestion Control,”Proc. of Infocom 2000.

[6] P. Ranjan, E. Abed and R. La, “Nonlinear Instabilities inTCP-RED,” Proc. of Infocom 2002.

[7] S.H. Low, F. Paganini, J. Wang, S. Adlakha and J. Doyle,“Dynamics of TCP/RED and a Scalable Control,”Proc. ofInfocom 2002.

[8] M. Mathis, J. Semke, J. Mahdavi, and T. Ott, “The MacroscopicBehavior of the TCP Congestion Avoidance Algorithm,”Com-puter Communications Review, Vol. 27, no. 3, 1997.

[9] J. Padhye, V. Firoiu, D. Towsley, and J. Kurose, “ModelingTCP Throughput: A Simple Model and its Empirical Validation,”Proc. of SIGCOMM 1998.

4This work is part of the first author’s Ph.D. dissertation.

11

[10] J. Hespanha, S. Bohacek, K. Obraczka and J. Lee, “HybridModeling of TCP Congestion Control,”Lecture Notes in Com-puter Science, no. 2034, pp. 291-304, 2001.

[11] S. Bohacek, J. Hespanha, J. Lee and K. Obraczka, “A HybridSystems Modeling Framework for Fast and Accurate Simulationof Data Communication Networks,”Proc. of SIGMETRICS 2003.

[12] Y. Liu, F. Lo Presti, V. Misra, D. Towsley and Y. Gu, “FluidModels and Solutions for Large-Scale IP Networks,”Proc. ofSIGMETRICS 2003.

[13] http://www.isi.edu/nsnam/ns/[14] N. Gordon, D. Salmond and A. Smith, “Novel approach

to nonlinear/non-Gaussian Bayesian state estimation,”IEEProceedings-F, Vol. 140, no. 2, pp. 107-113, 1993.

[15] A. Doucet, N. de Freitas, N. Gordon, eds.,Sequential MonteCarlo Methods in Practice, Springer, New York, 2001.