Netsim
Netsim
Netsim
A network simulator enables users to virtually create a network comprising of devices, links,
applications etc, and study the behavior and performance of the Network.
Protocol performance analysis Application modeling and analysis Network design and planning
Research and development of new networking technologies Test and verification
1. Building the model – Create a network with devices, links, applications etc.
2. Running the simulation - Run the discrete event simulation (DES) and log different
performance metrics
3. Visualizing the simulation - Use the packet animator to view the flow of packets.
4. Analyzing the results - Examine output performance metrics such as throughput, delay, loss
etc. at multiple levels - network, link, queue, application etc.
5. Developing your own protocol / algorithm - Extend existing algorithms by modifying the
simulator’s source C code
Click on New Simulation and select the desired kind of network to simulate
Save
To save experiment, select File Save, then specify the Experiment Name, Description (Optional) and
click Save. The short cut for the same is Ctrl + S.
Save as
To save a previously saved experiment in a different location without overwriting the existing copy,
Save As option can be used. The short cut for the same is Shift + Ctrl + S
Settings
The settings menu provides user’s access to the simulation environment settings.
Environment Settings:
The Environment Settings window is used to switch between Grid View and Map View backgrounds
in supported network technologies. For Grid view, users can configure the Grid environment length
in meters whereas for Map view users can configure the latitude and longitude respectively.
Modeling and Simulation of a simple network
This section will demonstrate how to create a basic network scenario and analyze in NetSim. Let us
consider Internetworks. To create a new scenario, go to New Simulation Internetworks
Click on the environment (the grid) where you want the Wired Node to be placed. In this way, place
two more wired nodes. Similarly, to place a Switch and a Router, click on the respective device and
click on the environment at the desired location.
Step 2: Connecting devices on the environment. : With respect to establishing connection between
devices, and in order to connect two devices, you will have to select the link and then left click on
one device, free the mouse button, then click on the second device and free the mouse button. The
wired links may disappear if you right click anywhere in the Environment. Clicking and dragging
without freeing the mouse pointer would displace the device in the environment.
For example, select link and the click on Switch followed by router to connect them. In this manner,
continue to link all devices.
Configuring devices and links in the scenario
Step 1: To configure any device, right click on the device and select properties.
User can set values according to their requirement. Modify the properties of any device and click on
Ok. In this example default values are accepted.
Step 2: To configure the links, right click on any Link and select Properties
Display settings
In NetSim, users can Turn-On or Turn-Off display information such as IP Address of the devices, Link
speed etc. For doing this click on Display settings as shown below
Modeling Traffic
After the network is configured, user needs to model traffic from Wired Node 2 to Wired Node 3.
This is done using the application icon. Click on the Application icon present on the ribbon
In screen shot shown below the Application type is set to CBR, source_ID is 2 and Destination_ID is 3.
Click on OK.
Application Configuration:
1. In a wired network with routers and switches OSPF, Spanning tree etc takes times to converge and
hence it is a good practice to set the application start time greater than OSPF convergence time. In
general, the applications can start at 20s for smaller networks and should be increased as the size of
the network grows.
Packets generated before OSPF table convergence may be dropped at the gateway router.
If TCP is enabled TCP may stop after the re-try limit is reached (since the SYN packets would not reach
the destination)
3. For MANET networks the application start time should be a min of 5s, since that amount of time is
required for convergence of OLSR/ZRP
Packet and Event Trace files are useful for detailed simulation analysis. By default, these are not
enabled since it slows down the simulation. To enable logging of Packet Trace / Event Trace click on
the icon in the tool bar as shown below. Set the file name and select the required attributes to be
logged. For more information, please refer sections 7.5 and 7.6 respectively.
Run Simulation
For simulating the network scenario created, click on Run Simulation present in the Ribbon
NetSim allows users to interact with the simulation at runtime via a socket or through a file. User
Interactions make simulation more realistic by allowing command execution to view/modify certain
device parameters during runtime.
Working: This section will demonstrate how to perform Interactive simulation for a simple network
scenario.
Click & drop Wired Nodes and Router onto the Simulation Environment and link them as shown
below or otherwise Open the scenario for Interactive Simulation which is available in “<NetSim
Install Dir>\Docs\ Sample_Configuration\Internetworks\Interactive Simulation”
• Click on Application icon present in the top ribbon and set the Application type as CBR.
The Source_Id is 1 and Destination_Id is 2.
• Click on run simulation option and In the Run time Interaction tab set Interactive
Simulation as True and click on Accept
• Click on run simulation and set Simulation Time as 500 sec. (It is recommended to specify a
longer simulation time to ensure that there is sufficient time for the user to execute the
various commands and see the effect of that before Simulation ends) and click OK
• Simulation (NetSimCore.exe) will start running and will display a message “waiting for first
client to connect” as shown below:
• After Simulation window opens, goto Network scenario and right click on Router_3 or any
other node and select NetSim Console option
• Now Client (NetSimCLI.exe) will start running and it will try to establish connection with
NetSimCore.exe. After connection is established the window will look similar like this
shown below:
• After this the command line interface can be used to execute the supported commands
PauseAt: To pause the currently running simulation with respect to particular time (Ex: To Pause
simulation at 70.2 sec use command as PauseAt 70.2)
2. Ping Command
• The ping command is one of the most often used networking utilities for troubleshooting
network problems
• You can use the ping command to test the availability of a networking device (usually a
computer) on a network
• When you ping a device you send that device a short message, which it then sends back
(the echo)
• If you receive a reply then the device is in Network, if you don’t then the device is faulty,
disconnected, switched off, incorrectly configured
• You can use the ping cmd with an IP address or Device name
• ICMP_Status should be set as True in all nodes(Wired_Node and Router)
• After simulation open packet trace and filter ICMP_EchoRequest and ICMP_EchoReply
from CONTROL_PACKET_TYPE/APP_NAME column
3. Route Commands
1. route print
2. route delete
3. route add
In order to view the entire contents of the IP routing table, use following commands route
print
route print
• You will see the routing table entries with network destinations and the gateways to which
packets are forwarded when they are headed to that destination. Unless you’ve already
added static routes to the table, everything you see here will be dynamically generated
• In order to delete route in the IP routing table you will type a command using the following
syntax
• So, to delete the route with destination network 11.5.0.0, all we’d have to do is type this
command
• To check whether route has been deleted or not check again using route print command
• To add a static route to the table, you will type a command using the following syntax
route ADD destination_network MASK subnet_mask gateway_ip metric_cost interface
• So, for example, if you wanted to add a route specifying that all traffic bound for the
11.5.1.2 subnet went to a gateway at 11.5.1.1
Note: Entry added in IP table by routing protocol continuously gets updated. If a user tries to remove a route via route
delete command, there is always a chance that routing protocol will re-enter this entry again.