Re: [ns] Queue Monitoring (PAVAN KUMAR O)

2007-12-23 Thread Filippos Kolovos

-
Dear Sir,

You can find some info at the following address:

http://mailman.isi.edu/pipermail/ns-users/2006-August/056736.html

However, please note that this procedure has been tested to work for wired
links.

Kind Regards,

-Fk

On Dec 23, 2007 3:00 AM, [EMAIL PROTECTED] wrote:

 Send Ns-users mailing list submissions to
ns-users@isi.edu

 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. Queue Monitoring (PAVAN KUMAR O)


 -- Forwarded message --
 From: PAVAN KUMAR O [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 22 Dec 2007 19:36:44 +0530
 Subject: [ns] Queue Monitoring
 Hi all,

   How to monitor the queue length in a node?  Also how to set the maximum
 queue length.
 I found one command on monitoring in chapter 7 of NS Manual (commands at a
 glance)...

 $ns_ monitor-queue n1 n2 qtrace sample interval

 i tried this taking the qtrace as another trace file. I think it
 is returning a integrator object and i dont know how to take it and query
 it.

 I would appreciate any help in this matter

 Thanks
 Pavan


 ___
 Ns-users mailing list
 Ns-users@isi.edu
 http://mailman.isi.edu/mailman/listinfo/ns-users




-- 
Filippos Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
  [EMAIL PROTECTED]
Profile: http://www.linkedin.com/in/filipposkolovos
--


Re: [ns] nam: command not found

2007-12-17 Thread Filippos Kolovos

-
Yes,

You have to go in the nam directory (inside the ns-allinone)
and in there issue ./configure and make

-Fk

On Dec 18, 2007 3:00 AM,  [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Arvind Swaminathan  [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Mon, 17 Dec 2007 12:14:03 -0600
 Subject: [ns] nam: command not found
 Hi,

 Do I have to install nam separately?  Or does the ns-allinone install
 install nam also?

 When I type in nam from any directory, I always get a nam: command not
 found error.

 I would appreciate any help in this matter.

 Thanks,
 Arvind




-- 
Filippos Kolovos
Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
Profile: http://www.linkedin.com/in/filipposkolovos
---


Re: [ns] Strange behaviour of TCPSink instvar bytes_

2007-06-14 Thread Filippos Kolovos

-
Hi,
I do not think that there is a problem with the variables per se,
but with the way that the TCL interpreter handles the command substitutions.

For example, when you invoke the command directly, i.e. with no
wrapping procedure, the NS scheduler schedules the event to occur
at time 1.0, but the event itself is actually to puts stdout \Rx bytes
(directly): 0\.
What happens, is that when the interpreter comes across this command it
SUBSTITUTES
the part [$tcp1 set bytes_], with the actual value at that point (which is
always 0) and schedules
the command above to execute at point 1.0, which includes only the printout
and nothing more.

On the other hand, when you invoke it using a wrapper proc, the interpreter
does not do any substitutions
at the point of scheduling (i.e. $ns at 1.0 testproc) but simply schedules
the procedure to execute at point 1.0,
which in turn will substitute the correct value of bytes_ at time 1.0. Any
substitutions in this case are deliberately left
to the procedure from the interpreter.

This way of behavior, is for any command - scheduling - want - to -
substitute - with value processes. :-)

I hope that I have helped.

-Fk

On 6/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Georg Piewald [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Wed, 13 Jun 2007 11:35:30 +0200
 Subject: [ns] Strange behaviour of TCPSink instvar bytes_
 Hi everybody,

 I experienced a very odd problem. I want to output the number of bytes
 received by a TCPSink agent at a specified time. This can be read by the
 instance variable $bytes_.
 Now if I call a procedure at the required point of time, which outputs
 the nr of bytes, everything works fine. Like this:

 ...
 proc testproc {} {
 global tcp1
 puts stdout Rx bytes (within testproc): [$tcp1 set bytes_]
 }
 ...
 $ns at 1.0 testproc
 ...

 But if I want to output this value directly (without a wrapping
 procedure, the output is always 0! Like that:

 $ns at 1.0 puts stdout \Rx bytes (directly): [$tcp1 set bytes_]\

 How can that be?
 I use ns-2.31. The complete code of a minimal example to reproduce the
 problem is here:


 # Example #

 set ns [new Simulator]

 proc testproc {} {
  global tcp1
  puts stdout Rx bytes (within testproc): [$tcp1 set bytes_]
 }

 set n0 [$ns node]
 set n1 [$ns node]
 $ns duplex-link $n0 $n1 1mb 50ms DropTail

 set tcp0 [new Agent/TCP]
 set tcp1 [new Agent/TCPSink]

 $ns attach-agent $n0 $tcp0
 $ns attach-agent $n1 $tcp1
 $ns connect $tcp0 $tcp1

 set ftp0 [new Application/FTP]
 $ftp0 attach-agent $tcp0

 $ns at 0.1 $ftp0 start
 $ns at 1.0 testproc
 $ns at 1.0 puts stdout \Rx bytes (directly): [$tcp1 set bytes_]\
 $ns at 1.5 $ftp0 stop
 $ns at 1.6 exit 0
 $ns run

  /Example #


 Output:

 % ns min_ex.tcl
 Received bytes (within testproc): 66600
 Received bytes (directly): 0


 Thanks for any hint!
 Georg




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] Help: error when using node generated by create_topology in NS format

2007-06-10 Thread Filippos Kolovos

-
Good morning

As it looks like from your code,
you are declaring the array n($i) only inside
your proc. However, because it is a local variable
it gets erased after the proc's execution. Therefore,
in your main script, when you try to access it with
$ns monitor-queue $n(3) $n(6)  the interpreter
complains with an error.

What I would do in order to quickly solve this situation, would
be to declare the n array outside the proc and then import it
inside the procedure with global. This way, all changes made to
the array inside the proc, will stay and after the end of the procedure,
without disrupting
the execution flow.

That is why the interpreter cannot find the array in your main script.
According
to the script: it was never created (!?).

Hope that I have helped.

Regards,

-Fk


On 6/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: khodor abboud [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Fri, 08 Jun 2007 17:05:10 +0200
 Subject: [ns] Help: error when using node generated by create_topology in
 NS format


 Hello evry Body,

 I am using the NS format generated by brite. when i try to use the node
 generated by the procedure create_topology (for monotoring per example), i
 have this error :

 // can't read n(3): no such variable
 while executing
 $ns monitor-queue create_topology.$n(3) $n(6) 
 invoked from within
 set qmon36  [$ns monitor-queue create_topology.$n(3) $n(6) ]
 (file topology.tcl line 189)//


 the code is :

 // proc create_topology {} {
 global ns

 #nodes:
 set num_node 10
 for {set i 0} {$i  $num_node} {incr i} {
set n($i) [$ns mpls-node]
 }

 set node0 [$ns node]
 set node1 [$ns node]

  #links:
 set qtype CBQ

 $ns duplex-link $node0 $n(3) 10.0Mb 3ms DropTail
 $ns duplex-link $n(0) $n(6) 10.0Mb 2.312773335190996ms $qtype
 $ns duplex-link $n(1) $n(0) 10.0Mb 2.9694568204843463ms $qtype
 $ns duplex-link $n(2) $n(1) 10.0Mb 1.8352240604833803ms $qtype
 $ns duplex-link $n(3) $n(2) 10.0Mb 1.5822334297190923ms $qtype
 $ns duplex-link $n(4) $n(0) 10.0Mb 1.4360234541568795ms $qtype
 $ns duplex-link $n(5) $n(3) 10.0Mb 2.559521441995941ms $qtype
 $ns duplex-link $n(6) $n(3) 10.0Mb 0.7953178172063804ms $qtype
 $ns duplex-link $n(7) $n(4) 10.0Mb 2.7512102890042183ms $qtype
 $ns duplex-link $n(8) $n(7) 10.0Mb 1.6254465755920127ms $qtype
 $ns duplex-link $n(9) $n(3) 10.0Mb 0.5596028576377098ms $qtype
 $ns duplex-link $n(7) $node1 10.0Mb 3ms DropTail
 }

 #end function create_topology


 set qs 100



 ## Queue Monitor for some links

 set qmon36  [$ns monitor-queue $n(3) $n(6) ]

 set qmon63  [$ns monitor-queue $n(6) $n(3) ]

 set sample36 [new Samples]

 $qmon04 set-delay-samples $sample36

 set sample63 [new Samples]

 $qmon40 set-delay-samples $sample63

 $ns queue-limit $n(3) $n(6) $qs //

 Best regards,

 _
 Ten :  Messenger en illimité sur votre mobile !
 http://mobile.live.fr/messenger/ten/






-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] Problem with make

2007-05-30 Thread Filippos Kolovos

-

Hi. I think that the problem that make reports has to do with the
fact that all the previously object files exist. You could erase the object
files of the .c files that you have modified so that make will have to
rebuild
only these files and not all of ns.

On the other hand, if this doesn't work you can also issue the following
commands, but in this case all of ns will be rebuilt, along with your new
files.
Consider it as a desperate measure:

/configure --with-tcl=the-tcl-directory --with-tcl-ver=the tcl version \
--with-tk=the-tk-directory --with-tk-ver=the-tk-version \
--with-otcl=the-otcl-directory --with-tclcl=the-tcltcl-directory \
--with-perl=the-perl-directory --with-tcl-debug --enable-debug;

make clean;
make depend;
make;

Hope that I have helped.

Kind Regards,

-Fk

On 5/30/07, [EMAIL PROTECTED] //[EMAIL PROTECTED]/ 
[EMAIL PROTECTED] //[EMAIL PROTECTED]/ wrote:


 -- Forwarded message --
 From: Dimitris Liarokapis [EMAIL PROTECTED]//[EMAIL PROTECTED]/
 
 To: ns2 ns-users@ISI.EDU //ns-users@isi.edu/
 Date: Wed, 30 May 2007 15:39:59 +0100
 Subject: [ns] Problem with make
 Hi,

 I have developed a new wireless protocol using ns-2.30, i have made all
 the
 necessary changes to the various ns files along with the  makefile.in.
 But when i'm trying to #make, i get the following error.
 make: *** No rule to make target `tcp/tcp-qs.o', needed by `ns'.  Stop.

 Does anyone have any idea on how to fix this???
 Tnx
 Dimitris



-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
Phone: +30-2310-891-826
--


Re: [ns] problem with scheduler

2007-03-24 Thread Filippos Kolovos

-
Hi there.

The solution to this problem is fairly simple, so do not worry.

At first, let me explain what causes this situation.
The problem does not lie at the Scheduler. The Scheduler works fine,
scheduling the event to occur at the appropriate time. The problem is
with the OTcl interpretor and the way it handles substitutions and
specifically
variable substitutions (i.e. to substitute $k with its value).

You see, the way you have written your code and because you are
using double quotes to include the command (be careful not the k=$k part
but the whole command) the interpretor substitutes the value of k at the
point
of the scheduling, which at this point is k=1. Then, at time 0.3 the command
is executed as: puts k=1 and not as puts k=$k and then at that point to
read
the value of the variable k.

What we need to do, in order to produce the correct result is to somehow
delay
the variable substitution of the command by telling the interpretor not to
do it right
now but later on. The way to do that is to use curly braces around the
command and
not double quotes. Curly braces { } in OTcl and Tcl have the special use
of telling
the interpretor to delay any substitutions for later, or in other words to
leave them to
the command involved and not to do it by itself before it hands the
variables to the command,
which in this case is the puts command.

What happens now is that the interpretor substitutes
the value of the variable at the time of the scheduling. When the command
puts executes, it
already finds the substituted value and not $k. If we put curly braces
around the command
then the interpretor will not substitute $k for 1 and it will leave it for
the command to do it
at the scheduled time, which in turn will find puts \k=$k\.

Therefore, what you need to do is to rewrite your code by at first removing
the
global command, which is not needed and then write the code as:

set ns [new Simulator]

set k 1

$ns at 0.2 set k 4

$ns at 0.3 {puts \k=$k\}

$ns run

With this command-set the substitution of the variable will be left to
the command when it is executed, which is scheduled at 0.3, which
in turn will read the value of k, which has been changed to 4 at 0.2.

I hope that I've helped.

Kind Regards,

-Fk

On 3/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Send Ns-users mailing list submissions to
 ns-users@isi.edu

 -- Forwarded message --
 From: Amin Irandoost [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Fri, 23 Mar 2007 11:11:55 +0430
 Subject: [ns] problem with scheduler
 hi dear friends
 my problem with scheduler still not solved
 what is may mistake?

 set k 1
 $ns at 0.2 global k;set k 4
 $ns at 0.3 global k; puts \k=$k\

 global in the above code doesn't impress

 please help me emergency

 I'm waiting for your reply

 Thanks in advance


 --
 Amin Irandoost




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] stop sending paquets

2007-03-24 Thread Filippos Kolovos

-
I do not find any problem with your code.
I have executed it and as it seems to be working fine.

The problem might be that node 1 looks like it is sending
packets, but in reality it simply sends-out the previously enqueued
packets, at the time when the CBR app was functioning.

To verify my reasoning, simply restart the cbr app at 9.0 and then
at 15.0 terminate the simulation. At the same time you can also
have executed $ns_ trace-all at a file, so you can check the
trace file instead of NAM in order to verify the situation.

You will see that it works fine. One way to reduce the time that the CBR
will
stop sending packets, i.e. get it closer to 4.2, will be to increase the
link
speed between the 2 nodes, so that they won't get buffered at the exit point
of node 1 because of the slow link.

But again, even with slow links, the behavior of the transmission system
would not be much different in reality, so again if you cannot reduce the
link speed
(because of simulation restrictions) you will not have a problem.

Hope that I've helped

-Fk

On 3/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Send Ns-users mailing list submissions to
 ns-users@isi.edu


 -- Forwarded message --
 From: Jezabel Miriam Molina Gil [EMAIL PROTECTED]
 To: ns2 ns-users@ISI.EDU
 Date: Fri, 23 Mar 2007 11:25:03 +
 Subject: [ns] stop sending paquets
 I am working with ns2 and I have got this code:

 set udp_(0) [new Agent/UDP]
 $ns_ attach-agent $node_(1) $udp_(0)
 set null_(0) [new Agent/Null]
 $ns_ attach-agent $node_(0) $null_(0)

 set cbr_(0) [new Application/Traffic/CBR]
 $cbr_(0) set packetSize_ 512
 $cbr_(0) set interval_ 0.01
 $cbr_(0) attach-agent $udp_(0)
 $ns_ connect $udp_(0) $null_(0)
 $ns_ at 4.00 $cbr_(0) start
 $ns_ at 4.20 $cbr_(0) stop

 but whe simulaticon reach the 4.2 node 1 go on sendig packet. How Can I
 stop
 it at 2.?
 --
 Saludos
 Jezabel M. Molina Gil






-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] how to use gdb to debug an error in .tcl format file

2007-03-17 Thread Filippos Kolovos

-
In order to debug TCL files you should use tcl-deug. In order
to debug the .cc files you need ddd (frontend for gdb).

Here is detailed web info on how to use both, from Pedro Vale Estela:
http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html

Also, at the ns web site there is some info on how to debug a TCL file
while executing a C++ and vice versa. Check:
http://www.isi.edu/nsnam/ns/ns-debugging.html

and especially the part Mixing TCL and C debugging.

Hope that I've helped

-Fk

On 3/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 -- Forwarded message --
 From: shayma sinan [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 17 Mar 2007 03:39:06 + (GMT)
 Subject: [ns] how to use gdb to debug an error in .tcl format file?
 hello ns-users,
   i got this error (segmentation fault) while trying to run an example (
 simula.tcl) of fhmip peckage under ns2.28

   ---
   [EMAIL PROTECTED] example]# ns simula.tcl  0
   INITIALIZE THE LIST xListHead
   Segmentation fault
   ---

   The INITIALIZE THE LIST xListHead is coming from channel.cc (i didn't
 modify this file as i modified others to use fhmip)

   i don't know how to find the crash that cause the error, so can anybody
 guide me how to use gdb comand? should it be applied to simula.tcl or
 channel.cc? or others?

   waiting for a reply

   thanks in advance

   best regards
   Shayma





-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece
--


Re: [ns] debuggin c++ in ns

2007-03-01 Thread Filippos Kolovos

-
When you configure ns, you have to use the flag --enable-debug
in order to generate the appropriate symbols for debugging. Then
when you open the ns executable with DDD, you will be transferred
to the source files and you will be able to debug the whole source code
of NS-2.

Remeber though that you have to ./configure --enable-debug (along with any
other
parameters that you may wish to use) and then re-execute make clean, make
depend and make.

Kind Regards,

-Fk

On 3/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: pankaj chand [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Thu, 01 Mar 2007 04:16:39 +0530
 Subject: [ns] debuggin c++ in ns

hi can anyone please tell how to debug the c++ source code in ns. after
 adding the -g and several other statements in the makefile.in and install
 file, im able to debug but the debugger cannot find the source code, and
 hence cannot show me the line of code which is raising the error (bug).
 i am calling the debugger on the ns binary executable in the
 ns-allinone2.29/bin folder.
 how do i make the debugger, GDB or DDD find the source code of the ns
 program so as to find the exact line of code that is generating the bug.

 thanks in advance.
 pankaj chand
 mail address: [EMAIL PROTECTED]

 _
 Airtel Song Catcher. Get your Hello Tunes instantly
 http://www.airtel.in/songcatcher/SONG_CATCHER.html



 --===1688439445==--
 ___
 Ns-users mailing list
 Ns-users@isi.edu
 http://mailman.isi.edu/mailman/listinfo/ns-users




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] Is FTP traffic over TCP connection uses always the same route?

2007-02-14 Thread Filippos Kolovos

-
You could define the routing protocol to use
during the simulation, at the start of the tcl script
with the $ns rtproto command.
Then you could see what happens when changing the queue limits and
sizes.

NS, by default uses static routing with all routes pre-calculated
before the start of the simulation and hence the traffic follows
always the same route.

In addition you could simulate a drop of one or more lines by using the
dynamic models
of NS and in that case if you use a dynamic routing protocol you will see
the traffic changing
route, while if not the traffic will experience a major packet drop at the
precalculated intermediate node.

-Fk

On 2/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED]  wrote:

 -- Forwarded message --
 From: Dr. Mohamed Ben Othman  [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Tue, 13 Feb 2007 11:10:47 -0500
 Subject: [ns] Is FTP traffic over TCP connection uses always the same
 route?
 Dear all,



 I have a topology of 6 nodes: a src, dst and 4 connected routers:

 Src connected to r1

 Dst connected to r4



 r1 connected to r2 and r3

 r2 connected to r4

 r3 connected to r4



 Src  r1 r2

|   |

R3---r4---dst



 I sent traffic from src to dst and monitored the different queues. The
 problem is that the traffic always passes through r1, r2 and then r4.

 The queue of r3 is always empty.

 I tried to modify the queues sizes, the delay etc but I didn't succeed.

 I thought that TCP connection may take more than one route and the traffic

 passes via all possible routes.

 Can anyone help me.

 Thank you.

 Mohamed ben Othman





 --===0022760753==--
 ___
 Ns-users mailing list
 Ns-users@isi.edu
 http://mailman.isi.edu/mailman/listinfo/ns-users




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
---


Re: [ns] Syntax error using rtmodel-at

2007-02-11 Thread Filippos Kolovos

-
It does not have to do with the command that you give in the
tcl script, but with the generated command produced by the
$ns namtrace-all $filedesc tcl command, which gets written to a
file pointed by $filedesc.

The syntax of this command in the NAM file) is what has changed in later
versions
of NAM and as NAM reads the file while displays the simulation on the
screen, it notifies of the obsolete syntax. However, this is only a warning
and not an error, since it still interprets the command.

On the other hand, such a command does not exist for the NS interpreter,
and this is why the script crashes when you use it. It is merely a NAM
issue,
for which I wouldn't worry too much.

-Fk

On 2/11/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Onyekachi [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 10 Feb 2007 15:57:39 -0500
 Subject: [ns] Syntax error using rtmodel-at command
 Hi All,
 I tried to use the network dynamic command

 $ns rtmodel-at 1.0 down $n(1) $n(2)
 $ns rtmodel-at 2.0 up $n(1) $n(2)

 to fail and recover a link. But when i ran the tcl script, i got the
 following message:

 Nam syntax has changed: v -t 2 link-up 2 2 1
 Please use this format in the future.
 v -t time -e tcl expression

 I then changed the syntax to
 v 1.0 link-down 1 2
 v 2.0 link-up 1 2.

 The result i got was this:
 $ ns new3.tcl
 invalid command name v
 while executing
 v 1.0 link-down 1 2
 (file new3.tcl line 50)

 Please can someome tell me what I am doing wrong?
 Regards.

 Onyekachi.




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


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

2007-02-09 Thread Filippos Kolovos

-
At first you need to schedule the loop proc to execute at the
start (or whenever you like) of the simulation.

Then, you need to put the re-scheduling code inside the procedure itself
in order to make it recursive. In this way the loop procedure will execute
once
at the start of the simulation and then every time it is executed it will
re-schedule itself.
You can also use the now method of the Simulator object, in order to get
the exact current time
of execution of the procedure as below.

For example you need to change the code to something like this:

proc loop {} {
global abc value inc ns

set value [$abc get_value]
set current_time [$ns now]
set time  [expr {$current_time + $inc}]
$ns at $time loop
exit 0
}

set time 0.2
set inc 0.01
$ns at $time loop
}



On 2/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Somera Javed [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Fri, 9 Feb 2007 03:41:46 +0500
 Subject: [ns] How to call a procedure after a constant delay
 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???



 -- Forwarded message --
 From: Scott Ricketts [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Thu, 8 Feb 2007 15:29:47 -0800
 Subject: Re: [ns] How to call a procedure after a constant delay
 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

 ___
 Ns-users mailing list
 Ns-users@isi.edu
 http://mailman.isi.edu/mailman/listinfo/ns-users




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] Unistalling NS2

2007-01-21 Thread Filippos Kolovos

-
As far as I know, you just delete the ns-2 directories and
its uninstalled. After all ns-2 it's just an executable after the
./configure and ./make.

Regards,

-Fk

On 1/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Manoj Mistry [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 20 Jan 2007 22:53:05 +
 Subject: [ns] Unistalling NS2
 Hi

 I was wondering if anyone knows of a way of unistalling ns2, so I can
 reinstall it without no problems.
 Do I just delete the directories or is their command to use. Your help
 will
 be greatly valued

 Thanks
 Manoj Mistry

 ___
 Ns-users mailing list
 Ns-users@isi.edu
 http://mailman.isi.edu/mailman/listinfo/ns-users





-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] help needed

2007-01-04 Thread Filippos Kolovos

-
The -1 parameter means that the application will send an
arbitrarily large file (the file size will be selected randomly).
Check the NS-2 Manual, page 99, section 10.5.2 Starting the Agent
for more details.

Regards,

-Fk

On 1/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 -- Forwarded message --
 From: sandesh shenoy [EMAIL PROTECTED]
 To: nsusers ns-users@ISI.EDU
 Date: Thu, 4 Jan 2007 07:11:38 + (GMT)
 Subject: [ns] help needed
 Hello,
 I am confused with the part
   Application/FTP instproc start
   [$self agent] send -1

   What does that -1 mean?How does this exactly work? Any ideas will be
 helpful.

   Thanks in advance

 Send free SMS to your Friends on Mobile from your Yahoo! Messenger.
 Download Now! http://messenger.yahoo.com/download.php







-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] how to caculate the Packet delay?

2006-12-31 Thread Filippos Kolovos

-
You can also check the link below in the ns-users archives
for calculating the average queue delay in wired links (i.e. packet delay)
using monitor objects.

http://mailman.isi.edu/pipermail/ns-users/2006-August/056736.html

Hope that I have helped.

Regards,

-Fk


 On 12/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  -- Forwarded message --
  From: Larry Brigman [EMAIL PROTECTED]
  To: Zhao [EMAIL PROTECTED] 
  Date: Thu, 28 Dec 2006 18:39:40 -0800
  Subject: Re: [ns] how to caculate the Packet delay?
  On 12/28/06, Zhao [EMAIL PROTECTED] wrote:
  
   Hi, everyone
  
   I was wondering how to caculate the Packet delay of the FTP/TCP flow
  and CBR/UDP. Does anyone has the idea about this? If you know, please share
  with me.
   Thanks a lot.
  
 
  Turn on tracing and use the info that is provided in the trace file to
  calculate
  a packet delay.  Some of this delay is based on the info that you
  provide in the
  simulation (link delay, link bandwidth,packet size).
 
 
 
 
  ___
  Ns-users mailing list
  Ns-users@isi.edu
  http://mailman.isi.edu/mailman/listinfo/ns-users
 
 
 


-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] some question about gt-itm

2006-09-30 Thread Filippos Kolovos


-
Please check http://mailman.isi.edu/pipermail/ns-users/2006-July/056470.html
for a description about this problem.

I also have attached a gzipped file with the patch applied to the code so
that it does not generate the error, called gt-itm-linux-patched.tar.gz.

Unzip, untart, re-make and re-configure the code and you are good to go.

Hope that I've helped

-Fk

On 9/29/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


-- Forwarded message --
From: r9406014 [EMAIL PROTECTED]
To: NS-Users ns-users@ISI.EDU
Date: Fri, 29 Sep 2006 16:09:04 +0800 (CST)
Subject: [ns] some question about gt-itm
Dear ns2 users:
When I use gt-itm to generate a general random model,
but there are some problems in it.

I want to use one parameter files, and generate three graphs.

but, when i input for example, itm r10, the system's output is memory
alloc error.
does anybody know where is gt-itm's problem?

thanks

Tai-Yi Lin




--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
  [EMAIL PROTECTED]
--


Re: [ns] how to enable debugging

2006-09-22 Thread Filippos Kolovos

-
In order to enable tcl debugging and debugging of the ns executable with an
external debugger (GDB, DDD, etc), you have to specify it differently during
the
configure stage of your ns-compilation.

They are different things.

So, in order to enable tcl-debuging you have to add to the configure line
the following:

./configure other parameters --with-tcl-debug

and that's it! According to you mail, you entered --with-tcldebug, which is
not the correct parameter (syntactically) and it probably hit a
ignore-erroneous-parameter error
which you did not see.

Also, in order to enable ns debugging (to debug the executables you create
with C, not the tcl scripts)
you again have to ADD to the configure line the following command, which is
independent from the tcl-enable
debugging command:

./configure other parameters --with-tcl-debug --enable-debug

The path to the tcl-debug directories, you do not have to specify them.

I have compiled ns-2.29 on Debian with both debugging options enabled and
they all
work fine.

Hope that I have helped you.

Kind Regards,

-Fk

On 9/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:




 -- Forwarded message --
 From: Sandeep [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Tue, 19 Sep 2006 13:06:05 +0530
 Subject: [ns] how to enable debugging
 Hello all,
 I have installed tcl-debug 2.0 along with ns-2.27. while configuring
 ns-2.27 I have given the option --enable-debug and also gave path to
 tcl-debug library with --with-tcldebug- as specified in ns manual, then
 I compiled and installed ns.

 In a sample tcl script which I named as 'wireless.tcl', the first
 statement I put is debug 1, but as soon  as that statement  is executed,
 the following warning is coming and I am unable to debug.

 $ns wireless.tcl
 warning: Script debugging disabled.  Reconfigure with --with-tcldebug,
 and recompile.

 But I have already done whatever is specified in the warning, still
 warning is coming.
 Please somebody help  me how to enable debugging. Thanks in advance.

 regards
 Sandeep.



-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] delaySamp_ object and Delay samples

2006-09-10 Thread Filippos Kolovos

-
Yes, I did.


I had the same problem and the same day I posted the question, I also found
a solution to this matter and
to another one concerning using monitor objects to measure average queue
length in a wireline network.

I have posted a thread to ns-users mailing list concerning the description
of both problems. You can find it here:

http://mailman.isi.edu/pipermail/ns-users/2006-August/056736.html

I hope that I have answered your question.

Kind Regards,
Renata.

-Fk

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


 -- Forwarded message --
 From: Renata Vidal [EMAIL PROTECTED]
 To: Filippos Kolovos [EMAIL PROTECTED]
 Date: Sat, 9 Sep 2006 14:24:20 -0300
 Subject: Re: [ns] delaySamp_ object and Delay samples
 Hi Filippos,

 Did you solve your problem? Can you help me?
 I'm trying to get Delay Samples from monitor-queue, with these commands:

 set qm [$ns monitor-queue $n1 $n2 $qt 0.5]
 set integratorObjectDelay [$qm get-delay-samples]
 set delayfila [$integratorObjectDelay set delaySamp_]

 but when I run, I get the error:

 ns: queueLog: invalid command name 
 while executing
 $integratorObjectDelay get delaySamp_
 (procedure queueLog line 20)
 invoked from within
 queueLog

 According to NS DOC, the object it returns is delaySamp_.

 Any clue!?

 On 8/6/06, Filippos Kolovos [EMAIL PROTECTED] wrote:
 
  Dear all,
 
  has anybody used, or tried to use the delaySamp_ object
  that is provided with a queuemonitor object?
 
  In the manual it states that this object can be used to measure queue
 delays
  (page 76 of ns-manual).
  It has two methods:
 
  $queuemonitor get-delay-samples, which says it returns a Samples object
  delaySamp_ to record delays about queues and
 
  $queuemonitor set-delay-samples delaySamp_, is to set up the delay
 samples
  object to record delay statistics about queues. Also,  it states that
  delaySamp_ is a handle to a samples object, which must have been
 previously
  created (supposedly with the get-delay-samples method above).
 
  However I have the following code:
 
  #Setting a queue-monitor object for a specific queue
  set monitorQueue2_3  [$simulation monitor-queue $node2 $node3 stdout]
  #Setting the integrator for the average queue size - this works ok
  set integratorObject [$monitorQueue2_3 get-pkts-integrator]
 
  #using the get-delay-samples method of the queuemonitor object to get
 a
  delay samples
  set delaySamples [$monitorQueue2_3 get-delay-samples]
  #using the set-delay-samples method on, supposedly, the returned
 object to
  set-it up,
  #according to the manual
  $monitorQueue2_3 set-delay-samples delaySamples
 
  
  
  more code
 
  When I simulate the tcl code I get the following error:
 
  (_o59 cmd line 1)
  invoked from within
  _o59 cmd set-delay-samples delaySamples
  invoked from within
  catch $self cmd $args ret
  invoked from within
  if [catch $self cmd $args ret] {
  set cls [$self info class]
  global errorInfo
  set savedInfo $errorInfo
  error error when calling class $cls: $args $...
  (procedure _o59 line 2)
  (SplitObject unknown line 2)
  invoked from within
  $monitorQueue2_3 set-delay-samples delaySamples
  (file simulation-Class-AverageQueue.tcl line 80)
 
  What Could be the cause of this? I use ddd as my debugger and I have
 come to
  the conclusion that the get-delay-samples method does not return
 anything,
  since
  the delaySamp_ object is initialized to NULL upon initialization of the
  queuemonitor object.
  The code is in the queue-monitor.cc file in ns-directory/tools/
 
  How can one use the delaySamp_ objects of queuemonitor to measure queue
  delays?
  Am I correct, or I am erroneously using these methods?
 
  Any help would be appreciated.
 
  Kind Regards,
 
  -Fk
 
 



 --
 Renata Vidal
 Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos
 ataques sem cultivar o espírito da iniciativa (A Arte da Guerra – SUN
 TSU – pg 102)





-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] What's wrong with this code?

2006-08-24 Thread Filippos Kolovos

-
It has several errors, which you can spot in the code that I send you, which
should work.
I also have included a simple trace output for you, so that you will be able
to see the packets that were actually
sent between the 2 agents.

As I understand from the code, you are trying to connect both-way 2 agents
(FullTCP) and send packets between them.
The error message that you are getting is caused by the start and later
the send methods that you are using in your code since:

  1.) You are executing the start and/or the send methods naked,
meaning that you do not specify a specific time point
   (i.e. $ns at 0.1 $client_app start, or $ns at 1.2 $client_app send
100).

  2.) You are not running the simulator from within your script at all

This error message means that there is no target defined for the application
that is trying to send the packet, or in other words,
the simulator has not yet actually created the target addresses of the
nodes, since you did not run it. You have to issue AT THE END of your
script, the command $ns run, to actually start the simulator and just before
that command a finish command (a procedure) that will actually stop the
simulator at a specific point in (the simulated) time.

In the code below which works, I also include some potentialy helpful
comments.
Just copy+paste the code to a tcl file and run it. Then examine the
traces.tr file to see the packets that your applications have sent
to each other.

#**

# finish proc executed at the end

proc finish {} {
global tf

close $tf
exit 0
}

set ns [new Simulator]

set client [$ns node]
set server [$ns node]

set tf [open traces.tr w]
$ns trace-all $tf

$ns duplex-link $client $server 10Mb 10ms DropTail
$ns duplex-link-op $client $server queuePos 0.5

set client_tcp [new Agent/TCP/FullTcp]
set server_tcp [new Agent/TCP/FullTcp]

#Why do you keep that list?
lappend agents_(source) $client_tcp $server_tcp

#You have to put both of them in listening state in order to have a
bi-directional send-packet flow
#meaning for both applications to send to each other application packets
beyond the acknowledgements

$server_tcp listen
$client_tcp listen

$ns attach-agent $client $client_tcp
$ns attach-agent $server $server_tcp

#You have to connect them only once - The opposite direction is redundant
$ns connect $client_tcp $server_tcp

#You do not need to connect to the opposite direction - erase that line
#$ns connect $server_tcp $client_tcp

#You can also try the Application/FTP subclass if you like.

set client_app [new Application]
$client_app attach-agent $client_tcp

set server_app [new Application]
$server_app attach-agent $server_tcp

#You do not need these as well since you are just sending a single packet -
Nevertheless, with the class Application
#the start method does not do anything. You can go and use the send method
directly. You can use the FTP subclass
#to use the start method, but not concurrently with the send methods below -
either one or the other.

#$ns at 0.0 $client_app start
#$ns at 0.1 $server_app start

#Just send the packet at the specified time
$ns at 1.0 $client_app send 100
$ns at 1.5 $server_app send 300

#Schedule the finish time
$ns at 3.0 finish

#Run (begin) the simulator

$ns run

Hope that I have helped

Regards,

-Fk

On 8/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 -- Forwarded message --
 From: 임인택 (Intaek Lim) [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Wed, 23 Aug 2006 11:39:44 +0900
 Subject: [ns] What's wrong with this code?
 Hello, I just wrote simple tcl script for ns but it did not work.

 -

 set ns [new Simulator]

 set client [$ns node]
 set server [$ns node]

 $ns duplex-link $client $server 10Mb 10ms DropTail
 $ns duplex-link-op $client $server queuePos 0.5

 set client_tcp [new Agent/TCP/FullTcp]
 set server_tcp [new Agent/TCP/FullTcp]
 lappend agents_(source) $client_tcp $server_tcp

 $server_tcp listen

 $ns attach-agent $client $client_tcp
 $ns attach-agent $server $server_tcp

 $ns connect $client_tcp $server_tcp
 $ns connect $server_tcp $client_tcp

 set client_app [new Application]
 $client_app attach-agent $client_tcp

 set server_app [new Application]
 $server_app attach-agent $server_tcp

 $client_app start
 $server_app start

 $client_app send 100

 _


 When I run this script, I get an error like below:


 --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
 _o12: no target for slot -1
 _o12 type: Classifier/Hash/Dest
 content dump:
 classifier _o12
 0 offset
 0 shift
 2147483647 mask
 1 slots
 slot 0: _o30 (Classifier/Port)
 -1 default
 -- Finished standard no-slot{} default handler --



 Please tell me what should I do.


 thanks.





-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

[ns] delaySamp_ object and Delay samples

2006-08-06 Thread Filippos Kolovos

Dear all,

has anybody used, or tried to use the delaySamp_ object
that is provided with a queuemonitor object?

In the manual it states that this object can be used to measure queue delays
(page 76 of ns-manual).
It has two methods:

$queuemonitor get-delay-samples, which says it returns a Samples object
delaySamp_ to record delays about queues and

$queuemonitor set-delay-samples delaySamp_, is to set up the delay samples
object to record delay statistics about queues. Also,  it states that
delaySamp_ is a handle to a samples object, which must have been previously
created (supposedly with the get-delay-samples method above).

However I have the following code:

#Setting a queue-monitor object for a specific queue
set monitorQueue2_3  [$simulation monitor-queue $node2 $node3 stdout]
#Setting the integrator for the average queue size - this works ok
set integratorObject [$monitorQueue2_3 get-pkts-integrator]

#using the get-delay-samples method of the queuemonitor object to get a
delay samples
set delaySamples [$monitorQueue2_3 get-delay-samples]
#using the set-delay-samples method on, supposedly, the returned object to
set-it up,
#according to the manual
$monitorQueue2_3 set-delay-samples delaySamples



more code

When I simulate the tcl code I get the following error:

(_o59 cmd line 1)
invoked from within
_o59 cmd set-delay-samples delaySamples
invoked from within
catch $self cmd $args ret
invoked from within
if [catch $self cmd $args ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error error when calling class $cls: $args $...
(procedure _o59 line 2)
(SplitObject unknown line 2)
invoked from within
$monitorQueue2_3 set-delay-samples delaySamples
(file simulation-Class-AverageQueue.tcl line 80)

What Could be the cause of this? I use ddd as my debugger and I have come to
the conclusion that the get-delay-samples method does not return anything,
since
the delaySamp_ object is initialized to NULL upon initialization of the
queuemonitor object.
The code is in the queue-monitor.cc file in ns-directory/tools/

How can one use the delaySamp_ objects of queuemonitor to measure queue
delays?
Am I correct, or I am erroneously using these methods?

Any help would be appreciated.

Kind Regards,

-Fk


-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
Phone: +30-2310-891-826
--


[ns] Calculate Average queue delay and average queue size - Explained

2006-08-06 Thread Filippos Kolovos

Dear ns-community,

I probably have found a way to answer my own question which was posted
previously concerning the calculation of average queue delay and size with
monitor objects.

After thorough study, I eventually found out what one has to do in order
to calculate the average queue delay and average queue size (i.e. without
extra-tcl code
or awk scripts) through a monitor object. The code to do that has already
been implemented
in ns-2, in monitor objects.

However, please note that the methods below correspond to my observations
and effort and thereby
I do not guarantee that there are 100% error-free, since I might have missed
something, or understood
something wrong. On the other hand, after the experiments that I carried out
with some tcl scripts,
it seems that the monitor objects along with these methods work OK. The
experiments were carried out for wired links and with no
line-failures (the monitor objects in ns present problems in the calculation
of the queue statistics when a line
drops and comes up again - it seems that all counters get reset!).

The NS-2 version I use is ns-2.29 under Debian Sarge

For the examples below I am assuming a 3-node topology with links
in-between:

node1 - node2 - node3

The link characteristics (propagation delay, bandwidth, etc) and the queue
management (droptail, RED, etc) may be as one desires


*** CALCULATION OF AVERAGE QUEUE SIZE **

After the creation of the links and the nodes, we are going to measure the
average queue
size of the connection from node2 to node3. Instead of using a tcl procedure
that is executed
every n seconds, we are going to use the Integrator objects that ns-2
already supports under the monitor objects.

At first we create the monitor object as usual, for the queue that we want
to monitor:

set monitorN2_N3 [$ns monitor-queue $node2 $node3 stdout]

then we get the integrator object through the monitor object for the
queue. This method returns an
integrator object which later can be queried for the average queue size in
packets (Integrator objects calculate
integrals of samples over time):

set inetgratorObjectN2_N3 [$monitorN2_N3 get-pkts-integrator] (or
[$monitorN2_N3 get-bytes-integrator] for average size in bytes)

and finally before the end of our simulation we print out the result with:

puts stdout Average queue size: [expr {[$integratorObjectN2_N3 set
sum_]/$finishTime}]

where sum_ is a property of the integrator object that contains the integral
sum of all the sample points from the start of the
simulation until the time we get it (finishTime).

finishTime is a custom variable containing the finish time of our simulation
(100,200 seconds, etc).
We have to divide it in order to get the average over all the simulated
time.


* CALCULATING AVERAGE QUEUE DELAY
***

In order to calculate the average queue delay of a queue with a monitor
object, we can use a Samples object that accompanies
the monitor object, which simply uses the timestamp field of a special
common header (hdr_common) in the packets transmitted. This header is
solely used for this purpose (i.e. calculate statistics).

Below I include the code for the average queue size as well

At first we create a samples object that will be passed to the monitor
object later:

set monitorN2_N3 [$ns monitor-queue $node2 $node3 stdout]
set inetgratorObjectN2_N3 [$monitorN2_N3 get-pkts-integrator]

set samples_object [new Samples]

Then we must set it up to be used with our monitor object:

$monitorN2_N3 set-delay-samples $samples_object

Then we get it through the get method of our monitor object (as we have
done for the monitor object)

set delaySamplesObject [$monitorN2_N3 get-delay-samples]

And then at the end of the simulation we call the mean method of the
samples object (that has been assigned to our queue)
to get the mean delay of the queue in seconds:

puts stdout Average Queue Delay: [$delaySamplesObject mean]

There are other methods to use with the samples object, such as variance,
cnt, etc. For more information concerning these
methods one might check the Mathematical Support chapter 24 of the ns-2
manual.

Also, there are set-pkts-integrator and set-bytes-integrator methods as well
for setting up the integrator objects as well.
However, it is not necessary one to use them, since their corresponding
Samples objects are being created through
init-monitor during the initialization of the monitor object. Only the delay
samples is not being initialized and not calling
the method set-delay-samples with an existing samples object returns an
error.

Also, please note that the above might have alradey been documented as such
somewhere else beyond my knowledge,
but since I have seen this question many times in the forum I decided to
post an answer in the forum. My apologies
for any inconvenience this might have caused.

Comments concerning the above are welcome.

Kind Regards,


Re: [ns] AntNet source code for ns2- 2.29

2006-07-31 Thread Filippos Kolovos

-
You might have already seen this site, but in any other case it might
be helpful.

http://www.item.ntnu.no/~wittner/ns/

It has ant-like code, but it is for ns-2.28. I think you might be able to
adapt it
to ns-2.29.

Hope that I have helped.

Regards,

-Fk

On 7/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: ahmed nagy [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 29 Jul 2006 16:43:37 +0300
 Subject: [ns] AntNet source code for ns2- 2.29
 I urgently need AntNet source code i am using version 2.29 ns 2 kindly
 send
 it to me i need it urgently
 Thank you in advance
 Ahmed


-Fk

-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
--


Re: [ns] Wireless packet size limit + wireless bandwidth question

2006-07-25 Thread Filippos Kolovos

-

On 7/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Heo Heo [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 22 Jul 2006 17:18:26 -0700 (PDT)
 Subject: [ns] Wireless packet size limit + wireless bandwidth question
   Hi all,

   I was doing a simple wireless simulation in which 2 nodes send are
 placed next to each other, with one being the sender and the other being
 the receiver (based on the Simple.tcl on ns website). The sender sends
 500 packets to the receiver.

   1) I tried to change the packet size from 512 to 1024 bytes. I parsed
 the trace file I find out that:
   - If the packet size is 512 bytes, 500 packets were sent.
   - If the packet size is 1024 bytes, 1000 packets were sent.

   It seems to me that some layer has automatically split up the 1024-byte
 packets
 into smaller parts.

   So, my question is: what is the default wireless packet size, and how
 to change it ? and Which layer actually split up the big packets ?


The network layer. The splitting-process depends upon the MTU (Maximum
Transmission Unit) used by the
network layer of the network from which the packet passes. For a very draft
explanation, this is the default maximum packet size that a sender can put
onto the channel for transmission, which has been agreed according to a
maximum. For example, the Internet de facto standard for the MTU is 576
bytes,
while for Ethernet networks the maximum is 1500 bytes (to account for
typical TCP packets). However, this can change per connection,
according to the initial 3-way handshake parameters exchange.

The NS-2 simulator uses an MTU of approximately 576 bytes, so this is
probably the reason of the packet-doubling.

For more information concerning the MTU, check the following site:


http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci213605,00.html

and

http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci830944,00.html

  2) My next question is about the wireless bandwidth.

 By default, ns uses a wireless link bandwidth of 2 Mbps. By
 changing the packet interval, I have at most 670 Kbps. Because there are
 only
 2 nodes, the 2 nodes must be using full bandwidth for this. Given that
 there are some overhead (RTS/CTS, packet headers, etc.), I would think
 I should get about 1.5Mbps. So, why is the actual speed so much lower
 than that ? Is it natural ?



Did you account for re-transmission errors and the error rate in general? It
is a very common thing
the error rate factor to be somehow high in wireless networks.


  Thanks a lot for your help.


Hope that I've helped you.

-Fk

  Heo




 -




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] help on random FTP connections

2006-07-13 Thread Filippos Kolovos

As far as the random behaviour is concerned there is a quite good Random
number generator
implemented in NS, that can also generate random numbers from various
distributions.

You can check the NS-2 manual in the chapter Mathematical Support for
further information.

-Fk

On 7/13/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: sorin pasa [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Wed, 12 Jul 2006 05:51:06 -0700 (PDT)
 Subject: [ns] help on random FTP connections
 Hello ns users,

if I create 100 nodes attached to one central node , can anyone tell me
 how to create FTP connections of every node with the central one and start
 them in a random way (presuming I have to download from the central node a 5
 Mb file for every node in an interval of 5 minutes).
   I hope you can help me.Thanks,

 Sorin


 -
 Sneak preview the  all-new Yahoo.com. It's not radically different. Just
 radically better.




-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] random values??????

2006-06-05 Thread Filippos Kolovos

Yes. Check chapter 23 of the Ns-2 manual: Mathematical support
and specifically the part about Random variables.

Ns has a considerably good random number generator.

-Fk


 -- Forwarded message --
 From: [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 3 Jun 2006 13:56:38 +0200 (CEST)
 Subject: [ns] random values??
 Hi everyone!!
 I want to make a simulation with random times of appearing calls. Do
 You know how to make a random value?
 Thanx for all
 Paul


 --
 GE Money Banku proponuje szeroką ofertę kredytów hipotecznych - niskie
oprocentowanie, niskie raty, niskie opłaty i wiele innych korzyści. Teraz
kredyt hipoteczny w CHF bez opłaty za wcześniejszą spłatę!
http://www.gazeta.pl/gebank





-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] error in installing ns on linux without Xwin

2006-05-26 Thread Filippos Kolovos

Of-cource you can,

I have installed ns-2 in XP (with cygwin) and I can run it smoothly.

I also have installed both ns-2.29 and ns-2.28 in my Debian Workstation
and when I connect with ssh, (where no X servers are available), both of
them run smoothly.

No, you do not NEED an X server to run ns. However, you do need
it if you want to run NAM, xgraph, DDD and any other tool that might require
X.

For the core ns - simulator, it is not a requirement.

-Fk



On 5/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: zenith siea [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Thu, 25 May 2006 18:15:28 +0800
 Subject: [ns] error in installing ns on linux without Xwin
 i have just installed my linux os, and no Xwin server installed, no
 gnome,kde.
 but some thing go wrong when i am trying to install ns:
 ./install
 it failed, it just told me:
 ...
 ...
 {standard input}:666: Error: symbol 'dy' is already defined
 {standard input}:673: Error: symbol 'dx' is already defined
 {standard input}:724: Error: symbol 'q' is already defined
 {standard input}:734: Error: symbol 'p' is already defined
 {standard input}:741: Error: symbol 'q' is already defined
 {standard input}:748: Error: symbol 'p' is already defined
 make: *** [tk3d.o] Error 1
 tk8.3.2 make failed! Exiting ...
 For problems with Tcl/Tk see http://www.scriptics.com

 i am about to ask, can ns be installed in linux without xwindow server?
 if yes, how would i configure before install?
 many many thanks!




-Fk

-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] query:otcl command explanation?

2006-05-17 Thread Filippos Kolovos

Well, the terms that you are referring to are
standard object oriented programming terms. There are some
sites that can offer a relative introduction to what
you are asking, but in order to understand in depth
these issues, you should read a good object-oriented
programming book, or an OTcl manual in specific.

However, you can check the following link:

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

It has an introduction to OTcl, in somehow more concrete terms.

In order to give you a relatively short description of the terms that you
mention
in your question...:

self is used when we need to refer to the SAME object that is invoking the
command.
Is usually invoked from whithin a method (i.e. a procedure inside a class
definition) and it
refers (i.e. substitutes) the name of any object that will use this keyword
when it will invoke
the method that contains it.

global is used to refer to the variables that are in global scope. It is
usually invoked
from within procedures and/or class methods that want to include in their
local variable
scope some variables from the global scope (i.e. variables that are declared
outside any
procedures and methods. Variables that are declared in the main body of a
tcl script).

instproc and instvar refer to the way that we can declare new class
methods (instproc,
is derived from instance procedure), which will be used by the corresponding
objects
and instvar (instance-variable) refers to the way we declare class
attributes, or in other words, variables that will contain attributes (like
integers, strings,
arrays, other objects, etc) for every object-instance that belongs to the
same class (or any other inherited class).

However, as you can see all these are referring to standard object-oriented
programming
and if you do not have such a background I would suggest (starting from the
link above)
to read one or two short-course manuals, just to get the hang of it.

Hope that I have helped you.

Kind Regards,

-Fk

On 5/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



 -- Forwarded message --
 From: balraj karthikeyan [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Tue, 16 May 2006 12:36:21 +0930
 Subject: [ns] query:otcl command explanation?
 hi
 I am trying to understand the meaning of commands we use in otcl
 programming like;
 what is self?
 what is global?
 why we use instproc,instvar and 
 someone plz help me by giving a good link other then otcl tutorial and
 manual


 Cheers,
 Cartic






-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] help with cygwin/gcc

2006-04-19 Thread Filippos Kolovos

Yes, it is true that you may have installed it, but when you issue the
command
gcc --version then the system will report that you have the gcc version
4.0
installed. That is because in /usr/bin there is a symbolic link named gcc
that
points to the gcc-4.0 executable located in the same directory.

The thing is that you can have as many versions of gcc and g++ you want
but only one is at any time enabled, by the means of this symbolic link.
So, if you want to change the gcc and g++ version that your programs will
use
when they issue gcc, or g++ then you will have to change the symbolic link
target
in that directory to the older version of gcc that you want. Of course the
older version
must have been installed previously in your system.

I have two versions of gcc, gcc 4.0 and gcc 3.3 and I use either one of them
whenever
I want.

Hope that I have helped.

Regards,

-Fk

On 4/17/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Muhammad Usman [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sun, 16 Apr 2006 19:36:23 -0700 (PDT)
 Subject: [ns] help with cygwin/gcc
 Hi all,
   I have been trying to install the 802.11e HCCA mode implementation by
 the University of Pisa for Ns2. I tried unsuccessfully for cygwin on windows
 and the same on linux redhat 9.

   I am using gcc versions 3.3.4 on cygwin since it comes pre-installed
 with the cygwin package. Apparently theres some problem with newer versions
 of gcc.So I tried to get either:

   1. An old version of Cygwin in the hope that it would contain gcc 2.95
   2. Try to install gcc 2.95 on my own

   For the first, no working site seems to contain it and for the second, I
 have tried in vain to search for tips on installing gcc 2.95 on Cygwin.

   As a last resort, I even tried running installing it on Debian Linux.
 The problem is again of gcc version 4. So I installed version 2.95 also on
 it, but when I tried to install, the ns still uses the version 4.

   Its been quite a while and I would really appreciate if someone could:

   1. Give me a URL of some older version of Cygwin with gcc 2.95.x in it
 OR
   2. Tell me how to install gcc 2.95.x for cygwin OR
   3. How to force ns in the debian environment to use gcc 2.95 instead of
 4 (bye
   the way i have only a user account on the debian machine and am using
 ssh and theres a line of alias gcc 2.95.  ) OR
   4. If someone has successfully installed either Dr Qiang's 802.11e on
 cygwin or even linux or the HCCA patch of the Universtiy of Pisa on cygwin
 or linux then kindly mention the steps as I run into errors and can't seem
 to get an older version of gcc installed

   Regards.



 -
 New Yahoo! Messenger with Voice. Call regular phones from your PC and save
 big.







--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
Phone: +30-2310-891-826
--


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

2006-02-15 Thread Filippos Kolovos

The point here is that you want to execute your local apps *through* your
nodes,
not independently *within* the program. In general, the command to execute
an
external program through an NS-2 script is to use the exec command followed
by
the program name and any parameters that it may need.

However, your case is a bit more complicated since you would like to have
your
node to behave *through* your program (making connections, sending traffic
to other
nodes, receiving traffic from other nodes, etc). However, I think that if
you want
to customize NS, you would have to tamper with the C++ files and
re-configure, re-make
NS.

An intermediate solution would be to *exec* your programs through NS and
communicate
the (any) results through files (text or not), *or,* use C++ coding to
modify the node behaviour
through external calls to your programs (I suppose you have the source
code), *or* if your programs
were written in a C-style language, to insert them in the node
configuration - programming files.

I am afraid that (as far as I know) there is not a straightforward way to do
this kind of thing you want.

-Fk


On 2/14/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: George P Nychis [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Mon, 13 Feb 2006 19:59:40 -0500 (EST)
 Subject: Re: [ns] get NS2 to run personal/local application?
 I read Marcs tuturial now, and I still do not understand how you have a
 virtual node run a local program.  Every single time I see them running an
 NS2 simulation, it is always using some TCP or UDP setup... I have my own
 programs that will create their own sockets and generate their own
 traffic.  What I am using NS for is to simulate latency and such.


  Hi George,
 
  I recommend that you take the time to work your way through Marc's
  tutorial. I belive you will understand a lot of these subjects that you
  are asking about if you do.
 
  Henrik
 
  George P Nychis wrote:
 
  Hey guys,
 




--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Communication  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
Phone: +30-2310-891-830
--


Re: [ns] problem running examples

2006-02-05 Thread Filippos Kolovos

The problem is that even though you have Cygwin
you do not have an X environment to execute X applications as NAM.
The solution to this problem, would be to install (in addition to cygwin),
the KDE ebvironment
for Windows, that co-operates with cygwin.

In this way you will have an X desktop, which will provide
you with the appriopriate $DISPLAY variable for your X environment.

NAM is an X windows application, so it must have an X Desktop (environment)
to run.

I use KDE with cygwin in my Windows NS-2 machines successfully. You can find
it here: http://kde-cygwin.sourceforge.net/.

However, please note that you need to have Windows 2000 or XP in order to be
able
to install the KDE Desktop. After the installation of KDE you will be able
to execute
ns and run your scripts, via the KDE desktop by opening a Terminal program.
Also note
that KDE requires to already have installed cygwin, on top of which will be
installed.
Then you execute KDE to load the desktop and from there you execute a
terminal program
(through the Graphical Menus) to have access to the bash shell.


On 2/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


-- Forwarded message --
From: Hailun Tan [EMAIL PROTECTED]
To: Mohammed Abu-Khadra [EMAIL PROTECTED]
Date: Fri, 3 Feb 2006 11:00:08 +1100 (EST)
Subject: Re: [ns] problem running examples !!!

easy!!! type startxwin.bat in cygwin terminal, which will lead you to
another terminal... There you can use nam!!!
  [ns] problem running examples !!!

 Hi i have a problem in running some basic examples in ns-2 ... am
 using ns-2 (v. 2.29) on cygwin for windows !! here is the result from
 running the example:
 $ ns example1b.tcl
 [EMAIL PROTECTED] /usr/local
 $ nam: no display name and no $DISPLAY environment variable









--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications
IT Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
Phone: +30 2310 891 830,
Fax: +30 2310 857 794
--


Re: [ns] Ns2 version for Ad hoc networks

2006-02-05 Thread Filippos Kolovos

The version I could use would be NS-2.28 at the earliest.

-Fk




 -- Forwarded message --
 From: raja priya [EMAIL PROTECTED]
 To: NS ns-users@ISI.EDU
 Date: Sat, 4 Feb 2006 22:49:42 -0800 (PST)
 Subject: [ns] Ns2 version for Ad hoc networks
 Hi

 I am interested in working in Ad hoc Networks. Can you please suggest  me
 the version of Ns2 which I can use for simulating Ad hoc Networks?

 Regards
 S.Rajapriya






--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications
IT Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] Can we get rid of TCP in wireless?

2006-02-05 Thread Filippos Kolovos

I would not agree with that, since for example AODV, one of the
most common routing protocols in MANETs uses UDP
to transmit its routing packets (RREQ, RERR, etc).

However, in order to avoid TCP/UDP you would have to
tamper with the specific application that accesses these
layers in the source files.

-Fk


On 2/5/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



 -- Forwarded message --
 From: [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sat, 4 Feb 2006 22:25:52 -0500
 Subject: [ns] Can we get rid of TCP in wireless?
 Hi all,

 It seems that all the wireless network simulation examples in ns tutorials
 adopt such a format: app-TCP/UDP-routing-MAC-PHY. However, there
 is no transport protocol in real wireless implementations. Is it possible
 to get rid of TCP/UDP and connect application directly to the routing?

 Thank you in advance for your attention.









--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications
IT Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] error while running tcl file

2006-01-22 Thread Filippos Kolovos

You are not running the simulation from somewhere
where your environment variables for ns are not properly initialized
according to the NS-2. Init.tcl is one of the primary files executed during
the start of a simulation. Verify that you are executing the file from the
appropriate shell environment.

This can also happen if you are trying to run ns through ddd from KDE, but
you start ddd from KDE while you have installed ns in your home dir (in this
case the X environment does not automatically initializes your Shell
variables).

Or, finally, you might have incorrectly installed ns. Was the installation
carried out
smoothly? No errors reported? However, I suppose that you had no errors
regarding this
part, but I mention it anyway.

-Fk

On 1/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Send Ns-users mailing list submissions to
 ns-users@isi.edu

 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. kindly help me  with these simulations (Ashutosh Srivastava)
2. NS 2.29 in X86_64 (Suse 10.0) ([EMAIL PROTECTED])
3. Maintaining and Updating vector table (mahesh l)
4. qospf extention for ns-2.29 (Fatemeh Karimirad)
5. error while running tcl file (anusherin)
6. Re: how to reduce the signal range for a mobile node
   (Hajer FERJANI)



 -- Forwarded message --
 From: Ashutosh Srivastava [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Fri, 20 Jan 2006 20:40:35 + (GMT)
 Subject: [ns] kindly help me with these simulations

 dear all ,

   Please go through this scenario that I am supposed to simulate (it is an
 excerpt from a paper) . I have already underlined the part I am unable to
 have under simulate .Please go through the whole mail and kindly send in
 your inputs .I have already mailed about this topic even earlier but could
 not get through ,due to lack of any sort of input .


   
 
   The DSR implementation built in to NS-2 version 2.1b9 was used as a
 base, and some slight modifications were made to simulate the sinkhole
 attacker node. The simulation environment was composed of 20 wireless nodes,
 each with a transmission radius of 250m. At the start of each simulation,
 the nodes were given random placements in a 1000m x 1000m area, and a random
 movement pattern was generated, which the nodes adhered to, using CMU's
 setdest program, which is included with NS-2.
 The program generates node movement files using the random
   waypoint algorithm, in which nodes choose a random point
   within the area boundaries, and proceed towards it at a
   randomly chosen constant velocity. When the node arrives at its
   destination, it pauses for some interval, and then repeats the
   process. Constant bit rate traffic patterns were also generated at
   the start of each simulation, using the cbrgen.tcl program that is
   included with NS-2.
   A total of 23,710 simulations were run. Of these, 19,797 of
   them were normal, cooperative DSR networks with no sinkhole
   attacker, and 3,913 of them were with a single sinkhole attacker
   identified as node 20. In the simulation, the sinkhole attacker
   ran the same DSR code as the other nodes. However, in
   addition to the normal behavior, a new behavior was triggered
   by a timer that normally goes off every 0.03 seconds to check
   the DSR send buffer – the normal purpose of this is to flush
   packets that have been queued for asynchronous transmission.
   In the case of the attacker, this timer would cause 18 bogus
   route request messages to be sent, in rapid succession, with the purpose
 of redirecting all routes leading to a particular target node, starting with
 node 1. The target node would then be incremented. After the timer had fired
 18 times, the attacker would have made an effort to redirect all routes in
 the network to itself, and the target node would be reset to 1.

   For these
   messages, the attacker node used sequence numbers starting at ,
 incrementing the sequence number each time a message was sent.








I am supposed to simulate the Sinkhole attack (made on
 Ad-Hoc Networks) . As i am quite new to  ns-2 programming I am unable to do
 so .The main problem is that how do we create routing tables for the
 different nodes in the ad-hoc network (or Mobile Network)  and then
 how can we represent the sending of information from a compromised node that
 it has the shortest route for a number of nodes . Kindly helpme
   out as I am stuck badly here .Any sort of inputs are welcome .I am also
 

Re: [ns] Problem with installation of NS 2.28

2006-01-09 Thread Filippos Kolovos

I apologise, in my previous message I forgot to edit
the subject line.:-)



From the warning messages displayed, you have
installed ns-allinone 2.28, not ns-2.28 (the latter is when
you install it from the pieces). When you install it from the
pieces, it does not display such a warning.

The LD_LIBRARY_PATH is actually an extra
set of directories, where the run-time shared library loader
will look for any needed shared libraries when loading an executable.
You can define multiple directories as the value for that variable separated

with a colon (:)

Specifically, the value of this environment variable (i.e the list of
directories specified)
is added to the beginning of** the existing list of compiled-in loader paths
for a given executable, and any system default loader paths.

You add this environment variable in the startup file of your login shell (
i.e. .bashrc for bash
or .login for tcsh) specifying it as it is shown in the messages.
An example of a specification for the LD_LIBRARY_PATH in one of my
ns-allinone installations is shown below. I have put this variable (among
others) in the .bashrc
file in my home dir:

 export NS_HOME=/home/MIS_USER/ns-allinone-2.26

export LD_LIBRARY_PATH=$NS_HOME/tcl8.3.2/unix:$NS_HOME/tk8.3.2/unix:\
$NS_HOME/otcl-1.0a8:$NS_HOME/lib:$LD_LIBRARY_PATH


Notice that I have put the home dir of ns-allinone in another env var, which
I use
in the specification of the LD_LIBRARY_PATH var.

I Hope to have helped.

P.S.
For further information regarding this variable or its security implications
when using it,
you can check this link:
http://www.visi.com/~barr/ldpath.htmlhttp://www.visi.com/%7Ebarr/ldpath.html

Regards,

-Fk

--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--




-- Forwarded message --
 From: David Planells [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Sun, 8 Jan 2006 13:28:47 +0100
 Subject: [ns] Fwd: Problem with installation of NS 2.28
 Dear all,
 I've just installed NS 2.28 in Mandrake 10 and when I've just finished
 installing this version, this is what I've received:


 IMPORTANT NOTICES:
 (1) You MUST put /home/daplaji/Desktop/PFC/ns-allinone-2.28/otcl-1.9
 ,/home/daplaji/Desktop/PFC/ns-allinone-2.28/lib,
 into your LD_LIBRARY_PATH environment variable.

   If it complains about X libraries, add path to your X libraries into
 LD_LIBRARY_PATH.
   If you are using csh, you can set it like: setenv LD_LIBRARY_PATH
 paths
   If you are using sh, you can set it like:  export
 LD_LIBRARY_PATH=paths

 (2) You MUST put /home/daplaji/Desktop/PFC/ns-allinone-2.28
 /tcl8.4.5/library

 into your TCL_LIBRARY environmental variable. Otherwise ns/nam will
 complain during startup.

 (3) [OPTIONAL] To save disk space, you can now delete directories
 tcl8.4.5and
 tk8.4.5.
 They are now installed under /home/daplaji/Desktop/PFC/ns-
 allinone-2.28
 /{bin,include,lib}

 After these steps, you can now run the ns validation suite with cd ns-2.28
 ;
 ./validate

 For trouble shooting, please first read ns problems page
 http://www.isi.edu/nsnam/ns/ns-problems.html.
 Also search the ns mailing list archive
 for related posts.



 And as I'm a beginner with Linux and with NS2, I don't know what path is
 LD_LIBRARY_PATH environment variable.

 I don't konw where to put those files because I'm a beginner.

 Could you help me?

 Thanks in advance!!!




Re: [ns] what is problem with my tcl

2005-12-24 Thread Filippos Kolovos

You have no specific problem with your Tcl.
Since you have installed it, you only have to
provide the path to it during configure with the
following parameter:

./configure --with-tcl={your tcl8.4.5 path} --with-tcl-ver=8.4.5--with-tk={your
tk8.4.5 path} --with-tk-ver=8.4.5

What is meant with path is i.e. /usr/bin/tcl8.4.5, or whereever is your
Tcl, Tk, etc

I also attach a page that might be useful to you when you will install the
other packages
for NS-2.
Try the instructions found here:
http://nslab.ee.ntu.edu.tw/courses/ns-tutorial/labs/lab1.html

I have used this method and I installed, with user priviledges, Tcl8.4.5,
Tk8.4.5, otcl, tclcl,
ns-2.29, nam-1.11, etc in my home directory under Debian Linux 3.1 where I'm
working.
I also got the same error as you when I did not specify the path to the Tcl,
Tk, etc.

Try the page above and I think that you will have no problems

-Fk

On 12/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: Qingyu Miao [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Fri, 23 Dec 2005 16:21:50 +0800
 Subject: [ns] what is problem with my tcl
 Hi
 I am a green hand on NS. when I configure NS in my LINUX(redhat), there is
 a
 problem.
 I have installed tcl8.4.5 and tk8.4.5 in my Linux.
 Does anyone know what could be the problem and what should I do? Thanks.
 Below is the error message when configure.
 BR-Miao Qingyu

 -
 sky:/home/emiaoqy/mesh/software/ns-2.1b9a ./configure
 No .configure file found in current directory
 Continuing with default options...
 checking build system type... i686-pc-linux-gnu
 checking host system type... i686-pc-linux-gnu
 checking target system type... i686-pc-linux-gnu
 checking for gcc... gcc
 checking for C compiler default output... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for executable suffix...
 checking for object suffix... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking how to run the C preprocessor... gcc -E
 checking for ANSI C header files... yes
 checking for string.h... yes
 checking for main in -lXbsd... no
 checking for socket in -lsocket... no
 checking for gethostbyname in -lnsl... yes
 checking for dcgettext in -lintl... no
 checking for getnodebyname in -ldnet_stub... no
 checking that g++ can handle -O2... no
 checking standard STL is available... no
 checking for tcl.h... -I/usr/local/include
 checking for libtcl8.3... -L/usr/lib -ltcl
 checking for init.tcl... no
 checking for tclsh8.3.2... no
 checking for tclsh8.3... no
 checking for tclsh... /usr/bin/tclsh
 configure: error: Installation of tcl seems incomplete or can't be found
 automatically.
 Please correct the problem by telling configure where tcl is
 using the argument --with-tcl=/path/to/package
 (perhaps after installing it),
 or the package is not required, disable it with --with-tcl=no.







--
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--