LinuxQuestions.org
Visit Jeremy's Blog.
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-02-2016, 01:23 AM   #1
aradhi
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Rep: Reputation: Disabled
Error while running AntNet in ns2.35


Hello,

I am new to ns2, and i have installed ns2.35 on ubuntu 14.0.4. After so many days i successfully installed ns2 and some example scripts are running successfully. I am trying to run "Antnet" ( its code i found online ) on ns2.35, but i'm getting some errors which i am not able to solve.

The error is:
--------------------------------------------------------------------------------------
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 "antnet2.tcl" line 42)
----------------------------------------------------------------------------------------------


I have checked Agent antnet is is added in ns-packet.tcl and ns-lib.tcl .
Any help would be appreciated. Thankyou so much.
 
Old 06-02-2016, 06:04 PM   #2
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
Quote:
invalid command name "Agent/Antnet"
... Means : No Antnet was compiled into the executable 'ns'.

HOWTO build Antnet : Posts #2, #4 >>
http://www.linuxquestions.org/questi...et-4175532576/
>> The simulation : $ ns235-antnet antnet*.tcl
I.e. to be sure the right 'ns' is used : Please use the ns235-antnet command.

** The most versatile addition is "AntHocNet". And anthocnet works. "antnet" usually doesn't.
http://www.linuxquestions.org/questi...-4175552052/#4

All "antnet" patches http://www.linuxquestions.org/questi...-4175536545/#3


-
 
Old 06-02-2016, 10:32 PM   #3
aradhi
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
hey,
thankyou for replying..

I tried using the patch for ns2.35 but as i have already did the changes manually in all the files, the patch gave errors. I checked and the changes are same.

i also tried running byy :
$ns235-antnet antnet.tcl instead of 'ns'

it gave the following error:-
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o33: no target for slot 4294967295
_o33 type: Classifier/Hash/Dest
content dump:
classifier _o33
0 offset
0 shift
1073741823 mask
1 slots
slot 7: _o405 (Classifier/Port)
-1 default
---------- Finished standard no-slot{} default handler ----------


What does this mean? I googled it, it says ns is trying to send a packet to an object which does not exist. but i am not able to locate the error.

please help. I'm stuck here.
thankyou
 
Old 06-03-2016, 05:57 AM   #4
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
Re #3.

Looks like the "normal" faulty output with antnet.tcl .
? Why not use the other examples, ring.tcl and Pradeepkumar-antnet.tcl ?
>> antnet-examples.tar.gz >> https://drive.google.com/file/d/0B7S...ew?usp=sharing

But then again : The most versatile addition is "AntHocNet". See post #2.
And http://people.idsia.ch/~frederick/an...anthocnet.html


-
 
Old 06-03-2016, 09:20 AM   #5
aradhi
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
hey,

I tried other scripts, the script with 2 nodes ( Pradeepkumar-antnet.tcl )works but ring.tcl doesn't and it gives the same error.
I need to use antnet for my dissertation. Is it okay to continue working on antnet and making it work?
 
Old 06-03-2016, 10:04 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
Re #5.
Quote:
but ring.tcl doesn't ... work
Probably because you are using Ubuntu, or an incompatible version of Ubuntu.

The one and only OS that can do all examples is CentOS 6.8 - 32bits
http://ftp.funet.fi/pub/mirrors/cent...386-LiveCD.iso

CentOS 6.8 - i386 can even do antnet.tcl OK.
(First time success with antnet.tcl for many years.
I guess it must have worked once with some very old OS, e.g. CentOS 4. Ubuntu 4.x?)


.
 
Old 06-03-2016, 10:53 AM   #7
aradhi
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Re #6

Your replies have been really helpful.
So, antnet doesn't work and may not work because of the version of ubuntu I am using.
Should I change my OS or start working on anthocnet? I would really appreciate if you could advice me here.

P.S. : I have about a month.
 
Old 06-03-2016, 11:09 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
Re #7.

You have one choice only : Install CentOS 6.8 , see post #6.

No contemporary Ubuntu version works well with ns2.
And doesn't work at all with a lot of the ns2-additions ...
 
1 members found this post helpful.
Old 06-05-2016, 11:37 AM   #9
aradhi
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Re #8

I tried centOS in VMware and antnet.tcl now WORKS!
Thankyou so much for your help and feedback.

Last edited by aradhi; 06-05-2016 at 11:55 AM.
 
  


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
NS2 2.35: Antnet must Linux - Software 14 05-26-2017 07:17 AM
Congestion notification and avoidance in AntNet protocol (NS2) zakizakizaki Linux - Networking 1 05-29-2015 05:21 PM
error while running tcl file on Antnet algorithm. R.Mosheca Linux - Software 0 07-31-2014 09:44 AM

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

All times are GMT -5. The time now is 04:21 PM.

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