[ns] what is the transmission range fo mobile nodes

2007-02-08 Thread Kong Ruoshan

If your simulation doesn't contain any energy model, the transmission range is 
a constant.

In mac/channel.cc, you can find WirelessChannel::getAffectedNodes(), which is 
responsible for that.



[ns] Problems in FHMIP Extensions

2007-02-08 Thread Song Yang

Hi all,

Thank you for your attention.

I am using ns-allinone-2.28 on cygwin (win XP). I have installed the
FHMIP Extension follow the steps in "Handover Blackout Duration of
Layer 3 Mobility Management Schemes" from
http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html, and I recompiled
ns2 by running "make" without any error. When I tried to run the
script in the extension, I get the error:

unable to dispatch method mac-type
   while executing
"$ns mac-type $mactype"

and the error:

unable to dispatch method add-node
   while executing
"$self add-node $node [$node id]"

I found the two errors all related to

simulator ::command(int argc, const char*const* argv)
{
.
.
.
if (argc == 3) {
  .
   if (strcmp(argv[1], "mac-type") == 0) {
if (strlen(argv[2]) >= SMALL_LEN) {
tcl.add_errorf("Length of mac-type name must be 
< %d", SMALL_LEN);
return TCL_ERROR;
}
strcpy(macType_, argv[2]);
return TCL_OK;
}
 .
}

if (argc == 4) {
if (strcmp(argv[1], "add-node") == 0) {
Node *node = (Node *)(TclObject::lookup(argv[2]));
if (node == NULL) {
tcl.add_errorf("Wrong object name %s",argv[2]);
return TCL_ERROR;
}
int id = atoi(argv[3]);
add_node(node, id);
return TCL_OK;
.
.
}
.
}

but I don't know how to solve the problem. Could you give me some
advises about how to exam the error, and what may cause this error?

Any ideas will be appreciated.

Thank you!

Soya



Re: [ns] How to call a procedure after a constant delay

2007-02-08 Thread Scott Ricketts

It looks to me like you are putting the Otcl interpreter in an
infinite loop before the simulation starts. That is, "loop" is getting
scheduled every time the while loop iterates, but it does not actually
get called until you do $ns run, so $value never gets set.

-Scott

On 2/8/07, Somera Javed <[EMAIL PROTECTED]> wrote:
>
> Hi,
> i  am trying to call a procedure after a delay of every 0.01 sec
>
> proc loop {} {
>global abc value
>set value [$abc get_value]
>exit 0
> }
> set time 0.2
> set inc 0.01
> while 1 {
>$ns at $time "loop"
>set time [expr $time + $inc]
>if {$value == 1} break;
> }
>
> but the program stuck while execution
> what is the right way to do this???
>



[ns] How to call a procedure after a constant delay

2007-02-08 Thread Somera Javed

Hi,
i  am trying to call a procedure after a delay of every 0.01 sec

proc loop {} {
global abc value
set value [$abc get_value]
exit 0
}
set time 0.2
set inc 0.01
while 1 {
$ns at $time "loop"
set time [expr $time + $inc]
if {$value == 1} break;
}

but the program stuck while execution
what is the right way to do this???


[ns] how to find the rtt average?

2007-02-08 Thread Lincoln H. T.

Hi,

 I would like to know the average of Rtt used in my simulation! Can I 
read the rtt_ variable? how?

Tks.



[ns] urgent : Multiple hopping from source to dest

2007-02-08 Thread harpreet

  
Hi 
  I am a beginner in NS. I am trying to simulate multihopping in a 
linear network on n nodes where the source is node1 and destination is
node-n.
I am using DSR as the routing protocol.But instead of multi hopping 
node 1 is directly sending packets to node n.
How can I make node 1 transmit to node n by by hopping through all the
intermediate nodes?


harpreet singh


Re: [ns] Indeterminate Delay in TORA Simulation

2007-02-08 Thread Narendran Sivakumar

Dear All,

I have executed TORA successfully and made all the requisite changes to
tora.cc to enable it  work correctly  and to get rid of Agent/PROTO problem.


But When i execute my tcl script, thee seems to be indeterminate delay in
getting the output.When i examine the trace file created by tora.tcl script,
the simulation gets struck at 2.3 seconds and not able to move
beyond.Theexact output that appears in the terminal is


 **OUTPUT AS IT APPEARS IN THE
TERMINAL***
num_nodes is set 6
 INITIALIZE THE LIST xListHead
 using backward compatible Agent/CBR; use
Application/Traffic/CBR instead
 Start of simulation..
 channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
 highestAntennaZ_ = 1.5,  distCST_ = 550.0
 SORTING LISTS ...DONE!

It gets struck at this point and there is no progress beyond this.
**



It would immensely help me if anyone is able to correct this peculiar
problem.I'm using ns2.29 in Red Hat8.

I have enclosed my tora.tcl script below.

Thank You,
With Regards,
S.Narendran


-
TORA.tcl***
# ==
# Define options
# ==
 set val(chan) Channel/WirelessChannel  ;# channel type
 set val(prop) Propagation/TwoRayGround ;# radio-propagation model
 set val(ant)  Antenna/OmniAntenna  ;# Antenna type
 set val(ll)   LL   ;# Link layer type
 set val(ifq)  Queue/DropTail/PriQueue  ;# Interface queue type
 set val(ifqlen)   50   ;# max packet in ifq
 set val(netif)Phy/WirelessPhy  ;# network interface type
 set val(mac)  Mac/802_11   ;# MAC type
 set val(nn)   6;# number of mobilenodes
 set val(rp)   TORA ;# routing protocol
 set val(x)800
 set val(y)800

set ns [new Simulator]
#ns-random 0

set f [open 1_out.tr w]
$ns trace-all $f
set namtrace [open 1_out.nam w]
$ns namtrace-all-wireless $namtrace $val(x) $val(y)
set f0 [open proj_out0.tr w]
set f1 [open proj_out1.tr w]
set f2 [open proj_out2.tr w]
set f3 [open proj_out3.tr w]

set topo [new Topography]
$topo load_flatgrid 800 800

create-god $val(nn)

set chan_1 [new $val(chan)]
set chan_2 [new $val(chan)]
set chan_3 [new $val(chan)]
set chan_4 [new $val(chan)]
set chan_5 [new $val(chan)]
set chan_6 [new $val(chan)]

# CONFIGURE AND CREATE NODES

$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 OFF \
 -routerTrace ON \
 -macTrace ON \
 -movementTrace OFF \
 -channel $chan_1  # \
 #-channel $chan_2   \
 #-channel $chan_3   \
 #-channel $chan_4   \
 #-channel $chan_5   \
 #-channel $chan_6


proc finish {} {
global ns f f0 f1 f2 f3 namtrace
$ns flush-trace
close $namtrace
close $f0
close $f1
 close $f2
close $f3
   # exec xgraph proj_out0.tr proj_out1.tr
 # proj_out2.tr proj_out3.tr
exec nam -r 5m 1_out.nam &
exit 0
}

proc record {} {
  global sink0 sink1 sink2 sink3 sink4 sink5 f0 f1 f2 f3
   #Get An Instance Of The Simulator
   set ns [Simulator instance]

   #Set The Time After Which The Procedure Should Be Called Again
   set time 0.05
   #How Many Bytes Have Been Received By The Traffic Sinks?
   set bw0 [$sink5 set npkts_]
   set bw1 [$sink5 set nlost_]
   #set bw2 [$sink2 set npkts_]
   #set bw3 [$sink3 set npkts_]

   #Get The Current Time
   set now [$ns now]

   #Save Data To The Files
   puts $f0 "$now [expr $bw0]"
   puts $f1 "$now [expr $bw1]"
   #puts $f2 "$now [expr $bw2]"
   #puts $f3 "$now [expr $bw3]"

   #Re-Schedule The Procedure
   $ns at [expr $now+$time] "record"
  }

# define color index
$ns color 0 blue
$ns color 1 red
$ns color 2 chocolate
$ns color 3 red
$ns color 4 brown
$ns color 5 tan
$ns color 6 gold
$ns color 7 black

set n(0) [$ns node]
#$ns at 0.0 "$n(0) color red"
$n(0) color "0"
$n(0) shape "circle"
set n(1) [$ns node]
$n(1) color "blue"
$n(1) shape "circle"
set n(2) [$ns node]
$n(2) color "tan"
$n(2) shape "circle"
set n(3) [$ns node]
$n(3) color "red"
$n(3) shape "circle

[ns] wireless link between Base-Stations

2007-02-08 Thread Elena Putzolu

 
  Hi, 

  I'm Elena, I want to use ns simulator for 
  Master thesis.

  I wanted to ask you how one can to 
  establish a wireless link between Base-Station. how have you set up it? 
  

  Thanks in advance!
regards

  Elena






 L'email della prossima generazione? Puoi averla con la  nuova 
Yahoo! Mail









___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html


Re: [ns] Multi-interface support howto

2007-02-08 Thread Tim Elschner

i found out that a missing line in ns-mobilenode.tcl caused that strange 
behaviour.
since i correctly added
set sndT [cmu-trace Send "RTR" $self]
the traffic seems to be fine, except that the wireless packets don't 
appear in NAM anymore.

-tim

Tim Elschner schrieb:
> hi,
>
> i'm trying to user mutliple interfaces with the adhoc routing agent 
> "noah" - which stands for "NO AdHoc routing". i use only one mobile 
> node, and some basestations with foreign agents, an home agent and a 
> corresponding node.
> as noah doesn't need a routing table, i use a map for storing the 
> interface. i use the "prev_hop" field in the common-header to associate 
> the interface.
> in the "forwardPacket" function - which is for unicast transmissions - i 
> use the information stored in the map to send the packets through the 
> correct interface. this works fine with interface 1, but fails vor 
> interface 0. all packets are dropped. if i just flip the channels 
> between interface 0 and 1, still interface 1 is working and interface 0 
> fails.
>
> did i miss something?
> hints anyone? :)
>
> cheers,
> tim
>
>
> Ramon Aguero schrieb:
>   
>> Hello Tim,
>>
>> thanks for pinpointing the error! Somehow I made a mistake when 
>> copying and pasting the code to the file.
>>
>> The correct procedure would be the following one (note that the 
>> arptable_ is now within the 'for' cycle). In this sense, I don't think 
>> you need to change all arptable_ into arptable. Hope this helps.
>>
>> Node/MobileNode instproc reset {} {
>> $self instvar arptable_ nifs_ netif_ mac_ ifq_ ll_ imep_
>> for {set i 0} {$i < $nifs_} {incr i} {
>> $netif_($i) reset
>> $mac_($i) reset
>> $ll_($i) reset
>> $ifq_($i) reset
>> if { [info exists opt(imep)] && $opt(imep) == "ON" } {
>> $imep_($i) reset
>> }
>> if { $arptable_($i) != "" } {
>> $arptable_($i) reset
>> }
>> }
>> }
>>
>> Cheers,
>> Ramón
>>
>> PS - I've already modified the document -- with the correct procedure 
>> -- in the web page:
>> http://personales.unican.es/aguerocr
>>
>>
>> At 16:39 18/01/2007, Tim Elschner wrote:
>> 
>>> great job as far as i can see.
>>> anyway i ran into problems with ns-mobilenode.tcl:
>>> in "Node/MobileNode instproc reset" i couldn't find any differences 
>>> to the original.
>>> i got an error, that arptable_ is an array. so i changed every 
>>> arptable_ into arptable. now ns2 complains about the missing variable 
>>> arptable :(
>>>
>>> any hints out there?
>>>
>>> cheers,
>>> tim
>>>
>>> Ramon Aguero schrieb:
>>>   
 Dear all,

 We have seen a lot of requests about the possibility to extend the 
 NS-2 framework to support multiple interfaces. Although there is 
 some information available, according to the messages that have been 
 sent to this list, it seems that a more thorough description may be 
 required.

 In this sense, after performing an analysis about existing 
 activities in this topic, we have created a document that tries to 
 summarize which are the required changes to be performed within the 
 different pieces of the simulator (tcl, c++) as well as how routing 
 protocols can be adapted to make use of the new feature. The howto 
 is entitled "Adding Multiple Interface Support in NS-2" and it has 
 been written by my colleague Jesús Pérez and myself.

 I’ve uploaded the document, which can be retrieved from the 
 following url:
 http://personales.unican.es/aguerocr 


 We will be happy to receive any feedback, comments, so as to improve 
 the howto, since we would like to have it like a living document, 
 adding new features as they are available.

 Best regards,
 Ramón

 
 Ramón Agüero Calvo
 Dept. of Communications Engineering
 Network Planning & Mobile Communications
 Laboratory
 University of Cantabria
 Avda Castros s/n
 39005 - Santander
 SPAIN
 [EMAIL PROTECTED]
 Tel: +34 942 201 392 (Ext 14)
 Fax: +34 942 201 488
 

 
>
>   



[ns] NS 2 core network compatibility

2007-02-08 Thread Brenda Lindsay Williams

Hi everyone. I'm working on a project which involves the backbone/core
network of VoIP networks. The core network consists of a combination of
routers and switches which handles and controls traffic in the
network.Plsis it possible to emulate this core network using NS
2.I'll like to know how.It'svery important.Thank you.

Best regards,

Brenda


[ns] NS 2 core ntwork compatibility

2007-02-08 Thread Brenda Lindsay Williams

Hi everyone. I'm working on a project which involves the backbone/core
network of VoIP networks. The core network consists of a combination of
routers and switches which handles and controls traffic in the
network.Plsis it possible to emulate this core network using NS
2.I'll like to know how.It'svery important.Thank you.

Best regards,

Brenda


Re: [ns] what is the transmission range fo mobile nodes

2007-02-08 Thread Daniel Mahrenholz


Satish B schrieb:

I want know what is the transmission range(ie upto maximum what distance it can 
send/receive packets with other nodes)of the mobile nodes in ns2.If I want to 
set with new range how to send it.please let me know this.
Thank  you .
  

This question has been answered multiple times.

Transmission range is NOT a parameter you can set. It is the result of
the signal propagation. To change the transmission range you can adjust
the transmission power, receive thresholds, antenna gains, and
propagation parameters. The propagation.cc utility
(indep-utils/propagation/) helps you to calculate these parameters.
Additionally, you should study some hardware specs to get realistic values.

Daniel.

--
Dr.-Ing. Daniel Mahrenholz
rt-solutions.de GmbH
Oberländer Ufer 190a
D-50968 Köln

rt-solutions.de
networks you can trust.




[ns] what is the transmission range fo mobile nodes

2007-02-08 Thread Satish B

Hello,
I want know what is the transmission range(ie upto maximum what distance it can 
send/receive packets with other nodes)of the mobile nodes in ns2.If I want to 
set with new range how to send it.please let me know this.
Thank  you .


[ns] mobile node Neighbour list

2007-02-08 Thread ghada

Dear all,

I have a problem to get logical neighbor list for specific mobile node in
MANET simulation,



I used this code

In aodv.cc I've made a Tcl command as follow but i always get nothing, nb =0

--
if(strcmp(argv[1], "show-neigh")==0) {
  AODV_Neighbor *nb = nbhead.lh_first;
  tcl.evalf("puts \"\tNode\t\"");
  for(;nb;nb=nb->nb_link.le_next ){
   tcl.evalf("puts \"\t%d\t%f\"",nb->nb_addr);
  }
 return TCL_OK;
}


Thanks