LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-22-2022, 03:15 PM   #1
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Rep: Reputation: 0
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?
 
Old 06-23-2022, 02:34 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

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

-
 
1 members found this post helpful.
Old 07-11-2022, 09:44 AM   #3
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
Old 07-11-2022, 10:31 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

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

-
 
1 members found this post helpful.
Old 07-20-2022, 07:26 AM   #5
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
Old 07-20-2022, 08:47 AM   #6
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 07-23-2022, 06:48 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

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

Last edited by knudfl; 07-23-2022 at 07:53 AM.
 
Old 07-23-2022, 07:51 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
 
Old 07-23-2022, 08:30 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

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

-
 
Old 07-25-2022, 10:09 AM   #10
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Original Poster
Rep: Reputation: 0
#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.
 
Old 07-25-2022, 04:10 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #10

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



-
 
Old 07-26-2022, 03:08 AM   #12
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Original Poster
Rep: Reputation: 0
Re #10
it worksss thanxxx sooo much
 
Old 07-26-2022, 07:45 AM   #13
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
Old 07-26-2022, 10:20 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

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

-

Last edited by knudfl; 08-07-2022 at 09:13 AM.
 
Old 10-31-2022, 06:48 AM   #15
shiyar
LQ Newbie
 
Registered: Jun 2022
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
  


Reply

Tags
fanet, geo3d, ns2, 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
Willingnes parameter change in the protocol OLSR NS2 ramzes_ek Linux - Newbie 1 10-29-2023 02:25 PM
Running SPAN protocol on ns2 !! errors !! Hi, I am trying to SPAN protocol on ns2.28 using cygwin on windows 10 phyotay3 Linux - Wireless Networking 2 10-23-2019 08:11 AM
How i can add Malicious Nodes in ZRP and OLSR Routing Protocol NS-2.35? rizkampleng Linux - Software 3 12-24-2015 01:34 PM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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