Professional Documents
Culture Documents
NS2: Contents
16.10.2006
FTP
HTTP
NV
TCP
TFTP
L3
UDP
L2
IP
NET1
NET2
L4
NETn
L1
16.10.2006
Original TCP
sender starts sending immediately with max window size that receivers buffers allow
works as long as network only lightly loaded (users not able to overload network)
early 1980s: series of congestion collapses
during overload network is only carrying retransmitted packets and (almost) no
fresh offered traffic need for congestion control
16.10.2006
TCP Tahoe
Slow start
AIMD
window increased exponentially until packet loss occurs (loss event means that
network capacity has been reached) or to reach congestion avoidance threshold
after reaching threshold (window size just before loss/2) switch to linear increase
(congestion avoidance)
Fast retransmit
sending rate
ACK loss
16.10.2006
TO loss
TO period
TO period
ACK loss
time
TCP Reno
Fast recovery
sending rate
3 x ACK loss
TO loss
TO period
3 x ACK loss
time
TO period
16.10.2006
w w
3
+ ( + 1) + L + w w2 packets sent / lost packet
2
2
8
w
8
8
1
p = 2 rate =
=
3w
RTT
3 RTT p
W
1
T ( p ) min max ,
2bp
3bp
RTT
p 1 + 32 p 2
+ T0 min 1,3
RTT
3
8
gk
g N
j =1
then the mean class-k delay can be solved from the system of linear equations
M
j
jW j
1
Wk 1
=
, k = 1,2,..., M
g k j =1
gk
j =1
k
j + k
j + k
g j
gj
16.10.2006
simplest approximation for class-k RTT is to assume it consists of only the propagation
delays (remember that RTT means by definition the total delay in both directions)
this is more accurate the less the random queuing delays impact the RTT
Other parameters
g i RTT j
=
gj
RTTi
Observe that for a given TCP sender, the RTTs are random
flow arrival rate equals k and the parameter 1/k equals B/C, where B is the mean file
size (file sizes are assumed to be exponentially distributed) and C is the bottleneck bw
Throughput of a class-k flow, denoted by Tk, is by definition the mean file size
divided by the average class-k transfer time, i.e.,
Tk =
16.10.2006
B
Wk
8
Your task is to
16.10.2006
example: creating 10 TCPs, configuring them and storing them in the array tcp()
for {set nn 0} {$nn < 10} {incr nn} {
set tcp_s($nn) [new Agent/TCP/Reno]
$tcp_s($nn) set packetSize_ 1460
$tcp_s($nn) set window_ 1000
$tcp_s($nn) set fid_ $nn
. . .
}
16.10.2006
10
Accessing lists
Example:
set a {1 2 3 4}
set b [lindex $a 1] (=> b = 2, indexing starts from 0)
lappend $a 5 (=> a = {1 2 3 4 5})
16.10.2006
11