rushing attack in aomdv

183 views
Skip to first unread message

ayyu tiya

unread,
Nov 23, 2019, 2:49:57 AM11/23/19
to Network Simulator 2 (NS2)

  Hello everyone
thanks a lot KNUDFI FOR your helps!!!!!
Also for posting source code rushing attack and tcl sceniaro

I modify AOMDV.CC & AOMDV.h  to implement rushing attack in AOMDV routing protocol

in this case I got  error  when I run 1aomdv2-last.tcl

error is
Scheduler: Event UID not valid!

 can somebody help me !!!

knudfl

unread,
Nov 23, 2019, 6:56:27 AM11/23/19
to Network Simulator 2 (NS2)
Hi.



Build example
sudo apt install g++-4.8
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 < AOMDV-rushingattacks-2_ns235.patch
export CC=gcc-4.8 CXX=g++-4.8 && ./install
            # old OS:  ./install
cd ns-2.35/
cp ns ns235-aomdv-rushingattacks
sudo cp ns235-aomdv-rushingattacks /usr/local/bin/
         #  simulation  #
ns235-aomdv-rushingattacks 1aomdv2-last.tcl
----------------------------------------

My tests :

$ ns235-aomdv-rushingattacks-64 1aomdv2-last.tcl
num_nodes is set 20
INITIALIZE THE LIST xListHead
Starting Simulation........
Malicious node is 5
 enter sendRequest 8
 enter sendRequest 8
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
 enter sendRequest 8
.

$ ns235-aomdv-rushingattacks-64 aomdv1-rushingattacks-1.tcl
num_nodes is set 25
INITIALIZE THE LIST xListHead
Malicious node is 5
 enter sendRequest 8
 enter sendRequest 8
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
 enter sendRequest 8
.
------------------------------
  • Suggest : 
  • Setup another ns-allinone-2.35_gcc5.tar.gz in a new directory, and start from scratch.
---

knudfl

unread,
Nov 23, 2019, 7:00:23 AM11/23/19
to Network Simulator 2 (NS2)
Note :  Please always specify your OS  when asking a question :
OS name and version :   $ cat /etc/issue
Architecture :                    $ uname -m



On Saturday, November 23, 2019 at 8:49:57 AM UTC+1, ayyu tiya wrote:

sony pratama

unread,
Jun 17, 2020, 1:06:30 AM6/17/20
to ns-u...@googlegroups.com
Sir, I'm sorry I need help changing the speed of the Aomdv rushing attack
can you help me, sir

--
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/e297d577-1818-487f-a801-caf3877776b5%40googlegroups.com.
aomdv2.tcl

Tejoprapulla

unread,
Nov 30, 2022, 5:44:56 AM11/30/22
to Network Simulator 2 (NS2)
hello @knudfl sir
my os version is 20.04
 I'm getting error while executing these commands
export CC=gcc-4.8 CXX=g++-4.8 && ./install
cp ns ns235-aomdv-rushingattacks
sudo cp ns235-aomdv-rushingattacks /usr/local/bin/


knudfl

unread,
Nov 30, 2022, 9:11:58 AM11/30/22
to Network Simulator 2 (NS2)
→  tejopra...

Please see the above answer of  Nov 23, 2019 :     Still works perfect ....

You will of course have to install the ns2 "build requires" :
Add this to /etc/apt/sources.list          ... to get g++-4.8 :
deb [url] bionic main
deb [url] bionic universe

sudo apt update && sudo apt install g++ g++-4.8 autoconf libtool libxmu-dev
Message has been deleted

Tejoprapulla

unread,
Dec 1, 2022, 2:28:03 AM12/1/22
to Network Simulator 2 (NS2)
Hello @knudfl Sir 
I have added the code in /etc/apt/sources.list, but still getting so many errors 
and I'm trying to install these from 10 days and very confused with these NS2
 I'm unable to understand that could you please make a video tutorial on this topic  " Rushing attack in AOMDV and its prevention". With all the required files attached in a single message,
It will be helpful for all who are trying to do work on this..
Please Sir its my kind request..

knudfl

unread,
Dec 1, 2022, 5:32:53 AM12/1/22
to Network Simulator 2 (NS2)
→  tejopra...

1.  Important note :
Conditions for ns2 → A 'Linux OS' installed to a hard disk partition.
Both VirtualBox and wmWare have resulted in poor unusable 'ns' executable since 2017.

2.  You can have as many ns-allinone-2.xx as you want, installed at the same time.
Example
/home/name/ns2/[new-1]/ns-allinone-2.35/
/home/name/ns2/[new-2]/ns-allinone-2.35/
/home/name/ns2/[new-3]/ns-allinone-2.35/
/home/name/ns2/[new-4]/ns-allinone-2.35/
.
Etc. etc.
...... In your situation, it's required to unpack a new ns-allinone-2.35_gcc5.tar.gz to a new directory every time you fail.
I.e. a wrecked build cannot necessarily be reused.
Trouble shooting :     Errors must be shown ....   if you want an answer with a solution.

I don't do videos.
And :   There is no ns2 aomdv "prevention" method known to me. There is idsAODV_ns235.patch, etc idsAODV** :
(  $ patch -p0 < idsAODV_ns235.patch  )
...... which may be edited to do "ids AOMDV" ?

P.S.:  No issues,  Ubuntu 20.04
$ ns235-aomdv-rushingattacks aomdv1-rushingattacks-1.tcl
Files out.nam 9.4MB, out.tr 8.2MB, Intermediate.txt 373kB,  recvrequest 79kB, sendrequest 1.1kB are created.

Tejoprapulla

unread,
Dec 6, 2022, 3:38:03 AM12/6/22
to Network Simulator 2 (NS2)
Hello @knudfl Sir

As you said installed Ubuntu (20.04.5 LTS) in separate hard disk partition.

The following errors I got while executing are

for "sudo apt install g++-4.8"

Package g++-4.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'g++-4.8' has no installation candidate

For "export CC=gcc-4.8 CXX=g++-4.8 && ./install"

============================================================
* Testing for Darwin (OS X) environment
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
============================================================
* Testing for Cygwin environment
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Testing for FreeBSD environment
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
FreeBSD not detected
============================================================
* Build XGraph-12.2
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
configure: error: expected an absolute directory name for --prefix: ..
./install: 291: make: not found
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
Making cweb
./install: 317: make: not found
cweb failed to make, but it's optional
chmod: cannot access 'cweave': No such file or directory
chmod: cannot access 'ctangle': No such file or directory
============================================================
* Build Stanford GraphBase
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
Making sgb
./install: 349: make: not found
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
============================================================
* Build zlib
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
Building static library libz.a version 1.2.3 with gcc-4.8.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
./install: 412: make: not found
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.5.10
* Modified By Paul Shaiju (Paul S)
* Email-id : pau...@gmail.com
* Website : http://paultsr.in
============================================================
./install: 440: autoconf: not found
configure: WARNING: unrecognized options: --enable-gcc
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc-4.8
checking whether the C compiler works... no

For "cp ns ns235-AOMDV-rushingattacks"

cp: cannot stat 'ns': No such file or directorycp: cannot stat 'ns': No such file or directory

knudfl

unread,
Dec 6, 2022, 5:42:03 AM12/6/22
to Network Simulator 2 (NS2)
←  tejopra...       Missing make, autoconf, g++-4.8, gcc-4.8 !

Repeat !

You will of course have to install the ns2 "build requires" :
Add this to /etc/apt/sources.list          ... to get g++-4.8 :
deb [url] bionic main universe

sudo apt update && sudo apt install g++ g++-4.8 make autoconf libtool libxmu-dev
-----------------------

Example "add line to /etc/apt/sources.list"
gedit /etc/apt/sources.list
deb http://de.archive.ubuntu.com/ubuntu bionic main universe

 and do
sudo apt update && sudo apt install g++ g++-4.8 make autoconf libtool libxmu-dev

P.S.:  No issues,  Ubuntu 20.04
$ ns235-aomdv-rushingattacks aomdv1-rushingattacks-1.tcl
Files out.nam 9.4MB, out.tr 8.2MB, Intermediate.txt 373kB,  recvrequest 79kB, sendrequest 1.1kB are created.
ad a new install of Ubuntu 20.04, and tested all the above OK ....

Ref. previous answer " P.S.:  No issues,  Ubuntu 20.04
$ ns235-aomdv-rushingattacks aomdv1-rushingattacks-1.tcl
Files out.nam 9.4MB, out.tr 8.2MB, Intermediate.txt 373kB,  recvrequest 79kB, sendrequest 1.1kB are created. "

Ath-Thoriq Muttaqin

unread,
Feb 8, 2023, 10:44:39 PM2/8/23
to Network Simulator 2 (NS2)
Sir i got this issues when i try to run ns tcl file, any solution pls ? thanks

num_nodes is set 8
INITIALIZE THE LIST xListHead
ns: _o83 rushing1:
    (_o83 cmd line 1)
    invoked from within
"_o83 cmd rushing1"
    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 "_o83" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o83 rushing1"

knudfl

unread,
Feb 9, 2023, 1:31:08 AM2/9/23
to Network Simulator 2 (NS2)
?    "ns tcl file.tcl"  ? :       Your exact command is missing.

Please read all the above posts / answers.
A command can be  e.g.       $ ns235-aomdv-rushingattacks aomdv1-rushingattacks-1.tcl 
.......... not    $ ns file.tcl   !!!!
Message has been deleted

Ath-Thoriq Muttaqin

unread,
Feb 9, 2023, 2:11:36 AM2/9/23
to Network Simulator 2 (NS2)

it's work! thanks a lot sir !!

but i got new issues :(

num_nodes is set 8
INITIALIZE THE LIST xListHead
Malicious node is 2

 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
 enter sendRequest 8
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
MAC_802_11: accessing MAC cache_ array out of range (src 13, dst 0, size 8)!
MAC_802_11: accessing MAC cache_ array out of range (src 12, dst 1, size 8)!

Scheduler: Event UID not valid!

The "Scheduler: Event UID not valid!" is the issues, how can i fix it sir? thkans a lot!

knudfl

unread,
Feb 9, 2023, 7:39:45 AM2/9/23
to Network Simulator 2 (NS2)
@ athth...

"....MAC cache_ array out of range..."
Not quite an unusual error.
Troubleshooting : 
Attach / upload the file.tcl ,,, and please specify OS, like 64bit Ubuntu 18.04

Rizki Asriyanda

unread,
Feb 10, 2023, 10:34:45 AM2/10/23
to Network Simulator 2 (NS2)
Hello sir, may i get the patch file for simulating Greyhole Attack with AOMDV Protocol?
Reply all
Reply to author
Forward
0 new messages