Error in idsaodv

66 views
Skip to first unread message

vibha oberoi

unread,
Jun 7, 2020, 3:36:24 PM6/7/20
to ns-u...@googlegroups.com
Dear All,
I have patched idsaodv successfully but while running I am facing the following error:

vibha@vibha:~/Downloads/ex_idsAODV-05.17/Untitled Folder$ ns idsaodv2.tcl
num_nodes is set 20
Creating nodes...

    (_o15 cmd line 1)
    invoked from within
"_o15 cmd addr"
    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 "_o15" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o15 addr"
    ("eval" body line 1)
    invoked from within
"eval $node addr $args"
    ("default" arm line 2)
    invoked from within
"switch -exact $routingAgent_ {
ZRP  {
set ragent [$self create-zrp-agent $node]
}
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at..."
    (procedure "_o3" line 14)
    (Simulator create-wireless-node line 14)
    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 0} {$i < $val(nnaodv)} {incr i} {
      set node_($i) [$ns_ node]
      $node_($i) random-motion 0    ;#disable random motion
      }"
    (file "idsaodv2.tcl" line 54)




Thanks & Regards
Vibha Oberoi
idsaodv2.tcl

knudfl

unread,
Jun 7, 2020, 6:54:38 PM6/7/20
to Network Simulator 2 (NS2)
Hi.

Looks like you are using a copy of 'ns' with no  "blackhole + idsAODV".
My command example is :
$ ns235-blackhole-idsaodv idsaodv2.tcl  →  no errors.

Suggest :  Set up a new ns-allinone-2.35 in a new folder.
You can have as many ns-allinone-2.xx as you want, installed at the same time

Build example, ns-2.35 + "blackhole + idsAODV"
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 < blackholeaodv2013-ns235_1.patch
https://drive.google.com/file/d/0B7S255p3kFXNWWVDZzd2ZC14akE/view?usp=sharing
patch -p0 < idsAODV-2-for-blackhole2013-patched_ns235.patch
https://drive.google.com/file/d/0B7S255p3kFXNT0FjUTBTR21sMzg/view?usp=sharing
./install
cd ns-2.35/
cp ns ns235-blackhole+idsaodv
sudo cp ns235-blackhole+idsaodv /usr/local/bin/

------------- Simulation ----------
ns235-blackhole+idsaodv idsaodv2.tcl
-------------------------------------------------------------------------------------

vibha oberoi

unread,
Jun 8, 2020, 3:40:51 PM6/8/20
to ns-u...@googlegroups.com
Dear Sir/Mam,
                         Greetings of the day!
I am using blackholeaodv2013 patch.When I am executing my blackhole script and in the start when time 0 second (time) the results are coming fine
# $ns_  node-config  -adhocRouting $val(brp)
for {set i $val(nnaodv) } {$i<$val(nn) } {incr i} {
     set node_($i) [$ns_ node]
     $node_($i) random-motion 0;
     $ns_ at 0.01 "$node_($i) label \"blackhole node\""
}

vibha@vibha:~/Videos/ex-2005-2013__05.17/test/blackhole$ awk -f analysis.awk black.tr
No_of_Packets_Sent: 1994
No_of_Packets_Received: 1
Packet_Delivery_Ratio: 0.05 %
Control_Overhead: 411
Normalized_Routing_Overhead: 41100.00 %
Delay: 0.00 Seconds
Throughput: 0.00 Kbps
Packet_Dropping_Ratio: 99.95 %


but on increase of time to 50s the results are not coming appropriately.
# $ns_  node-config  -adhocRouting $val(brp)
for {set i $val(nnaodv) } {$i<$val(nn) } {incr i} {
     set node_($i) [$ns_ node]
     $node_($i) random-motion 0;
     $ns_ at 50 "$node_($i) label \"blackhole node\""
}




Thanks& Regards
Vibha Oberoi

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/f653b818-87d0-470a-aac4-e281964e1b7co%40googlegroups.com.


--
Dear Sir/Mam,
                         Greetings of the day!





Thanks& Regards
Vibha Oberoi

knudfl

unread,
Jun 10, 2020, 12:58:39 PM6/10/20
to Network Simulator 2 (NS2)
Hi.

1. Your "blackholeAODV script" is missing : No "black.tr" with the default examples

2. No_of_Packets_Sent: 1994 .... No_of_Packets_Received: 1 : Is not a good result.
? In which way can it get even worse , with an increased time ? ?

A typical result :
$ awk -f analysis-technoclass.awk BlackHole20.tr
No_of_Packets_Sent:             9873
No_of_Packets_Received:         9870
Packet_Delivery_Ratio:          99.97 %
Control_Overhead:               299
Normalized_Routing_Overhead:    3.03 %
Delay:                          0.08 Seconds
Throughput:                     93.57 Kbps
Packet_Dropping_Ratio:          0.03 %

.... What is "analysis.awk" ?
                        Please attach your unknown simulation / analysis.awk to a new post.

To unsubscribe from this group and stop receiving emails from it, send an email to ns-u...@googlegroups.com.

vibha oberoi

unread,
Jun 11, 2020, 4:47:04 AM6/11/20
to ns-u...@googlegroups.com
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/33e7dfe9-3a42-47a3-8265-a8b57cfb365co%40googlegroups.com.


--
Dear Sir/Mam,
                         Greetings of the day!

For both tcl script i.e. with and without blackhole attack during my analysis no change in results is observed.Please find the attachments for the necessary file.





Thanks& Regards
Vibha Oberoi
analysis.awk
withoutattack.tcl
mob20
withblackhole.tcl

Hitesh Sharma

unread,
Jun 11, 2020, 5:05:21 AM6/11/20
to Network Simulator 2 (NS2)
Sir ,

Black hole Attack should drop all the data packet. This will result in Maximum Packet Dropping Ratio and Minimum Packet Delivery Ratio.


As per the results posted by you for blackhole attack , It seems that attack is not working in the network.

To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/33e7dfe9-3a42-47a3-8265-a8b57cfb365co%40googlegroups.com.

knudfl

unread,
Jun 11, 2020, 6:58:49 AM6/11/20
to Network Simulator 2 (NS2)
@vibha oberoi ,  Hi.

OK, the maximum simulation time is set to 451.
But when the simulation lasts only 3 -5 seconds, you cannot set blackhole appearance to 50.

Some more complex movement (and maybe traffic) is required to increase the simulation time.
I added
source flowmod-urban-malaga-S10.tcl
source MovementNs2
....... to your file, to increase the simulation time, see 5-oberoi-aodvblackhole.tcl, attached.
The "traffic-flow / mobility" files are from the Vanet examples ....

( The simulation time is then about 3 minutes.)
5-oberoi-aodvblackhole.tcl
MovementNs2
flowmod-urban-malaga-S10.tcl

knudfl

unread,
Jun 11, 2020, 7:08:36 AM6/11/20
to Network Simulator 2 (NS2)
@Hitesh Sharma ,   HI.

Thank you for correcting me.
..... Nice to know that the "blackhole addition" actually works.

Hitesh Sharma

unread,
Jun 12, 2020, 4:50:42 AM6/12/20
to Network Simulator 2 (NS2)
Sir ,

Black hole attack patch is not give desire results as per its behaviour.

I request you to compare the result for a simulation of AODV without attack .

Then with using attack script.

To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/f2087138-895e-46b2-8488-865b353d77a6o%40googlegroups.com.

Hitesh Sharma

unread,
Jun 13, 2020, 1:30:35 PM6/13/20
to Network Simulator 2 (NS2), knu...@ofir.dk
Sir @knu...@ofir.dk  , 

How to patch 
blackholeaodv2005-ns235-patch.tar.gz   in ns2
Regards,
Hitesh Sharma,
Student,
ME - Mobile Communication and Network Technology,
GTU School of Engineeing and Technology,
Gandhinagar.


Please visit  :






To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/33e7dfe9-3a42-47a3-8265-a8b57cfb365co%40googlegroups.com.
blackholeaodv2005-ns235-patch.tar.gz

knudfl

unread,
Jun 13, 2020, 3:04:45 PM6/13/20
to Network Simulator 2 (NS2)
@Hitesh Sharma ,   Hi.


blackholeaodv2005-ns235-patch.tar.gz : Is an old "patch".

A tar package contains the modified files. Unpack, and see for yourself ...
$ tar xvf blackholeaodv2005-ns235-patch.tar.gz  >>>> "ns-2.35/".
Using :
$ cd ns-allinone-2.35/
$ tar xvf blackholeaodv2005-ns235-patch.tar.gz

Hitesh Sharma

unread,
Jun 13, 2020, 3:18:07 PM6/13/20
to Network Simulator 2 (NS2)
Sir,

I have tried and implemented blackhole patch file but

The problem is the result of blackhole aodv as same as the result of aodv.


This is not correct.

The result should be varrying

--
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.
Reply all
Reply to author
Forward
0 new messages