Search This Blog

AWK Script for NS2

Labels: , , , ,

AWK is a programming language that is designed for processing text-based data, either in files or data streams, and was created at Bell Labs in the 1970s. The name AWK is derived from the family names of its authors - Alfred Aho, Peter Weinberger and Brian Kernighan.

"AWK is a language for processing files of text. A file is treated as a sequence of records, and by default each line is a record. Each line is broken up into a sequence of fields, so we can think of the first word in a line as the first field, the second word as the second field, and so on. An AWK program is of a sequence of pattern-action statements. AWK reads the input a line at a time. A line is scanned for each pattern in the program, and for each pattern that matches, the associated action is executed." - Alfred V. Aho

 - - - From Wikipedia, the free encyclopedia. 

Links to AWK scripts for NS2 are given below:

AWK script for throughput – Download! (Click again if it doesnt work first time :) )

AWK script for jitter – Download!

AWK script for pdf (packet delivery fraction) – Download!

[Latest Update] You can also check our latest Automated Post Processing (APP) Tool which works based on AWK Scripts and automatically plots graphs. APP contains a set of 20 AWK Scripts which, if required, can be used outside APP also.

Comments (358)

«Oldest   ‹Older   201 – 358 of 358   Newer›   Newest»

hi,we are trying to implement a new protocol in ns2.so, we need codes for clustering and also cluster head selection....kindly help us as we are not getting it.... we are final yr students and we want to finish our project asap so kindly proceed our request...
thanks in advance.

helo mohit :
i am a PG scholar at NIT srinagar-india, doing my project on MOBILITY SUPPORTING SCHEMES (MIPV6, HMIPV6, FMIPV6 ,FHMIPV6 and PMIPV6) and i am using ns-2.33. please suggest me how to simulate these schemes. can i get the help to write the code. please suggest.

------------
Riaz khan

thinks a lot Mr Mohit :)

hey mohit ......i jus wna knw hw 2 plot a graph in ns2 using .tr file....hlp me plz its urgent.......

Hello Sir,
totalpacket sent awk script gives output as 0 always.

What is the problem in that. I am using totalpacketsent.awk script for that and I am using it on new trace file format.
Thanking you.

goodmorning sir im doing my project on performance evaluation of TCP variants(RENO,VEGAS,NJplus)over AODV,DSDV..plz help me i hve install ns2.34 on red hat but its tcl file is not working,im giving the command ns test.tcl its not working plz help me ........can it is possible to do in REDHAT

@Harpreet - Trace format of wired-cum-wireless is different since part of trace appears in wired format and rest in wireless. Hence it is better to modify the pdf.awk accordingly.

@Ram - Check for some typos in your script.

@Divs - Install LEACH patch on ns-2.27 and use the sample TCL Scripts therein for clustering.

@Riaz - You can get most of the information about IPv6 simulation in ns-2 on the following link:

http://brc.nitk.ac.in/?IPv6_Mobility-NS2

@Hello - See the following link:

http://mohittahiliani.blogspot.in/2010/08/xgraph-and-awk-scripts-in-ns-2_06.html

@Nishidh - totalpacketsent is designed for a specific topology and will not work on other topologies. Make changes in it as per your topology and re-run. Moreover column numbers in new trace format are different than the ones in old trace format. So you need to use the new column numbers in the script.

@Sourabh - Go in

ns-allinone-2.34/ns-2.34 and give the following command

make install

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello Sir,

I'm looking for an example oh AWK script to determinate node energy in NS2. I see that you have published lot of example on megaupload , but us you know MegaUpload is now blocked. So can you sir re Upload these files and give me the new link ?
Thank you Sir in advance, and I'm waiting for your reply.

sir .i have the m-parameters .awk file for cbr traffic.how can i use this same file for tcp traffic .please tell me sir as soon as possible.i have some error like division by zero aatempted.how can i solve this problem..plz reply me fast..

thank you sir
shalu khandelwal
shalu.khandelwal31@gmail.com

Hi mohit

i am trying to find out link utilization between two nodes, in wirless , both r static nodes , whereas 0 is receving 2 is sending and it back off is resetting , i want to see how much impact it is putting on link

need help

BEGIN {
recvdSize = 0
startTime = 400
stopTime = 0
}

{
event = $1
time = $2
node_source = $3
node_des = $4
pkt_size = $8
level = $4

# Store start time
if (level == "AGT" && event == "s" && node_source == 2) {
if (time < startTime) {
startTime = time
}
}

# Update total received packets' size and store packets arrival time
if (level == "AGT" && event == "r" && node_des == 0 ) {
if (time > stopTime) {
stopTime = time
}
# Rip off the header
hdr_size = pkt_size % 512
pkt_size -= hdr_size
# Store received packet's size
recvdSize += pkt_size
}
}

END {
printf("Average Throughput[kbps] = %.2f\t\t StartTime=%.2f\tStopTime=%.2f\n",(recvdSize/(stopTime-startTime))*(8/1000),startTime,stopTime)
}

hi Mohit


this is used for average what abut if we interested on single link. one to one,

i have done that but i am getting same results

if (level == "AGT" && node_id = "_2_" && type == "cbr" && event == "s" && pkt_size >= 512 )

regards

K

hi Mohit,
I am trying to make a new type of node for my project work. options are like can abstract from class Node in ns2 or class MobileNode. This node will only have mobility and no other method associated. The type of mobility to be given can be changed later,i.e. mobility model can be varied. It will be a WSN scenario and i am using mannasim for that. To start with,i am using only one cluster with a cluster head. The nodes in cluster should be able to detect the movement of the new type of node created and report its instantaneous location to cluster head.
My first problem is obviously how to create this new node? And then, how to sense its motion?
Regards.

Hi Mohit,
I have the following scenario

wireless network consists of 1 access point and 9 nodes. all nodes communicates with each other through access point.

In this network i need to find channel busy time=medium busy time/cycle time

In ns2 i don't know to find channel busy time, can you please provide awk script to find channel busy time for both old and new trace file format. Kindly help me

Thank You

Sir, actually routing overhead = routing packets/ total packets send. how to find routing overhead in a manet in ns2. or routing packets.

Sir, I have to find routing overhead in manet in ns2. I know routing overhead = routing packets/total packets. I am able to find total packets but not able to get routing packets. Kindly help in finding routing packets.
Thanking you. shakeel

Hello sir
i am doing handover between umts-wimax and wlan-wimax i need to find handover lantency, throughput and end to end delay, please help me as soon as possible.

hi sir we all very thankful for your great help in our research
sir am working on handover in mobile wimax and i have the default script provided by the wimax patch for ns-2.31 "handover.tcl"

and i can run the example but i cant analysis the tracefile , i dont have any analysis too or awk script ,
sir can you help me anaysis it to get the handover delay time ???

s -t 0.000339577 -Hs 2 -Hd -1 -Ni 2 -Nx 50.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 8388608.0 -Id -1.0 -It udp -Il 48 -If 0 -Ii 0 -Iv 32
r -t 0.000339577 -Hs 2 -Hd -1 -Ni 2 -Nx 50.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 8388608.0 -Id -1.0 -It udp -Il 48 -If 0 -Ii 0 -Iv 32
f -t 0.002685595 -Hs 2 -Hd -1 -Ni 2 -Nx 50.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 8388608.0 -Id -1.0 -It udp -Il 68 -If 0 -Ii 0 -Iv 32

Hello sir
My scenario used wireless nodes and UDP and AODV protocol( NS2.29).
I want to calculate throughput and delay but I have more problem , for calculate throughput, which formula is true? ( numreceivepacket / numsend packet ) and for calculate delay, should I minus send time from receive time one packet in the same layer? (for example send and receive time in MAC layer). and next problem is that in my tarce file I don't have send time in MAC and AGT layers and also I don't have receive time in RTR layer.

If necessary for clarification, I send my trace file.

Please help me , thanks ...

Hello sir
My scenario used wireless nodes and UDP and AODV protocol( NS2.29).
I want to calculate throughput and delay but I have more problem , for calculate throughput, which formula is true? ( numreceivepacket / numsend packet ) and for calculate delay , should I minus send time from receive time one packet in the same layer? (for example send and receive time in MAC layer). and next problem is that in my tarce file I don't have send time in MAC and AGT layers and also I don't have receive time in RTR layer.

If necessary for clarification, I send my trace file.

Please help me , thanks ...

Hi sir
My scenario used wireless node, UDP transmission and AODV protocol.( NS2.229 )
I have more problem for calculate throughput and delay. For calculate throughput witch formula is true? (numrecvpacket / numsendpacket) and for calculate delay should I minus send time from receive time for one packet in the same layer? (for example send and receive time in the MAC layer).
And the next problem is that in my trace file I don't have send time packet in MAC and AGT layers and also I don't have receive time in RTR layer.

If necessary clarification, I send my trace file.

please help me , thanks ....

@Atef - All the files which were earlier on megaupload have been shifted to mediafire. Check out the following link:

http://www.mediafire.com/?z1c2cxdt1a31d

@Shalu - Replace "cbr" by "tcp" in the AWK Scripts.

@Khoso - Link utilization is nothing but the throughput. To calculate that for two nodes, modify the if condition to include sending and receiving node numbers, "s" and "r" as $1, "AGT" and "RTR" as layers and packet type = cbr OR tcp whichever you have used in the TCL Script.

@Sukhi - I believe most of the features of your new node would be similar to the MobileNode and hence I recommend you to inherit your new Node from MobileNode class. You can refer to NRLSensorsim patch for NS-2 to know more details on how to create a new node.

@Sharan - Sorry, havent worked with that yet. Will post details if found.

@Shakeel - You can download the AWK Scripts to calculate Normalized Routing Load from the following link:

@Shrey - AWK Scripts on the following link will help you to calculate throughput and end-to-end delay. For handover latency you will have make few modifications in e2edelay.awk based on the "Binding Update" messages which are printed in the trace file.

http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html

@Sandy - The formula to calculate average throughput is (total bytes received / total traffic time). AWK Scripts for throughput and delay are provided on the link given below:

http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html

Hope it helps.

Regards,
Mohit P. Tahiliani

here is my awk script for end to end delay and jitters i am not able to get the results please someone check this and let me know


BEGIN {
ctr=0;
snt_c = 0;
rec_c = 0;
drp_c = 0;
seqno=0;
max_s_n=0;
}
{
#ctr++;
action = $1;
if(($2 != "-t"))
if($2=="-t"){
seq_no= $47;
time = $3;
}
else
{
seq_no= $11;
time = $2;
}
seqno = seq_no;
time_val[seq_no]=time;
if( $1=="-")
{
if( (!(a[seq_no]>0)) && ($2 == "-t") )
if( (a[seq_no]>0) )
{
rec_c++;
a[seq_no]=time;
printf("\n%d\n",seq_no);
print;
}
}
if( $1=="+")
{
if( !(b[seq_no]>0) && ($2 == "-t"))
if( (b[seq_no]>0) )
{
snt_c++;
b[seq_no]=time;
printf("\n%d\n",seq_no);
print;
}
}
if($1=="d")
{
if( !(c[seq_no]>0) )
{
drp_c++;
c[seq_no]=time;
printf("\n%d\n",seq_no);
print;
}
File: /home/user/Desktop/Project-1/…dover-2mn-2mps/e2ed_jitter.awk Page 2 of 2
}
if(seq_no>max_s_n)
max_s_n=seq_no;
}
END {
#printf("%d\n",count);
#lost=
#printf("Total sent packets = %d\n",snt_c);
#printf("Total received packets = %d\n",rec_c);
#printf("Total dropped pakcets = %d\n",drp_c);
#printf("Total lost packets = %d\n",snt_c-rec_c);
printf("\n%g\n",max_s_n);
printf("time\tseq#\tsent_time\trec_time\te2e_delay\tjitter\n");
for(i=0;i<=max_s_n;i++){
if( (b[i]>0) && (a[i]>0) ){
delay[i]= a[i]-b[i];
jitter= delay[i]-prev_del;
printf("%f\t%d\t%f\t%f\t%f\t%f\n",time_val[i],i,b
[i],a[i],delay[i],jitter);
if(time_val[i]>0)printf("%f",time_val[i]);
prev_del=delay[i];
}
}
}

@Shrey - You can download the AWK Script for end-to-end delay from the following link:

http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html

Hope it helps.

Regards,
Mohit P. Tahiliani

hi,

i m using ns2.35 and i dnt know how to use vbr traffic channel in aodv tcl script over cbr.

plz help me.

hi.
mohit sir
i am unable to find the result of jitter by using ur instant jitter awk file
i get jitter=1 jitter=2 jitter=4.
plz help me for calculating the jitter of AODV, DSR AND TORA

hello
Mohit sir,
i am Neha, unable to find the result of jitter for AODV, DSR and TORA by using your awk script jitter. I am found result jitter1= jitter2= jitter3=jitter 4
plz help me for finding the result.
its very urgent.
plz help me

Hi Sir
coukd you please tell how can i simulate the selfish behavior in manets using ns2 and what are the changes i should make in actual code

hi mohti sir..

I am student of M.tech CSE.can you please send me latest research topics regarding NETWORK SECURITY,CLOUD COMPUTING and WIRELESS NETWORKS.Actually sir i want to work with NS2.
waiting for your reply.
Thanks..!!

Hi Mohit,

I am trying to run SCTP-CMT simulations in NS2 as given in the sctp.README of the ns2 module. Once the trace file is generate, I tried to use the throughput awk script to calculate the throughput. However, I dont get the required output:

It gives 0:


awk -f gen_tput.awk all.tr
Average Throughput[kbps] = -0.00 StartTime=400.00 StopTime=0.00

Are you aware how to obtain the throughput for sctp-cmt simulations given in the sctp.README of ns2 ?

Regards,
Shreyas

Dear mohit,
How to change the transmission range of a mobile node dynamically?

@Geetica – Following link explains one way to do it:

http://www.linuxquestions.org/questions/linux-newbie-8/insertion-steps-of-vbr-into-ns2-34-a-868010/

and it can also be done as follows:

set vbr [new Application/Traffic/Exponential]
$vbr set packetSize_ 280
$vbr set rate_ 300k
$vbr set burst_time_ 100ms
$vbr set idle_time_ 50ms
$vbr attach-agent $udp

@N – You may try using the AWK script provided on the following link:

http://perso.citi.insa-lyon.fr/mfiore/data/trace2stats_v05b.tgz

@Mani – One such code is given and explained on the following link:

http://elmurod.net/index.php/2009/10/24/adding-malicious-node-in-aodv/

@Shreyas – There are several factors to be considered while using the AWK script for throughput given here. Make sure you are using this AWK Script on wireless trace file. Another thing to be considered is the packet size which is set in your TCL script. Replace 512 by the packet size that you have used in your TCL script.

@S M Joshi – I doubt whether that can be done because generally we change the transmission range by using threshold.cc. But it is not dynamic.

Hope it helps.

Regards,
Mohit P. Tahiliani

hi i am working on tcp-linux protocols in ns2.34
I ran tcp highspeed and i go.tr file below.I want to draw graph for throught. can you help me how woud i get throughput or any other readings?
+ 0 0 1 tcp 40 ------- 0 0.0 1.0 0 0
- 0 0 1 tcp 40 ------- 0 0.0 1.0 0 0
+ 0 0 1 tcp 1050 ------- 0 0.0 1.0 1 1
- 3e-06 0 1 tcp 1050 ------- 0 0.0 1.0 1 1
r 0.010003 0 1 tcp 40 ------- 0 0.0 1.0 0 0
+ 0.010003 1 0 ack 40 ------- 0 1.0 0.0 0 2
- 0.010003 1 0 ack 40 ------- 0 1.0 0.0 0 2
r 0.010087 0 1 tcp 1050 ------- 0 0.0 1.0 1 1
+ 0.010087 1 0 ack 40 ------- 0 1.0 0.0 1 3
- 0.010087 1 0 ack 40 ------- 0 1.0 0.0 1 3
r 0.020006 1 0 ack 40 ------- 0 1.0 0.0 0 2
+ 0.020006 0 1 tcp 1050 ------- 0 0.0 1.0 2 4
- 0.020006 0 1 tcp 1050 ------- 0 0.0 1.0 2 4
+ 0.020006 0 1 tcp 1050 ------- 0 0.0 1.0 3 5
r 0.02009 1 0 ack 40 ------- 0 1.0 0.0 1 3
+ 0.02009 0 1 tcp 1050 ------- 0 0.0 1.0 4 6
+ 0.02009 0 1 tcp 1050 ------- 0 0.0 1.0 5 7
- 0.02009 0 1 tcp 1050 ------- 0 0.0 1.0 3 5
- 0.020174 0 1 tcp 1050 ------- 0 0.0 1.0 4 6
- 0.020258 0 1 tcp 1050 ------- 0 0.0 1.0 5 7
r 0.03009 0 1 tcp 1050 ------- 0 0.0 1.0 2 4
+ 0.03009 1 0 ack 40 ------- 0 1.0 0.0 2 8
- 0.03009 1 0 ack 40 ------- 0 1.0 0.0 2 8
r 0.030174 0 1 tcp 1050 ------- 0 0.0 1.0 3 5
+ 0.030174 1 0 ack 40 ------- 0 1.0 0.0 3 9

Hi Mohit Sir,
I have installed ns2-2.34 on ubuntu 11.04. It was installed successfuly and generating nam files also. But i am unable to access trace files to plot xgraph.
when i am giving
awk -f filename.awk filename.tr
ex: awk -f wired_end2end_delay 1.tr
I am getting following error

awk: wired_end2end_delay.awk: line 69: illegal reference to array rcvdTimes

can you please tell what will be the problem and solution for it. By the way i checked the source files running with ns2-2.30 version, which was installed on ubuntu 10.10.
Hope you will solve my problem please.
Thanks
Naga Lakshmi A

Hi ,

i want to use Random Way Point as a mobility model in my tcl file. I don't know HOW? Can you help me please?
I would like to compare routing protocol: DSR, DSDV and AODV.

Thanks

Hi
I am working on Hybla tcp flavor on heterogeneous network ..
.tr file format is below.
+ 1 0 2 tcp 40 ------- 0 0.0 4.0 0 0
- 1 0 2 tcp 40 ------- 0 0.0 4.0 0 0
+ 1 0 2 tcp 1500 ------- 0 0.0 4.0 1 1
r 1 0 2 tcp 40 ------- 0 0.0 4.0 0 0
+ 1 2 5 tcp 40 ------- 0 0.0 4.0 0 0
- 1 2 5 tcp 40 ------- 0 0.0 4.0 0 0
- 1 0 2 tcp 1500 ------- 0 0.0 4.0 1 1
r 1.000012 0 2 tcp 1500 ------- 0 0.0 4.0 1 1
+ 1.000012 2 5 tcp 1500 ------- 0 0.0 4.0 1 1
- 1.000012 2 5 tcp 1500 ------- 0 0.0 4.0 1 1
r 1.012504 2 5 tcp 40 ------- 0 0.0 4.0 0 0
+ 1.0125 5 6 tcp 40 ------- 0 0.0 4.0 0 0 40.90 -73.90 37.80 -122.40
- 1.0125 5 6 tcp 40 ------- 0 0.0 4.0 0 0 40.90 -73.90 37.80 -122.40
r 1.012632 2 5 tcp 1500 ------- 0 0.0 4.0 1 1
+ 1.0126 5 6 tcp 1500 ------- 0 0.0 4.0 1 1 40.90 -73.90 37.80 -122.40
- 1.0126 5 6 tcp 1500 ------- 0 0.0 4.0 1 1 40.90 -73.90 37.80 -122.40
+ 1.265722 6 4 tcp 40 ------- 0 0.0 4.0 0 0
- 1.265722 6 4 tcp 40 ------- 0 0.0 4.0 0 0


CAn you please help me how to calculate throughtput using javaparse or awk or perl?

Hi sir , I want a awk program for calculating No of received packets for each & every nodes. Can you please upload the program sir.

hi,
i have simulated LEACH protocol for 10 nodes in ns-2. 29 with mannasim and observe that the trace file show nodes greater than 10 with tag -Hd when packets are received. please guide why i getting this and how to resolve this issue?

regards,
najma


s -t 0.086012595 -Hs 4 -Hd -2 -Ni 4 -Nx 99.83 -Ny 22.79 -Nz 0.00 -Ne 10.000000 -Nl AGT -Nw --- -Ma 0 -Md 4000000 -Ms 0 -Mt 0$
r -t 0.086012595 -Hs 4 -Hd -2 -Ni 4 -Nx 99.83 -Ny 22.79 -Nz 0.00 -Ne 10.000000 -Nl RTR -Nw --- -M a 0 -Md 4000000 -Ms 0 -Mt 0$
s -t 0.086012595 -Hs 4 -Hd -2 -Ni 4 -Nx 99.83 -Ny 22.79 -Nz 0.00 -Ne 10.000000 -Nl RTR -Nw --- -Ma 0 -Md 4000000 -Ms 0 -Mt 0$
s -t 0.086037595 -Hs 4 -Hd -2 -Ni 4 -Nx 99.83 -Ny 22.79 -Nz 0.00 -Ne 10.000000 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff000$
N -t 0.086038 -n 8 -e 9.999998
N -t 0.086038 -n 9 -e 9.999998
N -t 0.086038 -n 10 -e 9.999998
N -t 0.086038 -n 2 -e 9.999998
N -t 0.086038 -n 3 -e 9.999998
N -t 0.086038 -n 0 -e 99.999952
N -t 0.086038 -n 5 -e 9.999998
N -t 0.086038 -n 1 -e 9.999998
N -t 0.086038 -n 7 -e 9.999998
N -t 0.086038 -n 6 -e 9.999998
r -t 0.086133679 -Hs 8 -Hd 26 -Ni 8 -Nx 89.50 -Ny 45.73 -Nz 0.00 -Ne 9.999998 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff0008$
r -t 0.086133779 -Hs 9 -Hd 56 -Ni 9 -Nx 70.26 -Ny 69.47 -Nz 0.00 -Ne 9.999998 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff0008$
r -t 0.086133807 -Hs 10 -Hd 64 -Ni 10 -Nx 69.96 -Ny 78.95 -Nz 0.00 -Ne 9.999998 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff00$
r -t 0.086133810 -Hs 2 -Hd 65 -Ni 2 -Nx 36.50 -Ny 11.07 -Nz 0.00 -Ne 9.999998 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff0008$
r -t 0.086133814 -Hs 3 -Hd 66 -Ni 3 -Nx 39.10 -Ny 47.74 -Nz 0.00 -Ne 9.999998 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff0008$
r -t 0.086133817 -Hs 0 -Hd 67 -Ni 0 -Nx 38.67 -Ny 49.48 -Nz 0.00 -Ne 99.999952 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff000$
r -t 0.086133843 -Hs 5 -Hd 75 -Ni 5 -Nx 96.38 -Ny 97.11 -Nz 0.00 -Ne 9.999998 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff0008$
r -t 0.086133882 -Hs 1 -Hd 87 -Ni 1 -Nx 43.65 -Ny 87.99 -Nz 0.00 -Ne 9.999998 -Nl MAC -Nw --- -Ma 0 -Md 4000000 -Ms ffff0008$

Dear Mohit P. Tahiliani,
Kindly
1-can you help me for using ns2 ?i want design wireless network and used security (Cryptography).
2- can you explan for me whats mean of HELLO message?)
best wishes
Sirwan

@Nir - To analyze the trace files which you have posted, use trace2stats available on the following link (See README for more details on commands):

http://perso.citi.insa-lyon.fr/mfiore/data/trace2stats_v05b.tgz

@Naga Lakshmi - There seems to be an error in the way you are using an array to store received time of each packet. Look into it carefully and re-run again.

@Abbouur - The following link has exactly what you want. Comparison of AODV, DSDV and DSR while using Random Waypoint Mobility Model:

http://140.116.164.80/~smallko/ns2/adhoc_routing.htm

@MuthuMeenakshi - Use the one given on the following link:

http://mohit.ueuo.com/AWK_Scripts/totalpacketsreceived.awk

It is designed for only few nodes. Modify it to calculate for all nodes in the network.

@Najma - Make sure you are looking at the correct trace file. Because if there are 10 nodes - numbering is generally from 0 to 9.

@Sirwan - The following link is a good reference to get started with security related stuff in ns-2:

http://elmurod.net/index.php/category/network-simulator-ns2/

HELLO messages are like "keep alive" messages which are used to find out whether the neighboring nodes are active or not (or within the range or not), etc.

Hope it helps.

Regards,
Mohit P. Tahiliani

hi sir,
can u send me a awk code to calculate throughput and dealay for wired cum wireless networks.

@Shiny John - Sorry Shiny, I havent designed one yet. I will upload it on this blog as soon as I do it.

Meanwhile, you can try to design your own AWK script for adhoc use.

Regards,
Mohit P. Tahiliani

hi sir,i attended workshop at surathkal.N.vanaja,i have to implement a project in ns2.sir,where to write code for dos attack

hi sir

@Vanaja - It depends which kind of DoS attack you want create in ns-2. Depending on that I can suggest a few files where you need to make changes. For e.g., if want to create DoS using SYN - then you need to make changes in tcp.cc, tcp.h in ns-allinone-2.xx/ns-2.xx/tcp directory.

Hope it helps.

Regards,
Mohit P. Tahiliani

Dear Mohit P. Tahiliani,

kindly can helpe for prgoraming by C++ for RC5 cipher algorithm?

@Sirwan - Sorry, I have not worked with it! Following link might be of some help to you:

http://www.lri.fr/~fmartignon/indexCode.html

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir, i have simulated adov rp with 20 nodes and i want to calculate throughhput for it.. i have used genthroughput.awk provided in the blog, and my doubt is..

shud i calculate throughput for every node separately and average them for average throughput??? in the script provided here node_id is nt used.. what does it mean??

kindly help me sir n thanks in advance

@Raviteja - genthroughput.awk calculates average throughput itself. It does not calculate the throughput of every flow. genthroughput.awk would serve your purpose.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello mohit sir
i harshil patel
sir i make wireless script using aodv. but when i change protocol dsr insted of aodv in script then error is generated like "segmentation fault (core dumped) so please help me sir
thank you

Hi Sir,

any script for goodput calculation?

Thanks,
Abhishek

@Harshil - Whenever you use DSR as the routing protocol - you must use CMUPriQueue as the interface queue i.e.

set val(ifq) CMUPriQueue

must be used.

This is because DSR's ns-2 code was contributed by CMU and they made a specific queue called "CMUPriQueue" which has to be used while running DSR.

@Abhishek - Glad to know you still visit this blog!

I guess you want AWK Script of goodput for wired networks, right? In that case, you can use the same AWK Script which we used during your project. Goodput needs two things: (1) Header overhead must not be calculated and (2) Re-transmitted packets must not be considered for calculation.

AWK Script which we used for your project eliminates header overhead in the calculation - thus satisfies (1) which I mentioned above. However, it does not eliminate re-transmitted packets. Just make this change and you will get a AWK script that calculates goodput. Use sequence number field in trace file to eliminate re-transmitted packets from the calculation.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello,
I want tcl script to calculate residual energy of a node.
Can any one help me in doing that.

Thanks in advance

I need a AWK script which is calculate node energy.

I also need a AWK script which is calculate no. of links break.

Hello sir,
I am doing my final year project in MANET...could u please tell me how to calculate the number of send and received packets from the trace file... ..

Hello
i m doing my final year thesis on flood moitoring system through wsn using ns 2 i need your help asap

HI MOHIT SIR,
i want to know how to configure route flap dampening of bgp in ns2?

Sir,
can u please help me for dijkstra's awk code.this code required my ME project. plz help me sir

Sir,
can u please help me for dijkstra's awk code.this code required my ME project. plz help me sir

Hai sir,

What is the use of shell script and perl in ns2? Please rply me as soon as possible..............

hello sir i m student of m tech i m doing project in ns2 i want to calculate the deliver ratio with the help of formula in ns2 please give me suggestion and the procedure to calculate deliver ratio for wpan ins2

Hello Sir..
Actually I am working on a project named multi hop data transfer of wireless networks and for that I wanted the awk script file dijkstra's algorithm for shortest path related WSN

hi
after i execute the awk e2edelay.awk im getting
Average End-to-End Delay = -nan ms
how do i overcome dis?cn u give me d solution..thank u

hi sir,

I need ur help in finding energy consuption of the overall network. Is there any awkscript to calculate energy? if so where can i find it?

thanks in advance ..

hi,sir,How to uninstall ns2 on redhat linux. currently i have ns 2.34 installed on system but i want to install ns 2.29 on system so please give me solution early.

Hello sir, i am working with node-disjoint multipath DSR routing for video streaming but i don't have any idea about it so pls help me.. thank you..

Hello sir,
This is karthik
I am currently working on detection and prevention of black hole attacks on dsr protocol as part of my final year project.
Hope you can provide me any information regarding this
and how to create a malicious node in dsr protocol?

Hello Mr,
I use ns2 under linux, I work with multicast traffic.
I wrote the code tcl and I want to calculate the average delay from end to end.
Please can you give me the awk script to calculate average delay from end to end for wired networks,I'm debutante and I'm stuck .
thank you very much

can u plzz send me the awk file for calculation all the parameters of wireless

Can any one could help me how to modify aodv.cc file by embedding another file which contain binary search tree ,so that nodes can be divided into two multicast group

hi mohit sir,
i want to know how to print number of neighbors of each node in mobile adhoc network and also how to get unique packet id number ?? what should be tcl code for this?? i am using aodv routing protocol in manet. thanks in advance

Hello thanks for your helpful site. I want to simulate a script awk who gives the throughput of tcp connection ( my awk script is named linktcp.awk) it runs well
and that's my script
BEGIN {
packet_size= 1500
total_throughput = 0
final = 0
time_ini = 1.0
count = 0
}
{
ackn = $5
event = $1
time = $2
node = 0
flowid= $8
from_node = $3
to_node= $4
#print(event)
#print(time)
#print(flowid)
#print(from_node)
#from node should be 2
if(event == "r" && flowid == "1" && from_node == "0" && time_ini >= time && ackn == "tcp" ) {
#remember always immediately after if there will be start of the “{“ .not in next line
total_throughput = total_throughput + packet_size
++count
}
if(event == "r" && flowid == "1" && from_node == "0" && time_ini <= time &&ackn == "tcp") {
#print(count)
count = 0
final = total_throughput + final
#print(total_throughput)
total_throughput = (total_throughput *8)/1000
printf("%f\t%f\n" , time_ini , total_throughput )
total_throughput = 0
time_ini = time_ini + 1
}
}
END {

final = (((final *8)/1000 ) / time)
print("Total Throughput for TCP : " , final)
for (i = 1.00 ; i <= time_ini ; i++) printf("%f\t%f\n" , i , final )
}
but when i wrote this command in the terminal to load the graph i have this error:
gnuplot> load 'parametre1'
"parametre1", line 5: warning: Skipping unreadable file "linktcp"
"parametre1", line 5: No data in plot

My script parametre to load the graph is :
set title 'Tcp-Throughput'
set xlabel 'Time (s)'
set ylabel 'throughput (Mbs)'
set autoscale
plot 'linktcp' w linespoints title 'throughput-of-TCP'
Help me please i don't inderstand the source of error
Thanks for you

hi , i want to add an algorithm (xor operation between the packets) in the intermediate nodes, but I don't know how to do it ??? can anybody help me .

thks :)

Hi I want to implement an XOR relation between the packets which received by the intermediate nodes, but I don't know how I do it?? can anybody help me plzz :)

plzzz can't you give me programm awk for simulated the protocol aodv
:( i nedd plzz and my file tr is a new form

i am getting the segmentation fault while calculating e2e-delay for dsr routing protocol using this awk script..plz give me solution

BEGIN {

seqno = -1;

# droppedPackets = 0;

# receivedPackets = 0;

count = 0;

}

{

if($4 == “AGT” && $1 == “s” && seqno 512){

# droppedPackets++;

# }

#end-to-end delay

if($4 == “AGT” && $1 == “s”) {

start_time[$6] = $2;

} else if(($7 == “cbr”) && ($1 == “r”)) {

end_time[$6] = $2;

} else if($1 == “D” && $7 == “cbr”) {

end_time[$6] = -1;

}

}

END {

for(i=0; i 0) {

delay[i] = end_time[i] – start_time[i];

count++;

}

else

{

delay[i] = -1;

}

}

for(i=0; i 0) {

n_to_n_delay = n_to_n_delay + delay[i];

}

}

n_to_n_delay = n_to_n_delay/count;

print “\n”;

# print “GeneratedPackets = ” seqno+1;

# print “ReceivedPackets = ” receivedPackets;

# print “Packet Delivery Ratio = ” receivedPackets/(seqno+1)*100
#”%”;

# print “Total Dropped Packets = ” droppedPackets;

print “Average End-to-End Delay = ” n_to_n_delay * 1000 ” ms”;

print “\n”;

Sir I need to implement network coding and am working with ns2.34. Please help me with how to implement network coding with some sample tcl codes

sir, i require some help in ns2 implementation of cross layer techniques for security in manets

sir m using new trace format for DSR protocol. jitter awk file gives result
# flow flowType src dst time jitter1 jitter2 jitter3 jitter4
sir plz help me how m correct this........

In UDP, the application/CBR rate and interval can be set in the tcl script. However, in TCP, there is no method to set the rate and interval in the ns2. I am having problems on setting the TCP sender rate and thus do not know how to evaluate the throughput in ns2.

can anybody have awk script to calculate throughput for particular node.......i need awk urgently

Hello Mohit,

Can you please provide AWK script for route discovery time for AODV.
regards.

hi sir, divan here, asst.prof of atmiya engineering college, rajkot recently i had attended your lect at rk uni. rajkot...its help lot for my phd research...so thanks a lot...

hello sir ,
do you have a awk sript of jitter for wireless scenario?? or it is same as the wired one ??
Please help !

hiii

am trying to plot graph THROUGHPUT vs LOAD.am using throughput.awk,nrl_ot.awk trying to put into 1 awk script .but am getting NRL=0...as am not to define $7 in old trace format.
i mean that $1=event,what is $7=??

hello sir.........i want to do the computer networks lab which belongs to VTU in simulator by using ns2 and i m in very confusion about writing of logics for that lab in TCL...can u help me sir...

Thanks & Regards
latha

hello sir i want to know how to use awk for getting throughput,delay and bandwidth .thanks in advance .
i need detailed information abt it

Hi mohit !
Congrats for maintaining such a useful blog. Really appreciable !!

After using PDF.awk which one is the PDF value?
the r/s Ratio or forwardLine ????????

printf "cbr s:%d r:%d, r/s Ratio:%.4f, f:%d \n", sendLine, recvLine, (recvLine/sendLine),fowardLine;

vinay4research@yahoo.com

Prakul Singhal
hello sir ,
I m doing my m.tech project on congestion control in wsn at transport layer.
I want to calculate buffer occupancy, from my trace file through awk or any other script.

I think to make dataset of buffer occupancy for training the neural network for congestion detection in matlab.
But I cant able to find how I make dataset of buffer occupancy through trace file.
I hope you help me in that.
Thank you

Prakul Singhal
Prakul_2008@yahoo.co.in

hello sir,

i want to make use of newack() function and make the changes in tcp.cc file. the purpose is to measure the RTT for every sent and received packets. kindly, suggest me the necessarry changes i need to make in tcp.cc file.

Hello sir,

I m doing a project on creating a trace analyzer tool in java. when the trace file is given as an input the tool has to give throughput, delay, jitter and pdf.i read the awk script to get the logic for calculation.but i have difficulties in understanding the awk script for jitter and delay. please help me sir. thanks.

Sir I am sindhu raj k, doing my project in Ns2 about all-optical network.
I want to simulate the link failure localization in all-optival network in my project.how can i simulate this sir..please help me..

Hello Mohit,
I want to ask you about some queries regarding NS2, will you please give me your contact number?
Thank you,
Nikunj

hloo sir,
Sir could you please help me how to find number of packet send and packet receive in each node?? using awk scripts...
mi mail id: annsunny1990@gmail.com

hi mohit sir,
im doing my m.e project in mobile wsn for finding the replication attack in nodes.. kindly help me to start my project with basic guidelines..
i have set up the mobile nodes and set the mobility model for it.. now i need help for the following concepts.
1.to exchange id,current location between the nodes coming in same transmission range.
2. to check whether it has same id in its history log

kindly help me..

hai mohit sir,

im doing my m.e project in mobile WSN. main concept is to find the replication attack in mobile nodes.
ihave set up the mobile node environment with 100 nodes, following random way point mobility model. i need your help to further proceed in my project..
plz help me in following concepts
1. to exchange node id and geographic location between the neighbours
2. to lookup whether the node has same id in its history log..
plz help sir

Mohit this is mohit, i need signal strength code to find sybil node in ns2 yaar plz help me

sir this is my trace file i perform the udp based program with node moment please kindly help me to give the proper throghput delay jitter and loss prgram for me

s 0.007665887 _0_ RTR --- 0 message 32 [0 0 0 0] ------- [0:255 -1:255 32 0]
s 0.007960887 _0_ MAC --- 0 message 90 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008681271 _5_ MAC --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008681518 _7_ MAC --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008681588 _14_ MAC --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008681627 _15_ MAC --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008681664 _6_ MAC --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008706271 _5_ RTR --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008706518 _7_ RTR --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008706588 _14_ RTR --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008706627 _15_ RTR --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
r 0.008706664 _6_ RTR --- 0 message 32 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0]
s 0.027165073 _44_ RTR --- 1 message 32 [0 0 0 0] ------- [44:255 -1:255 32 0]
s 0.027320073 _44_ MAC --- 1 message 90 [0 ffffffff 2c 800] ------- [44:255 -1:255 32 0]
r 0.028040740 _39_ MAC --- 1 message 32 [0 ffffffff 2c 800] ------- [44:255 -1:255 32 0]
r 0.028040740 _45_ MAC --- 1 message 32 [0 ffffffff 2c 800] ------- [44:255 -1:255 32 0]
r 0.028065740 _39_ RTR --- 1 message 32 [0 ffffffff 2c 800] ------- [44:255 -1:255 32 0]
r 0.028065740 _45_ RTR --- 1 message 32 [0 ffffffff 2c 800] ------- [44:255 -1:255 32 0]
s 0.030271464 _2_ RTR --- 2 message 32 [0 0 0 0] ------- [2:255 -1:255 32 0]
s 0.030646464 _2_ MAC --- 2 message 90 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031366464 _49_ MAC --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031367037 _3_ MAC --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031367148 _8_ MAC --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031367195 _15_ MAC --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031391464 _49_ RTR --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031392037 _3_ RTR --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031392148 _8_ RTR --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
r 0.031392195 _15_ RTR --- 2 message 32 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0]
s 0.087656456 _13_ RTR --- 3 message 32 [0 0 0 0] ------- [13:255 -1:255 32 0]
s 0.087971456 _13_ MAC --- 3 message 90 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088691916 _11_ MAC --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088692122 _14_ MAC --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088692289 _7_ MAC --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088692289 _1_ MAC --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088716916 _11_ RTR --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088717122 _14_ RTR --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088717289 _7_ RTR --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]
r 0.088717289 _1_ RTR --- 3 message 32 [0 ffffffff d 800] ------- [13:255 -1:255 32 0]





regards

nithiya

dear sir,
please tell me how to find the number of alive nodes in aodv using hello packets.waiting for your reply.

Dear sir
as per your suggestions the following lines already commented in ns version 2.35
#ifndef AODV_LINK_LAYER_DETECTION
htimer.handle((Event*) 0);
ntimer.handle((Event*) 0);
#endif // LINK LAYER DETECTION

But not able to get the hello packet

sir can u plz send me scen1.awk and scen2.awk ... i can not find it on the link as u given above...

n also i want to plot xgraph for energy.tcl script which show energy of nodes are redused by the time when it moves

hello sir,
sir i want to find out routing discovery frequency (per second) for AODV protocol
thank u in advance
my email id is ksagarmaehsh@gmail.com

How to find route discovery frequency in AODV ?
than u in advance..

hello sir,

Which awk scripts are used to get the throughput , end to end delay and jitter in wired network.

Please tell me sir.

Format of my trace file is given below.

+ 3.4 0 2 cbr 128 ------- 1 0.0 1.0 165 330
+ 3.4 1 3 cbr 128 ------- 2 1.1 0.1 165 331
+ 3.42 0 2 cbr 128 ------- 1 0.0 1.0 166 332
d 3.42 0 2 cbr 128 ------- 1 0.0 1.0 166 332
+ 3.42 1 3 cbr 128 ------- 2 1.1 0.1 166 333
d 3.42 1 3 cbr 128 ------- 2 1.1 0.1 166 333
r 3.434528 0 2 cbr 128 ------- 1 0.0 1.0 16 32
+ 3.434528 2 3 cbr 128 ------- 1 0.0 1.0 16 32

Hello sir,

Do you have any awk script to generate end to end delay , jitter and throughput in wired network.

Please help me.

Format of my trace file is given below.

+ 3.4 0 2 cbr 128 ------- 1 0.0 1.0 165 330
+ 3.4 1 3 cbr 128 ------- 2 1.1 0.1 165 331
+ 3.42 0 2 cbr 128 ------- 1 0.0 1.0 166 332
d 3.42 0 2 cbr 128 ------- 1 0.0 1.0 166 332
+ 3.42 1 3 cbr 128 ------- 2 1.1 0.1 166 333
d 3.42 1 3 cbr 128 ------- 2 1.1 0.1 166 333
r 3.434528 0 2 cbr 128 ------- 1 0.0 1.0 16 32
+ 3.434528 2 3 cbr 128 ------- 1 0.0 1.0 16 32

Hello sir, I need how to calculate network lifetime of sensor nodes........ pls clarify me........... i m waiting for ur reply sir....... pls i need urgently.......

hii
i want to get ack using aodv protocol on udp over cbr
can u plz help me
how to modify the udp code

mohit sir,
i am using ns2.35 in this version how to enable hello packets ,because the two lines to be commented in aodv.cc file already told in the previous comments is already commented but still i cannot find any hello packets in trace file

mohit sir,
i am using ns2.35
how to display neighbor nodes,their position and remaining energy
please reply sir, its urgent

Help Please >>

when i try to find pdf I use this "gawk -f pdf.awk simple1.tr" but I get gawk: fatal: can't open source file `pdf.awk' for reading (No such file or directory)

With below pdf.awk scribt.
...

Kindly help me >>>

hiii
i want to call the watchdog on selective nodes..can u plz tell me how to do that??i hav d code for watchdog but it takes al the nodes

sir is there any .awk script or any other method to find inter nodal distance??

can u plz telll me how to calculate energy

@Kirti Shinde - Calculating energy for a particular node or the entire network?

@Ajay - Do you mean euclidean distance?

Mohit P. Tahiliani

hello sir...
when a packets sending source to destination how best path is found in aodv and also how working code in aodv file ???
plz help...

@Raghu - The best path in AODV is calculated based on the least number of hops between the source and the destination.

Tutorial on the following link will help you to understand the implementation of AODV in ns-2:

http://www-npa.lip6.fr/~rehmani/aodv_v2.pdf

Hope it helps.

Regards,
Mohit P. Tahiliani

Dear sir,
I have followed your blog. Still I am totally confused regarding the trace file calculation.
Simply I need to calculate the no. of sent, recv, and dropped packets from tr file. But I am getting recv packets more than sent. so how it is possible ? pls help me with simple ex. I am sending my tr files. I am not putting right formula to calc only data packets.

from both the files I need to calc sent recv and dropped packets separately. please help me sir.

Thanks in advance

Hello Sir
when i try to use throughput_newtrace.awk it shows the following error
awk: throughput_newtrace.awk:1: BEGIN {
' in expression_newtrace.awk:1: ^ invalid char '

please help me

hello mohit sir

when i try to use throughput.awk with new trace format it shows me one error as

invalid char { what is this please it is very urgent for me , my id: nagala.venkat@gmail.com

hello sir, i want to implement the clusters of nodes in NS2. plz tell me the coding of clusters formation.

helloo sir i want to implement intrusion detection system based on acknowledgement packets in ad hoc network ....can u help me how it will be done in ns2..?please sir give me suggestions as soon as possible..

hello sir, how to know about the leach_text in :
1)what is leach.out file and details of each field in that file...
2)also other file such as leach.energy ,leach.data , leach.alive and explain each field what to say...

hi mohit
i have problem in poltting graphs.i am using awk file to find out parameter of network like ec,pdr,packet loss and e2edelay...but after that i wnt plot graphs of these parameters Vs bit error rate...so how to plot it...manually i am putting value of ber and ec in different coloumn & save file as text file then graph.sh file for x Y axis parameter declaration...and using command sh graph.sh..but it shows black graph nothing get plotted....

@Anvika - You can use APP Tool for plotting the graphs.

Here is the link: http://mohittahiliani.blogspot.in/2014/10/automated-post-processing-app-tool-for.html

Hope it helps.

Regards,
Mohit P. Tahiliani

@Bhavin and Pooja - I haven't worked on those areas and hence, would not be able to assist you on those topics.

Regards,
Mohit P. Tahiliani

Hello Sir,

Sir where can i get a handover latency awk script?

@Balado - At the moment, I do not have an AWK script to do that, probably because I haven't worked on that area yet.

Regards,
Mohit P. Tahiliani

HELLO SIR,

I am also getting an error during opening my code like
: ns command not found
Please help me out from this so i can go for my further process.

Regards
Prami

@Prami - That error means ns-2 is not installed in your machine.

If you are using Ubuntu, the simplest way to do this would be to give the following command:

sudo apt-get install ns2

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello, Mohit sir!

Sir, I am getting a problem in running example script also in ns-allinone-2.35. Actually I am using Cygwin and ns-2.35 on window 8.
After installing (./install) ns2.35 in Cygwin, it shows this line "gcc4 package is not present on your system"

Should I have to install a different version of Network Simulator2 because I want to work on Cygwin?
Else suggest me how to work on VMWare workstation for running NS2 scripts

@Prami - That means your gcc is not compatible with the version of ns-2 that you are trying to install.

I would recommend you to install Ubuntu in a Virtual machine and then give it a try.

Hope it helps.

Regards,
Mohit P. Tahiliani

Thank you, sir for your reply!

Can you please tell me which version of Ubuntu I have to choose for Window8(64-bit) and how it works in VMWare workstation? I really need to Know all procedure for working on it. As I am new to this platforms. :( :/

Thanks in advance sir.
Looking forward to your reply.

Regards,
Prami Tantubay

Greetings Mohit Sir,

Please help me, Sir I am having a problem in running NAM in Ubuntu 14.04. Till yesterday it's working but it shows an error like "Segmentation fault (core dumped)". Also I tried to resolve it by using "sudo cp nam/usr/local/bin/" but still not fix that issue, Please help me out of it how to fix it.

looking forward to your reply as soon as possible.
Thank You in advance. !!

@Prami - Regarding installation of Ubuntu on your Windows - just check out in Google because there are many wonderful links that explain that.

Regarding nam - try giving

sudo apt-get install nam

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello Sir ,
I Mrs. Sujata Oak ,doing my project on Parallel Duplicate Address Detection.
In case of mobility management handoff shd be fast bt due to DAD , delay is 1000ms.I need to reduce this delay in my project by using either MIPv6/FMIPv6/HMIPv6.

I want the patch for MIPv6/FMIPv6/HMIPv6 to get it implemented on NS2-2.34.

Plz forward me the above patch as early as possible sir. Plz help me.

Regards,
Mrs sujata Oak
oak_sujata@yahoo.co.in
mehta.asha2014@gmail.com

Warm Greetings Mohit Sir,

Can you suggest me or give me a tcl script for calculating average hops(Calculation of hop-count) between nodes i.e. from source to destination node.? Please, help me sir!!, I really in need.

Also, I want to know how to rum awk file in terminal ??

Regards,
Prami

http://www-npa.lip6.fr/~rehmani/aodv_v2.pdf this link is giving an 404 error.. :(

http://www-npa.lip6.fr/~rehmani/aodv_v2.pdf this link is giving an 404 error.. :(

@Prami - You can get the same tutorial from the following link:

http://xxx.tau.ac.il/pdf/1007.4065.pdf

Hope it helps.

Regards,
Mohit P. Tahiliani

@Prami - Refer to my blog post on the following link to know how to run AWK and Xgraph:

http://mohittahiliani.blogspot.in/2010/08/xgraph-and-awk-scripts-in-ns-2_06.html

Hope it helps.

Regards,
Mohit P. Tahiliani

@Ayesha - I do not have such a patch as of now.

Regards,
Mohit P. Tahiliani

Hey Mohit
This Vishvas From Pune
can i get new awk file to analysis Trace file, which generated by NS2.34

Respected Sir
NS2 is working fine but i have vbr_traffic.cc and it is placed in tools folder. changes made in makefile.in. when i am executing ./configure in control panel it gives an error, i.e

configure: error: Installation of tcl seems incomplete or can't be found automatically.
Please correct the problem by telling configure where tcl is
using the argument --with-tcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-tcl=no.

how to solve this problem please help me sir

suresh babu chandolu

hello mohit sir..
will you please tell me from where to get patches for creating clusters in manet in ns2.34

I am implemented TEAM protocol for VANET. Now i want to generate graph for Time vs Percentage of vehicles and changes the speed of Vehicles. Can any one tell me how to design awk file for that??
Reply at ankitamithaiwala15@gmail.com
Thank you.

hello sir when i use awk script for jitter it is giving no result. only headings are their like src destination but no values.

This comment has been removed by the author.

Sir,

I am trying to implement TEAM protocol for VANET in ns2. I need patch for that. Kindly help me sir.
Reply at vidyaanilkumar90@gmail.com

Thank you

hello
i want to get buffer occupancy from my trace file with awk script.
i really need it.
please help me.

Packet Sent:0
Packet Received:0awk: pd.awk:21: (FILENAME=simple-dsdv2.tr FNR=34919) fatal: division by zero attempted

pls, when i run awk script for packet delivery ratio, it give zero value and complain division by zero attempted

pls, can you also give ideal or detail on how to add zrp to my ns 2

Packet Received:0awk: pd.awk:21: (FILENAME=simple-dsdv2.tr FNR=34919) fatal: division by zero attempted

pls, when i run my awk script for packet delivery ratio, i obtained zero and it complain division by zero attempted. Pls, what is solution? Thank you very much.

Packet Received:0awk: pd.awk:21: (FILENAME=simple-dsdv2.tr FNR=34919) fatal: division by zero attempted

pls, when i run my awk script for packet delivery ratio, i obtained zero and it complain division by zero attempted. Pls, what is solution? Thank you very much.

Hi Mohit,

My project is about detecting malicious node on MANET using NS2. Is there a way that i can use traceroute command MANET to show which route the packets took to the destination? I think this way will help show where the packets were dropped, i.e. malicious node. I have used awk script that you have provided but i need more evidence.

I need assistance urgently as my submission date is very close

Thanks

Hans

Hii sir,

I just started learning NS-2 simulator and i have created a network in NSG and generated tr and nam files. and i have used awk scripts for throughput and end 2 end delay for my trace file.. is there any awk file is available for LOAD and number of packets drop.. please let me know sir.

Hi
sir i m needing collision and Latency awk files.please provide me.

Hello Sir..

I am Novan from Indonesia, i have problem with calculate convergence routing protocols in NS2. Do you have file AWK for convergence routing ?

Thanks,,

hii Mohit.. how can we findout the retransmitted packets of mptcp

«Oldest ‹Older   201 – 358 of 358   Newer› Newest»