PRADEEP NAZARETH
PRADEEP NAZARETH

Reputation: 167

Tracing packets from source to destination for multi-hop communication using trace.nam in unetstack

We implemented multi-hop routing protocol for underwater communication. Now we want to evaluate the performance of that routing protocol using parameters like- end to end delay, hop-count etc. We analyzed trace.nam to trace the packets from source to destination. Once a packet is originated from source, forwarded to next hop like that it will reach destination after multiple forwarding. But the problem is packet id at each forwarding node is changes. Due to this difficult to trace the packet and collect statistics (suppose 100 packet sent).

Not finding common parameter value in trace file to trace packets.

# BEGIN SIMULATION 1
n -t 1559191523.506000 -s 1 -x 0.000000 -y 0.000000 -Z 0.000000 -a 1
+ -t 1559191523.510000 -s 1 -d 0 -i 250111054 -p 0 -x {1.0 0.4 -1 ------- null}
n -t 1559191523.511000 -s 2 -x 0.000000 -y 0.000000 -Z -35.000000 -a 2
n -t 1559191523.513000 -s 3 -x 0.000000 -y 0.000000 -Z -75.000000 -a 3
n -t 1559191523.514000 -s 5 -x 0.000000 -y 99.000000 -Z -118.000000 -a 5
n -t 1559191523.514000 -s 4 -x 0.000000 -y 0.000000 -Z -120.000000 -a 4
- -t 1559191523.564000 -s 1 -d 0 -i 250111054 -p 0 -x {1.0 0.4 -1 ------- null}
r -t 1559191523.958000 -s 1 -d 2 -i 250111054 -p 0 -x {1.0 0.4 -1 ------- null}
r -t 1559191523.969000 -s 1 -d 3 -i 250111054 -p 0 -x {1.0 0.4 -1 ------- null}
d -t 1559191524.005000 -s 1 -d 4 -i 250111054 -p 0 -x {1.0 0.4 -1 ------- null} -y BAD_FRAME
d -t 1559191524.021000 -s 1 -d 5 -i 250111054 -p 0 -x {1.0 0.4 -1 ------- null} -y BAD_FRAME
+ -t 1559191550.251000 -s 2 -d 0 -i 270543411 -p 0 -x {2.0 0.4 -1 ------- null}
- -t 1559191550.302000 -s 2 -d 0 -i 270543411 -p 0 -x {2.0 0.4 -1 ------- null}
r -t 1559191550.678000 -s 2 -d 1 -i 270543411 -p 0 -x {2.0 0.4 -1 ------- null}
r -t 1559191550.683000 -s 2 -d 3 -i 270543411 -p 0 -x {2.0 0.4 -1 ------- null}
r -t 1559191550.713000 -s 2 -d 4 -i 270543411 -p 0 -x {2.0 0.4 -1 ------- null}
d -t 1559191550.742000 -s 2 -d 5 -i 270543411 -p 0 -x {2.0 0.4 -1 ------- null} -y BAD_FRAME
+ -t 1559191551.741000 -s 3 -d 0 -i 236268410 -p 0 -x {3.0 0.4 -1 ------- null}
- -t 1559191551.792000 -s 3 -d 0 -i 236268410 -p 0 -x {3.0 0.4 -1 ------- null}
r -t 1559191552.174000 -s 3 -d 2 -i 236268410 -p 0 -x {3.0 0.4 -1 ------- null}
r -t 1559191552.178000 -s 3 -d 4 -i 236268410 -p 0 -x {3.0 0.4 -1 ------- null}
r -t 1559191552.196000 -s 3 -d 1 -i 236268410 -p 0 -x {3.0 0.4 -1 ------- null}
d -t 1559191552.220000 -s 3 -d 5 -i 236268410 -p 0 -x {3.0 0.4 -1 ------- null} -y BAD_FRAME
+ -t 1559191586.676000 -s 4 -d 0 -i -694431325 -p 0 -x {4.0 0.4 -1 ------- null}
- -t 1559191586.728000 -s 4 -d 0 -i -694431325 -p 0 -x {4.0 0.4 -1 ------- null}
r -t 1559191587.112000 -s 4 -d 3 -i -694431325 -p 0 -x {4.0 0.4 -1 ------- null}
r -t 1559191587.139000 -s 4 -d 2 -i -694431325 -p 0 -x {4.0 0.4 -1 ------- null}
r -t 1559191587.149000 -s 4 -d 5 -i -694431325 -p 0 -x {4.0 0.4 -1 ------- null}
d -t 1559191587.161000 -s 4 -d 1 -i -694431325 -p 0 -x {4.0 0.4 -1 ------- null} -y BAD_FRAME
+ -t 1559191626.953000 -s 5 -d 0 -i -1642203870 -p 0 -x {5.0 0.4 -1 ------- null}
- -t 1559191627.005000 -s 5 -d 0 -i -1642203870 -p 0 -x {5.0 0.4 -1 ------- null}
r -t 1559191627.425000 -s 5 -d 4 -i -1642203870 -p 0 -x {5.0 0.4 -1 ------- null}
d -t 1559191627.430000 -s 5 -d 3 -i -1642203870 -p 0 -x {5.0 0.4 -1 ------- null} -y BAD_FRAME
d -t 1559191627.446000 -s 5 -d 2 -i -1642203870 -p 0 -x {5.0 0.4 -1 ------- null} -y BAD_FRAME
d -t 1559191627.462000 -s 5 -d 1 -i -1642203870 -p 0 -x {5.0 0.4 -1 ------- null} -y BAD_FRAME


+ -t 1559191741.605000 -s 5 -d 4 -i -1230929328 -p 1 -x {5.0 4.2 -1 ------- null}
- -t 1559191741.655000 -s 5 -d 4 -i -1230929328 -p 1 -x {5.0 4.2 -1 ------- null}
r -t 1559191742.268000 -s 5 -d 4 -i -1230929328 -p 1 -x {5.0 4.2 -1 ------- null}
d -t 1559191742.274000 -s 5 -d 3 -i -1230929328 -p 1 -x {5.0 4.2 -1 ------- null} -y BAD_FRAME
d -t 1559191742.287000 -s 5 -d 2 -i -1230929328 -p 1 -x {5.0 4.2 -1 ------- null} -y BAD_FRAME
+ -t 1559191742.300000 -s 4 -d 5 -i -2045618010 -p 0 -x {4.0 5.2 -1 ------- null}
d -t 1559191742.306000 -s 5 -d 1 -i -1230929328 -p 1 -x {5.0 4.2 -1 ------- null} -y BAD_FRAME
+ -t 1559191742.316000 -s 4 -d 2 -i -1660400851 -p 1 -x {4.0 2.2 -1 ------- null}
- -t 1559191742.351000 -s 4 -d 5 -i -2045618010 -p 0 -x {4.0 5.2 -1 ------- null}
r -t 1559191742.736000 -s 4 -d 3 -i -2045618010 -p 0 -x {4.0 5.2 -1 ------- null}
- -t 1559191742.756000 -s 4 -d 2 -i -1660400851 -p 1 -x {4.0 2.2 -1 ------- null}
r -t 1559191742.762000 -s 4 -d 2 -i -2045618010 -p 0 -x {4.0 5.2 -1 ------- null}
r -t 1559191742.772000 -s 4 -d 5 -i -2045618010 -p 0 -x {4.0 5.2 -1 ------- null}
d -t 1559191742.786000 -s 4 -d 1 -i -2045618010 -p 0 -x {4.0 5.2 -1 ------- null} -y BAD_FRAME
r -t 1559191743.330000 -s 4 -d 3 -i -1660400851 -p 1 -x {4.0 2.2 -1 ------- null}
r -t 1559191743.357000 -s 4 -d 2 -i -1660400851 -p 1 -x {4.0 2.2 -1 ------- null}
+ -t 1559191743.358000 -s 2 -d 4 -i 1941993078 -p 0 -x {2.0 4.2 -1 ------- null}
+ -t 1559191743.362000 -s 2 -d 1 -i 1563463759 -p 1 -x {2.0 1.2 -1 ------- null}
r -t 1559191743.365000 -s 4 -d 5 -i -1660400851 -p 1 -x {4.0 2.2 -1 ------- null}
d -t 1559191743.380000 -s 4 -d 1 -i -1660400851 -p 1 -x {4.0 2.2 -1 ------- null} -y BAD_FRAME
- -t 1559191743.410000 -s 2 -d 4 -i 1941993078 -p 0 -x {2.0 4.2 -1 ------- null}
r -t 1559191743.787000 -s 2 -d 1 -i 1941993078 -p 0 -x {2.0 4.2 -1 ------- null}
r -t 1559191743.791000 -s 2 -d 3 -i 1941993078 -p 0 -x {2.0 4.2 -1 ------- null}
- -t 1559191743.813000 -s 2 -d 1 -i 1563463759 -p 1 -x {2.0 1.2 -1 ------- null}
r -t 1559191743.821000 -s 2 -d 4 -i 1941993078 -p 0 -x {2.0 4.2 -1 ------- null}
d -t 1559191743.849000 -s 2 -d 5 -i 1941993078 -p 0 -x {2.0 4.2 -1 ------- null} -y BAD_FRAME
r -t 1559191744.383000 -s 2 -d 1 -i 1563463759 -p 1 -x {2.0 1.2 -1 ------- null}
r -t 1559191744.387000 -s 2 -d 3 -i 1563463759 -p 1 -x {2.0 1.2 -1 ------- null}
+ -t 1559191744.388000 -s 1 -d 2 -i 1520738108 -p 0 -x {1.0 2.2 -1 ------- null}
r -t 1559191744.416000 -s 2 -d 4 -i 1563463759 -p 1 -x {2.0 1.2 -1 ------- null}
- -t 1559191744.440000 -s 1 -d 2 -i 1520738108 -p 0 -x {1.0 2.2 -1 ------- null}
d -t 1559191744.446000 -s 2 -d 5 -i 1563463759 -p 1 -x {2.0 1.2 -1 ------- null} -y BAD_FRAME
r -t 1559191744.817000 -s 1 -d 2 -i 1520738108 -p 0 -x {1.0 2.2 -1 ------- null}
r -t 1559191744.843000 -s 1 -d 3 -i 1520738108 -p 0 -x {1.0 2.2 -1 ------- null}
d -t 1559191744.874000 -s 1 -d 4 -i 1520738108 -p 0 -x {1.0 2.2 -1 ------- null} -y BAD_FRAME
d -t 1559191744.897000 -s 1 -d 5 -i 1520738108 -p 0 -x {1.0 2.2 -1 ------- null} -y BAD_FRAME
+ -t 1559191798.872000 -s 4 -d 2 -i 706565595 -p 1 -x {4.0 2.2 -1 ------- null}
- -t 1559191798.925000 -s 4 -d 2 -i 706565595 -p 1 -x {4.0 2.2 -1 ------- null}
r -t 1559191799.500000 -s 4 -d 3 -i 706565595 -p 1 -x {4.0 2.2 -1 ------- null}
r -t 1559191799.527000 -s 4 -d 2 -i 706565595 -p 1 -x {4.0 2.2 -1 ------- null}
+ -t 1559191799.530000 -s 2 -d 4 -i -476134347 -p 0 -x {2.0 4.2 -1 ------- null}
r -t 1559191799.535000 -s 4 -d 5 -i 706565595 -p 1 -x {4.0 2.2 -1 ------- null}
+ -t 1559191799.536000 -s 2 -d 1 -i -70258 -p 1 -x {2.0 1.2 -1 ------- null}
d -t 1559191799.548000 -s 4 -d 1 -i 706565595 -p 1 -x {4.0 2.2 -1 ------- null} -y BAD_FRAME
- -t 1559191799.582000 -s 2 -d 4 -i -476134347 -p 0 -x {2.0 4.2 -1 ------- null}
r -t 1559191799.958000 -s 2 -d 1 -i -476134347 -p 0 -x {2.0 4.2 -1 ------- null}
r -t 1559191799.961000 -s 2 -d 3 -i -476134347 -p 0 -x {2.0 4.2 -1 ------- null}
- -t 1559191799.985000 -s 2 -d 1 -i -70258 -p 1 -x {2.0 1.2 -1 ------- null}
r -t 1559191799.992000 -s 2 -d 4 -i -476134347 -p 0 -x {2.0 4.2 -1 ------- null}
d -t 1559191800.020000 -s 2 -d 5 -i -476134347 -p 0 -x {2.0 4.2 -1 ------- null} -y BAD_FRAME
r -t 1559191800.552000 -s 2 -d 1 -i -70258 -p 1 -x {2.0 1.2 -1 ------- null}
+ -t 1559191800.554000 -s 1 -d 2 -i -924478001 -p 0 -x {1.0 2.2 -1 ------- null}
r -t 1559191800.555000 -s 2 -d 3 -i -70258 -p 1 -x {2.0 1.2 -1 ------- null}
r -t 1559191800.588000 -s 2 -d 4 -i -70258 -p 1 -x {2.0 1.2 -1 ------- null}
- -t 1559191800.605000 -s 1 -d 2 -i -924478001 -p 0 -x {1.0 2.2 -1 ------- null}
d -t 1559191800.615000 -s 2 -d 5 -i -70258 -p 1 -x {2.0 1.2 -1 ------- null} -y BAD_FRAME
r -t 1559191800.982000 -s 1 -d 2 -i -924478001 -p 0 -x {1.0 2.2 -1 ------- null}
r -t 1559191801.009000 -s 1 -d 3 -i -924478001 -p 0 -x {1.0 2.2 -1 ------- null}
d -t 1559191801.041000 -s 1 -d 4 -i -924478001 -p 0 -x {1.0 2.2 -1 ------- null} -y BAD_FRAME
d -t 1559191801.063000 -s 1 -d 5 -i -924478001 -p 0 -x {1.0 2.2 -1 ------- null} -y BAD_FRAME

In the above trace.nam from line no. 1-36 beacons to set-up routing table. Traces from line no. 39-98 indicating data packet forwarding originated at node 4 and 5.

Upvotes: 2

Views: 133

Answers (1)

Mandar Chitre
Mandar Chitre

Reputation: 2280

The trace.nam file in UnetSim currently only logs PHY frames. If you are analyzing higher layer protocols, this may not be the ideal log file to work from. It is perhaps better that you log your packets to log-0.txt in your agent using log.info() and use that for your analysis instead.

Upvotes: 1

Related Questions