[ns] How to avoid movementTrace of mobile nodes ? ( It seems movementTrace OFF does not work)

2006-10-09 Thread amir zare

I want to simulate an ad hoc mobile network with 100 mobile nodes in 1000
seconds. But the problem is it take too much memory space and time to
preform simulation. In order to remove unnecessary info of trace files, I
tried to remove movement trace of mobile nodes with movementTrace OFF in
node-config . After this I found that the trace file has the same result
when movementTrace is either ON or OFF. I mean lines like:

* M 1.0 0 (490.18, 456.19, 0.00), (0.00, 0.00), 0.00
** M 1.0 1 (130.68, 257.04, 0.00), (0.00, 0.00), 0.00 *
* M 1.0 2 (88.83, 394.25, 0.00), (0.00, 0.00), 0.00
 M 1.0 3 (236.69, 88.64, 0.00), (0.00, 0.00), 0.00
 M 1.0 4 (264.81, 234.03, 0.00), (0.00, 0.00), 0.00
 M 1.0 0 (490.18, 456.19, 0.00), (377.91, 111.04), 2.26
 M 1.0 1 (130.68, 257.04, 0.00), (186.11, 421.37), 3.98
 M 1.0 2 (88.83, 394.25, 0.00), (244.22, 22.03), 3.33
 M 1.0 3 (236.69, 88.64, 0.00), (192.80, 465.19), 3.81
 M 1.0 4 (264.81, 234.03, 0.00), (103.61, 340.43), 0.95

*So, I changed the relating code in ~ns/common/mobilenode.cc - proc
log_movement() . After having compiled, the new mobilenode.o obejct was
created. I run the silmulation with new created object, but I found that
above lines ( movement trace lines in trace file) didn't change at all. It
seems these lines are coming from the other place. I searched all files that
might be the reason of creation of these lines of trece file, but i did not
find any thing.


void MobileNode::log_movement() {

  if (!log_target_) return;

  Scheduler s = Scheduler::instance();

 sprintf(log_target_-pt_-buffer(),

 M %.5f %d (%.2f, %.2f, %.2f), (%.2f, %.2f), %.2f, s.clock(), address_,
X_, Y_, Z_, destX_, destY_, speed_);

 log_target_-pt_-dump();

}

 The question is where these lines of trace file are coming from?

  I would appreciate any help

  Amir


[ns] what is the meaning of $self next

2006-10-09 Thread Guillermo Biot

Hi,

I'm using some test scripts and I found the following code in one of them:

$self next

What does it mean?
It is part of an instproc.
There is no function called next in the script.
Thank you.

Regards,
Guillermo


Re: [ns] IPv6 support in NS-2

2006-10-09 Thread Pedro Vale Estrela


Check how this is done in mobiwan - these nice guys have implemented IPv6
and Mobile IPv6
http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html



Pedro Vale Estrela

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Tubtim Sanguanwongthong
 Sent: sábado, 7 de Outubro de 2006 14:17
 To: ns-users@ISI.EDU
 Subject: [ns] IPv6 support in NS-2
 
 
 I've tried to modify NS-2 to support IPv6 beginning with ip.h.
   In ip.h,
 
 struct hdr_ip {
 _/* common to IPv{4,6} */
 ns_addr_t   src_;
 ns_addr_t   dst_;
 int ttl_;
 
   }
 
   I'd like to know whether I have to change type of src_ and dst_ to
 support 128 bits.  ns_addr_t  src_; and ns_addr_t dst_;   can be used in
 both IPv4 and IPv6.
   I'm really appreciated in this help (very important).
   Thank you in advance.
   Tubtim
 
 
 -
 Want to be your own boss? Learn how on  Yahoo! Small Business.




Re: [ns] what is the meaning of $self next

2006-10-09 Thread Pedro Vale Estrela

http://www.openmash.org/developers/docs/otcl-doc/doc/class.html



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Guillermo Biot
 Sent: segunda-feira, 9 de Outubro de 2006 11:43
 To: Ns Users
 Subject: [ns] what is the meaning of $self next
 
 
 Hi,
 
 I'm using some test scripts and I found the following code in one of them:
 
 $self next
 
 What does it mean?
 It is part of an instproc.
 There is no function called next in the script.
 Thank you.
 
 Regards,
 Guillermo




Re: [ns] How to change the parameters during the simulation to save thetime

2006-10-09 Thread Pedro Vale Estrela


Use this proc:
http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652228

sample code:


global opt
set opt(opt_conv) {
  { d my_delay_ms }
...
}

set opt(my_delay_ms) 100;# default: 100 ms delay
my_getopt $argv
  

set opt(my_delay_s) [expr $opt(my_delay_ms) * 0.001 ]   ;# convert to
seconds


...

$ns make-lan $TCP_BS $TCPr 2mb $opt(my_delay_s) LL Queue/DropTail Mac
...

change the trace name to include the current delay parameter, to create
different trace files


Calling format in bash:
---

for i in 1 10 100 1000; do 
ns my_script.tcl -- -d $i
done



Pedro Vale Estrela
http://tagus.inesc-id.pt/~pestrela/ns2/




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Bilal AbuQadous
 Sent: sábado, 7 de Outubro de 2006 23:05
 To: ns-users@ISI.EDU
 Subject: [ns] How to change the parameters during the simulation to save
 thetime
 
 
 Dear ns users,
 
 
 
 would you please tell me how I can change the parameters without stopping
 the simulation.
 
 as eg.
 
 
 
 how I can change the delay in the following command without stopping the
 simulation and make that automatic until the end.
 
 
 
 $ns make-lan $TCP_BS $TCPr 2mb 0.001ms LL Queue/DropTail Mac
 
 
 
 if I will make a test with different delay starting from 0.001, 0.01,
 0.01,1,
 10, 100, 150 ms, how I could make these changes automatically without
 entering new delay parameter by stop the simulation.
 
 
 
 I need this thing To save the time and the effort.
 
 
 thank you in advance
 
 
 
 
 
 
 --
 AbuQadous, Bilal
 Alamiah Electronics (Systems Engineer)
 Mobile:+966507174541
 Office:+96638610044 ext:772
 P.O. Box 9912
 Dammam 31423
 KSA




[ns] Problem: CBQ with wireless ad hoc network

2006-10-09 Thread DistributedSystem

hi
i would be greatly thank full to you if you help me how can i use Class based 
queue in wireless ad hoc network.
i know mobile nodes has interface queue, and default is Queue/DropTail/PriQueue
, how i can change it to CBQ/WRR.
also, in cbq we have to make link between two nodes and then install priority 
classes into those links, but in Wireless network we have radio medium between 
two or more nodes, how can we put priority classes in this case.

i m waiting for quick response.

thank you

bye


-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.


[ns] [Fwd: Backward Compatibility mode!]

2006-10-09 Thread g_fnoor

 Original Message 
Subject: Backward Compatibility mode!
From:[EMAIL PROTECTED]
Date:Fri, October 6, 2006 1:15 pm
To:  Ns-users@ISI.EDU
--

Hey Guys,
  I'm a graduate student working on my master's project which is on WSN
and i'm just starting my simulations with NS and the computer that we
work on has more than one user using it, so we are not allowed to change
anything in the BASH files, so when I started simulating with ns it
gives me these errors,there are like a bunch of them
 i've already installed ns, and changed the paths but when try to use th
ecommand ls after i changed the paths, it gives me the error
-bash: ns: command not found

And then when i tried ./ns in a particular directory it started the ns,
but when i try running a program, it gives me the error :
warning: using backward compatibility mode
error when calling class OldSim: filename.tcl

can somebody please help with what i'm doing wrong or what i need to do
inorder to get this working.

Thanks a lot
Fatema.




Re: [ns] sending packets

2006-10-09 Thread Pedro Vale Estrela


Inside my recv() function I do like this without problems:


// clone the current packet and change some fields
Packet* new_p = clone_pkt(p);

hdr_ip*new_iph  = hdr_ip::access(new_p);

new_iph-daddr() = ...;
new_iph-saddr() = addr();

// change fields on the current packet
iph-daddr() = id2iaddr(th-b_id);
iph-saddr() = addr();


// send original packet somewhere
send(p, 0);

// send cloned packet elsewhere
send(new_p, 0);

...





 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Larry Brigman
 Sent: segunda-feira, 9 de Outubro de 2006 19:14
 To: ns-users@ISI.EDU
 Subject: [ns] sending packets
 
 
 I am working on a queuing model.  There are times that I need to
 send more than one packet in the recv function.
 
 Because of the way NS models things it looks like after a single send or
 target-recv(p,h) I cannot send again without an error.
 
 Is there a way to write a recv function that is allowed to send more than
 once?
 
 Also when I am rescheduling my class to deque packets, about the time I
 need to
 deque two or more packets NS detects that time has gone backwards!
 
 
 I am running this on FC4 using 2.29 version of NS.
 
 Thanks for any help provided.
 Larry





Re: [ns] How to compute collision rate on wireless network ?

2006-10-09 Thread Martina Umlauft

Hi there,

instead of first writing the file and then processing it with awk, pipe 
the ns output directly through awk so only the lines you are interested 
in are ever written to disk:

set file [open | awk -f myfilter.awk  short_tracefile.tr w];

myfilter.awk should contain your awk commands. You can also put the 
commands directly into the .tcl script, just be sure to escape all quote 
marks as needed. You can also use any other command, eg. grep or a 
concatenation of several commands (just pipe one into the next) to 
pre-process your file.

This is the most efficient way to save time and disk space, the only 
drawback is that you can't later on decide that you want to look at 
other data since only the filtered data is written.


good luck,
 Martina Umlauft[EMAIL PROTECTED]
-
http://frauenweb.at/~tina

ns user schrieb:
 hi all,
 
 i'm using ns 2.29 to simulate a large wireless topologies (more than 100 
 nodes). the goal of my simulations is to compute collisions rate. so i 've 
 enabled MAC trace and i'm using awk to filter only lines where there is 
 collision (if $1 = 'D'  $5 = 'MAC').
 but the problem is that the simulation take a lot of time ( more than 1 hour) 
 because of the trace file that exceed 60 Mo in some cases. So i'm looking if 
 there is not an other method to calculate the collision rate
 
 please help me it's urgent
 
 
 
 
   
 
   
   
 ___ 
 Découvrez un nouveau moyen de poser toutes vos questions quel que soit le 
 sujet ! 
 Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et 
 vos expériences. 
 http://fr.answers.yahoo.com 



[ns] Re : How to compute collision rate on wireless network ?

2006-10-09 Thread ns user

hi Martina;

but what i want to do is to compute the following value :
number of collided packets / number of sent packet. So i need the two values 
and even like this i think it will take a lot of time.

best regards.

- Message d'origine 
De : Martina Umlauft [EMAIL PROTECTED]
À : ns user [EMAIL PROTECTED]
Cc : ns-users@ISI.EDU
Envoyé le : Lundi, 9 Octobre 2006, 1h00mn 28s
Objet : Re: [ns] How to compute collision rate on wireless network ?

Hi there,

instead of first writing the file and then processing it with awk, pipe 
the ns output directly through awk so only the lines you are interested 
in are ever written to disk:

set file [open | awk -f myfilter.awk  short_tracefile.tr w];

myfilter.awk should contain your awk commands. You can also put the 
commands directly into the .tcl script, just be sure to escape all quote 
marks as needed. You can also use any other command, eg. grep or a 
concatenation of several commands (just pipe one into the next) to 
pre-process your file.

This is the most efficient way to save time and disk space, the only 
drawback is that you can't later on decide that you want to look at 
other data since only the filtered data is written.


good luck,
 Martina Umlauft[EMAIL PROTECTED]
-
http://frauenweb.at/~tina

ns user schrieb:
 hi all,
 
 i'm using ns 2.29 to simulate a large wireless topologies (more than 100 
 nodes). the goal of my simulations is to compute collisions rate. so i 've 
 enabled MAC trace and i'm using awk to filter only lines where there is 
 collision (if $1 = 'D'  $5 = 'MAC').
 but the problem is that the simulation take a lot of time ( more than 1 hour) 
 because of the trace file that exceed 60 Mo in some cases. So i'm looking if 
 there is not an other method to calculate the collision rate
 
 please help me it's urgent
 
 
 
 
 
 
 
 
 ___ 
 Découvrez un nouveau moyen de poser toutes vos questions quel que soit le 
 sujet ! 
 Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et 
 vos expériences. 
 http://fr.answers.yahoo.com 











___ 
Découvrez un nouveau moyen de poser toutes vos questions quel que soit le sujet 
! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos 
expériences. 
http://fr.answers.yahoo.com 


Re: [ns] sending packets

2006-10-09 Thread Larry Brigman

On 10/9/06, Pedro Vale Estrela [EMAIL PROTECTED] wrote:

 Inside my recv() function I do like this without problems:


 // clone the current packet and change some fields
 Packet* new_p = clone_pkt(p);

 hdr_ip*new_iph  = hdr_ip::access(new_p);

 new_iph-daddr() = ...;
 new_iph-saddr() = addr();

 // change fields on the current packet
 iph-daddr() = id2iaddr(th-b_id);
 iph-saddr() = addr();


 // send original packet somewhere
 send(p, 0);

 // send cloned packet elsewhere
 send(new_p, 0);

That doesn't seem to work for me when my class inherits from the queue class.

In my recv function I am doing:
while ((pkt = deque()) != NULL) {
send(pkt,0);
}

I get this error:
Scheduler: attempt to schedule an event with a NULL handler.  Don't DO that.

If I change it to use the handler that is inherited from the queue class as
while ((pkt = deque()) != NULL) {
send(pkt,qh_);
}

I get an error like:
Scheduler: Event UID not valid!


If I only do process one packet each time recv is called but always
schedule() with a small
delay, I get NS time backwards error.

I need to schedule every 5-10ms even if no packets are arriving as the
object may have
held packets because of the queuing functions.



[ns] Can nix-vector routing be applied for simulating wireless ad hoc networks?

2006-10-09 Thread amir zare

Hi all,

I want to reduce simulation time and memory usage by techniques
introduced in Tips and Statistical Data for Running Large Simulations in
NS. I want to know whether nix-vector routing can be applied for simulating
wireless ad hoc networks? If yes, Is any setting or command required in tcl
script in addition to $ns set-nix-routing ?
I would appricate any help
Amir


Re: [ns] sending packets

2006-10-09 Thread Larry Brigman

No, I need to send different p during the same recv function.
(ie I need to deque multiple packets)

On 10/9/06, Raghu-kisore Neelisetti [EMAIL PROTECTED] wrote:
 Hi,
  Iam not sure If i understood you right. You cannot send the same 'p'
 over and over again (If this what u meant). The way to avoid the problem
 is
 target-recv(p,h)
 //Now make a copy of the p that you sent before and then
 target-recv(p,h)

 Iam sorry if i misunderstood you.
 raghu.


  Larry Brigman [EMAIL PROTECTED] 10/09/06 1:14 PM 
 I am working on a queuing model.  There are times that I need to
 send more than one packet in the recv function.

 Because of the way NS models things it looks like after a single send or
 target-recv(p,h) I cannot send again without an error.

 Is there a way to write a recv function that is allowed to send more
 than once?

 Also when I am rescheduling my class to deque packets, about the time I
 need to
 deque two or more packets NS detects that time has gone backwards!


 I am running this on FC4 using 2.29 version of NS.

 Thanks for any help provided.
 Larry