| Applicable Releases | v11 | v12 |
NetSim has an inbuilt traffic generator (Application) which can be used to model unicast/multicast/broadcast traffic in the network with support for application types such as CBR, Custom, Voice, Video, FTP, Database, etc. NetSim also allows users to provide pcap file as input to NetSim and configure applications using the real IP addresses and port numbers.
An example pcap file for NetSim:
Any pcap file can be provided as input to NetSim by following the procedure explained here. In this example, we are generating a pcap file by running Wireshark and generating traffic using ping. Ping is initiated form the Source IP: 192.168.0.154 to the Destination IP: 192.168.0.192. The pcap file will contain all incoming and outgoing packets from the system in which the capture is being done.

Wireshark capture can be stopped after capturing required packets and saved in the desired location with a user-defined name (*.pcap). Eg: Raw.pcap
Input multiple pcap files obtained from different devices by merging them using wireshark
Currently in NetSim users can provide only one .pcap file as an input. If the user has multiple pcap files to Emulate, they can merge them as explained below:

Modification of pcap file as per NetSim's requirement
Note that the PCAP file needs to be edited suitably before providing it as input to NetSim. The "editcap" application in the Wireshark installation directory can be used to edit any pcap file.
Go to Wireshark installation directory [C:\Program Files\Wireshark]

Open command prompt, and execute the cmd editcap -C 14 -L -T rawip -F pcap "<File Path>/Raw.pcap" "<File Path>/Input_to_NetSim.pcap". This command edits the pcap file into a format understandable by NetSim.
Where

Providing pcap file as input to NetSim:
Press Win+R and Run "C:\Windows\system32\rundll32.exe" sysdm.cpl,EditEnvironmentVariables

Or users can Goto Windows Search -> Type Edit the System Environment Variables -> Click on Environment Variables
In the System variables pane, select new and give EMULATOR_INPUT in the variable name text box and give the path of the pcap file along with the file name in the variable value text box (Ex: C:\Users\bhatv\Desktop\NetSim\INPUT_TO_NETSIM.pcap) and then click on OK.

Start NetSim as an administrator. Now create a simple scenario in NetSim. For example, create a scenario in Internetworks with 1 router and 2 wired nodes as shown below. Create an Emulation application by giving the real source and destination IP’s present in the pcap file. In this case, we have used the IP addresses 192.168.0.154 and 192.168.0.192 which we have used for generating traffic using PING.


