Re: Ns-users Digest, Vol 137, Issue 5

muhammad ismail <[email protected]>
Newsgroups gmane.network.simulator.isi
Message-ID <CAH6k=3dTOz2uEaBoxOqzu8fs74ksk76jOsRZGrY3nO1COuPazQ@mail.gmail.com>
sir plz help me for topology creation for aodv and routing table after that
i break topology and update routing table


On Wed, May 6, 2015 at 5:00 AM, <[email protected]> wrote:

> Send Ns-users mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mailman.isi.edu/mailman/listinfo/ns-users
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Ns-users digest..."
>
>
> Today's Topics:
>
>    1. Re: how to generate nam  file and xgraph (alok9408)
>    2. Do we have a Similar tcl file? (Amodu Oluwatosin)
>    3. Re: how to generate nam  file and xgraph (knudfl)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 4 May 2015 18:37:32 -0700 (MST)
> From: alok9408 <[email protected]>
> Subject: Re: [ns] how to generate nam  file and xgraph
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=us-ascii
>
> sir,
>    Again I  am trying  to generate xgraph  file but it gives  "Problems
> found with input data."
>
>
>
> ---------------------------------------blue.tcl------------------------------------------
> #script illustrating the BLUE algorithm
> #Senders are TCP-SACK senders, and receivers are TCP-SACK sinks
>
> set ns [new Simulator]
>
> # turn on ns and nam tracing
> set f0 [open out0.data w]
> set f1 [open out1.data w]
> set f2 [open out2.data w]
> set f3 [open out3.nam w]
> #$ns trace-all $f
> $ns namtrace-all  $f3
>
> #set the no of TCP flows here
> set nodenum 5
>
> set start_time 1.0
> set finish_time 50
>
> # create the nodes
>
> #First create TCP senders and receivers
>
> for {set i 0} {$i < $nodenum} {incr i} {
>
>     set s($i) [$ns node]
>     set r($i) [$ns node]
> }
>
> #Then create the 2 back-bone routers
> set n1 [$ns node]
> set n2 [$ns node]
>
> # create the links
> #betwwen the senders and n1, receivers and n2
> for {set i 0} {$i < $nodenum} {incr i} {
>
>     $ns duplex-link $s($i) $n1 10Mb 1ms DropTail
>     $ns duplex-link $r($i) $n2 10Mb 1ms DropTail
>
> }
>
> #Bottle neck link between between n1 and n2
> $ns simplex-link $n1 $n2 1Mbps 100ms Blue
> $ns simplex-link $n2 $n1 1Mbps 100ms DropTail
>
> #Configure BLUE queue parameters here
> set blueq [[$ns link $n1 $n2] queue]
> $blueq set decrement 0.00025
> $blueq set increment 0.0025
> $blueq set dhold-time 50ms
> $blueq set ihold-time 50ms
>
> #Enable ECN here
> $blueq set setbit true
>
> #set the queue-limit between n1 and n2
> $ns queue-limit $n1 $n2 50
>
> #set up queue monitor, sample every 0.5 seconds
> set qfile [open "test-blue-qsize.out" w]
> set qm [$ns monitor-queue $n1 $n2 $qfile 0.5]
> [$ns link $n1 $n2] queue-sample-timeout
>
> #create the random number generator
> set rng [new RNG]
>
>
> # create TCP agents
> for {set i 0} {$i < $nodenum} {incr i} {
>
>     set tcp($i) [new Agent/TCP/Sack1]
>     $tcp($i) set fid_ [expr ($i + 1)]
>     $tcp($i) set ecn_ 1
>     set sink($i) [new Agent/TCPSink/Sack1/DelAck]
>     $sink($i) set ecn_ 1
>     $ns attach-agent $s($i) $tcp($i)
>     $ns attach-agent $r($i) $sink($i)
>     $ns connect $tcp($i) $sink($i)
>     set ftp($i) [new Application/FTP]
>     $ftp($i) attach-agent $tcp($i)
>     #set p($i) [new Application/Traffic/Pareto]
>     #$p($i) set packetSize_ 1000
>     #$p($i) set burst_time_ 200ms
>     #$p($i) set idle_time_ 200ms
>     #$p($i) set shape_ 1.5
>     #$p($i) set rate_ 10000K
>     #$p($i) attach-agent $tcp($i)
>     set start_time [$rng uniform 0 1]
>     $ns at $start_time "$ftp($i) start"
>     #$ns at $start_time "$p($i) start"
> }
>
>
> $ns at $finish_time "finish"
>
>
> proc finish {} {
>     global ns  f0 f1 f2  f3
>     #$ns flush-trace
>     #close $qfile
>     puts "running nam..."
>     close $f0
>     close $f1
>     close $f2
>     exec nam out3.nam &
>
>     exec xgraph out0.tr out1.tr out2.tr  -geometry 800x400 &
>     exit 0
> }
>
> $ns run
>
>
>
> --
> View this message in context:
> http://network-simulator-ns-2.7690.n7.nabble.com/how-to-generate-nam-file-and-xgraph-tp29986p29996.html
> Sent from the ns-users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 5 May 2015 10:56:44 +0800
> From: Amodu Oluwatosin <[email protected]>
> Subject: [ns] Do we have a Similar tcl file?
> To: [email protected]
> Message-ID:
>         <
> CA+2PfEJkJUzc7eZ_VjXqbsXj+G3kVu7_XrhqEbkFS_Mb_Lt3Pw@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hi,
>
> A very Good day to you,
>
>
> S1___________R1____________R2............................D1       (RI-R2
> Wired link 200Mbps, 25ms;  R2-D1Wireless link 5ms)
>
>
>
>   S1-R1
> Wired Link(1Gbps, Tms)
>
> Please I would like to know if I can find a similar topology with the one
> above  or if someone is willing to share.
> It consist of a wired link from a source S1 or a number of source which is
> connected to a router ( bottleneck). The router R1 is connected to another
> router R2 via a wired link. R2 is connected to D1 or a number of
> destinations via a wireless link.
>
> I will also appreciate where can I get the following TCP variants (CUBIC
> TCP, HSTCP, WESTWOOD AND BIC)
>
>
> Thank you
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 5 May 2015 09:35:34 -0700 (MST)
> From: knudfl <[email protected]>
> Subject: Re: [ns] how to generate nam  file and xgraph
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=us-ascii
>
> > blue.tcl
>
> Read my above post :
> "Some many lines for "Creating Output Files for Xgraph" were not added to
> blue.tcl".
> Please read http://www.isi.edu/nsnam/ns/tutorial/nsscript4.html
>
> Required is :
> # ----------------------------------- Most of this ---------------
>
> proc attach-expoo-traffic { node sink size burst idle rate } {
>         #Get an instance of the simulator
>         set ns [Simulator instance]
>         #Create a UDP agent and attach it to the node
>         set source [new Agent/UDP]
>         $ns attach-agent $node $source
>
>         #Create an Expoo traffic agent and set its configuration parameters
>         set traffic [new Application/Traffic/Exponential]
>         $traffic set packetSize_ $size
>         $traffic set burst_time_ $burst
>         $traffic set idle_time_ $idle
>         $traffic set rate_ $rate
>
>         # Attach traffic source to the traffic generator
>         $traffic attach-agent $source
>         #Connect the source and the sink
>         $ns connect $source $sink
>         return $traffic
> }
> # -----------------------------------
>
> # ----------------------------------- And this --------------
> set sink0 [new Agent/LossMonitor]
> set sink1 [new Agent/LossMonitor]
> set sink2 [new Agent/LossMonitor]
> $ns attach-agent $n4 $sink0
> $ns attach-agent $n4 $sink1
> $ns attach-agent $n4 $sink2
>
> set source0 [attach-expoo-traffic $n0 $sink0 200 2s 1s 100k]
> set source1 [attach-expoo-traffic $n1 $sink1 200 2s 1s 200k]
> set source2 [attach-expoo-traffic $n2 $sink2 200 2s 1s 300k]
> # ---------------------------------
>
> # --------------------------------- And some ..... --------------
> proc record {} {
>         global sink0 sink1 sink2 f0 f1 f2
>         #Get an instance of the simulator
>         set ns [Simulator instance]
>         #Set the time after which the procedure should be called again
>         set time 0.5
>         #How many bytes have been received by the traffic sinks?
>         set bw0 [$sink0 set bytes_]
>         set bw1 [$sink1 set bytes_]
>         set bw2 [$sink2 set bytes_]
>         #Get the current time
>         set now [$ns now]
>         #Calculate the bandwidth (in MBit/s) and write it to the files
>         puts $f0 "$now [expr $bw0/$time*8/1000000]"
>         puts $f1 "$now [expr $bw1/$time*8/1000000]"
>         puts $f2 "$now [expr $bw2/$time*8/1000000]"
>         #Reset the bytes_ values on the traffic sinks
>         $sink0 set bytes_ 0
>         $sink1 set bytes_ 0
>         $sink2 set bytes_ 0
>         #Re-schedule the procedure
>         $ns at [expr $now+$time] "record"
> # ---------------------------------------------------
>
> # --------------------------- And maybe like this  ...... ---------------
> $ns at 0.0 "record"
> $ns at 10.0 "$source0 start"
> $ns at 10.0 "$source1 start"
> $ns at 10.0 "$source2 start"
> $ns at 50.0 "$source0 stop"
> $ns at 50.0 "$source1 stop"
> $ns at 50.0 "$source2 stop"
> $ns at 60.0 "finish"
> # ---------------------------------
>
> -
>
>
>
> --
> View this message in context:
> http://network-simulator-ns-2.7690.n7.nabble.com/how-to-generate-nam-file-and-xgraph-tp29986p30003.html
> Sent from the ns-users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> _______________________________________________
> Ns-users mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/ns-users
>
>
> End of Ns-users Digest, Vol 137, Issue 5
> ****************************************
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.