Internetworks
Internetworks
NetSim
Accelerate Network R & D
Internetworks
By
Ver 14.1
The information contained in this document represents the current view of TETCOS LLP on
the issues discussed as of the date of publication. Because TETCOS LLP must respond to
changing market conditions, it should not be interpreted to be a commitment on the part of
TETCOS LLP, and TETCOS LLP cannot guarantee the accuracy of any information presented
after the date of publication.
The publisher has taken care of the preparation of this document but makes no expressed or
implied warranty of any kind and assumes no responsibility for errors or omissions. No liability
is assumed for incidental or consequential damages in connection with or arising out of the
use of the information contained herein.
Copyright in the whole and every part of this manual belongs to TETCOS LLP and may not
be used, sold, transferred, copied or reproduced in whole or in part in any manner or in any
media to any person, without the prior written consent of TETCOS LLP. If you use this manual,
you do so at your own risk and on the understanding that TETCOS LLP shall not be liable for
any loss or damage of any kind.
TETCOS LLP may have patents, patent applications, trademarks, copyrights, or other
intellectual property rights covering subject matter in this document. Except as expressly
provided in any written license agreement from TETCOS LLP, the furnishing of this document
does not give you any license to these patents, trademarks, copyrights, or other intellectual
property. Unless otherwise noted, the example companies, organizations, products, domain
names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and
no association with any real company, organization, product, domain name, email address,
logo, person, place, or event is intended or should be inferred.
Rev 14.1 (V), Mar 2024, TETCOS LLP. All rights reserved.
Contact us at
TETCOS LLP
# 214, 39th A Cross, 7th Main, 5th Block Jayanagar,
Bangalore - 560 041, Karnataka, INDIA.
Phone: +91 80 26630624
E-Mail: sales@tetcos.com
Visit: www.tetcos.com
Table of Contents
1 Introduction .................................................................................................................. 6
1 Introduction
The Internetworks library in NetSim supports various protocols across all the layers of the
TCP/IP network stack. These include Ethernet, Address Resolution Protocol (ARP), Wireless
LAN – 802.11 a / b / g / n / ac / p and e (EDCA), Internet Protocol (IP), Transmission Control
Protocol (TCP), Virtual LAN (VLAN), User Datagram Protocol (UDP), and routing protocols
such as Routing Information Protocol (RIP), Open Shortest Path First (OSPF).
An internetwork is generally a collection of two or more networks (typically LANs and WLANs)
which are interconnected to form a larger network. All networks in an Internetwork have a
unique network address. Routers interconnect different networks.
Users can use the following devices to design Internetworks: wireless node, wired node,
switch, router, and access point (AP). Wired nodes (term for computers, servers etc.) connect
via wired link to switches or routers, and wireless nodes connect via wireless links to Access
Points (APs). Multiple links terminate at a switch/router, which enables connectivity between
them. Many switches/routers are present in an internetwork to connect all the end-nodes. The
end-nodes provide and consume useful information via applications like data, voice, video etc.
Figure 1-2: The Result dashboard and the Plots window shown in NetSim after completion of a
simulation.
2 Simulation GUI
Open NetSim and click New Simulation → Internetworks as shown Figure 2-1.
▪ Add a Wired Node or Wireless Node: In the toolbar, click the Node > Wired_Node icon
(or) Node >Wireless_Node icon, and place the device in the grid.
Note: Wireless nodes can be effortlessly connected using the auto-connect feature, ensuring that
users first drop the access point before adding the wireless node.
▪ Add a Router: In the toolbar, click on the Router icon and place the Router in the grid.
▪ Add a L2 Switch or L3 Switch: In the toolbar, click on Switch > L2_Switch icon (or) Switch
> L3_Switch icon and place the device in the grid.
▪ Add an Access Point: In the toolbar, click on the Access Point icon and place the Access
Point in the grid.
▪ Connect the devices by using Wired/Wireless Links present in the top ribbon/toolbar. Click
on the first device and then click on the second device. A link will get formed between the
two devices.
Note: Wireless devices get auto connected. While the wired devices needs physical
connection.
▪ Configure an application as follows:
ii. Select any application from the list and configure the traffic between source and
destination.
▪ Double-clicking on any device (Router, Access Point, L2 Switch, Wireless Node, Wired
Node, etc.) will open a right-side property panel, allowing users to set the parameters.
▪ In Wireless Interface, Physical Layer and Data Link Layer parameters are local but in
Physical layer, Standard parameter is global. To set the same parameter value in all
devices, ensure that you accordingly update the parameter values in all other devices
(Access_Point or Wireless_Node) manually as the parameter change does not propagate
to the other devices since it is local.
Double click on the link which will open a right-side property panel where users can set the
link properties. Note that when simulating Internetworks if the link propagation delay is set too
high then the applications may not see any throughput since it would take too long for OSPF
to converge, and furthermore, TCP may also timeout (since max RTO is 3s).
Figure 2-8: Packet Trace, Event Trace & Plots options on top ribbon.
3 Model Features
3.1 WLAN 802.11
NetSim implements the 802.11 MAC and the 802.11 PHY abstracted at a packet-level. We
start with the 3 types of nodes supported in 802.11 Wi-Fi.
▪ RTS/CTS/DATA/ACK transmissions.
▪ Packet queuing, aggregation, transmission, and retransmission.
▪ 802.11 EDCA.
802.11a, 802.11b, 802.11g, 802.11n, 802.11ac, 802.11e (EDCA) and 802.11p are the WLAN
standards available in NetSim. The operating frequencies and bandwidths are given in the
Table 3-1.
WLAN standard Frequency (GHz) Bandwidth (MHz)
802.11 a 5 20
802.11 b 2.4 20
802.11 g 2.4 20
802.11 n 2.4, 5 20, 40
802.11 ac 5 20, 40, 80, 160
Table 3-1: WLAN standards supported in NetSim
802.11 p and WAVE are described in the VANET Technology library documentation.
Channels 1 through 14 are used in 802.11b, while channels 1 through 13 are used in
802.11g/n.
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. The following are the
channel numbers of the non-overlapping channels for 802.11ac in NetSim:
▪ 20MHz: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136,
140, 144, 149, 153, 157, 161, 165, 169, 173, 177
▪ 40MHz: 36, 44, 52, 60,100, 108, 116, 124, 132, 140, 149, 157, 165, 173
▪ 80MHz: 36, 52, 100, 116, 132, 149, 165
▪ 160MHz: 36, 100, 149
40 Up to 600
20 Up to 346.8
40 Up to 800
ac 5 8
80 Up to 1733.2
160 Up to 3466.8
Table 3-5: WLAN PHY Rates in NetSim
Sub Std. a g p
Bandwidth 20MHz 20MHz 5MHz 10MHz 20MHz
SIFS 16 16 64 32 16
Slot Time 9 9 21 13 9
CW Min 15 15 15 15 15
CW Max 1023 1023 1023 1023 1023
Table 3-7: OFDM PHY characteristics (IEEE-Std-802.11-2020 -Page no -2846)
Sub Std. n
Frequency Band 2.4MHz 5
SIFS 10 16
Slot Time 20 9
CW Min 15 15
CW Max 1023 1023
Table 3-8: HT PHY characteristics (IEEE-Std-802.11-2020 -Page no -2951) and MIMO PHY
characteristics (IEEE-Std-802.11n-2009 -Page no -335)
NetSim is a packet level simulator for simulating the performance of end-to-end applications
over various packet transport technologies. NetSim can scale to simulating networks with 100s
of end-systems, routers, switches, etc. NetSim provides estimates of the statistics of
In order to achieve scalable, network simulation, that can execute in reasonable time on
desktop level computers, in all networking technologies the details of the physical layer
techniques have been abstracted up to the point that bit-error probabilities can be obtained
from which packet error probabilities are obtained.
NetSim does not implement any of the digital communication functionalities of the PHY layer.
For the purpose of PHY layer simulation, the particular modulation and coding scheme, along
with the transmit power, path loss, noise, and interference, yields the bit rate and the bit error
rate by using well-known formulas or tables for the particular PHY layer being used. User
would need to use a PHY Layer/RF/Link Level simulator for simulating various digital
communication and link level functionalities. Typically, these simulators will simulate just one
transmitter-receiver pair, rather than a network.
Generally, in NetSim, the PHY layer parameters available for the user to modify are Channel
Bandwidth, Channel Centre Frequency, Transmit-power, Receiver-sensitivity, Antenna-gains,
and the Modulation-and-Coding-Scheme. When simulating standard protocols, these
parameters can only be chosen from a standard-defined set. NetSim also has standard
models for radio pathloss; the parameters of these pathloss models can also be set.
The PHY radio states implemented in NetSim 802.11 are RX_ON_IDLE, RX_ON_BUSY,
TRX_ON_BUSY.
Packets arriving from the NETWORK Layer gets queued up in an access buffer from which
they are sorted according to their priority per 802.11 EDCA. An event MAC_OUT with
SubEvent CS (Carrier Sense – CSMA) is added to check if the medium is free
Figure 3-1: Packets transmission form Network layer to Mac Layer and how queued up in an access
buffer.
During CS, if the medium is free, then the NAV is checked. This occurs if the 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 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 frames 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.
Figure 3-3: Event and SubEvent in Mac layer and Phy layer
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.
Errored packet. However, if the PHY header (the first packet) is errored or collided, the entire
A-MPDU is resent.
At the receiver, the device de-aggregates the frame 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
frames 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 frames are aggregated to be sent.
MAC layer improvements include only the increment of number of aggregated frames from 1
to 64. The MCS index for different modulation and coding rates are as follows:
MCS index Modulation Code Rate
0 BPSK 1/2
1 QPSK 1/2
2 QPSK 3/4
3 16QAM 1/2
4 16QAM 3/4
5 64QAM 2/3
6 64QAM 3/4
7 64QAM 5/6
8 256QAM 3/4
9 256QAM 5/6
Table 3-11: Different Modulation schemes and Code Rates
Receiver sensitivity for different modulation schemes in 802.11ac (for a 20MHz Channel
bandwidth) are as follows.
The Rx-sensitivity is then set per the above table in conjunction with Max Packet Error Rate
(PER) as defined in the standard.
If users wish to apply just the Rx-sensitivity (also termed as rate dependent input level), then
the calculate_rxpower_by_per() function call in the function
With the knowledge of MCS index and bandwidth of the channel data rate is set in the following
manner
• Get the number subcarriers that are usable for the given bandwidth of the medium.
• Get the Number of Bits per Sub Carrier (NBPSC) from selected MCS
• Number of Coded Bits Per Symbol (NCBPS) = NBPSC*Number of Subcarriers
• Number of Data Bits Per Symbol (NDBPS) = NCBPS*Coding Rate
• Physical level Data Rate = NDBPS/Symbol Time (4micro sec for long GI and 3.6 micro
sec for short GI).
NetSim supports A-MPDU aggregation and does not support A-MSDU aggregation. MAC
Aggregation is independent of MCS (PHY Rate) or BER. It is the PHY Rate that adapts to
BER via Rate Adaptation algorithms.
In the aggregation scheme shown in Figure 3-5, several MPDU’s (MAC Protocol Data Units)
are aggregated into a single A-MPDU (Aggregated MPDU). The A-MPDUs are created before
transfer to the PHY. The MAC does not wait for MPDUs to aggregate. It aggregates the frames
already queued to form an A-MPDU. The maximum size of an A-MPDU is 46,92,480 bytes.
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 up to 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.
• NetSim uses the parameter, Number of frames to aggregate, while the standard uses the
parameter A-MPDU Length Exponent. Per standard the A-MPDU length in defned by two
parameters: Max AMPDU length exponent and BLOCK ACK Bitmap. The AMPDU length
in bytes is 2(13+𝑀𝑎𝑥𝑖𝑚𝑢𝑚𝐴𝑀𝑃𝐷𝑈𝐿𝑒𝑛𝑔𝑡ℎ𝐸𝑥𝑝𝑜𝑛𝑒𝑛𝑡) − 1 .
• Since NetSim doesn't model A-MSDU, a design decision was made to model A-MPDU
based on Block ACK bitmap size (to indicate the received status of up to 64 frames) and
therefore the parameter - Number of frames to aggregate - in the GUI
• When EDCA is enabled, packet aggregation is done separately for each QoS class
• NetSim ignores the padding bytes added to the MPDU
• The MAC aggregates packets destined to the same receiver, irrespective of the end
destination. Receiver is to be understood as the next hop in a wireless transmission.
• RTS threshold is compared against the total A-MPDU size.
• Aggregation functionality may be incorrectly executed if
At each receiver, in the beginning when the first packet is transmitted and every time the
transmitter or receiver moves, NetSim calculates the received signal level from transmitter.
The received signal level would be equal to transmit power less propagation losses. Next,
NetSim calculates the interference received (at the same receiver), from all the interfering
transmissions. Only co-channel interference is accounted, and adjacent channel interference
is not calculated. Finally, NetSim takes the ratio of the signal level, to the sum of the total
interference from other transmissions plus the thermal noise. This ratio is SINR.
Once the SINR is calculated the BER is got from the SINR-BER tables for the applicable
modulation scheme. This BER is then converted to Packet-Error-Rate. Packet error (Yes/No)
is determined by drawing a random number in (0, 1) and comparing against PER1.
1
In other words, the instantaneous PER is used in a Bernoulli trial to decide whether the current packet is
successfully received or not
* Propagation model covers path loss, fading and shadowing. The models are documented
in a separate document named Propagation-Models.pdf.
** Interference noise due to other transmissions within the network
• BER by Table: Packet Error Probability (PEP) is derived from SINR-MCS (Signal-to-
Interference-plus-Noise Ratio - Modulation and Coding Scheme) lookup tables, as
referenced in the Cisco document available at
https://community.cisco.com/legacyfs/online/attachments/discussion/revolution-wi-fi-
mcs-to-snr-single-page.pdf. They map specific SINR values to Bit Error Rates (BER),
which are then used to calculate the probability of packet errors. These tables are
implemented in the SINR-BER.c file, which is part of the medium project. Users can edit
these table entries to tailor the simulation to specific needs or scenarios.
• BER by formula: The Bit Error Rate (BER) is derived from SINR-BER formulas outlined
in section 6 of the NetSim manual propagation-model.pdf. The packet error probability
(PEP) is calculated from the BER by considering the packet length.
The user can set a fixed transmit power via the GUI. Transmit power is a local variable; each
STA and AP can be set to have different transmit powers. The transmit power can be
dynamically varied by modifying the underlying 802.11 source C code.
Transmit power less propagation losses is the received power. The propagation loss is the
sum (in dB scale) of pathloss, shadowing loss and fading loss. Various propagation models
are available and are detailed in the Propagation model manual. Pathloss, Fading, and
Shadowing can be turned on/off in GUI.
If 𝑅𝑒𝑐𝑒𝑖𝑣𝑒𝑑 − 𝑃𝑜𝑤𝑒𝑟 > 𝑅𝑒𝑐𝑖𝑣𝑒𝑟 − 𝑆𝑒𝑛𝑠𝑖𝑡𝑖𝑣𝑖𝑡𝑦 (𝐿𝑜𝑤𝑒𝑠𝑡𝑀𝐶𝑆) then MCS is set depending on the
Received power and signal is decoded. Packet error is decided by looking up the SINR-BER
table for the given MCS.
These variables can also be dynamically by modifying the underlying 802.11 source C code.
• Transmission Range: The transmission range is the range within which the receiver of
a signal can decode the source’s transmission correctly (when no other transmitting
node’s signal interferes). This is typically smaller than the carrier-sensing range of the
transmitter.
• Carrier Sense Range: The carrier-sense range is the range within which the transmitter’s
signal exceeds the Carrier Sense Threshold of the receiver (or another transmitter). The
receiver (or another transmitter) detects the medium to be busy and does not transmit at
this time.
• Interference Range: The interference range (defined by the receiver) is the range within
which any signal transmitted by other sources interfere with the transmission of the
intended source, thereby causing a loss (marked as a collision in NetSim) at the receiver.
These three ranges are affected by the power of the transmitter. The greater the transmission
power, the further a node can receive the transmission, and also the more nodes whose
communication with other nodes will be affected by this transmission. The transmission range
is also affected by the MCS used by the transmitter. The higher the MCS the shorter the range,
and vice versa
In NetSim (from v13.2 onwards) the Carrier sense (CS) threshold is set equal to Control rate
receive sensitivity.
𝐶𝑆𝑇ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑 = 𝑅𝑒𝑐𝑖𝑒𝑣𝑒𝑟𝑆𝑒𝑛𝑠𝑖𝑡𝑖𝑣𝑖𝑡𝑦(𝐶𝑜𝑛𝑡𝑟𝑜𝑙𝑅𝑎𝑡𝑒)
Users can modify the CS threshold using the variable CSRANGEDIFF which is set to 0 dB in
code by default. This implies a 0 dB differential between the lowest MCS (Control rate)
Receive sensitivity (which determines DecodeRange) and CS Threshold (which determines
CarrierSenseRange). The value of CSRANGEDIFF can be modified by the user in NetSim
Standard or Pro versions, which ship with source code. We believe the term EDThreshold
used in literature is the same as CSThreshold.
If the interference signal power (sum of the Received-power from all other transmitters),
measured at the transmitter, is greater than ED-Threshold, then the transmitter assumes the
medium is busy. Carrier is sensed by the transmitter; all CS activity occurs at the transmitter,
and not at the receiver
If the rate adaptation algorithm is turned off, then the transmitter chooses MCS by comparing
the RSS (calculated per the equation below) against the Receiver-Sensitivity for different MCS
(per the tables in the standards). The highest possible MCS is then chosen. This means the
MCS is not fixed but adapts to the received signal strength, even with rate adaption turned off
in the MAC layer.
NetSim exploits the AP-STA and the STA-AP channel reciprocity. Therefore, Pathloss plus
Shadow loss is identical in both directions.
Note that when computing BER (from SINR) fading loss is added to this RSSI value. Thus,
fading loss is not accounted when choosing MCS, but is accounted when computing BER.
NetSim has rate adaptation algorithms which take care of selecting the right MCS for a given
SINR. In the simplest algorithm for every 20 successful transmissions the rate (MCS) goes up
1 step, and for every 3 continuous failures, the rate goes down one step.
Consider N1 and N3 transmitting to N2 whereby N1 and N3 are beyond Carrier sense (CS)
range. N1 is said to be hidden from N3 and vice versa.
When N1 and N3 transmit, there are “likely” to be collisions at N2. However, collisions do not
occur all the time. The CSMA/CA algorithm exponentially increases the backoff and hence
after a few collisions it is possible that one of the nodes gets a low back-off number while the
other draws a very high back-off number. Thus, the node with low back-off can complete
transmissions (of one and even more than one packet) while the other node (with the large
backoff) is still in backoff.
When N1 transmits to N2, N3 can’t hear the transmission since N3 is beyond CS. Therefore,
N3 can attempt if its backoff counts down to 0. However, when N2 sends back the WLAN-
ACK, N3 will hear it since N3 is within range of N2. Therefore, in NetSim, N3 will sense the
medium as busy and freeze its back off when N2 is sending the WLAN ACK to N1.
In case of N2 to N1/N3 transmissions, then the reverse is true for the MAC-ACK from the
nodes. When N2 sends a packet to N1 (or N3) it is within range of N3 (or N1), however, when
N1 (or N3) sends back the MAC ACK there is a chance of collision with a data packet of N3
(or N1).
Quality of Service (QoS) provides you with the ability to specify parameters on multiple queues
for increased throughput and better performance of differentiated wireless traffic like Voice-
over-IP (VoIP), other types of audio, video, and streaming media, as well as traditional IP data
over the Access Point.
QoS was introduced in 802.11e and is achieved using enhanced distributed channel access
functions (EDCAFs). EDCA provides differentiated priorities to transmitted traffic, using four
different access categories (ACs). With EDCA, high-priority traffic has a higher chance of
being sent than low-priority traffic: a station with high priority traffic waits a little less before it
sends its packet, on average, than a station with low priority traffic. This differentiation is
achieved through varying the channel contention parameters i.e., the amount of time a station
would sense the channel to be idle, and the length of the contention window for a backoff.
In addition, EDCA provides contention-free access to the channel for a period called a
Transmit Opportunity (TXOP). A TXOP is a bounded time interval during which a station can
send as many frames as possible (as long as the duration of the transmissions does not extend
beyond the maximum duration of the TXOP). If a frame is too large to be transmitted in a single
TXOP, it should be fragmented into smaller frames. The use of TXOPs reduces the problem
of low rate stations gaining an inordinate amount of channel time in the legacy 802.11 DCF
MAC. A TXOP time interval of 0 means it is limited to a single MPDU.
NetSim categorizes application packets based on QoS class set in application properties as
follows
The following tables shows the default EDCA parameters. This default parameter set is per
page 899, IEEE Std 802.11-2016
Max Max
Access CWm CWma AIFS Access CWm CWma
TXOP AIFSN TXOP
Category in x N Category in x
(𝝁𝒔) (𝝁𝒔)
Background Background
31 1023 7 3264 15 1023 7 2528
(AC_BK) (AC_BK)
Best Effort Best Effort
31 1023 3 3264 15 1023 3 2528
(AC_BE) (AC_BE)
Video Video
15 31 2 6016 7 15 2 4096
(AC_VI) (AC_VI)
Voice Voice
7 15 2 3264 3 7 2 2080
(AC_VO) (AC_VO)
Table 3-14: Default EDCA access parameters Table 3-15: Default EDCA access parameters
for 802.11 b for both AP and STA for 802.11 a / g / n / ac for both AP and STA
NOTE: The EDCA parameters can be configured by changing the Physical type parameter according to the
different standard, IEEE802.11b (Medium Access Protocol → DSSS), IEEE802.11n (Medium Access
Protocol → HT), IEEE802.11ac (Medium Access Protocol → VHT), IEEE802.11a and g (Medium Access
Protocol → OFDMA and OCBA →FALSE), IEEE802.11p (Medium Access Protocol → OFDMA and OCBA
→TRUE).
1. FALSE: This is similar to Receiver Based Auto Rate (RBAR) algorithm. In this, the PHY
rate gets set based on the target PEP (packet error probability) for a given packet size, as
given in the standard. The adaptation is termed as “FALSE” since the rate is pre-
determined as per standard and there is no subsequent “adaptation”.
2. GENERIC: This is similar to the Auto Rate Fall Back (ARF) algorithm. In this algorithm:
If users, wish to set the PHY rate (MCS) by comparing the received signal strength against
the Receiver minimum input sensitivity tables provided in the standards, they should comment
the following line (line #38) in IEEE802_11.h, and rebuild the code
//#define _RECALCULATE_RX_SENSITIVITY_BASED_ON_PEP_
NetSim then chooses the rate at the beginning of the simulation and the rate doesn’t
subsequently adapt. The receiver minimum input sensitivity levels are provided in the files
• 802.11b: IEEE802_11_DSSSPhy.c
• 802.11a, 802.11g and 802.11p: IEEE802.11_OFDMPhy.c
• 802.11n and 802.11ac: IEEE802_11_HTPhy.c
Selecting the different rate adaptation options would have no impact when running this
modified code.
1. Mobility of Wireless nodes is not available in infrastructure mode (when connected via an
Access Point) and is only available in Adhoc mode. Hence mobility for wireless nodes can
only be set when running MANET simulations.
The WLAN parameters can be accessed by right clicking on a Access Point or Wireless Node
and selecting Interface Wireless Properties ->Datalink and Physical Layers
IEEE802.11 performance metrics will be displayed in the results dashboard if the network
scenario simulated consisted of at least one device with WLAN protocol enabled.
Parameter Description
Device Id It represents the Id’s of the wireless devices which supports 802.11 (WLAN)
NetSim IEEE802_11 Radio measurements csv log file records pathloss, shadowing loss,
fading loss, transmitted power, received power, SNR, Interference Power, SINR, BER, NSS,
MCS. This log file can be enabled in NetSim GUI by clicking on Plots tab > Network Logs >
IEEE 802.11 Radio Measurements Log on the right panel as shown below.
• Time in Milliseconds
• Transmitter Name
• Receiver Name
• Distance between the Transmitter and the Receiver in meters
• Packet ID
• Packet Type
• Control Packet Type
• Transmitter Power in dBm
• Total Loss in dB
• Pathloss in dB
• Shadowing Loss in dB
• Fading Loss in dB
• Received Power in dBm
• Interference in dBm
• Tx Antenna Gain(dB)
• Rx Antenna Gain(dB)
• SNR in dB
• SINR in dB
• BER
• NSS
• MCS
The log file can be accessed from the Simulations Results Window under the Logs option in
the left pane.
• The log is written during each packet received at the physical layer (PHY_IN). Hence the
number of entries will be based on the number of packets received, by all nodes or specific
nodes based on values present in the DEVICE_ID_LIST array.
• MCS column displays the MCS index from the Phy parameters table in case of
IEEE802.11 n and ac. However, it displays the index value from the Phy parameters table
as nIndex-1 in case of DSSS based standards such as b and OFDM based standards
such as a, g and p.
• The NSS value is currently set to the minimum of transmit and receive antenna counts in
the same device. For example, if Transmitting Antennas is set to 2 and receiving Antennas
is set to 8 then NSS is set to 2.
NetSim 802.11 Backoff log file records details such as the Device name, Time stamp, Packet
ID, BackoffTime, contention Window size and Retry Limit. This log can be used to understand
the medium access mechanism in IEEE 802.11 Protocols.
This log file can be enabled in NetSim GUI by clicking on Plots tab > Network Logs > IEEE
802.11 Backoff Log on the right panel as shown below.
• Device Name
• Timestamp
• Packet ID
• BackOffTime
• Contention Window Size
• Retry Limit
The log file can be accessed from the Simulations Results Window under the Logs option in
the left pane.
1. When a frame is received, the switch compares the SOURCE MAC address to the MAC
address table. If the SOURCE is unknown, the switch adds it to the table along with the
port number the packet was received on. In this way, the switch learns the MAC address
and port of every transmitting device.
2. The switch then compares the DESTINATION MAC address with the table. If there is an
entry, the switch forwards the frame out the associated port. If there is no entry, the switch
sends the packet out all its ports, except the port that the frame was received on This is
termed as Flooding.
3. It does not learn the destination MAC until it receives a frame from that device
NetSim ethernet switches implement Spanning tree protocol to build a loop-free logical
topology. This is always enabled and cannot be disabled.
▪ Blocking: A port that would cause a switching loop if it were active. No user data is sent or
received over a blocking port.
▪ Listening: The switch processes BPDUs and awaits possible new information that would
cause it to return to the blocking state. It does not populate the MAC address table and it
does not forward frames.
▪ Learning: While the port does not yet forward frames, it does learn source addresses from
frames received and adds them to the filtering database (switching database). It populates
the MAC address table but does not forward frames.
▪ Forwarding: A port receiving and sending data in Ethernet frames, normal operation.
It is recommended that the application start time is set to a value that is greater than the time
it takes for the spanning tree protocol to complete (of the order of a 100s of milliseconds).
1. The spanning protocol is only run at the beginning of simulation. If a link fails, the spanning
protocol is not re-run.
2. If applications are started prior to completion of spanning tree protocol, then the MAC table
created is not updated per the spanning tree protocol.
3. Jumbo Frames are not supported in NetSim Ethernet Protocol
Switch properties can be set by right clicking switch > Properties > Interface_1(ETHERNET).
4. Routing table
5. Shortest path tree
6. The Interface data structure features
▪ Interface list
▪ Area list
▪ Max age removal timer
▪ SPF timer
▪ Routing table
▪ Hello log
▪ SPF log
▪ Common log
▪ Debug logs – LSDB, RXList, RLSA, RCVLSU, LSULIST, Route
The following features in OSPF have not been implemented - Multiple Areas, Network LSA,
Router summary LSA, Network summary LSA, Authentication, Equal cost multipath, External
AS, External routing information, Interface type – Broadcast, NBMA, Virtual, Point to multi-
point
OSPF properties can be set by right clicking on Router > Properties > Application layer see
Figure 3-16.
*Global – Changes in all devices of similar type. Local – Only changes in current device
The TCP fits into a layered protocol architecture just above a basic Internet Protocol which
provides a way for the TCP to send and receive variable-length segments of information
enclosed in IP packets. The IP packet provides a means for addressing source and
destination TCPs in different networks. The IP protocol also deals with any fragmentation or
reassembly of the TCP segments required to achieve transport and delivery through multiple
networks and interconnecting gateways.
Application
TCP
IP
MAC
PHY
Table 3-21: Protocol Layering
1. Old Tahoe
2. Tahoe
3. Reno
4. New Reno
5. BIC
6. CUBIC
The TCP parameters can be accessed by right clicking on a node and selecting Properties >
Transport Layer.
TCP Metrics table will be available in the Simulation Results dashboard if TCP is enabled in
at least one device in the network. It provides the following information specific to TCP.
Parameter Description
It displays the name with ID of the source device which generates TCP
Source
packets
It displays the name with ID of the destination device which receives TCP
Destination
packets
It displays the local IP address with port number of the device present in
Local Address
source column
It represents the remote IP address with port number for the source and
Remote Address
destination
Syn Sent It is the number of syn packets sent by the source
Syn-Ack Sent It is the number of syn ack packets sent by the destination
Segment Sent It is the number of segments sent by a source
Segment Received It is the number of segments received by a destination
Segment
It is the number of segments retransmitted by the source
Retransmitted
It is the number of acknowledgements sent by a source to destination in
Ack Sent response to TCP syn ack and the number of acks sent by destination to
source in response to the successful reception of data packet
It is the number of acknowledgements received by source in response to
Ack Received data packets and the number of acks received by destination in response to
syn ack packet
Duplicate segment
It is the number of duplicate segments received by destination
received
Out of order segment
It is the number of out of ordered packets received by destination
received
Duplicate ack received It is the number of duplicate acknowledgements received by source
Times RTO expired It is the number of times RTO timer expired at source
Table 3-23: Parameter discerption of TCP Metrics table
UDP (User Datagram Protocol) is a communication protocol that offers a limited amount of
service when messages are exchanged between computers in a network that uses the Internet
Protocol (IP). UDP uses the Internet Protocol to get a data unit (called a datagram) from one
computer to another.
This protocol is transaction oriented, and delivery and duplicate protection are not guaranteed.
Applications requiring reliable delivery of streams of data should use the Transmission Control
Protocol (TCP).
The UDP protocol can be set for an application by clicking on the Applications Transport
Protocol option as shown below see Figure 3-18.
UDP Metrics table will be available in the Simulation Results dashboard if UDP is enabled in
at least one device in the network. It provides the following information specific to UDP see
Table 3-24.
Parameter Description
Device Id It is the Id of a device in which UDP is enabled
It represents the IP address with port number of the local device (either
Local Address
source or destination)
It represents the IP address with port number of the remote device
Foreign Address
(either source or destination)
Datagram sent It is the total number of datagrams sent from the source
Datagram received It is the total number of datagrams received at the destination
Table 3-24: Parameter discerption of UDP Metrics table
3.6 IP Protocol
3.6.1 IP Performance Metrics
IP Metrics table will be available in the Simulation Results dashboard if IP is enabled in at least
one device in the network. It provides the following information specific to IP protocol:
Parameter Description
Device_Id It displays the Id’s of the Layer_3 devices
It is the number of packets sent by a source, intermediate devices (Router or
Packet sent
L3 switch)
Packet It is the number of packets forwarded by intermediate devices (Router or L3
forwarded switch)
It is the number of data packets received by destination, intermediate devices
Packet received
(routing packets (OSPF, RIP etc.) received by Routers)
Packet It is the number of data packets that are discarded after their TTL value is
discarded expired.
Time-to-live (TTL) is a value in an Internet Protocol (IP) packet that tells a
TTL expired network router whether or not the packet has been in the network too long
and should be discarded
Firewall blocked It is the number of packets blocked by firewall at routers
Table 3-25: Parameter discerption of IP Metrics table
Devices and their Interfaces with buffers that support queuing and scheduling algorithms are:
1. The scheduler schedules packet transmission from the head-of-queue per the scheduling
algorithm. FIFO algorithm uses a single queue while Priority, RR and WFQ use 4 queues
(1 queue for each priority)
2. The buffer size is a user input. This buffer is not split among the various queues. At any
point in time the cumulative size of all queues is the buffer fill.
3. The way in which the individual queues are filled up, is per the queuing algorithm selected
(implemented in version 12.1)
The buffer is an egress buffer. The buffer size in Mega Bytes (MB), for each interface
mentioned above is a user input. The options 8, 16, 32, 64, 128, 256, 512, 1024, 2048 and
4096 MB
3.7.2 Queuing
Drop Tail: The queue is filled up till the buffer capacity. When the queue is full if any packet
arrives, it is dropped. The buffer size is a user input.
1. The queue is filled up till the average queue size is equal to minimum threshold, without
dropping any packet.
2. Randomly packets are dropped when the average queue size is between minimum
threshold and maximum threshold. The number of packets being dropped depends on the
Max Probability value.
3. All packets are dropped when the average queue size is above maximum threshold.
𝑡𝑛
𝐴𝑣𝑔 = (𝐴𝑣𝑔 − 𝑥𝑛 ) + 𝑥𝑛
𝑡𝑛+1
𝑡𝑛+1 – Current time which is the time when the (n+1)th packet is added
𝑅𝑎𝑛𝑑 (0,1)
𝑁𝑜 𝑜𝑓 𝐷𝑟𝑜𝑝𝑝𝑒𝑑 𝑃𝑎𝑐𝑘𝑒𝑡𝑠 > 𝑃
where 𝑝 = 𝐶1 × 𝐴𝑣𝑔 + 𝐶2
𝑀𝑎𝑥 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦
𝐶1 =
(𝑀𝑎𝑥 𝑇ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑 − 𝑀𝑖𝑛 𝑇ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
𝑀𝑎𝑥 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦
𝐶2 = × 𝑀𝑖𝑛 𝑇ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑
(𝑀𝑎𝑥 𝑇ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑 − 𝑀𝑖𝑛 𝑇ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
1. There are different Max and Min threshold value for each type of priority, i.e. High, Medium,
Normal, Low (The RED algorithm had only one set of Max and Min Threshold)
2. For the given threshold values of the packets, Random Early Detection (RED) algorithm is
applied.
Reference Documents
1. Sally Floyd, Van Jacobson (1993). Random Early Detection Gateways for Congestion
Avoidance. IEEE/ACM Transactions on Networking.
Queue Size: The queue depth can be obtained from the Event Trace or by modifying the
protocol source code. To obtain it from the event trace, an MS Excel script would need to be
written to filter by node, and at different points of time, add the number of APP-OUT events
and subtract the number of TRANSPORT-OUT events. Note that deeper issues such as
segmentation etc. will need to be handled appropriately based on the way the application and
transport layer interact.
3.7.3 Scheduling
First In First Out (FIFO): Packets are scheduled according to their arrival time in the queue.
Hence, first in packet in queue is scheduled first.
Priority: NetSim supports 4 priority queues namely High, Medium, Normal and Low. With this
scheduling, first all packets in the High priority queue are served, and then those in Medium,
then in normal and finally those packets in the low priority queue. Note that this could lead to
situations where only higher priority packets are served and lower priority packets are never
served.
Round Robin: Packet from all the 4 priorities are served in circular order. When packet
arrives, they are stored in the corresponding priority list
Weighted Fair Queuing (WFQ): When packet arrives, they are stored in corresponding list
according to priority. Packets are served in order of maximum weight of the priority list. In
NetSim WFQ is approximated as:
𝑃𝑟𝑖𝑜𝑟𝑖𝑡𝑦 = 1, 2, 3 𝑜𝑟 4
Early Deadline First (EDF): Packets are added in the queue as they arrive. While dequeuing
the packets with earliest deadline are served first. The packets which have exceeded deadline
are dropped.
Max Latency with respect to quality of service (QoS) of the packet is a user input
3.8 Links
3.8.1 Modeling Error in Wired Links
The error rates in NetSim wired links are based on a standard error measurement unit called
BER or Bit Error Rate. BER represents the ratio of errored bits to total bits.
The BER value can be set by the user. A typical value of BER, say 1 × 10−6, which equals
0.000001, means that 1 bit is in error for every one-million bits transmitted. It is important to
note that Bit Error Rate is NOT equal to Packet error rate. (PER)
For BER values less than 0.001, this is mathematically approximated in NetSim as
𝑃𝐸𝑅 = 𝐵𝐸𝑅 ∗ 𝐿
If you create a network with two wired nodes and L2_Switch, the IP addresses are assigned
as 192.168.0.2 and 192.168.0.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 (192.168.0.0).
Similarly, if you create a network with a router and two wired nodes, the IP addresses are
assigned as 192.168.0.1 and 192.169.0.1 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 192.168.0.1 and
192.169.0.1 respectively for the two interfaces. Both the nodes are in different networks
(192.168.0.0 and 192.169.0.0) in this case.
4 Featured Examples
Sample configuration files for all networks are available in the Examples Menu in NetSim
Home Screen. These files provide examples on How NetSim can be used – the parameters
that can be changed and the typical effect it has on performance.
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file for 802.11n-MIMO.
Network Settings
MIMO is a method for multiplying the capacity of a radio link using multiple transmit and receive
antennas. Increasing the Transmitting Antennas and Receiving Antennas in PHY Data rate
(link capacity) and hence leads to an increase in application throughput.
Figure 4-3: List of scenarios for the example of 802.11n frame aggregation
Figure 4-4: Network set up for studying the 802.11n frame aggregation
Network Settings
1. In the Environment Settings, Grid length is set to 50m * 50m
2. Distance between Access Point and the Wireless Node is 20m
3. Set DCF as the medium access layer protocol under datalink layer properties of Access
point and wireless node.
4. Click on Set Traffic tab and set CBR Application with 100 Mbps Generation Rate (Packet
Size: 1460, Inter Arrival Time: 116.8 µs)
5. Set Transport Protocol to UDP
6. WLAN Standard is set to 802.11n and No. of Frames to Aggregate is set to 1 in both
access point and wireless node (Right-Click Access Point or Wireless Node > Properties
> Interface Wireless > No. of Frames to Aggregate)
7. Channel Characteristics: Path Loss Only, Path Loss Model: Log Distance, and Path Loss
Exponent: 3. (Wireless Link Properties)
8. Enable Packet trace and run the simulation for 10s. Then check the throughput in the
results window
9. Go back to the scenario and increase the No. of Frames to Aggregate to 5 and 10
respectively and check the throughput in the results window.
Results and discussion
No of Frames Aggregated Application Throughput
1 23.97 Mbps
5 44.77 Mbps
10 54.24 Mbps
Table 4-2: No of Frames Aggregated vs. Application Throughput
▪ Frame aggregation is responsible for joining multiple MSDUs into a single MPDU that can
be delivered to the physical layer as a single unit for transmission. As we increase the
number of frames aggregated it results in lesser number of ack’s. Hence, more data frames
are transmitted per unit time leading to a higher application throughput.
▪ For No. of frames to Aggregate is set to 5, we get five successive frames followed by a
WLAN_Block_Ack (which is used to acknowledge that five frames are received
successfully). Users can observe this in Packet Trace by filtering packet status to
successful and Tx_ID as Access Point and Wireless Node.
▪ Note that in the early stages of the simulation the AP would transmit whatever the number
of frames/packets in its buffer. It will not wait for 5 frames to be aggregated, if say number
of frames to be aggregated is set as 5. If Access Point buffer has more than 5 frames, it
will aggregate 5 frames and then send. After sending 5 frames it will receive one
WLAN_Block_Ack.
User should uncomment the following line (line #38) in IEEE802_11.h in 802.11 project and
rebuild the code and then perform this example.
#define _RECALCULATE_RX_SENSITIVITY_BASED_ON_PEP_
Open NetSim, Select Examples > Internetworks > Wi-Fi > 802.11 Rate Adaptation then
click on the tile in the middle panel to load the example as shown in Figure 4-5.
Figure 4-5: List of scenarios for the example of 802.11 rate adaptation
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file for Rate Adaptation.
Figure 4-6: Network set up for studying the Wi-Fi Rate Adaptation
Network Settings
1. Environment Grid length: 500m * 500m
2. Distance between AP and Wireless Node is 65.5m.
3. Enabled Packet Trace option.
4. Set rate adaptation as Generic in datalink properties of access_point and wireless node
5. Set DCF as the medium access layer protocol under datalink layer properties of
access_point and wireless node.
6. Configure an application between any two nodes by selecting a CBR application from Set
Traffic tab in the ribbon. Right click on the application and set Transport Protocol to UDP.
7. Set WLAN Standard → 802.11b
8. Channel Characteristics → Path Loss only, Path Loss Model → Log Distance and Path
loss Exponent → 3.25. (Wireless Link Properties)
9. CBR application with 10Mbps generation rate (Set Packet Size: 1460 Bytes, Inter Arrival
Time: 1168 micro sec)
10. Simulate for 10 sec.
Open Packet Trace and filter Packet Type to CBR, Transmitter_ID to Access Point 4 andf filter
the packet status to successful then calculate Phy rate. Phy rate can be calculated using
packet trace by using the formula shown below:
𝑃ℎ𝑦 𝑟𝑎𝑡𝑒 (802.11𝑏) = 𝑃ℎ𝑦_𝑙𝑎𝑦𝑒𝑟_𝑝𝑎𝑦𝑙𝑜𝑎𝑑 ∗ 8/(𝑝ℎ𝑦 𝑒𝑛𝑑 𝑡𝑖𝑚𝑒 − 𝑝ℎ𝑦 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 − 192)
Calculate PHY rate for all the data packets coming from Access Point to Wireless Node. For
doing this please refer NetSim User Manual > Section 8.4.2 How to set filters to NetSim Trace
file.
The ‘Generic’ rate adaptation algorithm is similar to the Auto Rate Fall Back (ARF) algorithm.
In this algorithm:
In the above screenshot, the Phy rate reduces from 11Mbps to 5.5Mbps, since there are 4
consecutive data error packets. Then the rate increases from 5.5Mbps to 11Mbps one there
is 20 consecutive successful data packet transmissions.
Open NetSim and Select Examples > Internetworks > Wi-Fi > Effect of bandwidth in Wi-
Fi 802.11ac then click on the tile in the middle panel to load the example as shown in Figure
4-8.
Figure 4-8: List of scenarios for the example of effect of bandwidth in Wi-Fi 802.11ac
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file as shown Figure 4-9.
Figure 4-9: Network set up for studying the effect of bandwidth in Wi-Fi 802.11ac
Network Settings
Analytical Model
▪ DIFS
▪ Backoff duration
▪ Data packet transmission time
▪ SIFS
▪ MAC ACK transmission time
𝐴𝑝𝑝𝑙𝑖𝑐𝑎𝑡𝑖𝑜𝑛 𝑃𝑎𝑦𝑙𝑜𝑎𝑑(𝐵𝑦𝑡𝑒𝑠)
𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑇ℎ𝑟𝑜𝑢𝑔ℎ𝑝𝑢𝑡 (𝑀𝑏𝑝𝑠) =
𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑇𝑖𝑚𝑒 𝑝𝑒𝑟 𝑃𝑎𝑐𝑘𝑒𝑡(µs)
𝐴𝑐𝑘 𝑇𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛 𝑇𝑖𝑚𝑒 (µs) = 𝑃𝑟𝑒𝑎𝑚𝑏𝑙𝑒 𝑡𝑖𝑚𝑒 + (𝐴𝑐𝑘 𝑃𝑎𝑐𝑘𝑒𝑡 𝑠𝑖𝑧𝑒/𝐴𝑐𝑘 𝑑𝑎𝑡𝑎 𝑟𝑎𝑡𝑒)
Where,
𝑆𝐼𝐹𝑆 = 16 µ𝑠
𝑆𝑙𝑜𝑡 𝑡𝑖𝑚𝑒 = 9 µ𝑠
Similarly calculate throughput theoretically for other samples by changing bandwidth and
compare with Simulation throughput. Users can get the data rate by using the formula given
below:
𝑃ℎ𝑦 𝑟𝑎𝑡𝑒 (802.11ac) = 𝑃ℎ𝑦_𝑙𝑎𝑦𝑒𝑟_𝑝𝑎𝑦𝑙𝑜𝑎𝑑 ∗ 8/(𝑝ℎ𝑦 𝑒𝑛𝑑 𝑡𝑖𝑚𝑒 − 𝑝ℎ𝑦 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 − 44)
One can observe that there is an increase in throughput as we increase the bandwidth from
20MHz to 160MHz.
Open NetSim and click on Examples > Internetworks > Wi-Fi > Effect of Guard Interval in
Wi-Fi 802.11ac then click on the tile in the middle panel to load the example as shown in
Figure 4-11.
Figure 4-11: List of scenarios for the example of effect of guard interval in Wi-Fi 802.11ac
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file as shown Figure 4-12.
Figure 4-12: Network set up for studying the guard interval in wi-fi in Wi-Fi 802.11ac
Network Settings
Results
Guard Interval Theoretical Throughput Simulation Throughput
(ns) (Mbps) (Mbps)
400 17.76 22.80
800 16.87 21.38
Table 4-4: Result comparison of different Guard Interval vs. Theoretical Throughput and Simulation
Throughput
Open NetSim and Select Examples > Internetworks > Wi-Fi > Effect of AP STA Distance
on throughput then click on the tile in the middle panel to load the example as shown in
Figure 4-13.
Figure 4-13: List of scenarios for the example effect of AP-STA distance on throughput
The following network diagram illustrates, what the NetSim UI displays when you open the
example configuration file see Figure 4-14.
Figure 4-14: Network set up for studying the Effect of AP-STA Distance on throughput.
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 of the channel drops.
Network Settings
Results
Distance
Throughput (Mbps)
(m)
5 22.81
10 21.61
15 17.87
20 14.70
25 12.49
30 9.56
35 5.63
40 0
Table 4-5: Result comparison of different distance vs. throughput
Plot
25
21.61Mbps
20 17.87Mbps
Throughput (Mbps)
14.7Mbps
15 12.49Mbps
9.56Mbps
10
5.63Mbps
5
0Mbps
0
5 10 15 20 25 30 35 40
Distance (m)
Open NetSim and Select Examples > Internetworks > Wi-Fi > Effect of Pathloss Exponent
then click on the tile in the middle panel to load the example as shown in Figure 4-16.
Figure 4-16: List of scenarios for the example of effect of pathloss exponent
The following network diagram illustrates, what the NetSim UI displays when you open the
example configuration file as shown Figure 4-17.
Figure 4-17: Network set up for studying the effect of pathloss exponent
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.
Network Settings
Results
Path loss Exponent Throughput (Mbps)
2.0 22.81
2.5 21.61
3.0 20.04
3.5 14.70
4.0 9.56
4.5 0
Table 4-6: Result comparison of different pathloss exponent value vs. throughput
Plot
25
22.81Mbps
21.62Mbps
20.04Mbps
20
Throughput (Mbps)
15 14.7Mbps
10 9.56Mbps
5
0Mbps
0
2 2.5 3 3.5 4 4.5
Figure 4-19: List of scenarios for the example of effect of transmitter power
The following network diagram illustrates, what the NetSim UI displays when you open the
example configuration file see Figure 4-20.
Figure 4-20: Network set up for studying the effect of 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,
lesser error and higher throughputs.
Network Settings
1. Environment Grid length: 55m x 55m
2. Distance between Access Point and the Wireless Node is set to 35m
3. Set transmitter power to 100mW under Interface Wireless > Physical layer properties of
Access point
4. Set DCF as the medium access layer protocol under datalink layer properties of access
point and wireless node.
5. Channel Characteristics: Path Loss Only, Path Loss Model: Log Distance, Path Loss
Exponent: 3.5
6. Configure an application between any two nodes by selecting a CBR application from the
Set Traffic tab in the ribbon. Right click on the application and set Transport Protocol to
UDP.
7. Application Generation Rate: 10Mbps (Packet Size: 1460, Inter Arrival Time: 1168µs)
8. Run the simulation for 10s
9. Go back to the scenario and decrease the Transmitter Power to 100, 60, 40, 20 and 10
respectively and run simulation for 10s. See that, there is a decrease in the Throughput
gradually.
Results
Figure 4-21: List of scenarios for the example of Peak UDP and TCP throughput 802.11ac and
802.11n
The following network diagram illustrates, what the NetSim UI displays when you open the
example configuration file as shown Figure 4-22.
Figure 4-22: Network set up for studying the Peak UDP and TCP throughput 802.11ac and 802.11n
4.6.1 IEEE802.11n
Network Settings
Interface Parameters
Physical Layer
Standard IEEE802.11n
No. of Frames to aggregate 64
Standard Channel 36 (5180MHz)
Buffer Size 100MB
Guard Interval 400ns
Bandwidth 40 MHz
Frequency Band 5 GHz
Transmitter Power 100mW
Antenna Gain 0
Antenna height 1m
Reference distance (d0) 1m
Transmitting Antennas 4
Receiving Antennas 4
Datalink Layer
Rate Adaptation False
Short Retry Limit 7
Long Retry Limit 4
Dott11_RTSThreshold 3000bytes
Medium Access Protocol DCF
Table 4-8: Detailed Network Parameters for IEEE802.11n
Application Properties
App1_CBR
Packet Size (Byte) 1450
Inter Arrival Time (µs) 11.6
Transport Protocol UDP
Table 4-9: Application Parameters
5. Run simulation for 5 sec. After simulation completes go to metrics window and note down
throughput value from application metrics.
Go Back to 802.11n UDP Scenario and Change Transport protocol to TCP, Window scaling
is set to True and Scale shift count set to 5 in the transport layer of Wired node and Wireless
node for the other sample (i,e 802.11n TCP), run the simulation for 5 sec and note down
throughput value from application metrics.
Results
Plot
500
400
Throughput (Mbps)
300
200
100
0
UDP TCP
Transport Protocol
Figure 4-23: Plot of Throughput (Mbps) Vs. Transport Protocol for IEEE802.11n
4.6.2 IEEE802.11ac
Network Settings
Interface Parameters
Standard IEEE802.11ac
No. of Frames to aggregated 1024
Standard Channel 36 (5180MHz)
Rate Adaptation False
Short Retry Limit 7
Long Retry Limit 4
Dott11_RTSThreshold 3000bytes
Medium Access Protocol DCF
Buffer Size (Access Point) 100MB
Guard Interval 400ns
Bandwidth 160 MHz
Frequency Band 5 GHz
Transmitter Power 100mW
Antenna Gain 0
Antenna height 1m
Reference distance (d0) 1m
Transmitting Antennas 8
Receiving Antennas 8
Table 4-11: Detailed Network Parameters for IEEE802.11ac
Application Properties
App1_CBR
Packet Size (Byte) 1450
Inter Arrival Time (µs) 1.93
Transport Protocol UDP
Table 4-12: Application Parameters
5. Run simulation for 10 sec. After simulation completes go to metrics window and note down
throughput value from application metrics.
Go Back to the 802.11ac UDP Scenario and Change Transport protocol to TCP, Window
scaling is set to True and Scale shift count set to 5 in the transport layer of Wired node and
Wireless node for the other sample (i,e 802.11ac TCP), run the simulation for 10 sec and
note down throughput value from application metrics.
Results
Transport Protocol Throughput (Mbps)
UDP 5361.42
TCP 3207.06
Table 4-13: Results comparison of TCP and UDP throughputs for IEEE802.11ac
Plot
6000
5250
Throughput (Mbps)
4500
3750
3000
2250
1500
750
0
UDP TCP
Transport Protocol
Figure 4-24: Plot of Throughput (Mbps) Vs. Transport Protocol for IEEE802.11ac
Max Max
Address Subnet Leading
Class number of number of Application
range masking Bits
Networks Hosts
Used for a
IP CLASS A 1 to 126 255.0.0.0 8 128 16,777,214 large number
of hosts.
Used for
IP CLASS B 128 to 191 255.255.0.0 16 16384 65,534 medium-size
networks.
Used for
IP CLASS C 192 to 223 255.255.255.0 24 2097157 254 local area
network.
Reserve for
IP CLASS D 224 to 239 N/A N/A N/A N/A
multi-tasking.
This class is
IP CLASS E 240 to 254 N/A N/A N/A N/A reserved for
R&D
Table 4-14: IP address class and its application
The default IP addressing in NetSim is class A addressing. However, users can reconfigure
(static) IP addresses with different classes. These settings are available in the network layer
of end nodes, routers, and L3 switches.
Example 1: In this example, we have created a simple LAN network and modified the IP
address of the routers and the users in the LAN network. Refer Figure 4-25. In this we have
used the IP address of range 172.16.0.1-172.16.255.254 with a mask 255.255.0.0. When its
put differently, the IP is 172.16.0.0/16.
4.7.4 Subnetting
Subnetting is the practice of dividing a network into two or more smaller networks. It increases
the routing efficiency, enhances the security of the network, and reduces the size of the
broadcast domain.
A subnet mask is used to divide an IP address into two parts. One part identifies the host
(computer), and the other part identifies the network to which it belongs. For better
understanding of how an IP address and subnet masks work, look at an IP address and see
how it's organized.
We provide two examples to explain Class B sets. The example shows how to create 4
Subnets with 16382 Hosts using: (i) A single switch and (ii) Multiple switches.
a. Subnets using single switch: Note that IP address and subnet masks are configured. The
application (traffic) flow is configured for intra-subnet communications.
Figure 4-27: Pair of users communicating with each other belong to separate subnet
per Table 4-16.
Figure 4-28: Configuring IP address and subnet mask in network layer of device in NetSim
b. Subnets using multiple switches: Here subnets have been configured using multiple
switches. In the given example as shown in Figure 4-29, we have considered 4
departments in a university campus, by configuring subnets for CS, EC, MECH, and EE.
Application (traffic flow) is set for both intra and inter-subnet communication.
Figure 4-29: All the users are communicating from different subnets using a router and switch by
configuring Class-B subnetting.
Example 4: In this example, we have explained how users can set firewall rules to DENY traffic
at a subnet level.
a. The topology considered here is the university network as shown in Figure 4-29.
b. The firewall/ACL rules are set in the Organization Router
c. ACL Rules:
d. These rules can be set in NetSim UI just by filling an ACL application of the router as
shown below in Figure 4-30.
Hello packets are OSPF packet type 1. These packets are sent periodically on all interfaces
in orYder to establish and maintain neighbor relationships. In addition, Hello Packets are
multicast on those physical networks having a multicast or broadcast capability, enabling
dynamic discovery of neighboring routers. All routers connected to a common network must
agree on certain parameters (Network mask, Hello Interval and Router Dead Interval). These
parameters are included in Hello packets, so that differences can inhibit the forming of
neighbor relationships.
Database Description packets are OSPF packet type 2. These packets are exchanged when
an adjacency is being initialized. They describe the contents of the link-state database.
Multiple packets may be used to describe the database. For this purpose, a poll-response
procedure is used. One of the routers is designated to be the master, the other the slave. The
master sends Database Description packets (polls) which are acknowledged by Database
Description packets sent by the slave (responses). The responses are linked to the polls via
the packets DD sequence numbers.
Link State Request packets are OSPF packet type 3. After exchanging Database Description
packets with a neighboring router, a router may find that parts of its link-state database are
out-of-date. The Link State Request packet is used to request the pieces of the neighbor’s
database that are more up to date. Multiple Link State Request packets may need to be used.
A router that sends a Link State Request packet has in mind the precise instance of the
database pieces it is requesting. Each instance is defined by its LS sequence number, LS
checksum, and LS age, although these fields are not specified in the Link State Request
Packet itself. The router may receive even more recent instances in response.
Link State Update packets are OSPF packet type 4. These packets implement the flooding of
LSAs. Each Link State Update packet carries a collection of LSAs one hop further from their
origin. Several LSAs may be included in a single packet. Link State Update packets are
multicast on those physical networks that support multicast/broadcast. In order to make the
flooding procedure reliable, flooded LSAs are acknowledged in Link State Acknowledgment
packets. If retransmission of certain LSAs is necessary, the retransmitted LSAs are always
sent directly to the neighbor.
Link State Acknowledgment Packets are OSPF packet type 5. To make the flooding of LSAs
reliable, flooded LSAs are explicitly acknowledged. This acknowledgment is accomplished
through the sending and receiving of Link State Acknowledgment packets. Multiple LSAs can
be acknowledged in a single Link State Acknowledgment packet.
Figure 4-31: List of scenarios for the example of different ospf control packets
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file for Different-OSPF-Control-Packets in NetSim as shown Figure
4-32.
Figure 4-32: Network set up for studying the different OSPF control packets.
Network Settings
The OSPF neighbors are dynamically discovered by sending Hello packets out each OSPF-
enabled interface on a router. Then Database description packets are exchanged when an
adjacency is being initialized. They describe the contents of the topological database. After
exchanging Database Description packets with a neighboring router, a router may find that
parts of its topological database are out of date. The Link State Request packet is used to
request the pieces of the neighbor's database that are more up to date. The sending of Link
State Request packets is the last step in bringing up an adjacency. A packet that contains fully
detailed LSAs, typically sent in response to an LSR message. LSAck is sent to confirm receipt
of an LSU message.
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 unrouteable packets are sent).
Note that the static route configuration running with TCP protocol requires reverse route
configuration.
In NetSim, static routes can be configured either prior to the simulation or during the
simulation.
Figure 4-34: List of scenarios for the example of Configuring Static Route
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file for Configuring Static Routing in NetSim as shown Figure 4-35.
Figure 4-35: Network set up for studying the Configuring Static Route
Network Settings
Figure 4-36: Packet flows from Wired Node 6 -> Router 1 -> Router 5 -> Router 4 -> Wired Node 7
1. Open Router 1 property >Network Layer, Static IP Route - Enable >Click on via GUI and
set the properties as per the screenshot below and click on Add and then click on OK.
This creates a text file for every router in the temp path of NetSim which is in the format below:
Router 1:
where
IF: is the Interface to which the gateway_ip is connected. The default value is 1.
1. Similarly Configure Static Route for all the routers as given in below Table 4-19.
Network
Devices Gateway Subnet Mask Metrics Interface ID
Destination
Router 1 192.169.0.0 11.0.0.2 255.255.0.0 1 1
Router 2 192.169.0.0 11.0.0.10 255.255.0.0 1 2
Router 3 192.169.0.0 11.0.0.18 255.255.0.0 1 2
Router 4 192.169.0.0 192.169.0.2 255.255.0.0 1 3
Table 4-19: Static Route configuration for routers
Figure 4-38: Observe in Packet Trace, the packet flows from Wired Node 6 > Router 1> Router 2 >
Router 3 > Router 4 > Wired Node 7
Figure 4-39: List of scenarios for the example of queuing and buffer overflow in routers
The following network diagram illustrates, what the NetSim UI displays when you open the
example configuration file as shown Figure 4-40.
Figure 4-40: Network set up for studying the queuing and buffer overflow in routers
Network Settings
1. Configure an application between any two nodes by selecting a CBR application from the
Set Traffic tab in the ribbon. Right click on the application and set Transport Protocol to
UDP.
2. Generation rate = 10Mbps for each application (Packet Size: 1460, Inter Arrival Time:
1168µs)
3. Generation Rate (Mbps) = (Packet size (bytes) * 8) / Inter arrival time (µs))
4. The traffic generation rate can be modified by changing application properties. Note that
the generation rate should be less than or equal to the 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 up to 100 Mbps.
5. Simulate for 100s and note down the throughput.
6. Go back to the scenario and change the link speed (both Uplink and Downlink Speed)
between Router_5 and Wired_Node_4 from the default 100 Mbps to 25 Mbps. In this case,
the link between Router_5 and Wired_Node_4 becomes a Bottle-neck link, since the link
rate (i.e., service rate) is less than the generation rate of 30 Mbps (10 * 3).
Discussion
Bottleneck link 100Mbps: In this scenario, router receives packets from three links at the
rate of 10 Mbps each, a total of 30 Mbps. And the router-node link supports 100 Mbps. Hence
there is no queuing / packet drop in the Router. The application throughput would be
approximately equal to the generation rate.
Bottleneck link 25Mbps: 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 and
hence router starts dropping the packets. Application throughput would be approximately
equal to the bottle neck link capacity.
Figure 4-43: List of scenarios for the example of TCP Window Scaling
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file for TCP Window scaling as shown Figure 4-44.
Figure 4-44: Network set up for studying the TCP Window Scaling
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 milliseconds round trip time (RTT), the bandwidth-delay product
is 1500000 × 0.513 = 769,500 bits or about 96,187 bytes.
65535
Using a maximum window size of 64 KB only allows the buffer to be filled to = 68 % of
96187
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.
Network Settings
Go to the simulation result window -> plots -> TCP Congestion Window Plot Figure 4-47/Figure
4-48.
Figure 4-46: Open TCP Congestion Window plot from the result dashboard.
In Window Scaling False, the Application Throughput is 2.5 Mbps less than the theoretical
throughput since it initially takes some time for the window to reach 65535 B.
In Window Scaling TRUE, From the above screenshot, users can notice that the window size
grows up to 560192Bytes because of Window Scaling. This leads to a higher Application
throughput compared to the case without window scaling.
We have enabled Wireshark Capture in the Wired Node 1. The PCAP file is generated silently
at the end of the simulation. Double click on WIRED NODE1_1.pcap file available in the result
window under packet captures, In Wireshark, the window scaling graph can be obtained as
follows. Select any data packet with a left click, then, go to Statistics > TCP Stream Graphs
> Window Scaling > Select Switch Direction.
The following network diagram illustrates what the NetSim UI displays when you open the
example configuration file for Enterprise Network in NetSim as shown in Figure 4-51.
Figure 4-51: Network set up for studying the enterprise network. Labelling (Branch-1, Branch-2, HQ,
Data center) has been added to the screen shot. Links 29, 30 and the WAN Router can be thought of
as the internet cloud over which traffic flows to reach the data center.
Network Settings
Enterprise Network I
1. Link rate for the outbound link i.e., link 28 from Branch 1 is set to 2 Mbps.
2. Configure one FTP application from 14 to the file server 39, a DB application from 15 to
the Database server 41, and eight email applications running between 16, 17, 18, 26, 27,
28, 29, 30 and the Email server 40.
3. Run the simulation for 100s.
Enterprise Network II
1. In this sample, we add more nodes via the switch and configured 3 FTP applications from
systems 43, 45, 46 to FTP server 39, as shown in Figure 4-52.
Figure 4-52: Configuring FTP applications from systems 43,45,46 to FTP server 39
1. In this sample, we change the outbound link speed i.e., Link 28 to 4Mbps and simulate for
100 seconds.
Enterprise Network IV
1. In this sample, we change the outbound link speed i.e., Link 28 to 2Mbps and configure
Voice applications from 14, 15, 46, 45 and 43 to Head office 10 as shown in Figure 4-53.
Figure 4-53: Configuring voice applications from 14, 15, 43, 45, 46 to HO 10
2. Also changed Scheduling type to Priority under Network Layer Properties of Router33
Interface WAN properties as shown below Figure 4-54.
Enterprise Network I Open metrics window and calculate the average delay for e-mail
application present under Application properties shown below in
Figure 4-55.
Enterprise Network II: In this sample, the average delay for email applications increases to
15.81 s due to the impact of additional load on the network.
Enterprise Network III: In this sample, the average delay for e-mail applications has dropped
down to 0.94 s due to the increased link speed.
Enterprise Network IV: In this sample, the average delay for the e-mail application has
increased to 3.89 s since voice has a higher priority over data. Since priority scheduling is
implemented in the routers, they first serve the voice packets in the queue and only then serve
the email packets.
6 Reference Documents
1. IEEE 802.3 standard for Ethernet
2. IEEE 802.11 standards for Wireless LAN
3. RFCs 777, 760, 792 for Internet Control Message Protocol
4. IENs 108, 128 for Internet Control Message Protocol
5. RFC 2328 for Open Shortest Path First (OSPF)
7 Latest FAQs
Up to date FAQs on NetSim’s Internetworks library is available at
https://tetcos.freshdesk.com/support/solutions/folders/14000108665
https://tetcos.freshdesk.com/support/solutions/folders/14000113123
https://tetcos.freshdesk.com/support/solutions/folders/14000119396