add library FSR in NS2

196 views
Skip to first unread message

Bagos Wahyu Suprayogi

unread,
Apr 12, 2018, 11:46:48 PM4/12/18
to Network Simulator 2 (NS2)

I added the fsr library to ns2 but why the error is like this

does anyone know the cause?
how to fix it?


knudfl

unread,
Apr 13, 2018, 5:52:16 AM4/13/18
to Network Simulator 2 (NS2)
....   Images with text will not be read. I guess you know how to copy-paste a text.
! Looks like your simulation command is missing :   No command, no file name.tcl !

Howto FSR + ns-2.35 :    This is the basics →
tar xvf ns-allinone-2.35_gcc5.tar.gz   // 2014 - 2017 update.
https
://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < FSR_ns235.patch
https
://drive.google.com/file/d/0B7S255p3kFXNWE5fOFByZERRS3M/view?usp=sharing
./install
cd ns
-2.35/
cp ns ns235
-fsr
sudo cp ns235
-fsr /usr/local/bin/

--------- Simulation ---------------
ns235-fsr fsr-zigbee.tcl
Etc. etc from the examples, FSR-examples-11.17.tar.gz 
https://drive.google.com/file/d/0B7S255p3kFXNYWlic3RYaHhBQmc/view?usp=sharing

... It all depends which OS you are using.
The FSR code is rather old. Compiles with g++5 mostly.
The fsr code in ns-2.35/tools/ compiles with an older g++ :
Ubuntu example : g++-4.6 if Ubuntu 12.04.  g++34 if later versions.
See  11/5/17  https://groups.google.com/forum/?fromgroups#!searchin/ns-users/fsr%7Csort:date/ns-users/cbcjsP55-qs/696OPFGVBQAJ



Bagos Wahyu Suprayogi

unread,
Apr 14, 2018, 6:35:42 AM4/14/18
to Network Simulator 2 (NS2)

I've done the tutorial step by step, but when I run the example program that is in the folder fsr-examples-11.17 error display appears as in the image ..

how to fix it sir?

knudfl

unread,
Apr 14, 2018, 1:58:09 PM4/14/18
to Network Simulator 2 (NS2)
Seems your build failed.
How to get a text file: $ ns235-fsr 30manet-fsr.tcl > TextFile.txt
Or use redirect: $ ns235-fsr 30manet-fsr.tcl 2>&1 | tee file.txt
! Do not attach images with text !    Use a text file !

64bits compiler .... for Ubuntu :
compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb ( Ubuntu 12* ... 17* - 64 )
https://drive.google.com/file/d/0B7S255p3kFXNRTkzQnRSNXZ6UVU/view?usp=sharing
compat-gcc-34-c++_3.4.6-20_amd64.deb ( All 64bit Ubuntu versions )
https://drive.google.com/file/d/0B7S255p3kFXNV3J3bnVoWGNWdG8/view?usp=sharing

Download, and install :
cd Downloads/
sudo gdebi compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb
sudo gdebi compat
-gcc-34-c++_3.4.6-20_amd64.deb

Build  ns-2.35 + FSR
tar xvf ns-allinone-2.35_gcc5.tar.gz
cd ns
-allinone-2.35/
patch
-p0 < FSR_ns235.patch
./install            
                       
// Stops with a tools/* error.
cd ns
-2.35/
                       
//  Edit Makefile, line 37 to: CPP = g++34
make
       
// 'make' stops with a linker error.
       
// Edit Makefile:37 to:  CPP = g++
make
cd ns
-2.35
cp ns ns235
-FSR
sudo cp ns235
-FSR /usr/local/bin/

Note : If Ubuntu 17**, the build command is :
export CC=gcc-5 CXX=g++-5 && ./install    // ( sudo apt install g++-5 )
... and then later g++34


knudfl

unread,
Apr 14, 2018, 2:17:39 PM4/14/18
to Network Simulator 2 (NS2)
You can also install the binary package "fsr-ns_235-ubuntu12_i386.deb"
Provides   /usr/local/bin/ns-FSR-32
Link https://drive.google.com/file/d/0B7S255p3kFXNZWNQSmVGdHgtemc/view?usp=sharing

Download, and install :
cd Downloads/
sudo gdebi fsr
-ns_235-ubuntu12_i386.deb
           
// some 32bits dependencies will be installed too.

Simulation :    $ ns-FSR-32 30manet-fsr.tcl

-

Bagos Wahyu Suprayogi

unread,
Apr 15, 2018, 10:02:37 PM4/15/18
to Network Simulator 2 (NS2)
when I run the command ./install still an error occurs when I have done it in accordance with the command you provide

make : g++: command not found
make: *** [tcl2c++] error 127
tclcl-1.20 make failed! Exiting
Message has been deleted

Bagos Wahyu Suprayogi

unread,
Apr 16, 2018, 2:42:34 AM4/16/18
to Network Simulator 2 (NS2)
I have installed gcc 3.4 and g ++ 3.4 but after I check it with gcc -v command. why my gcc version 4.8.4?

I am using ubuntu 14.04


Pada Minggu, 15 April 2018 01.17.39 UTC+7, knudfl menulis:

knudfl

unread,
Apr 16, 2018, 5:56:55 AM4/16/18
to Network Simulator 2 (NS2)
»» make : g++: command not found «« :  Install g++

»»I have installed gcc 3.4 and g ++ 3.4 but after I check it with gcc -v command. why my gcc version 4.8.4? «« :
$ g++ -v          // Better be 4.8.4 ... I.e. the default gcc / g++ is version 4.8.4 !
$ g
++34 -v    // Is 3.4.6 : I.e. you are supposed to have at least two g++ versions installed.
                I.e. i.e. you can have as many gcc versions as you want, installed at the same time.
* A full collection for 14.04 is :  g++-4.4,  g++-4.6,  g++-4.7,  g++,  g++34, g++48,  where g++48 is https://drive.google.com/file/d/0B7S255p3kFXNeWI3N1E2MXdrVm8/view?usp=sharing



Bagos Wahyu Suprayogi

unread,
Apr 17, 2018, 2:07:41 AM4/17/18
to Network Simulator 2 (NS2)
It's work. Thank you very much sir for your instruction

Bagos Wahyu Suprayogi

unread,
Apr 17, 2018, 3:28:38 AM4/17/18
to Network Simulator 2 (NS2)
do you have an example of nakagami implementation on ns2, sir?

knudfl

unread,
Apr 17, 2018, 5:05:25 AM4/17/18
to Network Simulator 2 (NS2)
»» example of nakagami «« : Default in ns2 since ns-2.33 .
The ns-2.33 simulation example is  ``tcl/ex/802.11/unicast_validation.tcl´´

Simulation examples with Propagation/Nakagami :
OLSR, GPSR-hls, and 802.11p examples : See attachments.
All ex https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing

18. Radio Propagation Models https://www.isi.edu/nsnam/ns/doc/node216.html
wiki, Radio Propagation Model https://en.wikipedia.org/wiki/Radio_propagation_model
ex_nakagami.txt
ns235_nakagami.txt
ns233_nakagami.txt

Bagos Wahyu Suprayogi

unread,
Apr 18, 2018, 12:22:48 AM4/18/18
to Network Simulator 2 (NS2)
i will compare aomdv performance with FSR, if i will run aomdv.tcl also use ns-FSR-32 command?

knudfl

unread,
Apr 18, 2018, 9:44:24 AM4/18/18
to Network Simulator 2 (NS2)
The executable 'ns-FSR-32' can also run AOMDV examples →
https://drive.google.com/file/d/13krRs4z-lKDczK-LmTjXz1JUPJXjlDt1/view?usp=sharing

There no conflicts. And no FSR settings / ``node-config -adhocRouting FSR´´ in aomdv examples.
 
So running a default aomdv example with ``$ ns-FSR-32´´ will use AOMDV only.
'ns-FSR-32' also has all the default protocols included. (AODV DSDV DSR DSDV etc.)
Only the protocol / protocols set in
node-config will be used.

Two examples with "multi node-config" are attached.
scen010
cbr-10-1-10-20
test-suite-diffusion3.tcl
A_10nodes_1.tcl

Bagos Wahyu Suprayogi

unread,
Apr 20, 2018, 3:10:47 AM4/20/18
to Network Simulator 2 (NS2)
I am still confused how to add randomwaypoint in aomdv, do you have tutorials and examples?

knudfl

unread,
Apr 20, 2018, 6:36:54 AM4/20/18
to Network Simulator 2 (NS2)
@Bagos Wahyu Suprayogi.

The RandomWaypoint Model : movement files can be created with 'bonnmotion'
http://sys.cs.uos.de/bonnmotion/

Just use an AOMDV file which can run with a movement file.
I edited eshete-aomdv2.tcl → RWP-eshete-aomdv2.tcl to use an RWP example file, RWP_10.
... Files are attached.
n-RWP_example.txt
bonnmotion-MODELS.txt
random-waypoint.movements.txt
RWP_10
RWP-eshete-aomdv2.tcl
RWP_example.txt

Bagos Wahyu Suprayogi

unread,
Apr 21, 2018, 4:30:45 AM4/21/18
to Network Simulator 2 (NS2)
There are 2 files that make me confused that is RWP_10 with random-waypoint.movements.txt, in file RWP_10 mention that in a certain time node will go to coordinate point x, y and z while in file random-waypoint.movements.txt parameter of node movement used are time, x coordinates, y coordinates, standard deviation of x and standard deviation x ..

What is the difference between the two files?
and are you the standard or standard rule in the determination of x and y coordinates? or the x and y coordinates are only determined randomly?

I apologize in advance if I ask a lot, because I do not understand and want to understand more about random waypoint

knudfl

unread,
Apr 21, 2018, 6:43:52 AM4/21/18
to Network Simulator 2 (NS2)
The "RWPxx" examples (all edited from RWP_example.txt)
... are different from the bonnmotion file ``random-waypoint.movements.txt´´.

``RWP_example.txt´´ is a random example / suggestion : For you to decide if it's usable.

More info  https://www.google.com/webhp?hl=all&gws_rd=ssl#hl=en&q=ns2+random+waypoint+mobility+model

Bagos Wahyu Suprayogi

unread,
Apr 24, 2018, 10:48:29 AM4/24/18
to Network Simulator 2 (NS2)

I want to know the performance of AOMDV protocol in handling link down case, how to make scenario some dead node at certain time?

I use the wireless network on the Manet

Bagos Wahyu Suprayogi

unread,
Apr 25, 2018, 12:31:51 AM4/25/18
to Network Simulator 2 (NS2)
Do you have a sample awk file to calculate the time it takes to find new paths if there is a down link?
Reply all
Reply to author
Forward
0 new messages