[ns] any multipath routing protocol source code needed

2009-10-24 Thread uknown noname


Hi,
 
Does anybody have a source code for any multipath routing protocol? I try to 
contact the author but no respond. How can I get a source code for any of 
this.. eg : SMR, RMPDSR, MAODV, MMR, MSR etc.. if somebody have the source code 
for any of this protocol, this will help me lot. Thanks



  


[ns] specifically send data from node to node

2008-08-15 Thread uknown noname

Hi ns2 users,

Referring to wireless example in ns2 (wireless.tcl or wireless-test.tcl), this 
examples are using cbr traffic generator to generate a traffic so its look like 
simulation during transmission. I have few problems.

1. Is it possible to send real specific file (.doc, .jpeg, .mp4 etc)
2. How can I specificly set to send data from node to node.  (eg: transmit from 
node 1 to node 9)
3. How can I trace how the file/data is broadcasting from sender (node 1) to 
another node and its broadcasting to another till received by destination 
(node9).




  


[ns] specific packet transfer

2008-04-09 Thread uknown noname

hi.. 

By using examples in ../tcl/ex/wireless.tcl, how can if specifically we want to 
sent data (packets) from node 5 to node 45 only. 

This is because this example shows that packets are send and broadcast from one 
node to another without any scenario. In real scenario, only few nodes may send 
data to specific destination.


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[ns] multipath DSR

2008-04-04 Thread uknown noname


Hi..
Does anyone know where I can find an implementation of any Multipath
 DSR for  NS-2. There is a lot of paper that extend DSR to be multipath
 such as SMR, RMPSR, EDSR and etc. but i still didnt find how to implement
 it.

thanks..



My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.


[ns] DSR routing protocol

2008-03-28 Thread uknown noname

Hi ns users..


I still confused, when we run ~/tc/ex/wireless.tcl as default, they are using 
DSR routing protocol [set opt(rp) dsr ].  But in order to implement DSR routing 
protocol, how did this file (wireless.tcl) have a link/connection with 
../ns2.30/dsr directory ? This is because even though ../ns2.30/dsr directory 
is deleted, wireless.tcl can still working.

How can we simulate/test DSR routing protocol? Is it running wireless.tcl means 
we already implement DSR routing protocol? Thanks for any explanation.

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.


[ns] transfer real file

2008-03-20 Thread uknown noname


Hi ns expert..
I have 2 questions.

How can we change the default size packet (512 bytes) while do MANET
 simulation?

Is it possible to transferring real file (.doc, .jpg, .mp3, .mp4, .avi
 and etc..) from specific source to specific destination and simulate in
 ns2 using DSR protocol? If yes, how could it be implementing?


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.


[ns] DSR algorithm

2008-02-06 Thread uknown noname

hi all..

In DSR routing protocol, there are 2 phase, which is route discovery and route 
maintenance. 

Roughly, if a source want to start communicate, it will check a route cache to 
determine whether the route already exist or not. If the route expired or don't 
exist, then they will initiate a route discovery process by broadcasting a 
RREQ. Then the neighbors will forward the RREQ to another node untill it reach 
the destination. The destination then response with RREP and send back to the 
source. Once the source received RREP, the communication will start. The 
algorithm also involves updating routing table, set timer,accumulating the 
address of each node between source and destination, rejecting a loop route and 
etc.  

I try to explore ../ns2.30/dsr/ but I didn't find the file that 
described/written this algorithm.

1. How the example in ../tcl/ex/wireless.tcl is link with ../ns2.30/dsr/ ? 
2. In which line wireless.tcl called the procedure or agent in dsr directory?

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Never miss a thing.   Make Yahoo your homepage.


[ns] MG tutorial-A new protocol for ns

2008-02-06 Thread uknown noname

Regarding to Marc Greis tutorial  (A new protocol for ns), what is the used for 
header file (ping.h), C++ code and etc. This is because we still can run 
ping.tcl itself without added other files. I also don't know how to get 
'packet.h' file ( VII.3. Necessary changes)

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.


[ns] modify DSR routing protocol

2008-01-24 Thread uknown noname

Hi ns users.. 

I have run ../tcl/ex/wireless.tcl with dsr option. How can I modify DSR routing 
protocol it self? Which file should I 'edit' to change the routing protocol 
algorithm? Which file is used to define the routing algorithm?

After I edit ../tcl/ex/wireless.tcl to add with nam simulation, I notice the 
simulation of DSR protocol is not like the theory. Any explanation is highly 
appreciated. thanks..

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.


[ns] which routing protocol is used in real ad hoc network

2007-11-27 Thread uknown noname


When we are creating ad hoc network (tools such
 as in windows) to make peer to peer network,  which type of routing
 protocol (DSR,AODV, DSDV, etc...) are actually using?

Is it true that in Windows they does not do any routing in ad-hoc mode.

So what is the purpose of other routing protocol in ad hoc network (DSR, AODV, 
DSDV, DYMO, etc...). as we know this protocol is good and people always 
enhanced it. some of them are using multipath to distributed traffic load 
(sound good). Why they not implement it in real situation? 


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Get easy, one-click access to your favorites.  Make Yahoo! your homepage.


[ns] which routing protocol is used in real ad hoc network

2007-10-29 Thread uknown noname

When we are creating  ad hoc network (tools such as in 
windows) to make peer to peer network,  which type of routing protocol 
(DSR,AODV, DSDV, etc...) are actually using?
 

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[ns] throughput terminology and formula

2007-10-29 Thread uknown noname

i'm a bit confused with the throughput terminology and formula for network 
part. in my calculation, im using throughput as a number of packet received 
times 8000 (to get kilobit) divide by runtime. is this correct?

  for (i in nodes) {
if ( packets_received[i] > 0 ) {
end = node_end_time[i];
start = node_start_time[i - number_flows];
runtime = end - start;
if ( runtime > 0 ) {
throughput[i] = packets_received[i]*8000 / runtime;
printf("%d\n", throughput[i]) > "throughput";
}
}




My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[ns] DSDV vs DSR trace file need explanation

2007-10-05 Thread uknown noname

Hi..
After I run a simulation to compare DSR and DSDV  i get the result as below. (i 
just copy part of the trace file).

DSDV
s 84.456630640 _5_ AGT  --- 137 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [0] 0 1
r 84.464996115 _6_ AGT  --- 137 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[0] 1 1
s 89.760714516 _5_ AGT  --- 141 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [1] 0 1
r 89.766723639 _6_ AGT  --- 141 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[1] 1 1
M 93.16971 6 (304.59, 176.33, 0.00), (54.55, 225.06), 2.95
s 93.414962863 _5_ AGT  --- 147 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [2] 0 1
r 93.420512030 _6_ AGT  --- 147 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[2] 1 1
s 99.048451362 _5_ AGT  --- 151 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [3] 0 1
r 99.054500665 _6_ AGT  --- 151 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[3] 1 1
s 102.185227838 _5_ AGT  --- 154 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [4] 0 
1
r 102.191277235 _6_ AGT  --- 154 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[4] 1 1
s 107.621642181 _5_ AGT  --- 160 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [5] 0 
1
r 107.627651760 _6_ AGT  --- 160 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[5] 1 1
s 107.695014294 _4_ AGT  --- 161 cbr 512 [0 0 0 0] --- [4:0 5:0 32 0] [0] 0 
2
D 107.742789369 _0_ RTR  CBK 161 cbr 532 [13a 5 0 800] --- [4:0 5:0 31 5] 
[0] 1 2
s 110.718296463 _5_ AGT  --- 164 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [6] 0 
1
r 110.724146158 _6_ AGT  --- 164 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[6] 1 1


DSR
s 84.456630640 _5_ AGT  --- 0 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [0] 0 1
r 84.456630640 _5_ RTR  --- 0 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [0] 0 1
s 84.460452677 _5_ RTR  --- 1 DSR 32 [0 0 0 0] --- [5:255 6:255 32 0] 1 [1 
1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461724851 _9_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725030 _6_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725149 _2_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725382 _0_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725406 _7_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725473 _3_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
s 84.462206790 _6_ RTR  --- 2 DSR 44 [0 0 0 0] --- [6:255 5:255 254 5] 2 [0 
1] [1 1 2 5->6] [0 0 0 0->0]
r 84.48265 _5_ RTR  --- 2 DSR 44 [13a 5 6 800] --- [6:255 5:255 254 5] 
2 [0 1] [1 1 2 5->6] [0 0 0 0->0]
SFESTs 84.48265 _5_ 0 [5 -> 6] 1(1) to 6 [5 |6 ]
s 84.48265 _5_ RTR  --- 0 cbr 548 [0 0 0 0] --- [5:1 6:1 32 6] [0] 0 1
r 84.472829325 _6_ RTR  --- 0 cbr 548 [13a 6 5 800] --- [5:1 6:1 32 6] [0] 
1 1
r 84.472829325 _6_ AGT  --- 0 cbr 512 [13a 6 5 800] --- [5:1 6:1 32 6] [0] 
1 1
s 89.865825846 _5_ AGT  --- 3 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [1] 0 1
r 89.865825846 _5_ RTR  --- 3 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [1] 0 1


All the parameter are exactly same. The only thing i just change is the DSR 
with DSDV. my question :
1. Why in DSDV packet ID are start with 137,141,147,151 ... while in DSR start 
with 0,1,2...
2. Im using defaul packet size (512) but why there are other packet size appear 
(32,44,548,532..)
3. How i want to change the default packet size?
4. In DSDV, why the sender send 512 bytes but the receiver received 532 bytes?
5. 13a mean314 second for expected transmission time isn't.  But why it always 
get [13a 6 5 800]

Anybody can help to answer any of my questions? thank you very much..


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 


[ns] DSDV vs DSR trace file need explanation

2007-10-05 Thread uknown noname

Hi..
After I run a simulation to compare DSR and DSDV  i get the result as below. (i 
just copy part of the trace file).

DSDV
s 84.456630640 _5_ AGT  --- 137 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [0] 0 1
r 84.464996115 _6_ AGT  --- 137 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[0] 1 1
s 89.760714516 _5_ AGT  --- 141 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [1] 0 1
r 89.766723639 _6_ AGT  --- 141 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[1] 1 1
M 93.16971 6 (304.59, 176.33, 0.00), (54.55, 225.06), 2.95
s 93.414962863 _5_ AGT  --- 147 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [2] 0 1
r 93.420512030 _6_ AGT  --- 147 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[2] 1 1
s 99.048451362 _5_ AGT  --- 151 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [3] 0 1
r 99.054500665 _6_ AGT  --- 151 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[3] 1 1
s 102.185227838 _5_ AGT  --- 154 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [4] 0 
1
r 102.191277235 _6_ AGT  --- 154 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[4] 1 1
s 107.621642181 _5_ AGT  --- 160 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [5] 0 
1
r 107.627651760 _6_ AGT  --- 160 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[5] 1 1
s 107.695014294 _4_ AGT  --- 161 cbr 512 [0 0 0 0] --- [4:0 5:0 32 0] [0] 0 
2
D 107.742789369 _0_ RTR  CBK 161 cbr 532 [13a 5 0 800] --- [4:0 5:0 31 5] 
[0] 1 2
s 110.718296463 _5_ AGT  --- 164 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [6] 0 
1
r 110.724146158 _6_ AGT  --- 164 cbr 532 [13a 6 5 800] --- [5:1 6:1 32 6] 
[6] 1 1


DSR
s 84.456630640 _5_ AGT  --- 0 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [0] 0 1
r 84.456630640 _5_ RTR  --- 0 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [0] 0 1
s 84.460452677 _5_ RTR  --- 1 DSR 32 [0 0 0 0] --- [5:255 6:255 32 0] 1 [1 
1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461724851 _9_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725030 _6_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725149 _2_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725382 _0_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725406 _7_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
r 84.461725473 _3_ RTR  --- 1 DSR 32 [0  5 800] --- [5:255 6:255 32 
0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
s 84.462206790 _6_ RTR  --- 2 DSR 44 [0 0 0 0] --- [6:255 5:255 254 5] 2 [0 
1] [1 1 2 5->6] [0 0 0 0->0]
r 84.48265 _5_ RTR  --- 2 DSR 44 [13a 5 6 800] --- [6:255 5:255 254 5] 
2 [0 1] [1 1 2 5->6] [0 0 0 0->0]
SFESTs 84.48265 _5_ 0 [5 -> 6] 1(1) to 6 [5 |6 ]
s 84.48265 _5_ RTR  --- 0 cbr 548 [0 0 0 0] --- [5:1 6:1 32 6] [0] 0 1
r 84.472829325 _6_ RTR  --- 0 cbr 548 [13a 6 5 800] --- [5:1 6:1 32 6] [0] 
1 1
r 84.472829325 _6_ AGT  --- 0 cbr 512 [13a 6 5 800] --- [5:1 6:1 32 6] [0] 
1 1
s 89.865825846 _5_ AGT  --- 3 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [1] 0 1
r 89.865825846 _5_ RTR  --- 3 cbr 512 [0 0 0 0] --- [5:1 6:1 32 0] [1] 0 1


All the parameter are exactly same. The only thing i just change is the DSR 
with DSDV. my question :
1. Why in DSDV packet ID are start with 137,141,147,151 ... while in DSR start 
with 0,1,2...
2. Im using defaul packet size (512) but why there are other packet size appear 
(32,44,548,532..)
3. How i want to change the default packet size?
4. In DSDV, why the sender send 512 bytes but the receiver received 532 bytes?
5. 13a mean314 second for expected transmission time isn't.  But why it always 
get [13a 6 5 800]

Anybody can help me to answer any of my questions? thank you very much..


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.


[ns] node x is not defined.

2007-09-11 Thread uknown noname

hello..
i've made a bit changes in ..tcl/ex/wireless.tcl. when i run ns its look 
working fine and creating the output file. but when i run nam, there is no 
simulation, and at the terminal,shows:

node 4 is not defined... node 4 is not defined... node 6 is not defined... node 
7 is not defined... node 7 is not defined... node 8 is not defined... node 5 is 
not defined... node 5 is not defined... node 6 is not defined...

I already creating scenario files for mobility simulations using setdest and 
declare it at Default Script Options - (set opt(sc)). 

Does anybody has idea what are the error is?


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.


[ns] calculate packet S/R/D/F, delay, etc

2007-09-07 Thread uknown noname

hi.. does anybody have a sample script that can calculate packet S/R/D/F, 
delay, throughput, jitter and etc for each node for ..tcl/ex/wireless.tcl. All 
of the sample script just calculate the sum of the packet, not for each node.

many thanks..


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us.


Re: [ns] cbr packet loss & or packet count scripts in perl>>>>

2007-09-06 Thread uknown noname

Hi.. probably i have using a wrong out.tr file where currently im using 
/tcl/ex/wireless.tcl. i'm notice this will generated out.tr with old trace 
format. is there any out.tr with new trace format for dsr that i can used with 
this cript?
many thanks..

uknown noname <[EMAIL PROTECTED]> wrote: 
hello...
i try to implement this script but i've got an error
(FILENAME=../out.tr FNR=24960) fatal: division by zero attempted

looks like this line
delay=sum/recvnum
give an error when 'recvnum' is 0, where recvnum++ are not functioning. any 
idea?

Mohammad Haseeb Zafar  wrote: 
Plz see the following awk scripts that calcualate the following
 Performance Metrics Used
 Routing Overhead
 Normalize Routing Load
 Packet Delivery Fraction
 Average End to End delay
 Jitter
 Drop Packets
 Drop Bytes
 Throughput

These scripts work with new trace format and DSR protocol. Make changes for 
other protocols.

As an example, if you want to calculate throughput,

awk -f throughput.awk output.tr

  
 # ==throughput.awk 
  BEGIN {
 recvdSize = 0
 startTime = 1e6
 stopTime = 0
}
  {
 # Trace line format: normal
 if ($2 != "-t") {
  event = $1
  time = $2
  if (event == "+" || event == "-") node_id = $3
  if (event == "r" || event == "d") node_id = $4
  flow_id = $8
  pkt_id = $12
  pkt_size = $6
  flow_t = $5
  level = "AGT"
 }
 # Trace line format: new
 if ($2 == "-t") {
  event = $1
  time = $3
  node_id = $5
  flow_id = $39
  pkt_id = $41
  pkt_size = $37
  flow_t = $45
  level = $19
 }
   # Store start time
 if (level == "AGT" && (event == "+" || event == "s") && pkt_size >= 512) {
  if (time < startTime) {
   startTime = time
  }
 }
   # Update total received packets' size and store packets arrival time
 if (level == "AGT" && event == "r" && pkt_size >= 512) {
  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)
}
  
  
  
#  = parameters.awk 
  BEGIN {
 sends=0;
 recvs=0;
 routing_packets=0.0;
 droppedBytes=0;
 droppedPackets=0;
 highest_packet_id =0;
 sum=0;
 recvnum=0;
   }
  {
 time = $3;
 packet_id = $41;
   #= CALCULATE PACKET DELIVERY  FRACTION=
 if (( $1 == "s") &&  ( $35 == "cbr" ) && ( $19=="AGT" ))   {  sends++; }
 if (( $1 == "r") &&  ( $35 == "cbr" ) && ( $19=="AGT" ))   {  recvs++; }
   #= CALCULATE DELAY 
 if ( start_time[packet_id] == 0 )  start_time[packet_id] = time;
 if (( $1 == "r") &&  ( $35 == "cbr" ) && ( $19=="AGT" )) {  
end_time[packet_id] = time;  }
 else {  end_time[packet_id] = -1;  }
   #= TOTAL DSR OVERHEAD  
 if (($1 == "s" || $1 == "f") && $19 == "RTR" && $35 =="DSR") routing_packets++;
   #= DROPPED DSR PACKETS 
 if (( $1 == "d" ) && ( $35 == "cbr" )  && ( $3 > 0 ))
 {
  droppedBytes=droppedBytes+$37;
  droppedPackets=droppedPackets+1;
 }
#find the number of packets in the simulation
if (packet_id > highest_packet_id)
  highest_packet_id = packet_id;
}
  END {
  for ( i in end_time )
 {
 start = start_time[i];
 end = end_time[i];
 packet_duration = end - start;
 if ( packet_duration > 0 )  { sum += packet_duration; recvnum++; }
 }
 delay=sum/recvnum;
   NRL = routing_packets/recvs; #normalized routing load = routing load but 
it differ from routing overhead
   PDF = (recvs/sends)*100; #packet delivery ratio[fraction]
   printf("send = %.2f\n",sends);
   printf("recv = %.2f\n",recvs);
   printf("routingpkts = %.2f\n",routing_packets++);
   printf("PDF = %.2f\n",PDF);
   printf("NRL = %.2f\n",NRL);
   printf("Average e-e delay(ms)= %.2f\n",delay*1000);
   printf("No. of dropped data (packets) = %d\n",droppedPackets);
   printf("No. of dropped data (bytes)   = %d\n",droppedBytes);
   printf("Packet Loss [%]= %.2f  \n", 
(droppedPackets/(highest_packet_id+1))*100);
}

 

#  == jitter.awk 
  BEGIN {
   num_recv=0
 }
  {
 # Trace line format: normal
 if ($2 != "-t") {
  event = $1
  time = $2
  if (event == "+" || 

Re: [ns] cbr packet loss & or packet count scripts in perl>>>>

2007-09-06 Thread uknown noname

hello...
i try to implement this script but i've got an error
(FILENAME=../out.tr FNR=24960) fatal: division by zero attempted

looks like this line
delay=sum/recvnum
give an error when 'recvnum' is 0, where recvnum++ are not functioning. any 
idea?

Mohammad Haseeb Zafar <[EMAIL PROTECTED]> wrote: 
Plz see the following awk scripts that calcualate the following
 Performance Metrics Used
 Routing Overhead
 Normalize Routing Load
 Packet Delivery Fraction
 Average End to End delay
 Jitter
 Drop Packets
 Drop Bytes
 Throughput

These scripts work with new trace format and DSR protocol. Make changes for 
other protocols.

As an example, if you want to calculate throughput,

awk -f throughput.awk output.tr

  
 # ==throughput.awk 
  BEGIN {
 recvdSize = 0
 startTime = 1e6
 stopTime = 0
}
  {
 # Trace line format: normal
 if ($2 != "-t") {
  event = $1
  time = $2
  if (event == "+" || event == "-") node_id = $3
  if (event == "r" || event == "d") node_id = $4
  flow_id = $8
  pkt_id = $12
  pkt_size = $6
  flow_t = $5
  level = "AGT"
 }
 # Trace line format: new
 if ($2 == "-t") {
  event = $1
  time = $3
  node_id = $5
  flow_id = $39
  pkt_id = $41
  pkt_size = $37
  flow_t = $45
  level = $19
 }
   # Store start time
 if (level == "AGT" && (event == "+" || event == "s") && pkt_size >= 512) {
  if (time < startTime) {
   startTime = time
  }
 }
   # Update total received packets' size and store packets arrival time
 if (level == "AGT" && event == "r" && pkt_size >= 512) {
  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)
}
  
  
  
#  = parameters.awk 
  BEGIN {
 sends=0;
 recvs=0;
 routing_packets=0.0;
 droppedBytes=0;
 droppedPackets=0;
 highest_packet_id =0;
 sum=0;
 recvnum=0;
   }
  {
 time = $3;
 packet_id = $41;
   #= CALCULATE PACKET DELIVERY  FRACTION=
 if (( $1 == "s") &&  ( $35 == "cbr" ) && ( $19=="AGT" ))   {  sends++; }
 if (( $1 == "r") &&  ( $35 == "cbr" ) && ( $19=="AGT" ))   {  recvs++; }
   #= CALCULATE DELAY 
 if ( start_time[packet_id] == 0 )  start_time[packet_id] = time;
 if (( $1 == "r") &&  ( $35 == "cbr" ) && ( $19=="AGT" )) {  
end_time[packet_id] = time;  }
 else {  end_time[packet_id] = -1;  }
   #= TOTAL DSR OVERHEAD  
 if (($1 == "s" || $1 == "f") && $19 == "RTR" && $35 =="DSR") routing_packets++;
   #= DROPPED DSR PACKETS 
 if (( $1 == "d" ) && ( $35 == "cbr" )  && ( $3 > 0 ))
 {
  droppedBytes=droppedBytes+$37;
  droppedPackets=droppedPackets+1;
 }
#find the number of packets in the simulation
if (packet_id > highest_packet_id)
  highest_packet_id = packet_id;
}
  END {
  for ( i in end_time )
 {
 start = start_time[i];
 end = end_time[i];
 packet_duration = end - start;
 if ( packet_duration > 0 )  { sum += packet_duration; recvnum++; }
 }
 delay=sum/recvnum;
   NRL = routing_packets/recvs; #normalized routing load = routing load but 
it differ from routing overhead
   PDF = (recvs/sends)*100; #packet delivery ratio[fraction]
   printf("send = %.2f\n",sends);
   printf("recv = %.2f\n",recvs);
   printf("routingpkts = %.2f\n",routing_packets++);
   printf("PDF = %.2f\n",PDF);
   printf("NRL = %.2f\n",NRL);
   printf("Average e-e delay(ms)= %.2f\n",delay*1000);
   printf("No. of dropped data (packets) = %d\n",droppedPackets);
   printf("No. of dropped data (bytes)   = %d\n",droppedBytes);
   printf("Packet Loss [%]= %.2f  \n", 
(droppedPackets/(highest_packet_id+1))*100);
}

 

#  == jitter.awk 
  BEGIN {
   num_recv=0
 }
  {
 # Trace line format: normal
 if ($2 != "-t") {
  event = $1
  time = $2
  if (event == "+" || event == "-") node_id = $3
  if (event == "r" || event == "d") node_id = $4
  flow_id = $8
  pkt_id = $12
  pkt_size = $6
  flow_t = $5
  level = "AGT"
 }
 # Trace line format: new
 if ($2 == "-t") {
  event = $1
  time = $3
  node_id = $5
  flow_id = $39
  pkt_id = $41
  pkt_size = $37
  flow_t = $45
  level = $19
 }
   # Store packets send time
 if (level == "AGT" && sendTime[pkt_id] == 0 && (event == "+" || event == "s") 
&& pkt_size >= 512) {
  sendTime[pkt_id] = time
 }
   # Store packets arrival time
 if (level == "AGT" && event == "r" && pkt_size >= 512) {
  recvTime[pkt_id] = time
  num_recv++
 }
}
  END {
 # Compute average jitter
 jitter1 = jitter2 = tmp_recv = 0
 prev_time = delay = prev_delay = processed = 0
 prev_delay = -1
 for (i=0; processed
  if(recvTime[i] != 0) {
  tmp_recv++
   if(prev_time != 0) {
de

[ns] wireless.tcl vs wireless-test.tcl

2007-08-31 Thread uknown noname

What is the different between example ~/tcl/ex/wireless.tcl and 
~/tcl/ex/wireless-test.tcl ?

I found that the different is not just the number of nodes (50->3), sim time, 
movement file and traffic generator. some of the proc (proc create-god and proc 
cmu-trace ) are not used in wireless.tcl. some of the external file (source 
../lib/ns-mobilenode.tcl, source ../mobility/$opt(rp).tcl, source 
../lib/ns-bsnode.tcl, source ../mobility/com.tcl). Does anybody can explain why 
this different must be made rather than just change the number of nodes, sim 
time, movement file and traffic generator only?

many thanks..



My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us.


[ns] dsr trace file explanation

2007-08-28 Thread uknown noname


[input]   [input]   [input]   [input]   
  Hello
This is part of trace file (~/tcl/ex/out-test.tr) from tcl sript using DSR 
(~/tcl/ex/wireless-test.tcl).

s 127.936679222 _0_ AGT  --- 0 cbr 512 [0 0 0 0] --- [0:0 2:0 32 0] [0] 0 3
r 127.936679222 _0_ RTR  --- 0 cbr 512 [0 0 0 0] --- [0:0 2:0 32 0] [0] 0 3
s 127.940949843 _0_ RTR  --- 1 DSR 32 [0 0 0 0] --- [0:255 2:255 32 0] 1 [1 
1] [0 1 0 0->0] [0 0 0 0->0]
r 127.942102650 _1_ RTR  --- 1 DSR 32 [0  0 800] --- [0:255 2:255 
32 0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
s 127.974476947 _0_ RTR  --- 2 DSR 32 [0 0 0 0] --- [0:255 2:255 32 0] 1 [1 
2] [0 2 0 0->16] [0 0 0 0->0]
r 127.975809754 _1_ RTR  --- 2 DSR 32 [0  0 800] --- [0:255 2:255 
32 0] 1 [1 2] [0 2 0 0->16] [0 0 0 0->0]


SFs 150.773527127 _2_ 127 [2 -> 1] 1(0) to 1 
s 150.773527127 _2_ RTR  --- 127 ack 60 [0 0 0 0] --- [2:1 1:0 32 1] [48 0] 
0 2
r 150.787165430 _2_  RTR  --- 94 tcp 1520 [13a 2 1 800] --- [1:0 2:1 32 2] 
[49 0] 1 2
r 150.787165430 _2_ AGT  --- 94 tcp 1500 [13a 2 1 800] --- [1:0 2:1 32 2] 
[49 0] 1 2


It's a bit different with NS Manual trace explanation. The column are explained 
as below.
1 = event (s,r,.. but what is SFs?, )
2 = time (but this trace file are record at what event? its start recorded at 
127s .. why??
3 = node (ignoring _ _) is it this is source node?
4 = AGT, RTR, i'm not sure..
5 =  i'm not sure..
6 = i'm not sure..
7 = packet type.
8 = packet size (why the packet size is always changes)
9 = [0 0 0 0] i'm not sure..
10=  i'm not sure..
11= [0:0 2:0 32 0] i'm not sure..
12= [0] i'm not sure..
13= sequence number
14= packet id

at the 3rd line, the trace file a bit different..  1 [1 1] [0 1 0 0->0] [0 
0 0 0->0]
what does it mean?? 

Could anybody can explain more detail about this??

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 


[ns] DSR trace file explanation

2007-08-23 Thread uknown noname

Hello
This is part of trace file (~/tcl/ex/out-test.tr) from tcl sript using DSR 
(~/tcl/ex/wireless-test.tcl).

s 127.936679222 _0_ AGT  --- 0 cbr 512 [0 0 0 0] --- [0:0 2:0 32 0] [0] 0 3
r 127.936679222 _0_ RTR  --- 0 cbr 512 [0 0 0 0] --- [0:0 2:0 32 0] [0] 0 3
s 127.940949843 _0_ RTR  --- 1 DSR 32 [0 0 0 0] --- [0:255 2:255 32 0] 1 [1 
1] [0 1 0 0->0] [0 0 0 0->0]
r 127.942102650 _1_ RTR  --- 1 DSR 32 [0  0 800] --- [0:255 2:255 
32 0] 1 [1 1] [0 1 0 0->0] [0 0 0 0->0]
s 127.974476947 _0_ RTR  --- 2 DSR 32 [0 0 0 0] --- [0:255 2:255 32 0] 1 [1 
2] [0 2 0 0->16] [0 0 0 0->0]
r 127.975809754 _1_ RTR  --- 2 DSR 32 [0  0 800] --- [0:255 2:255 
32 0] 1 [1 2] [0 2 0 0->16] [0 0 0 0->0]


SFs 150.773527127 _2_ 127 [2 -> 1] 1(0) to 1 
s 150.773527127 _2_ RTR  --- 127 ack 60 [0 0 0 0] --- [2:1 1:0 32 1] [48 0] 
0 2
r 150.787165430 _2_ RTR  --- 94 tcp 1520 [13a 2 1 800] --- [1:0 2:1 32 2] 
[49 0] 1 2
r 150.787165430 _2_ AGT  --- 94 tcp 1500 [13a 2 1 800] --- [1:0 2:1 32 2] 
[49 0] 1 2


It's a bit different with NS Manual trace explanation. The column are explain 
as below.
1 = event (s,r,.. but what is SFs?, )
2 = time (but this trace file are record at what event? its start recorded at 
127s .. why??
3 = node (ignoring _ _) is it this is source node?
4 = AGT, RTR, i'm not sure..
5 =  i'm not sure..
6 = i'm not sure..
7 = packet type.
8 = packet size (why the packet size is always changes)
9 = [0 0 0 0] i'm not sure..
10=  i'm not sure..
11= [0:0 2:0 32 0] is it i'm not sure..
12= [0] i'm not sure..
13= sequence number
14= packet id

at the 3rd line, the trace file a bit different..  1 [1 1] [0 1 0 0->0] [0 
0 0 0->0]
what does it mean?? 

Could anybody can explain more detail about this??

- the small thing for some people may be a big thing for other people - 


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 


[ns] modified DSR protocol and extract out.tr script

2007-08-22 Thread uknown noname

hello...

Theoretically if we are using dsr protocol, the route discovery and route 
maintenance are involved. its also involved RREQ, RREP and RERR.. contain 
routing table, packet detail information and many more. But regarding to 
~tcl/ex/wireless.tcl (using dsr), i didn't find where all this function is 
calling.

It may be a big help if anyone can give your modified ~tcl/ex/wireless.tcl and 
awk/perl script to extract the ~tcl/ex/out.tr to get some network analysis such 
as delay/jitter/packet send/received/etc so i can learn from it.

your help is valuable for me. thanks..

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 


[ns] how to calculate delay using out.tr

2007-08-20 Thread uknown noname

[input]   [input]   [input]   [input]   
 YAHOO.Shortcuts.hasSensitiveText = false; YAHOO.Shortcuts.sensitivityType 
= []; YAHOO.Shortcuts.doUlt = false; YAHOO.Shortcuts.location = "us"; 
YAHOO.Shortcuts.lang = "us"; YAHOO.Shortcuts.document_id = 0; 
YAHOO.Shortcuts.document_type = ""; YAHOO.Shortcuts.document_title = ""; 
YAHOO.Shortcuts.document_publish_date = ""; YAHOO.Shortcuts.document_author = 
""; YAHOO.Shortcuts.document_url = ""; YAHOO.Shortcuts.document_tags = ""; 
YAHOO.Shortcuts.annotationSet = { "lw_1187617398_0": { "text": "out.tr", 
"extended": 0, "startchar": 135, "endchar": 140, "start": 135, "end": 140, 
"extendedFrom": "", "predictedCategory": "", "predictionProbability": "0", 
"weight": 1, "type": ["shortcuts:/us/place/virtual/web_site"], "category": 
["IDENTIFIER"], "context": " example of ~/tcl/ex/wireless.tcl with the output 
out.tr or file ~/tcl/ex/wireless-test.tcl with the" }, "lw_1187617398_1": { 
"text":
 "out-test.tr", "extended": 0, "startchar": 193, "endchar": 203, "start": 193, 
"end": 203, "extendedFrom": "", "predictedCategory": "", 
"predictionProbability": "0", "weight": 1, "type": 
["shortcuts:/us/place/virtual/web_site"], "category": ["IDENTIFIER"], 
"context": " file ~/tcl/ex/wireless-test.tcl with the output out-test.tr. i try 
to extract the output file using awk" }, "lw_1187617398_2": { "text": "Yahoo! 
TV\x27s", "extended": 0, "startchar": 423, "endchar": 437, "start": 423, "end": 
437, "extendedFrom": "", "predictedCategory": "ORGANIZATION", 
"predictionProbability": "0.786092", "weight": 0.35, "type": 
["shortcuts:/us/instance/organization/company/yahoo_property"], "category": 
["ORGANIZATION"], "context": "  Sick sense of humor? Visit Yahoo! TV\x27s 
Comedy with an Edge to see what\x27s on," }, "lw_1187617398_3": { "text": 
"Comedy with an Edge ", "extended": 0, "startchar": 551, "endchar": 570, 
"start": 551, "end": 570, "extendedFrom": "", "predictedCategory": "",
 "predictionProbability": "0", "weight": 1, "type": 
["shortcuts:/us/instance/identifier/hyperlink/http"], "category": 
["IDENTIFIER"], "context": "  Sick sense of humor? Visit Yahoo! TV\x27s Comedy 
with an Edge to see what\x27s on,", "metaData": { "linkHref": 
"http://us.rd.yahoo.com/evt=47093/*http://tv.yahoo.com/collections/222";, 
"linkProtocol": "http", "linkRel": "nofollow", "linkTarget": "_blank" }  } };  
YAHOO.Shortcuts.overlaySpaceId = "97546169";  YAHOO.Shortcuts.hostSpaceId = 
"97546168";Hello..
Did anyone know how to calculate delay/jitter/ in the example of 
~/tcl/ex/wireless.tcl with the output out.tr or file ~/tcl/ex/wireless-test.tcl 
with the output out-test.tr. i try to extract the output file using awk script 
but not successfull. anyone can help me please.. 

My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Got a little couch potato? 
Check out fun summer activities for kids.


[ns] ns command not found in other directory

2007-06-04 Thread uknown noname


what should i do if i just can only run my ns script if i'm in 
.../ns-allinone-2.30/ns-2.30/ directory. otherwise its will complained ns: 
Command not found. before this its working fine.


My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
 
-
Don't get soaked.  Take a quick peak at the forecast 
 with theYahoo! Search weather shortcut.


[ns] implementaing ad hoc protocol

2007-06-04 Thread uknown noname


hi.. Before this i have install ns 2.30 and its working fine. But when i want 
to implement few ad hoc protocol such as DYMOUM, NIST-DYMO, AODV-UU and many 
more, they are using ns 2.29/8/7. I cant successfully implementing this 
protocol. so i try to install ns 2.29/8/7 but i cant proceed the installation 
with this version because of this error:

./configure: line 7068: `  OSF*)`
tcl.8.3.2 configuration failed! Exiting
Tcl is not part of the ns project.

anybody can help me???
thanks..




My system :
FC 6
2.6.18-1.2869.fc6
ns2.30
   
-
Got a little couch potato? 
Check out fun summer activities for kids.


[ns] customize trace file

2007-03-07 Thread uknown noname

Thanks to the guys for helping me. 
In most sample, I only find output 'trace-all'. How can I customize trace file 
(out.tr), so that the output file are only print  the TCP and UDP packet. How 
does this trace file are generated when we use syntax like:

set f [open out.tr w]
$ns trace-all $f

 
-
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.


[ns] full sample script for AODV/DSR

2007-03-07 Thread uknown noname

Where can i get full sample script of AODV / DSR that i can implement / test? 
The script in the directory are just part of the implementation.

 
-
Don't get soaked.  Take a quick peek at the forecast 
 with theYahoo! Search weather shortcut.


[ns] How to run sample script for AODV, DSDV, DSR

2007-03-06 Thread uknown noname

Hello..
  I'm new user for ns2 and I've ns2 2.30.. I want to run the sample of the 
script in few ad hoc routing protocols such as AODV, DSR and DSDV that is in 
the directory ../ns-allinone-2.30/ns-2.30/aodv or dsr or dsdv. I run this 
script by typing ' ns aodv.tcl ' but seems like it's not working and I got an 
error like this.
 
 invalid command name "Agent/rtProto/AODV"
 while executing
 "Agent/rtProto/AODV instproc init args {
 $self next $args
 }   "
 (file "aodv.tcl" line 19)
 
 
 Is it possible to me to run this script? (aodv.tcl, aodv.cc, aodv.h). What is 
the command I should use for?
 How can I run the script for dsdv directory that contain dsdv.cc and dsdv.h 
file?
 
-
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.