LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-13-2013, 05:30 AM   #1
linuxuday
Member
 
Registered: Mar 2013
Posts: 31

Rep: Reputation: Disabled
Error in simulating OLSR on ns-2.34


Hi all,

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)
 
Old 03-13-2013, 06:26 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Which patch did you use ? The full file name, please.

And what is "olsr_test.tcl" ? ( You can attach the file as olsr_test.tcl.txt ).


-
 
Old 03-13-2013, 09:24 AM   #3
linuxuday
Member
 
Registered: Mar 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hi,
Thanks for your time..

Name of the patch is, "um-olsr-2.34_v0.8.8.patch"

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 ?

Looking forward for your suggestion.

Thanks.
Attached Files
File Type: txt olsr_test.tcl.txt (4.9 KB, 75 views)
File Type: txt mob_10.txt (22.2 KB, 51 views)
File Type: txt traffic_10.txt (3.1 KB, 50 views)
 
Old 03-13-2013, 10:04 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 3 : olsr_test2.tcl (Your edited olsr_test.tcl), lines 52, 53 :
Code:
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.)

-
 
Old 03-13-2013, 10:45 AM   #5
linuxuday
Member
 
Registered: Mar 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
#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.
 
Old 03-13-2013, 11:01 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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.)

-

Last edited by knudfl; 03-15-2013 at 02:11 PM.
 
Old 03-13-2013, 11:42 AM   #7
linuxuday
Member
 
Registered: Mar 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
I'm running Fedora17 64bit.
I'm not sure this package "um-olsr-ns-2.34-1.fc17.i686.rpm" would work on Fedora17 64 bit.
I will try this anyway.

Please provide link for 64 bit version um-olsr-ns-2.34 rpm if thats is available.

Thanks..

Last edited by linuxuday; 03-13-2013 at 12:14 PM. Reason: I might have misunderstood the previous reply..
 
Old 03-13-2013, 01:17 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
OK, easy to build on the 64bits Fedora 17 :
cd ns-allinone-2.34/ && export CC=gcc34 CXX=g++34 && ./install

$ cd umolsr-ex/ ; $ ns-umolsr olsr_test2.tcl : OK.

Package um-olsr-ns-2.34-1.fc17.x86_64.rpm
https://docs.google.com/file/d/0B7S2...it?usp=sharing

cd Downloads/ ; # yum install um-olsr-ns-2.34-1.fc17.x86_64.rpm


-

Last edited by knudfl; 03-13-2013 at 01:19 PM.
 
Old 03-14-2013, 04:35 AM   #9
linuxuday
Member
 
Registered: Mar 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hello 'knudfl',

Thanks for all the information. Really appreciate it.

I removed NS-2.34, did a clean install and used this patch "um-olsr_ns-2.34_v1.0.patch".
And it is working perfectly.
 
1 members found this post helpful.
  


Reply

Tags
ns2, olsr, um-olsr



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OLSR patch sukrutha Linux - Newbie 24 05-03-2016 05:51 AM
ns2 installation on ubuntu with olsr patch giving following error bhushan0710 Linux - Newbie 8 01-21-2013 04:09 AM
error running tcl file simulating mpolsr assassin91 Linux - Newbie 1 04-18-2012 09:35 AM
OLSR patch sukrutha Linux - Newbie 2 08-21-2011 07:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration