NetSim User Manual
NetSim User Manual
Contents
1 NetSim – Introduction ...........................................................................................................10
1.1 Introduction to modeling and simulation of networks ........................................................... 10
1.2 Versions of NetSim – Academic, Standard & Pro .................................................................... 10
1.3 Components in Pro and Standard versions ............................................................................. 12
Ver 10.2 1
3.1.5 Run Simulation ....................................................................................................... 40
3.1.6 Example Configuration files in NetSim ................................................................... 40
3.1.7 TCP – Example Simulations .................................................................................... 44
3.1.8 IP Addressing in NetSim ......................................................................................... 46
3.1.9 Features in WLAN 802.11a/b/n/ac ........................................................................ 47
3.1.10 Configuring Static Routing in NetSim ..................................................................... 55
3.1.11 Multicast Routing Protocols ................................................................................... 59
3.1.12 VLAN (Virtual LAN) ................................................................................................. 70
3.1.13 Public IP Address & NAT (Network Address Translation) ...................................... 86
3.2 Legacy Networks ..................................................................................................................... 90
3.2.1 New Experiment ..................................................................................................... 90
3.2.2 Create Scenario ...................................................................................................... 90
3.2.3 Set Node, Link and Application Properties ............................................................ 91
3.2.4 Modifying/Viewing/Accepting Properties.............................................................. 91
3.2.5 Enable Packet Trace (Optional) .............................................................................. 91
3.2.6 Run Simulation ....................................................................................................... 91
3.3 Advanced Wireless Networks – MANET & Wi-Max ................................................................ 92
3.3.1 New Experiment ..................................................................................................... 92
3.3.2 Create Scenario ...................................................................................................... 92
3.3.3 Set Node, Link and Application Properties ............................................................ 93
3.3.4 Modifying/Viewing/Accepting Properties.............................................................. 94
3.3.5 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional) ......................... 94
3.3.6 Example Configuration files in NetSim ................................................................... 94
3.3.7 Run Simulation ....................................................................................................... 96
3.3.8 Link Layer Acknowledgements and Network Layer Acknowledgements in DSR ... 97
3.3.9 Multiple MANETs ................................................................................................... 98
3.4 BGP ........................................................................................................................................ 103
3.4.1 New Experiment ................................................................................................... 103
3.4.2 Create Scenario .................................................................................................... 103
3.4.3 Set Node, Link and Application Properties .......................................................... 103
3.4.4 Modifying/Viewing/Accepting Properties............................................................ 104
3.4.5 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional) ....................... 104
3.4.6 Run Simulation ..................................................................................................... 105
3.5 Cellular Networks– GSM/CDMA............................................................................................ 106
Ver 10.2 2
3.5.1 New Experiment ................................................................................................... 106
3.5.2 Create Scenario .................................................................................................... 106
3.5.3 Set Node, Link and Application Properties .......................................................... 106
3.5.4 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional) ....................... 107
3.5.5 Run Simulation ..................................................................................................... 107
3.5.6 Example Configuration files in NetSim ................................................................. 108
3.6 Wireless Sensor Network ...................................................................................................... 111
3.6.1 Devices in NetSim:................................................................................................ 111
3.6.2 Designing WSN Networks .................................................................................... 111
3.6.3 Procedure ............................................................................................................. 112
3.6.4 Model features ..................................................................................................... 113
3.6.5 Set Link / Agent Properties .................................................................................. 118
3.6.6 Enable Packet Trace, Event Trace & Dynamic Metrics(Optional) ........................ 119
3.6.7 Run Simulation ..................................................................................................... 120
3.6.8 Results window in WSN ....................................................................................... 120
3.6.9 The IEEE 802.15.4 Protocol implementation in NetSim ....................................... 122
3.6.10 CSMA/CA Implementation in NetSim .................................................................. 123
3.6.11 Example Configuration files in NetSim ................................................................. 125
3.7 Internet of Things .................................................................................................................. 127
3.7.1 New Experiment ................................................................................................... 127
3.7.2 Introduction ......................................................................................................... 127
3.7.3 Create Scenario .................................................................................................... 127
3.7.4 Set Node, Link and Application Properties .......................................................... 128
3.7.5 Enable Packet Trace, Event Trace & Dynamic Metrics(Optional) ........................ 129
3.7.6 Run Simulation ..................................................................................................... 129
3.7.7 RPL protocol in IOT ............................................................................................... 130
3.7.8 Example Configuration files in NetSim ................................................................. 135
3.8 Zigbee (802.15.4)................................................................................................................... 137
3.8.1 New Experiment ................................................................................................... 137
3.8.2 Create Scenario .................................................................................................... 137
3.8.3 Modifying/Viewing/Accepting Properties............................................................ 137
3.8.4 Set Node, Link and Application Properties .......................................................... 137
3.8.5 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional) ....................... 138
3.8.6 Run Simulation ..................................................................................................... 138
Ver 10.2 3
3.9 Cognitive Radio (802.22) ....................................................................................................... 139
3.9.1 New Experiment ................................................................................................... 139
3.9.2 Create Scenario .................................................................................................... 139
3.9.3 Set Node, Link and Application Properties .......................................................... 139
3.9.4 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional) ....................... 140
3.9.5 Run Simulation ..................................................................................................... 140
3.9.6 Example Configuration files in NetSim ................................................................. 141
3.10 LTE/LTE-A............................................................................................................................. 144
3.10.1 New Experiment ................................................................................................... 144
3.10.2 Create Scenario .................................................................................................... 144
3.10.3 Set Node, Link and Application Properties .......................................................... 144
3.10.4 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional) ....................... 145
3.10.5 Run Simulation ..................................................................................................... 145
3.10.6 Example Configuration files in NetSim ................................................................. 146
3.10.7 Physical speed of the LTE Air Interface ................................................................ 147
3.10.8 Carrier Aggregation .............................................................................................. 149
3.10.9 LTE Operating Bands: ........................................................................................... 150
3.10.10 LTE PHY layer parameters: ................................................................................... 151
3.10.11 CA Configurations: ............................................................................................... 151
3.10.12 CA Bandwidth Classes: ......................................................................................... 151
3.10.13 CA Configuration naming conventions: ............................................................... 152
3.10.14 CA Configuration in NetSim: ................................................................................ 152
3.11 VANETs ................................................................................................................................ 155
3.11.1 Introduction ......................................................................................................... 155
3.11.2 IEEE802.11p DSRC/WAVE Protocol Stack: ........................................................... 155
3.11.3 Implementation of 802.11p protocol in NetSim .................................................. 156
3.11.4 Introduction to NetSim – SUMO interfacing for VANET simulation .................... 157
3.11.5 Run Simulation ..................................................................................................... 160
3.11.6 How to create your own network using SUMO and run through NetSim ........... 162
3.11.7 Example Configuration files in NetSim ................................................................. 166
3.12 Military Radio – TDMA link 16............................................................................................. 169
3.12.1 New Experiment ................................................................................................... 169
3.12.2 Create Scenario .................................................................................................... 169
3.12.3 Set Node Properties ............................................................................................. 170
Ver 10.2 4
3.12.4 Set Environment Properties ................................................................................. 170
3.12.5 Modifying/Viewing/Accepting Properties............................................................ 171
3.12.6 Set Application Properties ................................................................................... 171
3.12.7 Enable Packet Trace, Event Trace & Dynamic Metrics(Optional) ........................ 172
3.12.8 Run Simulation ..................................................................................................... 172
3.13 Military Radio – DTDMA ...................................................................................................... 173
3.13.1 New Experiment ................................................................................................... 173
3.13.2 Create Scenario .................................................................................................... 173
3.13.3 Set Node Properties ............................................................................................. 173
3.13.4 Set Environment Properties ................................................................................. 175
3.13.5 Modifying/Viewing/Accepting Properties............................................................ 175
3.13.6 Set Application Properties ................................................................................... 175
3.13.7 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional) ....................... 176
3.13.8 Run Simulation ..................................................................................................... 176
3.13.9 Example Configuration files in NetSim ................................................................. 176
3.13.10 DTDMA Packet size .............................................................................................. 182
3.13.11 Node Join / Leave ................................................................................................. 183
3.14 Propagation models in NetSim............................................................................................ 184
3.14.1 Propagation Loss .................................................................................................. 184
3.14.2 Path Loss .............................................................................................................. 184
3.14.3 Shadowing ............................................................................................................ 185
3.14.4 Fading ................................................................................................................... 186
3.14.5 SINR Calculation ................................................................................................... 186
3.14.6 Bit Error Rate (BER) Calculation ........................................................................... 187
Ver 10.2 5
4.9 HTTP ...................................................................................................................................... 196
4.10Email ..................................................................................................................................... 197
4.10 Sensor App .......................................................................................................................... 198
4.12 Erlang Call ............................................................................................................................ 198
4.13 BSM ..................................................................................................................................... 199
4.14 Emulator .............................................................................................................................. 200
4.15 Priority and QoS of Applications ......................................................................................... 201
4.16 Modelling Poisson arrivals in NetSim .................................................................................. 201
Ver 10.2 6
7.1 Writing your own code .......................................................................................................... 253
7.1.1 Modifying code .................................................................................................... 253
7.1.2 Building Dlls .......................................................................................................... 255
7.1.3 Building a 64-bit DLL in NetSim ............................................................................ 256
7.1.4 Linking Dlls ........................................................................................................... 259
7.1.5 Running Simulation .............................................................................................. 261
7.2 Implementing your code - Examples ..................................................................................... 261
7.2.1 Hello World Program ........................................................................................... 261
7.2.2 Introducing Node Failure in MANET .................................................................... 262
7.2.3 Transferring file from source to destination in WSN ........................................... 263
7.3 Debugging your code ............................................................................................................ 268
7.3.1 Via GUI.................................................................................................................. 269
7.3.2 How to debug and visualize animation simultaneously....................................... 271
7.3.3 Via CLI ................................................................................................................... 272
7.3.4 Co-relating with Event Trace ................................................................................ 275
7.3.5 Viewing & Accessing variables ............................................................................. 277
7.3.6 Print to console window in NetSim ...................................................................... 285
7.4 Creating a new packet and adding a new event in NetSim................................................... 286
7.5 NetSim API’s .......................................................................................................................... 292
Ver 10.2 7
9 NetSim Emulator .................................................................................................................322
9.1 Introduction........................................................................................................................... 322
9.1.1 Emulation: How Simulation interacts with the real world ................................... 322
9.2 Emulation Set-up: .................................................................................................................. 322
9.2.1 Setting up the NetSim Server: .............................................................................. 323
9.2.2 Setting up the Client systems (Real Source and Destination system) ................. 324
9.2.3 Setting up the Linux Client Systems (Real Source and Destination systems) ...... 325
9.2.4 Setting up the Communication with Raspberry PI ............................................... 329
9.2.5 Setting multiple Virtual Machines (VM) to act as Nodes for Emulation .............. 330
9.2.6 Multicasting in NetSim Emulator using JPERF ......................................................... 333
9.3 Emulation examples in NetSim ............................................................................................. 337
9.3.1 Example Application 1 – PING (One way Communication).................................. 337
9.3.2 Example Application 1 – PING (Two-way Communication) ................................. 339
9.3.3 Example Application 2 – Video (Oneway Communication) ................................. 339
9.3.4 Example Application 3 – File Transfer using FileZilla (One-way).......................... 344
9.3.5 Example Application 4 –Skype (Two way Communication) ................................. 348
9.3.6 Example Application 5 – Using JPerf Network performance measurement tool 349
9.3.7 Providing pcap file as input to NetSim Emulator ................................................. 352
9.4 Working of an Emulation Application in NetSim:.................................................................. 355
9.4.1 Delay measurement when pinging through NetSim Emulator ................................ 358
9.5 How doesa user introduce jitter in NetSim Emulations? ...................................................... 361
9.5.1 Introducing Jitter using Background traffic.............................................................. 361
Ver 10.2 8
10.3.4 Simulation terminates and “NetSim Backend has stopped working” displayed: 367
10.3.5 Monitor screen resolution is less than 1024X768: .............................................. 367
10.4 Licensing .............................................................................................................................. 368
10.4.1 No License for product (-1) error ......................................................................... 368
10.5 Troubleshooting VANET simulations that interface with SUMO ........................................ 368
10.5.1 Guide for Sumo .................................................................................................... 368
10.5.2 Guide for Python .................................................................................................. 368
10.5.3 VANET Simulation ................................................................................................ 370
10.5.4 Python .................................................................................................................. 370
10.5.5 NetSim Core Protocol Library............................................................................... 370
Ver 10.2 9
1 NetSim – Introduction
• Building the model – Create a network scenario with devices, links, applications
etc
• Running the simulation - Run the discrete event simulation (DES) and log
different performance metrics
• Visualizing the simulation- Use a packet animator to view the flow of packets
• Analyzing the results - Examine output performance metrics such as throughput,
delay, loss etc. at multiple levels - network, link, queue, application etc.
• Developing your own protocol / algorithm - Extend existing algorithms by
modifying the simulators source C code
NetSim comes in three versions- Academic, Standard and Pro. The academic version is
used for lab experimentation and teaching. The standard version is used for R & D at
educations institutions while NetSim Pro version addresses the needs of defense and
industry. The standard and pro versions are available as components in NetSim v10
Ver 10.2 10
from which users can choose and assemble. The academic version is available as a single
product and includes all the technologies shown below. The main differences between the
various versions are tabulated below:
Ver 10.2 11
1.3 Components in Pro and Standard versions
In NetSim v10, users can choose and assemble components for Pro and Standard version.
The components are as follows:
Ver 10.2 12
D2D), LTE Femto Cell
Ver 10.2 13
2 Getting Started in NetSim
Based on the NetSim version under installation the version type being displayed in the
following windows will change. For example, you will see NetSim Standard for a standard
version install –
Setup prepares the installation wizard and software installation begins with a Welcome
Screen.
Ver 10.2 14
Click on the Next button. In the next screen, License agreement will be displayed.
Read the agreement carefully, scroll down to read the complete license agreement. If the
requirement of the license agreement is accepted click “IAgree” button else quit the setup by
clicking Cancel button.
If you agree with the license agreement, you will be prompted to select the components to
be installed. The list of components is available for selection and assembly only in the
Standard and Pro version. Other versions of NetSim are available as a single package.
Note: Select all the supporting applications for complete installation of the software. In the
next screen, you will be requested to enter the installation path. Select the path in which the
software needs to be installed and click on Next button.
Ver 10.2 15
On the next screen, you will be requested to enter the Start menu folder name.
Click on the Install button to start the installation.The installation process begins.
After the installation of required files, the installation of supporting software begins. For
NetSim Academic, Adobe Flash Player will be installed.
Ver 10.2 16
For NetSim Standard Version and Pro Version, Wireshark installation will start by default (if
not deselected during 3rd party software selection)
Click on Next to start Wireshark installation. In the following window, click on I Agree.
Click on I Agree.
Ver 10.2 17
Click on Next to go to Install Location window as shown below.
Select Install WinPcap and click on Install. After the installation of the software, you will be
requested to click Finish to complete the installation process.
Ver 10.2 18
Select I agree and click on Install to continue installation of Microsoft Visual C++ 2015.
Once installation is completed, a message box will appear as shown in image,click on close.
To start Python software installation, select whether to install for all users orParticular user
alone. Click on Next.
Ver 10.2 19
Select destination directory for Python files.Click on Next.
Click on Finish.
Ver 10.2 20
To install Pywin32, Click on Next
Ver 10.2 21
Click on Finish. This completes theInstallation of python software
Select “Run NetSim” and then click on the Finish button.This completes the installation of
NetSim Software.
Note: During the installation of NetSim Academic version the supporting software installed are Adobe
Flash player and WinPcap.
Ver 10.2 22
2.1.1 Silent installation
1 For example, let us take the NetSim Standard 32 bit setup. Right click on NetSim
Standard 32bit setup-> go to properties and copy the location.
2 Open command prompt and paste the copied location as shown below:->cd <setup
location>
NetSim_Standard_10_1_16_HW_32bit.exe /S /silent=1
><setup location><space>/S<space>/silent=1
Ver 10.2 23
ii. /S : will Install NetSim itself Silently
4 Users can click on “Yes” as shown below to begin installation of NetSim Standard.
This section guides you to install the RLMDongle Driver software from the CD-ROM.
Each prompt displayed during the process tells you what it is about to do and prompts to
either continue or Exit.
Ver 10.2 24
Setup prepares the installation wizard and the software installation begins with a Welcome
Screen.Click on the Next button
Note: Any other program running during the installation of the Dongle will affect the proper
installation of the software.
In the next screen, the License agreement is displayed.Read the license agreement
carefully, scroll down to read the complete license agreement. If the requirement of the
license agreement is accepted select the “Iaccept” button else quit the setup by clicking
Cancel button.
Ver 10.2 25
Click on the Next button
After the installation of the software, you will be requested to click Finish button to complete
the installation process.Now the RLM driver software is installed successfully.
If the driver has been successfully installed then upon connecting the Dongle in the USB port
red light would glow (Refer picture below). If the driver is not correctly installed this light will
not glow when the dongle is connected to the USB port.
Ver 10.2 26
2.2.2 Running NetSim License Server
• Copy the NetSim License Server folder and paste it on Desktop. Check that it
has the license file. If not copy the paste the license file into the License server
folder
• Double click on NetSim License Server folder from Desktop.
• Double click on rlm.exe
• For hardware dongle based users: After the Driver Software installation, connect
the RLM dongle to the system USB port. Double click on My Computer and
access the CD Drive. This CD contents will have the NetSim License server folder.
Note: For running NetSim, rlm.exe must be running in the server (license server) system
and the server system IP address must be entered correctly. Without running rlm.exe,
NetSim won’t run.When you run rlm.exe, the screen will appear as shown below.
After running rlm.exe, click the NetSim icon in the Desktop.The screen given below will be
obtained.Enter the Server IP address where the rlm.exe is running, then click ok button.
Ver 10.2 27
You have now reached to the Home screen of NetSim. Click on New to start a simulation.
Ver 10.2 28
2.3 Menus in NetSim
In Academic/Standard/Pro Version
New: Open options to simulate different kinds of networks such as Internetworks, BGP
Networks, Advanced Wireless Networks (MANET and Wimax), Cellular Networks, Wireless
Sensor Networks, Internet of Things, Zigbee Networks, Cognitive Radio Networks, LTE/LTE-
A Networks (LTE/LTE-A, LTE femtocell, LTE D2D) and VANETs.
Ver 10.2 29
Click on New and select the desired kind of network to simulate
Save
To Save experiment, select File Save, then specify the Experiment Name, Path and click
Ok. The short cut for the same is Ctrl + S.
Save As
To Save an experiment with different name and different path, select Save As, then specify
the Experiment Name, Path and click Ok.
Help
This menu contains link to NetSim user Manual, NetSim Experiment manual, to NetSim
videos and to raise a support Ticket.
The Programming menu contains short network programming exercises for students.
Ver 10.2 30
To start with programming exercises,In Home page, go to NetSim Program Click on Lab
Exercises. Click on this menu and select the desired programming exercise.
Upon selection, the following screen will appear. For detailed help, go to Help NetSim
Programming Exercises Help.
Ver 10.2 31
2.4 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 Internetworks
In this example, a network with two subnets in designed. Let us say the subnet 1 consists of
two wired nodes connected via a Switch and the other subnet consists of one wired node.
Both the subnets are connected using a Router. Traffic in the Network flows from a wired
node in subnet 1 to the wired node in subnet 2.
Perform the following steps to create this network design. Step 1:Drop the devices. Click
on Node icon and select Wired Node
Ver 10.2 32
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. :In order to connect devices, present in
the environment, click on Link and select Wired Link.
Click on the first device and then on the second device to to create a link between them. For
example, select wired link and the click on Switch followed by router to connect them. In this
manner, continue to link all devices.
Step 1: To configure any device, right click on the device and select properties
Ver 10.2 33
User can set values according to their requirement. Modify the properties of any device and
click on Accept. In this example default values are accepted.
Step 2: To configure the links, right click on any Link and select Properties.
After the network is configured, user needs to model traffic from Wired Node B to Wired
Node C. This is done using the application icon. Select the Application Button and click on
Ver 10.2 34
the space between the Grid and the ribbon. Now right click on Application and select
Properties
In above scenario, default values are accepted. The Source_ID is 2 and Destination_ID is 5.
Click on Accept.
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 6.4 and 6.5
respectively.
Ver 10.2 35
2.4.5 Run Simulation
For simulating the network scenario created, click on Run Simulation present in the
Ribbon
Ver 10.2 36
Open saved experiment folder and select the configuration file you want to open.
During Simulation: Users can save by using the short cut CTRL + S
After Simulation: From Results Window: Click the Save button on the top left. From
Animation Window: Click the save icon.
Next,specify the Experiment Name and Save Path and click on Save.
Upon saving a number of files would get saved inside the folder, including
Ver 10.2 37
3 Simulating different networks in NetSim
3.1 Internetworks
Internetwork covers the following protocols: Ethernet, ARP, Wireless LAN, IP, Routing – RIP
/ OSPF, TCP and UDP
Internetworks come with the palette of various devices like Switch, Router, Wired Node,
Wireless Node, AP, etc.Select the desired device in the toolbar and click and drop on the
grid.
To remove devices or application, right click on the particular icon and then click
Remove.Select the appropriate link in the toolbar and connect the devices by clicking on the
device 1 followed by device 2. A wireless link is required when connecting Access point and
Wireless Nodes.
Ver 10.2 38
• To modify properties, right click on the appropriate node or link in the gridand
modify itsproperties.
Ver 10.2 39
• Set the values and click Accept.
3.1.4 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional)
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
Ver 10.2 40
Internetworks – Example Simulations:
Open the scenario for service rate which is available in “<NetSim Install Dir>\Docs\
Sample_Configuration\Internetworks\Generation_rate_service_rate”
Generation Rate (Mbps) = (Packet size (bytes) * 8) / Inter arrival time (µs))
3 The traffic generation rate can be modified by changing application properties. Note that
the generation rate should be less than or equal to service rate for steady-state
simulation, where the service rate is defined as the data rate supported by the Bottle-
neck link. In this case there is no bottle neck link since all links support upto 100 Mbps.
4 Packet Trace -> Enable.
5 Simulate for 100s and note the throughput.
6 Click on edit network and change the link speed from Router E to Wired Node D from
the default 100 Mbps to 25 Mbps. In this case, the link between Router and Wired Node
D becomes the Bottle-neck link since the link rate is less than the generation rate of 30
Mbps (10 * 3).
Inference:Sample 1:In this scenario router receives packets from three links at the rate of
10mbps each, a total of 30 mbps. And the router-node link supports 100mbps. Hence there
is no queuing / drops at the Router. The application throughput would be approximately
equal to the generation rate.
Ver 10.2 41
Sample 2:In this case, the bottleneck link supports only 25 mbps. Due to this, packets get
accumulated in the router's buffer, which overflows after reaching its limit. After this router
starts dropping the packets which can be observed in the Packet Trace by filtering
PACKET_STATUS to Buffer_Dropped at the end of the simulation. The application
throughput would be approximately equal to the bottle neck link capacity.
Open the scenario for packet aggregation which is available in “<NetSim Install Dir>\Docs\
Sample_Configuration\Internetworks\802_11n_packet_aggregation”
Ver 10.2 42
Number of
Application Throughput
Packets Aggregated
1 23.1 Mbps
5 43.6 Mbps
10 53.2 Mbps
Inference:
Ver 10.2 43
Number of Tx and Rx
Throughput
Antennae
1x1 23.1 Mbps
2x2 29.7 Mbps
3x3 31.9 Mbps
4x4 34.4 Mbps
MIMO is a method for multiplying the capacity of a radio link using multiple transmit and
receive antennas to exploit multipath propagation. Increasing the Transmitter and
Receiver Antenna count results in more PHY Data rate (link capacity) and hence leading to
an increased application throughput.
The TCP throughput of a link is limited by two windows: the congestion window and the
receive window. The congestion window tries not to exceed the capacity of the network
(congestion control); the receive window tries not to exceed the capacity of the receiver to
process data (flow control).
The TCP window scale option is an option to increase the receive window size allowed in
Transmission Control Protocol above its former maximum value of 65,535 bytes.
TCP window scale option is needed for efficient transfer of data when the bandwidth-delay
product is greater than 64K. For instance, if a transmission line of 1.5 Mbit/second was used
over a satellite link with a 513 millisecond round trip time (RTT), the bandwidth-delay product
is (1,500,000 * 0.513) = 769,500 bits or about 96,187 bytes.
Ver 10.2 44
Using a maximum window size of 64 KB only allows the buffer to be filled to (65,535 /
96,187) = 68% of the theoretical maximum speed of 1.5 Mbps, or 1.02 Mbps.
By using the window scale option, the receive window size may be increased up to a
maximum value of 1,073,725,440 bytes. This is done by specifying a one byte shift count in
the header options field. The true receive window size is left shifted by the value in shift
count. A maximum value of 14 may be used for the shift count value. This would allow a
single TCP connection to transfer data over the example satellite link at 1.5 Mbit/second
utilizing all of the available bandwidth.
Output:
Application_Throughput
Window Scaling
(Mbps)
FALSE 2.5
TRUE 8.7
Ver 10.2 45
In case 1 the Application_Throughput is 2.50 Mbps less than the theoretical throughput since
it initially takes some time for the window to reach 65535 B Users can notice the Window
size in wireshark. Please refer section 6.7.4 in User Manual for creating wireshark graphs
From the above screenshot users can notice that the window size grows upto 560192Bytes
because of Window Scaling. This leads to a higher Application_Throughput compared to the
case without window scaling.
When you create a network using the GUI, NetSim will automatically configure the IP
address of the devices in the scenario.
Ver 10.2 46
If you create a network with two wired nodes and a switch, the IP addresses are assigned as
10.0.1.2 and 10.0.1.3 for the two wired nodes. The default subnet mask is assigned to be
255.255.0.0. It can be edited to 255.0.0.0 (Class A) or 255.255.255.0 (Class C) subnet
masks. Both the nodes are in the same network (10.0.0.0).
Similarly, if you create a network with a router and two wired nodes, the IP addresses are
assigned as 11.1.1.2 and 11.2.1.2 for the two wired nodes. The subnet mask is default as in
above case, i.e., 255.255.0.0. The IP address of the router is 11.1.1.1 and 11.2.1.1
respectively for the two interfaces. Both the nodes are in different networks (11.1.0.0 and
11.2.0.0) in this case.
802.11a, 802.11b, 802.11g, 802.11n, 802.11ac, 802.11e and 802.11p are the WLAN
standards available in NetSim.
802.11 a 5 20
802.11 b 2.4 20
802.11 g 2.4 20
1 2412
2 2417
Ver 10.2 47
3 2422
4 2427
5 2432
6 2437
7 2442
8 2447
9 2452
10 2457
11 2462
Channel 1, when IEEE 802.11b is configured, corresponds to a channel width of 22MHz and
a center frequency of 2412MHz.
The 2.4-GHz band regulations of 802.11b/g/n have been relatively constant, given the length
of time they have been in operation. The FCC (U.S) allows for 11 channels, ETSI (and most
other parts of the world) allow for up to 13 channels, and Japan allows up to 14 channels but
requires a special license and operating modes to operate in channel 14.
Channel plans for the 2.4 GHz band identify 14 Overlapping channels, but only 3 of these
are Channels 1,6,11 are highlighted below, note that all other channels overlap or share
boundaries
Ver 10.2 48
Channel Number Center Frequency (MHz)
36 5180
38 5190
40 5200
42 5210
44 5220
46 5230
48 5240
52 5260
56 5280
60 5300
64 5320
Channel 36, when IEEE 802.11n is configured at 5GHz, corresponds to a channel width of
20MHz and a center frequency of 5180MHz.
The 5.0-GHz band regulations of 802.11a/n/ac are more diverse in the channels they allow
and their rules for operation. In general, with the advancement of 802.11ac most are now
considering opening more spectrum for 5 GHz Wi-Fi – and all have more non overlapping
channels in 5 GHz than is available anywhere in 2.4 GHz.
5GHz Channels
Channel Numbering
The standard method to denote 5 GHz channels has been to always use the 20 MHz center
channel frequencies for both 20 MHz and 40 MHz wide channels.
Ver 10.2 49
The following are the channel numbers of the non-overlapping channels for 802.11ac in
NetSim:
80MHz – 36, 52
160MHz – 36
20 Upto 288.8
n 2.4, 5 4
40 Upto 600
20 Upto 346.8
ac 40 Upto 800
5 8
80 Upto 1733.2
160 Upto 3466.8
Mac aggregation and block acknowledgement are two important enhancements to 802.11n
standard. In the aggregation scheme, several MPDU’s (MAC Protocol Data Units) are
aggregated in to a single A-MPDU (Aggregated MPDU).
The A-MPDU’s are created before sending to PHY layer for transmission. The MAC does not
wait for MPDU’s before aggregation. It aggregates the already present packets in the queue
to form an A-MPDU. The maximum size of A-MPDU is 65535 bytes. The maximum size of
each MPDU is 4KB. In A-MPDU, each MPDU has a delimiter of 32bits at the beginning and
padding at the end. These padding bytes ensure that size of MPDU is a multiple of 4bytes.
Ver 10.2 50
In 802.11n, a single block acknowledgement is sent for the entire A-MPDU. The block ack
acknowledges each packet that is received. It consists of a bitmap (compressed bitmap) of
64bits or 8 bytes. This bitmap can acknowledge upto 64 packets, 1bit for each packet.
The value of a bitmap field is 1 if respective packet is received without error else it is 0. Only
the error packets are resent until a retry limit is reached. The number of packets in an A-
MPDU is restricted to 64 since the size of block ack bitmap is 64bits.
Ver 10.2 51
Packets arriving from the NETWORK Layer gets queued up in an access buffer from which
they are sorted according to their priority in the respective QOS buffer according to the IEEE
802.11e standard. An event MAC_OUT with SubEvent CS (Carrier Sense – CSMA) is
added to check if the medium is free
In CS, if the medium is free, then the NAV is checked. This is enabled if RTS/CTS
mechanism is enabled which can be done so by adjusting the RTS Threshold. If the
Present_Time>NAV, then an Event MAC_OUT with SubEvent DIFS End is added at the
time Present_Time + DIFS time.
The medium is checked at the end of DIFS time period and a random time BackOff is
calculated based on the Contention Window (CW). An Event MAC_OUT with SubEvent
Backoff is added at time Present_Time + BackOff Time.
Once Backoff is successful, NetSim starts the transmission process wherein it gets the
aggregated packet from the QOS buffer and stores it in the Retransmit buffer. If the A-MPDU
size is > RTS Threshold, then it enables RTS/CTS mechanism which is an optional feature.
Ver 10.2 52
NetSim sends the packet by calling the PHY_OUT Event with SubEvent AMPDU_Frame.
Note that the implementation of A-MPDU is in the form of a linked list.
Whenever a packet is transmitted, the medium is made busy and a Timer Event with
SubEvent Update Device Status is added at the transmission end time to set the medium
again as idle.
At the receiver, the device de-aggregates the packet in the MAC Layer and generates a
block ACK which is sent to the transmitter. If the receiver is an intermediate node, the de-
aggregated packets are added to the access buffer of the receiver in addition to the packets
which arrive from Network layer. If the receiver is the destination, then the received packets
are sent to the Network layer. At the transmitter side, when the device receives the block
acknowledgement, it retransmits only those packets which are errored. The rest of the
packets are deleted from the retransmit buffer. This is done till all packets are transmitted
successfully or a retransmit limit is reached after which next set of packets are aggregated to
be sent.
Ver 10.2 53
Feature 802.11n 802.11ac
Spatial Streams Up to 4 streams Up to 8 streams
MIMO Single User MIMO Multi-User MIMO
Channel Bandwidth 20 and 40 MHz 20, 40, 80 and 160 MHz (optional)
BPSK, QPSK, 16QAM and BPSK, QPSK, 16QAM, 64QAM and
Modulation
64QAM 256QAM (optional)
Max Aggregated
65536 octets 1048576 octets
Packet Size
MAC layer improvements include only the increment of number of aggregated packets from
1 to 64. The MCS index for different modulation and coding rates are as follows:
Receiver sensitivity for different modulation schemes in 802.11ac (for a 20MHz Channel
bandwidth) are as follows:
Ver 10.2 54
PHY Standard Subcarriers Capacity relative to
20MHz in 802.11ac
802.11n/802.11ac 20MHz Total 56, 52 Usable (4 pilot) x1.0
802.11n/802.11ac 40MHz Total 114, 108 Usable (6 pilot) x2.1
802.11n/802.11ac 80MHz Total 242, 234 Usable (8 pilot) x4.5
802.11n/802.11ac 160MHz Total 484, 468 Usable (16 pilot) x9.0
Now with the knowledge of MCS index and bandwidth of the channel data rate is set in the
following manner
Step1: Get the number subcarriers that are usable for the given bandwidth of the medium.
Step2: Get the Number of Bits per Sub Carrier (NBPSC) from selected MCS
Step5: Physical level Data Rate = NDBPS/Symbol Time (4micro sec for long GI and 3.6
micro sec for short GI)
Static Routing:
Routers forward packets using either route information from route table entries that
configured manually or the route information that is calculated using dynamic routing
algorithms. Static routes, which define explicit paths between two routers, cannot be
automatically updated; you must manually reconfigure static routes when network changes
occur. Static routes use less bandwidth than dynamic routes. No CPU cycles are used to
calculate and analyze routing updates.
Static routes are used in environments where network traffic is predictable and where the
network design is simple. You should not use static routes in large, constantly changing
networks because static routes cannot react to network changes. Most networks use
dynamic routes to communicate between routers but might have one or two static routes
configured for special cases. Static routes are also useful for specifying a gateway of last
resort (a default router to which all unroutable packets are sent).
How to Setup Static Routes
Ver 10.2 55
Create a scenario as per the screenshot above and disable TCP in all nodes. Run simulation
for 10 seconds and open packet animation.
The default routing protocol is OSPF. So, packets will reach destination via Router E. (Refer
related experiment in experiment manual for more information).
Static routing:
Open Router A properties->Network_Layer. Click on configure Static Route IP and set the
properties as per the screenshot below and click on Add.
Ver 10.2 56
This creates a text file for every router in the temp path of NetSim which is in the format
below:
Router A:
Similarly follow the same procedure for remaining entries of Router A, Router B, Router C,
Router D as per the following:
Ver 10.2 57
Router B:
Router C:
Router D:
After configuring the router properties, run simulation for 10 seconds and check packet
animation. Now the packets will reach destination as per the above routes:
Router A->Router B->Router C->Router D
Ver 10.2 58
3.1.11 Multicast Routing Protocols
Note: Multicast routing protocols can be configured and run only if licenses for component 3 (advanced
routing) is available
Multicasting is one source sending a packet to multiple destinations. Group formation and
management is an integral part of multicasting.
A multicast group is identified by its multicast group address. Multicast packets are delivered
to that multicast group address. Unlike unicast addresses that uniquely identify a single host,
multicast IP addresses do not identify a particular host. To receive the data sent to a
multicast address, a host must join the group that address identifies. The data is sent to the
multicast address and received by all the hosts that have joined the group indicating that
they wish to receive traffic sent to that group. The multicast group address is assigned to a
group at the source.
IP Class D Addresses:
IP multicast addresses have been assigned to the IPv4 Class D address space by IANA.
The high-order four bits of a Class D address are 1110. Therefore, host group addresses
can be in the range 224.0.0.0 to 239.255.255.255. A multicast address is chosen at the
source (sender) for the receivers in a multicast group.
Ver 10.2 59
• IGMP is used between hosts on a LAN and the routers on that LAN to track the
multicast groups of which hosts are members.
• Protocol Independent Multicast (PIM) is used between routers so that they can
track which multicast packets to forward to each other and to their directly
connected LANs.
3.1.10.1 IGMP
Internet Group Management Protocol (IGMP) is used by IP hosts to report their multicast
group memberships to any immediately-neighbouring multicast routers. Routers that are
members of multicast groups are expected to behave as hosts as well as routers, and may
even respond to their own queries. IGMP may also be used between routers. Like ICMP,
IGMP is an integral part of IP. It is required to be implemented by all hosts wishing to
receive IP multicasts. IGMP messages are encapsulated in IP datagrams, with an IP
protocol number of 2. All IGMP messages are sent with IP TTL 1, and contain the IP Router
Alert option in their IP header. All IGMP messages of concern to hosts have the following
format:
There are three types of IGMP messages of concern to the host- router interaction:
Ver 10.2 60
Protocol Description:
If a router has multiple physical interfaces on a single network IGMP protocol runs only on
one of them. Hosts, on the other hand, need to perform their actions on all interfaces that
have memberships associated with them.
Multicast routers use IGMP to learn which groups have members on each of their attached
physical networks. A multicast router keeps a list of multicast group memberships for each
attached network, and a timer for each membership.
"Multicast group memberships" means the presence of at least one member of a multicast
group on a given attached network, not a list of all of the members. With respect to each of
its attached networks, a multicast router may assume one of two roles: Querier or Non-
Querier. There is normally only one Querier per physical network. All multicast routers start
up as a Querier on each attached network. If a multicast router hears a Query message
from a router with a lower IP address, it MUST become a Non-Querier on that network. If a
router has not heard a Query message from another router for Other Querier Present
Interval, it resumes the role of Querier. Routers periodically (Query Interval) send a General
Query on each attached network for which this router is the Querier, to solicit membership
information. On startup, a router should send Startup Query Count General Queries spaced
closely together Startup Query Interval in order to quickly and reliably determine
membership information.
A General Query is addressed to the all-systems multicast group (224.0.0.1), has a Group
Address field of 0, and has a Max Response Time of Query Response Interval. When a host
receives a General Query, it sets delay timers for each group (excluding the all-systems
group) of which it is a member on the interface from which it received the query. Each timer
is set to a different random value, using the highest clock granularity available on the host,
selected from the range (0, Max Response Time) with Max Response Time as specified in
the Query packet. When a host receives a Group-Specific Query, it sets a delay timer to a
random value selected from the range (0, Max Response Time) as above for the group
being queried if it is a member on the interface from which it received the query. If a timer
for the group is already running, it is reset to the random value only if the requested Max
Response Time is less than the remaining value of the running timer. When a group's timer
expires, the host multicasts a Version 2 Membership
Ver 10.2 61
Report to the group, with IP TTL of 1. If the host receives another host's Report (version 1
or 2) while it has a timer running, it stops its timer for the specified group and does not send
a Report, in order to suppress duplicate Reports.
When a router receives a Report, it adds the group being reported to the list of multicast
group memberships on the network on which it received the Report and sets the timer for the
membership to the Group Membership Interval. Repeated Reports refresh the timer.
If no reports are received for a particular group before this timer has expired, the router
assumes that the group has no local members and that it need not forward remotely-
originated multicasts for that group onto the attached network.
Joining a group:
When a host joins a multicast group, it should immediately transmit an unsolicited Version 2
Membership Report for that group, in case it is the first member of that group on the network.
1 Open the Sample configuration file for IGMP from the “<NetSim Install Dir>\Docs\
Sample_Configuration\Internetworks\IGMP”.
2 To enable IGMP protocol, Right click on the Wired node properties in the network
layer, make IGMP_status as “TRUE” as shown below:
Ver 10.2 62
IGMP Properties:
i. Robustness variable
The Robustness Variable allows tuning for the expected packet loss on a subnet. If a subnet
is expected to be lossy, the Robustness Variable may be increased. IGMP is robust to
(Robustness Variable-1) packet losses. The Robustness Variable must not be ‘0’ and ‘1’.
Default value is ‘2’.
The Query Interval is the interval between General Queries sent by the Querier. The default
value is 125 seconds. By varying the Query Interval, NetSim user may tune the number of
IGMP messages on the subnet; larger values cause IGMP Queries to be sent less often.
The Max Response Time inserted into the periodic General Queries. The default value is 1
second. By varying the Query Response Interval, NetSim user may tune the burstiness of
IGMP messages on the subnet; larger values make the traffic less bursty, as host responses
are spread out over a larger interval. The number of seconds represented by the Query
Response Interval must be less than the Query Interval.
The Unsolicited Report Interval is the time between repetitions of a host’s initial report of
membership in a group. Default: 10 seconds.
Ver 10.2 63
Router Properties:Right click on Router properties and make ICMP_Status as “TRUE” and
PIM_Status as “False”.
To configure Multicast Application:Click and drop Application icon and set the properties as
follows:
Application Properties
Application Method MULTICAST
Source ID 2
Destination count 2
Destination ID 3,4
Note: Users can enter Multiple Destination IDs by separating them with ‘comma’
The multicast application start time is set to 5s, since it would take some time for the route tables to get
set-up.
Ver 10.2 64
Multicast IP Addresses: Addresses in class D are for multicast communication from one
source to a group of destinations. IP multicast group addresses fall in the range
from 224.0.0.0 through 239.255.255.255. A multicast address can be used only as a
destination address but never as a source address. i.e. In NetSim by default, Multicast
Destination address is set as 239.12.14.5
Enable packet trace and event trace icon in the ribbon and run simulation for 10 seconds.
• Initially all the hosts i.e. Wired Node B, C, D and E receives the
IGMP_Memebership_Query message from the Router A.
• When the host receives the Query message immediately it has to send the report
to the Router indicating that it, joins a multicast group. So users can see Wired
Node D sends IGMP_V2_Membership_Report message to the Router A. Likewise,
Wired Nodes B, C & E) also sends the Report message to the Router.
• The Router/Switch makes an entry in its table and forwards
IGMP_V2_Membership_Report message.
• Open the packet trace file and filter the PACKET_ID with ‘0’ & ‘1’
Ver 10.2 65
• Router A broadcasts IGMP_Memebership_Query message to all the Wired Nodes.
• When the host receives the Query message immediately it sends
IGMP_V2_Membership_Report message to the Router A.
• From the Packet trace users can see that, IGMP protocol starts after 1 second of
the simulation.
• Multicast application should start after 5s only (default start time in GUI) which is
traced in the packet trace as shown below:
• The CBR packets are multicasted from source node which is Node-2 to
destinations Node 3 and Node 4.
• Here DESTINATION_IP 224.0.0.1 is to join the multicast group and 239.12.14.5 is
the multicast address.
1 Open the Event trace and filter the Event_Type as “NETWORK_OUT” and
“TIMER_EVENT”.
2 In the Subevent type, users can see the following subevents:
Ver 10.2 66
c. IGMP_SendQuery - Routers periodically ( based on Query Interval) sends
Query message on each attached network, to solicit membership information
d. IGMP_SendStartupQuery - On startup, a router should send Startup query
count in order to quickly and reliably determine membership information.
e. IGMP_UnsolicitedReportTimer – This timer is set to cover the possibility of
the initial Membership Report being lost or damaged, it is recommended that
it be repeated once or twice after short delays after every Unsolicited Report
Interval.
f. JOIN_MULTICAST_GROUP – "join multicast group" occurs when the host
decides to join the group on the interface. In NetSim, a host joins the
Multicast group after 5 seconds which can be analysed from the following
figure.
• Leave Group
• IGMP v1 compatibility
3.1.10.2 PIM:
Protocol Independent Multicast (PIM)is used between routers so that they can track which
multicast packets to forward to each other and to their directly connected LANs.
• The PIM process begins when the router establishes PIM neighbor adjacencies by
sending PIM hello messages to the multicast address 224.0.0.13.
• Hello messages are sent periodically at the interval of 30 seconds. When all
neighbors have replied, then the PIM software chooses the router with the highest
priority in each LAN segment as the designated router (DR).
• The DR priority is based on a DR priority value in the PIM hello message. If the DR
priority value is not supplied by all routers, or the priorities match, the highest IP
address is used to elect the DR.
Ver 10.2 67
To configure PIM in NetSim:
Step 3: The following window will open. For PIM configuration and users can edit the
required properties click on add click and accept. Now PIM is configured for Router A.
Ver 10.2 68
Note: To run simulation with PIM protocol, PIM should be configured atleast for one router.
Result Analysis: Open the Event trace and filter the Event_Type as “NETWORK_OUT” and
“TIMER_EVENT”. In the Subevent type, users can see the subevent “PIM_hello meassage”
sent for every 30 seconds.
Routers provide basic traffic filtering capabilities, such as blocking Internet traffic, with
access control lists (ACLs). An ACL is a sequential list of permit or deny statements that
apply to addresses or upper-layer protocols.
An access list is a sequential series of commands or filters. These lists tell the router what
types of packets to: permit or deny. When using an access-list to filter traffic, a permit
statement is used to “allow” traffic, while a deny statement is used to “block” traffic.
ACLs control traffic in one direction at a time on an interface. A separate ACL would need
to be created for each direction, one for inbound and one for outbound traffic. Finally
every interface can have multiple protocols and directions defined.In NetSim, by default acl
is set to both. If acl is set to both then it applies to both inbound and outbound traffic.
ACL properties can be configured in two ways a) Via GUI (or) b) Via .txt file
Create a basic scenario in internetworks with 1 Router and 4 Wired Nodes.Goto router
properties and enable ACL_Status.
Ver 10.2 69
Click on “Configure ACL” following window will appear. Users can edit the properties and
click on Add click on Accept.
Note: If Device name is changed it has to be updated in both .txt file and GUI
• This file is loaded into GUI with text fields and contents
VLAN is called as virtual local area network, used in Switches and it operates at layer2 and
Layer3. A VLAN, is a group of hosts which communicate as if they were attached to the
same broadcast domain, regardless of their physical location.
For example, all workstations and servers used by a particular workgroup team can be
connected to the same VLAN, regardless of their physical connections to the network or the
fact that they might be intermingled with other teams. VLANs have the same attributes as
physical LANs, but you can group end stations even if they are not physically located on the
same LAN segment.
A VLAN behaves just like a LAN in all respects but with additional flexibility. By using VLAN
technology, it is possible to subdivide a single physical switch into several logical switches.
Ver 10.2 70
VLANs are implemented by using the appropriate switch configuration commands to create
the VLANs and assign specific switch interfaces to the desired VLAN.
Switches implement VLANs by adding a VLAN tag to the Ethernet frames as they enter the
switch. The VLAN tag contains the VLAN ID and other information, which is determined by
the interface from which the frame enters the switch. The switch uses VLAN tags to ensure
that each Ethernet frame is confined to the VLAN to which it belongs based on the VLAN ID
contained in the VLAN tag. The VLAN tags are removed as the frames exit the switch on the
way to their destination.
Any port can belong to a VLAN, and unicast, broadcast, and multicast packets are forwarded
and flooded only to end stations in that VLAN. Each VLAN is considered a logical network.
Packets destined for stations that do not belong to the VLAN must be forwarded through a
router.In the below screenshot, the stations in the development department are assigned to
one VLAN, the stations in the marketing department are assigned to another VLAN, and the
stations in the testing department are assigned to another VLAN.
Ver 10.2 71
3.1.12.2 When do we need a VLAN?
VLANs are identified by a VLAN ID (a number between 0 – 4095), with the default VLAN on
any network being VLAN 1. Each port on a switch or router can be assigned to be a member
of a VLAN (i.e., to allow receiving and sending traffic on that VLAN).
For example: On a switch, traffic that is sent to a port that is a member of VLAN2, may be
forwarded to any other VLAN2 port on the switch, and it can also travel across a trunk port
(connections between switches) to another switch and forwarded to all VLAN2 ports on that
switch. Traffic will not be forwarded to ports that are on a different VLAN ID.
Trunk Link
VLAN 3 VLAN 3
Ver 10.2 72
3.1.12.3 Understanding Access and Trunk Links:
• The links connecting the end devices are called access links. These are the links
usually carrying the Data VLAN information
• The link between the switches is called trunk link. It carries packets from all the
VLANs.
Access Link
Trunk Link
Access Link
Access link connection is the connection where switch port is connected with a device that
has a standardized Ethernet NIC. Standard NIC only understand IEEE 802.3 or Ethernet II
frames. Access link connection can only be assigned with single VLAN. That means all
devices connected to this port will be in same broadcast domain.
For example twenty users are connected to a hub, and we connect that hub with an access
link port on switch, then all of these users belong to same VLAN. If we want to keep ten
users in another VLAN, then we need to plug in those ten users to another hub and then
connect it with another access link port on switch.
Trunk link connection is the connection where switch port is connected with a device that is
capable to understand multiple VLANs. Usually trunk link connection is used to connect two
switches. Trunking allows us to send or receive VLAN information across the network. To
support trunking, original Ethernet frame is modified to carry VLAN information.
Ver 10.2 73
3.1.12.4 Understand how VLAN works:
• VLAN1
• VLAN2
L2 Switch A
VLAN Port
Interface ID VLAN Status VLAN ID
Type
Interface_1 TRUE 2 Access _Port
Interface_2 TRUE 2 Access _Port
Interface_3 TRUE 3 Access _Port
Ver 10.2 74
Then click Configure VLAN under VLAN_GUI parameter. The following window will open.
Ver 10.2 75
Similarly change the VLAN properties for Interface ID 2 as below
To add another VLAN click plus icon shown in the following image.
Ver 10.2 76
Run simulation for 10 seconds and observe the throughputs.
Throughput (Mbps)
Application 1 0.58
Application 2 0
The throughput for 2nd application is zero because the source and destination is in different
VLANs, thereby traffic flow or communication between 2 VLANs using Layer2 switch is not
possible. To overcome this problem, an L3 switch is used.
VLANs divide broadcast domains in a LAN environment. Whenever hosts in one VLAN need
to communicate with hosts in another VLAN, the traffic must be routed between them. This is
known as inter-VLAN routing. This can be possible by using L3 switch.
Layer 3 switch (also known as a multi-layer switch) is a multi-functional device that have the
same functionality like a layer 2 switch, but behaves like a router when necessary. It’s
generally faster than a router due to its hardware based routing functions, but it’s also more
expensive than a normal switch.
Ver 10.2 77
VLAN 2 VLAN 3
10.0.1.2 11.0.1.4
VLAN 3 11.0.1.1
10.0.1.4 11.0.1.6
Wired Node B Wired Node C Wired Node D Wired Node E Wired Node F
Node
I/f1_Ethernet I/f1_Ethernet I/f1_Ethernet I/f1_Ethernet I/f1_Ethernet
IP
10.0.0.4 10.1.0.4 11.2.0.4 11.3.0.4 11.4.0.4
Address
Default
10.0.0.3 10.1.0.3 11.2.0.3 11.3.0.3 11.4.0.3
Gateway
L3 Switch A
VLAN Port
Interface ID VLAN Status VLAN ID
Type
Interface_1 TRUE 2 Access _Port
Interface_2 TRUE 2 Access _Port
Interface_3 TRUE 3 Access _Port
Interface_4 TRUE 3 Access _Port
Interface_5 TRUE 3 Access _Port
Ver 10.2 78
Run simulation for 10 seconds and observe the throughputs.
Throughput (Mbps)
Application 1 0.58
Application 2 0.58
Application 3 0.58
Ver 10.2 79
192.168.1.3 192.168.1.4
192.168.1.1 192.168.2.2
192.168.2.1 192.168.1.2
192.168.3.1 192.168.3.2
192.168.2.3 192.168.2.4
• VLAN 3 • VLAN 2
3.1.12.5 Part3:
Create a network and edit the properties as per the above screenshot. Edit all the wired
node properties shown below:
Ver 10.2 80
L3 Switch A
VLAN Port
Interface ID VLAN Status VLAN ID
Type
Interface_1 TRUE 2 Access _Port
Interface_2 TRUE 3 Access _Port
Interface_3 TRUE 1 Trunk _Port
L3 Switch B
Interface ID VLAN VLAN ID VLAN Port
Status Type
Interface_1 TRUE 1 Trunk _Port
Interface_2 TRUE 2 Access
_Port
Interface_3 TRUE 3 Access
_Port
Click on Configure VLAN and set the properties as per the screenshot shown below and
click on Add
Ver 10.2 81
Similarly add L3 switch B’s 2nd interface to VLAN2
Ver 10.2 82
Set the properties for VLAN3 properties of L3 Switch A as per the screenshot below and
click on Add:
Ver 10.2 83
Go to L3 Switch A properties -> Network_Layer -> Configure Static Route IP. Set the
properties in Static Route IP window as per the screenshot below and click on Add.
Ver 10.2 84
After setting the Static IP Route properties click on Accept:
Note: Disable TCP in Transport Layer in Wired Node C and Wired Node E.
Add one more application from wired node C to wired node F and note down the throughput.
Throughput (Mbps)
Application 1 0.58
Application 2 0.58
Application 3 0.58
The above results concludes that Trunking allows us to send or receive any VLAN
information across the network.
Ver 10.2 85
3.1.13 Public IP Address & NAT (Network Address Translation)
A public IP address is assigned to every computer that connects to the Internet where
each IP is unique. Hence there cannot exist two computers with the same public IP address
all over the Internet. This addressing scheme makes it possible for the computers to “find
each other” online and exchange information. User has no control over the IP address
(public) that is assigned to the computer. The public IP address is assigned to the
computer by the Internet Service Provider as soon as the computer is connected to the
Internet gateway.
An IP address is considered private if the IP number falls within one of the IP address
ranges reserved for private networks such as a Local Area Network (LAN). The Internet
Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP
address space for private networks (local networks):
Starting IP Ending IP
Class No. of hosts
address address
A 10.0.0.0 10.255.255.255 16,777,216
B 172.16.0.0 172.31.255.255 1,048,576
C 192.168.0.0 192.168.255.255 65,536
Private IP addresses are used for numbering the computers in a private network including
home, school and business LANs in airports and hotels which makes it possible for the
computers in the network to communicate with each other. For example, if a network A
consists of 30 computers each of them can be given an IP starting from 192.168.0.1 to
192.168.0.30.
Devices with private IP addresses cannot connect directly to the Internet. Likewise,
computers outside the local network cannot connect directly to a device with a private IP. It
is possible to interconnect two private networks with the help of a router or a similar device
that supports Network Address Translation.
If the private network is connected to the Internet (through an Internet connection via ISP)
then each computer will have a private IP as well as a public IP. Private IP is used for
communication within the network whereas the public IP is used for communication over the
Internet.
Ver 10.2 86
3.1.13.3 Network address translation (NAT)
A device that is configured with NAT will have at least one interface to the inside network
and one to the outside network. In a typical environment, NAT is configured at the exit
device between a stub domain (inside network) and the backbone. When a packet leaves
the domain, NAT translates the locally significant source address into a globally unique
address. When a packet enters the domain, NAT translates the globally unique destination
address into a local address. If more than one exit point exists, each NAT must have the
same translation table. NAT can be configured to advertise to the outside world only one
address for the entire network. This ability provides additional security by effectively hiding
the entire internal network behind that one address. If NAT cannot allocate an address
because it has run out of addresses, it drops the packet and sends an Internet Control
Message Protocol (ICMP) host unreachable packet to the destination.
192.168.0.2
192.168.0.3 192.168.0.
192.168.
1(Private IP
0.1(Publi
address)
c IP Interne
t
192.168.0.4
Network
router
(Gateway
192.168.0.5
NAT is secure since it hides network from the Internet. All communications from internal
private network are handled by the NAT device, which will ensure all the appropriate
translations are performed and provide a flawless connection between internal devices and
the Internet.
In the above figure, a simple network of 4 hosts and one router that connects this
network to the Internet. All hosts in the network have a private Class C IP Address,
including the router's private interface (192.168.0.1), while the public interface that's
connected to the Internet has a real IP Address (203.31.220.134). This is the IP
address the Internet sees as all internal IP addresses are hidden.
Ver 10.2 87
3.1.13.4 Working of NAT in NetSim:
Create a scenario as per the below screenshot and set the properties shown below:
10.0.0.4 172.16.0.4
Wired Subnet
IP address
Node mask
G 10.0.0.2 255.0.0.0
H 10.0.0.3 255.0.0.0
I 10.0.0.4 255.0.0.0
J 172.16.0.2 255.255.0.0
K 172.16.0.3 255.255.0.0
L 172.16.0.4 255.255.0.0
Router Properties:
Ver 10.2 88
After simulation open packet trace and filter Packet Id to 1
Source node 7 (10.0.0.2) wouldn’t know how to route to the destination and hence its default
gateway is Router A with interface IP (10.0.0.1). The first line in the above screenshot
specifies packet flow from Source Node 7 to L2 Switch E with SOURCE_IP (10.0.0.2),
DESTINATION_IP (10.0.0.1), GATEWAY_IP (10.0.0.2) and NEXT_HOP_IP (10.0.0.1).
Since Switch is Layer2 device there is no change in the IPs in second line. Third line
specifies the packet flow from Router A to Router B with SOURCE_IP (10.0.0.2),
DESTINATION_IP (13.1.1.1- IP of the router connected to destination. Since OSPF is
running, the router is looks up the route to its destination from routing table), GATEWAY_IP
(11.1.1.1) and NEXT_HOP_IP (11.1.1.2) and so on.
Ver 10.2 89
3.2 Legacy Networks
3.2.1 New Experiment
Adding Node:
• Click on the Node icon in the tool bar and click and drop inside the grid. (Note:
This is applicable for Pure Aloha and Slotted Aloha)
• Nodes cannot be connected directly to each other because an intermediate
connecting component (such as Hub or Concentrator) is required. (Note: This is
applicable for CSMA/CD, Token Bus and Token Ring)
Adding Hub:
• Click on the Hub icon in the tool bar and click it onto the environment. By default a
Hub has 24 ports. (Note: This is applicable for CSMA/CD and Token Bus).
Adding Concentrator:
• Click on the Concentrator icon in the tool bar and click it onto the environment. By
default a Concentrator consists of 24 ports. (Note: This is applicable for Token
Ring).
Ver 10.2 90
3.2.3 Set Node, Link and Application Properties
Set Node Properties:Right Click on the appropriate node and select Properties.
Set the Properties for the devices and links:Right click over the devices and then select
Properties to set the properties of the links and the devices.
On opening an already configured properties of an application the input fields will be frozen
(i.e. the input cannot be changed).To modify these values click on the Modify button in the
screen. Now the input value can be changed.Click on the Accept button, the modified
values will be saved.
This View button is enabled once the Accept Button is clicked. To view the given values,
click on the View button.
Click Packet Trace icon in the tool bar. To get detailed help, please refer section
6.5respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics and click OK.
(Note: Logging of packet trace and event trace in token bus/ring simulations is possible only
with the 64-bit build of NetSim. In addition, this must be run with a > 8GB RAM configuration
system. This is because of a large number of token transmission and hence the packet trace
requires very large amounts of memory.).
Ver 10.2 91
3.3 Advanced Wireless Networks – MANET & Wi-Max
3.3.1 New Experiment
• Click on the Node icon in the tool bar, select Wireless Node and click and drop it
inside the grid. One must be aware that TCP is disabled by default. (Note: A Node
cannot be placed on another Node. A Node cannot float outside of the grid.)
Adding Base Station and Subscriber (Note: This is applicable for Wi-MAX)
• Click on the Base Station icon in the tool barand click it onto the environment.
• Click on the Wi-MaxSubscriber icon after clicking Node icon in the tool bar. Click
and drop it onto the environment.
Ver 10.2 92
3.3.3 Set Node, Link and Application Properties
Right click on the appropriate node or link and select Properties. Then modify the
parameters according to the requirements.
• Global Properties: Certain properties are global in nature, i.e changing properties in
one node will automatically reflect in the others in that network. In case of Wi-Max,
Routing Protocol in Application Layer of router and all user editable properties in
DataLink Layer and Physical Layer of Access Point and Wireless Node are Global
• In case of MANET, in Wireless Node, Routing Protocol in Network Layer and all
user editable properties in DataLink Layer, Physical Layer and Power are Global
• Select the Application Button on the ribbon and click on the empty region between
the Grid Environment and the ribbon. Now right click on Application and select
Properties. Multiple applications can be generated by using add button in
Application properties.
Ver 10.2 93
3.3.4 Modifying/Viewing/Accepting Properties
3.3.5 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional)
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
Users can see the variation in range of a node by changing the following parameters.
Ver 10.2 94
Transmitter Power:
Increase in transmitter power increases the received power when all other parameters are
constant. Increased received power leads to higher SNR and hence higher Phy Data rates
and lesser error.
RF Propagation Losses:
Path Loss or attenuation of RF signals occurs naturally with distance. Losses can be
increased by increasing the path loss exponent (η). This option is available in channel
characteristics. Users can compare the results by changing the path loss exponent (η) value.
Distance:
As the distance between two devices increases the received signal power reduces as
propagation loss increases with distance. As the received power reduces, the underlying
Phy rate the channel can handle also drops.
Receiver sensitivity:Receiver sensitivity is the lowest power level at which the receiver can
detect an RF signal and demodulate data. Improving the sensitivity on the receiver (making it
Ver 10.2 95
more negative) will allow the radio to detect weaker signals, and can increase the
transmission range.
Click on Run Simulation icon on the top toolbar. Set the Simulation Time and click on OK.
• If user wants to implement HTTP application among Nodes, TCP must be enabled
in Source Node as TCP is set to disable by default.
• OLSR is a proactive link-state routing protocol, which uses hello and topology
control (TC) messages to discover and then disseminate link state information
throughout the mobile ad hoc network.
• Individual nodes use this topology information to compute next hop destinations for
all nodes in the network using shortest hop forwarding paths. For topology control
(TC) messages to disseminate throughout, it requires 5 or more seconds
depending upon the network size. In general, it is (5.5 secs + Tx_Time * network
size).
• Hence, when simulating OLSR in MANET the Application Start Time must be
greater than 5s (preferably greater than 10s) because in OLSR Topology Control
(TC) messages start at 5s. Once the TC messages are sent, some further time will
be required for OLSR to find the route. This can be done by setting the “Starting
time” parameter in Application.
The standard defines the range of a node is the distance at which the PER (packet error
rate) of a 1024B packet is 10 %. This means that nodes even beyond the range will be able
to communicate, but they may do so with high error.
Ver 10.2 96
The factors which affect range are:
Route Maintenance is the mechanism by which a source node S is able to detect, while
using a source route to some destination node D, if the network topology has changed such
that it can no longer use its route to D because a link along the route no longer works.
If the MAC protocol in use provides feedback as to the successful delivery of a data packet
(such as is provided for unicast packets by the link-layer acknowledgement frame defined by
IEEE 802.11), then the use of the DSR Acknowledgement Request and Acknowledgement
options is not necessary. If such link-layer feedback is available, it SHOULD be used instead
of any other acknowledgement mechanism for Route Maintenance, and the node SHOULD
NOT use either passive acknowledgements or network-layer acknowledgements for Route
Maintenance.
When using link-layer acknowledgements for Route Maintenance, the retransmission timing
and the timing at which retransmission attempts are scheduled are generally controlled by
the particular link layer implementation in use in the network. For example, in IEEE 802.11,
the link-layer acknowledgement is returned after a unicast packet as a part of the basic
access method of the IEEE 802.11 Distributed Coordination Function (DCF) MAC protocol;
the time at which the acknowledgement is expected to arrive and the time at which the next
Ver 10.2 97
retransmission attempt (if necessary) will occur are controlled by the MAC protocol
implementation.
When using network-layer acknowledgements for Route Maintenance, a node SHOULD use
an adaptive algorithm in determining the retransmission timeout for each transmission
attempt of an acknowledgement request. For example, a node SHOULD maintain a
separate round-trip time (RTT) estimate for each node to which it has recently attempted to
transmit packets, and it should use this RTT estimate in setting the timeout for each
retransmission attempt for Route Maintenance.
Click and drop wireless nodes and Bridge Node onto the grid environment
Ver 10.2 98
Right click on Grid Environment and select Configure Multiple MANET. It would display the
window shown below:
Select Device Name as Wireless Node A and then click on Add. Similarly add Wireless Node
B, Wireless Node C and Wireless Node D. Then select Device Name as Bridge Node I and
Interface ID as 1 and click on Add
Ver 10.2 99
To add MANET-2, click on add button present in the left bottom corner of the Multiple
MANET window shown below:
Select Device Name as Wireless Node E and then click on Add. Similarly add Wireless Node
F, Wireless Node G and Wireless Node H. Then select Device Name as Bridge Node I and
Interface ID as 2 and click on Add
Bridge node:
User can configure Wireless link properties for each and every MANET. To configure, right
click on Grid and select Configure Multiple MANET. Click on Configure Link Properties as
shown in the screenshot below:
• Click and drop the Border Router icon from the tool bar. (Note: Maximum you can
have 3 Autonomous systems in a single scenario.)
• Click on the Internal Router icon in the tool bar and drop the Internal Router onto
the Autonomous systems created. By default a Router has eight ports.
Establishing Connections
• The connections between two wired nodes cannot be made in the network.
• The connection possibilities are
• Wired Node to Internal Router
• Internal Router to Border Router
• Border Router to Border Router
On opening an already configured properties of an application the input fields will be frozen
(i.e. the input cannot be changed). To modify these values click on the Modify button in the
screen. Now the input value can be changed. Click on the Accept button, the modified
values will be saved.
This View button is enabled once the Accept Button is clicked. To view the given values,
click on the View button.
3.4.5 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional)
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Adding Base Transceiver Station (BTS) - Click on the BTS icon in the toolbar and click it
onto the environment.
Adding Mobile Switching Centre (MSC) - Click and drop MSC in the environment.
• Click on the Mobile Station icon in the tool bar, click and drop it on the Base
Station coverage area.
• Mobile Station cannot be placed on another Mobile Station. It has to be clicked
and placed on the Base Station coverage area.
• Select the Application Button on the ribbon and click on the empty region between
the Grid Environment and the ribbon. Now right click on Application and select
3.5.4 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional)
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Sample configuration files for all networks are available inside the folder“<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
Handoverrefer to the process of transferring an ongoing call or data session from one
channel connected to the core network to another channel.
Note: In GSM hand over is based on distance (hard hand over), while in LTE it is based on SNR (soft
hand over)
Result: In the metrics window, Cellular Metrics Channel metrics, the channel count is
mentioned.Users can see that when the system Voice activity factor decreases from 1.0 to
0.1, the number of channels increases from 43 to 427.
In MS metrics, the call dropping probability and call blocking probability is shown for each
MS.
When voice activity factor is decreased the number of channels available increases. Thus
the system has more number of channels to handle the same number of calls (Note -
IEEE 802.15.4 uses either Beacon Enabled or Disabled Mode for packet transmission. In
Beacon Enabled Mode nodes use slotted CSMA/CA algorithm for transmitting packets else
they use Unslotted CSMA/CA
In NetSim WSN simulations, sensors sense “agents” and forward the sensed data to the
“Sink” node.
1 Sink node: Sink node is the principal controller in WSN. It is to this sink node that all
sensors send their data. In NetSim, users can drop only one sink node in a WSN.
2 Sensor: Sensors sense agents and then pass this sensed data through the network to
Sink node. Therefore the sensors act as both sensors and routers. Sensors in NetSim
are abstract in terms of what they sense, and NetSim focuses on the network
communication aspects after sensing is performed. In Netsim Standard version, tje
maximum number of sensors that can be placed in environment is 500. Sensor range is
0-100 meters and sensing interval is 0-5000 milliseconds.
3 Agent: Agent is an abstraction for physical phenomenon like temperature, pressure,
humidity, sound, etc. The “sensors” sense the agent within its sensing range and upon
sensing application (or information) packets are generated automatically by NetSim. In
Netsim standard version, a maximum of 5 agents are allowed.
In Grid Setting and Sensor Placement window, Side length of grid Environment can be
changed which should be in a multiples of 50 m.
For automatic sensor placement, users can either chose from uniform placement or random
placement options. In random placement users can drop up to 500 sensors
In uniform placement number of sensors should be a square number since they are placed
equally along the area of a square.
Users can click and drop sensors in the grid environment by chosing, “via click & drop”
option.
Based on the user’s sensor placement strategy (in this example, uniform placement is
chosen), sensors are placed in the grid environment as shown in below figure. Sensors are
uniformly placed according to given inputs in the grid environment.
• Click and drop the sink node to the grid environment in our desired location.
• Click and drop the agent in desired location (Users can drop upto a maximum of 5
agents).
GENERAL PROPERTIES –
Right click on any sensor and click on properties.The general properties of the sensor is
shown:-
• Device name is the name of sensor which is editable and will reflect in the GUI before
and after simulation.
• X /Lat and Y/Lon are the coordinates of a particular sensor
• Z coordinate by default will be zero (this is reserved for future use)
Mobility Models: Mobility models represent the movement of the sensor and how their
location and velocity. The mobility models provided in NetSim are:
1 DSR (Dynamic source routing): Note that in wireless sensor neworks, by default Link
Layer Ack is enabled. If Network Layer ack is enabled users must setDSR_ACK in
addition to Zigbee_ACK in MAC layer.
Hello interval describes the interval in which it will discover its neighbour routes.
Refresh interval is the duration after which each active node periodically refresh routes to
itself.
TC Interval is a Topology control messages are the link state signalling done by OLSR.
These messages are sent at TC interval every time.
Zone radius: After dividing the network range of the divided network will be based on zone
radius. It is the number of hop for one node to another.
DATALINK LAYER – 802.15.4 (Zigbee Protocol) runs in MAC layer. In the sink node or pan
coordinator properties users can configure the Beacon frames and the superframe structure.
SuperframeOrder – It describes the length of the active portion of the Superframe, which
includes the beacon frame. Range is from 0-15.
Beacon Order- Describes the interval at which coordinate shall transmit its beacon frames.
Range is from 1-15.
GTS Mode (Guaranteed Time Slot) – If it is enabled it allows a device to operate on the
channel within a portion of the super frame that is dedicated (on the PAN) exclusively to the
device.
Battery life Extension subfield is 1 bit in length and shall be set to one if frames
transmitted to the beaconing device.
Superframe Duration is divided into 16 equally sized time slots, during which data
transmission is allowed. The value of supreframe duration by default is 15.36ms.
Minimum CAP length is the minimum number of symbols forming the Contention access
period. This ensure that MAC commands can still be transferred to devices when GTSs
(Guaranteed time slots) are being used.
Max and Min backoff exponent values of CSMA-CA algorithms having range 3-5.
Max frame retries: is the total number of retries after failed attempts.
Unit Backoff period is the number of symbol forming the basic time period used by the
CSMA-CA algorithms.
PHYSICAL LAYER- The frequency band used in NetSim WSN simulations is 2.4 GHz.
Data rate is the number if bits that are processed per unit of time. The data rate is fixed at
250 kbps per the 802.15.4 standard
Chip Rate: A chip is a pulse of direct-sequence spread spectrum code, so the chip rate is
the rate at which the information signal bits are transmitted as pseudo random sequence of
chips.
Modulation technique: O-QPSK (Offset quadrature phase shift keying) sometimes called
as staggered quadrature phase shift keying is a variant of phase-shift keying modulation
using 4 different values of the phase to transmit.
MinLIFSPeriod is minimum long inter frame spacing Period. It’s a time difference between
short frame and long frame in unacknowledged case and time difference between short
frame and Acknowledged in acknowledge transmission.
SIFS(Short inter frame Symbol) is generally the time for which receiver wait before
sending the CTS(Clear To Send) & acknowledgement package to sender, and sender waits
after receiving CTS and before sending data to receiver. Its main purpose is to avoid any
type of collision. Min SIFS period is the minimum number of symbols forming a SIFS period.
Phy SHR duration is the duration of the synchronization header (SHR) in symbol for the
current PHY.
Phy Symbol per Octet is number of symbol per octet for the current PHY.
• Carrier Sense Only: It shall report a busy medium only upon the detection of a
signal complaint with this standard with the same modulation and spreading
characteristics of the PHY that is currently in use by the device. This signal may be
above or below the ED threshold.
• Energy Detection: It shall report a busy medium upon detecting any energy above
the ED threshold.
• Carrier Sense with Energy Detection: It shall report a busy medium using a
logical combination of detection of a signal with the modulation and spreading
characteristics of this standards and Energy above the ED threshold, where the
logical operator may be AND or OR.
Receiver ED threshold is intended for use by a network layer as part of a channel selection
algorithms. It is an estimate of the received signal power within the bandwidth of the
channel. No attempt is made to identify or decode signal on the channel. If the received
signal power is greater than the ED threshold value then the channel selection algorithms
will return false.
Transmitter Power is the signal intensity of the transmitter. The higher the power radiated
by the transmitter’s antenna the greater the reliability of the communication system. And
connection medium is Wireless.
Power can be battery or main line. In case of battery following parameters will be
considered:-
• Recharging current is the current flow during recharging. Range is from 0-1mA.
• Energy Harvesting is the process by which energy is derived from external
source, captured, and stored
The following table shows the local and global properties of sensor and Agent in NetSim.
1 Sensor Properties
Global properties
General properties Default values
Device name Sensor ID
X / lat Wherever placed by user
Y /long Wherever placed by user
Velocity(m/s) 0
pause time(s) 1
Mobility model Random_way_point
Network layer
Routing protocol DSR
ACK _Type LINK_LAYER_ACK
Data link layer
ACK request Enable
Max Csma BO 4
Max Csma Exponent 5
Min Csma Exponent 3
Max frame retires 3
Physical layer
2. Agent properties:
Local Properties
General Properties Default values
Device name Agent A
X /lat 16.0
Y /long 8.0
Mobility Model
Mobility model Random_walk
Velocity (m/s) 10
Calculation_Interval (s) 1
Click Packet Trace / Event Trace iconin the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Network Metrics:
• Simulation time is the virtual time duration for the network which is simulated.
• Packets Transmitted is the total number of packets transmitted from the source.
• Bytes transmitted is equal to the sum of ‘Payload_ Transmitted’ and ‘Overhead_
Transmitted’ in the link.
• Total number of errored and collided packets during the simulationis also specified
in the network metrics.
• Payload transmittedis the useful data transmitted
IP Metrics - IP metrics provide node to node reception and transmission of the packet. IP
metrics of a WSN network with 16 sensors and one sink is shown in the following figure.
DSR Metrics-Goto sensor properties In the Network layer users can see various protocols
such DSR, AODV, OLSR & ZRP. Based on the protocol enabled, users can observe the
respective metrics. Since DSR protocol is enabled here, metrics for DSR is obtained.
Users can observe the Route Error Packet sent, Route reply packet, Route Request
Forwarded, Route Reply Forwarded packets by intermediate nodes, Route Breaks by node,
Total number of Packets originated, transmitted, dropped and received by the node.
IEEE 802.15.4 Metrics- IEEE802.15.4 is the standard for Local Personal Area Network
Zigbee for MAC and Phy Layer of the sensor. The 802.15.4 metrics are
Sensor Metrics -
• Agent Sensed Count is the total number of times the sensor senses the agent.
This depends on the sensor interval and simulation time.
Energy_Metrics
IEEE802.15/TG4 formulated the IEEE802.15.4 for lowrate wireless personal area network,
i.e. LR-WPAN. The standard gives priority to low-power, low-rate and lowcost. The group
devotes to the standard of the physical layer of WPAN network, i.e. PHY, and media access
layer.
• Furthermore, the active portion of each superframe consists of three parts: beacon,
CAP, and CFP, which is divided into 16 equal length slots. The length of one slot is
equal to aBaseSlotDuration × 2SO symbols, where aBaseSlotDuration is equal to 60
symbols.
• In CAP, each node performs the CSMA/CA algorithm before transmitting data
packet or control frame. Each node maintains three parameters: the number of
backoffs (NB), contention window (CW), and backoff exponent (BE).
• The initial values of NB, CW, and BE are equal to 0, 2, and Min Backoff Expo,
respectively, where Min Backoff Expo is by default 3 and it can be set upto 8.
• For every backoff period, node takes a delay for random backoff between 0 and
2BE-1 Unit backoff Time (UBT), where UBT is equal to 20 symbols (or 80 bits).
• A node performs clear channel assessment (CCA) to make sure whether the
channel is idle or busy, when the number of random backoff periods is decreased
to 0.
• The value of CW will be decreased by one if the channel is idle; and the second
CCA will be performed if the value of CW is not equal to 0. If the value of CW is
equal to 0, it means that the channel is idle; then the node starts data transmission.
• However, if the CCA is busy, the value of CW will be reset to 2; the value of NB is
increased by 1; and the value of BE is increased by 1 up to the maximum BE (Max
Backoff Expo), where the value Max Backoff Expo is by default 5 and can be set
upto 8.
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
1 Beacon mode -> Enable in SinkNode , Superframe Order (SO) -> 10 and Beacon Order
(BO) -> 12
2 Channel characteristics -> Path Loss only, Path Loss Model -> Log Distance and path
loss exponent -> 2
3 Packet Trace->Enable
4 Simulation time -> 200 sec
1 Beacon mode -> Enable in SinkNode , Superframe Order (SO) -> 10 and Beacon
Order (BO) -> 12
2 Channel characteristics -> Path Loss only, Path Loss Model -> Log Distance and
path loss exponent -> 2
3 Packet Trace->Enable
4 Simulation time -> 100 sec
1 To find CAP time, BI is 62914.56ms -> So in 100s, two beacon frames should be
transmitted at 0 & 62s
2 Check no. of beacon frames transmitted in 802.15.4 metrics
3 Here CFP = 0 because there is only 1 sensor.
4 CAP Time = SD – beacon time = (15728.64ms) – (983.04ms) = 14745.6ms
5 Open packet trace and filter Control_Packet_Type to Zigbee_Beacon_Frame, users
should get four zigbee_beacon_frames at 0, 62.9secs, because the time interval
between two beacon frames is 62 seconds.
6 Since two Beacon frames are transmitted, CAP time = 2 * 14745.6ms = 29491200µs
7 Check and compare the theoretical CAP time with NetSim simulation results in 802.15.4
metrics in Results Windows
3.7.2 Introduction
Internet of Things (IoT) is an ecosystem of connected physical objects that are accessible
through the internet. It is the network of physical objects that can communicate, sense or
interact with their internal states or the external environment.
The ‘thing’ in IoT could be a person with a heart monitor or an automobile with built-in-
sensors, i.e. objects that have been assigned an IP address and have the ability to collect
and transfer data over a network without manual assistance or intervention.
NetSim IOT is modeled as a wireless sensor network that can connect to the internet via a
6LowPAN Gateway. The default protocols in the WSN section is AODV with IPv6 addressing
in L3 and 802.15.4 MAC & PHY. This WSN sends data to a LowPAN Gateway which has a
Zigbee (802.15.4) interface and a WAN Interface. The Zigbee interface allows wireless
connectivity to the WSN while the WAN interface connects to the internet.
Any WSN comprises of two parts, the sensing part and the network communication part.
NetSim is "agnostic" to the sensing and this sensing is abstracted as an Agent (also known
as Agent based modeling). Whatever is sensed is finally converted to a "packet" and it is
from this point on that NetSim simulation actually starts.
Total Grid Length (m) settings allows the user to set the total environment length of IOT
Networks containing sensors, LoWPAN gateway, wired nodes, routers, switches, access
point, wireless nodes.
Sensor Grid Settings (m) allows the user to set the environment length for placing the
sensors uniformly or randomly.
Adding Sensor - Click on Sensor Node icon in toolbarand click and drop inside the grid.
Adding LoWPAN gateway- LoWPAN is an acronym of Low power Wireless Personal Area
Networks. The LoWPAN IoT gateway functions as a border router in a LoWPAN network,
connecting a wireless IPv6 network to the Internet. Designed to send IPv6 packets over
IEEE802.15.4-based networks and implementing open IP standards including TCP, UDP,
HTTP and more, the standard offers end-to-end addressable nodes, allowing a router to
connect the network to IP.
Click on the LoWPAN gateway icon in the toolbar and click and drop inside the grid.
Routing Protocol for Low power and Lossy Nertworks (RPL) Overview
Low-power and Lossy Networks consist largely of constrained nodes (with limited processing
power, memory, and sometimes energy when they are battery operated). These routers are
interconnected by lossy links, typically supporting only low data rates that are usually
unstable with relatively low packet delivery rates. Another characteristic of such networks is
that the traffic patterns are not simply point-to-point, but in many cases point-to-multipoint or
multipoint-to-point.
RPL Routing Protocol works in the Network Layer, and uses IPv6 addressing. It runs a
distance vector routing protocol based on Destination Oriented Directed Acyclic Graph
(DODAGs).
• DAG (Directed Acyclic Graph): A directed graph having the property that all
edges are oriented in such a way that no cycles exist. All edges are contained in
paths oriented toward and terminating at one or more root nodes
• DAG root: A DAG root is a node within the DAG that has no outgoing edge.
Because the graph is acyclic, by definition, all DAGs must have at least one DAG
root and all paths terminate at a DAG root. In NetSim, only single root is possible.
i.e. the 6LowPAN Gateway
• Destination-Oriented DAG (DODAG): A DAG rooted at a single destination, i.e.,
at a single DAG root (the DODAG root) with no outgoing edges
• Up: Up refers to the direction from leaf nodes towards DODAG roots, following
DODAG edges. This follows the common terminology used in graphs and depth-
first-search, where vertices further from the root are "deeper" or "down" and
vertices closer to the root are "shallower" or "up"
• Down: Down refers to the direction from DODAG roots towards leaf nodes, in the
reverse direction of DODAG edges. This follows the common terminology used in
The objective function in NetSim RPL seeks to find the route with the best link quality.
Link quality calculations, available in Zigbee Prorject 802.15.4 C file with function get_link_quality ( ):
1−𝑝𝑝
Lq =
𝑟𝑟𝑟𝑟
Where,
And,
The link quality in this case is based on received power and can be modified by the user to
factor in distance, delay etc.
Topology Construction: NetSim IOT WSNs do not typically have predefined topologies, for
example, those imposed by point-to-point wires, so RPL has to discover links and then
select peers sparingly. RPL routes are optimized for traffic to or from one or more roots that
Root sends DIS message to the Router/Leaf which are in range. The Router in turn
broadcasts its further and so on.
RPL nodes transmit DIOs using a Trickle Timer. This message is multicasted downwards in
a DODAG. With DIO child parent relationship and siblings relationship is established.
DODAG Construction
DIO DIS
DIO DIS
DIO DIS
• Rank is then established. Rank is decided based on the DIS message received
from the Root and the link quality
• Based on information in the DIOs the node chooses parents to the DODAG root
• As a Result, the nodes follows the upward routes towards the DODAG root.
• If the destination is unreachable then the root will drop the packet.
RPL_log file:
Step 1
Step 2
Step 3
Step 4
Step 1:
Step 2:
• Node 1 receives a DIO msg from Node 6 (i.e root).
• Node 1 found the DODAG id
• Based on the DIO message received from Node 6, Node 1 choses its “Parent as
Node 6” and establishes its “New Rank = 17”. It doesn’t have any siblings.
Step 3:
• Node 6 receives as DAO message from Node 1 with the new route information
about the destination and the Gateway.
Step 4:
Likewise DODAG formation throughout the simulation is logged inside the rpl_log file
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
Inference:
In sample 1, users can observe sleep energy consumed value will be zero in energy model
metrics in the Results Window since sensor is in active state all the time. i.e., if SO=10 and
BO=10, there won’t be any inactive portion of the Superframe.
In sample 2, sleep energy consumed will be non-zero since sensor goes to sleep mode
during the inactive portion of the Superframe.
Adding Node :
• Click on the ZigBee icon in the toolbar and click and drop it inside the grid (i.e.
Visibility Range - The systems can move and communicate in this range only).
• A Node cannot be placed on another Node. A Node cannot float outside the grid.
Click on the PAN Coordinator icon in the toolbar and click and drop inside the grid.
On opening an already configured properties of environment, the input fields will be frozen
(i.e. the input cannot be changed).To modify these values click on the Modify button in the
screen. Now the input value can be changed.Click on the Accept button, the modified
values will be saved.
• Select the Application Button on the ribbon and click on the empty region between
the Grid Environment and the ribbon. Now right click on Application and select Properties.
Multiple applications can be generated by using add button in Application properties.
3.8.5 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional)
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Adding Devices –
• Cognitive Radio Networks comes with the palette of various devices like Cognitive
Radio CPE, Cognitive Radio Base Station, Switch, Router, Wired Node, Wireless Node,
Access point, Incumbent etc.
• Select the desired devices in the toolbar and click and drop on the environment.
• To remove devices, right click on the particular device and then click Remove.
Select the appropriate link in the toolbar and connect the devices by clicking on the device 1
and device 2.
3.9.4 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional)
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Click on Run Simulation icon on the top toolbar. Set the Simulation Time and click on OK.
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
1 Grid length->500m*500m
2 Distance between Incumbent and CRCPE should be more than 100m.
3 Base station Properties: Operational Freq Start -> 54 MHz, Operational Freq End -> 60
MHz in both Incumbent and physical layer properties.
4 Channel bandwidth -> 6
5 ON duration -> 10
6 OFF Duration -> 0
7 Keepout distance -> 100m
8 Simulation time -> 100s
Results:
1 In results windows open CR Incumbent metrics and check the operational time(100s)
and idle time(0s)
2 Then open Application Metrics, you should get non-zero throughput value, because
there will be no Interference if distance between incumbent and CR CPEs is more than
the keepout distance.
1 Open Base Station properties -> select interface_CR -> change Operational Freq Start
as 54 MHz and Operational Freq End as 60 MHz in both Incumbent and physical layer
properties.
2 Channel bandwidth = 6
3 On_Duration = 10s
4 Off_Duration = 10s
5 Keepout distance = 100m
6 Disable TCP
7 Ensure that the distance between incumbent and CR CPEs should be less than 100m
(keepout distance)
8 In application properties, select CBR application
9 Enable packet Trace and Simulate for 100s
10 Open packet trace and check at what time data packets are transmitting (Check
PHY_Layer_START time)
11 First 10s CPE should use the channel and next 10s Incumbent should use the channel
alternatively.
• CR BS allocates max one symbol per CPE. If the generation rate is more than the
data filled in one symbol then allocation fails and it results in zero throughput.
• The first symbol is reserved for CR control frames or any broadcast PDU
• Operational frequency: It is the frequency band at which the incumbent operates.
It ranges from 54 MHz to 862 MHz.
• Operational interval(s): It is the time gap between two successive incumbent
operations. It ranges from 0-10.
• Operational time(s): It is the active period of the incumbent. i.e. If the operational
interval is set to 5s, then incumbent operates with an interval of every 5s. If the
operational interval is set to 0s, then the incumbent remains active.
The timing is Incumbent --- 0s to 10s (OFF), 10s to 14s (ON), 14s to 24s (OFF), 24s to 28s
(ON) ... and so on.
NetSim provides App layer throughput which is lesser than that of MAC layer throughput
because of
In the Main menu select NewLTE/LTE-A Networks (LTE/LTE-A, Femto cell, D2D)
Adding MME- Click on the Router icon in the tool bar, click and drop the MME (Mobility
Management Entity) onto the environment.
Adding ENB - Click on the Evolved node B (ENB) icon in the toolbar and click it onto the
environment.
Adding Relay - Click on the Relay icon in the toolbar and click it onto the environment.
Adding UE – Click on the UE (User Equipment) icon from the Node icon in the toolbar,
click and drop it on the ENB coverage area.
Connect the devices - Select the appropriate link in the toolbar and connect the devices by
clicking on the device 1 and device 2.
3.10.4 Enable Packet Trace, Event Trace & Dynamic Metrics (Optional)
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
Example 1: MIMO
Transmission mode 1:SISO => uses only 1 Transmit antenna. Since Round Robin
scheduling is running all applications see equal throughput.
Transmission mode 2:MIMO Tx. Diversity => Sends copies of same information via
multiple antennae. This will lead to higher reliability but the throughput will remain the same.
Transmission mode 3:MIMO Spatial Multiplexity Open Loop => used to achive high data
rates. Here the data is divided and sent via various antennae. You can see an increase in
throughput.
Transmission mode 4: MU-MIMO => In multi user the data is sent and received through
multiple antennae. You can see a further increase in throughput.
One Resource block can have 12 subcarriers (each carrier is 15 kHz) in frequency domain
and 0.5ms (7 symbols) in time domain.
The table below shows the number of resource blocks available for different LTE channel
bandwidths.
Channel 5 10 15 20
Bandwidth (MHz)
Resource Blocks
25 50 75 100
(RB)
No. of subcarriers
300 600 900 1200
(RB*12)
Occupied bandwidth
4.5 9 13.5 18
(MHz)
Note: In LTE 10% of total bandwidth is used for guard band. For example if the channel bandwidth is
20MHz, then 2MHz is used for guard band. Thus, if 180 kHz has 1 RB, 18 MHz will have 100 RBs
In LTE for 20MHz, there are 100 Resource blocks and each Resource block has 12*7 = 84
symbols
Example: PHY rate calculation for 20MHz band, using 64-QAM and 4*4 Tx Rx antennae
The above note explains the theoretical method of calculating the LTE PHY Data rate, where
there are no channel (propagation) losses.
1 Any signal received at the receiver has a SNR (signal to noise ratio).
2 Based on the SNR a CQI value is calculated.
3 The SNR - CQI Table is available in LTE.h in NetSim and is per the LTE standard
4 Based on the SNR and the CQI an MCS value is calculated
5 The SNR CQI MCS table is available in LTE.h in NetSim and is per the LTE standard
6 Based on the MCS the TBS Index is calculated, again from a table available in LTE.h
which is per the LTE Standard
7 Based on the TBS Index the TBS Table is looked up and the transport block size is
retrieved.
Approximately 25% of overhead is used for controlling and signalling. And hence effective
PHY data rate is 300 Mbps.
In FDD the number of aggregated carriers can be different in DL and UL as shown in the
figure above. However, the number of UL component carriers is always equal to or lower
than the number of DL component carriers. The individual component carriers can also be of
The table below describes the LTE frequency bands defined in 3GPP that was referred for
our implementation.
Note: NetSim supports FDD currently. Also Downlink only configurations (bands 29 and 32) are not
supported.
3.10.11 CA Configurations:
CA combinations are divided into intra-band (contiguous and non-contiguous) and inter-band
non-contiguous. Intra-band contiguous and inter-band combinations, aggregating two
Component Carriers (CCs) in downlink, are specified from Release 10. The Intra-band
contiguous CA configuration refers to contiguous carriers aggregated in the same operating
band. The Intra-band non-contiguous CA configuration refers to non-contiguous carriers
aggregated in the same operating band. The Inter-band CA configuration refers to
aggregation of component carriers in different operating bands, where the carriers
aggregated in each band can be contiguous or non-contiguous.
Following table shows Carrier Aggregation Bandwidth Class in terms of total number of RBs
used by aggregated carrier.For example, CA Bandwidth Class 'B' says N_RB,agg <= 100. It
A N <= 100 20 1
B 25 < N <= 100 20 2
C 100 < N <= 200 40 2
D 200 < N <= 300 60 3
E 300 < N <= 400 80 4
F 400 < N <= 500 100 5
I 700 < N <= 800 160 8
Carrier Aggregation is supported in NetSim’s LTE devices such as ENB, HNB and Relay. In
the LTE_Interface of these devices i.e., in the interface connected to the UE’s CA can be
configured.Users can choose the carrier aggregation type.
Currently users can configure two Component Carriers (CCs) using NetSim’s GUI. However
users can go up to 5 carriers for experimentation using NetSim’s CLI mode by editing the
Configuration.netsim/Configuration.xml file.
3.11.1 Introduction
802.11p has been developed as amendment to IEEE 802.11 standard specifications in order
to support ad-hoc communication between vehicles and, between vehicle and infrastructure
network. There are changes made to PHY (Physical) and MAC layers for the same.
IEEE 802.11p is also known by names such as WAVE (Wireless Access for Vehicular
Environments) and DSRC (Dedicated Short Range Communication).
The main objective of 802.11p compliant devices is to improve traffic efficiency and have
safety in the traffic flow (i.e. to prevent accidents). The network formed by 802.11p compliant
devices is known as VANET.
It consists of IEEE 1609 standard and IEEE 802.11p standard. 802.11p standard defines
PHY and MAC layers while upper layers are defined by IEEE1609.
Following are the functions performed by each of the layers in IEEE 802.11p protocol
stack:
• IEEE 1609-2 defines security services for application messages and management
messages in WAVE.
• IEEE 1609-3 defines connection set up and management of WAVE compliant
devices.
• IEEE 1609-4 sits on top of 802.11p layers. It enables upper layer operational
aspects across multiple channels without knowledge of Physical layer parameters.
• IEEE 802.11p PHY layer takes care of modulation/demodulation, error correction
technique etc. Physical layer has been changed. It supports 10 MHz bandwidth,
improved performance in WAVE compliant receiver and improvement in the power
transmission mask.
• IEEE 802.11p MAC layer takes care of messages to establish and maintain
connection in harse vehicular environment. It also defines signalling techniques
and interface functions. Stations communicate directly without need to
communicate or join with BSS in 802.11p.
• Control channel (CCH): A single radio channel, not a service channel, intended
for the exchange of management information, including Wireless Access in
Vehicular Environments (WAVE), Service Advertisements, and WAVE Short
Messages.
• Service channel (SCH): Any channel that is not the control channel, intended for
management frames and higher layer information exchanges (Wireless Access in
Vehicular Environments [WAVE] Short Message [WSMs].
• Guard interval: A time interval at the start of each control channel (CCH) interval
and service channel (SCH) interval during which devices that are switching
channels do not transmit.
• BSM Application:
• DSRC protocol runs with BSM (Basic Safety Message) applications
• BSM is a broadcast packet transmitted regularly at a regular interval, and it
can be classified as a beacon style transmission.
• Broadcast packet is a packet destined for all nodes (vehicles) to receive, a
beacon is a continuous broadcast.
• The BSM Application class sends and receives the IEEE 1609 WAVE
(Wireless Access in Vehicular Environments) Basic Safety Messages (BSMs).
The BSM is a 20-byte packet that is generally broadcast from every vehicle at
a nominal rate of 10 Hz.
After selecting the Sumo configuration file name, the scenario is opened, with nodes placed
at their respective starting positions (tracked form Sumo). Roads and Traffic Lights are also
placed exactly as present in SUMO Configuration file.
On opening an already configured properties of environment, the input fields will be frozen
(i.e. the input cannot be changed). To modify these values click on the Modify button in the
screen. Now the input value can be changed. Click on the Accept button, the modified
values will be saved.
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Click on Run Simulation icon on the top toolbar.Simulation Time is set from the
Configuration File of Sumo. The simulation has three options
• Record animation - which runs Sumo in background. Users can view animation
after completion of Simulation.
• Play & Record animation – Opens NetSim GUI and Sumo GUI in parallel with
parameters being continuously passed between the two Simulators.
• Don’t play/record animation – runs Sumo in Backend. Animation is not recorded.
On running the Simulation by selecting Play & Record option, users can view NetSim
Packet animation and SUMO simulation simultaneously.
SUMO determines the positions of vehicles with respect to time as per the road conditions.
NetSim reads the coordinates of vehicles from SUMO (through pipe) during runtime and
uses it as input for vehicles mobility.
Here users can notice an inversion of nodes in the GUI, since origin (0, 0) in SUMO is at the
left bottom, while origin is at the left-top in NetSim.
But when users select Record animation only option, NetSim and SUMO run separately
and also users can find that the animation in SUMO is much faster than that of NetSim. This
is because, NetSim has to animate the flow of packets between the vehicles in addition to
the vehicle movement.
• IEEE 802.11p
• Layer 3 Routing – AODV,DSR,OLSR,ZRP
• PHY Layer RF Propagation
• Pathloss(log distance)
• Shadowing
• Fading
• Source C Code
• Automatic import of road network and vehicles from SUMO
• Wide range of output metrics including Delay, Throughput, Error, Retransmission,
etc.
• Interfacing between SUMO & NetSim via Traffic control interface (TraCI).
3.11.6 How to create your own network using SUMO and run through
NetSim
Step 1: Create a node file using any code editor (like notepad, notepad++ etc) and the file
extension will be .nod.xml. It represents the junctions in the road. Each of these attributes
has a certain meaning and value range: node_id means unique name of each junction, x-y is
the positions of node and type can be "priority", "traffic_light", "rail_crossing", “rail_ signal”
etc. (Refer: http://www.sumo.dlr.de/userdoc/Networks/Building_Networks_from_own_XML-
descriptions.html#Node_Descriptions)
Step 2: Create an edge file that describes how the junctions or nodes are connected to each
other. The extension of this file is .edg.xml. Each edge is unidirectional and starts at the
"from"-node and ends at the "to"-node. For each edge, some further attributes should be
supplied, being the number of lanes the edge has (numLanes), the maximum speed allowed
on the edge speed. Furthermore, the priority may be defined optionally. (Refer:
http://www.sumo.dlr.de/userdoc/Networks/Building_Networks_from_own_XML-
descriptions.html#Edge_Descriptions)
Step 4: Generate Network file by using NETCONVERT command. Make a folder named like
VANET_Example and place the .nod.xml and .edg.xml files i.e. NODES.nod.xml and
EDGE.edg.xml respectively.
netconvert --n “<path where the .nod.xml file is present>\<filename>.nod.xml” --e “<path
where the .edg.xml file is present>\<filename>.edg.xml” --o “<path where both input files are
present>\<filename>.net.xml”
Step 6: Create a sumo configuration file file using any code editor (like notepad, notepad++
etc) and the extension is .sumo.cfg. Place the file inside the same folder where the network
file (i.e. NETWORK.net.xml) and route file (i.e. VEHICLES.rou.xml) are present.
Step 7: Now open “New VANET”. Choose the Configuration.cfg.xml from the specified
folder.
Source Id 2
Destination Id 5
Value (bytes) 20
Run the scenario and choose “Play & record animation (Simulation will slow down
significantly)” option.
Output: During simulation, NetSim will open sumo. NetSim operates the communication part
in between the vehicles and sumo performs the road traffic.
At 11 s -- In NetSim In SUMO
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
Example 1: CCH
Output
Inference:
As we are increase the CCH time, throughput increases. Larger the service time greater the
throughput.Here, the delivered packets are considered to be the safety type, which are
simulated for the CCH interval -> 30000 µs, 50000 µs, 70000µs.
To analyse this users can open packet trace and filter the data packets. Number of safety
messages. i.e BSM messages are more when the CCH time is increased.
In DSRC protocol, the duration is dynamic, and the channel can be adjusted dynamically to
transmit the packets.
Guard interval: A time interval at the start of each control channel (CCH) interval and
service channel (SCH) interval during which devices that are switching channels do not
transmit.
Inference:
As we are increase the Guard_interval time, throughput decreases. If Guard interval is more,
service time will be less which leads to decrease in throughput.
Click on the Node icon in the Toolbar, and then click on Wireless Node. Next, click on the
environment where you want to drop it inside the grid. (Note: A Node cannot be placed on
another Node. A Node cannot float outside of the grid.)
On opening an already configured properties of environment, the input fields will be frozen
(i.e. the input cannot be changed).To modify these values click on the Modify button in the
screen. Now the input value can be changed.Click on the Accept button, the modified
values will be saved.
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK.
Click on the Node icon in the Toolbar, and then click on Wireless Node. Next, click on the
environment where you want to drop it inside the grid. (Note: A Node cannot be placed on
another Node. A Node cannot float outside of the grid.)
In the Datalink Layer/Physical Layer, we can select the DTDMA protocol as shown in figure
below.
Furthermore, in Physical layer, we can select the frequency bands (HF/VHF/UHF). Users
can modify the lower frequency range and the Bandwidth. The sum of the Lower
frequency and Bandwidth gives the Upper frequency. Users can also select the modulation
techniques such as QPSK/16-QAM/64-QAM and, an option to turn ON/OFF frequency
hopping is also provided.
On opening an already configured properties of environment, the input fields will be frozen
(i.e. the input cannot be changed).To modify these values click on the Modify button in the
screen. Now the input value can be changed.Click on the Accept button, the modified
values will be saved.
Click Packet Trace / Event Trace icon in the tool bar. To get detailed help, please refer
section 6.4 and 6.5 respectively. Select Dynamic Metrics icon for enabling Dynamic Metrics
and click OK
Sample configuration files for all networks are available inside the folder “<NetSim Install
Dir>\Docs\ Sample_Configuration”. These files provide examples on how NetSim can be
used – the parameters that can be changed and the typical effect it has on performance.
In Time Division Multiple Access (TDMA), each time interval is divided into time slots.
Together, all the time slots in the interval are called a "frame". So for example if a network
In DTDMA devices can leave / enter the network. For example a network has 5 nodes.
Assume that all nodes are present in the network initially. Node 1 uses slot 1, Node 2 uses
slot2 and so on till Node 5 uses slot 5. Let us say Node 2 leaves the network, then the frame
is split into 4 slots. Node 1 uses slot 1, Node 3 uses slot 2, node 4 uses slot 3 and node 5
uses slot 4.
The above example is based on demand based slots allocation with devices having traffic to
send will be allocated slots. Users can also input upto 100 slots per device.
Apart from demand based allocation, round robin slot allocation can also be chosen by the
user. In such cases all devices will get 1 slot.
In DTDMA, time is divided into slots. In between 2 slots there is a guard interval of 100µs
Output:
Users can observe how the slots are allocating for each device in detail in Packet trace. In
this case, packet size is 1000 bytes = 1000*8 = 8000bits and1 slot is allocated for each
device = 1*3000bits = 3000 bits. So, the packet size won’t fit in one slot.
Thus fragmentation happens in PHY layer. Users can observe this in Packet trace by filtering
the CONTROL_PACKET_TYPE/APP_NAME to APP1_CBR. Packets of any greater size are
fragmented.Fragmentation also takes into account the number of bits remaining in the
allocated slot to improve slot utilization.
Example: For a slot size of 3000 bits, two 1040Bytes packets will be fragmented as
……….
In packet trace, filter column of PACKET_TYPE to CBR. Node-1 and Node-5 are generating
traffic, so time slots are allocated for Node-1 and Node-5 as shown below
Output:
Example: How Slots are allocated in between 38200µs to 71800µsin ROUND_ROBIN slot
allocation technique.
Node- Node- Node- Node- Node- Node- Node- Node- Node- Node-
1 2 3 4 5 6 1 2 3 4
CBR-1 N/A CBR-2 N/A CBR-3 N/A CBR-1 N/A CBR-2 N/A
65000 67100 69200 71300 73400 75500 77600 79700 81800µ 83900
µs µs µs µs µs µs µs µs s µs
Compare the above table with packet trace by filtering Packet_Type to CBR
Node leave - It is the time at which the node leaves the network.
1 Grid length->500m*500m
2 DTDMA -> enabled in MAC and PHY layers
3 TCP -> Disable
4 Packet trace -> enable
5 Packet size = 1000 Bytes
6 Inter arrival time = 100000µs
7 Simulate for 10 seconds and save the network
8 In edit and rerun, Node Leave (Node-2) -> 5s (present in global properties)
9 Simulate for 10 seconds
Output:
In case1, Node-1 transmits the packets throughout the simulation time, but in case-2, it will
transmit upto 5 seconds since Node-2 left the network at 5th second. To observe this, open
packet trace and filter PACKET_TYPE to CBR. In the below figure, NODE-1 has transmitted
the packets upto 10th second
But in case2 Node-2 is leaving the network at 5th second. So packet transmission will takes
place upto 5th second only.
It is important to set packet size (of any application running over DTDMA) to be lower than
the Max packet Size setting indicated below. If the packet size exceeds the Max Packet Size
setting then DTDMA would not be able to transmit that packet.
𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜ℎ𝑒𝑒𝑒𝑒𝑒𝑒 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−𝑇𝑇𝑇𝑇 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 𝑂𝑂𝑂𝑂−𝑁𝑁𝑁𝑁 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑂𝑂𝑂𝑂
Maximum Packet size (bytes) =
8
By default,
Bits per slot (bits) – 3000, Overhead per slot (bits) - 600
Users can also edit the values of Bits per slot and Overhead per slot in the GUI.
Assuming default values are chosen for Bits per slot and Overhead per slot, DTDMA packet
size is calculated for different protocols as shown below:
DSR overhead (one hop) - 12 bytes which is added with Network layer overheads,
plus IP overhead of 20 plus TCP Overhead of 20, totaling 52 bytes (416 bits).
DSR overhead (one hop) - 12 bytes which is added with Network layer overheads, plus IP
overhead of 20 plus UDP Overhead of 8, totaling 40 bytes (320 bits).
𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜ℎ𝑒𝑒𝑒𝑒𝑒𝑒 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−320
Max Packet size (bytes) = 8
= 260 bytes
Here AODV, ZRP, OLSR overhead – 0 (no overhead is added) plus IP overhead of 20 plus
TCP Overhead of 20, totaling 40 bytes (320 bits)
𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜ℎ𝑒𝑒𝑒𝑒𝑒𝑒 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−320
Max Packet size (bytes) = 8
= 260 bytes
Here AODV, ZRP, OLSR overhead – 0 (no overhead is added) plus IP overhead of 20 plus
UDP Overhead of 8, totaling 40 bytes (224 bits)
𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜ℎ𝑒𝑒𝑒𝑒𝑒𝑒 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠−224
Max Packet size (bytes) = 8
= 272 bytes
Node join(s) - It is the time at which the node join the network and accesses the
communication channel.
Node leave (s) – It is the time at which the node leaves the network.
Dynamic metrics will be shown only for the period in which the node is present in the
network. For example, if node join = 0, node leave = 5, even if the simulation time = 100s,
the dynamic metrics will be shown only for 5s.
Use case:Fields can take multiple inputs separated by comma as shown below:
Node join - 0, 10
In this case, the node joins the network at 0s and leaves at 5s and the node joins the
network again at 10s and leaves at 100s.
Three different and mutually independent propagation phenomena influence the power of
the received signal: path loss, shadowing and multipath fading.
1 Pathloss Models
2 Shadowing Models
• No shadowing
• Constant
• Lognormal
3 Fading Model
• No fading
• Rayleigh
• Nakagami
Where n is the path loss exponent, whose value is normally in the range of 2 to 5. In NetSim,
the default value for path loss exponent is 2 and D is the distance between transmitter and
the receiver, usually measured in meters.
And PL1Meter is the path loss at reference distance (here taken as 1m). This value varies
depending on the radio and is a user input available in the PHY layer of the radios. For
802.11b this value is 30dB
And the Gain represents the transmit and receive antenna gains
An example: Let us say the transmit power of a radio is 20 mW (or 13 dBm), with zero gains
for the tx and rx antenna, and let us say the distance between transmitter and receiver is
100m and the path loss exponent n = 3. Then Received power in dB is
= 13 – 30 – 60
= - 77 dBm
The default value for reference distance d0 and pathloss at reference distance PL_d0 are
1 802.11 a / b / g / n / ac / p
The code for calculating the Path loss is included inside the function
propagation_calculate_logdistancepathloss () which is available in the path NetSim
Standard\src\Simulation\IEEE802_11.
3.14.3 Shadowing
Slow shadowing in wireless network is the attenuation caused by buildings or any obstacles
between a transmitter and a receiver. In the model with shadowing, the shadowing value Xσ,
typically defined in dB, is added to (or subtracted from) the average received power. Xσ is a
zero means Gaussian distributed random variable with standard deviation σ.
The code for calculating the shadow loss is present inside the function
propagation_calculate_lognormalshadow () and the file is available insideNetSim
Standard\src\Simulation\IEEE802_11.
3.14.4 Fading
In NetSim, the Rayleigh Fading, which follows Rayleigh Probability Distribution with mean of
1, is used. The code for calculating fading loss is present in the file IEEE802_11_Phy.c, and
path for the file is NetSim Standard\src\Simulation\IEEE802_11.
Analogous to the SNR used often in wired communications systems, the SINR is defined as
the power of a certain signal of interest divided by the sum of the interference power (from all
the other interfering signals) and the power of some background noise.
The interference power is the difference between the total power received by the receiver
and the power received from one particular transmitter.
The bit error rate (BER) is the number of bit errors divided by the total number of transferred
bits during a studied time interval. The BER calculation is calculated using as SNR – BER
tables for different modulation schemes. These tables are closed and not available for user
modification. In the case of LTE an SNR-BER table is looked up for each MCS.
1 CBR
2 Custom
3 Database
4 FTP
5 Email
6 HTTP
7 PEER_TO_PEER
8 Video
9 Voice
10 Sensor App
11 Erlang Call
12 BSM
13 Emulator (Only if Emulator Add-on is present)
To set up the application click and drop the application icon from the tool bar as shown
below.
Start time
End time
Note: Suppose Start time is 1 and end time is 10 then application starts generating traffic at 1st second
and ends at 10th second.
Source Count
This property represents number of sources for the application. Voice, Video, FTP, Database
and Custom applications have only one source.
Source ID
Destination Count
Destination ID
This property represents the unique identification numbers of the destination. And to model,
Broadcast application users can select ‘0’ as the Destination ID.
4.2 CBR
Packet Size
Constant
Packet Size (Bytes): Sets the size of the packets being generated by the chosen
distribution. By default 1460 bytes is entered.
• Constant
Inter Arrival Time: Enter the average inter-arrival time between packets. A lower inter-
arrival time would lead to a higher generation rate and vice versa. By default 20000 Micro
Sec is entered.
4.3 Custom
Packet Size
• Constant
• Exponential
Packet Size (Bytes): Sets the size of the packets being generated by the chosen
distribution. By default 1460 bytes is entered
• Constant
• Exponential
Inter Arrival Time: Enter the average inter-arrival time between packets. A lower inter-
arrival time would lead to a higher generation rate and vice versa. By default 20000 Micro
Sec is entered.
4.4 Voice
Codec
Codec is the component of any voice system that translates between analog speech and the
bits used to transmit them. Every codec transmits a burst of data in a packet that can be
reconstructed into voice.
Five different standards of voice codec’s are given which can be selected depending on the
variations required. Packet size and Inter-arrival time value will vary depending on the codec
value chosen.
Packet Size
• Constant
• Exponential
Packet Size (Bytes): Sets the size of the packets being generated by the chosen
distribution. By default 160 bytes is entered.
• Constant
• Exponential
Service Type
• CBR - CBR stands for Constant Bit Rate. Packets of constant size are generated
at constant inter arrival times.
• VBR - VBR stands for Variable Bit Rate. The two types of Suppression Model that
can be selected are,
• Deterministic
• Markov Chain
4.5 Video
Model Type
• Continuous Normal VBR – This model is the simplest of all models. It uses
Normal Distribution for the generation of bits per pixel. In this model, consecutive
packet sizes are independent of each other.
• Frames per second – Number of frames arriving per second. This is in the
range of 10 – 50.
• Pixels per frame -Number of pixelsin each frame. This is in the range of
10000 – 100000.
• Bits per pixel (µ)– Mean value of the normal distribution used to generate the
value of bits per pixel.
• Bits per pixel (Σ) – Standard Deviation of the normal distribution used to
generate the value of bits per pixel.
o The generation rate for video application can be calculated by using the
formula Generation Rate (bits per second) = fps * ppf * bpp
where, fps = frames per second, ppf = pixel per frame, bpp (µ) = bits per pixel
(mean)
o Users can set the above-mentioned parameters in the Application Properties.
o For example, if we set frames per second = 20, pixels per frame = 10000, bits
per pixel = 0.52 then the generation rate would be, Generation rate (bits per
second) = fps*ppf*bpp = 20*10000*0.52 = 104000 bits per second = 0.1040
Mbps
For k = 1, 2,…, N-1, calculate Φkj , j = 1, 2,…,k iteratively using the following formulae
Dk = Dk-1 –(N2k-1/Dk-1)
Φkk = Nk / Dk
mk = j = 1ΣkΦkjXk-j
Finally, eachXk is chosen from N (mk, y k). Thus we get a process X with ACF
approximating to r (k).
Where d= H-0.5.
Β = 2 – 2H
Distribution of these data is Gaussian. For data to be Beta distributed, the following mapping
is being used.
• Frames per second – Number of frames arriving per second. This is in the
range of 10 – 50.
• Gamma I – Refer i-button help of Simple IPB Composite Model.
• Gamma B– Refer i-button help of Simple IPB Composite Model.
• Gamma P– Refer i-button help of Simple IPB Composite Model.
• Eta I – Refer i-button help of Simple IPB Composite Model.
• Eta B – Refer i-button help of Simple IPB Composite Model.
• Eta P– Refer i-button help of Simple IPB Composite Model.
4.6 FTP
File Size
• Constant
• Exponential
File Size (Bytes): Sets the size of the packets being generated by the chosen distribution.
By default 100000 bytes is entered.
NOTE: Devices must have TCP enabled in Transport layer for implementing FTP application successfully.
• Constant
• Exponential
Inter Arrival Time: Enter the average inter-arrival time between packets. A lower inter-
arrival time would lead to a higher generation rate and vice versa. By default 5 Sec is
entered.
4.7 Database
Transaction Size
• Constant
• Exponential
Packet_Size (Bytes): Sets the size of the packets being generated by the chosen
distribution. By default 10000 bytes is entered.
• Constant
• Exponential
Inter Arrival Time: Enter the average inter-arrival time between packets. A lower inter-
arrival time would lead to a higher generation rate and vice versa. By default 1000000 Micro
Sec is entered.
NOTE: Devices must have TCP enabled in Transport layer for implementing peer to peer application
successfully.
File Size
• Constant
• Exponential
Piece size (Bytes): Each file is divided into equal sized pieces and then the piece of the
data is transmitted. This property represents the size of each piece.
4.9 HTTP
HTTP (HyperText Transfer Protocol) is a protocol that utilizes TCP to transfer its information
between computers (usually Web servers and clients). Hence in NetSim, it is imperative that
TCP is enabled in the Source Node.
Http_request_interarrival_time
Inter Arrival Time (micro sec): This represents the rate at which client sends the requests.
Page_property
• Constant
• Exponential
Page Count: This represents the number of pages received from the server.
Page Size (Bytes): This represents the size of each page that is received from the server.
4.10Email
Email_Receive
• Constant
• Exponential
• Constant
• Exponential
Email_Size: It represents the size of the email that is received.
Email_Send
• Constant
• Exponential
• Constant
• Exponential
• Constant
Packet Size (Bytes): Sets the size of the packets being generated by the chosen
distribution. By default 50 bytes is entered.
• Constant
Inter Arrival Time: Enter the average inter-arrival time between packets. A lower inter-
arrival time would lead to a higher generation rate and vice versa. By default 1000000 Micro
Sec is entered.
• Constant
• Exponential
Packet Size (Bytes): Sets the size of the packets being generated by the chosen
distribution. By default 160 bytes is entered.
• Constant
• Exponential
Inter Arrival Time: Enter the average inter-arrival time between packets. A lower inter-
arrival time would lead to a higher generation rate and vice versa. By default 20000 Micro
Sec is entered.
Call
• Constant
• Exponential
Inter Arrival Time: Enter the average inter-arrival time between calls. A lower inter-arrival
time would lead to a higher call rate and vice versa. By default 60 Sec is entered.
• Constant
• Exponential
Service Type:
• CBR - CBR stands for Constant Bit Rate. Packets of constant size are generated
at constant inter arrival times.
• VBR- VBR stands for Variable Bit Rate. The two types of Suppression Model that
can be selected are,
• Deterministic
• Markov Chain
Success ratio: Sets the ratio of the packets that are not silenced during VBR calls.
4.13 BSM
NOTE- Available only with VANET component
• Constant
• Exponential
Packet Size (Bytes): Sets the size of the packets being generated by the chosen
distribution. By default 20 bytes is entered.
This indicates the time available for distribution is Constant gap between packets.
• Constant
• Exponential
4.14 Emulator
NOTE- Will be present only when Emulator Add-on is installed
Emulation
Source Real IP: Specifies the real IP Address of source device in Emulation
Source Port: Specifies the Port no used for transmission by Application running in source
device
Destination Real IP: Specifies the real IP Address of destination device in Emulation
Destination Port: Specifies the Port no used for reception by Application running in
destination device
Note: Priority of “Normal” has a Priority Value of 4 and “nRTPS” QoS Class. Ex: Video
over TCP.
Any time you have events which occur individually at random moments, but which tend to
occur at an average rate when viewed as a group, you have a Poisson process.
For example, we can estimate that a certain node generates 1200 packets per minute.
These are randomly generated throughput the hour throughput the 60 seconds, but there are
on average 1200 packets per minute. If 1200 packets generated per minute that, on
average, one packet is generated every 60 / 1200 = 0.05 seconds. So, let’s define a variable
λ = 1/ 0.05 = 20 and call it the rate parameter. The rate parameter λ is a measure of
frequency: the average rate of events (packets) per unit of time (in this case, seconds).
Knowing this, we can ask questions like, what is the probability that a packet will be
generated within the next second? What’s the probability within the next 10 seconds?
There’s a well-known function to answer such questions. It’s called the cumulative
distribution function for the exponential distribution, and it looks like this:
F(x) =1−e−λx
Basically, the more time passes, the more likely it is that, a packet is generated. The word
“exponential”, in this context, actually refers to exponential decay. As time passes, the
• The probability of generating a packet within the next 0.05 seconds is F(0.05)≈
0.63
• The probability of generating a packet within 1 second is F(1)≈ 0.999999998
In particular, note that after 0.05 seconds – the prescribed average time between packets –
the probability is F(0.05)≈ 0.63 .
We simply write a function to determine the exact amount of time until the next packet. This
function should return random numbers, but not the uniform kind of random number
produced by most generators. We want to generate random numbers in a way that follows
our exponential distribution.
Given that the inverse of the exponential function is ln, it’s pretty easy to write this
analytically, where U is the random value between 0 and 1:
This is exactly the code used in NetSim, and this is available in the source C file in
../NetSim_Standard/Simulation/Application/Distribution.c. In the case exponential
distribution, you would see
fFirstArg = args[0];
fFirstArg = 1 / fFirstArg;
The simple way of selecting this via the UI is to selecting exponential distribution for inter-
arrival time when modelling application properties.
Application path is the file location in the system in which NetSim has been installed.The app
path can be found out by right clicking the NetSim Shortcut in the desktop and selecting
Open file location (Windows 7/8/10). The app path will be something like “C:\Program
Files\NetSim Standard\bin”, depending on where NetSim is installed. Note thatit is the path
to the bin folder of the application install directory.
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 IO path can be got
by Start Run %temp%/NetSim. Once you reach this folder, the user can notice that the
path would be something like “C:\Users\Ram\AppData\Local\Temp\NetSim”
The IO path is the path where the Configuration.NetSim (NetSim Configuration file) of the
scenario, that will be simulated, should be present.
App path and IO path can also be same, i.e., Configuration.NetSim can be placed inside the
app path (if the app path has write permission). Otherwise, users can create a folder for IO
path and Configuration.NetSim can be placed inside that folder.
Note: Sample configuration.NetSim files are available in the <NetSim installed Directory>/Docs/
Sample_Configurations folder of the NetSim install directory inside the respective protocol folder names.
Note: File path should be always added in the command prompt within double quotes. For example,
For floating/roaming licenses, type the following in the command prompt.The type of license
can be seen by clicking on NetSim Help About NetSim
Where,
The following screenshot is the example of running NetSim through CLI where the ip
address of the NetSim license server is 192.168.0.2
Where,
Simulation will be completed successfully and the text files that are requested by the end
user in Configuration.NetSim will be written in the <iopath>.
Note: If the folder name contains white space, then mention the folder path within double quotes while
specifying the folder name in the command prompt. For example, if app path contains white space, then
the app path must be mentioned within double quotes in the command prompt as given below.
>NetSimCore.exe -h
With Quick Edit mode, you can copy text between a command window and Windows-based
programs, and you can also paste text into a command window by using a right-click
operation. To use Quick edit mode in command prompt users can run the command prompt
-> Right Click the icon in the upper-left corner of the Command Prompt window, and then
Click Properties ->In the options, enable Quick Edit mode -> and select ok.
Using UI
GUI
Using CLI
Configur
Metrics.t
ation.Net
xt
Sim
Protocol
Engine +
Stack +
Kernel
To model a scenario in order to generate metrics in NetSim, GUI will write all the details
about the devices used in the scenario and its properties, the links used and their properties,
the properties of the environment being used, etc. in Configuration.NetSimjust when the
user performs the simulation.
The back-end engine that contains dlls and NetSimCore.exe will read this
Configuration.NetSim, execute the simulation and write output metrics files (in .txt format) to
the IO path. Then, the GUI will display the metrics based on the text files written by the
backend.
In order to run NetSim through command line (CLI), the user has to create the
Configuration.NetSim furnishing all the details about the devices, links and the environment
of the desired scenario.
In Visual Studio, XML view provides an editor for editing raw XML and provides IntelliSense
and color coding.After you type the element name and press the CTRL+ SPACE, you will be
Color coding is followed to indicate the elements and the attributes in a unique fashion.
The following screenshot displays the Configuration.NetSim which is opened through the
Visual Studio.
• EXPERIMENT_INFORMATION
• GUI_INFORMATION
• NETWORK_CONFIGURATION
• SIMULATION_PARAMETER
• PROTOCOL_CONFIGURATION
• STATISTICS_COLLECTION
EXPERIMENT_INFORMATION:
GUI_INFORMATION:
This section contains the GUI information like the environment length, view type etc. and the
network name which is desired to be run.
NETWORK_CONFIGURATION:
This section is used to configure the devices and the links of the desired network at the each
layer of the TCP/IP stack. It consists of DEVICE_CONFIGURATION, CONNECTION and
APPLICATION_CONFIGURATION. DEVICE_CONFIGURATION configures the devices in
the desired network while the CONNECTION configures the links in the desired network and
APPLICATION configures the Applications.
SIMULATION_PARAMETER:
PROTOCOL_CONFIGURATION:
IPV4 and static ARP are enabled or disabled in this section. The text files illustrating the
static routing and static ARP can be obtained by enabling the corresponding tags in the
Configuration.NetSim.
STATISTICS_COLLECTION:
The packet trace and the event trace can be observed in the text files which are created by
enabling the tags in this section. The required fields of the packet trace can be enabled in
the PACKET_TRACE while the event trace can be enabled in the EVENT_TRACE of this
section.
Sample “Configuration.NetSim” file will be installed in user system along with the software at
<NetSim installed Path>\Docs\ Sample_Configuration\ <Network Technology>.User can
open and edit these files using Visual Studio 2015 or any XML editor. The purpose of
providing the sample “Configuration.NetSim” file is to assist the user in writing a network
scenario manually by analyzing the format for that specific network technology.
Configuration.xsd file can be placed inside the <iopath> along with the configuration.NetSim
file to verify the contents in the configuration.NetSim file. This file checks and validates the
structure and vocabulary of a configuration.NetSim document against the grammatical rules
of the appropriate XML language.
It is not mandatory to place the configuration.xsd file along with the Configuration.NetSim file
in the iopath. But if it is done, then it will be easier to check & validate changes that are done
to the Configuration.NetSim file.
After simulation of a scenario is performed, NetSim Performance Metrics are shown on the
screen as shown below:-
Prints metric
• Network metrics: Here users can view the values of the metrics obtained based
on the overall network and also displays the values of the metrics pertaining to
each link
• Link_ Id-It is the unique Id for the link.
• Link_ throughput_ graph – It is the total bytes transmitted over the link with
respect to the simulation time.
Calculation:
By data packet, we mean the total bytes the packet has at the phy layer, which would
include app layer payload plus the overheads of all layers.
Both successful, error and collision packets are included in this calculation (or) only
successful packets are counted and error / collision are not counted in this metrics.
Zoomgraph
Moving Average: This is the average of the metric up until the current time and is defined
as
1 𝒕𝒕
���
𝜃𝜃(t) = ∫𝟎𝟎 𝒓𝒓(𝒖𝒖)𝒅𝒅𝒅𝒅
𝑡𝑡
Time Average: This is the average of the metric up to end of simulation current time
• Device metrics: Displays device related metrics like ARP table, IP forwarding
tables. This is also dependent upon the type of network
• Application Metrics: Displays the various metrics based on the Application
running in the network scenario.
• Application Id- It is the unique Id of the application running at the source.
• Application_ throughput_ graph: it is the total payload delivered to destination to
the simulation time.
• Application Name - It is unique name of the application running.
• Source Id-It is the unique Id of the device running that particular application.
• Destination Id-It is the unique Id of the destination device.
• Packets Transmitted-It is the total number of packets generated and transmitted
from the source.
• Packets Received-It is the total number of packets received at the destination.
Calculation:
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑡𝑡𝑡𝑡 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 (𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏) ∗ 8
𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 𝑇𝑇ℎ𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟ℎ𝑝𝑝𝑝𝑝𝑝𝑝(𝑖𝑖𝑖𝑖 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀) =
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 (𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 𝑠𝑠𝑠𝑠𝑠𝑠)
• Delay-It is the average amount of time taken calculated for all the packets to reach
the destination from the source.
Note about metrics: The metrics are calculated at each layer and might not be equivalent
to the same metric calculated at a different layer. For exactness and precision we
recommend users also verify the results with the event trace & packet trace generated by
NetSim.
Note about packet transmission:The Network Stack forms the core of NetSim’s
architecture. The Stack consists of five IN and OUT events: PHYSICAL_IN, MAC_IN,
NETWORK_IN, TRANSPORT_IN, APPLICATION_IN and APPLICATION_OUT,
TRANSPORT_OUT, NETWORK_OUT, MAC_OUT, PHYSICAL_OUT. All the packets when
transferred between devices go through the above events in order. IN events occur when the
packet is entering a device and all the OUT events occur when packet leaves a device.
The following table lists the various files that will be written in the NetSim install directory/ IO
path on completion of simulation.
S. No File Contents
Contains the metrics of the network that
1 Metrics.xml
is simulated recently.
Contains the information of captured
2 Node.pcap
packets that is recently simulated.
Contains the status of the
3 LicenseErrorLog.txt communication between the NetSim
dongle and the client.
This file will be written while reading the
Configuration file.
4 ConfigLog.txt
Provides errors if there are errors in the
configuration file.
Contains the logs as the control flows
5 LogFile.txt across various layers in the Network
Stack
Contains the detailed packet information.
6 PacketTrace.csv This file will be written only when Packet
Trace is enabled.
If NetSim runs via the UI, then the metrics will be displayed automatically at the end of
simulation with illustrative tables.
If NetSim runs via CLI, then the metrics will be written into Metrics.txt and MetricsGraph.txt.
The packet animation would then be recorded and the user can view the animation from the
metrics screen as shown below:
While viewing packet animation, user can see the flow of packets as well as the type of
packet. Blue color packet denotes control packet, green color is used for data packet and
• Create a scenario with 3 wired nodes, 2 switches and 1 router and connect it
based on the following scenario.
• Disable TCP in all the wired nodes.
• Select Application button and click on the gap between grid environment and
ribbon. Right click on application, select properties and set Source_Id and
Destination_Id as 1 and 2 respectively.
• Set Simulation time = 100s. After clicking on Run Simulation, edit IP and ARP
Configurationtab by setting Static ARP as Disable. Click on OK button to
simulate.
Case 2: Across-Router-IP-forwarding
• Follow all the steps till Step 2 and perform the following sample.
• To run the simulation, drop the Application icon and set the Source_Id and
Destination_Id as 1 and 3 respectively.
• Click on Run Simulation and set Simulation time as 100 sec.
• Then go to IP and ARP Configuration tab and set Static ARP as Disable. Click on
OK button to simulate.
By providing a host of information and parameters of every packet that flows through the
network, packet trace provides necessary forensics for users to catch logical errors without
setting a lot of breakpoints or restarting the program often. Window size variation in TCP,
Route Table Formation in OSPF, Medium Access in Wi-fi, etc, are examples of protocol
functionalities that can be easily understood from the trace.
Step 1: Open the trace file. (In this example packet trace is opened)
Step 2: Go to Data menu and click on filter icon to enable the auto filter.
Step 3: Click the arrow in the header of the column you want to filter. In the list of text or
numbers, uncheck the (Select All) box at the top of the list, and then check the boxes of the
items you want to show.
For example, click on arrow of SOURCE_ID and uncheck the “Select all” check box and
select NODE 2 then click on ok
All the rows which are having NODE 2 as source id will be shown.
6.3.2 Observing packet flow in the Network through packet trace file
Open the packet trace file, Set the filter, Click the arrow in the header of the column
PACKET_ID and uncheck the “Select all” check box and select the packet id which you want
to observe, for example 1, and then click on ok.
Scenario is as shown below and traffic flow is from Wired Node 1 to Wired Node 2.
Note: In the trace file device IDs are shown not device names. Wired Node 1’s ID is 2 so it is Shown as
NODE-2, Wired Node 2’s ID is 3 so it is shown as NODE -3, Router-1’ ID is 1 so it is shown as ROUTER-1.
Device IDs are shown on the top of the device icon in the above scenario.
In a scenario source and destinations are fixed but transmitter and receiver are changed. For
example in the above scenario NODE-2 is the source and NODE-3 is the destination, but
when NODE- 2 sending the packet to the ROUTER-1 then NODE-2 is the transmitter and
ROUTER-1 is the receiver. When ROUTER-1 sending the packet to the NODE-3, ROUTER-
1 is the transmitter and NODE-3 is the receiver.
NetSim Packet trace is saved as a spread sheet. This file can be converted to an Excel table
to make the management and analysis of data easier. A table typically contains related data
in a series of worksheet rows and columns that have been formatted as a table. By using the
table features, you can then manage the data in the table rows and columns independently
from the data in other rows and columns on the worksheet
PivotTables are a great way to summarize, analyse, explore, and present your data, and you
can create them with just a few clicks. PivotTables are highly flexible and can be quickly
adjusted depending on how you need to display your results. You can also create Pivot
Charts based on PivotTables that will automatically update when your PivotTables do.
Steps to analyse the packet trace using pivot tables (using Excel 2013)
Click Ok and then the spread sheet will be converted to a table as shown below
Once you create a PivotTable, you'll need to decide which fields to add. Each field is simply
a column header from the source data. In the PivotTable Field List, check the box for
each field you want to add.
1 If you want to analyse packets sent from all sources to all destinations, then check
SOURCE_ID, DESTINATION_ID and CONTROL_PACKET_TYPE/APP_NAME.
3 The PivotTable will calculate and summarize the selected fields. In this example, the
PivotTable shows the packets sent from all sources to all destinations.
4 The above example shows all the packets which including data packets and control
packets.
5 If you wish to know how many Data and how many were control packets then, check the
PACKET_TYPE and drag it to the ROWS field.
7 Further, if you wish to know how many packets got errored and how many were
successful, check the PACKET_STATUS field and drag it to the ROWS field.
Delay analysis:To explain how users can do the delay analysis, we have chosen the packet
trace generated per the following network scenario
Enable Packet Trace and simulate thescenario for 10 seconds. Open packet trace and
convert the spread sheet to table (explained earlier):-
1 After creating table, Insert 1 column after PHY_LAYER_END_TIME, then select the
whole column and calculate delay for each and every packet by using the formula
PHY_LAYER_END_TIME – APPLICATION_LAYER_ARRIVAL_TIME
2 Then Press CTRL + ENTER. This will calculate delay for the whole column shown
below
7 Drag and drop DELAY value that we have calculated earlier to ROWS and VALUES
field
Throughput analysis:To explain how users can perform Throughput Analysis, we have
used same network design example as was used for Delay analysis above.
7 Now compare the throughput calculated using pivot table with the Application Metrics
throughput
In a pivot table, you can create a new field that performs a calculation on the sum of
other pivot fields.
1 Drag and drop SOURCE_ID, RECEIVER_ID and PACKET_STATUS to FILTERS field,
then CONTROL_PACKET_TYPE/APP_NAME, APP_LAYER_PAYLOAD to ROWS field
and APP_LAYER_PAYLOAD to VALUES field as shown below
8 Click on Formula text box and then select APP_LAYER_PAYLOAD in the Fields list and
click on Insert Field
9 Calculate the throughput by using the following formula shown below and click on OK
11 Select a cell in the pivot table, and on the Excel Ribbon, under the PivotTable Tools tab,
click the Options tab (Analyze tab in Excel 2013).
12 In the Tools group, click Pivot chart and select OK.
PHY_LAYER_START_TIME Specifies the time at which packet starts betting transmitted in the link
(μs) between Transmitter_ID and Receiver_ID
RTT (seconds) Specifies the Round Trip Time for the packet
RTO (seconds) Specifies the Retransmission Timeouts
CONNECTION_STATE Specifies the state of TCP connection
NOTE:
Each line in the packet trace represents one hop of one packet.
The packet trace is logged in ascending order of time as measured in Phy_Layer_End_Time.
NetSim’s Network Stack forms the core of NetSim and its architectural aspects are
diagrammatically explained below. Network Stack accepts inputs from the end-user in the
form of Configuration file and the data flows as packets from one layer to another layer in the
Network Stack.
All packets, when transferred between devices move up and down the stack, and all events
in NetSim fall under one of these ten categories of events, namely, Physical IN, Data Link
IN, Network IN, Transport IN, Application IN, Application Out, Transport OUT, Network
OUT, Data Link OUT and Physical OUT. The IN events occur when the packets are
entering a device while the OUT events occur while the packet is leaving a device.
The protocol engines are called based on the layer at which the protocols operate. For
example, TCP is called during execution of Transport IN or Transport OUT events, while
802.11b WLAN is called during execution of MAC IN, MAC OUT, PHY IN and PHY OUT
events.
When these protocols are in operation they in turn generate events for NetSim's discrete
event engine to process. These are known as SUB EVENTS. All SUB EVENTS, fall into one
of the above 10 types of EVENTS.
Each event gets added in the Simulation kernel by the protocol operating at the particular
layer of the Network Stack. The required sub events are passed into the Simulation kernel.
These sub events are then fetched by the Network Stack in order to execute the functionality
of each protocol. At the end of Simulation, Network Stack writes trace files and the Metrics
files that assist the user in analyzing the performance metrics and statistical analysis.
Event Trace:
The event trace records every single event along with associated information such as time
stamp, event ID, event type etc in a text file or .csv file which can be stored at a user defined
location.
Apart from a host of information, the event trace has two special information fields for
diagnostics
Note: Turning on Event Trace will slow down the simulation significantly
If NetSim runs via GUI, event trace can be turned on by clicking the Event Trace icon in the
tool bar and selecting the required fields in the event trace.
If NetSim runs via CLI, then the event trace can be turned on by enabling the event trace in
the STATISTICS_COLLECTION tag of the configuration file.
Refer Help on “Generating Packet Trace How to import Packet Trace to Excel?”
3 Then a window named Create Pivot Table pops up which automatically selects the
entire table, then click OK button. In case the entire table isn’t selected please enter the
range such that all rows are selected.
5 Once you create a PivotTable, you'll need to decide which fields to add. Each field is
simply a column header from the source data. In the PivotTable Field List, check the
box for each field you want to add.
And the Pivot Table created will be as shown (1 in the table is Source_Id and 10
is the Destination_Id)
12 Select the entire empty column H then and enter the formular =IF(AND(LEN(A1),
INT(A1)=A1),F1-G1*B1) in function and press CTRL+ENTER
F column is Total Sum of Event_Time, G Column is Total Count of Event_Time, B
Column is Sum of Event_time(µs) of the Source.
Note: If the packet size is > 1500 then fragmentation occurs and the packet is received as multiple
segments. In NetSim the destination counts each segment as different packet.
Then in an empty cell enter
=SUMIF(H:H,">0")/GETPIVOTDATA("Count of Event_Time(US)2",$A$4,"Device_Id",10)
where
In NetSim ‘jitter’ is defined as the variance of delay. Variance is statistically defined as the
square of deviation from the mean.
Note: This calculation is only valid only when there is with no packet segmentation. This means that all
Packet Sizes should be less than 1500B
13 For Jitter Calculation Pivot table Fields should be as shown below
14 Then select any cell of Destinationnode column and right click and select Show
Values As option, it dropdown a list in which you select Difference From option.
And the destination node column shows the delay of each packet.
15 Place the mouse cursor on the top of Destination Id then left click it will automatically
selects the rows of the destination Id, then select the Name Box and name the row.
Then enter =VAR.S(Row Address), where the Row Address is one that you got in the
previous step.
This will give you the Application Jitter.
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
17 App Throughput =
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆
In NetSim, to enable packet capture in Wireshark, Right Click on the device where
Wireshark should capture packets. In the properties, go to Global_Properties and set the
Wireshark parameter as Online
If enabled, Wireshark automatically starts during simulation and displays all the captured
packets.
The detail of the contents of the selected packet can be seen in the below panes.
TREE View
BYTE View
In the above figure, the details of the packet are displayed in both tree form and bytes form.
In the tree form, user can expand the data by clicking on the part of the tree and view
detailed information about each protocol in each packet.
Display filters allow you to concentrate on the packets you are interested in while hiding the
currently uninteresting ones. Packets can be filtered by protocol, presence of a field, values
of fields etc. To select packets based on protocol, type the protocol in which you are
You can also build display filters that compare values using a number of different
comparison operators like ==, != , >, <, <=, etc.Following is an example displaying filtered
packets whose SYN Flag and ACK Flag are set to 1 in a TCP Stream.
A network conversation is the traffic between two specific end points. For example, an IP
conversation is all the traffic between two IP addresses. In Wireshark, Go to Statistics
Menu Conversations
User can also analyze each of the conversation andcan create graphs by selecting them and
clicking on “Graph”.
Creating IO graphs
The flow graph feature provides a quick and easy to use way of checking connections
between a client and a server. It can show where there might be issues with a TCP
connection, such as timeouts, re-transmitted frames, or dropped connections.To access flow
graph, go to Statistics Menu Flow Graph and select the flow type. By default you can see
the flow graph of all the packets.
To get the TCP flow, select TCP flow in “Flow Type” dropdown box and you will obtain the
flow as shown:
There are various important steps in this process, and each of these steps has various
options as explained in the subsequent pages:
DLL is the shared library concept, implemented by Microsoft. All DLL files have a .dll file
extension. DLLs provide a mechanism for sharing code and data to upgrade functionality
without requiring applications to be re-linked or re-compiled. It is not possible to directly
execute a DLL, since it requires an EXE for the operating system to load it through an entry
point.
Note: If the DLL needs to be debugged then build the DLL in “debug” mode or else build in “release”
mode.
Note: Make sure that Visual Studio 2015 is installed in your computer
Note:Sometimes you may get the following warning message. Then click on ok
and proceed.
Step 2: Inside Solution Explorer pane in Visual Studio 2015, double click on TCP. Then
open TCP.C file by double clicking on it. To the right of global space, we have several
functions, we have to choose fn_Netsim_TCP_Init(). Simalarly for all protocols choose
Init( ) fn to add the custom code.
Note: - Use fprintf(stderr, "Source is Modified\n"); instead of printf ( ) to write to standard out. stdout is
redirected to LogFile.txt which is present in <iopath>. So you can see “Source is Modified” Statement (or
whatever you write inside the printf) inside the LogFile.txt.
Once this is done click to save the changes and overwrite the file (in case of write
protection).
Step 1: Right Click on the Project (in this case TCP) inside the Solution Explorer pane and
select Build to create DLL file of that specific protocol only.
NOTE: To create DLL file of all the protocols actively displayed inside solution pane, click on
“BuildBuild Solution”
Step 2: Inside the simulation folder (present on the desktop) a Dll folder will be created and
inside, the DLL’s are built.
It will contain custom DLL’s which have been built per the modifications done.
Step 1: Right Click on the Project (in this case TCP) inside the Solution Explorer pane and
select Build to create DLL file of that specific protocol only. Right click on the Solution
Explorer pane & Go to “Configuration Manager”.
Step 2:In “configuration Manager…” under “Active solution platform” select new select x64
Step 3: After changing the platform to x64 for each protocol, then click on “close” button.
NOTE: To create DLL file for all the protocols actively displayed inside solution panel, “Debug Build
Solution”
Check that the build is successful and necessary DLL files have been built.
The procedure to link custom dynamic link libraries (DLLs) is explained below. This
procedure is common for any linking of any custom DLL to NetSim.
Step 1: Copy the newly created DLL file of customized TCP from “../NetSim
Standard/src/Simulation” folder
Step 2: Go to “NetSim Standardbin” folder. Here one would find default DLLs for
respective protocols as shown in next figure.
Step 3: Rename the default DLL:It is recommended to rename the default DLL as original dll
thereby saving a copy of DLL(simulation folder) in bin path. For example libTCP.dll has been
renamed as libTCP_original.dll as shown below:-
Step 4: Place the custom DLL obtained from Step 1 inside the “NetSim Standardbin”
folder.
Custom
(your) DLL
Note: Ensure that the name of the DLL which is pasted is exactly the same as the original DLL (before it
was renamed). For the example case of TCP, the DLL must be libTCP.dll
User can run the simulation via GUI (Please refer section 3). In this case, user can create a
scenario in any network which involvesTCP protocol. Running the simulation with the custom
DLL will give desired output to the user as shown below.
Step 1: Create a file with the name NodeFailure.txt inside the bin folder of NetSim
installation directory. The file will contain two columns: one being the Node ID of the device
to be failed and other being the failure time (in microseconds).
For example, to fail Node Id 2 from10th sec onwards and fail Node Id 1 from 90th sec
onwards, the NodeFailure.txt file will be as follows:
Step 3:The function fn_NetSim_DSR_Init() will execute before the protocol execution starts.
So in this function, we will read the NodeFailure.txt and save information regarding which
nodes will fail at which time. Add the following code inside the specified function.
int i;
Step 4: The fn_NetSim_DSR_Run( ) is the main function to handle all the protocol
functionalities. So add the following code to the function at the start.
int i,nFlag=1;
if(nFlag)
{
for(i=0;i<100;i++)
if((pstruEventDetails->nDeviceId== NodeArray[i])&&(pstruEventDetails->dEventTime >=
TimeArray[i]))
{
pstruEventDetails->nInterfaceId = 0;
pstruEventDetails->pPacket=NULL;
return 0;
}
}
Step 6: Create DLL and Link the DLL to the NetSim as explained in Section 7.1.
Step 7: Create a scenario in MANET and run the simulation. User can utilize Packet
Animation to check the node failure (i.e. no packets are forwarded by failed nodes) after the
mentioned time
Objective: Transferring a real file from source node to destination node in WSN
Implementation:The code modifications to transfer file from Sensor to Sink node are
described here:
#ifndef _NETSIM_802_15_4_H_
#define _NETSIM_802_15_4_H_
#define _FILE_SEND_ //Uncomment to transfer file
4 In Sensor.c, the code must be modified at specified places in red color. Add the
modified code:
#include "main.h"
#include "List.h"
#include "802_15_4.h"
#define MAX_PAYLOAD 70
#ifdef _FILE_SEND_
typedef struct file_info
{
char Packet[100];
long len;
int Packet_Id;
_ele* ele;
}FILE_INFO,*PFILE_INFO;
#define FILE_INFO_ALLOC() (PFILE_INFO)list_alloc(sizeof(FILE_INFO),offsetof(FILE_INFO,ele))
PFILE_INFO fileinfo=NULL;
static int nPacketId=0;
char file_name[100][50] = {"send.txt"};
char outfile_name[100][50] = {"receive.txt"};
if(!file_receive)
file_receive = fopen(outfile_name[0],"wb");
while(file_rec)
{
if(file_rec->Packet_Id == PacketId)
{
//fprintf(stderr,"file written. size = %d\n",file_rec->len);
packet = file_rec->Packet;
siz = file_rec->len;
fwrite(packet,sizeof(char),siz,file_receive);
}
file_rec=LIST_NEXT(file_rec);
}
fflush(file_receive);
}
else
{
siz = fread(str,sizeof(char),n,file_transfer);
}
n-=siz;
PstruPacket->pstruNetworkData->nTTL = MAX_TTL;
//Update the Application layer information
//For transferring file from Sensor to sink node
//70 bytes at a time
file =FILE_INFO_ALLOC();
memcpy(file->Packet,str,siz);
file->Packet_Id = PstruPacket->nPacketId;
file->len = siz;
LIST_ADD_LAST((void**)&fileinfo,file);
PstruPacket->szPayload = NULL;
PstruPacket->pstruAppData->dPayload = siz;
PstruPacket->pstruAppData->dOverhead = 0;
PstruPacket->pstruAppData->dPacketSize = PstruPacket->pstruAppData->dPayload
+ PstruPacket->pstruAppData->dOverhead;
PstruPacket->pstruAppData->dArrivalTime = pstruEventDetails->dEventTime;
PstruPacket->pstruAppData->dEndTime = pstruEventDetails->dEventTime;
PstruPacket->pstruAppData->dStartTime = pstruEventDetails->dEventTime;
if(NETWORK->ppstruDeviceList[nSensorLoop-1]->pstruTransportLayer->isUDP)
PstruPacket->pstruTransportData-
>nTransportProtocol=TX_PROTOCOL_UDP;
else if(NETWORK->ppstruDeviceList[nSensorLoop-1]->pstruTransportLayer->isTCP)
PstruPacket->pstruTransportData-
>nTransportProtocol=TX_PROTOCOL_TCP;
else
PstruPacket->pstruTransportData->nTransportProtocol=0;
if(NETWORK->ppstruDeviceList[nSensorLoop-1]->pstruSocketInterface-
>pstruSocketBuffer[0]->pstruPacketlist==NULL)
{
fn_NetSim_Packet_AddPacketToList((NETWORK-
>ppstruDeviceList[nSensorLoop-1]->pstruSocketInterface->pstruSocketBuffer[0]),PstruPacket,3);
pstruEventDetails->dPacketSize=PstruPacket->pstruAppData->dPacketSize;
pstruEventDetails->nDeviceType = SENSOR;
pstruEventDetails->nApplicationId=0;
pstruEventDetails->nProtocolId=PstruPacket->pstruTransportData-
>nTransportProtocol;
pstruEventDetails->nDeviceId=(NETSIM_ID)nSensorLoop;
pstruEventDetails->nInterfaceId=0;
pstruEventDetails->nEventType=TRANSPORT_OUT_EVENT;
pstruEventDetails->nSubEventType=0;
pstruEventDetails->pPacket=NULL;
fnpAddEvent(pstruEventDetails);
}
else
{
fn_NetSim_Packet_AddPacketToList((NETWORK-
>ppstruDeviceList[nSensorLoop-1]->pstruSocketInterface->pstruSocketBuffer[0]),PstruPacket,2);
}
}
fclose(file_transfer);
return 0;
}
#endif
/** In this function the sensors sense the agent, creates a packet and forwards it to sink node.*/
#ifdef _FILE_SEND_
fnsendfile((NETSIM_ID)nSensorLoop);
return 0;
#endif
pstruPos = (POS_2D*)fnpAllocateMemory(sizeof(POS_2D),1);
pstruTemppos = (POS_2D*)fnpAllocateMemory(sizeof(POS_2D),1);
for(nAgentLoop =0;nAgentLoop<MAXAGENT;nAgentLoop++)
{
if(pstruAgent[nAgentLoop] == NULL)
continue;
In 802_15_4.c , the code must be modified at specified places in red
color. Add the modified code:
case MAC_IN_EVENT:
{
.
if(pstruPacket->nControlDataType/100 != MAC_PROTOCOL_IEEE802_15_4)
{
//Prepare the Network in event details
pstruPacket->pstruMacData->dOverhead -= 5;
pstruPacket->pstruMacData->dPacketSize = pstruPacket->pstruMacData->dPayload
+ pstruPacket->pstruMacData->dOverhead;
pstruEventDetails->dPacketSize = pstruPacket->pstruMacData->dPacketSize;
pstruEventDetails->pPacket = pstruPacket;
pstruEventDetails->nEventType = NETWORK_IN_EVENT;
pstruEventDetails->nSubEventType = 0;
pstruEventDetails->nProtocolId =
fn_NetSim_Stack_GetNWProtocol(pstruEventDetails->nDeviceId);
//Add Network in event
fnpAddEvent(pstruEventDetails);
#ifdef _FILE_SEND_
if(pstruPacket->nPacketType == PacketType_Custom)
fnWriteFile(pstruPacket->nPacketId);
#endif
}
else if(pstruPacket->nControlDataType == BEACON_FRAME)
{ ...
In this section we create a sample scenario to transfer file from Sensor to Sink Node in
WSN:
Step 1: Create a scenario in NetSim as follows. Make sure the sensor is dropped first on the
environment
Step 2: Run the simulation. (Make sure the input file to be transferred is present in bin folder
of NetSim).
Step 3: Output file should be present in bin folder of NetSim with the name
receive.txtdefined earlier in outfile_name[] in Sensor.c.
Note: Due to retransmissions and errors, sometimes the output file is not reproduced
correctly. To get exact file, user has to enable TCP (WSN works on UDP).
Step 1: Perform the required modification of the protocol source code and add _getch()
(used to hold the program execution until the user enters a character) statement inside init
function of the modified protocol.
Step 2: Build the protocol and replace the dll in bin folder in NetSim. Do not close Visual
Studio.
Step 3: In NetSim, create a network scenario where the protocol is being used and start the
simulation. In the console window user would get a warning message shown in the below
screenshot and the simulation will pause for user input (because of _getch() added in the init
function)
Step 4: In Visual Studio, put break point inside the source code where you want to debug.
After execution of the function, the control goes back to NetSim and then comes back to the
custom code the next time the function is called in the simulation.
• First follow all the 3 steps mentioned in the section 7.3.1 in User Manual but except
in “Step 3” check play and record option in Run and Simulate
• After attaching the Netsimecore.exe, Press enter in the command window. Then
control goes to the project and stops at the break point in the source code as
shown below.
• In watch window add {,,Networkstack.dll}pstruEventDetails and drop down to see
the dEventTime, dEventType. Note that dEventTime is the simulation time. Refer
Section - 7.3.5 Viewing and accessing variables, for more information on how to
get the watch window
• Animation is called only at PHYSICAL_OUT_EVENTs and
PHYSICAL_IN_EVENTs and not at any of the other events. Hence users would
notice a lag between dEventTime shown when debugging and Simulation Time
shown in animation window
FIGURE: 1
FIGURE: 2
• All debugging options like step over (F10), step into (F11), step out (Shift + F11),
continue (F5) are available.
• In the example chosen (IOT simulation with RPL protocol) when you can see on
the right window on the image DIO message is copied from Source (Sensor A) to
the Destination (LoWPAN Gateway7) and the details of source name, destination,
packet info, status and simulation time are seen on the bottom of the NetSim
Animation window.
• In FIG: 1 as you can see on the LEFT WINDOW dEventTime = 62517.4 and
dEventType = PHYSICAL_OUT_EVENT
• In FIG: 2 dEventType = PHYSICAL_IN_EVENT on the left window and the
animation is shown for PHYSICAL_OUT of Sensor A and PHYSICAL_IN of
LoWPAN Gateway on the right window and the simulation time is 62517.4 which is
equal to the dEventTime of PHYSICAL_OUT_EVENT.
• In FIG: 3 no animation is seen because another event (NETWORK_OUT_EVENT)
is being processed
• During debugging every time a new packet is transferred the details of the previous
packets will scroll down automatically and the details of the current packet is
displayed on the top.
• To stop debugging press Shift+F5, the control goes to command window again.
Step 1: Open the Command prompt. Press “windows+R” and type “cmd”.
Step 2: To run the NetSim via CLI copy the path where “NetSimCore.exe” is present.
>cd <apppath>
>NetSimCore.exe<space>-apppath<space><apppath><space>-
iopath<space><iopath><space>-license<space>5053@<ServerIP Address><space> -d
Step 4: Open/Create the Project in Visual Studio and put break point inside the source code.
Attach to NetSimCore.exe.
Step 6: Go to command prompt which is already opened in Step 3. Enter the Event Id.
Note: If you don’t want to stop at any event you can specify 0 as event id.
Press enter then control goes to the project and stops at the break point in the source code
as shown below.
All debugging options like step over (F10), step into (F11), step out (Shift + F11),
continue(F5) are available.
After execution of the function, the control goes back to NetSim and then comes back to the
custom code the next time the function is called in the simulation.
To debug your own (custom) code, it is often helpful to know which section of the code (file
name & line number) generated the event under study. There are 2 ways to enable this
feature.
Procedure 1
Step 1:Open configuration.netsim file and provide the file name, path and set status as
Enable.
Step 2: Run the NetSim via CLI in debug mode (Refer NetSim Help in chapter 5Running
Netsim via CLI) with –d as the fourth parameters
Press enter
Note: In the above trace file Event Id 56 is triggered inside the sendbuffer.c file which is present in DSR.c.
Since all the lib files are opaque to the end user, you cannot see the source code of the lib file. However,
Event Id 9 is triggered at line number 69 of routereply.c file and you can find the location of the event by
opening the routereply.c file as shown below.
File Name
Line Number
Procedure 2:
To see the value of a variable, when debugging hover the mouse over the variable name in
the code. A text box with variable contents appears. If the variable is a structure and
contains other variables, then click on the plus sign which is there to the left of the text box.
Watch the change in the variable as the code progress by right clicking on the variable &
clicking on "add watch" tab. This is useful if to continuously monitor the change in the
variable as the code progresses.
During the process of debug users would come acrossvariables that are defined outside the
source file being built as a .dll. Such variables cannot be viewed directly when added in the
watch tab, as this would throw the error
A program database (.pdb) file, also called a symbol file, maps the identifiers that a user
creates in source files for classes, methods, and other code to the identifiers that are used in
the compiled executablesof the project. The .pdb file also maps the statements in the source
code to the execution instructions in the executables. The debugger uses this information to
determine: the source file and the line number displayed in the Visual Studio IDE and the
location in the executable to stop at when a user sets a breakpoint. A symbol file also
contains the original location of the source files, and optionally, the location of a source
server where the source files can be retrieved from.
When a user debugs a project in the Visual Studio IDE, the debugger knows exactly where
to find the .pdb and source files for the code. If the user wants to debug code outside their
project source code, such as the Windows or third-party code the project calls, the user has
to specify the location of the .pdb (and optionally, the source files of the external code) and
those files need to exactly match the build of the executables.
The pdb files are usually available in NetSim’s install directory, else write to
[email protected] for the latest copy of these debug files. Go to Tools >
options>debugging>load all symbols.
In the watch window, the variable which the user has to watch should be edited by double
clicking on it and prefixing {,,NetworkStack.dll} to the variable name and pressing enter. (The
name of the respective file in which the variable is defined should be mentioned - in this case
NetworkStack.dll).
In NetSim, while a scenario is simulated, it is possible to access variables which are defined
in one .dll file from another .dll file. An example is given below showing how a IEEE802.11
file variable dReceivedPower_mw can be accessed in the DSR file.
In the example, the code line must be written in IEEE802_11_Phy.h file present inside
IEEE802_11 folder.
In the main function where a user wishes to find the dReceivedPower_mw, the variable must
be assigned the respective value. In the above case, the following line of code must be
written inside fn_NetSim_IEEE802_11_PhyIn() function in IEEE802_11_Phy.c file present
inside IEEE802_11 folder.
var1 = DEVICE_PHYVAR(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId);
Note that the parameters given in the macro or any function which assigns a value to the
variable must be defined beforehand in the code. Here nDeviceId and nInterfaceId are
defined beforehand.
The modified IEEE802_11.h file along with other header files on which it depends
(IEEE802_11.h, IEEE802_11_enum.h, IEEE802_11_HTPhy.h, IEEE802_11_Phy.h,
IEEE802_11_PhyFrame.h,and IEEE802_11e.h), present inside <Installed Directory> \src
\Simulation \IEEE802_11\ folder must be copied and pasted in the DSR solution folder
<Installed Directory>\src\Simulation\DSR and must be included in the DSR solution in visual
studio.
The Object file library <Installed Directory>\src\Simulation \Dll\IEEE802_11.lib file which got
created must be copied and pasted in the lib folder located at <Installed
Directory>\src\Simulation.
For viewing the variable value in the command prompt, the following lines must be added in
DSR.c.
#include “IEEE802_11_Phy.h”
Now Right click on DSR project Properties Linker Input add IEEE802_11.lib to
the Additional Dependencies.
Users can try printing the Device ID, Application ID, Duplicate Ack Count, Congestion
pstruEventDetails->dEventTime,
DEVICE_POSITION(pstruEventDetails->nDeviceId)->X,
DEVICE_POSITION(pstruEventDetails->nDeviceId)->Y);
_getch();
1 Open NetSim.sln file from NetSim installation path <C:\Program Files (x86)\NetSim
Standard\src\simulation for 32-bit NetSim or C:\Program Files\NetSim
Standard\src\simulation for 64-bit NetSim using Microsoft visual studio 2015.
2 Therefore, go to ZigBee project and Open 802_15_4.h file and add a subevent called
“MY_EVENT” inside enum_IEEE802_15_4_Subevent_Type as shown below:
4 We assume that MY_PACKET has the same fields as a Zigbee Ack and hence we are
adding the following ack frame to 802_15_4.h file(Add this code just above the enum
enum_IEEE_802_15_4_ControlPacket_Type{} defenition):
struct stru_My_Frame
{
int nBeaconId;
int nSuperFrameId;
int nBeaconTime;
double dPayload;
enum enum_IEEE_802_15_4_ControlPacket_Type
{
5 Open 802_15_4.c file, go to the case TIMER_EVENT and add the following code to the
subevent type :-
case SUBEVENT_GETLINKQUALITY:
{
--------------------------
}
break;
case MY_EVENT:
{
//my event//
fprintf(stderr, "My_event");
pstruEventDetails->dEventTime = pstruEventDetails->dEventTime + 1 * SECOND;
pstruEventDetails->nDeviceId = nGlobalPANCoordinatorId;
pstruEventDetails->nInterfaceId = 1;
pstruEventDetails->nEventType = TIMER_EVENT;
pstruEventDetails->nSubEventType = MY_EVENT;
pstruEventDetails->nProtocolId = MAC_PROTOCOL_IEEE802_15_4;
fnpAddEvent(pstruEventDetails);
fn_NetSim_WSN_MY_PACKET();
//my event//
}
break;
Here we are adding a new event inside the timer event, and this event will occur every 1
second in the GlobalPANCoordinator. i.e sink node. In this event,
fn_NetSim_WSN_MY_PACKET() is called as explained in step 5.
6 Inside 802_15_4.c file, add the following code at the end of the file for sending ack
(broadcast):
int fn_NetSim_WSN_MY_PACKET()
{
double dTime;
NETSIM_ID nDeviceId = pstruEventDetails->nDeviceId;
NETSIM_ID nInterfaceId = pstruEventDetails->nInterfaceId;
IEEE802_15_4_MAC_VAR *pstruMacVar = DEVICE_MACVAR(nDeviceId,
nInterfaceId);
// Create MY_Frame
pstruAckPkt = fn_NetSim_Packet_CreatePacket(MAC_LAYER);
pstruAckPkt->nPacketType = PacketType_Control;
pstruAckPkt->nPacketPriority = Priority_High;
pstruAckPkt->nControlDataType = MY_PACKET;
pstruAck = fnpAllocateMemory(1, sizeof(MY_FRAME));
strcpy(pstruAckPkt->szPacketType, "MY_PACKET");
8 In 802_15_4.c file, goto fn_NetSim_Zigbee_Init() function and add the following code in
red color to call the timer_event. i.e MY_EVENT
In the above function, subevent type, “MY_EVENT” is called. So this function calls the
MY_EVENT, timer event to execute.
15 Also open packet trace and users can filter the control packet and see all the
packet details of “MY_PACKET” written in the packet trace.
16 To analyse the “MY_EVENT” users can open event trace and filter the subevent
type as “MY_EVENT”. Here users can analyse that the event occurs for every 1
seconds.
o fn_NetSim_Packet_CopyPacket_dbg(const NetSim_PACKET*
pstruPacket,int line,const char* file);
• Free a packet
o fn_NetSim_Packet_FreePacket_dbg(NetSim_PACKET** pstruPacket,int
line,char* file);
o fn_NetSim_Utilities_CalculateDistance(NetSim_COORDINATES*
coordinate1,NetSim_COORDINATES* coordinates2);
• Stores the event details. Only one time memory is allocated. Most used variable
3 list.h -- Optimized list operation calls since NetSim uses lists extensively
• Add elments in list
4 IP_Addressing.h – For setting & getting IP address per the appropriate format
• Set Ip address of any node
o NETSIM_IPAddress
o isBroadcastIP(NETSIM_IPAddress ip);
o isMulticastIP(NETSIM_IPAddress ip);
For detailed help please refer the appropriate header (.h) files inside:
../NetSim_Standard/src/simulation/include or read through the doxygen source code
documentation available inside NetSim Help NetSim source code Help
• Include all the header (.h) files from the include folder
• NetworkStack.lib is a “import library” file and has the definitions for the functions
present in the NetworkStack.dll
• When developing new protocols users should create their own protocol.h and
declare all the protocol specific variables here. Stack & packet related variables
should be used from stack.h and packet.h
Every protocol should provide the following APIs as hooks to the network stack:
It is possible to configure the traffic sources in the simulation to generate traffic in a perfectly
regular pattern. However, this is typically not the case in the real world. For example, Node
back-off’s after collisions are random to resolve contention issues. The exact bit which is
errored, based on Bit error probability of a wireless channel, is decided randomly
NetSim uses an in-built Linear Congruential Random Number Generator (RNG) to generate
the randomness. The RNG uses two seeds values to initialize the RNG.
Having the same set of seed values ensures that for a particular network configuration the
same output results will be got, irrespective of the PC or the time at which the simulation is
run. This ensures repeatability of experimentation.
Modifying the seed value will lead to the generation of a different set of random numbers and
thereby lead to a different sequence of events in NetSim. When simulations are run for a
network configuration with different seed values, the results will likely be slightly different.
More advanced users get “Confidence” by analyzing a set of results with different seed
values for the same network scenario.
It is a simple mobility model based on random directions and speeds. In this mobility model,
a mobile node moves from its current location to a new location by randomly choosing a
direction and speed in which to travel. The new speed and direction are both chosen from
It includes pause time between changes in direction and/or speed. A mobile node begins by
staying in one location for a certain period of time (i.e., a pause time). Once this time
expires, the mobile node chooses a random destination in the simulation area and a speed
that is uniformly distributed between [minspeed, maxspeed]. The mobile node then travels
toward the newly chosen destination at the selected speed. Upon arrival, the mobile node
pauses for a specified time period before starting the process again.
It is a model which describes the behavior of mobile nodes as they move together. i.e. the
sensors having common group id will move together.
In File Based Mobility, users can write their own custom mobility models and define the
movement of the mobile users. The name of the trace file generated should be kept as
mobility.txt and it should be in the NetSim Mobility File format.
The user can also generate the mobility files using external tools like SUMO (Simulation of
Urban MObility), Vanet MobiSim etc.
Step 1: Create a text file inside <NetSim Installation Directory>\bin and rename it as
“mobility.txt”
Step 2: Open the text file and write the code in format shown below
# User needs to specify the total number of Nodes and Environment size as shown below
#First specify the location of all the devices as per their X, Y and Z Axis
#Specify the new location of the specific device at the specific time
Step 3: In NetSim, go to MANET and create a Network scenario. Click on Node properties
and in Global properties, set the Mobility Model as “File Based Mobility” and simulate.
A sample file based mobility experiment is present at <NetSim Installed Directory> \Docs\
Sample_Configuration\ MANET.
A sample mobility.txt file for a MANET network containing 2 nodes is shown below
In this example we will replace the default Rayleigh Fading (part of the path loss
calculation) used in NetSim, with a Fading Power calculated using the Rician
Distribution from MATLAB
Procedure:
/*
*
* This is a simple program that illustrates how to call the MATLAB
* Engine functions from NetSim C Code.
*
*/
#include<windows.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include"engine.h"
#include"mat.h"
#include"mex.h"
char buf[100];
Engine *ep;
int status;
mxArray *h = NULL, *i = NULL, *j = NULL, *k = NULL;
mxArray *out;
double *result;
double fn_netsim_matlab_init()
{
/*
* Start the MATLAB engine
*/
fprintf(stderr, "\nPress any key to Initialize MATLAB\n");
_getch();
if (!(ep = engOpen(NULL))) {
MessageBox((HWND)NULL, (LPCWSTR)"Can't start MATLAB engine",
(LPCWSTR) "MATLAB_Interface.c", MB_OK);
exit(-1);
}
engEvalString(ep, "desktop");
return 0;
}
return *result;
}
double fn_netsim_matlab_finish()
{
fprintf(stderr, "\nPress any key to close MATLAB\n");
_getch();
status = engEvalString(ep, "exit");
return 0;
}
8) In the Solution Explorer double click on the IEEE802_11.h file. Add definitions
of the following functions
double fn_netsim_matlab_init();
double fn_netsim_matlab_run();
double fn_netsim_matlab_finish();
dFadingPower = propagation_calculate_fadingloss(propagationHandle,
packet->nTransmitterId,ifid,pstruEventDetails->nDeviceId,
pstruEventDetails->nInterfaceId);
dFadingPower = fn_netsim_matlab_run();
11) To compile a MATLAB engine application in the Microsoft Visual Studio 15.0
(2015) environment, Right click on the IEEE802_11 project and select PROPERTIES
in the solution explorer. Once this window has opened, make the following changes:
b) Under Linker General, add the directory to the field ADDITIONAL LIBRARY
DIRECTORIES:
<Path where MATLAB is installed>\extern\lib\win32\microsoft
12) Under Linker Input, add the following names to the field marked
ADDITIONAL DEPENDENCIES: libeng.lib;libmx.lib;libmat.lib;
NOTE: To do step 14, check the Windows system path by clicking on Start Right
click on Computer Properties Advanced System Settings Environment
variables System Variables Open "Path" for editing.
Note: If the machine has more than one MATLAB installed, the directory for the target
platform must be ahead of any other MATLAB directory (for instance, when compiling a
32-bit application, the directory in the MATLAB 32-bit installation must be the first one
on the PATH). To run 64-bit NetSim, users has to change the above mentioned matlab
paths to 64-bit matlab paths
15) Now replace the newly built libIEEE802.11.dll from the DLL folder, into the
NetSim bin folder. Please ensure you rename the original libIEEE802.11.dll file to
retain a copy of the original file. [For more information, follow steps provided in
“Writing your own code: Linking Dlls” under “Custom Code in NetSim” chapter]
16) Run NetSim in Administrative mode. Create a Network scenario involving
IEEE802_11 say MANET, right click on the environment and select properties. Make
sure that the Channel Characteristics is set to PathLoss and Fading and Shadowing.
!matlab -regserver
8. Now when debugging (say, by pressing F5 each time) you will find the
computation taking place in the MATLAB Workspace.
12. Now when debugging (say by pressing F5 each time) you will find that the
watch window displays the value of dFadingPower whenever the control reaches the
recently set breakpoint. You will also find that the value of dFadingPower in the
Visual Studio Watch window and the value of i in the MATLAB workspace window
are similar.
Procedure:
double fn_netsim_matlab_run()
{
//write your own implementation here
int rician_noncentrality = 1, rician_scale = 2;
engPutVariable(ep, "h", h);
sprintf(buf, "k=rician_distribution(%d,%d)", rician_noncentrality, rician_scale);
status = engEvalString(ep, buf);
out = engGetVariable(ep, "k");
result = mxGetPr(out);
return *result;
}
4. Follow steps 2 to 14 as explained in the section “Implement Rician Distribution
of MATLAB in NetSim without using .m file” above.
function WLAN=NETSIM_MATLAB(choice,varargin)
switch(choice)
case'rician'
h=ProbDistUnivParam('rician',[varargin{1},varargin{2}]);
i=random(h,1);
fid = fopen('plotvalues.txt','a+');
fprintf(fid,'%f',i);
fprintf(fid,'\r\n');
fclose('all');
WLAN=i;
case'plothistogram'
fid=fopen('plotvalues.txt');
mx=fscanf(fid,'%f');
hist(mx);
fclose('all');
if (strcmp(arr, "rician") == 0)
{
engPutVariable(ep, "h", h);
sprintf(buf, "h=NETSIM_MATLAB('rician',%d,%d)", rician_noncentrality,
rician_scale);
status = engEvalString(ep, buf);
out = engGetVariable(ep, "h");
result = mxGetPr(out);
return *result;
}
else if (strcmp(arr, "plothistogram") == 0)
{
status = engEvalString(ep, "NETSIM_MATLAB('plothistogram')");
return 0;
}
else
return 0;
11. The graph and the MATLAB windows gets closed once you press any key.
You can also debug the code to understand the communication between NetSim and
MATLAB as explained in the DEBUGGING section above.
For illustration, an example regarding Wireless Sensor Network is provided. In this example,
users will print Sensor Node Name, Residual Energy, State (On/Off) and turn–off time in the
performance metrics
#include "string.h"
double NetSim_Residual_Energy[100];
string NetSim_Node_name[100];
double NetSim_Off_Time[100];
string NetSim_Node_state[100];
STEP 2:
Copy the below code (in red colour) in 802_15_4.c file (inside fn_NetSim_Zigbee_Metrics()
function)
//CUSTOM METRICS
int i;
add_node_to_menu(menu, table);
delete_metrics_node(menu);
//CUSTOM METRICS
return fn_NetSim_Zigbee_Metrics_F(metricsWriter);
STEP 3:
Copy the below code (in red colour) at the end of ChangeRadioState.c file (inside
IF(nStatus) loop)
if(nStatus)
WSN_PHY(nDeviceId)->nOldState = nOldState;
WSN_PHY(nDeviceId)->nRadioState = nNewState;
return nStatus;
else
WSN_PHY(nDeviceId)->nRadioState = RX_OFF;
WSN_MAC(nDeviceId)->nNodeStatus = OFF;
NetSim_Off_Time[nDeviceId-1] = ldEventTime;
NetSim_Node_state[nDeviceId-1]= "OFF";
NetSim_Node_name[nDeviceId-1]= NETWORK->ppstruDeviceList[nDeviceId-1]-
>szDeviceName;
return nStatus;
STEP 4:
Build DLL with the modified code and run a Wireless Sensor Network scenario. After
Simulation, user will notice a new Performance metrics named “Custom WSN Metrics” is
added.
9.1 Introduction
A network simulator mimics the behavior of networks but cannot connect to real networks.
NetSim Emulator enables users to connect NetSim simulator to real hardware and interact
with live applications.
A real PC (running NetSim Emulation Client) sends live traffic to the PC (running NetSim
Emulation Server). Whenever a packet arrives at the interface of server, this packet is
“modulated” into a simulation packet and sent from a source node (user selectable) in the
simulated network (user configurable) to a destination node (again user selectable). Upon
receipt of this packet at the destination, the packet is then “de-modulated” and sent back to a
real PC destination node (running NetSim Emulation Client).The real packet thus undergoes
network effects such as delay, loss, error etc. created virtually by NetSim Simulator.
• User has to configure the router settings of the real-world network so as to allow
the packets to be transmitted to the Emulation Server
For Example, if we consider a sample real world network scenario where the Emulation
clients and server are located in different subnets
• Routing table of router C needs to be configured such that any packet having
Source Address as IP Address of Node 6(Client Source) and Destination Address
as IP Address of Node 8(Client Destination) must be routed to Emulation Server.
NetSim configuration will the ensure that the packet is re-injected with destination
set to the appropriate IP Address (set in the application properties)
9.2.2 Setting up the Client systems (Real Source and Destination system)
• Open command prompt in administrative mode.
• Type command,
then press Enter key. You will get “OK”. For example if your IP address is 192.168.0.4 and
the subnet mask is 255.255.255.0 then the network address is 192.168.0.0 (Got by
performing a bitwise AND of the IP Address and the subnet mask)
• Type command
route add <Network Address>mask 255.255.255.0 <IP Address where NetSim Emulation
server is running> metric 1
here the subnet mask is taken as 255.255.255.0). After execution, you will get “OK”.
• Type command
netstat –r
Note that in the above screenshot, for the network 192.168.0.0, the gateway address assigned is
192.168.0.87(Address of the system where NetSim Emulation Server is running).
9.2.3 Setting up the Linux Client Systems (Real Source and Destination
systems)
Note: Following Screenshots are relevant to RHEL 7. Equivalent settings has to be done in case of other
Linux Variants.
In the IPV4 settings, set static IP Address to the machine and specify the Emulation Server
IP as the Gateway IP.
Type command
su
Type command
ip route
Type command
Eg:
Type command
ip route
net.ipv4.ip_forward=1
a. IP_DYNIP=”no”
b. IP_TCP_SYNCOOKIES=”yes”
c. IP_FORWARD=”yes”
6 Follow step 3
A computer on which one or more virtual machines are running is defined as a Host
Machine. Each virtual machine is called a Guest Machine. In this scenario, we have 3 VMs
running in a Host Machine – VM1, VM2 and VM3. Users can run NetSim License server in
any system connected to the network in which Host Machine is running.
Now right click on each VM and select Settings. Click on Network Adapter, and select
“Bridged: Connected directly to the physical network”. Also enable the “Replicate
Physical network connection state”.
9.2.5.2 VMs sharing a network but insulated from the host network.
A computer on which one or more virtual machines are running is defined as a Host
Machine. Each virtual machine is called a Guest Machine. In this scenario, we have 3 VMs
running in a Host Machine – VM1, VM2 and VM3. NetSim License server is running in one of
these 3 VMs.
If user needs to create an internal network which is segregated from host network, follow the
steps
User can modify the Subnet IP and Subnet Mask to suit their own preference.
The disadvantage of this technique is that, if the license server must compulsorily run in the
VM for NetSim to obtain the licenses.
NetSim supports emulation of Multicast traffic with the help of Multicast client
applications running on the systems taking part in multicast. NetSim provides
support for both Windows and Linux machines to take part in multicast emulation.
Using Iperf:
iperf -s -u -B 224.0.67.67 -i 1
The options
-s specifies server
-u specifies UDP
The options
-u specifies UDP
7 Run simulation for 50 secs and observe the jitter values in the server.
8 You will find the variation in jitter values with and without running simulation in NetSim
9 And also change the speed, error rates and delay in the link properties and observe the
variation
10 If you wish to run more than 1 server, then setup another server by following the steps
explained above
NOTE: Users need to run simulation (emulation) and the jperf client simultaneously
1 Run NetSim in Administrative Mode and create a basic network Scenario in any stack
based protocol (Any network except Legacy Networks, Wireless Sensor Network,
Zigbee Network and Cellular Network) in NetSim. Screenshot of a sample scenario in
Internetworks is shown below
i. Go to Properties of Link1 and Link2 and set Uplink and Downlink Delay to 5000.
Click and drop the Application. Right click Application select Properties.
iii. Select Source and Destination ID according to the network scenario and change
the Source and Destination IP address according to the IP address of the real
system.
1 Before running simulation, start pinging the Destination from Source using command
“ping <Destination_IP> –t” and note down the time duration.
2 Follow steps as provided before in “Emulation Set-up: Setting up the NetSim Client”.
3 Perform the steps at Emulation Server as provided and simulate. During simulation,
ping the destination system. You will notice that the present time duration is higher than
the earlier ping results. This is because the network created in NetSim has link
propagation delay. Also Wireshark (if installed) will automatically start capturing the
packets as soon as Emulation Server starts simulation.
In PING (Two-way communication), almost all the steps are same as PING (One way
communication), except that in NetSim Emulation server there will be two application instead
of one. One Application will be directed from Source to Destination node, while the other
application will be directed from Destination to Source node.
The difference caused in the network behavior is that in the first case (PING -One way
communication), the PING reply packets were not routed via NetSim Emulator. But in the
second case (PING -Two way communication), the PING reply packets will be routed via
NetSim Emulator, thereby the total delay will be approximately 21millisecond.
1 Run NetSim in Administrative Mode and create a basic network Scenario in any stack
based protocol (Any network except Legacy Networks, Wireless Sensor Network,
Zigbee Network and Cellular Network) in NetSim. Screenshot of a sample scenario in
Internetworks is shown below
iii. Select Source and Destination ID according to the network scenario and change
the Source and Destination IP address according to the IP Address of the real
system and click accept.
iv. Provide the Simulation Time as how long you want the Emulation to be performed.
Make sure client system(s) are ready and then click Run Simulation.
During Simulation you will notice a change in the quality of the video being played in the
destination PC. This is because the network created in NetSim has errors / delays etc in the
links. The impact of this loss / jitter / delay etc in NetSim Emulator is seen on a real video
stream.
1. Follow steps as provided before in “Running Emulation via GUI Setting up the NetSim
Client”. Then open VLC Media player Click Media menu Select Stream Option.
2 . Click add button then select the video which you want to play
5 Click on Add Button. Then enter the Destination IP address in the Address field and
enter a stream name (user defined) and click next button.
7. Perform all the steps at Emulation Server and then click on Stream button. Also
Wireshark (if installed) will automatically start capturing the packets as soon as Emulation
Server starts simulation.
1 Follow steps as provided before in “Running Emulation via GUI–Setting up the NetSim
Client”. After performing all the steps at Source PC and NetSim Emulation Server, open
VLC Media Player Click on Toggle Playlist icon as shown in the below screenshot.
2 Double click on Network Stream (SAP) under local network. Then right click and play on
the stream name that appears on the screen.
2 Go to Edit User General Click Add in User Give Any Name (Ex: User1) and
Select Group what you given in Group Setting (In this case, we provide “Admin”) and
click ok.
4 Go to Shared folder Add Folder to share (EX: FTP_FILES from Desktop) Select
all the Files and Directories Permissions and set that folder as Home Directory by
selecting “Set as Home Dir”. Click Ok.
1 Follow steps as provided before in “Emulation Set-up: Setting up the NetSim Client”.
Run FileZilla Client software.
2 Enter the Host Name(Server System ip (EX: 192.168.0.133)) and Give the User,
Password that we created in Server side and give Port No = 21. Run Emulation server
and click Quick Connect. Drag and drop files from Local Site to Remote Site.
1 Run NetSim in Administrative Mode and create a basic network Scenario in any stack
based protocol (Any network except Legacy Networks) in NetSim. A sample scenario in
Internetworks is performed as shown with link speed set to 1 Mbps.
2 Click and drop the Application. Right click Application select Properties.
3 In the Application Type select Emulation.
4 Select Source and Destination ID according to the network scenario and change the
Source and Destination IP address according to the IP Address of the real system and
click accept.
Results:
1 Run NetSim in Administrative Mode and create a basic network Scenario in any stack
based protocol (Any network except Legacy Networks, Wireless Sensor Network,
Zigbee Network and Cellular Network) in NetSim. Screenshot of a sample scenario in
Internetworks is shown below.
2 Click and drop Application button. Right click Application select Properties. As it is
two way communication, add and create two applications.
3 In both the Application Type select Emulation.
4 In one Application, select Source ID and Destination ID according to the network
scenario and change the Source and Destination IP address according to the IP
Address of the real system. In the second application, set the opposite of first
application, i.e. Source ID and IP address will be exchanged with Destination ID and IP
address. (Refer the IP settings in the screen-shot to get a clear picture)
1 Follow steps as provided before in “Emulation Set-up: Setting up the NetSim Client”.
2 Run Skype and make a call to the destination system (Make sure that Skype is running in
Destination PC).
3 Wireshark (if installed) will automatically start capturing the packets as soon as Emulation
Server starts simulation.
1 Follow steps as provided before in “Emulation Set-up: Setting up the NetSim Client”.
After performing all the steps at Source PC and NetSim Emulation Server, open Skype.
2 Wireshark (if installed) will automatically start capturing the packets as soon as
Emulation Server starts simulation.
1 Run NetSim in Administrative Mode and create a basic network Scenario in any stack
based protocol (Any network except Legacy Networks, Wireless Sensor Network,
Zigbee Network and Cellular Network) in NetSim. Screenshot of a sample scenario in
Internetworks is shown below
5 Provide the Simulation Time as how long you want the Emulation to be performed.
Make sure client system(s) are ready and then click Run Simulation.
1.Follow steps as provided before in “Emulation Set-up: Setting up the NetSim Client”. Run
JPerf and select Client and set Server Address as 192.168.0.145. User can edit the
Application Layer options, Transport Layer options and IP Layer options depending on the
type of data they want to transmit in the network.
1 Follow steps as provided before in “Emulation Set-up: Setting up the NetSim Client”.
Run JPerf and select Server.
3 In System variables pane, select new and give EMULATOR_INPUT in the variable
name text box and give the path where pcap file is present in the variable value text box
(Ex: C:\Users\Sony\Desktop\CapturePacket.pcap) and then click on OK.
ii. Dispatched to Emulator (contains only the packets that are going through the
Network Emulator)
iii. Non Dispatched To Emulator (contains packets that are not going to the Network
Emulator)
iv. Reinject from Emulator (contains the packets that are coming out from the
Network Emulator)
10 Open Dispatch to Emulator packets, it contains only the packets whose source and
destination IP addresses match with the source and destination IP addresses that we
have configured
Note: The following explanation is provided assuming that you have performed all necessary
configuration required to divert network traffic via the system running NetSim Emulator. (This is
explained in section 9 of the User Manual.
The real application is mapped using the source and destination IP addresses that we set in
the Emulation Application.
Example 1:
SOURCE_REAL_IP = 192.168.0.151
SOURCE_PORT = 0
DESTINATION_REAL_IP = 192.168.0.202
DESTINATION_PORT = 0
Dispatches all packets with the source real IP 192.168.0.151 and destination real IP as
192.168.0.202, into the Simulator.
Example 2:
SOURCE_REAL_IP = 192.168.0.151
SOURCE_PORT = 0
DESTINATION_REAL_IP = 0.0.0.0
DESTINATION_PORT = 0
Dispatches all packets from source real IP 192.168.0.151 regardless of whatever is the
destination real IP, into the Simulator.
Example 3:
SOURCE_REAL_IP = 0.0.0.0
SOURCE_PORT = 0
DESTINATION_REAL_IP = 192.168.0.202
Example 4:
SOURCE_REAL_IP = 0.0.0.0
SOURCE_PORT = 0
DESTINATION_REAL_IP = 0.0.0.0
DESTINATION_PORT = 0
Dispatches all packets that are reaching the Emulator Device regardless of whatever is the
source or destination, into the Simulator.
Example 1:
SOURCE_REAL_IP = 192.168.0.151
SOURCE_PORT = 5004
DESTINATION_REAL_IP = 192.168.0.202
DESTINATION_PORT = 6245
Dispatches all packets with the source real IP 192.168.0.151, source Port No 5004,
destination real IP as 192.168.0.202 and destination Port No 6245 into the Simulator.
On running an Emulation Application Users can optionally obtain the following log files which
are WIRESHARK compatible .pcap files:
All_Network_Packets - Log of all network packets flowing via the system running NetSim
Emulator.
Pinging through NetSim emulator takes only one direction delay, if you have set only one
application with Ping Source IP and ping Destination IP. This is because PING is a two way
application and constitutes PING_REQUEST and PING_REPLY. For ping to take round trip
delay users must configure two Emulation Applications, one for forward PING_REQUEST
and other for the reverse PING_REPLY.
For Eg: If you are running a ping from the IP 192.168.0.151 to an IP 192.168.0.202 the
time take will normally be around 1ms.
Now we create a network scenario in NetSim similar to the screenshot shown below,
On running the simulation, you will observe the variation in the time taken to get the ping
reply in the source system, as shown below:
The additional delay experienced by ping packets is not 20ms because, the application that
we have configured applies to only the Ping Reuqest packets which has the Source IP as
192.168.0.151 and Destination IP as 192.168.0.202.
The Ping Reply Packets has the Source IP as 192.168.0.202 and Destination IP as
192.168.0.151, for which we have not configured any application.
For the ping to take the round trip delay, we will have to configure one more application for
the reverse traffic. On adding an application for the reverse traffic as shown below:
We will now be able to see round trip delay being experienced by the PING application, as
shown below:
Background traffic can be used to test the performance of applications when link bandwidth
is consumed by other traffic. It can also be used to induce jitter for testing real-time
applications.
The Background traffic in NetSim can be modelled as a Poisson process in which bursts of
data of a fixed sized are transmitted at an average rate such that the link will be occupied at
the specified link utilization rate. Because it is a random process, over short periods the
actual background traffic link utilization rate may vary from the configured value. The rate of
arrival of background traffic frames affects the jitter. Larger number of background packets
induce greater jitter in competing traffic.In NetSim, the way to increase the number of
background packets arriving is to reduce the inter-arrival time of that application, as
explained in the link https://tetcos.freshdesk.com/support/solutions/articles/14000067807-
how-do-i-introduce-jitter-in-netsim-simulations-emulations-
Note: While running NetSim via CLI, try to ensure that there are no errors in the
Configuration.netsim file. The file, ConfigLog.txt, written to the windows temp path would
show errors, if any, found by NetSim’s config parser.
Solution:If the folder name contains white space, then mention the folder path within double
quoteswhile specifying the folder name in the command prompt. For example, if app path
containswhite space, then the app path must be mentioned within double quotes in the
command prompt.
Simulation does not commence. “No license for product (-1)” is displayed in the command
prompt.
Example:
If ”No license for product(-1)” is displayed in the command prompt two times, then check in
the NetSim license server to know about the availability of license and adjust the number of
current users of NetSim, in order to get the license.
Reason: If the command/iopath provided by the user is first written in MS Word and then
copy pasted to Command prompt, some special characters(not visible in command prompt)
gets inserted and on execution, license config dll is not found.
Solution:Type the command manually or copy paste the command/iopath from notepad.
10.3 Configuration.NetSim
10.3.1 Invalid attribute in configuration file attributes:
Specific attributes in the Configuration file are highlighted with zigzag lines
Reason:If invalid input is given in the Configuration file, then the corresponding attribute is
highlighted as blue lines as shown in the figure given below.
Solution:To resolve this issue mouse over the corresponding attribute, in order to get the
tool tip that furnishes the details about the valid input for that attribute.
Note: If the schema file and the configuration file are not present in the same folder, the zigzag lines
won’t appear. So place the Configuration file and Schema File in the same location or change the path of
schema file in the configuration file.
Simulation does not commence and error is displayed at the command prompt. Also, red
lines appearing at the tag specifying the Layer in the Configuration file
Example: If the closing tag is not specified for the Data link Layer, then the zigzag lines
appear at the starting tags of Data link Layer and the Network Layer.
When NetSim is made to run through CLI, then the following error gets displayed in the
command prompt.
Solution: The bug can be fixed by setting the closing tag correctly in the Configuration file
Reason: This issue arises when the schema and the configuration file are not in the same
folder.
Simulation terminates and exhibits unpredictable behavior. An error message stating, “An
exe to run NetSim backend has stopped working” is thrown
Example:
This problem arises if there is any flaw in the Configuration.netsim or in the dll.
Solution:Check whether the desired scenario has been configured properly in the
Configuration.netsim.
While starting NetSim, error shows the monitor screen resolution is less than 1024 X 768.
Reason:This error will come if monitor resolution is less than 1024 and 768. For example,
1260 X 720 will also show this error
NetSim dongle is running in the server system. When running the NetSim in the Client
system showing “No License for product (-1)” error.
Possible Reasons
Solution
1 The installed firewall may block traffic at 5053 port used for licensing. So either the user
can stop the firewall, or may configure it to allow port 5053.
2 Contact the Network-in-charge and check if the Server system can be pinged from
client.
3 Check whether License Server is running in the Server system or not.
iii. NetSim protocol engine waits for the Pipes connection to be established.
10.5.4 Python
• SUMO_HOME Environment variable is checked. If Environment variable is not
present, Error is displayed as “key interrupt error” in SUMO_HOME.
• Python File waits for Pipes connection. (“waiting for pipes to connect”).
• It reads initial data as GUI enable/disable from backend.
• “Checking sumo” is printed. If the environment variable SUMO_HOME points to
wrong directory, error is displayed.
• Sumo Simulation is started where Sumo Binary is checked (To check Sumo.exe or
Sumo GUI are working in the system or not). Then a TCP connection is made
• A while loop runs – It follows the following procedure
iii. Compare with each vehicle present in Sumo. If vehicle is present –Then write
confirmation (pipes) and read its position from NetSim (2pipes for X and Y
coordinates). Also, sumo is stepped forward for every first vehicle In the list of
current vehicles in sumo.
1 User modified parameters will not reflect in newly dropped devices: After
dropping nodes on the environment, modification of protocols/ global properties (like
Physical Layer parameters, Data Link Layer parameters and others) in one node will
reflect in all other nodes. But after modification, if any new node is dropped, the
modifications will not be reflected in the newly dropped nodes. Solution: After
dropping new nodes, open the properties of any old wireless node and click accept.
2 Device properties does not revert to default values: User modifies the default
values in a parameter, which is exclusive to a specific protocol/codec, and then
changes the protocol/codec using the provided combo box. If the user reverts the
combo box value again to the old protocol/codec, then the modified parameter
values will be shown instead of the default ones.
3 Running Application between unconnected nodes:Users can create multiple
isolated networks in NetSim. But if an application is set having source as a node of
an isolated network and destination as a node of another isolated network, NetSim
may crash or display zero application throughput.
4 RIP Hop count:As per RIP routing protocol, the maximum number of hops/routers it
can work from one end to another is 16. But in NetSim, RIP protocol can work
across more than 16 routers.
5 Default gateway can’t be empty: When user manually provides a value in a blank
“Default Gateway” parameter in any device, then it cannot be made blank again,
which in turn may lead NetSim to crash.Solution: Users should not enter any value in
blank “default gateway” field in UI.
6 Packet size limit in TDMA (Military Radio):High packet sizes will lead to zero
throughputs.
7 Broadcast application with RTS threshold value less than 1480:If a Network
Scenario is created with Broadcast application and RTS threshold value is set less
than 1480, the simulation will crash.
9 Scenario crashes if link name field is left empty:If the link name is left empty,
then the simulation will crash.
11 Sensors at grid edge with high velocity for agents leads to crash: In WSN, if
sensors are placed at the edge of the grid environment and multiple agents are
configured with high velocity (> 50 m/s), then simulation may crash.
12 IP address issue with connection removal between switch and wired node:If
you remove connections between a Wired node to Switch and a Switch to Router,
and establish the link between Wired Node to Switch again, IP address of the Wired
node may be wrongly configured as to 300.300.300.1 which leads simulation to
crash.
13 Network layer ACK type will need to be reset in DTDMA: If an existing scenario is
opened in DTDMA and new nodes are dropped, parameters will be changed. Hence
users must take care to reset Link Layer Ack to Network Layer Ack.
15 Minstrel rate adapation algorithm leads to crash: 802.11 ac crashes, when Rate
adaptation algorithm is chosen asMinstrel.
16 NetSIm – SUMO interfacing for VANETs may not work in Win 7 SP1
18 In Map View print option is not printing the scenario:In NetSim, if we create a
scenario in Map view, after simulation click the print option in animation window. In
print, scenario is not available (only the metrics table are available in print).
In order to have a better understanding of NetSim, users can access YouTube channel of
Tetcos atwww.youtube.com/tetcosand check out the various videos available
14 NetSim FAQ/Knowledgebase