AODV packet count calculation within a Node

141 views
Skip to first unread message

Shanen Leen

unread,
May 9, 2017, 8:02:37 AM5/9/17
to ns-3-users
Hi all!

After following the docs and this group I'm able to create a MANET which uses AODV protocol and I've add some packet dropping nodes(Let's say selfish nodes, they just don't forward the packets).

My requirement is to calculate the number of RREQ, RREP, RERR and Data packets received and sent by each node to its neighbors.

i.e: 
Node A should maintain a table(or something simillar) as below

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Neighbour | RREQ_sent | RREQ_recv | RREP_sent | RREP_recv | RERR_sent | RERR_recv | Data_sent | Data_recv |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|       B       |       10         |       5          |        6          |        12      |         1         |         0        |       30       |        40     |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|       C       |         5         |        1         |        10        |        20      |         2         |         1        |       15       |        25     |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

XXXX_sent - No. of XXXX packets sent from A to neighbor.
XXXX_recv - No. of XXXX packets received from neighbor to A.

My aim is to use these packet counts to periodically calculate a "trust value"(using an algorithm which require these counts) of neighbors of a node. This is actually a part of an effort to improve the trust based routing using Reinforcement Learning.

I know that the FlowMonitor can be used to calculate such parameters of two ends. But it seems like my requirement is different.

Any ideas on how to implement the above mentioned structure in NS3 is highly appreciated.

Thanks!

Konstantinos

unread,
May 9, 2017, 8:18:22 AM5/9/17
to ns-3-users
Hi,

You can use the data collection framework with the corresponding trace sources for AODV packets or data packets.
If such trace sources are not available, you can create them. For example, similar to the OLSR Tx/Rx trace sources that are triggered when a OLSR packet (i.e. HELLO, MPR etc) is generated/received, you can create trace sources in AODV for RREQ, RREP etc.

Regards,
K
Reply all
Reply to author
Forward
0 new messages