LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 02-22-2015, 12:03 PM   #1
agkagk
LQ Newbie
 
Registered: Feb 2015
Posts: 16

Rep: Reputation: Disabled
Unhappy Simple Ant based Routing Algorithm(SARA) implementation on NS 2.34


can any one please help me how to install the above, I need to compare it to ANTHOCNET please help me it is urgent.
 
Old 02-22-2015, 03:13 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Yes, I'm sure someone could help you. After all, it's big world.

But seriously, could you possibly ask a less open-ended question? How is anyone supposed to answer a question like the one you just asked? People can't read your mind; you have to supply some context and details.

What, exactly, is the nature of the problem? What, if anything, have you tried? If you got as far as installing NS, did you get any error messages?
 
Old 02-22-2015, 04:53 PM   #3
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
@agkagk, Welcome to LQ.

Do you want to add SARA to an ns-2.34, already patched with "Anthocnet" ?
http://www.linuxquestions.org/questi...69#post5321669
Or ?


Ns-2.34 + SARA :
tar xvf ns-allinone-2.34.tar.gz
cd ns-allinone-2.34/
patch -p0 < otcl_ns234_gcc-4.4.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
patch -p0 < sara_ns234.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
export CC=gcc-4.4 CXX=g++-4.4 && ./install


-
 
Old 02-23-2015, 07:48 AM   #4
agkagk
LQ Newbie
 
Registered: Feb 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
Unhappy Yes Sir, I want to add SARA to an ns-2.34, already patched with "Anthocnet" .

Yes Sir, I want to add SARA to an ns-2.34, already patched with "Anthocnet" .


Quote:
Originally Posted by knudfl View Post
@agkagk, Welcome to LQ.

Do you want to add SARA to an ns-2.34, already patched with "Anthocnet" ?
http://www.linuxquestions.org/questi...69#post5321669
Or ?


Ns-2.34 + SARA :
tar xvf ns-allinone-2.34.tar.gz
cd ns-allinone-2.34/
patch -p0 < otcl_ns234_gcc-4.4.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
patch -p0 < sara_ns234.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
export CC=gcc-4.4 CXX=g++-4.4 && ./install


-
 
Old 02-23-2015, 08:52 AM   #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
← ref. #4 : Anthocnet + SARA, ns-2.34.

Please do not quote entire posts. A one word reference will do.


Anthocnet + SARA → the patch : SARA-for__Anthocnet-patched-ns234.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Assume $ svn checkout svn://svn.code.sf.net/p/anthocnet/code/ anthocnet-code
→ →
$ cd anthocnet-code/ns-allinone-2.34/
$ patch -p0 < SARA-for__Anthocnet-patched-ns234.patch
$ patch -p0 < otcl_ns234_gcc-4.4.patch
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.34/
$ sudo make install
$ cp ns ns234_anthocnet+sara
$ sudo cp ns234_anthocnet+sara /usr/local/bin/
.... I had no issues with the above.

Now please test all the default simulations with the new 'ns234_anthocnet+sara'.
Example : $ ns234_anthocnet+sara manet.sara.FTP.tcl -rs 18
→ OK. The files ftp.tr 19.4MB, ftp.nam 33.4MB are created.
$ nam ftp.nam : OK, lots of activity.


-

Last edited by knudfl; 02-24-2015 at 06:52 AM.
 
Old 02-24-2015, 06:51 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
Ref. #5.

Sorry, wrong link for "SARA-for__Anthocnet-patched-ns234.patch"

The right one is https://drive.google.com/file/d/0B7S...ew?usp=sharing
 
Old 02-25-2015, 06:09 AM   #7
agkagk
LQ Newbie
 
Registered: Feb 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
ref 5 & 6

Hello,

i applied patch of sara on ns2.34already integrated with anthocnet.
patching applied properly but while running ./install command it gives following error

common/packet.h:297: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:298: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:299: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:300: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:301: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:302: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:303: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:304: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:305: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:306: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:307: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:308: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:309: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:310: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:311: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:312: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:313: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:314: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:315: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:317: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:318: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:319: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:320: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:321: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:322: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:324: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:325: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:326: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:327: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:328: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:329: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:330: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:331: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:332: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:333: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:334: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:335: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:336: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:337: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:339: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:340: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:342: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:343: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:344: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:346: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:349: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:352: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:355: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:358: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:361: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:364: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:368: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:372: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:373: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:375: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:376: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:379: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:382: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:385: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:388: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:391: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:393: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:395: warning: deprecated conversion from string constant to ‘char*’
common/scheduler.cc: In member function ‘virtual int Scheduler::command(int, const char* const*)’:
common/scheduler.cc:216: warning: deprecated conversion from string constant to ‘char*’
make: *** [common/scheduler.o] Error 1

Pls give solution.

Thanks in advance.
 
Old 02-25-2015, 06:40 AM   #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
← ref. #7.

Please edit post #7 to use CODE tags.
... Or / and delete the warnings. Warnings are not errors.
If you want a solution for an error,
the one line where the error appears must be shown.
I.e. »» make: *** [common/scheduler.o] Error 1 «« is just the conclusion.

Editing : The 'Edit' button.
CODE tags : The ` # ´ button in the 'Advanced Editor' →
→ → Edit >>> Go Advanced.

-

Which Ubuntu 12.04 are you using ? 32bits (i686) or 64bits (x86_64) ?
→ This command will show <arch> : $ uname -m
Are you sure that no changes were made to "ns234 with Anthocnet",
before applying the patch "SARA-for__Anthocnet-patched-ns234.patch" ?
? And is your {ns-2.34 + anthocnet} downloaded with this command :
Code:
$ svn checkout svn://svn.code.sf.net/p/anthocnet/code/ anthocnet-code

-

Last edited by knudfl; 02-25-2015 at 06:42 AM.
 
Old 02-25-2015, 10:37 AM   #9
agkagk
LQ Newbie
 
Registered: Feb 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
Ref #8

Hello,

Implementation of SARA with AntHocNet done successfully, but running the sccenario (below) with ANTHOCNET successfully but with SARA it gives error "SEGMENTATION FAULT(CORE DUMP)". Can u please tell me whether there is any problem with scenario WITH RESPECT TO SARA MEANS SOME INCOMPLETE PARAMETER ??
PLS HELP ME TO UPDATE THIS SCENARIO FOR SARA EXECUTION OR SOMETHING ELSE SCENARIO SO I CAN GET IDEA ABOUT WRITING SCENARIO FOR SARA ROUTING PROTOCOL.BASICALLY I WANT TO COMPARE ANTHOCNET PERFORMANCE WITH SARA. ANTHOCNET COMPARISON WITH AODV AND DSR IS DONE.

AND THANK YOU SIR WITH HELP ONLY WE INTEGRATED SARA WITH NS2.34 SUCESSFULLY.

PLS GUIDE WITH SCRENARIO POINT OF VIEW.

THANKS AND REGARDS

AGKAGK





tcl scenario script



set val(chan) Channel/WirelessChannel ;#Channel Type /Typ kanalu
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) CMUPriQueue; #Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 2 ;# number of mobilenodes
set val(rp) AntHocNet ;# routing protocol
set val(x) 1000
set val(y) 1000


# Initialize Global Variables /Inicjowanie zmiennych globalnych
set ns_ [new Simulator]
set tracefd [open low-ant.tr w]
$ns_ trace-all $tracefd

set namtrace [open low-ant-wrls.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object /Utworzenie obiektu topograficznego
set topo [new Topography]

$topo load_flatgrid $val(x) $val(y)

# Create God /Tworzenie GOD
create-god $val(nn)

# New API to config node: /Nowe API do konfiguracji węzła:
# 1. Create channel (or multiple-channels); /1. Tworzenie kanału (lub kilku kanałów);
# 2. Specify channel in node-config (instead of channelType); /2. Określ kanału w node-config (zamiast channelType);
# 3. Create nodes for simulations. /3. Tworzenie węzłów dla symulacji.

# Create channel #1 and #2 /Tworzenie kanału 1 i 2
set chan_1_ [new $val(chan)]
set chan_2_ [new $val(chan)]


# Create node(0) "attached" to channel #1 /Tworzenie wezla node(0) "dolaczonego" do kanalu 1

# configure node, please note the change below. /Konfiguracji węzła, należy zwrócić uwagę na zmiany poniżej
$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace OFF \
-channel $chan_1_

# Ustawienie wartosci dla AntHocNet
#Agent/AntHocNet set num_nodes_ 2 # number of nodes in topology //liczba węzłów w topologii
#Agent/AntHocNet set num_nodes_x_ 2 # number of nodes in row (for regular mesh topology) //liczba węzłów w rzędzie (dla stałych topologii mesh)
#Agent/AntHocNet set num_nodes_y_ 2 # number of nodes in column (for regular mesh topology) //liczba węzłów w kolumnie (regularne topologii mesh)
#Agent/AntHocNet set r_factor_ 1 # reinforcement factor //czynnik wzmocnienia
#Agent/AntHocNet set timer_ant_ 1 # timer for generation of forward ants //timer do generowania mrówki do przodu

# node_(1) can also be created with the same configuration, or with a different / node_(1) moze byc takze tworzony z taka sama konfiguracja, lub z innym
# channel specified. / specyfikacja kanalu
# Uncomment below two lines will create node_(1) with a different channel. / Odkomentuj poniżej dwie linie stworza node_(1) z innegym kanałem.
# $ns_ node-config \
# -channel $chan_2_


set node_(0) [$ns_ node]
set node_(1) [$ns_ node]

$node_(0) random-motion 0
$node_(1) random-motion 0

for {set i 0} {$i < $val(nn)} {incr i} {
$ns_ initial_node_pos $node_($i) 20
}

#
# Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes /Poczatkowe (X, Y, teraz Z = 0) wspolrzedne dla mobilnych węzlow
#
$node_(0) set X_ 5.0
$node_(0) set Y_ 2.0
$node_(0) set Z_ 0.0

$node_(1) set X_ 8.0
$node_(1) set Y_ 5.0
$node_(1) set Z_ 0.0

#
# Now produce some simple node movements /Teraz wytwarzymy kilka prostych przemieszczeń węzla
# Node_(1) starts to move towards node_(0) /Node_(1) zacznie się poruszać w kierunku node_(0)
#
$ns_ at 3.0 "$node_(1) setdest 50.0 40.0 25.0"
$ns_ at 3.0 "$node_(0) setdest 48.0 38.0 5.0"

# Node_(1) then starts to move away from node_(0) /Node_(1) następnie zaczynie się oddalac od node_(0)
$ns_ at 20.0 "$node_(1) setdest 490.0 480.0 30.0"

# Setup traffic flow between nodes /Ustawienia ruchu między węzłami
# TCP connections between node_(0) and node_(1) /Polaczenie TCP pomiedzy wezlami node_(0) i node_(1)

set tcp [new Agent/TCP]
$tcp set class_ 2
set sink [new Agent/TCPSink]
$ns_ attach-agent $node_(0) $tcp
$ns_ attach-agent $node_(1) $sink
$ns_ connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns_ at 3.0 "$ftp start"

#
# Tell nodes when the simulation ends /Powiedz węzłom gdy symulacja sie kończy
#
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at 30.0 "$node_($i) reset";
}
$ns_ at 30.0 "stop"
$ns_ at 30.01 "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
}

puts "Starting Simulation..."
$ns_ run

Last edited by agkagk; 02-25-2015 at 10:42 AM.
 
Old 02-25-2015, 04:43 PM   #10
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
If you want any more answers :
Please edit posts #7, #9 to use code tags around `error output´ and code.

See post #8 : CODE tags ...
. http://www.linuxquestions.org/questi....php?do=bbcode
. http://www.linuxquestions.org/questi...gs-4175464257/
Alternative to the ` # ´ button :
Type [/code] at code text end, and [code] at text start.


Ubuntu 12.04 : 32bits (i686) or 64bits (x86_64) ?
This command will tell : $ uname -m


-

Last edited by knudfl; 02-25-2015 at 04:48 PM.
 
Old 02-11-2017, 12:48 AM   #11
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Rep: Reputation: Disabled
sara implementation on ns 2.35

i want patch of sara for implementation on ns2.35 ubuntu 16.04. plz help
 
Old 02-14-2017, 08:49 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by keerat View Post
i want patch of sara for implementation on ns2.35 ubuntu 16.04. plz help
Read the LQ Rules and Question Guidelines. You re-opened an old thread, used text-speak, and are essentially just asking for a handout. We aren't going to write code for you, nor are we going to look up a place where you can get such things.

We're happy to help you, but you need to show effort of your own, such as what research you've done, what you've written, etc.
 
Old 02-18-2017, 01:13 AM   #13
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Rep: Reputation: Disabled
thanks

thanks alot for your suggestion. i solve my problem on my own.
 
  


Reply

Tags
anthocnet, ns2, sara



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
SARA code implementation on ns-2.31 irphan Linux - Software 25 03-31-2017 11:08 AM
A logging Algorithm implementation in NS2 fawadahmad Linux - Newbie 0 06-15-2012 09:42 PM
[SOLVED] installing apache ANT, can't create /usr/local/ant folder per ANT's manual jclark978 Linux - Newbie 1 12-11-2011 02:00 AM
[SOLVED] MD5 Algorithm Implementation gfmtech05 Programming 3 04-28-2011 08:06 AM
implementation of RSA algorithm in C / C++ rupa sarda Programming 1 08-02-2010 11:12 AM

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

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