is there any code for detection slefish node in manet in ns2

47 views
Skip to first unread message

Fomal

unread,
Feb 27, 2019, 7:12:44 PM2/27/19
to Network Simulator 2 (NS2)
I want ns2 code for detect slefish ndoe in manet 

knudfl

unread,
Feb 28, 2019, 3:48:53 AM2/28/19
to Network Simulator 2 (NS2)

Fomal

unread,
Feb 28, 2019, 8:33:37 AM2/28/19
to Network Simulator 2 (NS2)
thanks for replaying 
currenlty i work to implement watchdogs mechanism 
i followed some tutrioal from youtube nad build manet and some selfish node but i want to know how to detection it ir how can i use watchdog mechamism to detect it 

knudfl

unread,
Feb 28, 2019, 9:39:56 AM2/28/19
to Network Simulator 2 (NS2)
Watchdog : The only code I ever found is "watchdog-aodv-basic" and "watchdog-aodv-bayesian".

Year 2014 :  The created patch = watchdog-bayesian2.0_ns235.patch
https://drive.google.com/file/d/0B7S255p3kFXNVXZhSmV1a1RSelE/view?usp=sharing


A simulation ex :  Venkatesh-bhaodv-3.tcl


Venkatesh-bhaodv-3.tcl

Dya Abdullah

unread,
Feb 28, 2019, 9:42:11 AM2/28/19
to ns-u...@googlegroups.com
How to apply genetic algorithm to find the best path in DSDV MANET routing protocol? 
 How to get the source code?

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To post to this group, send email to ns-u...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-users.
For more options, visit https://groups.google.com/d/optout.

Fomal

unread,
Feb 28, 2019, 11:57:34 AM2/28/19
to ns-u...@googlegroups.com
ty for help
last question 
so how to apply this patch for ns2.35 
also the code wont work unless i setup the patch right ? 

knudfl

unread,
Feb 28, 2019, 1:07:47 PM2/28/19
to Network Simulator 2 (NS2)
ns-2.35 + watchdog,  build example :

tar xvf ns-allinone-2.35_gcc5.tar.gz
https
://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < watchdog-bayesian2.0_ns235.patch
./install
cd ns
-2.35/
cp ns
ns235-watchdog
sudo cp
ns235-watchdog /usr/local/bin/

--------- Simulation -------------
ns235-watchdog Venkatesh-bhaodv-3.tcl
ns2-INFO.txt

Fomal

unread,
Mar 2, 2019, 3:31:18 AM3/2/19
to ns-u...@googlegroups.com
tyvm mr.Knudfl

Fomal

unread,
Mar 4, 2019, 3:57:33 AM3/4/19
to ns-u...@googlegroups.com
sry again mr.knudfl 
after installation of watchdog patch i cant find ns235_watchdog to copy it 

knudfl

unread,
Mar 4, 2019, 6:48:12 AM3/4/19
to Network Simulator 2 (NS2)
@Fomal :   Assume a "Linux OS".  Yours are unknown.
If you want a precise answer →
Every question must contain minimum information = OS specification.
E.g.  Ubuntu 18.04 - 64bit,  CentOS 7 - 1810.


Ubuntu 18.04 build example ....

tar xvf ns-allinone-2.35_gcc5.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns-allinone-2.35/
patch -p0 < watchdog-bayesian2.0_ns235.patch       // apply the patch
export CC=gcc-4.8 CXX=g++-4.8 && ./install             // the build command
cd ns-2.35/
cp ns ns235-watchdog                 // creating the new executable
                                                     // this is also your backup of the new "ns"
sudo cp ns235-watchdog /usr/local/bin/            // install command

Fomal

unread,
Mar 4, 2019, 7:16:46 AM3/4/19
to ns-u...@googlegroups.com
i use ubuntu 14.04
but thanks mr.knudfl it was error from ns packet i think i re downlaod it and i find the missing files and it worked fine now 

Fomal

unread,
Mar 8, 2019, 5:27:59 PM3/8/19
to ns-u...@googlegroups.com
Watchdog code is running but there a
problem i read the tcl and i found that that node 4 is the selfish one 
and there is for loop to 
but in in simulation it keep send packet to it 
, so is that mean it didnt detect it or what ?

Hiba Mohammed

unread,
Apr 16, 2019, 1:05:50 PM4/16/19
to ns-u...@googlegroups.com
Hi I'm need heple to solve  error  in TCL file in line ns at 0.0 "[$ns4 set rangent_] backhoe "

knudfl

unread,
Apr 16, 2019, 2:06:05 PM4/16/19
to Network Simulator 2 (NS2)
@Hiba Mohammed ,   Hi.

Looks like you have some typo´s ...

Searching in the 3000 examples :
[000-All-examples-4]$ grep -n "ns4 set rangent_] back" *
[000-All-examples-4]$ grep -n "ns4" *
[000-All-examples-4]$ grep -n rangent *
                                                                   
// Nothing !
....  I guess that "$ns4 set" should be  `$ns2 set´.
And the only word which comes close to "rangent" is range.
  • If you want a solution, then please attach your "file.tcl".

Reply all
Reply to author
Forward
0 new messages