LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-03-2012, 09:18 AM   #1
ramamohanreddypilli
LQ Newbie
 
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
Black hole attack help


i am trying to simulate blackhole node in ns-2.29. but getting errors.
any body is done this. please help me.

my error is

[root@localhost ex]# ns sim1forBlackHole.tcl
num_nodes is set 20
Creating nodes...
INITIALIZE THE LIST xListHead

(_o5 cmd line 1)
invoked from within
"_o5 cmd at 0.0 {_o436 start} # start BEACON/HELLO Messages"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o5" line 2)
(SplitObject unknown line 2)
invoked from within
"_o5 at 0.0 {_o436 start} # start BEACON/HELLO Messages"
("eval" body line 1)
invoked from within
"eval $scheduler_ at $args"
(procedure "_o3" line 3)
(Simulator at line 3)
invoked from within
"$self at 0.0 "$ragent start" # start BEACON/HELLO Messages"
(procedure "_o3" line 3)
(Simulator create-blackholeaodv-agent line 3)
invoked from within
"$self create-blackholeaodv-agent $node"
("blackholeAODV" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 11)
(Simulator create-wireless-node line 11)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i $val(nnaodv)} {$i < $val(nn)} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;#disable random motion
..."
(file "sim1forBlackHole.tcl" line 57)
 
Old 01-04-2012, 06:22 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005
Read here - http://www.linuxquestions.org/questi...ns-2-a-799095/
This is all over the internet, and within these forums. Please search around next time if you can first, then ask questions if you are still having trouble.

Cheers,

Josh
 
Old 01-05-2012, 03:43 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,434

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Welcome to LQ.

If you want further answers, it may be a good idea to attach the file
sim1forBlackHole.tcl as sim1forBlackHole.tcl.txt to a new post,
by using the "paper clip" button in the 'Advanced Editor'.

And please tell where you got the information, that the file is for ns-2.29.
 
Old 07-04-2016, 07:12 AM   #4
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Rep: Reputation: Disabled
hello. plzzzz help me

i have problem in "make install"

for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
mkdir: cannot create directory `/usr/local/man/man1': Permission denied
make: *** [dirs] Error 1


how can solve it
 
Old 07-04-2016, 09:57 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,434

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Post #4, @nedawp@gmail.com : Welcome to LQ.

You have no write permissions to /usr/local/.

Please use 'sudo make install', or "su [enter root password], to do 'make install'.
 
Old 07-04-2016, 10:07 AM   #6
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Rep: Reputation: Disabled
tnx.after 'make install' i see this eror

for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install: cannot stat `ns': No such file or directory
make: *** [install-ns] Error 1

how can solve that
 
Old 07-04-2016, 10:14 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,434

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Re #6, @nedawp@gmail.com.

Well, you can tell what you actually are trying to do.
1) ns2 version.
2) Any changes, or patches added to ns-2.[unknown] : Please specify.
3) OS name and version.
4) OS architecture : i686 or x86_64 ... i.e. is the OS 32bits or 64bits ?


-
 
Old 07-04-2016, 10:33 AM   #8
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Rep: Reputation: Disabled
1- ns-allinone-2.35
i have win64 bit, and run vmware(VMware.Workstation.Pro.12.1.1.3770994) for use ubuntu 12 32bit. and also ns2


2- Blackhole Attack in ns-2
i get Blackhole.patch , blackhole.tcl and pdf.awk and ns-allinone-2.35.tar.gz following the link


http://http://mohittahiliani.blogspo...k-in-ns-2.html
 
Old 07-04-2016, 10:41 AM   #9
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Rep: Reputation: Disabled
Click image for larger version

Name:	su.PNG
Views:	39
Size:	64.1 KB
ID:	22310
please help me

tnx
 
Old 07-04-2016, 02:18 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,434

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Re #8.

Not a link (to Mohit Tahiliani), but only half a link.
How to copy a link address : Right click > Select "Copy Link Location".
But I can try with a guess : It's the well known "Mohit Tahiliani blackholeaodv" ?
http://mohittahiliani.blogspot.dk/20...k-in-ns-2.html May 22, 2014.

HOWTO :
Code:
tar xvf ns-allinone-2.35_gcc482.tar.gz (Oct 2014 update)
https://drive.google.com/file/d/0B7S...ew?usp=sharing
cd ns-allinone-2.35/
patch -p1 -t < Blackhole.patch
./install
cd ns-2.35/
sudo make install ('make install' will copy 'ns' to /usr/local/bin/)
cp ns ns-blackhole (This is your backup)
sudo cp ns-blackhole /usr/local/bin/
Simulation : ns-blackhole blackhole.tcl : To make sure you are using the right 'ns'.


Other choices : blackholeaodv2013-ns235_1.patch : ~11 simulation examples.
Using : cd ns-allinone-2.35/ && patch -p0 < blackholeaodv2013-ns235_1.patch
INFO : http://www.linuxquestions.org/questions/tags/blackhole/
and https://groups.google.com/forum/?fro...le%7Csort:date


Note :
You can have as many ns-allinone-2(.35) as you want, installed at the same time.
But do not add any *PATH to .bashrc . Not required.


Re #9, your errors :
Looks like you have a corrupt (and old) copy of ns-allinone-2.35 .



-

Last edited by knudfl; 07-05-2016 at 06:27 AM.
 
Old 07-05-2016, 01:04 AM   #11
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Rep: Reputation: Disabled
Hey sir, Your Blog is really helpful for us.
tnx
 
Old 07-10-2016, 03:20 PM   #12
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Rep: Reputation: Disabled
hi
can u help me to find patch file of
An Enhanced Ant Colony Based Approach to Optimize the Usage of Critical Node in Wireless Sensor Networks in ns2


https://www.researchgate.net/publica..._Networks.pdf?
 
Old 07-11-2016, 09:43 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 24,133

Rep: Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111Reputation: 7111
Quote:
Originally Posted by nedawp@gmail.com View Post
hi
can u help me to find patch file of
An Enhanced Ant Colony Based Approach to Optimize the Usage of Critical Node in Wireless Sensor Networks in ns2
First, you need to read the LQ Rules...not only did you re-open a thread that had been closed for FOUR YEARS, and hijack it with your own question, you are also using text-speak, which isn't good. Also, you need to read the "Question Guidelines" link in my posting signature...we are happy to help you with questions, but asking us to look things up for you and spoon-feed you a link is fairly rude.

If you need to find that patch, then I suggest you start with http://www.google.com
 
Old 09-20-2016, 06:05 AM   #14
Jeenat
LQ Newbie
 
Registered: Sep 2016
Posts: 4

Rep: Reputation: Disabled
Hello all!
I followed the blackhole.patch for AOMDV. It works perfectly for AODV but in AOMDV the blackhole node is just avoided instead of attracting the packets and the alternate route is selected.
Do any specific change should be made for AOMDV?

Plz help.
 
  


Reply

Tags
blackhole, 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
Problem in simulating Black Hole Attack in AODV Protocol through NS2 in FC8 shyan Linux - Newbie 3 02-17-2015 03:21 PM
black hole attack in aodv protocol my3ram Linux - Wireless Networking 0 12-29-2011 08:29 PM
my domain is in a dns black hole or something... sneakyimp Linux - Server 2 01-26-2010 01:08 PM
LXer: All I Want For Christmas Is...To Be Sucked Into A Black Hole? LXer Syndicated Linux News 1 05-29-2009 03:12 AM
FC5, the memory black hole seimour Fedora 3 04-17-2006 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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