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

Re: [ns] Full Tcp Trace File



Hi,
Try to do the modifications that I made below at your script example

         Zattar - Brazil


>From: Abel Mayal <[email protected]>
>To: "ns (users)" <[email protected]>
>Subject: [ns] Full Tcp Trace File
>Date: Fri, 16 Jun 2000 11:08:53 +0100
>
>Hi everyone,
>I'm using the FullTcp Agent for one of my simulations. I normally work
>with the trace file to obtain all the results I want, as link usage,
>number of packets dropped, sent, received, etc... The field number 11 in
>the trace file normally gives the sequence number. That is to say if we
>are using a FTP application and we sent a file divided in ten packets
>the Field 8 (IP flow identifier) will be the same for the ten packets
>but the field 11 (sequence number) will go from 0 to 9 (10 packets).
>This was working for all the other agents (CBR, normal TCP). But when I
>use FullTcp the sequence number (field 11) starts to jump from 1 to 537
>and then to 1073. I need this field to control that the packets have
>been received in order.
>Can anyone tell me how to fix this error? Or maybe is me becouse I'm not
>using propperly the Full TCP Agent. I write the example I'm running in
>NS below:

                                   global opt
                        set opt(ftppkt)      1000
                        set opt(ftpint)       20ms

>#Create a simulator object
>set ns [new Simulator]
>
>#Open a trace file
>set f [open out.tr w]
>$ns trace-all $f
>
>#Open the nam trace file
>set nf [open out.nam w]
>$ns namtrace-all $nf
>
>#Add some colours to the Agents
>$ns color 1 Blue
>$ns color 2 Red
>
>
>#Define a 'finish' procedure
>proc finish {} {
>         global ns nf f
>         $ns flush-trace
>  #Close the trace file
>         close $nf
>         close $f
>  #Execute nam on the trace file
>         exec nam out.nam &
>         exit 0
>}
>
>#Create two nodes
>set n0 [$ns node]
>set n1 [$ns node]
>
>#Create a duplex link between the nodes
>$ns duplex-link $n0 $n1 1Mb 10ms DropTail
>$ns duplex-link-op $n0 $n1 orient 30
>
>#Create TCP source and Sink
>
>set src [new Agent/TCP/FullTcp]
>set sink [new Agent/TCP/FullTcp]
>$ns attach-agent $n0 $src
>$ns attach-agent $n1 $sink
>$src set fid_ 1
>$sink set fid_ 2
>#$src set packetSize_ 576
>$ns connect $src $sink
>$sink listen
>
>
>#Create FTP Application to send packets
>set ftp1 [new Application/FTP]
>$ftp1 attach-agent $src
>                   $ftp1 set packetSize $opt(ftppkt)
                    $ftp1 set interval $opt(ftpint)
>#Schedule events for the FTP Application
>#$ns at 0.05 "$ftp start"
>$ns at 0.02 "$ftp1 produce 10"
>
>$ns at 1.0 "$ns detach-agent $n0 $src ; $ns detach-agent $n1 $sink"
>
>#Call the finish procedure after 3 seconds of simulation time
>$ns at 1.0 "finish"
>
>#Run the simulation
>$ns run
>
>--
>Abel Mayal de la Torre
>
>BT Advanced Communications Technology Centre
>B29/Room 138
>Adastral Park
>Martlesham Heath
>Ipswich
>Suffolk IP5 3RE
>
>Tph: 01473 647615
>E-Mail: [email protected]
>
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com