Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 38

CHAPTER-1

INTRODUCTION
Network Simulator is an event driven network simulator developed at UC Berkley that simulates
variety of IP networks. Ns begin as a variant of the R!" network simulator in #$%$ and have
evolved substantially over the past few years. &he simulator is written in C''( it uses )&C" as a
*ommand and *onfiguration interfa*e. It is fo*used on modeling network proto*ols like+
,ired( ,ireless( satellite
&CP( U-P( multi*ast( uni*ast
,eb( &elnet( .&P
!d ho* Routing( sensor networks
Infrastru*ture+ stats( tra*ing( error models et*.
1.1 USES
valuate performan*e of e/isting network proto*ols.
Prototyping and evaluation of new proto*ols.
"arge0s*ale simulations not possible in real e/periments.
1.2 CHARACTERISTICS
vent0driven simulator
1odel world as events
Simulator has list of events
Pro*ess+ take ne/t one ( run it until done
a*h event happens in instant of virtual time( but takes arbitrary real time
Single thread of *ontrol
Pa*ket level
1
.I2UR #.# -IRC&)R3 S&RUC&UR ). NS04
.igure #.# shows the dire*tory stru*ture of NS04. In this stru*ture the various *omponents of NS0
4 are shown in hierar*hi*al manner.
1.3 NS-2 PROVIDES
Pa*ket fo*us( layer 5 6 but also ma* layer7
2
/tensive support for network topology simulation 6 nodes( links7.
Support for wired and wireless networks( &CP( U-P( various routing and multi*ast
proto*ols( et*.
8isuali9ation tools( NS output *an be viewed with N!1( the network animator( / graph and
gun plot or *an be pro*essed with *ustom s*ripts.
1.4 LANGUAGES USED
)ne language is used for detailed simulations of proto*ols whi*h re:uire a system
programming languages whi*h *an effi*iently manipulate bytes( pa*ket headers and
implement algorithms that run over large data sets. .or these tasks run0time speed is
important
)ther language is used for a large part of network sear*h whi*h involves slightly varying
parameters or *onfigurations( or :ui*kly e/ploring a number of s*enarios. In these *ases(
iteration time 6*hange the model and re0run7 is more important. Sin*e *onfiguration runs
on*e 6at the beginning of the simulation7( run0time of this part of task is less important.
NS meets both of these needs with two languages( C'' and )&C". C'' is fast to run but slower
to *hange making it suitable for detailed proto*ol implementation. )&C" runs mu*h slower but
*an be *hanges very :ui*kly 6and intera*tively7( making it ideal for simulation *onfiguration. NS
6via t*l*l7 provides glue to make ob;e*ts and variables appear on both languages.
3
CHAPTER-2
OVERVIEW
2.1 ARCHITECTURAL VIEW
In the .igure 4.# a general user 6not an NS developer7 *an be thought of standing at the left
bottom *orner( designing and running simulation in &C" using the simulator ob;e*ts in )&C"
library. &he even s*hedulers and most of the network *omponents are implemented in C'' and
available to )&C" through an )&C" linkage that is implemented using &C"C". &he whole
thing together makes NS( whi*h is )) e/tended &C" interpreter with network simulator
libraries.
.I2UR 4.# !RC<I&C&UR!" 8I, ). NS04
2.2 SIMPLIFIED VIEW
In a simplified users view as shown in .igure #.5( NS04 is ob;e*t0oriented &C" 6)&C"7 s*ript
interpreter that has a simulation event s*heduler and network *omponent ob;e*t libraries( and
4
network set up 6plumbing7 module libraries 6 a*tually plumbing modules are implemented member
fun*tions of base simulator ob;e*t7.
.I2UR 4.4 USR=S 8I, ). NS04
2.3 BUILDING NS-2
&here are two ways to build NS04
from all the pie*es available at UR"+ http+.>>www.isi.edu>nsnam>ns>ns0build.html
ns0allinone
In NS04 from pie*es( we will have to separately install the various *omponents 6 all the
*omponents are available as pie*es on above mentioned site7. In this report we will be *on*erned
about building NS from all0in0one pa*kage.
NS0allinone is a pa*kage whi*h *ontains re:uired *omponents and some optional *omponents
used in running NS. &he pa*kage *ontains an ?install@ s*ript to automati*ally *onfigure( *ompile
and install these *omponents.
2.4 NS-ALLINONE-2.31 COMPONENTS
&*l release %.A.#A 6re:uired *omponent7
5
&k release %.A.#A 6re:uired *omponent7
)t*l release #.#5 6re:uired *omponent7
&*l*l release #.l$ 6re:uired *omponent7
Ns release 4.5# 6re:uired *omponent7
Nam release #.#56optional *omponent7
Bgraph version #4.# 6optional *omponent7
C,eb version 5.Ag 6optional *omponent7
S2B version #.C 6optional *omponent( builds sgblib for all UNIB type platforms7
2t0itm gt0itm and sgb4ns #.# 6optional *omponent7
Dlib version #.4.5 6optional( but re:uired should nam be used7
Currently( NS0!""IN)N works on UNIB platform and other C32,IN for windows
$/>4CCC>/p. !ll newer versions of ns0allinone pa*kage are maintained at UR"+
http+>>www.isi.edu>nsnam>ns>ns.html
2.4.1 TCL
&*l is an elegant programming language. &he feature that makes &*l so powerful is the event0
driven I>) modeled at permeates everything+ files( networking( 2UIs and more. &his makes
&*l programming more *onsistent without having to rely on more *omple/ me*hanism or
add0on0pa*kages like most languages re:uire. Its features are+
1ore *ontrolled stru*tures( su*h as if( for ea*h and swit*h.
String manipulation( in*luding a powerful regular e/pression mat*hing fa*ility. !rbitrary0
length strings *an be passed around and manipulated ;ust as easily as numbers.
I>)( in*luding files on disk( network so*kets and devi*es as serial ports. &*l provides
parti*ularly simple fa*ilities for so*ket *ommuni*ation over the internet.
.ile management+ &*l provides several *ommands for manipulating file names( reading and
writing file attributes( *opying files( deleting files( *reating dire*tories and so on.
6
Sub pro*ess invo*ation+ you *an run other appli*ation with the e/e* *ommand and
*ommuni*ate with them while they run.
"ists+ &*l makes it easy to *reate *olle*tion of values 6lists7 and manipulate them in a
variety of ways.
!rrays+ you *an *reate stru*tured values *onsisting of name0value pairs with arbitrary string
values for the names and values.
&ime and data manipulation
vents+ &*l allows s*ripts to wait for *ertain events to o**ur( su*h as an elapsed time or the
availability of input data on a network so*ket.
2.4.2 Tk
&k is a graphi*al user interfa*e toolkit that takes developing desktop appli*ations to a higher
level than *onventional approa*hes. &k is the standard 2UI not only for &*l but for many other
dynami* languages and *an produ*e ri*h( native appli*ations that run un*hanged a*ross
windows( "INUB.
2.4.3 OTCL
)&*l 6ob;e*t &*l7 is an e/tension to &*l>tk for ob;e*t0oriented programming. Some of )&*ls
features as *ompared to alternatives are+
-esign to dynami*ally e/tensible( like &*l from the ground up.
Builds on &*l synta/ and *on*ept rather than importing other language.
Compa*t yet powerful ob;e*t programming system 6 draws on C")S( small talk and self7
.airly portable implementation 64CCC lines of C( without *ore ha*ks7
2.4.4 NAM
Nam is a &*l>tk based animation tool for viewing network simulation tra*es and real world
pa*ket tra*es. Its supports topology layout( pa*ket level animation and various data inspe*tion
tools. Nam begins at "B".
7
Network animator 6Nam7 provides a visual view of the simulation+
8iew overall topology0nodes and links
Pa*kets in transmission( :ueued and dropped
Can monitor individual nodes( links or pa*kets
Provide graphi*al results with / graph in UNIB only
&he first step to use Nam is to provide the tra*e file. &he tra*e file *ontains topology information
e/ample nodes( links as well as pa*ket tra*es. Usually the tra*e file is generated by NS. -uring
an NS simulation( user *an produ*e topology *onfiguration( layout information and pa*ket tra*es
using tra*ing events in NS. <owever any appli*ation *an generate Nam tra*e file. ,hen the tra*e
file is generated( it is ready to be animated by Nam.
8
.I2UR 4.5 -&!I"- 8I, ). N!1
Upon start up( Nam will read the tra*e file. &hrough its user interfa*e( Nam provides *ontrol over
many aspe*ts of animation. Its features are+
Play forward( play ba*kward( rewind( forward( stop
Set step si9e
Network layout *ontrol
1onitoring pa*kets( :ueues
Current Nam release 68#.##7 is available at UR"+ http+>>www.isi.edu>nsnam>dist>nam0sr*0#.##.tar.g9
2.4.5 X GRAPH
9
B graph is a plotting utility that is produ*ed by NS. It *an be invoked within the &*l *ommand
whi*h thus results in an immediate display after the end of simulation. !s input( / graph
*ommand e/pe*t one or more !SCII files *ontaining /0y data point pair per line. i.e. / graph f#
f4 will point on the same figure the files f# and f4.
.I2UR 4.A B02R!P<
Some options in / graph are+
&itle+ use0t ?title@.
Si9e+ 0geometry / si9e / y si9e
&itle for a/is+0/@/title@ 6 for the title of the / a/is7 and Ey@ytitle@ 6 for the title of y a/is7
Color of the te/t and grid+ with the flag0v.
2.4.6 T!"# F$%#
10
it is a data file whi*h is used to store ## different traffi* parameters and this tra*e file is used for
the generation of the B0graphs. the following *ommands given under below show how a tra*e
file is and how the data gets stored into it.
F)pen the N!1 tra*e file
set nf Gopen out.nam wH
Ins namtra*e0all Inf
F)pen the &ra*e file
set tf Gopen out.tr wH
Ins tra*e0all Itf
&his file must appear immediately after *reating s*heduler and tra*ing *an be turned on
spe*ifi* links by the following *ommands+
Ins tra*e0:ueue InC In#
Ins namtra*e0:ueue InC In#
CHAPTER-3
INSTALLATION OF NS-2
3.1 D&'(%&!)$(* NS2
11
Network Simulation software *an be downloaded from the Internet site at the UR"
http+>>www.isi.edu>nsnam>ns>ns0build.html. It *an be installed and run on windows and
Uni/>"inu/ platforms.
3.2 I(+,!%%!,$&( P&"#)-#
Copy the nsEallinone 04.5#.tar.g9 folder in >usr>home dire*tory.
Untar this folder into home folder itself.
Change the dire*tory to >usr>home>ns0allinone04.5# through *d *ommand
Run. >install. &his s*ript will *onfigure( *ompile and install the re:uired and optional NS4
*omponents. &he s*ript is *ompletely automated.
!fter this run. >validate to *he*k whether all the re:uired *omponents are installed
properly or not. In *ase everything goes right you get a message ?installation su**essful@.
Now to use and run NS4 give the paths for various environment variables.
P!&<JIP!&<+>home>usr>ns0allinone04.5#>bin+>home>usr>ns0allinone0
4.5#>t*l%.A.#A>uni/+>home>usr>ns0allinone0
4.5#>tk%.A.#A>uni/+>home>mukul>ns0allinone04.5#>tk%.A.#A>uni/
/port"-K"IBR!R3KP!&<J>home>usr>ns0allinone04.5#>ns0
4.5#>allinone>ot*l#.#5+>home>usr>ns0allinone04.5#>ns04.5#>allinone>lib
/port &C"K"IBR!R3J>home>usr>ns0allinone04.5#>t*l%.A.#A>library
Now you are ready to run and e/e*ute t*l s*ripts.
CHAPTER-4
TRANSPORT LA.ER PROTOCOLS
4.1 T!(+/$++$&( C&(,&% P&,&"&%
12
&he &ransmission Control Proto*ol 6&CP7 is one of the *ore proto*ols of the Internet proto*ol
suite. &CP provides reliable( in0order delivery of a stream of bytes( making it suitable for
appli*ations like file transfer and e0mail. It is so important in the Internet proto*ol suite that
sometimes the entire suite is referred to as Lthe &CP>IP proto*ol suite.L
4.1.1 R#!+&( 0& TCP
&he Internet Proto*ol 6IP7 works by e/*hanging groups of information *alled pa*kets. Pa*kets are
short se:uen*es of bytes *onsisting of a header and a body. &he header des*ribes the pa*ketMs
destination( whi*h routers on the Internet use to pass the pa*ket along( in generally the right
dire*tion( until it arrives at its final destination. &he body *ontains the appli*ation data.
In *ases of *ongestion( the IP *an dis*ard pa*kets( and( for effi*ien*y reasons( two *onse*utive
pa*kets on the internet *an take different routes to the destination. &hen( the pa*kets *an arrive at
the destination in the wrong order.
&he &CP software library use the IP and provides a simpler interfa*e to appli*ations by hiding
most of the underlying pa*ket stru*tures( rearranging out0of0order pa*kets( minimi9ing network
*ongestion( and re0transmitting dis*arded pa*kets. &hus( &CP very signifi*antly simplifies the
task of writing network appli*ations.
4.1.2 A11%$"!2$%$,3 &0 TCP
&CP is used e/tensively by many of the InternetMs most popular appli*ation proto*ols and
resulting appli*ations( in*luding the ,orld ,ide ,eb( 0mail( .ile &ransfer Proto*ol( Se*ure Shell(
and some streaming media appli*ations.
<owever( be*ause &CP is optimi9ed for a**urate delivery rather than timely delivery( &CP
sometimes in*urs long delays while waiting for out0of0order messages or retransmissions of lost
messages( and it is not parti*ularly suitable for real0time appli*ations su*h as 8oi*e over IP. .or
su*h appli*ations( proto*ols like the Real0time &ransport Proto*ol 6R&P7 running over the User
-atagram Proto*ol 6U-P7 are usually re*ommended instead.
13
4.2 U+# D!,!*!/ P&,&"&%
User -atagram Proto*ol 6U-P7 is one of the *ore proto*ols of the Internet proto*ol suite. Using
U-P( programs on networked *omputers *an send short messages sometimes known as datagrams
6using -atagram So*kets7 to one another. U-P is sometimes *alled the Universal -atagram
Proto*ol. U-P does not guarantee reliability or ordering in the way that &CP does. -atagram=s
may arrive out of order( appear dupli*ated( or go missing without noti*e. !voiding the overhead
of *he*king whether every pa*ket a*tually arrived makes U-P faster and more effi*ient( at least
for appli*ations that do not need guaranteed delivery. &ime0sensitive appli*ations often use U-P
be*ause dropped pa*kets are preferable to delayed pa*kets. U-PMs stateless nature is also useful
for servers that answer small :ueries from huge numbers of *lients. Unlike &CP( U-P is
*ompatible with pa*ket broad*ast 6sending to all on lo*al network7 and multi*asting 6send to all
subs*ribers7.
Common network appli*ations that use U-P in*lude the -omain Name System 6-NS7( streaming
media appli*ations su*h as IP&8( 8oi*e over IP 68oIP7( &rivial .ile &ransfer Proto*ol 6&.&P7 and
online games.
4.3 F#!,-#+ &0 TCP
&CP is a *onne*tion0oriented proto*ol. ! *onne*tion *an be made from *lient to server( and from
then on any data *an be sent along that *onne*tion.
Reliable 0 &CP manages message a*knowledgment( retransmission and timeout. 1any
attempts to reliably deliver the message are made. If it gets lost along the way( the server
will re0re:uest the lost part. In &CP( thereMs either no missing data( or( in *ase of multiple
timeouts( the *onne*tion is dropped.
)rdered 0 if two messages are sent along a *onne*tion( one after the other( the first
message will rea*h the re*eiving appli*ation first. ,hen data pa*kets arrive in the wrong
order( the &CP layer holds the later data until the earlier data *an be rearranged and
delivered to the appli*ation.
14
<eavyweight 0 &CP re:uires three pa*kets ;ust to set up a so*ket( before any a*tual data
*an be sent. It handles *onne*tions( reliability and *ongestion *ontrol. It is a large transport
proto*ol designed on top of IP.
4.4 TCP A*#(,++
&here are three types of &CP agents.
4.4.1 TCP
set t*p Gnew !gent>&CPH
set t*psink Gnew !gent>&CPSinkH
Ins atta*h0agent InC It*p
Ins atta*h0agent In# It*psink
Ins *onne*t It*p It*psink
4.4.2 FTP
set ftp Gnew !ppli*ation>.&PH
Iftp atta*h0agent It*p
4.4.3 TELNET
set telnet Gnew !ppli*ation>&elnetH
Itelnet atta*h0agent It*p
15
.I2UR A.# B0graph of &CP
Streaming 0 -ata is read as a Lstream(L with nothing distinguishing where one pa*ket
ends and another begins. Pa*kets may be split or merged into bigger or smaller data
streams arbitrarily.
4.5 F#!,-#+ &0 UDP
U-P is a simpler message0based *onne*tionless proto*ol. ,ith U-P messages 6pa*kets7 *ross
the network in independent units.
Unreliable 0 ,hen a message is sent( it *annot be known if it will rea*h its destinationN it
*ould get lost along the way. &hereMs no *on*ept of a*knowledgment( retransmission and
timeout.
Not ordered 0 If two messages are sent to the same re*ipient( the order in whi*h they
arrive *annot be predi*ted.
"ightweight 0 &here is no ordering of messages( no tra*king *onne*tions( et*. ItMs a small
transport layer designed on top of IP.
16
-atagram=s 0 Pa*kets are sent individually and are guaranteed to be whole if they arrive.
Pa*kets have definite bounds and no split or merge into data streams may e/ist.
4.6 UDP A*#(,+4
&here are three types of U-P agents+
4.6.1 UDP
set udp Gnew !gent>U-PH
set null Gnew !gent>NullH
Ins atta*h0agent InC Iudp
Ins atta*h0agent In# Inull
Ins *onne*t Iudp Inull
4.6.2 CBR
set sr* Gnew !ppli*ation>&raffi*>CBRH
Isr* atta*h0agent IudpC
4.6.3 E51&(#(,$!% & P!#,& &(-&00
set sr* Gnew !ppli*ation>&raffi*>/ponentialH
set sr* Gnew !ppli*ation>&raffi*>ParetoH
Isr* atta*h0agent IudpC
17
.I2UR A.4 B0graph for U-P


18
CHAPTER 5
IMPLEMENTATION
5.1 I(,&)-",$&(
Be*ause of its *ru*ial role in the stability of the Internet( the performan*e of &CP has been
e/tensively studied. &hese works often model the network as a single bottlene*k node( the one
having the slowest outgoing rate on the path between the source and the destination (we call it
the main bottleneck in the sequel).
&his model is *orre*t if the buffering *apa*ity and the available bandwidths in the other nodes
are very large *ompared to those in the main bottlene*k. <owever( due to the flu*tuations in real
networks( these :uantities *an be very *lose to ea*h other whi*h may result in a different
performan*e. It is known that &CP transmits bursts of pa*kets espe*ially during the Slow Start
6SS7 phase. &hese bursts may *ause a :ueue building in many nodes not only in the main
bottlene*k. &his may avoid a buffer overflow predi*ted by the single bottlene*k model whi*h
will result in an improvement in the performan*e. But also( this may *ause an unpredi*ted
overflow( if the buffers in these nodes are not enough large. &he single node model overestimates
the real performan*e in this latter *ase.
In this report( the study of the performan*e of &CP as a fun*tion of the parameters of all the
nodes *rossed by the *onne*tion is done. !s node parameters( we *onsider the available
bandwidth !() the buffering capacity. -rop &ail buffers are *onsidered be*ause they are widely
used in the Internet. ! general model of the network *onsisting of many nodes is presented.
,e use the Network Simulator (+ to validate the analyti*al results of this paper 6!nalysis of
&CP with several bottlene*k nodes by Chadi Barakat and itan !ltman( I 4CCA7. !mong our
results( it is shown that the other nodes affe*t the Slow Start 6SS7 phase mu*h more than the
Congestion !voidan*e 6C!7 one. &o eliminate the effe*t of the other nodes( their buffers must
s*ale linearly with that of the main bottlene*k. !lthough the buffers re:uired in these nodes are
not as important as in the main bottlene*k( they are ne*essary to absorb &CP bursts when the
output rates of these nodes get *lose to the main bottlene*k rate.
19
5.2 T6# M-%,$1%# N&)# M&)#%
"et O 6pa*kets>s7 be the main bottlene*k rate on the path of a &CP *onne*tion. &his *onne*tion
transfers data between a sour*e Sr and a destination - and *rosses many nodes. ! node of
available bandwidth R 6or of rate R7 is denoted by NR. In order to *onsider the burstiest *ase( it is
supposed that !CPs are not delayed at -. &he modifi*ation of our model to the -elay !CPs
*ase is straightforward. ,e suppose also that the return path is not *ongested. p is then the rate at
whi*h !CPs return to Sr.
Be*ause all the nodes between NO and - re*eive pa*kets at a rate slower than their available
bandwidths( their parameters don=t affe*t the performan*e of &CP. &he following analysis
fo*uses on the impa*t on &CP of nodes between Sr and NO. !**ording to &CP *ongestion *ontrol
algorithms if !CPs are not lost nor delayed( an !CP triggers ma/imum the transmission of a
burst of two pa*kets. &his happens upon every !CP 6re*eption during SS and when the
*ongestion window , in*reases by one segment during C!7. If the nodes between Sr and NO
have an available bandwidth Q 4O( the two0pa*kets bursts will *ross these upstream nodes as if
they don=t e/ist. In this *ase( these nodes *an be ignored and suppose that NO is fed dire*tly by Sr
. &his is what the single node model assumes. Now( if one of the upstream nodes has a rate R 4O(
the bursts will be slowed. ! :ueue will build up in this slow node whi*h redu*es the :ueue
building rate in the main bottlene*k NO.
It *an be said here that &CP bursts are partially absorbed by this upstream node. &his partial
absorption may overflow the buffer in this intermediate node and it may avoid a buffer overflow
in another node. &hus( to study the performan*e of &CP( the network model must take a**ount of
the nodes pre*eding NO and having a rate R 4O. In .igure #( it is shown that in addition to NO( n
nodes of buffers Bi and of bandwidth Oi are *onsidered. &he Oi satisfy O R On R On0# R . . . R O# R
4O.
&his assumption is without loss of generality sin*e if a node is faster than its prede*essor( then no
:ueuing will o**ur there( so the related node *an be ignored while analy9ing the performan*e of
the *onne*tion. &he restri*tion O# R 4O is without loss of generality as well( sin*e a node of rate
20
O# Q 4O would mean that a :ueue never builds up in NO#( sin*e the input rate to that node( even at
bursty periods( is upper0bounded by 4O.
.igure S.#+ &he multiple node Network 1odel
5.3 T6# B#6!7$& &0 TCP D-$(* CA 8C&(*#+,$&( A7&$)!("#9
It is supposed that( during C!( , in*reases by one segment every Round &rip &ime 6R&&7. &he
re*eiver window is set to a high value so that , is only limited by network parameters. !fter the
transmission of a burst of two pa*kets as a result of the window in*rease from , 0 # to ,( the
sour*e transmits , 0 # pa*kets at a rate O followed by a new burst of two pa*kets when the last
!CP of the window , is re*eived. <ere( the window in*reases to , ' #.
"et & be the *onstant *omponent of R&& 6propagation delay plus servi*e time7. If , is smaller
than the Bandwidth0-elay Produ*t 6B-P7O&( the two bursts are separated by a time &. No :ueue
builds up and the window *ontinues growing up linearly by one segment every &. ,hen the
window e/*eeds O&( !CPs start to arrive *ontinuously at the sour*e. &hus( there will not be
enough time for the nodes of rate slower than 4O to serve the two pa*kets of a burst. ! :ueue
starts to build up in the network. !**ording to the single node model( the :ueue is seen only in
the node of rate O and C! ends when B overflows. &his happens at a window , J ,((( J B ' O&.
Su*h assumption is true if the upstream nodes are faster than 4O. <owever( if one upstream node
has a rate slower than 4O( a :ueue builds up in this node in addition to node O whi*h results in a
different value of ,ma/ thus in an different throughput of the *onne*tion.
Consider the two bursts sent when the window in*reases from , 0 # to , and from , to , ' #.
In the *ase , QO & ( the time between these two bursts is e:ual to , > O and the number of
21
pa*kets is e:ual to , ' #. ,e *an say that at a window , Q O&( the sour*e transmits pa*kets at
an average rate RC! J 6, ' l7O>,. &his rate is always greater than O and then the number of
pa*kets waiting in the network always in*reases during C!. &hese waiting pa*kets are
distributed between NO and the upstream nodes having a rate R RC!. &hus( the :ueue in NO
builds up at a rate slower than one pa*ket per R&& as long as there is a Oi 6# RJ i RJ n7 satisfying
O( R RC!. 2iven that RC! is a de*reasing fun*tion of ,( the effe*t of NOi on the performan*e
de*reases when , moves away from O&.
)n*e we rea*h a window , that results in a RC! smaller than all the Oi( all the waiting pa*kets
move to B whi*h puts us in the *ase of the single node model. Be*ause RC! is very *lose to O(
the most interesting *ase is when there e/ists a Oi J O. "et NO( be the *losest node to the sour*e
having a rate Oi J O and suppose that all the nodes between Sr and NOi have a rate Q RC!. )nly
node NOi in the network is fed at a rate faster than its servi*e rate. &CP bursts during C! are then
*ompletely absorbed by this node and a :ueue doesnMt build up in the other nodes. &hus( if many
nodes in the network have the same rate O( the :ueue builds up in the buffer of the *losest node
to the sour*e. &he *apa*ity of this buffer determines alone the value of ,ma/.
In the ne/t se*tions( it is supposed that all the Oi( are larger than RC!. B represents the buffer
si9e of the *losest node to the sour*e having a rate e:ual to O. &o illustrate our *on*lusions( an
e/ample is simulated( a &CP *onne*tion a*ross two nodes of rate Oi and O. It is taken like & J
STCms 6*ase of a 2) satellite7( O J #.S1bps 6&# link7( pa*ket si9eJS#4Bytes( B# J loopa*kets
and B J SCpa*kets. .irst Oi is set to O( then it is in*reased slightly in order to get RC! R O#. In
.igure 4 it is plotted( , as a fun*tion of time for two values of Ol( #.S1bps and #.T1bps.
!lthough O# is in*reased( the average window si9e de*reases resulting in a de*rease in the
average throughput from #.5U#1bps to #.4AU1bps. Indeed( the in*rease in O# has moved the
:ueue from B# to B. 2iven that B R B#( ,( de*reases from 6B# ' O&7 to 6B ' O& 7 whi*h
e/plains this deterioration in the throughput.
22
.igure S.4+&CP performan*e as a fun*tion of O#
5.4 T6# B#6!7$&- &0 TCP )-$(* S%&'+,!,
-uring SS( the sour*e sends long bursts of pa*kets at twi*e O due to a burst of two pa*kets in
response to every new !CP. ! :ueue may then build up in any node not only in NO. If the
buffers in these nodes are not well dimensioned to absorb the bursts sent during SS( they might
overflow early before filling the available *apa*ity in the network. 2iven that &CP *onsiders all
losses as a signal of *ongestion and rea*ts by redu*ing its window( an early buffer overflow
results in an underestimation of the available resour*es in the network.
&his problem o**urs when the SS &hreshold 6,th7 is very large so that the buffers overflow
before getting in C!. It is a typi*al problem of networks with small buffers *ompared to their
B-P. !n e/ample of su*h networks are satellite networks where the B-P is large and where
there are many limitations on the si9e of buffers on satellite board. Buffers in the networks must
be large enough to absorb the bursts sent during SS. If SS &hreshold ,th is a good estimation of
the network *apa*ity( SS must end without suffering from losses. In *ontrast( if ,th is set to a
high default value as at the beginning of a &CP *onne*tion( losses during SS are unavoidable.
23
&hey serve to give ,th a more a**urate value. <owever( these losses must not appear early
otherwise the available bandwidth will be underestimated.
In this report it is *on*entrated on the first *ase where ,th is a *orre*t estimation of the network
*apa*ity and where the aim of SS is to fill :ui*kly this *apa*ity. &he other *ase will be the
sub;e*t of future work.
It is supposed that ,th is set to half ,ma/ J O& ' B. &his is the value &CP gives to ,th after
*ongestion during the *onne*tion lifetime. &he same analysis *an be applied to other values of
,th. ! *ondition to not en*ounter the problems of losses during SS has been *al*ulated. &his
*ondition a**ounts only for the main bottlene*k.
In this se*tion (this *ondition with our general model is re*al*ulated. !s in these works( a &ahoe
version of &CP is used where SS is fre:uently *alled. ,e divide a SS phase into mini0*y*les of
duration &. , doubles every &. -uring mini0*y*le n( Sr sends a burst of 4L pa*kets at rate 4O.
1ini0*y*le n ' # starts when the !CP for the first pa*ket of this burst rea*hes *reate :ueues in
the different buffers of .igure #. &hese :ueues build up at a rate 64O 0 O#7 in B#( at a rate 6Oi 0 # 0
Oi7 in Bi 6i J 4 . . .n7( and at a rate 6On 0 O7 in B.
2iven these rates( it *an be *al*ulated that the number of pa*kets sent in a burst and re:uired to
overflow ea*h buffer
S# J 4OB#>64O 0 O#7 for B#(
Si J Oi0#Bi>6Oi0# 0 Oi7 for Bi 6iJ4V.n7
S J OnBn>6 On 0 O7 for B.
,e get a loss if in a given mini0*y*le( Sr sends a burst of pa*kets at rate 4O larger than at least
one of the Si 6i J # . . .n7 and S. "et SBJ miniJl...n6SSi7. &he loss o**urs in mini0*y*le ring given by
4
n
b
0#
R SBRJ4
nB
( the *ondition to avoid a buffer overflow during SS is for , to rea*h ,th before
,B. &hus( ,th R ,B. In *ontrast to that found in( we see well that this *ondition involves the
parameters of all the nodes not only those of the main bottlene*k. ,e noti*e that even if we
supply NO with a large buffer so as to avoid the overflow a**ording to the *ondition found in6W J
B>O& Q #>57( the other network parameters *an result in a ,B smaller than ,th( then in an
24
o**urren*e of losses and a deterioration of the performan*e. !lso( be*ause its input rate is
bounded by On whi*h is smaller than 4O( the :ueue in buffer B builds up slowly resulting in a
higher value of S. -epending on the values of Si( this may avoid an overflow predi*ted by the
*ondition( W R #>5 whi*h results in a better performan*e.
5.5 T"% C&)# 0& ! %$(#! (#,'&k '$,6 ! +$(*%# 2&,,%#(#"k (&)#4
$0 :;!*" << 2= :
+#, >-#-#?(1(2 @%$()#5 ;!*7 AB
+#, ,$/# @%$()#5 ;!*7 1B
= #%+# :
1-,+ CC
1-,+ C 6AAk2D1A/+ 15Ak2D1A/+ 3AAk2D1A/+ 3AAk2D1A/+ 3AAk2D1A/+C
1-,+ C (A -------- (1 ----------- (2-----------(3-----------(4 -----------(5C
1-,+ CC
1-,+ C C
1-,+ C U+!*#4 (+ ;!*7A >-#-#?(1(2 8$(,#*#9 ,$/# 8#!%9C
1-,+ CC
#5$, 1
=
+#, (+ @(#' S$/-%!,&B
+#, ,!"#?(!/ @&1#( &-,.(!/ 'B
+#, ,!"#?!%% @&1#( &-,.!%% 'B
+#, ,!"#?+'() @&1#( &-,.+#()?'$()&' 'B
;(+ (!/,!"#-!%% ;,!"#?(!/
;(+ ,!"#-!%% ;,!"#?!%%
E D#0$(# ,6# ,&1&%&*3
+#, (A @;(+ (&)#B
25
+#, (1 @;(+ (&)#B
+#, (2 @;(+ (&)#B
+#, (3 @;(+ (&)#B
+#, (4 @;(+ (&)#B
+#, (5 @;(+ (&)#B
E &2F#", 0&/ ,& 2!()'$,6 )#%!3 >-#-#
;(+ )-1%#5-%$(k ;(A ;(1 6AAk2 1A/+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+ ,!"#?(!/ ,!"#?!%% ,!"#?+'()
;(+ 0%-+6-,!"#
"%&+# ;,!"#?(!/
"%&+# ;,!"#?!%%
27
"%&+# ;,!"#?+'()
#5#" (!/ &-,.(!/ N
E#5#" 5*!16 -/ -,k -22 &-,.+#> &-,.)&1 -*#&/#,3 6AA544A N
#5#" 5*!16 &-,.+#()?'$()&' -*#&/#,3 6AA544A N
#5$, A
=
E E5#"-,#
;(+ -(
5.5.1NAM O-,1-,
Stage #+ &he following figure S.5 shows the nam output at time e:ual to #4.%A se*. &he first
pa*ket gets dropped at T.# se* and the se*ond pa*ket gets dropped at #4.S se*.

5.5.2 X-
G!16
28
In this figure( B02raph 630a/is showing sender=s window and B0a/is showing time7 *learly
shows the slowstart phase and the *ongestion avoidan*e phase.
.igure S.A+ B02raph demar*ating SlowStart and Congestion !voidan*e phase.
It *an be e/plained by looking at the &*l *ode( N!1 outputs and the above B02raph that the
sender remains in slowstart phase and in*reases its *ongestion window e/ponentially until it
e/*eeds either the re*eiver window or the pa*ket loss at bottlene*k node takes pla*e. <ere node
no. 4 is the bottlene*k node and pa*ket loss at this node takes pla*e first at time T.#A se*. Now
the time for a*knowledgement for this pa*ket( whi*h is lost gets over by %.# se*. !t this time( the
sender starts afresh the whole pro*ess again 6i.e. entering into the slowstart phase7 but this time it
redu*es the value of the re*eiver window by half and when the *ongestion window be*omes
e:ual to re*eiver window it enters into *ongestion avoidan*e phase. Similarly at time J #4.S se*
one more gets lost and the similar pro*ess take spla*e.
29
.rom the figure 4( it shows that senders window in su*h a single bottlene*k node network
maintains itself at si9e #S whi*h *an be said to be *orresponding to throughput.
5.6 T"% C&)# 0& ! %$(#! (#,'&k '$,6 +#7#!% 2&,,%#(#"k (&)#+4
$0 :;!*" << 2= :
+#, >-#-#?(1(2 @%$()#5 ;!*7 AB
+#, ,$/# @%$()#5 ;!*7 1B
= #%+# :
1-,+ CC
1-,+ C 1A24k2D1A/+ JAAk2D1A/+ KAAk2D1A/+ 6IAk2D1A/+ 5KAk2D1A/+
5AAk2D1A/+ 4AAk2D1A/+ 325k2D1A/+ 25Ak2D1A/+ 2AAk2D1A/+ C
1-,+ C (A -----------(1---------- (2 -----------(3------------(4-----------(5-----------(6------------
(I-----------(K---------(J-------(1AC
1-,+ CC
1-,+ C C
1-,+ C U+!*#4 (+ ;!*7A >-#-#?(1(2 8$(,#*#9 ,$/# 8#!%9C
1-,+ CC
#5$, 1
=
+#, (+ @(#' S$/-%!,&B
+#, ,!"#?(!/ @&1#( &-,.(!/ 'B
+#, ,!"#?!%% @&1#( &-,.!%% 'B
+#, ,!"#?+'() @&1#( &-,.+#()?'$()&' 'B
;(+ (!/,!"#-!%% ;,!"#?(!/
;(+ ,!"#-!%% ;,!"#?!%%
E D#0$(# ,6# ,&1&%&*3
+#, (A @;(+ (&)#B
+#, (1 @;(+ (&)#B
30
+#, (2 @;(+ (&)#B
+#, (3 @;(+ (&)#B
+#, (4 @;(+ (&)#B
+#, (5 @;(+ (&)#B
+#, (6 @;(+ (&)#B
+#, (I @;(+ (&)#B
+#, (K @;(+ (&)#B
+#, (J @;(+ (&)#B
+#, (1A @;(+ (&)#B
E &2F#", 0&/ ,& 2!()'$,6 )#%!3 >-#-#
;(+ )-1%#5-%$(k ;(A ;(1 1A24k2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(1 ;(2 JAAk2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(2 ;(3 KAAk2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(3 ;(4 6IAk2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(4 ;(5 5KAk2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(5 ;(6 5AAk2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(6 ;(I 4AAk2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(I ;(K 325k2 1A/+ D&1T!$%
;(+ )-1%#5-%$(k ;(K ;(J 25Ak2 1A/+ D&1T!$%
;(+ )-1%#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544A N
#5#" 5*!16 &-,.+#()?'$()&' -*#&/#,3 6AA544A N
#5$, A
=
E E5#"-,#
;(+ -(
33
5.6.1 NAM O-,1-,4
&he following figure S.S shows the nam output at time e:ual to #T.AT.
5.6.2 X-G!16
In this figure( B02raph 630a/is showing sender=s window and B0a/is showing time7 *learly
shows the slowstart phase and the *ongestion avoidan*e phase.
34
.igure S.T+ B02raph demar*ating SlowStart and Congestion !voidan*e phase
It *an be e/plained by looking at the &*l *ode( N!1 outputs and the above B02raph that the
sender remains in slowstart phase and in*reases its *ongestion window e/ponentially until it
e/*eeds either the re*eiver window or the pa*ket loss at bottlene*k node takes pla*e. <ere node
no. $ is the main bottlene*k node along with others 6i.e. from nC to n%7 and pa*ket loss at this
node takes pla*e first at time #C.#CC se*. Now the time for a*knowledgment for this pa*ket(
whi*h is lost gets over by #A.4% se*. !t this time( the sender starts afresh the whole pro*ess again
6i.e. entering into the slowstart phase7 but this time it redu*es the value of the re*eiver window
by half and when the *ongestion window be*omes e:ual to re*eiver window it enters into
*ongestion avoidan*e phase.
.rom figure $( it is shown that senders window in su*h a network 6with several and more7
bottlene*k nodes maintains itself at si9e AC whi*h *an said to be *orresponding to throughput.
35
&hus it *an be said that in addition to main bottlene*k nodes( if other nodes are present whi*h are
also bottlene*k( it *an seriously affe*t the performan*e of the entire network as these bottlene*k
nodes absorb the burstiness of &CP traffi* arriving at the main bottlene*k node.
In the previous *ode( several bottlene*k nodes were taken into a**ount but they were less in
number( but in this *ode they are more in number( thus helping in absorbing the burstiness even
more and hen*e in*reasing the throughput or senders window to AC.
36
CHAPTER 6
6.1 R#+-%,+ !() D$+"-++$&(+
&hrough this report we developed three different models whi*h a**ount for all the nodes on the
path of a &CP *onne*tion+
#
st
model made use of the network in whi*h there was a single bottlene*k node( thus the
throughput 6shown by the sender=s window si9e7 of that model was #S.
4
nd
model made use of the network in whi*h there were several bottlene*k nodes( hen*e
absorbed the &CP bursts and improving the throughput( whi*h was AC.
37
REFERENCES
Chadi Barakat and itan !ltman N@!nalysis of &CP with several bottlene*k
nodes@NSophia !ntipolis(.ran*e(4CCANpp+#UC$0#U#5
www.isi.edu
www.wikipedia.*om
www.webopedia.*om
www.ieee.org
Computer Networks by !ndrew S. &anenbaum
NS04 1anual
38

You might also like