Error while implementing blackhole attack using patch created by Mohit P Tahiliani.Please help

313 views
Skip to first unread message

spoohebb

unread,
Aug 17, 2015, 2:18:35 AM8/17/15
to Network Simulator 2 (NS2)
Hi,

I am trying to implement blackhole attach using the patch given by Mohit P Tahiliani in NS2.35 using Ubuntu 10.04. I have followed exactly sane procedure given in the blog.
But I am getting following error. Please help. It is very urgent.


system@system-laptop:~/Dropbox/MTech_Project/final/helpfiles$ ns blackhole.tcl
num_nodes
is set 7
INITIALIZE THE LIST xListHead
ns
: _o107 hacker:
   
(_o107 cmd line 1)
    invoked
from within
"_o107 cmd hacker"
    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 "_o107" line 2)
   
(SplitObject unknown line 2)
    invoked
from within
"_o107 hacker"





knudfl

unread,
Aug 17, 2015, 7:06:43 AM8/17/15
to Network Simulator 2 (NS2)
Hi .

Your errors :  That's the output when a default executable 'ns' is used.
I.e. a stock ns with no changes added.
*  No "MohitTahiliani-blackholeaodv"  was compiled into the used 'ns'.

HOWTO MohitTahiliani-blackholeaodv, all 32bits Ubuntu versions ...
tar xvf ns-allinone-2.35_gcc482.tar.gz
https
://drive.google.com/file/d/0B7S255p3kFXNSGJCZ2YzUGJDVk0/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < blackhole-MohitTahiliani__ns235.patch
https
://drive.google.com/file/d/0B7S255p3kFXNcEdWSThNVTkzUkk/view?usp=sharing
./install
cd ns
-2.35/
cp ns  ns235
-Mohit
sudo cp  ns235
-Mohit  /usr/local/bin/

Simulation : 
ns235-Mohit  blackhole.tcl
...  then you will be sure the right 'ns' is used :  ns235-Mohit

-

spoorthi hebbar

unread,
Aug 17, 2015, 9:00:04 AM8/17/15
to ns-u...@googlegroups.com

Yea. Thanks a lot. This worked.

--
You received this message because you are subscribed to a topic in the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-users/BbfGOidWUSM/unsubscribe.
To unsubscribe from this group and all its topics, 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 http://groups.google.com/group/ns-users.
For more options, visit https://groups.google.com/d/optout.

Rachna Dodia

unread,
Mar 25, 2017, 4:01:43 AM3/25/17
to Network Simulator 2 (NS2)
does this only work with 32 bits ubuntu ?
because I am using 64 bits ubuntu.

knudfl

unread,
Mar 25, 2017, 7:07:25 AM3/25/17
to Network Simulator 2 (NS2)
@Rachna Dodia ,   Hi.

The "blackhole-MohitTahiliani" patch  (and the other blackhole patches) works perfect with a 64bits OS.
The above "32bits information" just means that two years ago I did the tests with a 32bits OS only.

 -

Soha

unread,
Sep 19, 2017, 4:43:05 PM9/19/17
to Network Simulator 2 (NS2)

Hi
I'm getting this error when implementing rushing attack please help me

Soha@ubuntu:~$ ns-rushing-attack rushingattack-1.tcl
num_nodes is set 25
INITIALIZE THE LIST xListHead
Can't read "EnablehierRt_": no such variable
(object set line 1)
invoked from within
"Simulator set EnablehierRt_"
(Procedure "_o14" line 10)
(Node attach line 10)
invoked from within
"$node attach $ragent [node set rtagent_port_]
(procedure "_o3" line 105)
(simulator create-wireless-node line 105)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 24)
(Simulator node line 24)
invoked from within
"$ns node"
invoked from within
"Set n0 [$ns node]"
(file "rushingattack-1.tcl" line 73)

knudfl

unread,
Sep 20, 2017, 6:26:06 AM9/20/17
to Network Simulator 2 (NS2)
@Soha ,   Hi.

Rushing attacks :
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 < rushing-attacks_ns235.patch
./install
cd ns
-2.35/
cp ns ns
-rushing-attack
sudo cp ns
-rushing-attack /usr/local/bin/

................... Simulation, still in ns-2.35/ .........
ns-rushing-attack rushingattacks-1.tcl
( Or : ./ns rushingattacks-1.tcl )
Dropped packets : awk -f droppackets.awk out.tr >> dropped-packets.xgr
xgraph dropped
-packets.xgr
rushingattacks-1.tcl

Soha

unread,
Sep 23, 2017, 8:48:25 AM9/23/17
to Network Simulator 2 (NS2)
Thanks a lot KnudfI

Soha

unread,
Oct 24, 2017, 5:45:53 PM10/24/17
to Network Simulator 2 (NS2)
Hi KnudfI
Ineed your halp
How can I add new table in aodv to store node ID and how can create blacklist I use ns2.35

knudfl

unread,
Oct 24, 2017, 7:32:18 PM10/24/17
to Network Simulator 2 (NS2)
@Soha ,  Hi.

"store node ID" :   Could that be "Display Routing Table of AODV" ?
https://www.google.com/webhp?hl=all&gws_rd=ssl#hl=en&q=ns2+print+list+of+nodes

"create blacklist" :  Do you mean blacklist a node ?   Maybe setting the node to sleep would do ?

---------------------------

Soha

unread,
Oct 25, 2017, 4:28:51 AM10/25/17
to Network Simulator 2 (NS2)
I want to implement this algorithm

ReceiveReply (Packet P)
replying node = Null
Reply_count= 0
initiate Route Discovery ()
Set time(RREP_WAIT_TIME)
Set Max_seq_No = 4294967295
While ( received _RREP)
{
IF Blacklist _table Contain( recived_RREP_nodeID)
{ discard RREP }
else {
IF ((Dest_Seq_No in RREP > node_Seq_No in source routing table) || (Dest_Seq_No in RREP =
node_source_Seq_No) && ( hop_count in RREP < node_hop_count in source routing table))
Add this RREP massage into RRT
Reply_count= Reply_count+1
}
IF ((Reply_count > 1) && (Dest_Seq_No in RREP < Max_Seq_No))
{
Update entry of P in routing table
Unicast data packets to the route specified in RREP
}
else {
Add this RREP massage into Blacklist _table
Remove this RREP massage from RRT
Broadcast_Alarm()
} }
// End of ReceiveRREP

monamr...@gmail.com

unread,
Apr 17, 2019, 2:42:02 PM4/17/19
to Network Simulator 2 (NS2)
i have the same error ,i applied the last statement but the error repeat again .... any help
Reply all
Reply to author
Forward
0 new messages