Queues and Retransmissions in ns2

Ns2 implements an interface queue on wireless links. In my simulation it is a FIFO queue that may contain up to 50 packets.

When no route to the destination node exists each packet is queued by the AODV routing protocol. It queues (an unlimited amount of?) packets for up to 5 seconds (set by the Rice Networks Group patch). Packets older than 5 seconds get dropped.

When a route is established, current packets and packets from the AODV queue are sent to the interface queue and merged somehow. The packets in the queue are sent and acknowledgements arrive at the MAC layer. Retransmissions do not occur unless the destination node is no longer in transmission range. As this happens the MAC layer drops a packet after 4 retransmissions without receiving an ACK and informs AODV to cut back the route.

As there is no more route to the destination, current packets are put into the AODV protocol queue again. Five seconds later they will be dropped. Packets in the interface queue are sent, each one with 4 retries until they are dropped on the MAC layer.

These are just my observations from the trace file, I’m not sure if it really works this way.