Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am new to linux environemnt and learning ns2 for my thesis.
So far I have installed ns-2.34 on fedora17 and patched olsr. This forum helped me a lot while installing as I had stumbled at many steps.
Now I could simulate AODV and DSR properly however if I just change AODV to OLSR in the tcl file, it is resulting in following error.
Please help, I'm not getting where to look for the error.
Looking forward for your help.
Code:
num_nodes is set 10
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
(_o14 cmd line 1)
invoked from within
"_o14 cmd addr"
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 "_o14" line 2)
(SplitObject unknown line 2)
invoked from within
"_o14 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
}"
(file "olsr_test.tcl" line 118)
And olsr_test.tcl is the wireless1.tcl file which I have updated for olsr.
I have used the same tcl file to simulate AODV and DSR which did run correctly but giving error for OLSR.
The tcl file, mobility file (mob_10) and traffic file(traffic_10) are attached. Mobility file and traffic were generated by me using setdest and cbegen.tcl which were inbuilt in NS2.34
Please also let me know if we get OLSR inbuilt in any NS2 version ?
set val(cp) "./traffic_10" ;#<-- traffic file
set val(sc) "./mob_10" ;#<-- mobility file
I.e. all three files {olsr_test2.tcl traffic_10 mob_10} are in the same directory.
Code:
$ ns-umolsr olsr_test2.tcl
num_nodes is set 10
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
File output result : olsr_out.nam, olsr_out.tr .
$ nam olsr_out.nam : OK.
.. And "olsr_test2.tcl" still says OLSR in line 49, so I don't know why you fail.
('ns-umolsr' : I have 30 executable ns-*** so they must all have different names.)
#4
I did the changes on line 52 and 53 as you suggested but it shows same error
I see in the code which you posted, you have used "ns-umolsr" to run the tcl file.
I didn't get you. I use "ns" command from "ns-2.34" folder. Does that mean I have not patched OLSR correctly? or is there other version/distro of ns2 having capability to run olsr ?
Also, I didn't get the last line of you reply.
i.e "('ns-umolsr' : I have 30 executable ns-*** so they must all have different names.)"
Please explain. Everything seems right in the tcl file as you said but still it is not running.
Thanks.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 5
Quote:
Does that mean I have not patched OLSR correctly ?
Probably.
Quote:
I use "ns" command from "ns-2.34"
.
Also, I didn't get the last line of you reply.
Well, I am also using an 'ns' created on ns-2.34 .
But with 30 times 'ns' in /usr/local/bin/ :
Only one can be named ns, so all my ns are renamed to ns-<name>.
The executable "ns-umolsr" works OK on Fedora 17 - 32bits (i686).
(Could be made into an fc17 package, like "um-olsr-ns-2.34-1.fc17.i686.rpm" ~4.6 MB.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.