######### Added for blackholeAODV
set val(nn) 15
set val(nnaodv) 5
set val(brp) blackholeAODV
##########
.
.
###################################### Added for blackholeAODV
# $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\""
}
##################################################
num_nodes is set 20
Creating nodes...
INITIALIZE THE LIST xListHead
Loading random connection pattern...
cbr_(0) has been created over udp_(0)
udp_(0) and null_(0) agents has been connected each other
cbr_(1) has been created over udp_(1)
udp_(1) and null_(1) agents has been connected each other
cbr_(2) has been created over udp_(2)
udp_(2) and null_(2) agents has been connected each other
cbr_(3) has been created over udp_(3)
udp_(3) and null_(3) agents has been connected each other
cbr_(4) has been created over udp_(4)
udp_(4) and null_(4) agents has been connected each other
cbr_(5) has been created over udp_(5)
udp_(5) and null_(5) agents has been connected each other
cbr_(6) has been created over udp_(6)
udp_(6) and null_(6) agents has been connected each other
cbr_(7) has been created over udp_(7)
udp_(7) and null_(7) agents has been connected each other
cbr_(8) has been created over udp_(8)
udp_(8) and null_(8) agents has been connected each other
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
knudfl@88:~/8tmp/idsAODV$ ns235-blackh+idsaodv idsaodv2.tcl num_nodes is set 20
Creating nodes...
INITIALIZE THE LIST xListHead
Loading random connection pattern...
cbr_(0) has been created over udp_(0)
udp_(0) and null_(0) agents has been connected each other
cbr_(1) has been created over udp_(1)
udp_(1) and null_(1) agents has been connected each other
cbr_(2) has been created over udp_(2)
udp_(2) and null_(2) agents has been connected each other
cbr_(3) has been created over udp_(3)
udp_(3) and null_(3) agents has been connected each other
cbr_(4) has been created over udp_(4)
udp_(4) and null_(4) agents has been connected each other
cbr_(5) has been created over udp_(5)
udp_(5) and null_(5) agents has been connected each other
cbr_(6) has been created over udp_(6)
udp_(6) and null_(6) agents has been connected each other
cbr_(7) has been created over udp_(7)
udp_(7) and null_(7) agents has been connected each other
cbr_(8) has been created over udp_(8)
udp_(8) and null_(8) agents has been connected each other
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
# start with these lines :
set ns [new Simulator]
set nf [open out.nam w]
$ns namtrace-all $nf
proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec nam out.nam &
exit 0
}
#######################
#
# Write all other commands here.
#
#######################
# end with :
$ns at 5.0 "finish"
$ns run
--
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/oznEEorxqJE/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.
helloI am a final year B.Tech student.I am working on a project "Dectection of Malicious Nodes"While executing the blackholeaodv.tcl file i got the following error:"invalid command name "Agent/rtProto/blackholeAODV"
while executing
"Agent/rtProto/blackholeAODV instproc init args {
$self next $args
} "
(file "blackholeaodv.tcl" line 19)
"I am working on Ubuntu 14.04- 64bit and NS2 version is ns2.34I am attaching the blackholeaodv tcl file and patch that i have used.i got the same error in NS2.35 also. That's why i moved to version 2.34 thinking that the error might be because of the newer version.i also found an 'idsaodv' package from one of your posts... Please guide me what exactly i should do... and which version of ns2 I should use.or if you have some other tcl files of blackholeaodv and idsaodv that are without rtproto...please provide them..Please help....
Ubuntu 14.04 - 64bits : No issues here.
I guess you will have to start from scratch with a new unpacked ns-allinone-2.35_gcc482.tar.gz :
And repeat that as many times as it takes to get it right :
/home/name/a/ns-allinone-2.35/ >>> ns235-blackh+idsaodv2
/home/name/b/ns-allinone-2.35/ >>> ns235-blackh+idsaodv3
/home/name/c/ns-allinone-2.35/ >>> ns235-blackh+idsaodv4
/home/name/d/ns-allinone-2.35/ >>> ns235-blackh+idsaodv5
.... etc. etc.
Ubuntu 14.04 - 64bits :
knudfl@88:~/8tmp/idsAODV$ ns235-blackh+idsaodv idsaodv2.tcl num_nodes is set 20
Created are : Ids.nam 15.8MB, Ids.tr 22.3MB.
Testing other :
$ ns235-blackh+idsaodv atk3.tcl
$ ns235-blackh+idsaodv sim1forBlackHole_5.tcl
$ ns235-blackh+idsaodv test1-nadiui.tcl
.... No issues.
-
On Tuesday, March 31, 2015 at 1:02:34 PM UTC+2, Devkinandan gauttam wrote:Hello Kunudef, Thanx for your support . please you make a video example for how we add patch and how add balckhole node so it more easy to understand to every one. You start a you tube channel a person get easy help.
thanx
################# Added for blackholeAODV
set val(nn) 15
set val(nnaodv) 5
set val(brp) blackholeAODV
#####################################
##########################################
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\""
}
###########################################
And I want to ask another question.
For example I have 4 nodes and 1 of them is a blackole node. Node 1 transmits data to node 3 and node 2 is normal node. Even if I use blackholeAodv, are all packets transmitted successfully to node 3 from node 1. Assume that node 4(blackhole) is not in communication range.
set val(rp) idsAODV
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 < blackholeaodv2013-ns235_2.patch
https://drive.google.com/file/d/0B7S255p3kFXNMk1uX2N5VmtXeTA/view?usp=sharing
./install
--
--
Hello
Thank you
--
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/oznEEorxqJE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-users.
# exec nam sim1forBlackHole.nam &
Hi.
Got it right now.
If you still have the ns-2.35 patched with blackholeaodv2013-ns235_1.patch :
You can add idsAODV with "idsAODV-for-blackhole2013-patched_ns235.patch"
https://drive.google.com/file/d/0B7S255p3kFXNS2NrcVRETVVPYzg/view?usp=sharing
( Note : You can have as many ns-allinone-2.xx as you want, installed at the same time.
* But : Do never add any *PATH text to .bashrc ).
Else :
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 < blackholeaodv2013-ns235_1.patch
https://drive.google.com/file/d/0B7S255p3kFXNWWVDZzd2ZC14akE/view?usp=sharing
patch -p0 < idsAODV-for-blackhole2013-patched_ns235.patch
./install
cd ns-2.35/
cp ns ns235-blackhole+idsaodv
sudo cp ns235-blackhole+idsaodv /usr/local/bin/
Simulation : $ ns235-blackhole+idsaodv idsaodv2.tcl
... The files Ids.tr 22.3MB and Ids.nam 15.8MB are created.
-
On Sunday, March 29, 2015 at 10:30:18 PM UTC+2, knudfl wrote:Hi .
You cannot execute a file.tcl, but you can run it with an interpreter.
The ns2 interpreter is 'ns' : $ ns blackhole-simulation.tcl
( Or : $ ns-blackhole blackhole-simulation.tcl )
Tcl files are text files.
Please read "blackholeaodv.tcl" to know that it isn't a simulation file.
"blackholeaodv.tcl" is a configuration file. But no known examples are using it.
-
About "idsAODV" : I did a build last year, but some code may be missing :
$ ns-idsAODV idsaodv2.tcl
num_nodes is set 20
Creating nodes...
Wrong node routing agent!
-
About `blackholeaodv' examples : Easy to add "blackhole" to a random simulation file :
Please see the example `aodv-Xgr_blackhole.tcl' in xgraph_ns2-files-tcl_03.2015.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNeC1SZDdERmRPSm8/view?usp=sharing
######### Added for blackholeAODV
set val(nn) 15
set val(nnaodv) 5
set val(brp) blackholeAODV
##########
.
.
###################################### Added for blackholeAODV
# $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\""
}
##################################################
-
idsaodv/idsaodv.o idsaodv/idsaodv_logs.o \
idsaodv/idsaodv_rqueue.o idsaodv/idsaodv_rtable.o \
$ perl throughput-9.pl ../bhatk.tr 0 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 1 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 2 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 3 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 4 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 5 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 6 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 7 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 8 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 9 2
-t 0
$ perl throughput-9.pl ../bhatk.tr 10 2
-t 0
$ perl throughput.pl ../bhatk.tr 0 2
Average Throughput was: -7630000000
$ perl throughput.pl ../bhatk.tr 1 2
Average Throughput was: -7630000000
$ perl throughput.pl ../bhatk.tr 3 2
Average Throughput was: 0
$ perl throughput.pl ../bhatk.tr 4 2
Average Throughput was: 0
$ perl throughput.pl ../bhatk.tr 5 2
Average Throughput was: 0
$ perl throughput.pl ../bhatk.tr 6 2
Average Throughput was: 0
$ perl throughput.pl ../bhatk.tr 7 2
Average Throughput was: 0
$ perl throughput.pl ../bhatk.tr 8 2
Average Throughput was: 0
$ perl throughput.pl ../bhatk.tr 9 2
Average Throughput was: 0
$ perl throughput.pl ../bhatk.tr 10 2
Average Throughput was: -7630000000
$ awk -f Avg_Tput.awk ../bhatk.tr
startTime: 0
stopTime: 19
receivedPkts: 763
avgTput[kbps]: 163.475
$ awk -f Instnt_Tput.awk ../bhatk.tr
7 ######### Added for blackholeAODV
8 set val(nn) 15
9 set val(nnaodv) 5
10 set val(brp) blackholeAODV
11 ##########
.
.
40 ###################################### Added for blackholeAODV
41
42 # $ns_ node-config -adhocRouting $val(brp)
43 for {set i $val(nnaodv) } {$i<$val(nn) } {incr i} {
44 set node_($i) [$ns node]
45 $node_($i) random-motion 0;
46 $ns at 0.01 "$node_($i) label \"blackhole node\""
47 }
48 ##################################################
Dear Amit sinha can i have your email address
--
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/oznEEorxqJE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-users+u...@googlegroups.com.