Applicable Versions
NetSim Standard
NetSim Professional

In NetSim, the average delay for packet transmission for each application is available in the Application Metrics. During the transmission, some packets are likely to get errored or collided. NetSim calculates the delay of only the successful packets transmitted. Hence, the delay when calculated theoretically, say through the Event Trace, may not match the value in results due to errored packets.

The following article shows the delay calculation when the packets get errored and also when there are no errored packets for FTP application running over UDP protocol.


TABLE OF CONTENTS

Consider the following scenario:

The File Size is set to 10,00,000 Bytes and the Inter Arrival time to 5 seconds.

The transport protocol is set to UDP and the simulation is run for 100s.


With BER


The following settings were done in wired link properties for the above example:

Max_Uplink_Speed and Max_Downlink_Speed = 100 Mbps

Uplink_BER and Downlink_BER = 0

Uplink_Propagation_Delay and Downlink_Propagation_Delay = 5 microseconds


NetSim Result Window  


NetSim gives the Delay in microseconds through the Application Metrics present in the Result dashboard as shown below:


Delay Through Event Trace- Pivot Table Calculation


Follow the steps mentioned in the article How to calculate delay for FTP application over TCP in NetSim? to calculate the delay through a pivot table.


Using the equation Application_IN - Application_OUT (take the average of event time for both Application_IN and Application_OUT), the delay value is obtained which is the same as the delay present in the Application Metrics.

Delay calculation using both Packet Trace and Event Trace


1. Open Event Trace and filter the Event Type field to Application_IN. The Event Time displays the Application_IN time for each packet. Copy-paste the event time column to another sheet.


2. Open Packet Trace and filter the Transmitter_ID field to Source Node (in the above example, Node_2). The App_Layer_Arrival_Time now gives the Application_OUT time for each packet. Copy-paste the App_Layer_Arrival_Time column to the sheet where Application_IN time is pasted.

 

3. Now calculate the delay for each packet by using subtracting the Application_OUT time from Application_IN. Taking the average of the calculated packet wise delay will give the delay value in microseconds which is the same as the delay mentioned in the Application Metrics window.


Without BER

The following settings were done in wired link properties for the above example:

Max_Uplink_Speed and Max_Downlink_Speed = 100 Mbps

Uplink_BER and Downlink_BER =0.0000001

Uplink_Propagation_Delay and Downlink_Propagation_Delay = 5 microseconds


NetSim Results Window


NetSim gives the Delay in microseconds through the Application Metrics present in the Result dashboard as shown below:


Delay calculation using both Packet Trace and Event Trace


1. Open Event Trace and filter the Event Type field to Application_IN. The Event Time displays the Application_IN time for each packet. Copy-paste the event time column to another sheet.


2. Open Packet Trace and filter the Transmitter_ID field to Source Node (in the above example, Node_2). The App_Layer_Arrival_Time now gives the Application_OUT time for each packet. Copy-paste the App_Layer_Arrival_Time column to the sheet where Application_IN time is pasted.


NOTE: Filter the Packet Status field to Successful packets

 

3. Now calculate the delay for each packet by using subtracting the Application_OUT time from Application_IN. Taking the average of the calculated packet wise delay will give the delay value in microseconds which is the same as the delay mentioned in the Application Metrics window.


Delay Through Event Trace- Pivot Table Calculation


Follow the steps mentioned in the article How to calculate delay for FTP application over TCP in NetSim? to calculate the delay through a pivot table.


Since the NetSim Results dashboard provides the average delay for only successful packets, to get the average Application_IN time in the Pivot table, take the average of event time for Packet_IDs 1 to 20 (as per above example) and then subtract the average Event Time for Application_OUT event from average Event Time for Application_IN event. This will give the delay which is almost similar to the delay mentioned in the Application Metrics window.



Note: The average event time given in the pivot table for Application IN event includes the packets which are errored during transmission after the segmentation. Thus to calculate the Application IN, the average time of successful packets, the average of event time for the packets alone (1 to 20 in the above screenshot) is considered