Network simulations often require detailed analysis of packet behavior to evaluate performance. Important metrics at a per-packet level are Queuing Delay, Transmission Time, and Propagation Delay. These metrics help in diagnosing network behavior, identifying bottlenecks, and optimizing performance.
In a simulated network, packets traverse multiple layers of the protocol stack (e.g., Application, Transport, Network, Data Link, and Physical layers). Each layer introduces delays due to processing, queuing, transmission, or propagation. Enabling Packet Trace in the simulation allows capturing timestamps at various stages of a packet's journey, providing the raw data needed to calculate these delays.
Packet trace data typically includes key events such as when a packet arrives at or departs from a specific layer. These timestamps enable precise calculations of various delay components, as shown below.
1. Queuing Delay
Queuing delay represents the time a packet spends waiting in a queue before being processed at the Physical layer. It can be calculated in the packet trace as:
Queuing Delay = PHY_LAYER_ARRIVAL_TIME – NETWORK_LAYER_ARRIVAL_TIME
2. Transmission Time
Transmission time is the time it takes for a packet to be transmitted across the link. It is the time required to push all bits of the packet onto the link and depends on packet size and link bandwidth. The formula is: Transmission Time = Packet Size / Link Bandwidth.
It can be calculated in the packet trace as:
Transmission Time = PHY_LAYER_START_TIME - PHY_LAYER_ARRIVAL_TIME
3. Propagation Delay
Propagation delay is the time it takes for a packet to travel from the sender to the receiver across the transmission medium
It can be calculated in the packet trace as:
Propagation Delay = PHY_END_TIME - PHY_LAYER_START_TIME
Related Articles: