Labels: AWK , new trace format , old trace format , throughput
There are mainly two types of trace formats supported by NS-2 for Wireless Simulations.
1. Old Trace Format and
2. New Trace Format.
Following file is an AWK Script for throughput which supports "New Trace Format".
AWK scripts for average end-to-end delay, packet delivery fraction, etc that support New Trace Format will be uploaded soon.
AWK Scripts that support Old Trace Format can be found on following links:
Hope it helps.
Regards,
Mohit P. Tahiliani
1. Old Trace Format and
2. New Trace Format.
Following file is an AWK Script for throughput which supports "New Trace Format".
AWK Scripts that support Old Trace Format can be found on following links:
Hope it helps.
Regards,
Mohit P. Tahiliani
Related Blogs:
Hi, do u have awk script for new trace wireless format of average end to end delay? thanks!
Yes I have AWK script for average end-to-end delay supporting new trace format. I will upload it on blog soon. Thanks for your co-operation.
Mohit P. Tahiliani
hi, could you post awk script for total transmitted packets (control packets + data packets) too? because i need these for my project, hope you can help, thanks!
Hi,
I tried your awk file for throughput, throughput_newtrace.awk.
But I keep getting this output with my trace file:
Average Throughput[kbps] = -0.00 StartTime=400.00 StopTime=0.00
Do you know what the issue is. any help would be appreciated.
I am using ns-2.29 and the routing protocol aodv.
Nouri
nourideena@gmail.com
@Nourideen: Please check you are using the same transport protocol which is used in the awk script. If not please change it to the one you are using.
Hope it helps.
Regards,
Mohit P. Tahiliani
Hi Mohit,
I am doing simulation of WSN in ns2. I need to find the packet loss due to congestion occurrence in WSN and calculate the energy consumption for transmitting sensors packets. Do you have an awk script for doing that?
Thanks in advance for you help.
-naimah-
Hi Mohit,
Sorry, I forgot to mention that I am using the new tracefile format.
Any help will be highly appreciated.
Sorry sir,
Im new to ns2. could u tell me where to write awk script?
im using cygwin to run my simulation.
Please help asap
@Albrwaqi - You can write it in any editor. However make sure you save the file with .awk extension and it should be saved in unix format.
Hope it helps.
Regards,
Mohit P. Tahiliani
i need to generate an xgraph for energy conservation in leach and spin protocols. can i get some help?
@Samia - You can find the necessary information on the following link:
http://mohittahiliani.blogspot.com/2010/08/xgraph-and-awk-scripts-in-ns-2_06.html
Hope it helps.
Regards,
Mohit P. Tahiliani
please send me the awk script for latency and capacity for new trace file format...my mail id is ssnsharath@gmail.com ....thank u...
in my trace file,the send 's'packets is less compared to receive 'r' packets..it means that received packets is more than send packets which is not possible in practical scenario...it is in old trace file format..im using ns-allinone 2.28...please reply me what mistake would i have done....thank you..my mail is ssnsharath@gmail.com
@Sharath - Receive event "r" happens for two reasons - (1) if a packet is sent from Application layer (AGT) down to Routing layer (RTR), it shows "r" in the trace file. Note that this occurs in the SAME node. (2) if a packet is received from neighboring nodes, it also shows "r" in trace file.
Make sure you do not calculate the "r" events which are due to (1).
Hope it helps.
Regards,
Mohit P. Tahiliani
hi mohit, thanks alot for your help. i am doing coparison of energy consumption of dsr and aodv, please help me to find a suitable awk command to analyz my trace file. tanks alot
Thanks for ur help..im doing project in sensor networks..simulation time is 600 seconds and by deploying 100 nodes.im getting the value of send packets as 21,00,000 and received packets as 18,00,000..is it correct?..if so please tell the reason?..also is there any possibility to reduce the number of packets since in sensor networks,that much packets wont come know?...please reply..Thanks a lot..my id is ssnsharath@gmail.com
@Mehdi - Energy parameter in old trace format gets printed in 14th column of the trace file. You can create a simple AWK script that prints the value of this parameter for all the nodes that you require.
@Sharath - It is difficult to verify the results without knowing the exact details of scenario. Yes, the number of packets generated can be reduced by changing the value of interval_ parameter of CBR.
Hope it helps.
Regards,
Mohit P. Tahiliani
sir,Thank you for ur help.my project is analyzing the interaction of STEM and SPAN topology schemes..i have combined STEM and SPAN..but my problem is that i don't know how to set the wake up period and find latency per hop as given in my STEM base paper titled "STEM: Topology Management for Energy Efficient Sensor Networks"..for reference, please download the STEM paper..it will be available in pdf format...i want a graph for my project similar to that given in figure 5 in that STEM paper...so please guide me how to vary the wake up period and obtain latency per hop...i will be greatful to you if you please check it and send me...i know its a huge task but please help me out sir...also if you have ns2 code for STEM paper ,please send it to my mail id sharathprem@gmail.com..waiting for your reply...i will be really thankful to you sir....please see it..Thank you
sir,please reply to my previous query which i asked you.i also have another query now.please do reply to this also.sorry for disturbing you a lot...
what is the cbr packet rate,packet size, packet interval parameters which we have to set for a basic wireless sensor network simulations?just the standard value of parameters for sensor networks in ns2...please do reply sir..Thank you a lot....
Hi! do you know how to put in a file tcl commands from a file awk? thank you
Hi Mohit,
I havent tried your tcl or awk scripts yet. Since i am using the NS 2.34 version i wanted to know whether these scripts for the new version as well.
Also to generate the xgraph ( say for throughput) what after we run
$ns myprogram.tcl run
Any help will be highly appreciated.
Thanks
Hi Sir,
Do you have the trace file format for mobiwan trace file?
Regards,
yew
hi sir,
i am new to ns2 and i am using ns2.29. I am presently working on AODV protocol, NS@ provides with the c code for AODV, but i don't have the tcl script to run that c code. Can u help me with it, its really urgent.
my email id is anilagarwal88@gmail.com
Dear Mr.Mohit
We are working on a project on wireless networks and require a statistics of end to end delay.Hence i require a awk file on the new trace format.I couldnot find it on your blog.Please mail it to me at spitgrp18@yahoo.in.
Thanking you in anticipation and anxiously waiting for your reply.
@Yew - I have not worked with MobiWan and so havent come across that trace file.
@Anil - You can find the TCL script with explanation of AODV in the following tutorial:
http://www-npa.lip6.fr/~rehmani/aodv_v2.pdf
@Group 18 - I will upload e2edelay.awk for new trace format soon!
Hope it helps.
Regards,
Mohit P. Tahiliani
Hi MOhit,
This Blog is very helpful. I want to generate xgraph of throughput and time. I downloaded throughput trace , but this is only to generate out in terminal. How to generate xgraph??? I tried using the example of scen2 in energy file. But I could it always gives an error error in file unknown.problem with first line??? could you please help me
hi Mr.Mohit
I have the following script to calculate latency for three different types of flows, can you please to modify it to calculate end-to-end delay for these flows? also, I need the overall end-to-end delay for whole the system.
I'm using the new tracefile format.
Can you help me with it, its very urgent.
my email id is sandanet2005@yahoo.com
#!/bin/tcsh
#
# works on a trace file produced by ns
# outputs layer-to-layer per-packet latency for a given flow,
# indexed by the send time for the packet
if ( $#argv != 3 ) then
echo usage:
echo " " $0 \ \ \
exit 1
endif
set scenario = $1
set flow = $2
set layer = $3
set sendlayer = $layer
if ( $layer == 'MAC' ) then
set sendlayer = IFQ
endif
set tracefile = $scenario.tr
set tmpfile = `mktemp /tmp/latency.sendtimes.XXXXXX`
set outfile = $scenario.$flow.lat
rm -f $outfile
touch $outfile
# determine the first packet for a flow based on the first pkt
# received at the agent layer
set pkt = `egrep "^r .*\-Nl AGT .*\-If $flow " $tracefile | head -1 | gawk '{print $43;}'`
# determine the sender/receiver based on the first packet exchanged
# the true receiver is the last node to receive the packet
set snode = `egrep "^s .*\-Nl $layer .*\-If $flow .*\-Ii $pkt " $tracefile | head -1 | gawk '{print $9;}'`
set rnode = `egrep "^r .*\-Nl $layer .*\-If $flow .*\-Ii $pkt " $tracefile | tail -1 | gawk '{print $9;}'`
# determine per-packet send times; use the first transmission
# time if there are retransmissions
egrep "^s .*\-Ni $snode .*\-Nl $sendlayer .*\-If $flow " $tracefile | gawk '{print $43, $3;}' | sort -k1,1g -u >> $tmpfile
# determine per-packet recv times, match them to send times
# based on the packet id, and compute latency; use the time
# of the first recv if there were retransmissions
egrep "^r .*\-Ni $rnode .*\-Nl $layer .*\-If $flow " $tracefile | gawk '{print $43, $3;}' | sort -k1,1g -u | \
gawk -v sendfile=$tmpfile -v outfile=$outfile '{ \
pkt = $1; \
rtime = $2; \
getline < sendfile; \
while ($1 < pkt) { getline < sendfile }; \
if ($1 > pkt) { print "FATAL ERROR"; exit 1 }; \
printf "%.9f %.9f\n", $2, (rtime - $2) >> outfile; \
}'
# run latstats tool on the outfile
gawk '{print $2;}' $outfile | latstats | gawk '{print "", $0}'
# cleanup
rm $tmpfile
Dear Mr.Mohit
Thank you for your valuable reply.We really appreciate it and are obliged.Sir we are really pressed for time and require the awk file as soon as possible.So please if you could give us an estimation of when you would be uploading it.
Thanking you in anticipation and anxiously waiting for your reply.
D 1.505125000 _10_IFQ ---20285 cbr 1020 [0 0 0 0] ------- [10:1 6:0 30 6] [20270] 0 0
can u say the explanation for this trace format.... D-drop next everything what?
@P - Cut the printf statement which is given at the end of the AWK script and place it inside the loop so that at every instance of time it prints the value. Moreover, make sure you print atleast two values (e.g. time and throughput) in that printf statement.
@Aws - Latency = end to end delay. End to end delay of entire system is called average end to end delay. You can take a sum of delay of three flows and divide it by three to get average end to end delay.
@Group18 - I will try to do it by next week. Thanks for your co-operation.
@Nagamani - Explanation of the trace line mentioned by you is available on the following link:
http://www.cs.binghamton.edu/~kliu/
Hope it helps.
Regards,
Mohit P. Tahiliani
Hi Mohit,
Thanks for your reply. I am doing simulation with an attack node. I have used the code from http://elmurod.net/?p=196 to add malicious node and drop packets. but now I need to introduce malicious node in DSDV/DSR. can you please help me getting the code and where exactly I need to place the code????
@P - I have not come across any material that can help in modifying DSDV/DSR for simulating malicious nodes. However, I strongly believe that you can modify DSDV/DSR using the same link though it demonstrates modifications for AODV. If I come across any good material I will post it here.
Hope it helps.
Regards,
Mohit P. Tahiliani
Hi there , I'm actually doing a comparaison between OADV and DSR routing protocols ..and I need a awk scripts witch caculate some metrics values ( like :
-Packet Delevery Ratio
-Average End to End Delay
-Dropped packets
-Routing Load
-Average Path Length
-Normalized Routing Load
Can you help me pleaseeeeee ? did you already post them somewhere ? if Yes where ? Thank you a lot : ) !!
Sir i need to implement OLSR and DYMO routing protocols in NS2 but it seems that NS2 do not support these protocols... Also it is said that NS2 supports TORA protocol but when i use the code generated by nsg.jar i get an error executing the tcl script.. but the codes generated for AODV,DSDV and DSR works fine... Can you help me overcome these problems?
Thank you Mr.Mohit I really appreciate your helps.
Only one request remaining..can you please make your modification on the following script in order to calculate throughput instead of goodput, i think throughput not the same as goodput, ain't it?
#!/bin/tcsh
#
# works on a trace file produced by ns
# outputs total goodput as a function of time
if ( $#argv != 2 ) then
echo usage:
echo " " $0 \ \
exit 1
endif
set scenario = $1
set interval = $2
# base analysis on the AGT layer
set layer = AGT
set tracefile = $scenario.tr
set outfile = $scenario.goodput
rm -f $outfile
# determine the time the first packet was sent
set start = `egrep "^s .*\-Nl $layer " $tracefile | head -1 | gawk '{print $3;}'`
# use number of bytes received over the last interval to calc
# interval b/w
egrep "^r .*\-Nl $layer " $tracefile | \
gawk -v start=$start -v base=$start -v step=$interval -v outfile=$outfile '{ \
time = $3; \
while (time > base) { \
bw = bytes/step; \
if (max < bw) max = bw; \
printf "%.9f %.9f\n", base, bw >> outfile; \
base += step; \
bytes = 0; \
} \
total_bytes += $39; \
bytes += $39; \
} END { \
step -= (base - time); \
bw = bytes/step; \
if (max < bw) max = bw; \
printf "%.9f %.9f\n", time, bw >> outfile; \
if (total_bytes) \
printf "%.3f", (total_bytes/1024.0)/(time-start); \
else \
printf "0.0"; \
#printf "Max Goodput = %.3fKB/s\n", (max/1024.0); \
}'
Dear Sir,
Could you please upload the end-to-end delay awk script for new trace format as soon as possible.We are running out of time.Thanking you in anticipation.
@Selma_clapton - You can find necessary AWK Scripts on the following link:
http://mohittahiliani.blogspot.com/2010/02/few-more-awk-scripts-for-ns2.html
Necessary information about How to plot graphs using AWK Scripts, How to use AWK Scripts on .tr files can be found on the following link:
http://mohittahiliani.blogspot.com/2010/08/xgraph-and-awk-scripts-in-ns-2_06.html
@Deepak - To install OLSR patch in NS-2, visit the following link:
http://masimum.dif.um.es/?Software:UM-OLSR
For DYMO, visit following link:
http://masimum.dif.um.es/?Software:DYMOUM
and to solve TORA errors visit the following link:
http://wpage.unina.it/marcello.caleffi/ns2/tora.html
@Aws - You may refer and compare the logic of genthroughput.awk provided on my blog "Few more AWK Scripts for NS2" to modify this script.
@Ankush - You can try to modify the given e2edelay.awk by replacing the column numbers appropriately according to new trace format.
Hope it helps.
Regards,
Mohit P. Tahiliani
Thank you Mr.Mohit I'll follow your genthroughput.awk. But I'm not sure if I can modify it bu myself. Anyway, if I got problems again I'll inform you.
For those people need end-to-end delay for new trace format, they may refer to my early post for this purpose.
Best regards,
Thank you Mr.Mohit. This really helps!!! Thank you...
Regards,
Deepak.
dear Mohit,
in end to end delay script for wireless in new trace file format der is no sequence number column in my trace file...so im findin it difficult to create a new awk file from ur old one...
Hi Mr.Mohit, I read in wikipedia at (http://en.wikipedia.org/wiki/Goodput) there are many differences between measuring goodput and throughput. unfortunately I couldn't modify my script by myself because I'm beginner in this field..
I don't know where should I do the required modification in my script. I observed that my script is written as tcsh script without file extension as your AWK script (script.awk), is it quite different?. also my script is called from file.sh by using this command:
set goodput = `wlan-goodput audio-video-Bt.tcl 0.5`
But I don't know how to use your script instead.
Anyway, please if you can help me in this regards, I'll be very thankful for you.
Best regards,
Hi Mr.Mohit, I couldn't modify my script in the previos post, it quite different from that you proposed..please help me.. I'm using a new trace format..if u need to look at my trace file, I've uploaded it at:
http://www.mediafire.com/?cggi7wezi3fj7wk
Thank you in advance
Best regards,
@Ankush - New trace format has sequence number field. See the following link:
http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Trace_Formats
If your trace file is not in this pattern then it is not a new trace format.
@Aws - While calculating throughput we take retransmitted packets also in the consideration whereas for goodput - retransmitted packets are not considered. Hence the modifications required in my genthroughput.awk will be such that if there are two packets with same sequence number (one original and one retransmitted) it should be considered only once (retransmitted one is not counted). Thus include a condition in my AWK script such that if you have counted a packet once when it was transmitted originally, do not count it again when it is retransmitted.
Hope it helps.
Regards,
Mohit P. Tahiliani
while running the throughput script i am getting
Average Throughput[kbps] = -0.00 StartTime=400.00 StopTime=0.00
I got the result for AODV but not for DSR
you told above to change the routing protocol in awk script. but i am not getting where to change it...
dear Mohit,
please help me to crate the Xgraph from trace files using awk script.
with the commands:-
awk -f awkscript.awk tracefile.tr > xgraph.xgr
xgraph xgraph.xgr
I am doing my work.
but my problem is that my xgraph.xgr file is as following:-
1.0000 0 0 0
2.0000 0 0 0
3.0000 0 0 0
4.0000 0 0 0
means last 3 columns are all 0 so that i am getting the xgraph with a straight line.
please help me!!
@Shweta - No you do not have to change routing protocol since there is no such column in genthroughput.awk. You need to verify whether the TCL script with DSR is simulating correctly. Also see the packet size is same for scenario of AODV and DSR or not.
@Abhishek - Your AWK script may be printing incorrect columns from the trace file. Verify whether its printing the columns that you need.
Hope it helps.
Regards,
Mohit P. Tahiliani
Hi Mohit,
Can you give me some help in simulating mobile WSN in NS2. Also some help in Geographic Routing. I am working with ns2.34
reply asap
@Raghav - You can use NRLSensorsim patch to simulate Mobile WSN in NS-2
GEAR (Geographic and Energy Aware Routing protocol) is available in the default package of NS-2 but it has limited functionality. For more details on GEAR please see the following link:
http://lecs.cs.ucla.edu/~yanyu/software/gear.html
Hope it helps.
Regards,
Mohit P. Tahiliani
thanks a lott ...it was very helpfull for me
Sir, im doing a project in MANETs to calculate the high speed and stable route in a multi-rate mobile network. I am unable to calculate the throughput,help me to generate the graph.Iam using NS2.34. I am not getting the graph properly
Thank you
Sandhya
Sir, im doing a project in ns2 my topic is performance evalution of dsdv and aodv for wsn in different parameters like pdr, throughput, end to end delay etc. i have done lots of work but im not reaching at any result please help me. my project submission date is very near. please send me the code.
my id is ankuspanipat@gmail.com
thanks in advance.
@Sandhya - What is the error you are getting while generating throughput? To know how to generate graphs please visit my another blog named "Xgraph and AWK Scripts in NS-2"
@Amitpal - You may try using some sample TCL scripts provided in the following directory:
ns-allinone-2.xx/ns-2.xx/tcl/ex/wpan
where xx represents your NS-2 version.
Hope it helps.
Regards,
Mohit P. Tahiliani
Sir,
Im doing a project on MANETs. My work is i have to show the stable route,high speed in a multirate adhoc networks. Im using ns-2.34.how can i show the stable route?Please give me guidance.If you have any code related to this send me to my mail id honeymadhu999@gmail.com
Thank you
hello sir,
please give me the awk file for olsr tcl script...
ramkrishna.appu@gmail.com
hello mohit !
I have removed all the errors from tora.cc and tora.h and recompiled it...
Now, no error is coming.... but none of the node out of 6 is transferring the packets.. what could be the reason ?? Date of submission is coming closer...
@Ram - AWK Scripts provided in this blog are general and can be used for almost all routing protocols.
@Shruti - There can be many reasons:
They are not in communication range.
Transport agents are not correctly attached with respective nodes.
Applications are not correctly attached with respective transport agents.
Check your TCL script for logical errors.
Hope it helps.
Regards,
Mohit P. Tahiliani
@Mohit - Is this error related to tora.tcl file or tora.cc file/Imep.cc !!
because tora depends on IMEP protocol for transferring packets...
@Shruti - If its a .cc file error it should pop up the error while compilation. There can be few logical errors in .cc file as well but chances are less (since you have just corrected errors in .cc file). Check the traffic generation commands in TCL Script.
Hope it helps.
Regards,
Mohit P. Tahiliani
hello sir,
I'm getting my trace file as shown below after running tcl file for SOTP protocol:
s 0.085432179 _14_ RTR --- 0 message 32 [0 0 0 0] [energy 5.000000 ei 0.000 es 0.000 et 0.000 er 0.000] ------- [14:255 -1:255 32 0]
s 0.120159933 _19_ RTR --- 1 message 32 [0 0 0 0] [energy 5.000000 ei 0.000 es 0.000 et 0.000 er 0.000] ------- [19:255 -1:255 32 0]
s 0.138461062 _11_ RTR --- 2 message 32 [0 0 0 0] [energy 5.000000 ei 0.000 es 0.000 et 0.000 er 0.000] ------- [11:255 -1:255 32 0]
s 0.139445272 _35_ RTR --- 3 message 32 [0 0 0 0] [energy 5.000000 ei 0.000 es 0.000 et 0.000 er 0.000] ------- [35:255 -1:255 32 0]
s 0.308035199 _31_ RTR --- 4 message 32 [0 0 0 0] [energy 5.000000 ei 0.000 es 0.000 et 0.000 er 0.000] ------- [31:255 -1:255 32 0]
s 0.318331495 _9_ RTR --- 5 message 32 [0 0 0 0] [energy 5.000000 ei 0.000 es 0.000 et 0.000 er 0.000] ------- [9:255 -1:255 32 0]
would you please explain about this format.???
@Yashdeep - The trace file format which you have posted is explained on the following link:
http://www.cs.binghamton.edu/~kliu/research/ns2code/#trace
Hope it helps.
Regards,
Mohit P. Tahiliani
hello dear
I need to ask you something about the trace file that is showing a part of it below:
s 20.723314189 _67_ MAC --- 0 cbr 107 [0 37 43 800] ------- [67:0 45:0 30 55] [0] 0 0
s 20.727296165 _55_ MAC --- 0 ACK 5 [0 43 37 0]
r 20.727648189 _67_ MAC --- 0 ACK 5 [0 43 37 0]
r 20.728288165 _55_ MAC --- 0 cbr 100 [0 37 43 800] ------- [67:0 45:0 30 55] [0] 1 0
s 20.729856165 _55_ MAC --- 0 cbr 107 [0 1b 37 800] ------- [67:0 45:0 29 27] [0] 1 0
s 20.733696141 _27_ MAC --- 0 ACK 5 [0 37 1b 0]
r 20.734048165 _55_ MAC --- 0 ACK 5 [0 37 1b 0]
s 20.734594189 _67_ MAC --- 1 cbr 107 [0 37 43 800] ------- [67:0 45:0 30 55] [1] 0 0
r 20.734688141 _27_ MAC --- 0 cbr 100 [0 1b 37 800] ------- [67:0 45:0 29 27] [0] 2 0
How can I calculate the throughput , end to end delay and also what is the meaning by traffic load?
regards
Hello Mohit ,
I have 3 nodes sources, a one base station and 3 mobiles nodes .
a duplex link between first source and base station .
a duplex link between second source and base station .
a duplex link between third source and base station .
... they 3 nodes mobiles attached to base station .
I wanna get dropped packets , So, I increase they traffics in CBR . i get dropped packets in they source nodes .
Please, I want to change dropped packets in the node base station .
How I can do this ? It need agent or what ?!
thanks you in advance !
Please , how I can to this ...
@Afif - You can download the AWK Scripts for throughput, delay, etc from the link given below:
http://mohittahiliani.blogspot.com/2010/02/few-more-awk-scripts-for-ns2.html
AWK Script for calculating routing load is available on the following link:
http://mohittahiliani.blogspot.com/2011/08/awk-scripts-for-normalized-routing.html
@Hajjaji - You are getting packet drops at the sources because the "interval_" parameter of CBR is not set correctly. Do not use the default value of "interval_" because it is very less and generates more packets than the source's queue size.
Increase the value of "interval_" to avoid packet drops at the source.
Hope it helps.
Regards,
Mohit P. Tahiliani
Hello dear
First of all thanks for your help before . Actually I want to calculate association rate for wireless scenario (LR.WPAN) only.
I'm working on multi hope scenario (802.15.4)
have you any awk script to apply on it ? please. And the following is the part of my trace file.
s 20.502585000 _67_ MAC --- 0 AODV 55 [0 ffffffff 43 800] ------- [67:255 -1:255 30 0] [0x2 1 1 [45 0] [67 4]] (REQUEST)
r 20.505177024 _95_ MAC --- 0 AODV 48 [0 ffffffff 43 800] ------- [67:255 -1:255 30 0] [0x2 1 1 [45 0] [67 4]] (REQUEST)
r 20.505177024 _87_ MAC --- 0 AODV 48 [0 ffffffff 43 800] ------- [67:255 -1:255 30 0] [0x2 1 1 [45 0] [67 4]] (REQUEST)
r 20.505177024 _47_ MAC --- 0 AODV 48 [0 ffffffff 43 800] ------- [67:255 -1:255 30 0] [0x2 1 1 [45 0] [67 4]] (REQUEST)
r 20.505177024 _55_ MAC --- 0 AODV 48 [0 ffffffff 43 800] ------- [67:255 -1:255 30 0] [0x2 1 1 [45 0] [67 4]] (REQUEST)
s 20.508886390 _95_ MAC --- 0 AODV 55 [0 ffffffff 5f 800] ------- [95:255 -1:255 29 0] [0x2 2 1 [45 0] [67 4]] (REQUEST)
s 20.510016141 _25_ MAC --- 0 BCN 12 [0 ffffffff 19 0]
D 20.510592165 _52_ MAC COO 0 BCN 12 [0 ffffffff 19 0]
D 20.510592165 _13_ MAC COO 0 BCN 12 [0 ffffffff 19 0]
r 20.510592165 _41_ MAC --- 0 BCN 12 [0 ffffffff 19 0]
D 20.510592165 _53_ MAC COO 0 BCN 12 [0 ffffffff 19 0]
r 20.511478413 _67_ MAC --- 0 AODV 48 [0 ffffffff 5f 800] ------- [95:255 -1:255 29 0] [0x2 2 1 [45 0] [67 4]] (REQUEST)
r 20.511478413 _79_ MAC --- 0 AODV 48 [0 ffffffff 5f 800] ------- [95:255 -1:255 29 0] [0x2 2 1 [45 0] [67 4]] (REQUEST)
s 20.511579190 _47_ MAC --- 0 AODV 55 [0 ffffffff 2f 800] -------
Please tell me what is every Colum mean from beginning to the ending
Regards
Afif
Hello Mohit,
I couldn't download the script for new trace file (throughput). is the link broken?? Kindly help me with this soon...
THank you very much for your guidance!
@Afif - Yes you can use AWK files which I mentioned in my previous reply for the trace file which you have shown. Explanation of the trace file is provided on the following link:
http://www.cs.binghamton.edu/~kliu/research/ns2code/#trace
@Stud17 - You can download it from the following link:
http://www.megaupload.com/?d=DRPN6R4U
Hope it helps.
Regards,
Mohit P. Tahiliani
Mohit,
I tried running the new trace. But I get this output with my trace file,
Average Throughput[kbps] = -0.00 StartTime=400.00 StopTime=0.00
I read the previous posts that discusses the same problem (about routing protocol). But I didn't get where to make the required changes. I work on example.tcl file on hcca patch. This tcl file doesn't mention any routing protocol. I am wondering where and how to resolve this issue. Kindly do let me know..
Thanks in advance!
-Chithra
Hello,
I noticed that packet size is different from the trace file. In awk script it is 512, whereas trace file has different pkt size(160 & 180). I replaced "512" as "159" in the awk script and now i get the following output,
Average Throughput[kbps] = 254.44 StartTime=20.00 StopTime=99.98
Am not sure whether I did it correctly. Kindly let me know it is correct or not?
I believe the one am currently using is for the whole network. I am interested in calculating the throughput from node to node. Can you provide me script for that??
Looking forward for your reply..
Thank you
Sir i am using ns2.29+in windows.I want to simulate wireless mesh network.
1)Is it possible with ns 2.29?Any patch is available?
2)Am I able to change AODV trace format as my own wish?If so where I have to modify?
Could you please clear my doubts?
Thank you Sir
Hello Sir,
I wanna calculate end to end delay for my wireless scenario (uses new trace format).. Can you provide me scripts for that?? In one of the above posts you have mentioned to modify the column no. (from the old trace format). But I couldn't figure out exactly where and what exactly goes into the script?? Your help is highly appreciated... Kindly assist me..
Thanks!
@Chithra - Yes, the modification which you have made by changing packet size is correct. I have used 512 since majority of the simulations use packet size 512 or above.
If you are interested in finding throughput of every connection, you may have to modify the AWK Script by taking into consideration the source and the destination of the packet (last four columns of the line in trace files e.g. [98:0 0:0 32 0]).
Count received packets only for similar source-destination pair and divide it by total simulation time. That would give you throughput of that particular source-destination connection.
Regarding e2edelay.awk for new trace format - I have not yet designed yet. As soon as it is done, I will upload it here.
@Pdivya - No, there are no patches for WMN for ns-2.29 as far as I know. There are no patches specifically developed for WMN yet. You may get started with the Multiple interface patches provided for WMN in this blog. See the following link:
http://mohittahiliani.blogspot.com/2010/04/revised-adding-multiple-interface.html
Yes, you can modify AODV trace format. For that you need to make modifications in
ns-allineone-2.xx/ns-2.xx/trace/cmu-trace.cc
"format_aodv(Packet *p, int offset)" function.
Hope it helps.
Regards,
Mohit P. Tahiliani
Your blog is very informative sir. I learn very things from your blog. Can you please again upload awk throughput of new wireless trace format. because on above link i do not find the file of awk.
Hello sir,
HAPPY NEW YEAR..
i m new for ns2.i want to calculate the energy consumption of mobile nodes..please send this to my mail id..my id is kalaivani1989oct@gmail.com..
thanks in advance....
hi,
how i solve the link layer error
num_nodes is set 2
invalid command name "-llType"
while executing
"-llType $val(ll) \
"
(file "test.tcl" line 91)
@Hassan - You can download it from the following link: (filename: throughput_newtrace.awk)
http://www.megaupload.com/?f=0211SAG1
@Kalaivani - You can get it from the following link: (filename: energy.awk - modify it according to your requirements).
http://www.megaupload.com/?f=0211SAG1
Hope it helps.
Regards,
Mohit P. Tahiliani
how to convert new trace format into old trace format
sir
I am using AOMDV protocol..now i want to use other protocols like OLSR, GPSR...In my ns2.34(ubunthu) allinone package i am not having those packages..so when i was try to use that protocols in my program its not working..how to interface that protocols with my existing package?...where i can download...also i need the installation procedure...thanks in advance
hi,
how i solve the link layer error
num_nodes is set 2
invalid command name "-llType"
while executing
"-llType $val(ll) \
"
(file "test.tcl" line 91)
hiii
i got the same error but u dint post the answer please give me solution for this
@Vaishali - Comment the following line in your TCL Script:
$ns use-newtrace
@Shine - Patches of OLSR are available for most of the latest versions of NS-2 on the following link. Also you can find installation guide and sample TCL Scripts for OLSR on the same link.
http://masimum.inf.um.es/fjrm/?page_id=116
Patch for GPSR is available on the following link with some installation guidelines:
http://www.cs.binghamton.edu/~kliu/research/ns2code/index.html#gpsr
@Ram - Solution is provided on the following link -
http://www.linuxquestions.org/questions/programming-9/ns-2-problem-lltype-812414/
Hope it helps.
Regards,
Mohit P. Tahiliani
thanks for ur reply mohit by the solution to my problem isnot cleared using the link given by u can u please help me
num_nodes is set 2
invalid command name "-llType"
while executing
"-llType $val(ll) \
"
(file "test.tcl" line
respected sir ,
i am comparing AODV, DSR, and TORA, for avgDelay, packet loss,total dropped packets and throughput. i am using ns2.33 . i have tried with ur all awk script. but i am failed to get the result. plz help me and to write a single program to calculate for 3 routing protocols.that i can calculate those results of those routing protocols easily
thanx and regards
Respected sir, i am going to calculate and compaire of End to end avg delay, packet drop and average throughput of AODV, DSR, and TORA, when i am going to use ur e2edelay.awk and avgthroughput.awk. , i got a finite and comparable result foe AODV and DSR, but i am unable to get any comparable result for TORA with them using the both awk scripts...plz help me.
thanx and regards...
K.L.Hassan
@Ram - It seems this error pops up due to a small typo. Delete the entire $ns node-config line and re-type it once again. Do not directly paste it from some another source.
@Khondekar - TORA does not work correctly by default. It needs to be modified before use. Following link may be useful:
http://wpage.unina.it/marcello.caleffi/ns2/tora.html
Hope it helps.
Regards,
Mohit P. Tahiliani
hi
I am using the new trace file format for wimax simulation. I want to know the meaning of '-t' value ( ie 2nd column)in trace file. The document says it may indicate time. Please let me know if this is a significant parameter to consider to calculation. In you script for throughput I havent seen that you have used it. Please let me know
rgds
thanks mohit it worked
Hello Mr. Mohit
I tried to run your throughput_newtrace.awk file. It throws the following error: 'in expression: ^ invalid char' . What could be the problem?. I am running it in Fedora. Pl help me
thanks
Hello sir,
while running tcl script am getting this line "Skipping duplicate node 49 definition" and also duplicate nodes are generating in NAM.
Hello Sir
I am doing media independent handover in ns2 so i need the end to end delay scripts for both wired and wireless
respected sir,
thank you for reply me.
my Tora protocol is running, it provides the nam file and trace file after simulation successfully . but i am unable to calculate and compaire of End to end avg delay, packet drop and average throughput from AODV, DSR, and TORA, when i am going to use ur e2edelay.awk and avgthroughput.awk. , i got a finite and comparable result from the trace file of AODV and DSR, but i am unable to get any comparable result for TORA from tora.tr file with using the both awk scripts..
i hope u realize my problem what i am facing right now.
thanx and regards.
K.L.Hassan
sir please tell me the ns2 code for calculating end to end delay in wireless transmission.
Hi!
sir i am doing my project on becon enable sensor networks. sir i am facing a problem that cbr traffic is not transmitted frm source node, and pakets are over flow frm ifq. and in trace file it show D(drop) for all RTR level.
so kindly help me to solve it.
thnx
noor
Sir can you help me to get awk.throughput scripts for RBAR protocol.
Thanks
Tohid
s 0.638277248 _0_ AGT --- 1276 cbr 1000 [0 0 0 0] ------- [0:0 2:0 32 0] [638] 0 0
D 0.638277248 _0_ RTR IFQ 1264 cbr 1020 [0 0 0 0] ------- [0:0 2:0 32 0] [633] 0 0
s 0.638775008 _3_ MAC --- 1275 message 90 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0]
s 0.639147176 _1_ AGT --- 1277 cbr 1000 [0 0 0 0] ------- [1:0 3:0 32 0] [637] 0 0
D 0.639147176 _1_ RTR IFQ 1267 cbr 1020 [0 0 0 0] ------- [1:0 3:0 32 0] [632] 0 0
s 0.639253662 _0_ AGT --- 1278 cbr 1000 [0 0 0 0] ------- [0:0 2:0 32 0] [639] 0 0
D 0.639253662 _0_ RTR IFQ 1265 cbr 1020 [0 0 0 0] ------- [0:0 2:0 32 0] [634] 0 0
r 0.639495008 _2_ MAC --- 1275 message 32 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0]
r 0.639495008 _0_ MAC --- 1275 message 32 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0]
r 0.639495050 _1_ MAC --- 1275 message 32 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0]
D 0.639520050 _1_ IFQ ARP 1269 cbr 1040 [0 0 1 800] ------- [1:0 3:0 32 3] [633] 0 0
D 0.639520050 _1_ IFQ ARP 1270 cbr 1040 [0 0 1 800] ------- [1:0 3:0 32 3] [634] 0 0
D 0.639520050 _1_ RTR CBK 1272 cbr 1040 [0 0 1 800] ------- [1:0 3:0 32 3] [635] 0 0
D 0.639520050 _1_ RTR CBK 1274 cbr 1040 [0 0 1 800] ------- [1:0 3:0 32 3] [636] 0 0
s 0.639955050 _1_ MAC --- 0 ARP 86 [0 ffffffff 1 806] ------- [REQUEST 1/1 0/3]
s 0.640105465 _0_ AGT --- 1279 cbr 1000 [0 0 0 0] ------- [0:0 2:0 32 0] [640] 0 0
D 0.640105465 _0_ RTR IFQ 1268 cbr 1020 [0 0 0 0] ------- [0:0 2:0 32 0] [635] 0 0
s 0.640424168 _1_ AGT --- 1280 cbr 1000 [0 0 0 0] ------- [1:0 3:0 32 0] [638] 0 0
D 0.640424168 _1_ IFQ ARP 1277 cbr 1040 [0 0 1 800] ------- [1:0 3:0 32 3] [637] 0 0
sir i have posted my tr file here, please advice me which throughput program i have to use. also if u can explain it to me then it will be better for me.
Thanks
Tohid
@Kalpa - '-t' indicates that the next column (i.e. 3rd) represents time. It is not used in calculating results. It is the 3rd column which is the most important one.
Make sure you are running that script on trace file with new trace format. It wont work for old trace format.
@Priya - That is because you are creating same node more than once. Better to use a "for" loop to create nodes.
@Shrey - I have not yet designed such AWK Scripts yet! Will surely post it once they are designed.
@Khondekar Lutful Hassan - Look at the trace file format for TORA on the following link and modify those 2 AWK Scripts accordingly:
http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#TORA_Trace_Formats
@Mahfuz - Following link will be useful to you:
www-npa.lip6.fr/~rehmani/aodv_v2.pdf
@Chumki - You can download it from the following link:
http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html
@Noor - That occurs when you incorrectly set the "interval_" parameter of CBR. Default value is 0.005 which is very high.
Modify the interval value properly or if you do not know what interval to set - then use "rate_" parameter.
e.g. $cbr set rate_ 200Kb (220Kb is just for example)
@Tohid - AWK Scripts are designed to work with most of the protocols. For your trace file - you can use the AWK Scripts provided on the link below:
http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html
Hope it helps.
Regards,
Mohit P. Tahiliani
Thanks sir for your reply. i have another question that is how to create multi hop wireless topology using NSG2.1 also how to assign different rate to them. hopefully u will answer that very soon.
Tohid
actually i want to create a wireless topology where i can set different datarate for every node.
Hello Sir, I am using ns2.34 on fedora 8.I want to transmit the multimedia stream and want to calculate jitter,delay,throughput such things by taking multimedia stream as input.I have downloaded the Video_trace script from ns lib and aslo have verbose_jurassic as a trace format in .dat. How can i make use of it?..please guide me regarding this.
Thanks®ards
Sneha J
can any one answer me these question ..???
How the effect of interference is simulated in NS2
How do we create the scenario in NS2
How will we model the parameters such as network maximum
depth, maximum number of children a parent can accept and
the maximum number of routing-capable children a parent can
accept in NS2
How will we model the faults i.e. failure of nodes in
NS2.
How will we model the different network topologies used
in Zigbee such as mesh, heirarchical tree etc in NS2
What is the typical scenario for an AMR application
what are the data rates
what will be the transmission frequency
what are the expected delays
Hi Mohit,
Ur site s too good and helpful.. its really hard to follow up a blog and replying for all for these many years..
I am doing my M.tech in rgpv,Bhopal. i am from cse dept. i am thinking to do my project in ns-2. recently i have installed fedore n ns-2.32. til now i have evaluated e2edelay nd throughput for DSR..what shall i proceed further for my thesis..I need your help..please reply
Hello sir,
can you help me to write awk script for packet drop,
for DSDV protocol. does sequence no. is required to calculate it.
Thank you
Nilam
Hello mohit...
I am doing a project in ns2...Basically designing a routing protocol..So can u pleases tell how to write this awk script and how to call it in tcl??????
can u please help?
Thanks and regards Hridya.
hiii
i cant to calculate throughput for varying speed of mobile nodes using AODV protocol.......can i get the awk script
thank u
I work on online games with a client server architecture. the work required is to compraisser packets sent by the client which aims to optimize bandwidth.
I use the simulator ns2.34 Linux (CentOS 6.2), please is there someone who can give me the awk script that allows compraisser packages please help me what is urgent and thank you for your help
salam
Dear Mohit , i hope that you are ok and fine,well first, i am having a final project about vehicular networks , i am trying to simulate GPSR under NS2 , i did it, and now i am trying to measure the performance of that protocol GPSR , but i couldn't i had some problems , i didn't find the way to read the trace file , i am getting the received packets ("r","RTR") much more from sending packets ("s","RTR") , wish is not logical , i have visited some pages talking about the same problem , wish in it i found that your answering the people in there , so please could you help us to get the correct performance of that protocol ... and what should we do get them ... please guide me...and thank you so much in advance...
NB:the joined files is my scenario_file and my AWK-file ,traffic_file(CBR) .... , that i used to simulate GPSR protocol , NS2.33 , fedora14
Akram Kout (akramkout@hotmail.fr)
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 , first of all i would like to thank you for all your help to ns-2 users
am sure hundreds of students and researcher have done a great work because of your great help .....
sir am trying to simulate a handover senario in mobile wimax , am using ns-2.29 and nist mobility model
i need awk script or any tool that can help me analysis this trace file to get handoff delay
please help me if you can
M 0.00000 4194305 (45.00, 50.00, 0.00), (70.00, 50.00), 2.00
s -t 0.004001358 -Hs 1 -Hd -2 -Ni 1 -Nx 50.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
s -t 0.004056819 -Hs 2 -Hd -2 -Ni 2 -Nx 65.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
s -t 0.004090247 -Hs 1 -Hd -2 -Ni 1 -Nx 50.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
r -t 0.004090263 -Hs 3 -Hd -2 -Ni 3 -Nx 45.01 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
s -t 0.004145708 -Hs 2 -Hd -2 -Ni 2 -Nx 65.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
s -t 0.004223581 -Hs 1 -Hd -2 -Ni 1 -Nx 50.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
r -t 0.004223596 -Hs 3 -Hd -2 -Ni 3 -Nx 45.01 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
s -t 0.004279041 -Hs 2 -Hd -2 -Ni 2 -Nx 65.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
s -t 0.004401358 -Hs 1 -Hd -2 -Ni 1 -Nx 50.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
r -t 0.004401374 -Hs 3 -Hd -2 -Ni 3 -Nx 45.01 -Ny 50.00 -Nz 0.00 -Ne -1.000000
am so sorry for the long post
Hi mahit
I want to simulate UMTS by using ns2 with EURANE
I have trace file as a result of this simulation
But I don't understand it
I want to create awk script to analyze this file ??
please can you help me
Really I need your help
Thank you;
Hi Mohit,
I'm working on wireless network consists of 1 access point and 9
nodes, all the nodes communicates with each other through access
point.
In this network i need to find Channel busy time=medium busy time/
cycle time, and packet transmission time but i don't know how to
calculate them.
If you know anything in this regard then please let me know, it would
be very helpful for me.
Thank You
hello everyone can anyone tell me how to find the handover latency from trace file or anyone has any awk script for handover latency, end to end delay, jitters.
Hi
I am currently working on highspeed using tcp-linux ns2.34.I want to meauser/plot throughtput.
Tracing format is
+ 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
Please help me.
How to find the througput fro the trace file format of smac protocol
s 43.000000000 _0_ AGT --- 3 cbr 512 [0.00 0 0] [energy 963.442548 ei 36.471 es 0.006 et 0.049 er 0.021] ------- [0:0 10:0 32 0] [3] 0 0
r 43.000000000 _0_ RTR --- 3 cbr 512 [0.00 0 0] [energy 963.442548 ei 36.471 es 0.006 et 0.049 er 0.021] ------- [0:0 10:0 32 0] [3] 0 0
s 43.000000000 _0_ RTR --- 3 cbr 512 [0.00 0 0] [energy 963.442548 ei 36.471 es 0.006 et 0.049 er 0.021] ------- [0:0 10:0 32 0] [3] 0 0
D 43.000000000 _0_ IFQ ARP 2 cbr 512 [0.00 0 0] [energy 963.442548 ei 36.471 es 0.006 et 0.049 er 0.021] ------- [0:0 10:0 32 0] [2] 0 0
D 43.000000000 _0_ IFQ ARP 3 cbr 512 [0.00 0 0] [energy 963.442548 ei 36.471 es 0.006 et 0.049 er 0.021] ------- [0:0 10:0 32 0] [3] 0 0
s 43.024004000 _3_ MAC --- 0 SYNC 9 [0.11 3 4] [energy 958.296506 ei 41.650 es 0.001 et 0.012 er 0.038]
N -t 43.024005 -n 2 -e 964.692057
N -t 43.024005 -n 4 -e 965.978567
N -t 43.024005 -n 1 -e 962.119035
N -t 43.024005 -n 5 -e 964.692056
s 43.101203333 _0_ MAC --- 0 ARP 28 [0.00 -1 0] [energy 963.442548 ei 36.471 es 0.006 et 0.049 er 0.021] ------- [REQUEST 0/0 0/10]
N -t 43.101204 -n 1 -e 962.001837
N -t 43.101205 -n 2 -e 964.574857
N -t 43.133203 -n 7 -e 960.725328
N -t 43.133203 -n 4 -e 965.871368
N -t 43.133203 -n 6 -e 963.298346
N -t 43.133203 -n 10 -e 962.011837
N -t 43.133203 -n 8 -e 964.584858
N -t 43.133204 -n 9 -e 963.298347
N -t 43.133204 -n 3 -e 958.152306
N -t 43.133204 -n 5 -e 964.584857
r 43.144204000 _1_ MAC --- 0 ARP 28 [0.00 -1 0] [energy 962.001837 ei 37.857 es 0.005 et 0.009 er 0.119] ------- [REQUEST 0/0 0/10]
s 44.000000000 _0_ AGT --- 4 cbr 512 [0.00 0 0] [energy 963.288348 ei 36.582 es 0.006 et 0.092 er 0.021] ------- [0:0 10:0 32 0] [4] 0 0
r 44.000000000 _0_ RTR --- 4 cbr 512 [0.00 0 0] [energy 963.288348 ei 36.582 es 0.006 et 0.092 er 0.021] ------- [0:0 10:0 32 0] [4] 0 0
s 44.000000000 _0_ RTR --- 4 cbr 512 [0.00 0 0] [energy 963.288348 ei 36.582 es 0.006 et 0.092 er 0.021] ------- [0:0 10:0 32 0] [4] 0 0
N -t 44.423003 -n 7 -e 960.723038
N -t 44.423003 -n 4 -e 965.869078
N -t 44.423003 -n 6 -e 963.296057
N -t 44.423003 -n 10 -e 962.009548
N -t 44.423003 -n 8 -e 964.582568
N -t 44.423004 -n 9 -e 963.296057
N -t 44.423004 -n 3 -e 958.150016
N -t 44.423004 -n 5 -e 964.582567
s 44.513203333 _0_ MAC --- 0 ARP 28 [0.00 -1 0] [energy 963.288348 ei 36.582 es 0.006 et 0.092 er 0.021] ------- [REQUEST 0/0 0/10]
N -t 44.513204 -n 1 -e 960.589837
N -t 44.513205 -n 2 -e 963.162857
r 44.556204000 _1_ MAC --- 0 ARP 28 [0.00 -1 0] [energy 960.589837 ei 39.226 es 0.005 et 0.009 er 0.162] ------- [REQUEST 0/0 0/10]
N -t 44.566203 -n 7 -e 960.578838
N -t 44.566203 -n 4 -e 965.724878
N -t 44.566203 -n 6 -e 963.151857
@Tohid – NSG2.1 has several options like creating a linear topology (may be vertical or horizontal), a grid, random topology and custom topology. Use any of the options which you require and it will automatically generate a multi-hop topology for you. However, if you want to give separate data rate to every node – you have to do that manually.
@Sneha – The following links will be useful for you:
http://hpds.ee.ncku.edu.tw/~smallko/ns2/Evalvid_in_NS2.htm
http://ns-2.blogspot.in/2007/05/streaming-media-system-for-ns-2.html
@Ammar – The default transmission range in ns-2 is 250m. Whichever nodes fall under this region – suffer from interference.
Scenarios can be created by writing TCL scripts either by hand or by using generators such as NSG (See this blog: http://mohittahiliani.blogspot.in/2009/10/tcl-script-generator.html)
All these parameters can be modeled in TCL Script itself. See ns-2 manual for more detail.
ns-2 has a built-in error model by which you can model error in the simulations.
Different topologies mentioned by you can be created by using NSG tool.
Data rates, transmission frequency and delays are to be configured by the user. You can set as per your requirements.
@Ravi – I hope by this time you might have already completed your project. I guess you might have worked on designing a new routing protocol for MANETs. If not, that’s a decent area to work with for Post Graduate projects.
@Nilam – You can use pdf.awk available here:
http://mohittahiliani.blogspot.in/2009/12/awk-script-for-ns2.html.
It will give you successful packet delivery ratio which I believe is more important parameter.
@Hridya – AWK scripts remain same for most of the wireless TCL scripts unless you modify the format of the trace file. If you are not modifying the format – no need to write a new AWK script as well.
@Ram – Use ./setdest generator provided inside ns-2 to generate mobility with varying speed. See Marc Greis tutorial – Section XI.2 for commands to use “setdest”.
Once you are done with generating mobility scenarios – run your simulation and later, use genthroughput.awk provided on the following link to calculate throughput:
http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html
@Akram – How to interpret trace file for wireless simulations is provided on the following link:
http://www.cs.binghamton.edu/~kliu/research/ns2code/index.html#trace
@Khoso – I believe that would work!
@Sandy Haff – The trace file format posted by you appears to be a new one. In this format – I don’t see fields corresponding to hand-offs. I would recommend you to ask your query to the author of that wimax patch.
@Boughdiri – Understanding the trace file format is important for designing correct AWK script. I would recommend you to try to understand trace format first and then attempt to write an AWK Script.
Hope it helps.
Regards,
Mohit P. Tahiliani
@Sharan Noola – Channel idle time can be obtained from the C++ parameter called “channel_idle_time_”. See line #00090 on the following link:
http://rp.lip6.fr/ns-doc/ns226-doc/html/wireless-phy_8h-source.htm
@Shrey – AWK Script for end to end delay is available on the following link:
http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html
And the one for jitter is available here:
http://mohittahiliani.blogspot.in/2009/12/awk-script-for-ns2.html
@Nir – Use trace2stats.tgz for analyzing these kind of trace files. It is available on the following link:
http://perso.citi.insa-lyon.fr/mfiore/data/trace2stats_v05b.tgz
@Gayatri – AWK script named “genthroughput.awk” available on the following link can be used:
http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html
Hope it helps.
Regards,
Mohit P. Tahiliani
Hi Mohit,
Thank you for this blog...
It's very great and helping for me...
I have some error problem to run awk script for my trace file.
May you help me?
Here is the error sample :
root@doan-laptop:/home/doan/Desktop# awk -f delay_throughput_AODV_edit2.awk tracefile_doan.tr
Total Delay ms:0.000000
Total Sent AGT CBR Packets :0.000000
Total Drop RTR Packets :0.000000
Number of RTR received packets:0.000000
Number of Agent CBR received packets:0.000000
awk: delay_throughput_AODV_edit2.awk:85: (FILENAME=tracefile_doan.tr FNR=269) fatal: division by zero attempted
This is my trace file (sample) :
r 0.011019409 6 60.00 0.00 -99 0 (null) 170745444 --- 5 DSRCApp 800 [0 ffffffff 1f 0] ------- [31:0 -1:0 32 0]
r 0.011019409 56 60.00 10.00 -99 0 (null) 183160868 --- 5 DSRCApp 800 [0 ffffffff 1f 0] ------- [31:0 -1:0 32 0]
s 0.013383680 98 230.00 15.00 -99 0 (null) 193661108 --- 13 DSRCApp 800 [0 0 0 0] ------- [98:0 -1:0 32 0]
s 0.013404596 52 20.00 10.00 -99 0 (null) 182149948 --- 6 DSRCApp 828 [0 ffffffff 34 0] ------- [52:0 -1:0 32 0]
D 0.013404863 85 100.00 15.00 -99 0 (null) 190281692 PXB 1 DSRCApp 828 ------- [90:0 -1:0 32 0]
D 0.013404863 85 100.00 15.00 -99 0 (null) 190281692 PXB 6 DSRCApp 828 ------- [52:0 -1:0 32 0]
s 0.014901910 64 140.00 10.00 -99 0 (null) 185211700 --- 14 DSRCApp 800 [0 0 0 0] ------- [64:0 -1:0 32 0]
r 0.015660613 27 20.00 5.00 -99 0 (null) 175958180 --- 6 DSRCApp 800 [0 ffffffff 34 0] ------- [52:0 -1:0 32 0]
r 0.015660613 77 20.00 15.00 -99 0 (null) 188372588 --- 6 DSRCApp 800 [0 ffffffff 34 0] ------- [52:0 -1:0 32 0]
s 0.015732031 55 50.00 10.00 -99 0 (null) 182892532 --- 3 DSRCApp 828 [0 ffffffff 37 0] ------- [55:0 -1:0 32 0]
s 0.015732031 55 50.00 10.00 -99 0 (null) 182854132 --- 3 DSRCApp 828 ------- [55:0 -1:0 32 0]
Thanks,
Sincerely yours,
Doan
@Doan - Your trace file seems to be bit different than the usual old trace file format. E.g., 4th column usually represents the layers i.e., AGT or RTR or IFQ, etc. But in your trace file - 4th column contains some numbers. Moreover, AGT/RTR/IFQ never appear in your trace file and hence, you are getting those values as 0 when you run the AWK Script.
Generally packet type (e.g., in your case it is DSRCApp) is represented in the 7th column but in your trace file it is represented in 11th or may be 12th column.
There are a couple of things you can try:
1. Find out the exact meaning of each column in your trace file - so that AWK script can be modified accordingly.
2. Suppose you dont get exact meaning of this trace format - in that case change the column numbers in your present AWK script and try running again E.g., $7 must be replaced by $11 or $12 (because in your trace file - packet type is printed either in 11th column or 12th column. I am not able to count properly as it is not structured. You may take a close look and find out whether it is 11th or 12th).
Hope it helps.
Regards,
Mohit P. Tahiliani
Hi sir,
Am using ns 2.34 under fedora os. am doing project in wired cum wireless scenario. i want to patch snoop.cc file with my tcl script.Can u help me sir
Hi sir,
I want to calculate throughput and end to end delay in wired cum wireless environment. can u help me sir.
@Shiny John - snoop.cc is already available in ns-2 by default. You can find it in the following directory:
ns-allinone-2.xx/ns-2.xx/tcp
In your TCL - instead of using LL - use LL/Snoop
I do not have AWK Scripts for wired-cum-wireless scenario. You may try designing yourself with the help of scripts provided on this blog.
Hope it helps.
Regards,
Mohit P. Tahiliani
Good day sir,
I am doing project to compare various tcp variants base on goodput, i need help from your side u have already posted throughput for wireless networks,can u just post awk script for GOODPUT calculation where we are not considering retransmission
Thanking in advance
@Bimal Patel - I have not designed one still for that but doing it would be quite simple. You need to make use of "Sequence number" column and just ignore "Sequence numbers" which appear twice. This is because when a packet is re-transmitted - its sequence number remains same and hence, based on sequence number column in the trace file, we can identify whether the packet is a re-transmitted one or a fresh one.
If it is a re-transmitted packet - don't add its size in your calculations and do not increment the packet counter as well.
Hope it helps.
Regards,
Mohit P. Tahiliani
hello mohit m doing project on wired simulations and i want to calculate end to end delay and throughput from trace file......can u pls help me????
my trace format is as follows:
+ 1.010213 1 2 tcp 40 ------- 1 0.0 2.0 0 0
- 1.010213 1 2 tcp 40 ------- 1 0.0 2.0 0 0
r 1.020427 1 2 tcp 40 ------- 1 0.0 2.0 0 0
@Prajapati Kinjal - You can use the AWK Scripts provided on the following link for the same:
http://perso.citi.insa-lyon.fr/mfiore/data/trace2stats_v05b.tgz
See the README file provided on the above link for more details.
Hope it helps.
Regards,
Mohit P. Tahiliani
Thank u sir for proving valuable response but i just want to add that in goodput even we are excluding protocol overhead along with retransmission and what changes we need to make to genthroughput.awk script provided on your blogs for new trace file format.
Thank u
Even the link provided for various awk script
http://www.megaupload.com/?f=0211SAG1 is not working
Thanking in advance
@Bimal Patel - Protocol overhead is already excluded in the AWK Script provided on this blog. You just need to remove the re-transmitted data amount from this AWK Script to make it work for goodput.
Do not refer to any of the megaupload links because megaupload website has stopped working long back. All links on this blog (except the ones provided in my "Replies to Comments") have been modified and the content has been shifted to mediafire.
Follow this link: http://www.mediafire.com/?z1c2cxdt1a31d
Hope it helps.
Regards,
Mohit P. Tahiliani
hi;
I wrote a tcl script, multicast traffic with a ring topology, I get a prune in the trace file. I don't know how to eliminate these prune from the trace file.
Please if possible did me how to eliminate these prune I want to obtain a trace file that contains no prune.
I work with NS2.34 in CentOs 6.2 wired network. Thank you very much for your help
@Nouran - I recommend you to take a look at mcast.tcl which is provided in the default ns-2 package in the following directory:
ns-allinone-2.xx/ns-2.xx/tcl/ex
You can test its working and also check its trace file. Later you can modify it to work for your scenario i.e., ring topology, etc.
Hope it helps.
Regards,
Mohit P. Tahiliani
Hello, I have a question.
I need to analyse Packet loss in ns2. Is it possible?
Do you have a script for that?
Thsnks
@Dmitry - Yes, you can use pdf.awk available on the following link to calculate packet loss in ns-2:
http://www.mediafire.com/?z1c2cxdt1a31d
Hope it helps.
Regards,
Mohit P. Tahiliani
good afternoon sir,i have generated tcptahoe with aodv for 10 nodes cbr traffic using NSG2.O when i am running .tcl files it gives error
Missing required flag -x in: W -t 50.0
Missing required flag -y in: W -t 50.0
Parsing error in event.
Can u suggest the solution for it.
Thanking in advance.
@Mohit i am sorry, but can you expane how i can use it?
@Bimal - You have not generated the traffic correctly. Use FTP when you use TCP or else set the parameters of CBR correctly if you are using it on top of TCP. Try generating again with correct parameters.
@Dmitry - Keep your trace file and AWK script in the same folder. Go in that folder via terminal and give the following command:
awk -f filename.awk filename.tr
Hope it helps.
Regards,
Mohit P. Tahiliani
Thanks for response but i have tried again using NSG2 and this time i have used ftp(start time 1 and stop time 2) and as agent TCP for protocol AODV using 5 nodes random packet size 1500 bytes and 1000*1000
But again it gives same error
Missing required flag -x in: W -t 50.0
Missing required flag -y in: W -t 50.0
Parsing error in event.
Nam is opening even its running but due to error it is not showing anything in out.tr file
Plz help sir
Thanking in advance
Sir it wound be nice if you provide fb account for online assistance help
Sir i want tcl script with aodv as protocol tcptahoe as agent and ftp with 5 mobile wireless node and even i want same with cbr insteat of ftp using NSG.How can set ftp to first node and tcp sink to last node and in case of node setup for movement they are asking destination(x,Y) and speed wht we need to write in case of speed
Thanking in advance
@Bimal - I would recommend you to go through Section IX and Section XI of "Marc Greis Tutorial" first and then generate the TCL Scripts by using NSG.
Hope it helps.
Regards,
Mohit P. Tahiliani
Thanks for advice. I had gone through section IX and section XI and tried but still it shows the same error any ways i have already done using cbrgen.tcl file available in ns2 there i have tried with tcp/ftp and udp/cbr and even node movement using setdest and it is sucessful but since i am working on Tcp variants how can i generate other tcp variants(tahoe,reno,new reno,vegas) using cbrgen.tcl
Thanking in advance for valuable support
@Bimal - If you have already generated TCP/FTP using cbrgen.tcl then you just need to do "Find and Replace".
For TCP Reno - replace TCP in the generated file by "TCP/Reno". No need to change TCPSink.
For TCP Newreno - replace TCP in the generated file by "TCP/Newreno". No need to change TCPSink.
For TCP Sack - replace TCP in the generated file by "TCP/Sack1" and TCPSink by "TCPSink/Sack1"
Similarly, repeat the same for all other TCP variants whichever you wish to simulate. Thats it!
Hope it helps.
Regards,
Mohit P. Tahiliani
thanks, but everytime is (throughput - 0 ) Is it working for WiMAAX?
@Dmitry - Which throughput file are you using? Please use genthroughput.awk available on the following link:
http://mohittahiliani.blogspot.in/2010/02/few-more-awk-scripts-for-ns2.html
Make sure your packet size in TCL is more than 500 bytes. If it is not, replace the same in AWK Script also. This AWK script will work for old trace format. I am not sure WiMAX TCL Scripts use which trace format.
Hope it helps.
Regards,
Mohit P. Tahiliani
i have got a result that s: 5555556, r:480678, r/s Ratio:0.0865, f:0.
What does it mean?
How many packets were droped?
Thanks
Dima
@Dmitry - r/s Ratio means "received / sent Ratio". Multiply it with 100 to convert it to percentage. In your case 0.0865 * 100 = 8.65%. It means 8.65% of the packets were delivered successfully and remaining were dropped.
Hope it helps.
Regards,
Mohit P. Tahiliani
i, Sir i have made some changes to protoname protocol. when i type the make command there are no error's. But changes done to the protoname does not reflect, when i run it. one of my friend told to type this command to reflect the changes
./ns ~/ns-allinone-2.35/ns-2.35/protoname/mob1.tcl
I got the following error message
num_nodes is set 9
INITIALIZE THE LIST xListHead
(_o17 cmd line 1)
invoked from within
"_o17 cmd port-dmux _o26"
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 "_o17" line 2)
(SplitObject unknown line 2)
invoked from within
"$agent port-dmux $dmux_"
(procedure "_o14" line 11)
(Node/MobileNode add-target-rtagent line 11)
invoked from within
"$self add-target-rtagent $agent $port"
(procedure "_o14" line 28)
(Node/MobileNode add-target line 28)
invoked from within
"$self add-target $agent $port"
(procedure "_o14" line 15)
(Node attach line 15)
invoked from within
"$node attach $ragent [Node set rtagent_port_]"
(procedure "_o3" line 89)
(Simulator create-wireless-node line 89)
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(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 360
}"
(file "/home/deepak/ns-allinone-2.35/ns-2.35/protoname/mob1.tcl" line 74)
hi Mohit.
Need your help.
By applying your scripts with my trace file I am not getting the output.
I am posting the result what I get using it..
Please help me out.
[Bhumi@localhost mywork]$ awk -f genthroughput.awk aodv_50node.tr
Average Throughput[kbps] = -0.00 StartTime=400.00 StopTime=0.00
[Bhumi@localhost mywork]$ awk -f nrl_nt.awk aodv_50node.tr
##################################################################################
awk: nrl_nt.awk:22: (FILENAME=aodv_50node.tr FNR=28238) fatal: division by zero attempted
[Bhumi@localhost mywork]$ awk -f nrl_ot.awk aodv_50node.tr
##################################################################################
awk: nrl_ot.awk:22: (FILENAME=aodv_50node.tr FNR=28238) fatal: division by zero attempted
[Bhumi@localhost mywork]$ awk -f instantJitter.awk aodv_50node.tr
# flow flowType src dst time jitter1 jitter2 jitter3 jitter4
[Bhumi@localhost mywork]$ awk -f instantJitter1.awk aodv_50node.tr
# flow flowType src dst time jitter1 jitter2 jitter3 jitter4
it may possible that my tcl script may have error.though its working properly..
Bt if possible please give me the tcl script for aodv,dsdv for 50 nodes forwrding data between 6th nad 30th node in network..
sir i am doing my project using ns2.34 simulator for comparing energy consumption now want to know how we can find routing energy,mac energy,control energy consumption
Hello Sir,
I am doing my project work in MANET to provide QoS at MAC layer. For that I want to compare performance of differnt protocols like PRTMAC , Priority MAC Protocol.
I want to know how can I get the source code of these protocols?
Kindly advise me for this.
i am doing my project using ns2.34 simulator for comparing energy consumption now want to know how we can find routing energy,mac energy,control energy consumption
i need to trace the distance in the terminal using two ray propogation model can u help me sir its urgent
Hello sir,
I just want to count total number of packet send and recieve for 10 and 20 nodes scenario for normal and blackhole behavior for AODV
Can u suggest the awk script for it new trace format
Hi Mohit
I am new in NS2 and I need your help please. I would like to add 4 routing protocols (FLOODING, DIRECT DIFFUSION, ANT, GOSSIPING ) in my NS2.35 folder and I want them to run with a TCL code that we have built with a some colleagues. Please tell what should I do?
hi mohit
how I add any column in the trace AODV ?
thank you for your help.
ci-dessous mon adresse mail: h.naanani@gmail.com
Hello , i want to analyse the performance of the dccp protocol by comparing it with tcp and tfrc protocols with having one delay graph and throughput graph. But i didn't know how programing with tcl and awk may you help me please ? to have the tcl code and the graphs . :(
Thanks
Hi Mohit,
i am working on ns2.28 in ubuntu10.04 with virtualbox.
my project is analyzing energy efficient protocol in MANET. after adding span protocol in ns2.28, any other example file cannot run.
how can i do? please help me . i really need your help.
hello am lecturer in kau university am working in adhoc networks now i have a problem with dymo after the execution the dymo script in the ip trace -it filed is coming as undefined ,its not specify the packet type as either cbr or dymo.
#==============================================================================
# Define Node Configuration paramaters
#==============================================================================
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 30 ;# number of mobilenodes
set val(rp) DYMOUM ;# routing protocol
set val(x) 1000 ;# X dimension of the topography
set val(y) 1000 ;# Y dimension of the topography
#==============================================================================
# Initialize Simulator
#==============================================================================
set ns_ [new Simulator]
$ns_ use-newtrace
Agent/DYMOUM set debug_ true
Agent/DYMOUM set no_path_acc_ true
Agent/DYMOUM set reissue_rreq_ true
Agent/DYMOUM set s_bit_ false
Agent/DYMOUM set hello_ival_ 1
#==============================================================================
# Initialize Trace file
#==============================================================================
$ns_ use-newtrace
set tracefd [open Tcp30.tr w]
$ns_ trace-all $tracefd
#==============================================================================
=
# Initialize Network Animator
#==============================================================================
set namtrace [open NMp30.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
#==============================================================================
# set up topography object
#==============================================================================
set topo [new Topography]
$topo load_flatgrid 1000 1000
#==============================================================================
# set up God object
#==============================================================================
set god_ [new God]
create-god $val(nn)
#==============================================================================
# configure nodes
#==============================================================================
$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON\
-macTrace OFF \
-movementTrace OFF
#==============================================================================
# Create Nodes
#==============================================================================
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
}
#==============================================================================
#disable random motion
#==============================================================================
for {set i 0} {$i < $val(nn) } {incr i} {
$node_($i) random-motion 0 ;# disable random motion
}
#==============================================================================
# Create Random Mobility
#==============================================================================
source "scen-n30-r1"
#==============================================================================
# Create Random Traffic
#==============================================================================
source "cmu-cbr-n30-mc18"
#==============================================================================
# defines the node size in Network Animator
#==============================================================================
for {set i 0} {$i < $val(nn)} {incr i} {
$ns_ initial_node_pos $node_($i) 40
}
#==============================================================================
# Stop Simulation at Time 200 sec
#==============================================================================
$ns_ at 200.0 "stop"
#==============================================================================
# Reset Nodes at time 200 sec
#==============================================================================
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at 200.0 "$node_($i) reset";
}
#==============================================================================
# Exit Simulatoion at Time 200.01 sec
#==============================================================================
$ns_ at 200.01 "puts \"NS EXITING...\" ; $ns_ halt"
#==============================================================================
# Procedure Stop
#==============================================================================
proc stop {} {
global ns_ tracefd
# Reset Trace File
$ns_ flush-trace
close $tracefd
exit 0
}
#==============================================================================
# Start Simulation
#==============================================================================
puts "Starting Simulation..."
$ns_ run
and this is my trace file
s -t 0.000000000 -Hs 0 -Hd -1 -Ni 0 -Nx 227.36 -Ny 670.59 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.255 -Id -1.255 -It undefined -Il 24 -If 0 -Ii 0 -Iv 1 -P DYMOUM(HELLO) -Pm 0 -Ph 0 -Pl 4
s -t 0.000000000 -Hs 1 -Hd -1 -Ni 1 -Nx 443.15 -Ny 719.55 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 1.255 -Id -1.255 -It undefined -Il 24 -If 0 -Ii 1 -Iv 1 -P DYMOUM(HELLO) -Pm 0 -Ph 0 -Pl 4
s -t 0.000000000 -Hs 2 -Hd -1 -Ni 2 -Nx 578.73 -Ny 638.75 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 2.255 -Id -1.255 -It undefined -Il 24 -If 0 -Ii 2 -Iv 1 -P DYMOUM(HELLO) -Pm 0 -Ph 0 -Pl 4
s -t 0.000000000 -Hs 3 -Hd -1 -Ni 3 -Nx 9.34 -Ny 414.99 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 3.255 -Id -1.255 -It undefined -Il 24 -If 0 -Ii 3 -Iv 1 -P DYMOUM(HELLO) -Pm 0 -Ph 0 -Pl 4
s -t 0.000000000 -Hs 4 -Hd -1 -Ni 4 -Nx 323.29 -Ny 139.04 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 4.255 -Id -1.255 -It undefined -Il 24 -If 0 -Ii 4 -Iv 1 -P DYMOUM(HELLO) -Pm 0 -Ph 0 -Pl 4
s -t 0.000000000 -Hs 5 -Hd -1 -Ni 5 -Nx 37.52 -Ny 836.56 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 5.255 -Id -1.255 -It undefined -Il 24 -If 0 -Ii 5 -Iv 1 -P DYMOUM(HELLO) -Pm 0 -Ph 0 -Pl 4
s -t 0.000000000 -Hs 6 -Hd -1 -Ni 6 -Nx 883.94 -Ny 280.50 -Nz 0.00 -Ne -
Sir I am also getting same error in trace file in case of DYMOUM in ns 2.34. Please help.
IF U INSTALL DYMOUM IN NS 2.35 I THINK MAY IT WILL WORK OUT BUT THE PROBLEM IS WE DONT GET NS dymoum_ns-2.35_v0.3.patch file. EASILY
IF YOU GOT IT JUST POST THE LINK.
hi mohit sir,
i wanna get throughput of 10,20,30,40,and 50 nodes for aodv,dsdv and dsr.
i m getting this error while commanding xgraph aodv.xgr
Error in file `aodv.xgr' at line 1:
Unknown line type
Problems found with input data.
i have read your answers to the ns2 users who had the same errors but i m not exactly getting how to modify that throughput.awk file and i m not able to overcome the error..so kindly pls help me sir...
thank u very much sir..
hi, can you plz give instructions to write the awk script for energy occupied in power aware routing of AODV and DSR...
I am doing something about wireless Lan handover simulation but yet i donno where to find the example TCL file. your known whr can get it?
after i typr the coding awk -f packetdeliveryfaction.awk wireless_mitf.tr > out.xgr
i get cbr s:4101 r:4079, r/s Ratio:0.9946, f:0 in the xgr file.
and after that i type xgraph out.xgr . the error shows Error in file `out.xgr' at line 1:
Unknown line type
Problems found with input data.
why there are no xgraph drawn?
Sir while running aodv under 10 nodes i am getting throughput 314 and when i apply blackhole under aodv 10nodes wity one blackhole it is reduced to 234.Is is valid to get throughput above 100 what is the reason for getting throughput above 100
Hello Guys,
I'm working with wireless scenario (LR-WPAN), multi hope scenario (802.15.4). I got this error. some packet have dropped. could anyone help me for interpreting and give me reason. I couldn't solve the problem. Please help me. The error appears in trace file as follow:
D 12.538268120 _0_ MAC LQI 0 AODV 39 [0 ffffffff 3 800] ------- [3:255 -1:255 1 0] [0x8 1 [0 0] 0.000000] (ERROR)
D 12.538454147 _2_ RTR CBK 297 video 110 [0 1 2 800] ------- [2:0 0:0 30 1]
D 12.538454147 _2_ RTR CBK 298 video 65 [0 1 2 800] ------- [2:0 0:0 30 1]
D 12.538454147 _2_ RTR CBK 299 video 110 [0 1 2 800] ------- [2:0 0:0 30 1]
D 12.538454147 _2_ RTR CBK 300 video 106 [0 1 2 800] ------- [2:0 0:0 30 1]
D 12.538454147 _2_ RTR CBK 301 video 110 [0 1 2 800] ------- [2:0 0:0 30 1]
D 12.538454147 _2_ RTR CBK 302 video 103 [0 1 2 800] ------- [2:0 0:0 30 1]
s 12.539603080 _3_ MAC --- 285 video 117 [0 0 3 800] ------- [3:0 0:1 30 0]
D 12.542294110 _1_ RTR CBK 295 video 110 [0 0 1 800] ------- [2:0 0:0 29 0]
D 12.542294110 _1_ RTR CBK 296 video 110 [0 0 1 800] ------- [2:0 0:0 29 0]
s 12.542447147 _2_ MAC --- 0 AODV 39 [0 ffffffff 2 800] ------- [2:255 -1:255 1
Thanks in advance.
can you me with the awk script to find the convergence time ?
thank you :)
how to run awk script
Mohit Sir,
I want to calculate handoff delay and overhead in mipv6 mobiwan patch
Thanks in advance.
Sir Mohit
Can you help me with hwmp file that I can patch into my NS2.34
Thank you in advance.
Hi Mohit sir,
i am new to ns2. I tried to add wrfp protocol. when i run "make", this is the error I got:
cc1plus: error: /root/ns-allinone-2.34/tclcl-1.19: Permission denied
cc1plus: error: /root/ns-allinone-2.34/otcl-1.13: Permission denied
cc1plus: error: /root/ns-allinone-2.34/include: Permission denied
cc1plus: error: /root/ns-allinone-2.34/include: Permission denied
cc1plus: error: /root/ns-allinone-2.34/include: Permission denied
make: *** [tools/random.o] Error 1
Pls help in rectifying this error..
awaiting ur reply
By Sandhya
hey Sandhya, are u using cygwin or u r running ns2 under ubuntu ?
@ unknown : to run an awk script u should type the following:
awk -f urawkscript.awk urtracefile.tr
hiii mohit
i want to create mesh(802.11s) topology with 1MPP,2MP,5AP and 20 nodes/stations using AODV protocol and calculate throughput .can send me the tcl script.my email id is wcn802@gmail.com
regards
how can i generate scenario for 50,100,250 and 500 nodes in AODV.tcl.? what kind of changes I need to do
I want ti implement 802.15.4 on ns2 plz guide me how i can implement it.....?
Sir, may i have the link to your "AWK script for average end-to-end delay supporting new trace format". i urgently need this for my project which is due in a few days. below is part of my traffic.tr dump:
s -t 0.003744195 -Hs 3 -Hd -1 -Ni 3 -Nx 160.00 -Ny 135.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 0 -Mt 800 -Is 4194304.0 -Id -1.0 -It udp -Il 120 -If 0 -Ii 0 -Iv 32
s -t 0.014204661 -Hs 5 -Hd -1 -Ni 5 -Nx 160.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 12582912.0 -Id -1.0 -It udp -Il 48 -If 0 -Ii 1 -Iv 32
s -t 0.020928312 -Hs 5 -Hd -1 -Ni 5 -Nx 160.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 2 -Mt 800 -Is 12582912.0 -Id -1.0 -It udp -Il 120 -If 0 -Ii 1 -Iv 32
.......
.......
s -t 2.014204661 -Hs 5 -Hd -1 -Ni 5 -Nx 160.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 12582912.0 -Id -1.0 -It udp -Il 48 -If 0 -Ii 10 -Iv 32
s -t 2.016673313 -Hs 5 -Hd -1 -Ni 5 -Nx 160.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 2 -Mt 800 -Is 12582912.0 -Id -1.0 -It udp -Il 120 -If 0 -Ii 10 -Iv 32
r 2.056016 2 1 tcp 60 ------- 1 0.0.0.1 4.0.0.1 0 8
.......
.......
r 5.234689 5 1 udp 72 ------- 0 3.0.0.0 1.0.0.0 0 531
+ 5.234689 1 2 udp 72 ------- 0 3.0.0.0 1.0.0.0 0 531
- 5.234689 1 2 udp 72 ------- 0 3.0.0.0 1.0.0.0 0 531
s -t 5.241736497 -Hs 6 -Hd -2 -Ni 6 -Nx 80.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 155e -Md 1 -Ms 3 -Mt 0
s -t 5.248856497 -Hs 6 -Hd -2 -Ni 6 -Nx 80.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 155e -Md 1 -Ms 3 -Mt 0
d -t 5.249526497 -Hs 6 -Hd -2 -Ni 6 -Nx 80.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw RET -Ma 155e -Md 1 -Ms 3 -Mt 0
d -t 5.249526497 -Hs 6 -Hd 4194305 -Ni 6 -Nx 80.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw CBK -Ma 13a -Md 1 -Ms 3 -Mt 800 -Is 0.2 -Id 4194305.2 -It tcp -Il 552 -If 1 -Ii 514 -Iv 28 -Pn tcp -Ps 259 -Pa 0 -Pf 0 -Po 0
d -t 5.249526497 -Hs 6 -Hd 4194305 -Ni 6 -Nx 80.00 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw RET -Ma 13a -Md 1 -Ms 3 -Mt 800 -Is 0.2 -Id 4194305.2 -It tcp -Il 552 -If 1 -Ii 514 -Iv 28 -Pn tcp -Ps 259 -Pa 0 -Pf 0 -Po 0
.......
.......
r -t 6.786680750 -Hs 3 -Hd 12582912 -Ni 3 -Nx 160.00 -Ny 135.00 -Nz 0.00 -Ne -1.000000 -Nl AGT -Nw --- -Ma 13a -Md 2 -Ms 1 -Mt 800 -Is 12582912.0 -Id 4194304.0 -It udp -Il 72 -If 0 -Ii 538 -Iv 29
s -t 6.786680750 -Hs 3 -Hd 12582912 -Ni 3 -Nx 160.00 -Ny 135.00 -Nz 0.00 -Ne -1.000000 -Nl AGT -Nw --- -Ma 13a -Md 2 -Ms 1 -Mt 800 -Is 4194304.0 -Id 12582912.0 -It udp -Il 72 -If 0 -Ii 538 -Iv 29
......
......etc
Many thanks in advance.
My email: simonsamch@hotmail.com
Regards
sam
how to export energy parameters from trace file to excel data
i tried to implement random way point mobility model in ns2.35 but i got the following error
dilip@dilip-pc:~/thesis/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest$ "make"
make: Nothing to be done for `all'.
dilip@dilip-pc:~/thesis/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest$ ./setdest -n 20 -p 2.0 -s 10.0 -t 200 -x 500 -y 500 > scen-20-test
setdest: setdest.cc:595: void Node::RandomSpeed(): Assertion `speed != 0.0' failed.
Aborted (core dumped)
dilip@dilip-pc:~/thesis/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest$ ./setdest -n 20 -p 2.0 -s 10.0 -t 200 -x 500 -y 500 > scen-20-test
setdest: setdest.cc:595: void Node::RandomSpeed(): Assertion `speed != 0.0' failed.
Aborted (core dumped)
dilip@dilip-pc:~/thesis/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest$
pls help me to solve the problem
thank u
dilip
Hello sir,
i am comparing aodv and aomdv with varying node speed but i am getting result aodv outperforming aomdv .what is the problem??pls help me i am using setdest to vary the speed of the node. i have varied the speed 1,2,3,4,5 m/s .
hello sir,
i am trying tora protocol, do you have any awk scripts related to tora protocol, if you have pls upload i need it for my project
I am a final year student doing Btech project on "Artificial Immune System for Intrusion Detection In MANET".We are using ns2 as a network simulator. We obtained the flood.tcl script of flooding attack and got the trace file.But we are unable to detect flooding by observing trace file (flood.tr).Is there any way to detect that there is flooding.Can you help us or suggest some way to detect flooding attack.
sir,
will you plz help me by giving information about new trace file format,because i am working on zig-bee energy model,so it is necessary to run the program in new trace file format.plz help me out.
ayan kumar dey
In my project i want to find the output of delay(End TO End),throughput,packet delivery ratio.I run my program on old trace file format,but it fails everytime.Plz help me out by giving new trace file for those above mentioned program.I am doing my program in zig-bee for energy model diagram.
ayan kumar dey
hello sir
in my project i am finding value of energy consumption vs Bit error rate..every time i am changing ber from tcl file n then run tcl file using ns filename.tcl then using awk file to calculate energy consumption..is it correct procedure? Bcoz i hav buy project from one institute the value obtain from awk file are not match with thier xgr file.plz suggest me something..
@Anvika - Yes, the procedure that you are following is correct.
Just ensure that the AWK script which you are using is correct.
Hope it helps.
Regards,
Mohit P. Tahiliani
please upload the awk files to calculate pdr END2END DELAY for new trace format
sir,
when i was running tcl file,i got following error.
suggest me the solution for error
num_nodes is set 2
invalid command name "-llType"
while executing
"-llType $val(ll) \
Thank you..
@Unknown - Try removing extra space characters before -llType.
Hope it helps.
Regards,
Mohit P. Tahiliani
Sir is ns2 source code for clustering in aodv is available
Sachin
dear Sir while i was going through your awk code for calculating throughput i wasn't able to understand this part of the code
"hdr_size = pkt_size % 512
pkt_size -= hdr_size
recvdSize += pkt_size
} "
please sir help us in this regard
thanks inadvance
@Sachin - No, because AODV is not a hierarchical protocol.
@Shravan - That code removes the header from the calculation and considers only the payload. 512 is considered as an average packet size. If you are using a different packet size in your simulations, change it accordingly.
Hope it helps.
Regards,
Mohit P. Tahiliani
Hello Sir,
I am research scholar working on TORA in ns2.35, but i m not able to get the output. Please help me with the proper procedure. If possible, I want to simulate it in Windows 7 platform. Please help me out Sir.
Hope for the positive response
Thank you.
if (event =="N"){
remaining_energy[$5] = $7
need to know what this does and what event in N
Hi Mohit,
Please assist in explaining the first three rows especially after 1000 bytes. I am not show what 0's mean until to the end of the row.
This is a trace file on NS2. Please email me on hans.medupe@gmail.com
s 1.000000000 _0_ AGT --- 0 cbr 1000 [0 0 0 0] ------- [0:0 3:0 32 0] [0] 0 0
r 1.000000000 _0_ RTR --- 0 cbr 1000 [0 0 0 0] ------- [0:0 3:0 32 0] [0] 0 0
s 1.000000000 _0_ RTR --- 0 AODV 48 [0 0 0 0] ------- [0:255 -1:255 30 0] [0x2 1 1 [3 0] [0 4]] (REQUEST)
r 1.001408374 _4_ RTR --- 0 AODV 48 [0 ffffffff 0 800] ------- [0:255 -1:255 30 0] [0x2 1 1 [3 0] [0 4]] (REQUEST)
r 1.001408667 _1_ RTR --- 0 AODV 48 [0 ffffffff 0 800] ------- [0:255 -1:255 30 0] [0x2 1 1 [3 0] [0 4]] (REQUEST)
s 1.001550421 _4_ RTR --- 0 AODV 48 [0 ffffffff 0 800] ------- [4:255 -1:255 29 0] [0x2 2 1 [3 0] [0 4]] (REQUEST)
s 1.002289893 _1_ RTR --- 0 AODV 48 [0 ffffffff 0 800] ------- [1:255 -1:255 29 0] [0x2 2 1 [3 0] [0 4]] (REQUEST)
r 1.002818795 _0_ RTR --- 0 AODV 48 [0 ffffffff 4 800] ------- [4:255 -1:255 29 0] [0x2 2 1 [3 0] [0 4]] (REQUEST)
r 1.002818798 _1_ RTR --- 0 AODV 48 [0 ffffffff 4 800] ------- [4:255 -1:255 29 0] [0x2 2 1 [3 0] [0 4]] (REQUEST)
r 1.003717175 _4_ RTR --- 0 AODV 48 [0 ffffffff 1 800] ------- [1:255 -1:255 29 0] [0x2 2 1 [3 0] [0 4]] (REQUEST)
r 1.003717465 _2_ RTR --- 0 AODV 48 [0 ffffffff 1 800] ------- [1:255 -1:255 29 0] [0x2 2 1 [3 0] [0 4]] (REQUEST)
r 1.003717465 _0_ RTR --- 0 AODV 48 [0 ffffffff 1 800] ------- [1:255 -1:255 29 0] [0x2 2 1 [3 0] [0 4]] (REQUEST)
s 1.006063482 _2_ RTR --- 0 AODV 48 [0 ffffffff 1 800] ------- [2:255 -1:255 28 0] [0x2 3 1 [3 0] [0 4]] (REQUEST)
r 1.007371858 _5_ RTR --- 0 AODV 48 [0 ffffffff 2 800] ------- [2:255 -1:255 28 0] [0x2 3 1 [3 0] [0 4]] (REQUEST)
s 1.007371858 _5_ RTR --- 0 AODV 44 [0 0 0 0] ------- [5:255 0:255 30 2] [0x4 1 [3 4] 10.000000] (REPLY)
Sir i am tring to implement Energy model using AODV in ns2 .. i have implemented it and got tr and nam file both but at the end i got error in comman promt. i am not able to understand it. sir if u dnt mind can u give me some suggetion about this error..i will very thankful to you...
Error:
rani@rani-laptop:~/Desktop/runningprograms$ ns out.tcl
num_nodes is set 2
INITIALIZE THE LIST xListHead
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
rani@rani-laptop:~/Desktop/runningprograms$ Missing required flag -x in: W -t 20.0
Missing required flag -y in: W -t 20.0
Parsing error in event.