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

Re: [ns] Different fid_ with the same TCP agent



Thank you for the answer. The fid_ now is working but I have realised that the sequence number (9th field of the trace file "out.tr") of the second file has not been reset to 0. Normally when you send different files the sequence number of the first packet is 0. So if I�m sending two files form of three packets each, the first packet of the first file should have a sequence number of 0, the second packet 1 and third 2. And when I send the second file the sequence number of the first packet should be 0, then 1 and 2. But I don�t know way the first packet of the second file starts to count from the last packet of the first file, that is to say, 3 instead of sequence number = 0. Could anyone how to reset this counter as well?
 
cheers...
 
ps. Find a copy of the trace file below
 
+ 0.00000 0 1 tcp 576 ------- 1 0.0 1.0 0 0
- 0.00000 0 1 tcp 576 ------- 1 0.0 1.0 0 0
r 0.01261 0 1 tcp 576 ------- 1 0.0 1.0 0 0
+ 0.01261 1 0 ack 40 ------- 1 1.0 0.0 0 1
- 0.01261 1 0 ack 40 ------- 1 1.0 0.0 0 1
r 0.02093 1 0 ack 40 ------- 1 1.0 0.0 0 1
+ 0.02093 0 1 tcp 576 ------- 1 0.0 1.0 1 2
- 0.02093 0 1 tcp 576 ------- 1 0.0 1.0 1 2
+ 0.02093 0 1 tcp 576 ------- 1 0.0 1.0 2 3
- 0.02554 0 1 tcp 576 ------- 1 0.0 1.0 2 3
r 0.03354 0 1 tcp 576 ------- 1 0.0 1.0 1 2
+ 0.03354 1 0 ack 40 ------- 1 1.0 0.0 1 4
- 0.03354 1 0 ack 40 ------- 1 1.0 0.0 1 4
r 0.03814 0 1 tcp 576 ------- 1 0.0 1.0 2 3
+ 0.03814 1 0 ack 40 ------- 1 1.0 0.0 2 5
- 0.03814 1 0 ack 40 ------- 1 1.0 0.0 2 5
r 0.04186 1 0 ack 40 ------- 1 1.0 0.0 1 4
r 0.04646 1 0 ack 40 ------- 1 1.0 0.0 2 5
##### The next line, field 9 should be 0 instead of 3
+ 0.10000 0 1 tcp 576 ------- 2 0.0 1.0 3 6
- 0.10000 0 1 tcp 576 ------- 2 0.0 1.0 3 6
+ 0.10000 0 1 tcp 576 ------- 2 0.0 1.0 4 7
+ 0.10000 0 1 tcp 576 ------- 2 0.0 1.0 5 8
+ 0.10000 0 1 tcp 576 ------- 2 0.0 1.0 6 9
- 0.10461 0 1 tcp 576 ------- 2 0.0 1.0 4 7
- 0.10922 0 1 tcp 576 ------- 2 0.0 1.0 5 8
r 0.11261 0 1 tcp 576 ------- 2 0.0 1.0 3 6
+ 0.11261 1 0 ack 40 ------- 2 1.0 0.0 3 10
- 0.11261 1 0 ack 40 ------- 2 1.0 0.0 3 10
- 0.11382 0 1 tcp 576 ------- 2 0.0 1.0 6 9
r 0.11722 0 1 tcp 576 ------- 2 0.0 1.0 4 7
+ 0.11722 1 0 ack 40 ------- 2 1.0 0.0 4 11
- 0.11722 1 0 ack 40 ------- 2 1.0 0.0 4 11
r 0.12093 1 0 ack 40 ------- 2 1.0 0.0 3 10
r 0.12182 0 1 tcp 576 ------- 2 0.0 1.0 5 8
+ 0.12182 1 0 ack 40 ------- 2 1.0 0.0 5 12
- 0.12182 1 0 ack 40 ------- 2 1.0 0.0 5 12
r 0.12554 1 0 ack 40 ------- 2 1.0 0.0 4 11
r 0.12643 0 1 tcp 576 ------- 2 0.0 1.0 6 9
+ 0.12643 1 0 ack 40 ------- 2 1.0 0.0 6 13
- 0.12643 1 0 ack 40 ------- 2 1.0 0.0 6 13
r 0.13014 1 0 ack 40 ------- 2 1.0 0.0 5 12
r 0.13475 1 0 ack 40 ------- 2 1.0 0.0 6 13

---
Abel Mayal de la Torre
 
BT Advanced Communications Technology Centre
B29 BT Adastral Park
Martlesham Heath
Ipswich
Suffolk
IP5 3RE
UK
 
Tph: 01473 647615
E-Mail: [email protected]
 
 
----- Original Message -----
Sent: Wednesday, August 09, 2000 2:28 PM
Subject: Re: [ns] Different fid_ with the same TCP agent

Abel Mayal wrote:
Hi all,

I am trying to send files with different fid_ numbers from the same TCP agent, but it doesn't work. Here I include a basic example I'm running:

##############################
set ns [new Simulator]

#I SENT THE FIRST FILE WITH fid_ 1
$src set fid_ 1
$sink set fid_ 1
set ftp [new Application/FTP]
$ftp attach-agent $src
$ns at 0.0 "$ftp produce 3"

#I SENT THE SECOND FILE WITH fid_ 2
$src set fid_ 2
$sink set fid_ 2
$ns connect $src $sink
set ftp1 [new Application/FTP]
$ftp1 attach-agent $src
$ns at 0.1 "$ftp1 produce 3"
$ns at 0.5 "finish"


Since you're not scheduling those calls, all your set fid_ occur before the simulation starts. Try to change the time when the second assignment takes place:

$ns at 0.1 "$src set fid_ 2"
$ns at 0.1 "$sink set fid_ 2"

-- Felix Hernandez