[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] SYN in TCP/Reno
Hi again,
Whats bothering me is that the sequence numbers for ACKs in Agent/FullTcp
doesn't seem to be working correctly.
This is how I use FullTcp:
set ttcp0 [new Agent/TCP/FullTcp]
set sink [new Agent/TCP/FullTcp]
$ns attach-agent $n0 $ttcp0
$ns attach-agent $n2 $sink
$ttcp0 set fid_ 2
$sink set fid_ 1
$ns connect $ttcp0 $sink
$sink listen
and then I use trace-all:
set trace_all [open out.all w]
$ns trace-all $trace_all
here is a bit of my out.all file:
r 0.28872 2 1 ack 40 ------- 1 2.0 0.0 1 4
+ 0.28872 1 0 ack 40 ------- 1 2.0 0.0 1 4
- 0.28872 1 0 ack 40 ------- 1 2.0 0.0 1 4
r 0.29904 1 0 ack 40 ------- 1 2.0 0.0 1 4
+ 0.29904 0 1 tcp 576 ------- 2 0.0 2.0 537 5
- 0.29904 0 1 tcp 576 ------- 2 0.0 2.0 537 5
+ 0.29904 0 1 tcp 576 ------- 2 0.0 2.0 1073 6
- 0.303648 0 1 tcp 576 ------- 2 0.0 2.0 1073 6
r 0.313648 0 1 tcp 576 ------- 2 0.0 2.0 537 5
+ 0.313648 1 2 tcp 576 ------- 2 0.0 2.0 537 5
- 0.313648 1 2 tcp 576 ------- 2 0.0 2.0 537 5
r 0.318256 0 1 tcp 576 ------- 2 0.0 2.0 1073 6
+ 0.318256 1 2 tcp 576 ------- 2 0.0 2.0 1073 6
- 0.405808 1 2 tcp 576 ------- 2 0.0 2.0 1073 6
r 0.415808 1 2 tcp 576 ------- 2 0.0 2.0 537 5
+ 0.415808 2 1 ack 40 ------- 1 2.0 0.0 1 7
- 0.415808 2 1 ack 40 ------- 1 2.0 0.0 1 7
r 0.432208 2 1 ack 40 ------- 1 2.0 0.0 1 7
+ 0.432208 1 0 ack 40 ------- 1 2.0 0.0 1 7
- 0.432208 1 0 ack 40 ------- 1 2.0 0.0 1 7
r 0.442528 1 0 ack 40 ------- 1 2.0 0.0 1 7
^
^
As can be seen the generated sequence number for ack is wrong. In fact, it is
always set to 1, from now on.
Then I'm using awk to extract the time of the ack and seq-nbr:
exec awk {
{
if (($1 == "r") && ($5 == "ack") &&\
($3 == "1") && ($4 == "0"))\
print $2, $11
}
} out.all > out.ack
Here is a part of the out.ack file:
0.15344 0
0.29904 1
0.442528 1
0.534688 1
0.626848 1
0.719008 1
0.811168 1
0.903328 1
0.995488 1
1.087648 1
1.179808 1
1.271968 1
1.364128 1
Here we see that after the intial ack, all acks seq-nbrs are set to 1.
This works OK for TCP/Reno and TCPSink. However, as I said before, TCP/Reno
doesn't implement the intial SYN and SYN+ACK etc.
I hope this clarify my question. Do anyone have any idea whats wrong. Bug in
FullTcp?
/Anders
>Anders Nilsson wrote:
>
>> Hi all!
>>
>> I am simulating file-transfer using the TCP/Reno implementation. The problem
>is
>> that this implementation doesn't send the intial SYN-command on setup. This
>> affects the total transfer time.
>> The reason for using TCP Reno is that it implements the Fast Recovery
>algorithm,
>> which I am currently simulating.
>>
>> I've also tried using TCP/FullTCP which also implements the Fast Recovery
>> algorithm. However, tracing doesn't work correctly for ACKs here.
>
>What do you mean by tracing doesn't work correctly for ACKs? Post an example,
>please.
>
>> Have anyone any suggestions on how to simulate TCP Reno AND using the initial
>> SYN?
>
>You have to use FullTcp to simulate connection establishment and termination.
>
>-- Felix Hernandez