LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-31-2015, 01:52 AM   #1
must
LQ Newbie
 
Registered: Jan 2014
Posts: 19

Rep: Reputation: Disabled
NS2 2.35: Antnet


hello
I'm tring to install Antnet to NS2, I folow this link https://github.com/richardsonlima/antnet
and i got this error make: *** [dccp/dccp.o] Error 1

how can i solve this problem???

note: I'm using NS2 2.35 with ubuntu 12.4 LTS
 
Old 01-31-2015, 06:13 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Antnet, ns-2.35

tar xvf ns-allinone-2.35_gcc482.tar.gz ( for gcc -4.6 ... 4.9 )
https://drive.google.com/file/d/0B7S...ew?usp=sharing
cd ns-allinone-2.35/
patch -p0 < antnet_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
./install
 
1 members found this post helpful.
Old 02-16-2015, 08:59 PM   #3
Emansa
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Rep: Reputation: Disabled
Antnet ns2.35 error

Sir,

I have used your patch and ns-2.35 and I can run ns-default.tcl. But when I run antnet.tcl I get error "invalid command name "Agent/Antnet". So I try use copy ns and use command ./ns as below:
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ./ns antnet.tcl
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o24: no target for slot 4294967295
_o24 type: Classifier/Hash/Dest
content dump:
classifier _o24
0 offset
0 shift
1073741823 mask
1 slots
slot 4: _o402 (Classifier/Port)
-1 default
---------- Finished standard no-slot{} default handler ----------

I have no idea how to solve it. I ever user used your patch in ns-2.34 and other ns-2.34 and ns-2.35 from github but they don't succeed either. So I hope you would like to help me. (Fyi I use debian 7.7)

Best Regards
 
Old 02-16-2015, 10:23 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
← Ref. post #3, @Emansa : Welcome to LQ.

Please use the updated ns-2.35 : ns-allinone-2.35_gcc482.tar.gz
And use the updated patches (antnet_ns234.patch) antnet_ns235.patch.
Do not use plain ns command, but ns-antnet or ns235-antnet.

$ tar xvf ns-allinone-2.35_gcc482.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < antnet_ns235.patch
$ cd ns-2.35/
$ cp ns ns235-antnet
$ sudo cp ns235-antnet /usr/local/bin/
The simulation : $ ns235-antnet antnet.tcl


There is an ns-2.34 build example in post #2 here :
http://www.linuxquestions.org/questi...-4175530496/#2


-
 
1 members found this post helpful.
Old 02-17-2015, 12:49 AM   #5
Emansa
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Rep: Reputation: Disabled
Sir, I would like to thank because ns-allinone-2.35_gcc482.tar.gz has run well as your instruction above. Like this:

student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ns235-antnet antnet.tcl
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o45: no target for slot 4294967295
_o45 type: Classifier/Hash/Dest
content dump:
classifier _o45
0 offset
0 shift
1073741823 mask
1 slots
slot 11: _o409 (Classifier/Port)
-1 default
---------- Finished standard no-slot{} default handler ----------
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ls
antnet.tcl antnet_trace.out noc.tcl out.nam ring.tcl rtable.txt
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ls -l
total 108
-rw-r--r-- 1 student student 3881 Jan 29 11:54 antnet.tcl
-rw-r--r-- 1 student student 24640 Jan 29 12:08 antnet_trace.out
-rw-r--r-- 1 student student 2867 Jan 29 11:54 noc.tcl
-rw-r--r-- 1 student student 68816 Jan 29 12:08 out.nam
-rw-r--r-- 1 student student 1624 Jan 29 11:54 ring.tcl
-rw-r--r-- 1 student student 0 Jan 29 12:08 rtable.txt
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ nam out.nam

Best Regards

Emansa
 
Old 04-27-2015, 09:12 AM   #6
zakizakizaki
LQ Newbie
 
Registered: Apr 2015
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← Ref. post #3, @Emansa : Welcome to LQ.

Please use the updated ns-2.35 : ns-allinone-2.35_gcc482.tar.gz
And use the updated patches (antnet_ns234.patch) antnet_ns235.patch.
Do not use plain ns command, but ns-antnet or ns235-antnet.

$ tar xvf ns-allinone-2.35_gcc482.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < antnet_ns235.patch
$ cd ns-2.35/
$ cp ns ns235-antnet
$ sudo cp ns235-antnet /usr/local/bin/
The simulation : $ ns235-antnet antnet.tcl


There is an ns-2.34 build example in post #2 here :
http://www.linuxquestions.org/questi...-4175530496/#2


-
Is it possible to install AntHocNet beside AntNet in the same ns-allinone-2.35 folder? Or should eye delete AntNet before installing AntHocNet?
Thank you, sir.
 
Old 04-27-2015, 10:23 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Re #6.

You can have as many ns-allinone-2.xx as you want, installed at the same time.
But : Do never add any *PATH text to .bashrc .
(( I have about 170 different patched ns2 on the same OS :
$ ls /usr/local/bin/ns* | wc ,,,, the count is 179.))

So the suggestion is to build another ns-allinone-2.35 in a new folder in /home/name/.

AntHocNet http://www.linuxquestions.org/questions/tags/anthocnet/


P.S. : Please do not quote entire posts. A "one word reference" will do.


-
 
Old 04-27-2015, 10:43 AM   #8
zakizakizaki
LQ Newbie
 
Registered: Apr 2015
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #6.

-
Thanks. I finally went for anthocnet only, so i reinstalled ns-2.35 patched it with anthocnet 2.35 patch. Now when i type "ns" in terminal, it says that it is not installed? How's that?

Thanks again
 
Old 04-27-2015, 11:46 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Re #8.

See #34 http://www.linuxquestions.org/questi...867/page3.html
tar xvf ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
cd ns-allinone-2.35/
patch -p0 < anthocnet_ns235.patch
./install
cd ns-2.35/
sudo make install
cp ns ns235-anthocnet ( That's your "ns AntHocNet" backup )
sudo cp ns235-anthocnet /usr/local/bin/
... And then do the check : $ ns235-anthocnet

-
 
Old 03-29-2017, 02:44 AM   #10
bhavesh_patel
LQ Newbie
 
Registered: Mar 2017
Posts: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← Ref. post #3, @Emansa : Welcome to LQ.

Please use the updated ns-2.35 : ns-allinone-2.35_gcc482.tar.gz
And use the updated patches (antnet_ns234.patch) antnet_ns235.patch.
Do not use plain ns command, but ns-antnet or ns235-antnet.

$ tar xvf ns-allinone-2.35_gcc482.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < antnet_ns235.patch
$ cd ns-2.35/
$ cp ns ns235-antnet
$ sudo cp ns235-antnet /usr/local/bin/
The simulation : $ ns235-antnet antnet.tcl


There is an ns-2.34 build example in post #2 here :
http://www.linuxquestions.org/questi...-4175530496/#2


-



hello sir,
even after following you instruction still i m getting this error..


invalid command name "Agent/Antnet"
while executing
"Agent/Antnet create _o386 0"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/Antnet $i"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $sz} {incr i} {
set nn($i) [ new Agent/Antnet $i]
}"
(file "antnet.tcl" line 45)



i dont know how to solve it...

can you please help to solve it??


thanks
Attached Files
File Type: txt antnet_tcl.txt (3.8 KB, 37 views)
 
Old 03-29-2017, 04:31 AM   #11
bhavesh_patel
LQ Newbie
 
Registered: Mar 2017
Posts: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← Ref. post #3, @Emansa : Welcome to LQ.

Please use the updated ns-2.35 : ns-allinone-2.35_gcc482.tar.gz
And use the updated patches (antnet_ns234.patch) antnet_ns235.patch.
Do not use plain ns command, but ns-antnet or ns235-antnet.

$ tar xvf ns-allinone-2.35_gcc482.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < antnet_ns235.patch
$ cd ns-2.35/
$ cp ns ns235-antnet
$ sudo cp ns235-antnet /usr/local/bin/
The simulation : $ ns235-antnet antnet.tcl


There is an ns-2.34 build example in post #2 here :
http://www.linuxquestions.org/questi...-4175530496/#2


-



it runs successfully..

but after running antnet.tcl file, rtable.txt file is still blank.
and when i run nam file, it only shows few nodes and no data packet is transfered and it contain only static node..

can u provide some extra TCL files to run??

thanks

Last edited by bhavesh_patel; 03-29-2017 at 04:48 AM.
 
Old 03-29-2017, 04:59 AM   #12
bhavesh_patel
LQ Newbie
 
Registered: Mar 2017
Posts: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by Emansa View Post
Sir, I would like to thank because ns-allinone-2.35_gcc482.tar.gz has run well as your instruction above. Like this:

student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ns235-antnet antnet.tcl
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o45: no target for slot 4294967295
_o45 type: Classifier/Hash/Dest
content dump:
classifier _o45
0 offset
0 shift
1073741823 mask
1 slots
slot 11: _o409 (Classifier/Port)
-1 default
---------- Finished standard no-slot{} default handler ----------
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ls
antnet.tcl antnet_trace.out noc.tcl out.nam ring.tcl rtable.txt
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ls -l
total 108
-rw-r--r-- 1 student student 3881 Jan 29 11:54 antnet.tcl
-rw-r--r-- 1 student student 24640 Jan 29 12:08 antnet_trace.out
-rw-r--r-- 1 student student 2867 Jan 29 11:54 noc.tcl
-rw-r--r-- 1 student student 68816 Jan 29 12:08 out.nam
-rw-r--r-- 1 student student 1624 Jan 29 11:54 ring.tcl
-rw-r--r-- 1 student student 0 Jan 29 12:08 rtable.txt
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ nam out.nam

Best Regards

Emansa


hello sir,

rtable.txt file is empty..
whenever i run nam file it shows only few nodes.
how to transmit data packet and to know energy level of nodes in ANTNET ??

and how to compare AODV and ANTNET using parameters like endtoend delay, throughput etc ???


can you help please??

thanks in advance
 
Old 03-29-2017, 05:56 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Re #12.
Quote:
rtable.txt file is empty
nam file .. shows only few nodes
The file creating (25 lines) rtable.txt on a contemporary Linux OS is 'Pradeepkumar-antnet.tcl'
.... from the examples, antnet-examples-2016.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

An example with more nodes is 'arahdi-antnet.tcl' :
OK nam animation, but not as stable as the Pradeepkumar-antnet.tcl (No rtable.txt lines.)


-
 
Old 05-26-2017, 03:39 AM   #14
newthink
LQ Newbie
 
Registered: May 2017
Posts: 2

Rep: Reputation: Disabled
Quote:
student@debian77:~/ns-allinone-2.35/ns-2.35/antnet/scripts$ ./ns antnet.tcl
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o24: no target for slot 4294967295
_o24 type: Classifier/Hash/Dest
content dump:
classifier _o24
0 offset
0 shift
1073741823 mask
1 slots
slot 4: _o402 (Classifier/Port)
-1 default
---------- Finished standard no-slot{} default handler ----------
I think that is multicast problem.

you should add below code in the top of "antnet.tcl" file

Code:
set ns [ new Simulator ]
$ns multicast
 
1 members found this post helpful.
Old 05-26-2017, 07:17 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Post #14, @newthink : Welcome to LQ.

Works perfectly! Thank you.

New Antnet simulation examples were issued: antnet-examples-05.17.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-
 
  


Reply

Tags
antnet, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
antnet algorithm execution problem mustf Linux - Wireless Networking 5 12-12-2014 10:56 AM
problem with antnet instalation on ns-allinone-2.33 adventarinatal Linux - Networking 1 08-17-2014 05:19 PM
problem with implementing antnet in ns 2.33 Merin Varghese Linux - Newbie 0 02-10-2012 04:18 AM
antnet algorithm execution problem savita1811 Linux - Wireless Networking 13 06-11-2011 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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