Hello Knudfl sir

141 views
Skip to first unread message

Rakesh Patel

unread,
May 23, 2019, 2:03:56 PM5/23/19
to Network Simulator 2 (NS2)
Here sir when I run the code.tcl file only four CHs are created.
And only the CH3 communicate continuously to BS.
Here I am using NS2.28 in Cygwin on Windows 10.

Sir, please solve this issue ASAP.

Sir, please do it.

code.tcl

knudfl

unread,
May 23, 2019, 4:16:05 PM5/23/19
to Network Simulator 2 (NS2)
I have no idea.
Leach : I've only run the one and only simulation with the MIT Leach.
And the 3? examples in the Mannasim Leach.
( You never responded to my posts asking you to specify Leach version.)

.... How the file works and why is beyond my knowledge.

Note : code.tcl is a generic name. Always use a new unique name foe a new file.

code.tcl, line 58 :  $ns_ node-config -adhocRouting DSR \
I.e. the file is not "LEACH", but dsr.  Seems to run equally well with ....
$ ns235-64-orig code.tcl          // stock ns2. No changes, no patches

$ ns235
-mannasim-64 code.tcl     // Mannasim executable
$ ns235
-leach-64 code.tcl       // MIT Leach executable
$ ns234
-leach code.tcl            // Ubuntu 10.04 MIT Leach executable
         
// etc. etc.

My best advice is to compare with other non Leach "cluster examples"

Rakesh Patel

unread,
May 24, 2019, 1:12:19 AM5/24/19
to Network Simulator 2 (NS2)
Sir, can I directly apply the Watchdog mechanism in LEACH protocol.
Means without the support DSR or AODV routing protocol.

Rakesh Patel

unread,
May 24, 2019, 3:49:19 AM5/24/19
to Network Simulator 2 (NS2)
hello, sir just tell about that file.

is it works work with trust or not?



On Friday, May 24, 2019 at 1:46:05 AM UTC+5:30, knudfl wrote:

knudfl

unread,
May 24, 2019, 5:47:54 AM5/24/19
to Network Simulator 2 (NS2)
Hi.

You can test against / compare with the file "team-routing-2.tcl", which is a rare example of "included Trust"
→  { team-routing-2.tcl, Trust, neighbor }.

Other "Trust examples" :  See `ex-trust.txt´  →  attached.
Found with
$ cd 000-All-examples-5/
$ grep
-ni trust * > /home/knudfl/Desktop/ex-trust.txt
→ Package with ~3500 simulations →
ex-trust.txt

Rakesh Patel

unread,
May 30, 2019, 1:11:02 AM5/30/19
to Network Simulator 2 (NS2)
Hello sir

I think in that file, the DSR protocol running with LEACH.
Am I right sir?
Sir, please reply to me.



On Friday, May 24, 2019 at 1:46:05 AM UTC+5:30, knudfl wrote:

knudfl

unread,
May 30, 2019, 4:59:49 AM5/30/19
to Network Simulator 2 (NS2)
Hi.

»» ... in that file, the DSR protocol running with LEACH «« :

Well. just try for yourself  the following, in two different directories ...

1.    $ ns-orig code.tcl
2.    $ ns-leach code.tcl
...  and compare the results.



ns2-INFO.txt

Rakesh Patel

unread,
May 30, 2019, 6:55:13 AM5/30/19
to Network Simulator 2 (NS2)
Sir, is there any way to make this work unique in the sense of WSN security?
Here in .tcl file, I have applied the watchdog method for the detection of sinkhole attack.
So how can I improve this work?
Please suggest me or edit this file if possible Knudfl sir.

Rakesh Patel

unread,
Jun 1, 2019, 1:00:46 AM6/1/19
to Network Simulator 2 (NS2)
Hello sir your reply will be appreciated.
So, please sir give me your view on my query.

Rakesh Patel

unread,
Jun 5, 2019, 2:20:58 PM6/5/19
to Network Simulator 2 (NS2)
Sir, here I am unable to find the comments at the bottom of NAM.
Like when any node is detected as a malicious node then I want a comment at the bottom of NAM.
How can I do this?
Please help me sir.



On Thursday, May 30, 2019 at 2:29:49 PM UTC+5:30, knudfl wrote:

knudfl

unread,
Jun 5, 2019, 4:39:11 PM6/5/19
to Network Simulator 2 (NS2)
»» unable to find the comments at the bottom of NAM «« :
....  You should see what you wrote in the "simulation.tcl".

Example ...
S-second.tcl:147:$ns at 2.1 "$ns trace-annotate \"Attacker 2 and 6 forms wormhole\""

Plenty of "trace-annotate" examples →  all_tcl-examples-5.tar.xz  →  000-All-examples-5/
A list with all "trace-annotate" lines is attached.
trace-annotate.txt

knudfl

unread,
Jun 5, 2019, 4:54:26 PM6/5/19
to Network Simulator 2 (NS2)

Rakesh Patel

unread,
Jun 6, 2019, 4:48:09 AM6/6/19
to Network Simulator 2 (NS2)
Sir when I add line in my tcl script then an error occured like..

"$ns at 1.9 "$ns trace-annotate \"Time: 1.1025 Pkt Transfer Path thru node_(1)..\"""
    ("for" body line 4)
    invoked from within
"for { set i 71 } { $i <=100 } {  incr i } { 
                set xe [expr int($sq6*$sq7*$i)/4.0] ;
                puts $DelayAnalysisProposed "$i\t $xe" 
$ns at 1.9 "$ns trace-a..."
    (file "main.tcl" line 570)

Sir please can you add a single line to annotate the Attack when running the tcl file.
After that, I attach myself.
Sir, it will be very helpful to me.

Rakesh Patel

unread,
Jun 6, 2019, 4:20:27 PM6/6/19
to Network Simulator 2 (NS2)

Sir, the error which I have received after adding the tcl file is shown in PNG file.
Sir, please consider it.
The main file I have also attached.
Capture.PNG
main.tcl

knudfl

unread,
Jun 6, 2019, 6:43:21 PM6/6/19
to Network Simulator 2 (NS2)
Wrong is         $ns at 1.0 "$ns trace-annotate \"**************.\""

Right is
$ns_ at 1.0 "$ns_ trace-annotate \"**************.\""

I.e. you have set "ns" to  ns_  not ns !                        ( set ns_ [new Simulator] )

semagn shifere

unread,
Jun 7, 2019, 2:25:49 AM6/7/19
to ns-u...@googlegroups.com
hi, gays thanks for your response but i want sink hole attack in wsn for isolation and detection.


--
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 post to this group, send email to ns-u...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/0bcc2ac0-4189-43f8-bb54-223727ae3f1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rakesh Patel

unread,
Jun 7, 2019, 1:28:29 PM6/7/19
to Network Simulator 2 (NS2)
sir is there ways to get the logs of the simulation where the all the details such as timestamp, node id, data size, signal strength etc. can be obtained for a given simulation in a single file.
If possible please send to me the function to the regarding .tcl file.
Reply me please sir.

Rakesh Patel

unread,
Jun 10, 2019, 2:18:14 AM6/10/19
to Network Simulator 2 (NS2)
Hello sir according to my query, is it possible?

Sir. please reply to me.
Reply all
Reply to author
Forward
0 new messages