NetSim provides options to run simulations via the GUI or via CLI. The CLI mode is preferred for automated execution (batch processing) of simulations. This feature is available from v7 onwards. In v7, NetSim can be run via CLI for Internetworks, Advanced Wireless Networks – MANET, Wireless Sensor Networks, Personal Area Networks and Cognitive Radio Networks only. For other networks NetSim v7 can only be run via GUI
Prior to running NetSim through command line interface (CLI), users must understand the following –
Step 1: App Path
App path is the file location in the system in which the NetSim7.0 has been installed.
The app path can be found out by right clicking the NetSim Shortcut in the desktop and selecting Open file location (In Vista and Windows 7) or Find Target (In Windows XP). The app path will be something like “C:\Program Files\NetSim Standard\bin”, depending on where NetSim is installed. The path to the bin folder of NetSim is termed as the app path.
Step 2: IO Path
IO path (Input/output Path) is the path where the input and output files of an application is
written. This is similar to the temp path of windows OS. For NetSim, the iopath is
%temp%/NetSim. The Configuration.xml file for the scenrio to be simulated should be kept here prior to running the simulation. Note that the IO path must have write permission.
Step 3: Running NetSim through command line for Simulation
To run NetSim through command line, copy the app path where NetSimCore.exe is present and paste it in the command prompt. For floating/roaming licenses, type the following in the command prompt
>NetSimCore.exe<space> -apppath<space><app path><space>-iopath<space><io path><space> -license<space>5053@<Server IP Address>
<app path> contains all files of NetSim including NetSimCore.exe
<iopath> contains Configuration.xml and Configuration.xsd file
5053 is the port number through which the system communicates with the license server i.e the system in which the dongle is running (for floating license users)
<Server IP Address> is the IP address of the system where NetSim license server (dongle) is running.
Sample configuration.xml files are available for Internetworks and Cognitive Radio Networks in the <apppath>/Docs/Sample_Configurations folder of the NetSim install directory. Rename the sample file as “Configuration.xml” before running NetSim through CLI. Depending on your system setting, the extension (.xml) might be implicitly present and not visible. In such cases do not add the extension, as that will cause the file to be named as configuration.xml.xml.
For node-locked licenses, type the following in the command prompt
>NetSimCore.exe<space> -apppath<space><app path><space>-iopath<space><io path><space>
Once Simulation is completed successfully and the metircs files that are requested by the end user in Configuration.xml will be written in the iopath. If any of the folder names contains white space, then mention the folder path within double quotes while specifying the folder name in the command prompt.
To know more about the options that are available to run NetSim via CLI, type the following in the command prompt.
>cd <app path>