LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Error while running AntNet in ns2.35 (https://www.linuxquestions.org/questions/linux-networking-3/error-while-running-antnet-in-ns2-35-a-4175581240/)

aradhi 06-02-2016 01:23 AM

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.

knudfl 06-02-2016 06:04 PM

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


-

aradhi 06-02-2016 10:32 PM

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

knudfl 06-03-2016 05:57 AM

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


-

aradhi 06-03-2016 09:20 AM

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?

knudfl 06-03-2016 10:04 AM

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?)


.

aradhi 06-03-2016 10:53 AM

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.

knudfl 06-03-2016 11:09 AM

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 ...

aradhi 06-05-2016 11:37 AM

Re #8

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


All times are GMT -5. The time now is 11:16 AM.