[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with fulltcp in NS-1.4
Dear All,
I am using ns-1.4 and am having some difficulty in obtaining the TCP sequence
numbers using the fulltcp model. I would like to know if anyone else has
had the same problem? If so, is there a solution?
Below, is a fragment of the output generated by this simulation.
time=0.02000 src= _o20 cwnd= 1.00000
time=0.02000 src= _o20 dupacks= 0.00000
time=0.02000 src= _o20 seqno=268435232.00000
time=0.02000 src= _o21 cwnd= 1.00000
time=0.02000 src= _o21 dupacks= 0.00000
time=0.02000 src= _o21 seqno=268435232.00000
time=0.03000 src= _o20 cwnd= 1.00000
time=0.03000 src= _o20 dupacks= 0.00000
time=0.03000 src= _o20 seqno=268435232.00000
time=0.03000 src= _o21 cwnd= 1.00000
time=0.03000 src= _o21 dupacks= 0.00000
time=0.03000 src= _o21 seqno=268435232.00000
Clearly, this is not correct.
Any help would be greatfully appreciated.
Regards,
Brad Williamson.
--
,-_|\ Brad Williamson
/ \ Australian Telecommunications Research Institute (ATRI)
*_,^._/ Curtin University of Technology, Perth, Western Australia
v Email: [email protected]
Web: http://www.atri.curtin.edu.au/~brad
--
proc tracevar { src interval var } {
ns at [expr [ns now] + $interval] "tracevar $src $interval $var"
puts "[format "time=%7.5f src=%5s %10s=%10.5f" [ns now] $src $var [$src get $var]]"
}
proc writeln { interval } {
ns at [expr [ns now] + $interval] "writeln $interval"
puts ""
}
set s1 [ns node]
set s2 [ns node]
set d1 [ns node]
set d2 [ns node]
set r1 [ns node]
set r2 [ns node]
set r3 [ns node]
ns_duplex $s1 $r1 10Mb 2ms drop-tail
ns_duplex $s2 $r1 10Mb 2ms drop-tail
ns_duplex $d1 $r3 10Mb 2ms drop-tail
ns_duplex $d2 $r3 10Mb 2ms drop-tail
set l1 [ns_duplex $r1 $r2 10Mb 2ms drop-tail]
set l2 [ns_duplex $r2 $r3 10Mb 2ms drop-tail]
[lindex $l1 0] set queue-limit 500
[lindex $l1 1] set queue-limit 500
[lindex $l2 0] set queue-limit 500
[lindex $l2 1] set queue-limit 500
set src1 [ns agent tcp-full-reno $s1]
set src2 [ns agent tcp-full-reno $s2]
set snk1 [ns agent tcp-full-reno $d1]
set snk2 [ns agent tcp-full-reno $d2]
$src1 set class 0
$snk1 set class 0
$src1 connect [$snk1 addr] [$snk1 port]
$snk1 listen
$src1 set window 1024
$src1 set packet-size 1024
$src1 set maxcwnd 4096
$src1 set iss 0
set ftp1 [$src1 source ftp]
$src2 set class 0
$snk2 set class 0
$src2 connect [$snk2 addr] [$snk2 port]
$snk2 listen
$src2 set window 1024
$src2 set packet-size 1024
$src2 set maxcwnd 4096
$src2 set iss 0
set ftp2 [$src2 source ftp]
ns at 0.0 "$ftp1 start"
ns at 0.0 "$ftp2 start"
ns at 0.0 "tracevar $src1 0.01 cwnd"
ns at 0.0 "tracevar $src1 0.01 dupacks"
ns at 0.0 "tracevar $src1 0.01 seqno"
ns at 0.0 "tracevar $src2 0.01 cwnd"
ns at 0.0 "tracevar $src2 0.01 dupacks"
ns at 0.0 "tracevar $src2 0.01 seqno"
ns at 0.0 "writeln 0.01"
ns at 120.0 "exit 0"
ns run