Applicable VersionsNetSIm StandardNetSim Pro

Applicable Releasesv11

In NetSim, the route taken by a packet and the hop count can be easily identified using the Packet Trace log file and the Packet Animation.

Packet animation enables users to watch traffic flow through the network for in-depth visualization and analysis. Users have the following options before running a simulation:

• Record the animation, 

• Don’t play/ record animation and 

• Play and record animation while running simulation.

Packet Trace provides detailed packet information useful for performance validation, statistical analysis, and custom code debugging. Packet Trace logs a set of chosen parameters for every packet as it flows through the network such as arrival times, queuing times, departure times, payload, overhead, errors, collisions, etc. 

The packet trace is written whenever a packet is received at a device. 

For example, if we have transmission N1 -> N2 -> N3, then the packet trace is written for every packet being received at N2 and at N3. Note that it is not written for every packet being transmitted by N1 and subsequently by N2. This means that packets which are transmitted from N1 but which may have been errored or collided before being received by N2 are not written in the packet trace. 

For example:

Consider the following WSN scenario

Application traffic has been configured from wireless_sensor_1 to WSN_Sink_9.

The scenario has been simulated for 100s with Packet Trace enabled.

The route of a packet can be observed from both the Animation window and the Packet Trace file.

In the Animation window, you can see the flow of Data Packets (the green-colored packets) as follows:

1. Initially, the App_1_Sensor_APP packet flows from the source, i.e. the Wireless_Sensor_1 to the Wireless_Sensor_5

2. The packet is then sent to Wireless_Sensor_7, then further from Sensor_6, it goes to Sensor_8, then to Sensor_4 and finally reaches the destination, i.e. the Sink node

Similarly, in the Packet Trace file, filter and select a specific PACKET_ID to trace the path through which the packet was sent.

From the above screenshot, we can observe that Sensor_1 is the source node and the destination is Sinknode_9. By filtering the PACKET_ID to 1, we can see the packet flow by observing the TRANSMITTER_ID and RECEIVER_ID. From the source, the packet is sent to Sensor_5, then from Sensor_5 to Sensor_7, Sensor_7 to Sensor_8, Sensor_8 to Sensor_4, and from the Sensor_4, the packet is sent to the destination, the Sinknode.

Hop count of packets can also conveniently be obtained from the packet trace file. 

Since Sensor_1 sends packet in the route, Sensor_1 -> Sensor_5 -> Sensor_7 -> Sensor_8 -> Sensor_4 -> Sinknode_9. There are 4 hops between the source and the Sink node.

The route of a packet and the hop count can be identified for other networks such as MANET, VANET, IoT, etc. in a similar way. 

Also, refer: