[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TCP/Fack



Hi,

I am trying to simulate a simple FTP transfer between two nodes using
TCP/Fack. I can not get it to work: the problem seems to be that the variable
"t_seqno_" is not being initialized correctly: 

FackTcpAgent::FackTcpAgent() : wintrim_(0), wintrimmult_(.5),
  rampdown_(0), fack_(-1), retran_data_(0), ss_div4_(0)
{
  bind_bool("ss-div4_", &ss_div4_);
  bind_bool("rampdown_", &rampdown_);
  printf ("here1 %d\n", t_seqno_); fflush(stdout);
}

During execution, ns printed:

here1 268573520

Even if I try: 

TcpAgent::FackTcpAgent() : wintrim_(0), wintrimmult_(.5),
  rampdown_(0), fack_(-1), retran_data_(0), ss_div4_(0)
{
  bind_bool("ss-div4_", &ss_div4_);
  bind_bool("rampdown_", &rampdown_);
  t_seqno_ = 0 ;
  printf ("here2 %d\n", t_seqno_); fflush(stdout);
}

I get: 

here2 393216

If I change "Fack" to Reno or Sack1 in my simulation script, everything
works correctly. 

I am using ns2.1b2. The simulation script is attached below. 

Any help would be greatly appreciated. 

Thanks, 

- Jitu

========
proc finish {} {
  global ns f
  puts "here"
  $ns flush-trace
  close $f
  exit 0
}

set ns [new Simulator]

set f [open out.tr w]
$ns trace-all $f

set s [$ns node]
set d [$ns node]
set r [$ns node]

$ns duplex-link $s $r 10Mb 50ms DropTail
$ns queue-limit $s $r 1000
$ns duplex-link $r $d 10Mb 50ms DropTail
$ns queue-limit $r $d 1000

set tcp [$ns create-connection TCP/Fack $s TCPSink/Sack1/DelAck $r 0]

set ftp [$tcp attach-source FTP]

$ns at 0 "$ftp start"

$ns at 3 "finish"

$ns run