[ns] puzzles on Agent and Router

2008-12-19 Thread Phenix

Hi guys,

Recently I'm rather puzzled about Agent and Router in NS-2.
Take AODV for example, it is a kind of route protocol, meanwhile it's 
a kind of agent. Are agent and router equivalent?

And also, both agent and router have respective trace switch, 
-agentTrace and -routerTrace. Which one should I use when evaluating
my algorithm ?

Wish someone can give me some explains. Thanks in advance.

Regards,
Phenix 



Re: [ns] NS manual to wiki

2008-12-19 Thread Mustafa Kamal

Dear All,

I think the below link is a very good starting point for ns2 users. Although it 
is for ns-2.29, it can serve good for those who wish to make changes inside C++ 
codes.

http://www.auto-nomos.de/ns2doku/

Is it possible to create documentation like above for ns-2.33/2.34 as well as 
for ns-3?

Thanks,

Joarder Mohammad Mustafa Kamal



--- On Sat, 12/20/08, Tom Henderson  wrote:
From: Tom Henderson 
Subject: Re: [ns] NS manual to wiki
To: "Lachlan Andrew" 
Cc: ns-users@ISI.EDU
Date: Saturday, December 20, 2008, 2:52 AM

Lachlan Andrew wrote:
> Greetings all,
> 
> The NS manual seems rather out of date.  (There are comments from 2001
> about "changes in the near future", and snippets of code that
have
> changed radically, and references to files that no longer exist.)
> 
> I have started copying the contents from the PDF to the wiki, at
> , with the hope that
> the community can keep it more up-to-date.
> 
> Does this seem useful, or is the "manual" seen as no longer
important?
> If it is useful, would anyone like to volunteer to help?  :)

Lachlan,

Thanks for taking the initiative to do that.  But I'd like to ask 
whether the real issue is the markup (tex vs wiki) or the accessibility 
to make changes, or whether the issue is that no one wants to update the 
documentation.  Because it would be a shame for you or anyone to invest 
a lot of resources in a migration if the result would be the same.

Personally, I have been updating manual chapters as new things were 
checked in (see the wifi updates in section 16.3) and asking new 
contributors to write manual chapters (see section 43 for Tmix).  But, I 
realize there are large portions of the manual written over 8 years ago 
that have not been maintained.

Are there people in the community who would be more inclined to update 
documentation if the contents were on the wiki (please speak up)?  Or is 
that not the real issue?

- Tom




  


[ns] getting out of range error.

2008-12-19 Thread Nital


hi all,
i had one problem. i am trying to crate 10 nodes. in my tcl script
declaration nn is set to 10

then i created nodes like this.
for { set i 0} { $i < $val(nn)} { incr i } {
  //here i created the nodes n_($i)
}
but when i run the script i got this error:

MAC_802_11: accessing MAC cache_ array out of range (src 14, dst 19, size
10)!
more 9 lines.
i don't know why my nodes are getting this index value i.e. 11 to 19
they should get it from 0 to 9

if someone  can help me please.
Nital
-- 
View this message in context: 
http://www.nabble.com/getting-out-of-range-error.-tp21102108p21102108.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Strange problem in ns2

2008-12-19 Thread Shimmey


I want to simulate a two rows of 14 nodes in a wireless environment.
The topology is:

(0)-(1)-(2)-(3)-(4)-(5)-(6)
(7)-(8)-(9)-(10)-(11)-(12)-(13)

And I set the nodes by:
set $val(nn) 14
set half_nn [expr $val(nn)/2]
for {set i 0} {$i<$val(nn)} {incr i} {
if {$i<$half_nn} {
set node_($i) [$ns node]
$node_($i) set X_ [expr $i*250][1]
$node_($i) set Y_ 200.0
$node_($i) set Z_ 0.0
} else {
set node_($i) [$ns node]
$node_($i) set X_ [expr ($i-7)*250]
$node_($i) set Y_ 100.0
$node_($i) set Z_ 0.0
}
}
I've used these codes for only one line last time, it worked very well.

But for the above codes, the data never be sent out except I modified the
distance of [1] to 100.
The trace file is empty...

In the nam, I could see nothing. It said: node 0 did not defined...
Is there anyone has idea about it?
-- 
View this message in context: 
http://www.nabble.com/Strange-problem-in-ns2-tp21010233p21010233.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] NS manual to wiki

2008-12-19 Thread Tom Henderson

Lachlan Andrew wrote:
> Greetings all,
> 
> The NS manual seems rather out of date.  (There are comments from 2001
> about "changes in the near future", and snippets of code that have
> changed radically, and references to files that no longer exist.)
> 
> I have started copying the contents from the PDF to the wiki, at
> , with the hope that
> the community can keep it more up-to-date.
> 
> Does this seem useful, or is the "manual" seen as no longer important?
> If it is useful, would anyone like to volunteer to help?  :)

Lachlan,

Thanks for taking the initiative to do that.  But I'd like to ask 
whether the real issue is the markup (tex vs wiki) or the accessibility 
to make changes, or whether the issue is that no one wants to update the 
documentation.  Because it would be a shame for you or anyone to invest 
a lot of resources in a migration if the result would be the same.

Personally, I have been updating manual chapters as new things were 
checked in (see the wifi updates in section 16.3) and asking new 
contributors to write manual chapters (see section 43 for Tmix).  But, I 
realize there are large portions of the manual written over 8 years ago 
that have not been maintained.

Are there people in the community who would be more inclined to update 
documentation if the contents were on the wiki (please speak up)?  Or is 
that not the real issue?

- Tom



Re: [ns] NAM Error problem when executing NS2 in FDC10

2008-12-19 Thread Tom Henderson

Lipur Sugiyanta wrote:
> Dear All milist-ers,
> 
> Thanks for your attention with my problem.
> 
> I try to install NS2 release 2.33 with Fedora Core 10 platform. ...

> I have problem with NAM. Here is the error message.

I've added this to the tracker and to the list of things to fix before 
ns-2.34 release.

- Tom



[ns] NS Installation Problem

2008-12-19 Thread Bello Lawal

Hello,



This is the error i got during NS installation '' make:*** [regcomp.o] Error 1

tcl8.4.11 make failed! Exiting .''



Pls. can some one help me



Thanks alot




  


Re: [ns] NS-2.33-allinone build problem on Linux version 2.6.9-78.ELsmp

2008-12-19 Thread Nick

I found that this same problem happened for ns-2.29.2 as follows:


[edit
]
Installation of ns-2.29.2 fails on x86_64 platform

   - Description: otcl-1.11 compilation fails in the following way:

> /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXext.so when
> searching for -lXext
> /usr/bin/ld: cannot find -lXext
> collect2: ld returned 1 exit status
> make: *** [otclsh] Error 1
> otcl-1.11 make failed! Exiting ...


   - Previous solution: Find the path to the 64-bit libraries and modify the
   makefile (e.g., /usr/X11R6/lib64)
   - New solution: Use the ns-allinone-2.29.3.tar.gz package.

--

So I tried to modify the makefile( ~/ns-allinone-2.33/ns-2.33/Makefile). I
changed /usr/X11R6/lib to /usr/X11R6/lib64. I saved it, and then run the
install. Same error happens. And I check the Makefile again, I found that
the ``/usr/X11R6/lib" is still there. The modification I did is gone.
Anybody can help? I'll appreciate it very much.

-Nick

On Thu, Dec 18, 2008 at 9:08 AM, Nick  wrote:

> By the way, I also tried the ns-2.30 version and succeeded. Any idea?
> Thanks.
>
>
> On Wed, Dec 17, 2008 at 6:20 PM, Nick  wrote:
>
>> Hi all,
>>
>> I tried to build ns 2.33 allinone on my linux machine with CentOS but I
>> have some problems. It says:
>>
>> /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXext.so when
>> searching for -lXext
>> /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXext.a when searching
>> for -lXext
>> /usr/bin/ld: cannot find -lXext
>> collect2: ld returned 1 exit status
>> make: *** [ns] Error 1
>>
>> I would appreciate your help. Thanks.
>>
>> -Nick
>>
>
>


[ns] On-the-fly changes in route table make node stop/crash

2008-12-19 Thread Giovane

Dear all,

I would appreciate if somebody could help me with this issue. I figured out
how to employ manual routing in ns2.
However I noticed if I change/add route manually during the simulation to a
specific node it makes its node to stop forwarding packets.

In simple words: it seems that ns2 does not accept on-the-fly changes on the
routing table when manually inserted. Is this true?

For example, in my simulation I start a FTP transfer that should end at
10s.  However, at 5s I add a new route to a node, and then it simply
"crashes" this node -- and the simulation stops at 4.99904 instead of 10s.

For simplicity, I will put here part of the code that  I'm having problem
(and in the end of the message the full code) -- it may be useful for those
who also need to do manual routing.

#...continuation of script

#procedure invoked to add a new route -- that is, extra routes
proc addroute {} {
global ns n4 n5 n3 n2 n1 n0
#syntax:
# origin node -- add-route -- dst node -- head of the link to be used
[$n1 get-module "Manual"] add-route [$n3 set address_] [[$ns link $n1
$n4] head]
[$n1 get-module "Manual"] add-route [$n5 set address_] [[$ns link $n1
$n4] head]
exit 0
}

#data starts - assume that there is a ftp transfer
$ns at 0.5 "$ftp start"

#addroute invoked -- the simulation than stops at 4.99904 instead of going
until 10s.
$ns at 5.0 "addroute"

#simmulation should stop at 10s.
$ns at 10 "$ftp stop"
$ns at 10.0 "finish"

$ns run
#end of script

Does anybody knows why it crashes? or how can I make a on-the-fly change on
the routing table? Is there any workaround to allows to add new routes on
the fly on ns2?

Thank you so much,

Giovane

ps: full script goes below

#beginning of the full script
#Create a simulator object
set ns [new Simulator]

# enable manual routing
$ns rtproto Manual

#Open the nam trace file
set nf [open clean.tr w]
$ns trace-all $nf
set f [open clean.nam w]
$ns namtrace-all $f

proc finish {} {
global ns nf  f
$ns flush-trace
close $nf
#close trace file
close $f
exit 0
}

#Create nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]

# Topology:
#
#
#/--N2---\
# N0---N1N3---N5
#\-N4---/
#
# where N0 is the source of ftp data, N5 should receive
# In the first moment, the upper path(N0-N1-N2-N3-N5) will be choosen (that
is, added to the route table of nodes)
# After, I will change N1 table to reach N3 and N5 via N4, ignoring N2, then
using the lower path.

#Create links between the nodes
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
$ns duplex-link $n1 $n2 1Mb 10ms DropTail
$ns duplex-link $n2 $n3 1Mb 10ms DropTail
$ns duplex-link $n3 $n5 1Mb 10ms DropTail
$ns duplex-link $n1 $n4 1Mb 10ms DropTail
$ns duplex-link $n4 $n3 1Mb 10ms DropTail

#tcp agent linux -- supports only ns2.33
#n0 - source
#n5 - sink
set tcp [new Agent/TCP/Linux]
$tcp set class_ 2
$ns attach-agent $n0 $tcp
set sink [new Agent/TCPSink]
$ns attach-agent $n5 $sink
$ns connect $tcp $sink
$tcp set fid_ 1

#Setup a FTP over TCP connection
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ftp set type_ FTP

#routes setup

#node 0 route table
[$n0 get-module "Manual"] add-route-to-adj-node -default $n1

#node 1 route table
#syntax:
#origin node -- add-route -- dst node -- head of the link to be used
[$n1 get-module "Manual"] add-route [$n2 set address_] [[$ns link $n1 $n2]
head]
[$n1 get-module "Manual"] add-route [$n0 set address_] [[$ns link $n1 $n0]
head]
[$n1 get-module "Manual"] add-route [$n4 set address_] [[$ns link $n1 $n4]
head]
[$n1 get-module "Manual"] add-route [$n3 set address_] [[$ns link $n1 $n2]
head]
[$n1 get-module "Manual"] add-route [$n5 set address_] [[$ns link $n1 $n2]
head]

#node 2 route table
[$n2 get-module "Manual"] add-route [$n1 set address_] [[$ns link $n2 $n1]
head]
[$n2 get-module "Manual"] add-route [$n3 set address_] [[$ns link $n2 $n3]
head]
[$n2 get-module "Manual"] add-route [$n5 set address_] [[$ns link $n2 $n3]
head]
[$n2 get-module "Manual"] add-route [$n0 set address_] [[$ns link $n2 $n1]
head]

#node 3 route table
[$n3 get-module "Manual"] add-route [$n2 set address_] [[$ns link $n3 $n2]
head]
[$n3 get-module "Manual"] add-route [$n5 set address_] [[$ns link $n3 $n5]
head]
[$n3 get-module "Manual"] add-route [$n1 set address_] [[$ns link $n3 $n2]
head]
[$n3 get-module "Manual"] add-route [$n4 set address_] [[$ns link $n3 $n4]
head]
[$n3 get-module "Manual"] add-route [$n0 set address_] [[$ns link $n3 $n2]
head]

#node 4 route table
[$n4 get-module "Manual"] add-route [$n3 set address_] [[$ns link $n4 $n3]
head]
[$n4 get-module "Manual"] add-route [$n5 set address_] [[$ns link $n4 $n3]
head]
[$n4 get-module "Manual"] add-route [$n1 set address_] [[$ns link $n4 $n1]
head]
[$n4 get-module "Manual"] add-route [$n1 set address_] [[$ns link $n4 $n1]
head]

#node 5 route table
[$n5 get-module "Manual"] add-route-

[ns] Routing Protocols for Infrastructure mode

2008-12-19 Thread Syed Faraz Hasan

Hi everyone,

I am interested in implementing infrastructure mode on a wireless network. I am 
using http://www.isi.edu/nsnam/ns/doc/node173.html tutorial. It talks only 
about the adhoc protocols, can't I configure a mobile node with infrastructure 
routing protocols. I am not clear about the different between the protocols 
implemented in these two modes.
Also, can some one guide me to a basic mobile program. I am a beginner at ns-2 
and am loooking for a simple example to begin with mobility in ns2 simulations.

Thanks,
Faraz