Re: [ns] large trace file size>2G

2008-04-01 Thread Song Luo

It's not a bug of ns2, it's a limit set by your operating system. you have
to enable large file support option, and then compile the kernal again. do a
google search you will find many articles on it.

2008/3/25 Zhao Junmin <[EMAIL PROTECTED]>:

>
> when I run a simulation which last 1000s, It produces a big trace file
> whose size is larger than 2G. But In linux,NS can't write >2G trace
> file,so it exits abnormally. I search for some articles,which say  a
> >2G file must be open with a O_LARGEFILE  flag set in linux.
> here Is it a bug in NS?
> How can I resolve  the problem better?
> any suggestion for me and  I am very grateful!
> Thanks!
>
>


-- 
Song Luo
Intelligent Automation, Inc.

My ns blog:
http://ns-3.blogspot.com


Re: [ns] How to choose a particular path if there is more than one path

2008-04-01 Thread Song Luo

check out directory ns/src_rtg, you need this manual source routing module.
The readme file provided a good example.


On Mon, Mar 24, 2008 at 6:29 AM, adimulam srikanth <[EMAIL PROTECTED]>
wrote:

> Hi,
> Thanks for replying. I found not much regarding Manual routing.
>
>  My problem is say I have n1, n2, n3 & n4 nodes. Then I want to haev
> duplex links from n1 to n2, n2 to n4, n1 to n3, n3 to n4.
> I'll have two tcp sources at n1 end which are connected to a sink at n4.
> As I have two flows here. I want each flow to follow one of the path 
> i.en1-n2-n4 & n1-n3-n4.
>
> Also
>
> [$node1 get- module Manual] add-route-to-adj-node -default $node2
> is giving me error.
>
> I am attaching my code file..
>
> I am extremely sorry for the inconvenience.
>
> Please let me know...
>
>
> On Thu, Mar 20, 2008 at 11:18 PM, Song Luo <[EMAIL PROTECTED]> wrote:
>
> > if you are not using wireless nodes, you can use the manual routing
> > module provided by ns2. This module allows you to specify the whole path for
> > a flow.
> >
> >
> > On Wed, Mar 19, 2008 at 9:58 AM, adimulam srikanth <
> > [EMAIL PROTECTED]> wrote:
> >
> > >
> > >  Hi,
> > > I have two applications at a node that want to send data to the same
> > > destination.
> > > And the case is I have more than one path through which I can send the
> > > data.
> > > But when I
> > > tried to start the application both were taking the same path & there
> > > was a
> > > overflow from the queue
> > > of the link.
> > >
> > > I am still a novice to this ns2, I think there is some way I can have
> > > control over the path I can use..
> > >
> > > The topology is like say:
> > > Source & Destination are connected via two paths, each path having an
> > > intermediary node.
> > >
> > >
> > > Thnx,
> > > Srikanth A
> > >
> >
> >
> >
> > --
> > Song Luo
> > Intelligent Automation, Inc.
> > 
> > My ns blog:
> > http://ns-3.blogspot.com
>
>
>


-- 
Song Luo
Intelligent Automation, Inc.

My ns blog:
http://ns-3.blogspot.com


Re: [ns] transmission range

2008-01-15 Thread Song Luo
 -llType $opt(ll) \
> >> >   -macType $opt(mac) \
> >> >   -ifqType $opt(ifq) \
> >> >   -ifqLen $opt(ifqlen) \
> >> >   -antType $opt(ant) \
> >> >   -propType $opt(prop) \
> >> >   -phyType $opt(netif) \
> >> >   -topoInstance $topo \
> >> >   -agentTrace ON \
> >> >   -routerTrace ON \
> >> >   -macTrace OFF \
> >> >   -movementTrace OFF \
> >> >   -channel $chan_1
> >> >
> >> >
> >> > #
> 
> >> > # create node 0, receiving range 250m, carrier sensing range
> >> 500m
> >> > #
> 
> >> >
> >> > Phy/WirelessPhy set CPThresh_ 10.0
> >> > Phy/WirelessPhy set CSThresh_ 9.21756e-11   ;#550m
> >> > Phy/WirelessPhy set RXThresh_ 4.4613e-10;#250m
> >> > Phy/WirelessPhy set bandwidth_ 512kb
> >> > Phy/WirelessPhy set Pt_ 0.2818
> >> > Phy/WirelessPhy set freq_ 2.4e+9
> >> > Phy/WirelessPhy set L_ 1.0
> >> > Antenna/OmniAntenna set X_ 0
> >> > Antenna/OmniAntenna set Y_ 0
> >> > Antenna/OmniAntenna set Z_ 0.25
> >> > Antenna/OmniAntenna set Gt_ 1
> >> > Antenna/OmniAntenna set Gr_ 1
> >> > set node_(0) [$ns node]
> >> > $node_(0) random-motion 0
> >> >
> >> > $node_(0) set X_ 0.0
> >> > $node_(0) set Y_ 0.0
> >> > $node_(0) set Z_ 0.0
> >> >
> >> > # ===
> >> > # create node 1, receiving range 160m, carrier sensing range 400m
> >> > # ===
> >> >
> >> > Phy/WirelessPhy set CPThresh_ 10.0
> >> > Phy/WirelessPhy set CSThresh_ 1.74269e-10   ;#400m
> >> > Phy/WirelessPhy set RXThresh_ 1.08918e-9;#160m
> >> > Phy/WirelessPhy set bandwidth_ 512kb
> >> > Phy/WirelessPhy set Pt_ 0.2818
> >> > Phy/WirelessPhy set freq_ 2.4e+9
> >> > Phy/WirelessPhy set L_ 1.0
> >> > Antenna/OmniAntenna set X_ 0
> >> > Antenna/OmniAntenna set Y_ 0
> >> > Antenna/OmniAntenna set Z_ 0.25
> >> > Antenna/OmniAntenna set Gt_ 1
> >> > Antenna/OmniAntenna set Gr_ 1
> >> > set node_(1) [$ns node]
> >> > $node_(1) random-motion 0
> >> >
> >> > $node_(1) set X_ 200.0
> >> > $node_(1) set Y_ 0.0
> >> > $node_(1) set Z_ 0.0
> >> >
> >> >
> >> > # UDP connections between from node_(0) to node_(1)
> >> >
> >> > set udp_(0) [new Agent/UDP]
> >> > $ns attach-agent $node_(0) $udp_(0)
> >> > $udp_(0) set fid_ 1
> >> > set null_(0) [new Agent/Null]
> >> > $ns attach-agent $node_(1) $null_(0)
> >> > set cbr_(0) [new Application/Traffic/CBR]
> >> > $cbr_(0) set packetSize_ 512
> >> > $cbr_(0) set rate_ 200kb
> >> > $cbr_(0) set maxpkts_ 1
> >> > $cbr_(0) attach-agent $udp_(0)
> >> > $ns connect $udp_(0) $null_(0)
> >> > $ns at 1.0 "$cbr_(0) start"
> >> >
> >> >
> >> > set udp_(4) [new Agent/UDP]
> >> > $ns attach-agent $node_(1) $udp_(4)
> >> > $udp_(4) set fid_ 2
> >> > set null_(4) [new Agent/Null]
> >> > $ns attach-agent $node_(0) $null_(4)
> >> > set cbr_(4) [new Application/Traffic/CBR]
> >> > $cbr_(4) set packetSize_ 512
> >> > $cbr_(4) set rate_ 200kb
> >> > $cbr_(4) set maxpkts_ 1
> >> > $cbr_(4) attach-agent $udp_(4)
> >> > $ns connect $udp_(4) $null_(4)
> >> > $ns at 5.0 "$cbr_(4) start"
> >> >
> >> > $ns at $opt(stop).0002 "puts \"ns EXITING...\" ; $ns halt"
> >> > $ns at $opt(stop).0001 "finish"
> >> >
> >> > proc finish {} {
> >> >
> >> > $ns flush-trace
> >> > close $tracefd
> >> > close $namtrace
> >> > exit 0
> >> > }
> >> >
> >> >
> >> > puts "Starting Simulation..."
> >> > $ns run
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On Jan 7, 2008 12:34 PM, muhamad faiz arief budianto <
> >> [EMAIL PROTECTED]>
> >> > wrote:
> >> >
> >> >> ok i hope it works.
> >> >> give me ur review
> >> >>
> >> >> On 1/7/08, Song Luo <[EMAIL PROTECTED]> wrote:
> >> >> > Hi Muhamad,
> >> >> >
> >> >> > I double checked my inbox, I did not find attachment in your
> email.
> >> >> Maybe it
> >> >> > is lost due to some technical issue. Could you please send the
> >> script
> >> >> to
> >> >> me
> >> >> > again? I really want to try your approaches.
> >> >> >
> >> >> > Thanks.
> >> >> >
> >> >> > Song
> >> >> >
> >> >> > On Jan 4, 2008 6:09 PM, muhamad faiz arief budianto
> >> >> <[EMAIL PROTECTED]
> >> >> >
> >> >> > wrote:
> >> >> >
> >> >> > > i have add my script as an attachment in the previous mail
> >> >> > >
> >> >> > >
> >> >> > > On Jan 5, 2008 4:10 AM, Song Luo <[EMAIL PROTECTED]> wrote:
> >> >> > >
> >> >> > > > Can you give more detail on how you manually set node
> >> >> sensitivities
> >> >> > > > right before creating nodes? Do you write your code in C++
> >> files?
> >> >> which
> >> >> > C++
> >> >> > > > or tcl files did you modify? And what are the statements?
> Maybe
> >> an
> >> >> > example
> >> >> > > > or the files you are currently using can better illustrates.
> If
> >> >> > possible,
> >> >> > > > can you send me your simulation script and modified source
> >> files,
> >> >> I
> >> >> am
> >> >> > very
> >> >> > > > interested in giving it a shot.
> >> >> > > >
> >> >> > > > Thanks.
> >> >> > > >
> >> >> > > >
> >> >> > > > On Jan 4, 2008 10:56 AM, muhamad faiz arief budianto <
> >> >> > > > [EMAIL PROTECTED]> wrote:
> >> >> > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > > i think, actually we can't set our transmission range on
> each
> >> >> node,
> >> >> > > > > without
> >> >> > > > > changing or hack the code from ns.
> >> >> > > > > for now i just set my sensitivity node (RXthre, CST, etc).
> >> and
> >> >> set
> >> >> it
> >> >> > > > > manually just right before we create the nodes.
> >> >> > > > > I already make some simple simulation, for trying some kind
> >> of
> >> >> > > > >  wireless
> >> >> > > > > sensor sims u can say .
> >> >> > > > > It has 25 node and have 3 kind of node.
> >> >> > > > > 1 node for the HOST (80 m range)
> >> >> > > > > 7 node for the MIDDLE (50 m range)
> >> >> > > > > 17 node for the END (30 m range)
> >> >> > > > > the data can travel just from the node that already on it's
> >> >> range.
> >> >> > > > >
> >> >> > > > > the scenario is, the field is just like war field, so i have
> >> to
> >> >> send
> >> >> > > > > data
> >> >> > > > > packet from node 13 to 0 (END to HOST).
> >> >> > > > > i disabled the movement. just try it n give me some feedback
> >> >> about
> >> >> the
> >> >> > > > > range
> >> >> > > > > from each node.
> >> >> > > > > If you want more clearly about the range transmission, i
> draw
> >> >> the
> >> >> > > > > field and
> >> >> > > > > node deployment with some design software (CORELDRAW).
> >> >> > > > > --
> >> >> > > > > jho
> >> >> > > > >
> >> >> > > > >
> >> >> > > >
> >> >> > > >
> >> >> > > > --
> >> >> > > > Song Luo
> >> >> > > > Intelligent Automation, Inc.
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > > --
> >> >> > > jho
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Song Luo
> >> >> > Intelligent Automation, Inc.
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> jho
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Song Luo
> >> > Intelligent Automation, Inc.
> >> >
> >>
> >>
> >>
> >
> >
> > --
> > Song Luo
> > Intelligent Automation, Inc.
> >
>
>
>


-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] transmission range

2008-01-15 Thread Song Luo
   2  ;# number of mobilenodes
> >  set opt(rp) DSR;# routing protocol
> >  set opt(x)1000
> >  set opt(y)1000
> >  set opt(seed) 0.0
> >  set opt(stop) 10.0
> >
> > # ==
> > # Initialize Global Variables
> > # ==
> >   set ns [new Simulator]
> >
> >   $ns use-newtrace
> >   set trace [open out.tr w]
> >   $ns trace-all $trace
> >
> >   set namtrace [open out.nam w]
> >   $ns namtrace-all-wireless $namtrace $opt(x) $opt(y)
> >
> > # ==
> > # set up topography object
> > # ==
> >   set topo [new Topography]
> >   $topo load_flatgrid $opt(x) $opt(y)
> >
> > # ==
> > # Create God --> General Operations Director
> > # ==
> >   create-god $opt(nn)
> >
> > # ==
> > # Create channel (koneksi wireless)
> > # ==
> >  set chan_1 [new $opt(chan)]
> >
> > # ==
> > # configure and create nodes
> > # ==
> >  $ns node-config  -addressType expanded \
> >   -adhocRouting $opt(rp) \
> >   -llType $opt(ll) \
> >   -macType $opt(mac) \
> >   -ifqType $opt(ifq) \
> >   -ifqLen $opt(ifqlen) \
> >   -antType $opt(ant) \
> >   -propType $opt(prop) \
> >   -phyType $opt(netif) \
> >   -topoInstance $topo \
> >   -agentTrace ON \
> >   -routerTrace ON \
> >   -macTrace OFF \
> >   -movementTrace OFF \
> >   -channel $chan_1
> >
> >
> > # 
> > # create node 0, receiving range 250m, carrier sensing range 500m
> > # 
> >
> > Phy/WirelessPhy set CPThresh_ 10.0
> > Phy/WirelessPhy set CSThresh_ 9.21756e-11   ;#550m
> > Phy/WirelessPhy set RXThresh_ 4.4613e-10;#250m
> > Phy/WirelessPhy set bandwidth_ 512kb
> > Phy/WirelessPhy set Pt_ 0.2818
> > Phy/WirelessPhy set freq_ 2.4e+9
> > Phy/WirelessPhy set L_ 1.0
> > Antenna/OmniAntenna set X_ 0
> > Antenna/OmniAntenna set Y_ 0
> > Antenna/OmniAntenna set Z_ 0.25
> > Antenna/OmniAntenna set Gt_ 1
> > Antenna/OmniAntenna set Gr_ 1
> > set node_(0) [$ns node]
> > $node_(0) random-motion 0
> >
> > $node_(0) set X_ 0.0
> > $node_(0) set Y_ 0.0
> > $node_(0) set Z_ 0.0
> >
> > # ===
> > # create node 1, receiving range 160m, carrier sensing range 400m
> > # ===
> >
> > Phy/WirelessPhy set CPThresh_ 10.0
> > Phy/WirelessPhy set CSThresh_ 1.74269e-10   ;#400m
> > Phy/WirelessPhy set RXThresh_ 1.08918e-9;#160m
> > Phy/WirelessPhy set bandwidth_ 512kb
> > Phy/WirelessPhy set Pt_ 0.2818
> > Phy/WirelessPhy set freq_ 2.4e+9
> > Phy/WirelessPhy set L_ 1.0
> > Antenna/OmniAntenna set X_ 0
> > Antenna/OmniAntenna set Y_ 0
> > Antenna/OmniAntenna set Z_ 0.25
> > Antenna/OmniAntenna set Gt_ 1
> > Antenna/OmniAntenna set Gr_ 1
> > set node_(1) [$ns node]
> > $node_(1) random-motion 0
> >
> > $node_(1) set X_ 200.0
> > $node_(1) set Y_ 0.0
> > $node_(1) set Z_ 0.0
> >
> >
> > # UDP connections between from node_(0) to node_(1)
> >
> > set udp_(0) [new Agent/UDP]
> > $ns attach-agent $node_(0) $udp_(0)
> > $udp_(0) set fid_ 1
> > set null_(0) [new Agent/Null]
> > $ns attach-agent $node_(1) $null_(0)
> > set cbr_(0) [new Application/Traffic/CBR]
> > $cbr_(0) set packetSize_ 512
> > $cbr_(0) set rate_ 200kb
> > $cbr_(0) set maxpkts_ 1
> > $cbr_(0) attach-agent $udp_(0)
> > $ns connect $udp_(0) $null_(0)
> > $ns at 1.0 "$cbr_(0) start"
> >
> >
> > set udp_(4) [new Agent/UDP]
> &g

Re: [ns] transmission range

2008-01-15 Thread Song Luo
 > $node_(0) random-motion 0
> >
> > $node_(0) set X_ 0.0
> > $node_(0) set Y_ 0.0
> > $node_(0) set Z_ 0.0
> >
> > # ===
> > # create node 1, receiving range 160m, carrier sensing range 400m
> > # ===
> >
> > Phy/WirelessPhy set CPThresh_ 10.0
> > Phy/WirelessPhy set CSThresh_ 1.74269e-10   ;#400m
> > Phy/WirelessPhy set RXThresh_ 1.08918e-9;#160m
> > Phy/WirelessPhy set bandwidth_ 512kb
> > Phy/WirelessPhy set Pt_ 0.2818
> > Phy/WirelessPhy set freq_ 2.4e+9
> > Phy/WirelessPhy set L_ 1.0
> > Antenna/OmniAntenna set X_ 0
> > Antenna/OmniAntenna set Y_ 0
> > Antenna/OmniAntenna set Z_ 0.25
> > Antenna/OmniAntenna set Gt_ 1
> > Antenna/OmniAntenna set Gr_ 1
> > set node_(1) [$ns node]
> > $node_(1) random-motion 0
> >
> > $node_(1) set X_ 200.0
> > $node_(1) set Y_ 0.0
> > $node_(1) set Z_ 0.0
> >
> >
> > # UDP connections between from node_(0) to node_(1)
> >
> > set udp_(0) [new Agent/UDP]
> > $ns attach-agent $node_(0) $udp_(0)
> > $udp_(0) set fid_ 1
> > set null_(0) [new Agent/Null]
> > $ns attach-agent $node_(1) $null_(0)
> > set cbr_(0) [new Application/Traffic/CBR]
> > $cbr_(0) set packetSize_ 512
> > $cbr_(0) set rate_ 200kb
> > $cbr_(0) set maxpkts_ 1
> > $cbr_(0) attach-agent $udp_(0)
> > $ns connect $udp_(0) $null_(0)
> > $ns at 1.0 "$cbr_(0) start"
> >
> >
> > set udp_(4) [new Agent/UDP]
> > $ns attach-agent $node_(1) $udp_(4)
> > $udp_(4) set fid_ 2
> > set null_(4) [new Agent/Null]
> > $ns attach-agent $node_(0) $null_(4)
> > set cbr_(4) [new Application/Traffic/CBR]
> > $cbr_(4) set packetSize_ 512
> > $cbr_(4) set rate_ 200kb
> > $cbr_(4) set maxpkts_ 1
> > $cbr_(4) attach-agent $udp_(4)
> > $ns connect $udp_(4) $null_(4)
> > $ns at 5.0 "$cbr_(4) start"
> >
> > $ns at $opt(stop).0002 "puts \"ns EXITING...\" ; $ns halt"
> > $ns at $opt(stop).0001 "finish"
> >
> > proc finish {} {
> >
> > $ns flush-trace
> > close $tracefd
> > close $namtrace
> > exit 0
> > }
> >
> >
> > puts "Starting Simulation..."
> > $ns run
> >
> >
> >
> >
> >
> > On Jan 7, 2008 12:34 PM, muhamad faiz arief budianto <
> [EMAIL PROTECTED]>
> > wrote:
> >
> >> ok i hope it works.
> >> give me ur review
> >>
> >> On 1/7/08, Song Luo <[EMAIL PROTECTED]> wrote:
> >> > Hi Muhamad,
> >> >
> >> > I double checked my inbox, I did not find attachment in your email.
> >> Maybe it
> >> > is lost due to some technical issue. Could you please send the script
> >> to
> >> me
> >> > again? I really want to try your approaches.
> >> >
> >> > Thanks.
> >> >
> >> > Song
> >> >
> >> > On Jan 4, 2008 6:09 PM, muhamad faiz arief budianto
> >> <[EMAIL PROTECTED]
> >> >
> >> > wrote:
> >> >
> >> > > i have add my script as an attachment in the previous mail
> >> > >
> >> > >
> >> > > On Jan 5, 2008 4:10 AM, Song Luo <[EMAIL PROTECTED]> wrote:
> >> > >
> >> > > > Can you give more detail on how you manually set node
> >> sensitivities
> >> > > > right before creating nodes? Do you write your code in C++ files?
> >> which
> >> > C++
> >> > > > or tcl files did you modify? And what are the statements? Maybe
> an
> >> > example
> >> > > > or the files you are currently using can better illustrates. If
> >> > possible,
> >> > > > can you send me your simulation script and modified source files,
> >> I
> >> am
> >> > very
> >> > > > interested in giving it a shot.
> >> > > >
> >> > > > Thanks.
> >> > > >
> >> > > >
> >> > > > On Jan 4, 2008 10:56 AM, muhamad faiz arief budianto <
> >> > > > [EMAIL PROTECTED]> wrote:
> >> > > >
> >> > > > >
> >> > > > >
> >> > > > > i think, actually we can't set our transmission range on each
> >> node,
> >> > > > > without
> >> > > > > changing or hack the code from ns.
> >> > > > > for now i just set my sensitivity node (RXthre, CST, etc). and
> >> set
> >> it
> >> > > > > manually just right before we create the nodes.
> >> > > > > I already make some simple simulation, for trying some kind of
> >> > > > >  wireless
> >> > > > > sensor sims u can say .
> >> > > > > It has 25 node and have 3 kind of node.
> >> > > > > 1 node for the HOST (80 m range)
> >> > > > > 7 node for the MIDDLE (50 m range)
> >> > > > > 17 node for the END (30 m range)
> >> > > > > the data can travel just from the node that already on it's
> >> range.
> >> > > > >
> >> > > > > the scenario is, the field is just like war field, so i have to
> >> send
> >> > > > > data
> >> > > > > packet from node 13 to 0 (END to HOST).
> >> > > > > i disabled the movement. just try it n give me some feedback
> >> about
> >> the
> >> > > > > range
> >> > > > > from each node.
> >> > > > > If you want more clearly about the range transmission, i draw
> >> the
> >> > > > > field and
> >> > > > > node deployment with some design software (CORELDRAW).
> >> > > > > --
> >> > > > > jho
> >> > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > Song Luo
> >> > > > Intelligent Automation, Inc.
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > jho
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Song Luo
> >> > Intelligent Automation, Inc.
> >> >
> >>
> >>
> >> --
> >> jho
> >>
> >
> >
> >
> > --
> > Song Luo
> > Intelligent Automation, Inc.
> >
>
>
>


-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] transmission range

2008-01-14 Thread Song Luo
nna set Gt_ 1
Antenna/OmniAntenna set Gr_ 1
set node_(1) [$ns node]
$node_(1) random-motion 0

$node_(1) set X_ 200.0
$node_(1) set Y_ 0.0
$node_(1) set Z_ 0.0


# UDP connections between from node_(0) to node_(1)

set udp_(0) [new Agent/UDP]
$ns attach-agent $node_(0) $udp_(0)
$udp_(0) set fid_ 1
set null_(0) [new Agent/Null]
$ns attach-agent $node_(1) $null_(0)
set cbr_(0) [new Application/Traffic/CBR]
$cbr_(0) set packetSize_ 512
$cbr_(0) set rate_ 200kb
$cbr_(0) set maxpkts_ 1
$cbr_(0) attach-agent $udp_(0)
$ns connect $udp_(0) $null_(0)
$ns at 1.0 "$cbr_(0) start"


set udp_(4) [new Agent/UDP]
$ns attach-agent $node_(1) $udp_(4)
$udp_(4) set fid_ 2
set null_(4) [new Agent/Null]
$ns attach-agent $node_(0) $null_(4)
set cbr_(4) [new Application/Traffic/CBR]
$cbr_(4) set packetSize_ 512
$cbr_(4) set rate_ 200kb
$cbr_(4) set maxpkts_ 1
$cbr_(4) attach-agent $udp_(4)
$ns connect $udp_(4) $null_(4)
$ns at 5.0 "$cbr_(4) start"

$ns at $opt(stop).0002 "puts \"ns EXITING...\" ; $ns halt"
$ns at $opt(stop).0001 "finish"

proc finish {} {

$ns flush-trace
close $tracefd
close $namtrace
exit 0
}


puts "Starting Simulation..."
$ns run





On Jan 7, 2008 12:34 PM, muhamad faiz arief budianto <[EMAIL PROTECTED]>
wrote:

> ok i hope it works.
> give me ur review
>
> On 1/7/08, Song Luo <[EMAIL PROTECTED]> wrote:
> > Hi Muhamad,
> >
> > I double checked my inbox, I did not find attachment in your email.
> Maybe it
> > is lost due to some technical issue. Could you please send the script to
> me
> > again? I really want to try your approaches.
> >
> > Thanks.
> >
> > Song
> >
> > On Jan 4, 2008 6:09 PM, muhamad faiz arief budianto <[EMAIL PROTECTED]
> >
> > wrote:
> >
> > > i have add my script as an attachment in the previous mail
> > >
> > >
> > > On Jan 5, 2008 4:10 AM, Song Luo <[EMAIL PROTECTED]> wrote:
> > >
> > > > Can you give more detail on how you manually set node sensitivities
> > > > right before creating nodes? Do you write your code in C++ files?
> which
> > C++
> > > > or tcl files did you modify? And what are the statements? Maybe an
> > example
> > > > or the files you are currently using can better illustrates. If
> > possible,
> > > > can you send me your simulation script and modified source files, I
> am
> > very
> > > > interested in giving it a shot.
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > On Jan 4, 2008 10:56 AM, muhamad faiz arief budianto <
> > > > [EMAIL PROTECTED]> wrote:
> > > >
> > > > >
> > > > >
> > > > > i think, actually we can't set our transmission range on each
> node,
> > > > > without
> > > > > changing or hack the code from ns.
> > > > > for now i just set my sensitivity node (RXthre, CST, etc). and set
> it
> > > > > manually just right before we create the nodes.
> > > > > I already make some simple simulation, for trying some kind of
> > > > >  wireless
> > > > > sensor sims u can say .
> > > > > It has 25 node and have 3 kind of node.
> > > > > 1 node for the HOST (80 m range)
> > > > > 7 node for the MIDDLE (50 m range)
> > > > > 17 node for the END (30 m range)
> > > > > the data can travel just from the node that already on it's range.
> > > > >
> > > > > the scenario is, the field is just like war field, so i have to
> send
> > > > > data
> > > > > packet from node 13 to 0 (END to HOST).
> > > > > i disabled the movement. just try it n give me some feedback about
> the
> > > > > range
> > > > > from each node.
> > > > > If you want more clearly about the range transmission, i draw the
> > > > > field and
> > > > > node deployment with some design software (CORELDRAW).
> > > > > --
> > > > > jho
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Song Luo
> > > > Intelligent Automation, Inc.
> > >
> > >
> > >
> > >
> > > --
> > > jho
> >
> >
> >
> >
> > --
> > Song Luo
> > Intelligent Automation, Inc.
> >
>
>
> --
> jho
>



-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] problem working with manual routing (correction)

2008-01-14 Thread Song Luo

I think the best way is to use the manual source routing. you can find an
example script at ns2/tcl/ex/src_test.tcl.

On 1/10/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi all again!!
>
> I've been working on the problem i post before and i get it :).
> Sorry for posting it :(. Unfortunately i didn't manage it as i
> wanted, because i do it establishing default routes with
> "add-route-to-adj-node" command
>
> Ex.
>
> [$n0 get-module "Manual"] add-route-to-adj-node -default $n1
>
> But i still don't understand how to add different routes to
> different nodes. For example:
>
> n0
> |
> |
> n1 -- n2
> |
> |
> n3
>
>
>
> I want to send information from n0 to n2 and n3, but i don't find
> how to use the commands correctly to do it.
>
> Can anyone give me a clue...or any kind of help about how to do
> it???
>
> Thanks for any information you can give me :).
>
> And sorry (again) for the last post :(.
>
> Pablo.
>
>


-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] Segmentation fault with wireless simulation

2008-01-08 Thread Song Luo

change the ifq to CMUPriQueue.

On Jan 7, 2008 7:06 PM, jayachandra gullapalli <[EMAIL PROTECTED]>
wrote:

>
> Hi,
>
> I was trying an wireless simulation on NS, I encounter this segmentation
> fault. I tried to troubleshoot the code but with no success. Could you
> please correct if I have some problem with the code.
>
> The code with which I tried the simulation.
>
> #Define wirleess scenario parameters
>
> set val(chan) Channel/WirelessChannel;
> set val(prop) Propagation/TwoRayGround1;
> set val(netif) Phy/WirelessPhy;
> set val(mac) Mac/802_11;
> set val(ifq) Queue/DropTail/PriQueue;
> set val(ll) LL;
> set val(ant) Antenna/OmniAntenna;
> set val(ifqlen) 50;
> set val(nn) 5;
> set val(rp) DSR;
> set val(x) 500;
> set val(y) 400;
> set val(stop) 150;
> set ns [new Simulator]
> set tracefd [open problem1Trace.tr w]
> set windowVsTime2 [open problem1Win.tr w]
> set namfd [open problem1Namtrace.nam w]
> $ns trace-all $tracefd
> $ns namtrace-all-wireless $namfd $val(x) $val(y)
> set topo [new Topography]
> $topo load_flatgrid $val(x) $val(y)
> create-god $val(nn)
> $ns node-config -adhocRouting $val(rp) \
> -llType $val(ll) \
> -macType $val(mac) \
> -ifqType $val(ifq) \
> -ifqLen $val(ifqlen) \
> -antType $val(ant) \
> -propType $val(prop) \
> -phyType $val(netif) \
> -channelType $val(chan) \
> -topoInstance $topo \
> -agentTrace ON \
> -routerTrace ON\
> -macTrace OFF \
> -movementTrace ON
> for {set i 0} {$i < $val(nn) } {incr i} {
> set node_($i) [$ns node]
> }
> $node_(0) set X_ 5.0
> $node_(0) set Y_ 5.0
> $node_(0) set Z_ 0.0
> $node_(1) set X_ 490.0
> $node_(1) set Y_ 285.0
> $node_(1) set Z_ 0.0
> $node_(2) set X_ 150.0
> $node_(2) set Y_ 240.0
> $node_(2) set Z_ 0.0
> $node_(3) set X_ 495.0
> $node_(3) set Y_ 100
> $node_(3) set Z_ 0.0
> $node_(4) set X_ 495
> $node_(4) set Y_ 395
> $node_(4) set Z_ 0.0
>
> $ns at 10.0 "$node_(0) setdest 250.0 250.0 3.0"
> $ns at 15.0 "$node_(1) setdest 45.0 285.0 5.0"
> $ns at 20.0 "$node_(2) setdest 480.0 300.0 5.0"
> $ns at 25.0 "$node_(3) setdest 50.0 150.0 5.0"
> $ns at 15.0 "$node_(4) setdest 50.0 50.0 3.0"
> #set TCP Connection between node_(0) and node_(1)
> set tcp0 [new Agent/TCP/Newreno]
> $tcp0 set class_ 2
> set sink0 [new Agent/TCPSink]
> $ns attach-agent $node_(0) $tcp0
> $ns attach-agent $node_(1) $sink0
> $ns connect $tcp0 $sink0
> set ftp [new Application/FTP]
> $ftp attach-agent $tcp0
> $ns at 10.0 "$ftp start"
> #set TCP Connection between node_(0) and node_(4)
> set tcp1 [new Agent/TCP/Newreno]
> $tcp1 set class_ 2
> set sink1 [new Agent/TCPSink]
> $ns attach-agent $node_(0) $tcp1
> $ns attach-agent $node_(4) $sink1
> $ns connect $tcp1 $sink1
> set ftp1 [new Application/FTP]
> $ftp1 attach-agent $tcp1
> $ns at 12.0 "$ftp1 start"
> #set TCP Connection between node_(3) and node_(2)
> set tcp2 [new Agent/TCP/Newreno]
> $tcp2 set class_ 2
> set sink2 [new Agent/TCPSink]
> $ns attach-agent $node_(3) $tcp2
> $ns attach-agent $node_(2) $sink2
> $ns connect $tcp2 $sink2
> set ftp2 [new Application/FTP]
> $ftp2 attach-agent $tcp2
> $ns at 15.0 "$ftp2 start"
> proc plotWindow {tcpSource file} {
> global ns
> set time 0.01
> set now [$ns now]
> set cwnd [$tcpSource set cwnd_]
> puts $file "$now $cwnd"
> $ns at [expr $now+$time] "plotWindow $tcpSource $file" }
> $ns at 10.1 "plotWindow $tcp0 $windowVsTime2"
> #define node position in NAM
> for {set i 0} {$i < $val(nn)} {incr i} {
> $ns initial_node_pos $node_($i) 30
> }
> for {set i 0} {$i < $val(nn) } {incr i} {
> $ns at $val(stop) "$node_($i) reset";
> }
> $ns at $val(stop) "$ns nam-end-wireless $val(stop)"
> $ns at $val(stop) "stop"
> $ns at 150.01 "puts \"end simulation\" ; $ns halt"
> proc stop {} {
> global ns tracefd namfd
> $ns flush-trace
> close $tracefd
> close $namfd
> }
> $ns run
>
>
> Your help in this regard would be greatly appreciated.
>
> Thanks,
> Jayachandra.
>
>
>  Chat on a cool, new interface. No download required. Go to
> http://in.messenger.yahoo.com/webmessengerpromo.php
>



-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] routing table

2008-01-07 Thread Song Luo

The routing table in aodv may change from time to time at each node,
especially when nodes are moving. I developed a java tool which analyzes
trace file and show the path of each cbr flow. It has two conditions: 1) you
must use the new trace format; 2) you have to enable flow id. If you want to
try it, let me know.


On Jan 4, 2008 9:36 PM, muhamad faiz arief budianto <[EMAIL PROTECTED]>
wrote:

>
> hi., is there any script in ns2 to calculate or for knowing the routing
> table.
> maybe like make a list or something else.
> The based information is from we already know the coordinat from each
> nodes
> (x, y).
> i need it.
>
>
> --
> jho
>



-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] transmission range

2008-01-04 Thread Song Luo

Can you give more detail on how you manually set node sensitivities right
before creating nodes? Do you write your code in C++ files? which C++ or tcl
files did you modify? And what are the statements? Maybe an example or the
files you are currently using can better illustrates. If possible, can you
send me your simulation script and modified source files, I am very
interested in giving it a shot.

Thanks.

On Jan 4, 2008 10:56 AM, muhamad faiz arief budianto <[EMAIL PROTECTED]>
wrote:

>
>
> i think, actually we can't set our transmission range on each node,
> without
> changing or hack the code from ns.
> for now i just set my sensitivity node (RXthre, CST, etc). and set it
> manually just right before we create the nodes.
> I already make some simple simulation, for trying some kind of  wireless
> sensor sims u can say .
> It has 25 node and have 3 kind of node.
> 1 node for the HOST (80 m range)
> 7 node for the MIDDLE (50 m range)
> 17 node for the END (30 m range)
> the data can travel just from the node that already on it's range.
>
> the scenario is, the field is just like war field, so i have to send data
> packet from node 13 to 0 (END to HOST).
> i disabled the movement. just try it n give me some feedback about the
> range
> from each node.
> If you want more clearly about the range transmission, i draw the field
> and
> node deployment with some design software (CORELDRAW).
> --
> jho
>
>


-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] transmission range

2008-01-04 Thread Song Luo

>
> that's also what I want to know. If you find a solution, please share with
> me. Thanks a lot!
>
>
>
> On Dec 31, 2007 10:05 PM, muhamad faiz arief budianto <[EMAIL PROTECTED]>
> wrote:
>
> >
> > how can i set or define each node to have different transmission range?
> > i think i should change the *Phy*/WirelessPhy parameter.
> > but it just works for all nodes. I want it just work for some node.
> > I already try to use the hierarchy transmission, like from wired to
> > wireless
> > (different cluster)
> > but it's stuck!!!
> >
> > Please help
> >
> > --
> > jho
> >
>
>
>
> --
> Song Luo
> Intelligent Automation, Inc.




-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] Tracing code

2007-05-01 Thread Song Luo

gdb. If you want a graphic interface, eclipse with CDT plug-in might work
too.

On 4/30/07, Mohammed Abu Hajar <[EMAIL PROTECTED]> wrote:
>
>
> Dear NS-Users,
>
> How can I do tracing for my code execution in ns-2 simulator, like in c
> language , i was press on F7 key and trace my c code line by line , so how
> can I do this.
>
> Regards to all
>
>
>
> -
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>



-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] Drop Reasons

2007-04-24 Thread Song Luo

You can find the definitions for those codes in file cmu-trace.h. And I
guess, your topology is too dense. 500 nodes in 1000x1000 area and the
transmission range is 250 (the carrier sense range should be even larger),
this will cause many packets get dropped due to MAC conflict.

On 4/24/07, Matthias Budde <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm evaluation tracefiles from a wireless simulation
> and would like to know what the following drop reasons
> are, why they occur, and how I could prevent the packets
> from being dropped.
>
> The reasons are
>
> -Nw ARP
> -Nw RET
> -Nw END
>
> and just plain
>
> -Nw
>
> There are no other drop reasons than those in my
> tracefile.
>
> I'm simulation a network with 500 nodes, each sending
> 10 packets per second, for 100 seconds of simulation
> time. Most of my packets get dropped. My topology is
> 1000 x 1000 meters, the radio range of each node is
> set to 250 meters.
>
> Thank you in advance,
>
> -Matt
>
>


-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] Similarity & Differece Between DSR & AOD

2007-04-19 Thread Song Luo

This would be a big question if you want a complete answer, and I suggest
you to read D.B. Jason and Perkins paper on these two protocols. But in one
world, DSR is a source routing protocol which includes routing hops
information in each packet's header; while AODV uses traditional routing
table approach. Hope it helpful.

On 4/19/07, Mohammed Abu Hajar <[EMAIL PROTECTED]> wrote:
>
>
> Hi all ns-users,
>
>   Can any one tell me what exactly are the similarity and differences
> between DSR and AODV ad hoc routing protcool.
>
>
>   Any possible help is appreciated
>
>   Thanks
>
>
>
>
> -
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>



-- 
Song Luo
Intelligent Automation, Inc.


Re: [ns] routing over a fixed path in wireless ad-hoc network?

2007-04-13 Thread Song Luo

Basically, those protocols will find routes for packets automatically, and
you cannot determine in advance. But one method may work: you can enable
recvRequest function only at nodes you want the packets pass. In your
example, you only let node2, 3 and dest receive route requests and reply,
and let all other nodes discard requests without doing anything. I think it
should work for at least aodv and dsr, not sure for dsdv and tora.


On 4/7/07, tdinhtoan <[EMAIL PROTECTED]> wrote:
>
>
> hi,
>
> I am simulating an ad-hoc wireless network. The nodes do not move (a kind
> of wireless mesh network). Thus for a given pair of source node and
> destination node, I determine the routing path between them in advanced.
>
> i.e. the routing path: src -> node2 -> node3 -> dest.
>
> I establish an CBR flow (UDP flow) from the src to the dest, and would
> like to route the packets from the src to the dest over this fixed path.
> This is some kind of Static Routing.
>
> How can I do? Which routing agent I should use: DSDV, DSR, TORA, or AODV?
> Could anyone give me some examples or guides?
>
> Thank you very much.
>
> Sincerely,
> -toan.
>
> PS: I hope it can be done without modifying the ns2 source code.
>
>


Re: [ns] queue connection

2007-04-12 Thread Song Luo

Because I have been coding for an aodv-based module for a while, I think I
can answer your question regarding aodv.

There are two queues can store packets: routing queue, and interface queue.
After an application generates a packet, it will be sent to routing agent
(aodv here). If the routing agent finds a route for this packet, it is
passed to the interface queue immediately. If the interface queue is full
now, it will be dropped and written to the trace file. On the other hand, if
the routing agent cannot find a route for this packet, it will store it in
the routing queue temporarily. If the routing queue is full (because your
application is generating packets too fast), the packet will be dropped and
written to the trace file. The packets in routing queue may have two
different results: if a route if finally found, the packet goes to the
interface queue; if the route cannot be found for a specific time, the
packet gets aged and finally purged (removed from routing queue). In this
case, no trace will be written.

Check files in ./queue and ./mac for detail implementation of routing queues
and mac interface queue. Please correct me if I am wrong.

Song Luo

On 4/11/07, suhaib obeidat <[EMAIL PROTECTED]> wrote:
>
>
> Dear All,
>
> When a source is generating traffic faster than they can be transmitted.
> Where are these packets stored ? Is it in the LL or somewhere else. To
> make
> my question more specific, I would like to constantly know the fill level
> of
> this buffer/queue.
>
> Please, do not spare typing couple of sentences if you know, I really need
> this.
>
> Thanks
>


Re: [ns] Multiple Radios on One Node

2007-03-22 Thread Song Luo

If you are talking about using multiple channels on one node, the following
link gives some hints. However, I have not tried it myself. Please let me
know how it works.

http://www.cse.msu.edu/~wangbo1/ns2/nshowto8.html

---
Song Luo
Research Scientist
Intelligent Automation, Inc.
(301)294-4633
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Goutham B
Sent: Thursday, March 22, 2007 1:07 PM
To: ns-users@ISI.EDU
Subject: [ns] Multiple Radios on One Node


Hello,

I'd like to simulate 2 radios on 1 node.. basically concurrent transmission
on 2  channels. It would be of great help if someone can suggest a reference
tutorial/code/example ..

Regards,
-- 
Goutham B

__
This message and all attachments are PRIVATE, and contain information that
is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to
transmit or otherwise disclose this message or any attachments to any
third party whatsoever without the express written consent of Intelligent
Automation, Inc. If you received this message in error or you are not
willing to view this message or any attachments on a confidential basis,
please immediately delete this email and any attachments and notify
Intelligent Automation, Inc.