Re: [ns] NAM not working after ns-2.33 installation

2009-05-04 Thread Luís Barreto

Hi,

You can find the solution in the links below.

http://forums.fedoraforum.org/showthread.php?t=200711


http://forums.fedoraforum.org/showthread.php?t=206795

Regards,

Luís Barreto

On Mon, May 4, 2009 at 2:05 AM, Kanwal Gheek kanwal_ghe...@yahoo.comwrote:



 I installed ns-2.33 and everything did go ok. But after installation though
 ns was working fine, nam wasn't working. When I ran nam it gave me the
 following error -

 $ nam:
 [code omitted because of length]
 : no event type or button # or keysym
 while executing
 bind Listbox MouseWheel {
 %W yview scroll [expr {- %D / 120 * 4}] units
 }
  invoked from within
 if {[tk windowingsystem] eq classic || [tk windowingsystem] eq aqua} {
 %W yview scroll [expr {- %D}] units
 }
 bind Li...

 ---

 I found out that there is no workaround on cygwin.
 Any help in this regard will be highly appreciated.
 Thanks.
 Kanwal.








Re: [ns] example simulation static wireless

2009-04-17 Thread Luís Barreto

This is just for defining node size in nam visualization!

Luís

On Fri, Apr 17, 2009 at 1:18 PM, Gisane Michelon gisan...@gmail.com wrote:


 ok, don't occurs the error, but to serves this line?
   $ns_ initial_node_pos $node_($i) 20
 thanks very much


 2009/4/16 Mark Kosinski kosins...@ainfosec.com:
  Hello,
 
  You're missing one line of code. To make this work you need to add the
 following line to your for loop.
 
 $ns_ initial_node_pos $node_($i) 20
 
  The above line of code is to be the last line of code in the for loop you
 have shown here in your email.
 
  Sincerely,
 
  Mark
 
  -Original Message-
  From: ns-users-boun...@isi.edu [mailto:ns-users-boun...@isi.edu] On
 Behalf Of Gisane Michelon
  Sent: Thursday, April 16, 2009 9:35 AM
  To: Luís Barreto; ns-users@ISI.EDU
  Subject: Re: [ns] example simulation static wireless
 
 
  I already tryed but haven't.
  I am try to make, however occurs the following error:
node 1 not definded... node 2 not defined...node 3 not defined...
  my function that define nodes is:
 for {set i 0} {$i  $val(nn) } {incr i} {
 set node_($i) [$ns_ node]
 $node_($i) random-motion 0 ;# disable random motion
 }
 
   and position initial modilenodes is:
  $node_(0) set X_ 5.0
  $node_(0) set Y_ 2.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_ 105.0
  $node_(3) set Y_ 210.0
  $node_(3) set Z_ 0.0
  Need something more to define node statics?
 
  thanks
 
  2009/4/16 Luís Barreto lmcbarr...@gmail.com:
  HI,
 
  You can find one in the ns directory, in ns-xxx/tcl/ex!
 
  Where xxx is the version!
 
  Regards,
 
  Luís
 
  On Thu, Apr 16, 2009 at 2:02 PM, Gisane Michelon gisan...@gmail.com
 wrote:
 
  Somedoby has um simple example of simulation static wireless network ?
  Already tried very but didn't find.
  Ane
 




Re: [ns] XCP Protocol

2009-01-17 Thread Luís Barreto

Hi Diana,

I´m having the same problem! Could you tell me what are u reading?

Thanks,
Luís

On Sat, Jan 17, 2009 at 11:40 PM, Diana Benitez
paraguayita...@hotmail.comwrote:



 Dear NS-users:

 Do someone use the XCP protocol? I need to undestant how it claculates the
 number of flows. I read a lot, but it is confuse.

 DIANA

 _
 Windows Live™ Hotmail(R): Chat. Store. Share. Do more with mail.

 http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_explore_012009


Re: [ns] NAM does not run wireless simulation over ns 2

2009-01-08 Thread Luís Barreto

Hi there,

In a wireless simulation for nam trace you have to use

$ns namtrace-all-wireless $nf $val(x) $val(y)

Hope it works,

Luis

On Thu, Jan 8, 2009 at 2:31 PM, Syed Faraz Hasan 
faraz_hasa...@email.ulster.ac.uk wrote:


 Hello ALL,

 I am trying to visualize the entire simulation using NAM. I open the .nam
 file in the finish procedure. I have associated CBR source with one of the
 nodes to make it send packets to another node. NAM executes properly at the
 beginning (but does not show nodes at all), as soon as the scheduled time of
 sending packets arrive NAM exits. Although it generates the trace file.

 Please write back soon

 Heres the code...

 # ==

 # Define options

 # ==

 set val(chan)   Channel/WirelessChannel;# channel type

 set val(prop)   Propagation/TwoRayGround   ;# radio-propagation
 model

 set val(netif)  Phy/WirelessPhy;# network interface
 type

 set val(mac)Mac/802_11 ;# MAC type

 set val(ifq)Queue/DropTail/PriQueue;# interface queue type

 set val(ll) LL ;# link layer type

 set val(ant)Antenna/OmniAntenna;# antenna model

 set val(ifqlen) 50 ;# max packet in ifq

 set val(nn) 3  ;# number of mobilenodes

 set val(rp) AODV   ;# routing protocol

 set val(x)  880   ;# x-axis of grid
 set val(y)  880   ;# y-axis of grid
 set opt(energymodel)EnergyModel ;
 set opt(radiomodel) RadioModel ;
 set opt(initialenergy)  1000;# Initial energy in Joules
 set num_ms_nodes10;
 set opt(nn) 2;

 # ==

 # Main Program

 # ==





 #

 # Initialize Global Variables

 #



 #start the simulator
 set ns [new Simulator]

 #open the trace file
 set tracefile1 [open a.tr w]
 $ns trace-all $tracefile1

 #Open NAM file
 set nf [open attachment.nam w]
 $ns namtrace-all $nf


 #define the procedure finish
 #proc finish {} {
 #global ns tracefile1
 #$ns flush-trace
 #close $tracefile1
 #exit 0
 #}

 proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam
 attachment.nam 
exit 0
}


 # set up topography object

 set topo   [new Topography]


 $topo load_flatgrid $val(x) $val(y)



 # Create God General Operations Director



 create-god [expr $opt(nn) + $num_ms_nodes]

 # Create channel #1 and #2
 set chan_1_ [new $val(chan)]



 #

 #  Create the specified number of mobilenodes [$val(nn)] and attach them

 #  to the channel.

 #  Here two nodes are created : node(0) and node(1)



 # configure node



$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) \

 -topoInstance $topo \

 -agentTrace OFF \

 -routerTrace ON \

 -macTrace OFF \

 -movementTrace OFF\
 -channel $chan_1_


 #-energyModel $opt(energymodel) \
 -idlePower 1.0 \
 -rxPower 1.0 \
 -txPower 1.0 \
 -sleepPower 0.001 \
 -transitionPower 0.2 \
 -transitionTime 0.005 \
 -initialEnergy $opt(initialenergy)


 for {set i 0} {$i  $val(nn) } {incr i} {
   set node_($i) [$ns node]
   $node_($i) random-motion 0   ;# disable random motion
   }


 set udp0 [new Agent/UDP]
 $ns attach-agent $node_(0) $udp0

 set cbr0 [new Application/Traffic/CBR]
 $cbr0 set packetSize_ 1000
 $cbr0 set interval_ 0.005
 $cbr0 attach-agent $udp0

 set null0 [new Agent/Null]
 $ns attach-agent $node_(1) $null0

 $ns connect $udp0 $null0

 $ns at 1 $cbr0 start
 $ns at 4 $cbr0 stop
 $ns at 4.1 finish

 puts Starting Simulation...
 $ns run




Re: [ns] ns-2.28: which is better Linux?

2008-11-18 Thread Luís Barreto

Try Fedora Core 3,

Luís Barreto

On Tue, Nov 18, 2008 at 11:09 PM, [EMAIL PROTECTED] wrote:


 As I said some email before,
 I have many problems to install ns-2.28 on Ubuntu 8.04(to use UCBT)

 For example Unterminated quoted string and relative to gcc...

 Which is better Linux to install ns-2.28 without many problems?

 Thanks in advance,
 Pietro


Re: [ns] Correct use of mac 802.11 in MANET network (script included)

2008-11-17 Thread Luís Barreto

What´s the version of your ns-2?

Regards,

Luís Barreto

On Sat, Nov 15, 2008 at 3:02 PM, Massimo Reineri [EMAIL PROTECTED]wrote:

   Hello to everybody!
 I would know your opinion about my solution.
 I'm working in MANET routing context and I'm simulating a simple network
 made up
 by 4 fixed wireless nodes (A,B,C,D) with mac layer 802_11 (dataRate_ set to
 11Mb)
 and a mobile node (E) with mac layer 802_11 but dataRate_ set to 1Mb that
 moves from the
 left side to the right side of the network as shown in the next picture:

 | A | | B || C |  | D |

 -| E |-

 Now I want to check the data throughput for the communication among node A
 and node E and viceversa.
 The simulator seams to run correctly but I'm not sure that the current
 implementation
 of the mac layer mac-802_11.{h,cc} allows me to deal with this scenario,
 i.e. it allows me to
 use different channel capacities in the same wireless network.

 The used simulation script is the following one:

 # ==
 # Define options
 # ==
 # following options are to define a network feature: default values
 set opt(chan) Channel/WirelessChannel ;# channel type
 set opt(prop) Propagation/TwoRayGround ;# radio-propagation model
 set opt(netif) Phy/WirelessPhy ;# network interface type
 set opt(mac) Mac/802_11 ;# MAC type
 set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type
 set opt(ll) LL ;# link layer type
 set opt(ant) Antenna/OmniAntenna ;# antenna model
 set opt(ifqlen) 50 ;# max packet in ifq
 set opt(nn) 5 ;# number of mobilenodes
 set opt(rp) OLSR ;# routing protocol
 set opt(x) 500 ;# X-dimention for the topology
 set opt(y) 550 ;# Y-dimention for the topology
 set opt(packetSize) 400 ;# packet size for CBR traffic in Bytes
 set opt(rate) 80Kb ;# CBR traffic bit rate
 set opt(speed) 3.0 ;# mobile node linear speed in m/sec
 set opt(startCBR) 100 ;# CBR flow start time in seconds
 set opt(stopCBR) 600 ;# CBR flow end time in seconds
 set opt(stopSimulation) 650 ;# Simulation end time in seconds
 proc usage {} {
 puts {manet_net.tcl: Usage ns manet_net.tcl }
 puts {PARAMETERS NEED NOT BE SPECIFIED... DEFAULTS WILL BE USED}
 exit
 }

 if {[string compare $opt(rp) OLSR] == 0} {
 Agent/OLSR
 set use_mac_ true
 }
 puts This is a basic manet network
 # =
 # Main Program
 # ==

 # Initialize a network simulator
 set ns_ [new Simulator]
 set tracefd [open manet_net.tr w]
 $ns_ trace-all $tracefd

 # Initialize nam trace for netwrok visualization
 set namtrace [open manet_net.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
 set god_ [create-god $opt(nn)]
 set chan_1_ [new $opt(chan)]

 # Create the specified number of mobilenodes [$opt(nn)] and attach them
 # to the channel.

 # Configure the node features
 Mac/802_11 set dataRate_ 11Mb
 Mac/802_11 set PLCPdataRate_ 11Mb
 $ns_ node-config -adhocRouting $opt(rp) \
  -llType $opt(ll) \
  -macType $opt(mac) \
  -ifqType $opt(ifq) \
  -ifqLen $opt(ifqlen) \
  -antType $opt(ant) \
  -propType $opt(prop) \
  -phyType $opt(netif) \
  -channel $chan_1_ \
  -topoInstance $topo \
  -agentTrace ON \
  -routerTrace ON \
  -macTrace OFF \
  -movementTrace ON

 #in order to compute this threshold run the program in
 indeep-utils/propagation/threshold
 #command ./threshold -m TwoRayGround 200

 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m
 set node_(0) [$ns_ node]
 $node_(0) random-motion 0

 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m
 set node_(1) [$ns_ node]
 $node_(1) random-motion 0

 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m
 set node_(2) [$ns_ node]
 $node_(2) random-motion 0

 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m
 set node_(3) [$ns_ node]
 $node_(3) random-motion 0

 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m
 Mac/802_11 set dataRate_ 1Mb
 Mac/802_11 set PLCPdataRate_ 1Mb
 $ns_ node-config -adhocRouting $opt(rp) \
   -llType $opt(ll) \
   -macType $opt(mac) \
   -ifqType $opt(ifq) \
   -ifqLen $opt(ifqlen) \
   -antType $opt(ant) \
   -propType $opt(prop

Re: [ns] Large network simulation problem

2008-11-15 Thread Luís Barreto

Can you post here your tcl script, that way you could analyse better the
results!

Luís Barreto

On Sat, Nov 15, 2008 at 11:01 AM, coorasse [EMAIL PROTECTED] wrote:



 Hi all!
 I've got a problem simulating a network with 1000 nodes.
 I've a tcl script that simulate a network with many nodes moving all
 around.
 When I analyze the trace file with up to 100 nodes, the results look
 correct, but with 500 or 1000 nodes I can't get correct results.
 For example that's are the results for traffic between node 0 and node 1
 with AODV protocol:
 50 nodes (1500x300):
 send = 3772.00
 MACpacketSend = 11645.00
 recv = 3664.00
 routingpkts = 8239.00
 PacketDeliveryRatio = 97.14
 NormalizedRoutingLoad = 2.25
 RoutingOverheads = 2.18
 AverageHopCounts = 3.09

 100 nodes(2121x424):
 send = 3796.00
 MACpacketSend = 13169.00
 recv = 3672.00
 routingpkts = 16640.00
 PacketDeliveryRatio = 96.73
 NormalizedRoutingLoad = 4.53
 RoutingOverheads = 4.38
 AverageHopCounts = 3.47

 1000nodes(6704x1342):
 send = 716.00
 MACpacketSend = 4759.00
 recv = 610.00
 routingpkts = 124574.00
 PacketDeliveryRatio = 85.20
 NormalizedRoutingLoad = 204.22
 RoutingOverheads = 173.99
 AverageHopCounts = 6.65

 Obviously the last results are not correct cause node 0 can't send just 716
 packets...or I'm wrong?
 I attach also the awk script I use to analize results.
 http://www.nabble.com/file/p20514322/parameters-aodv.awkparameters-aodv.awk

 Please help me retrieving correct results, thanks.
 Alessandro
 --
 View this message in context:
 http://www.nabble.com/Large-network-simulation-problem-tp20514322p20514322.html
 Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] cant read god_:no such variable

2008-07-29 Thread Luís Barreto

Check what yopu have put if set god or set god_ and change accordingly!

Regards,

Luís

On Tue, Jul 29, 2008 at 4:10 AM, mohammad shojaeinia [EMAIL PROTECTED]
 wrote:


 hi
 Dear ns-users
 i run tcl script in linux 7.1 and ns-2.18b and give some error :


 Cant read god_:no such variable
  while executing
 .
 .
 .
 thanks
 moh


Re: [ns] Ns-users Digest, Vol 54, Issue 26

2008-07-26 Thread Luís Barreto

Hi,

This must ne an hierarchical address definition problem!

Regards,

Luís

On Sat, Jun 28, 2008 at 6:05 PM, Raol Boni [EMAIL PROTECTED] wrote:



 On Sat, Jun 28, 2008 at 8:32 AM, Raol Boni [EMAIL PROTECTED] wrote:

 
 
  Hi All,
 
  I'm using ns2 version 2.31 and try to simulate for DSR with 60 total
 number
  of nodes out of which 48 are fixed wireless routers, 10 are mobile nodes,
 1
  gateway and 1 wired node. Then when I run my code,  it  gives me an error
 !
  Therefore, please can you help me in this regard? The output result is as
  follows;
 
#=

  $ num_nodes is set 60
  Error!!
  str2addr:Address 1628668875 outside range of address field length 2048
  #==
  Your idea or contribution will be great !
 

   PLEASE, for further information, I attached my sample work  !



[ns] can't read ragent_: no such variable

2008-07-22 Thread Luís Barreto

Hi,

I'm using DSR routing protocol in a wired-cum-wireless simulation and
am having the following problem:
can't read ragent_: no such variable
while executing
subst $[subst $var

Could you please tell how to set up this variable and solve this
problem?

I got this problem for a long time and couldn't solve it. I´ve
searched and no one says the solution

Thanks for your help.


Luís

Re: [ns] how to use/install a new protocol???

2008-06-30 Thread Luís Barreto

I can´t find the pdf file!

Regards,

On Mon, Jun 30, 2008 at 7:46 PM, Sheraz Nadeem [EMAIL PROTECTED]
wrote:




 one thing i would like to add to it is that you can read this pdf file this
 is great. bye
 _
 News, entertainment and everything you care about at Live.com. Get it now!
 http://www.live.com/getstarted.aspx