LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How can I add olsr protocol to ns2 ? please help me (https://www.linuxquestions.org/questions/linux-networking-3/how-can-i-add-olsr-protocol-to-ns2-please-help-me-4175713741/)

shiyar 06-22-2022 03:15 PM

How can I add olsr protocol to ns2 ? please help me
 
can anyone help me to install olsr protocol step by step in ns2.35 please?

knudfl 06-23-2022 02:34 AM

Examples
1. Complete run time ns-2.35 with OLSR (Installed size ~17MB) ....

um-olsr-ns-2.35-ubuntu12_amd64.deb : Provides /usr/local/bin/ns-umolsr
https://drive.google.com/file/d/0B7S...pD2bceZ3kOrLdg

olsr+zrp-ns_2.35-1ubuntu16_amd64.deb : Provides /usr/local/bin/ns235-olsr-zrp
https://drive.google.com/file/d/1NAG...ew?usp=sharing


2. Build example .........

Code:

    tar xvf ns-allinone-2.35_gcc5.tar.gz        ( 2014..2017 update )
https://drive.google.com/file/d/0B7S...FDb7ul0VFk6FZQ
    cd ns-allinone-2.35/
    patch -p0 < umolsr-ns235_v1.0-2014.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
    export CC=gcc-4.8 CXX=g++-4.8 && ./install
    cd ns-2.35/
    cp ns ns235-olsr
    sudo cp ns235-olsr /usr/local/bin/
------  Simulation  --------
ns235-olsr script-olsr-etx.tcl

olsr-examples-09.19.tar.gz
https://drive.google.com/file/d/19Q_...ew?usp=sharing
... and https://neo.lcc.uma.es/staff/jamal/v...de%252F11.html

-

shiyar 07-11-2022 09:44 AM

it works Thank you so much.
After executing the .tcl file, I have two files .tr and .nam files. How do I know the results of the execution?
can you help me please?

knudfl 07-11-2022 10:31 AM

Re #3.

"NAM file is a separate program which is distributed with NS2 simulator to read an input file and draw the network events graphically. It is used to visualize the progression of packets through the Network."

Simply do $ nam file.nam
NAM package examples https://www.linuxquestions.org/quest...-4175524760/#2
___________

Files.tr can be analyzed with e.g. an awk script: $ awk -f file.awk file.tr
Top 25 scripts
https://drive.google.com/file/d/1bhu...ew?usp=sharing

All ~240 scripts: Awk+Perl_ns2-scripts-01.21.tar.xz
https://drive.google.com/file/d/1uuV...ew?usp=sharing

About trace files.tr http://nsnam.sourceforge.net/wiki/in..._Trace_Formats

-

shiyar 07-20-2022 07:26 AM

I'm using the olsr protocol in an flying ad-hoc networks (fanets).
please, how can I make the nodes move and set the speed of the nodes?

shiyar 07-20-2022 08:47 AM

When I execute the tcl file in the olsr protocol and specify the number of nodes to 80 or more, it shows the following error:
Segmentation fault (core dumped)
What is the solution to this problem? Please help me.. thank you very much

knudfl 07-23-2022 06:48 AM

Re #6.

`Segmentation faultī happens more often when ns2 has been built with an "after year 2020 OS".
Critical code / old code is suggested built with an older ns2 friendly OS such as CentOS 6.10 .

`Segmentation faultī can also be caused by a too complex simulation.tcl .
Or by expecting an impossible situation.tcl to run.

(#5) FANET → Geo3D :
The combined patch {umolsr-ns235_v1.0-2014.patch + geo+ns2-3D_ns235.patch-3}
.... is "Geo3D+olsr_ns235.patch"
https://drive.google.com/file/d/1xZY...ew?usp=sharing

geo3D-ex-3.tar.xz .... many examples with movement
https://drive.google.com/file/d/17s3...ew?usp=sharing

* Segmentation fault:
* If you want a solution, please upload / attach the simulation file(s).
-

knudfl 07-23-2022 07:51 AM

Re #6

`Segmentation faultī
I get Segmentation fault with 80 nodes (Not with 50 nodes)
The example was DSR__routingprotocolforFANET.tcl edited to
New file name = o-80-OLSR__routingprotocolforFANET.tcl
Code:

set val(adhocRouting)  OLSR
set val(nn)            80
set val(stop)          50.0

.... but the trace files have reached reasonable sizes, so `Segmentation faultī may be ignored.

50 nodes : o-50-OLSR__routingprotocolforFANET.tcl
Code:

set val(adhocRouting)  OLSR
set val(nn)            50
set val(stop)          100.0


knudfl 07-23-2022 08:30 AM

New examples, OLSR 3D, in "ex-4"

geo3D-ex-4.tar.xz
https://drive.google.com/file/d/1Vi4...ew?usp=sharing

Please read "TextFile__setdest3D" : Create movement file 3D with 'setdest3D'.

-

shiyar 07-25-2022 10:09 AM

#Re 9
thank you so much but When I run the instruction, it appears:
setdest3d: command not found.
please, How can I create a 3D movement.

knudfl 07-25-2022 04:10 PM

Re #10

The supplied file is setdest3D, therefore the command starts with ./setdest3D
.... Alternatively you can rename to setdest3d and do ./setdest3d -options



-

shiyar 07-26-2022 03:08 AM

Re #10
it worksss thanxxx sooo much

shiyar 07-26-2022 07:45 AM

I create a 3D movement But when I run the tcl file, the following error appears:

Loading scenario file...
Load complete...
Starting Simulation...
ns: _o14 setdest3d 148.377446425732 445.558487129436 441.150568136787 50.000000000000:
(_o14 cmd line 1)
invoked from within
"_o14 cmd setdest3d 148.377446425732 445.558487129436 441.150568136787 50.000000000000"
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 setdest3d 148.377446425732 445.558487129436 441.150568136787 50.000000000000"

What is the solution please?

knudfl 07-26-2022 10:20 AM

Re #13
Quote:

But when I run the tcl file
? Which file.tcl ? ?
... The most common error is a too small x y z setting ...
Code:

# default values
set val(x) 1000
set val(y) 1000
set val(z) 1000

Or a missing 3D setting ?
Code:

# setup topography object
set topo        [new Topography]
.
.
.
# define topology
$topo load_cube $val(x) $val(y) $val(z) 1

.... Or maybe you are using a wrong executable ?
COMMAND example
Code:

$ ns235-geo-olsr-64 o-50-OLSR__routingprotocolforFANET.tcl
$ ns235-geo-olsr-64 oz-19-estudy-Fanet.tcl  ## movement file: speed 50.000

geo3D-ex-5.tar.xz
https://drive.google.com/file/d/1c0F...ew?usp=sharing

-

shiyar 10-31-2022 06:48 AM

can help me please,when I run this command:
ns235-geo-olsr-64 o-50-OLSR__routingprotocolforFANET.tcl
the following error appears: command not found

example:
nour@ubuntu:~/Desktop/geo3D-ex-5$ ns235-geo-olsr-64 o-50-OLSR__routingprotocolforFANET.tcl
ns235-geo-olsr-64: command not found


All times are GMT -5. The time now is 07:50 PM.