LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-09-2012, 12:42 AM   #1
kuldip acharya 2012
LQ Newbie
 
Registered: Feb 2012
Location: Agartala INDIA
Posts: 5
Blog Entries: 1

Rep: Reputation: Disabled
Post NS2


How to Implement OLSR ETX metric in ns2.34 ?
Thanks, Kuldip
 
Old 02-09-2012, 02:11 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.


http://www.inf.ufrgs.br/~wlccordeiro...sr/README.html

> http://masimum.inf.um.es/fjrm/ > http://masimum.inf.um.es/fjrm/?page_id=42

>> http://masimum.inf.um.es/fjrm/?page_id=116 >
>>> um-olsr-2.34_v0.8.8.patch >
http://masimum.inf.um.es/fjrm/wp-upl...4_v0.8.8.patch

.
 
Old 02-12-2012, 09:53 AM   #3
kuldip acharya 2012
LQ Newbie
 
Registered: Feb 2012
Location: Agartala INDIA
Posts: 5

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Dear knudfl,
I already tried it earlier ... OLSR working but ETX is not calculating....! I applied these in my tcl script...but ETX is not showing...!

Simulation of OLSR-ETX:

Agent/OLSR set mpr_algorithm_ 2
Agent/OLSR set routing_algorithm_ 2
Agent/OLSR set link_quality_ 2
Agent/OLSR set link_delay_ false


Bye
Kuldip
 
Old 02-13-2012, 08:47 AM   #4
kuldip acharya 2012
LQ Newbie
 
Registered: Feb 2012
Location: Agartala INDIA
Posts: 5

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
To install ns2.34 in ubuntu11.04
This method , pls, read carefully...!

Step 1 : Download the ns-allinone-2.34 from this site:
http://bit.ly/downloadns

Step 2 : Place the ns-allinone-2.34.tar.gz package in your home folder(/home/micman in my case). Right click the package and extract the contents in the same folder.

Step 3: Next, open the Terminal (Applications --> Accessories --> Terminal) or [ctrl+ alt + t]

Step 4: Change to ns-allinone2.34 directory
$ cd /home/kuldip/ns-allinone-2.34

Step 5: First install all the dependencies

$ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.4 g++-4.4

$ sudo apt-get install xorg-dev xgraph

Edit Makefile.in found at this location ns-allinone-2.34/otcl-1.13/Makefile.in as follows:

Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.4



Fix the error in the linking of otcl by editing line 6304 of otcl-1.13/configure so that it reads
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"

Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it appends the version parameter for version 4.4:
CC = @CC@ -V 4.4
Make sure it is a capital V.

$ sudo gedit ns-2.34/tools/ranvar.cc

change the line 219 from
return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
to
return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

$ sudo gedit ns-2.34/mobile/nakagami.cc

change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc to read
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();

Now the code will compile if you run ./install.


Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it appends the version parameter for version 4.4:
CC = @CC@ -V 4.4
Make sure it is a capital V.

Finally, run ./install from the ns-allinone-2.34 top folder again.

Step 6 : Begin ns2.34 installation
$ sudo su
# ./install

step7: Once the installation is successful i.e without any errors, we need to add the path information to the file /home/micman/.bashrc


$ sudo gedit /home/kuldip/.bashrc
Append the following lines to the file /home/kuldip/.bashrc (after replacing the instances where you find kuldip with your username)

# LD_LIBRARY_PATH
OTCL_LIB=/home/kuldip/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/kuldip/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/kuldip/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/kuldip/ns-allinone-2.34/bin:/home/kuldip/ns-allinone-2.34/tcl8.4.18/unix:/home/kuldip/ns-allinone-2.34/tk8.4.18/unix

#the above two lines beginning from xgraph and ending with unix should come on the same line

NS=/home/kuldip/ns-allinone-2.34/ns-2.34/
NAM=/home/kuldip/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

For the changes to take effect immediately, do the following:

$ sudo su
# source /home/kuldip/.bashrc

$ ns
$ %
means mission complete
for tcl file testing
$ ns example.tcl
$ nam



IF Network Animator is not opening, then
$ sudo apt-get install nam
 
Old 02-13-2012, 12:26 PM   #5
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
Post # 4 looks like a copy of Erlend's method ?
http://erl1.wordpress.com/2011/05/12...-ubuntu-11-04/

I still prefer to use one of the Ubuntu 11.04 compat compilers for ns2:
gcc34-compat-3.4.6_i386.deb g++34-compat-3.4.6_i386.deb
gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb
gcc42-compat-4.2.4_i386.deb g++42-compat-4.2.4_i386.deb*
( Then no edits are required.)

I.e. the fixes are for ns-allinone-2.34 only ?
And we have 7 "most used versions" of ns-allinone-2.xx.


About the *PATH settings : Not required on Linux.
( May be Cygwin ? )
And impossible to do, if you have more than one version of
ns-allinone-2.xx.

The binary 'ns' is hard coded to know where its libraries are located.
And one "ns" can be installed to a system PATH : /usr/local/bin/.
.

Last edited by knudfl; 02-13-2012 at 12:35 PM.
 
Old 02-15-2012, 11:11 AM   #6
kuldip acharya 2012
LQ Newbie
 
Registered: Feb 2012
Location: Agartala INDIA
Posts: 5

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
post #4
ns2 is installed successfully by the method I described.... any one can try it..!
it works fine ....in ubuntu 11.04....!
If u face any problem during ns2 installation u can write me....!
Regarding copy.... there are lots of web links...!

Good Night,
Everybody
 
Old 02-15-2012, 11:15 AM   #7
kuldip acharya 2012
LQ Newbie
 
Registered: Feb 2012
Location: Agartala INDIA
Posts: 5

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
dear all,
if u have implement ETT/ETX/MIC routing metric in AODV/OLSR then kindly post the codes....!
please write complete steps with attachment files....!
I installed OLSR ETX and run it successfully, but I could not see any ETX calculation in trace file or any where.

Thanks
 
  


Reply



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
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM
ns2 help uday_ist Linux - Newbie 1 06-20-2011 09:49 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM
Ns2.32 rafik123 Linux - Newbie 1 01-22-2010 01:26 AM

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

All times are GMT -5. The time now is 01:47 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