0% found this document useful (0 votes)
28 views58 pages

CN Lab

Uploaded by

gurutapan69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views58 pages

CN Lab

Uploaded by

gurutapan69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

DELHI TECHNOLOGICAL UNIVERSITY

(Formerly Delhi College of Engineering)

Shahbad Daulatpur, Bawana Road, New Delhi 110042

DEPARTMENT OF INFORMATION TECHNOLOGY

ITY6413: Mobile Computing


PRACTICAL FILE

Submitted To: Submitted By:

Mr. Abhishek Verma Mohit Tanwar


23/ITY/21
MTech-(IT)
INDEX
S.No. Experiment Page No. Signature
1. Introduction to NetSim. 3-9
2. Understand the working of “Connection Establishment” in TCP. 10-12
3. Appreciate the mathematical modelling of TCP and understand 13-16
the fundamental relationship between packet loss probability and
TCP performance.
4. Study how throughput and error of a Wireless LAN network 17-21
changes as the distance between the Access Point and the wireless
nodes is varied.
5. Multi-AP Wi-Fi Networks: Channel Allocation. 22-28
6. Plot the characteristic curve of throughput versus offered traffic 29-35
for a Pure and Slotted ALOHA system.
7. Quality of Service (QoS) in 802.11e based WLANs. 36-38
8. Study the hidden node problem in WLAN. 39-41
9. Study how call blocking probability varies as the load on a GSM 42-44
network is continuously increased.
10. 10. Study how the throughput of LTE network varies as the 45-48
distance between the ENB and UE (User Equipment) is increased.
11. Study how the throughput of LTE network varies as the Channel 49-52
bandwidth changes in the ENB (Evolved node).
12. Simulate and study LTE Handover procedure. 53-58
1. Introduction to NetSim.
1.1. Introduction to network simulation with NetSim, NetSim feature listand NetSim
Simulation environment

NetSim is a network simulation tool that allows you to create network scenarios, model traffic, design
protocols and analyze network performance. Users can study the behavior of a network by test
combinations of network parameters. The various network technologies covered in NetSim include:

• Internetworks - Ethernet, WLAN, IP, TCP

• Legacy Networks - Aloha, Slotted Aloha

• Cellular Networks - GSM, CDMA

• Mobile Adhoc Networks - DSR, AODV, OLSR, ZRP

• Wireless Sensor Networks - 802.15.4

• Internet of Things - 6LoWPAN gateway, 802.15.4 MAC / PHY, RPL

• Cognitive Radio Networks - 802.22

• Long-Term Evolution Networks – LTE/LTE-A/LTE Femto Cell/LTE D2D/LTE Vanet

• Software Defined Networking

• Advanced Routing and Switching - VLAN, IGMP, PIM, L3 Switch, ACL and NAT

• 5G NR mmWave – LTE NR

NetSim home screen will appear as shown below:


➢ Network Design Window: NetSim design window or the GUI, enables users to model a network
comprising of network devices like switches, routers, nodes, etc., connect them through links, and model
application traffic to flow through the network. The network devices shown are specific tothe network
technologies chosen by the user.

Description:

1. File - In order to save the network scenario before or after running the simulation into thecurrent
workspace,
• Click on File -- Save to save the simulation inside the current workspace. Users canspecify their
own Experiment Name and Description (Optional).
• Click on File -- Save As to save an already saved simulation in a different name afterperforming
required modifications to it.
• Click on Close, to close the design window or GUI. It will take you to the home screenof NetSim.
2. Settings - Go to Settings -- Environmental Settings and choose the type of environment. Here we have
chosen the Environment in the form of a Grid. Map option can be used for specific cases like while
designing VANET scenarios.
3. Help - Help option allows the users to access all the help features.

• About NetSim – Assists the users with basic information like,

Which version of NetSim is used and whether it is a 32-bit build or 64-bit build?What kind of
License is being used? Whether Floating or Node Locked?
• Video Tutorials – Assists the users by directing them to our dedicated YouTube Channel
“TETCOS”, where we have lots of video presentations ranging from short to long, covering
different versions of NetSim up to the latest release.
• Answers/FAQ – Assists the user by directing them to our “NetSim Support Portal”,where one
can find a well-structured “Knowledge Base”, consisting of answers or solutions to all the
commonest queries which a new user can go through.
• Raise a Support Ticket – Assists the user by directing them to our “NetSim Support Portal”,
where one can “Submit a ticket” or in other words raise his/her query, which reaches our dedicated
Helpdesk and due support will be provided to theuser.
• User Manual – Assists the user with the usability of the entire tool and its features. It highly
facilitates a new user with lots of key information about NetSim.
• Source Code Help – Assists the user with a structured documentation for “NetSim Source Code
Help”, which helps the users who are doing their R&D using NetSim with a structured code
documentation consisting of more than 5000 pages with very much ease of navigation from one
part of the document to another.
• Open-Source Code – Assists the user to open the entire source codes of NetSim protocol libraries
in Visual Studio, where one can start initiating the debugging process or performing modifications
to existing code or adding new lines of code. Visual Studio Community Edition is a highly
recommended IDE to our users who areusing the R&D Version of NetSim.
• Experiments – Assists the user with separate links provided for 30+ differentexperiments covering
almost all the network technologies present in NetSim.
• Technology Libraries – Assists the user by directing them to a folder comprising ofindividual
technology library files comprising all the components present in NetSim.

Below the menu options, the entire region constitutes the Ribbon/Toolbar using which the following
actions can be performed:
• Click and drop network devices and right click to edit properties

• Click on Wired/Wireless links to connect the devices to one another. It automatically detects
whether to use a Wired/Wireless link based on the devices we are trying to connect
• Click on Application to configure different types of applications and generate traffic

• Click on Plots, Packet Trace, and Event Trace and click on the enable check box option whichappears
in their respective windows to generate additional metrics to further analyze the network
performance.
• Click on Run to perform the simulation and specify the simulation time in seconds.

• Next to Run, we have View Animation and View Results options. Both the options remain hidden
before we run the simulation or if the respective windows are already open.

• Display Settings option is mainly used to display various parameters like Device Name, IP,etc.,
to provide a better understanding especially during the design and animation.
➢ Results Window: Upon completion of simulation, Network statistics or network performance metrics
reported in the form of graphs and tables. The report includes metrics like throughput, simulation time,
packets generated, packets dropped, collision counts etc.

Description:

1. Below Simulation Results, clicking on a particular metrics will display the respective metrics
window.
2. Clicking on links in a particular metrics will display the plot in a separate window

3. Enabling Detailed View by clicking on it will display the remaining properties

4. Clicking on Restore to Original View will get back to the original view

5. Click on Open Packet Trace / Open Event Trace to open the additional metrics which providein
depth analysis on each Packets / Events.

➢ Packet Animation Window: When we click on run simulation, we have the option to record / play&
record animation. If this is enabled, users can view the animation during the run time or upon completion
of the simulation users can see the flow of packets through the network. Along with this, more than 25+
fields of packet information is available as a table at the bottom. This table contains all the fields recorded
in the packet trace. In addition, animation options are available for viewing different graphs, IP
Addresses, Node movement etc.
Description:
1. Click on Play to view the animation. You can Pause the animation at any interval and play again.
2. Click on Stop to stop the animation. Now click on Play to start the animation from the beginning.
3. Next to that we also have speed controllers to increase/decrease Simulation Time andAnimation
Speed View More option enables the user to view Plots, Throughputs, and IP Tables during the
animation
4. Table Filters are used to filter the packet information’s shown in the below table duringsimulation as
per user requirement
5. While setting more than one application, it is differentiated using different color indications
6. Packets are indicated using different color combinations say, blue color indicates control packets,
green color indicates data packets and red color indicates error packets.
1.2. How does a user create and save an experiment in workspace?

To create an experiment, select New Simulation-> <Any Network> in the NetSim Home Screen.

Create a network and save the experiment by clicking on File->Save button on the top left.

A save popup window appears which contains Experiment Name, Folder Name, Workspace pathand
Description.
Specify the Experiment Name and Description (Optional) and then click on Save. The workspace path is
non-editable. Hence all the experiments will be saved in the default workspace path. After specifying the
Experiment Name click on Save.
In our example we saved with the name MANET and this experiment can be found in the default workspace
path as shown below:

Users can also see the saved experiments in Open Simulation menu shown below:

“Save As” option is also available to save the current experiment with a different name.
1.3. Typical sequence of steps to do experiments in this manual
The typical steps involved in doing experiments in NetSim are,
1.3.1. Network Set up: Drag and drop devices, and connect them using wired or wireless links
1.3.2. Configure Properties: Configure device, protocol or link properties by right clicking on thedevice
or link and modifying parameters in the properties window.
1.3.3. Model Traffic: Click on the Application icon present on the ribbon and set traffic flows.
1.3.4. Enable Trace/Plots (optional): Click on packet trace, event trace and Plots to enable. Packet trace
logs packet flow, event trace logs each event (NetSim is a discrete event simulator) and the Plots
button enables charting of various throughputs over time.
1.3.5. Save/Save As/Open/Edit: Click on File -- Save / File -- Save As to save the experimentsin the
current workspace. Saved experiments can then opened from NetSim home screen to run the
simulation or to modify the parameters and again run the simulation.
1.3.6. View Animation/View Results: Visualize through the animator to understand working and to
analyze results and draw inferences.
2. Understand the working of “Connection Establishment” in TCP.
2.1. Introduction:
When two processes wish to communicate, their TCP’s must first establish a connection i.e. initializethe status
information on each side. Since connections must be established between unreliable hosts and over the
unreliable internet communication system, a “three-way handshake” with clock-based sequence numbers is
the procedure used to establish a Connection. This procedure normally is initiated by one TCP and responded
by another TCP. The procedure also works if two TCPs simultaneously initiate the procedure. When
simultaneous attempt occurs, each TCP receives a “SYN” segment which carries no acknowledgement after
it has sent a “SYN”. The simplest three-way handshake is shown in the following figure:
TCP A TCP B
1. CLOSED LISTEN

2. SYN-SENT → <A: SEQ=100><CTL=SYN> →SYN-RECEIVED


3. ESTABLISHED ← <B: SEQ=300><ACK=101><CTL=SYN, ACK> ←SYN-RECEIVED
4. ESTABLISHED → <A: SEQ=101><ACK=301><CTL=ACK> →ESTABLISHED
5. ESTABLISHED → <A: →ESTABLISHED
SEQ=101><ACK=301><CTL=ACK><DATA>
Fig: Basic 3-Way Handshake for Connection Synchronization
Explanation:
The above figure should be interpreted in the following way. Each line is numbered for reference purposes.
Right arrows (→) indicate the departure of a TCP Segment from TCP A to TCP B, or arrival of a segment
at B from A. Left arrows (←) indicates the reverse. TCP states represent the state after the departure or
arrival of the segment (whose contents are shown in the center of each line). Segment contents are shown in
abbreviated form, with sequence number, control flags, and ACK field. In line 2 of the above figure, TCP
A begins by sending a SYN segment indicating that it will use sequence numbers starting with sequence
number 100. In line 3, TCP B sends a SYN and acknowledges the SYN it received from TCP A. Note that
the acknowledgment field indicates, TCPB is now expecting to hear sequence 101, acknowledging the SYN
which occupied sequence 100. At line 4, TCP A responds with an empty segment containing an ACK for
TCP B's SYN and in line 5, TCP A sends some data.
2.2. Network Setup:
Open NetSim and click Examples > Experiments > Connection-Establishment-in-TCP >Sample-1 as
shown below:

NetSim UI displays the configuration file corresponding to this experiment as shown below:

2.3. Procedure:

The following set of procedures were done to generate this sample.

Step 1: A network scenario is designed in NetSim GUI comprising of 2 Wired Nodes and 1 L2 Switchin
the “Internetworks” Network Library.

Step 2: In the General Properties of Wired Node 1 i.e., Source, Wireshark Capture is set to Online.
Note: Accept default properties for L2 Switch as well as the Links.

Step 3: Right click on the Application Flow App1 FTP and select Properties or click on the
Application icon present in the top ribbon/toolbar. An FTP Application is generated from Wired Node 1
i.e., Source to Wired Node 2 i.e., Destinationwith File Size remaining 100000 Bytes and File Inter Arrival
Time remaining 5 seconds.

Step 4: Packet Trace is enabled in the NetSim GUI and hence we can observe the TCP Three-Way
Handshake that occurs before the data packet transmissions.

Step 5: Click on Display Settings > Device IP check box in the NetSim GUI to view the network
topology along with the IP address.

Step 6: Click on Run simulation. The simulation time is set to 10 seconds. In the Static ARP
Configuration tab, Static ARP is set to Disable.
2.4. Output:
Once the simulation begins, Wireshark starts to capture the packets.
2.4.1. NODE-1 (11.1.1.1 as per this scenario) sends a control packet of type TCP_SYN requestinga
connection with NODE-2 (11.1.1.2 as per this scenario).
2.4.2. NODE-2 responds with the control packet of type TCP_SYN_ACK to NODE-1. This
TCP_SYN_ACK is the ACK packet sent for the TCP_SYN packet.
2.4.3. NODE-1 then sends the TCP_ACK to NODE-2 and internally sets its CONNECTION_STATEas
TCP_ESTABLISHED.
Once the connection is established, data transmission starts and we can see the data packets (ofsize
1500 bytes) sent from NODE-1 to NODE-2.
TCP Three-way Handshake can be observed in Wireshark as shown below:

Fig: 3-way handshake captured in Wireshark

Similarly, users can also see the TCP 3-Way-Handshake using the Packet Trace. To view the packet trace
file, click on “Open Packet Trace” option present in the left-hand-side of the ResultsDashboard.

Fig: 3-way handshake captured in NetSim Packet TraceFrom the Packet Trace file, we can observe the
following:
1. NODE-1 sends TCP_SYN to NODE-2 via SWITCH-3.
2. NODE-2 responds by sending back TCP_SYNACK to NODE-2 via SWITCH-3.
3. Then NODE-1 sends TCP_ACK to NODE-2 via SWITCH-3 and then starts sending the data
packets to NODE-2.
3. Appreciate the mathematical modelling of TCP and understand the
fundamental relationship between packet loss probability and TCP
performance.
Part 1: Estimate transmission rate in a simple error-less network:
(Reference: Chapter 5 of the book, High Performance TCP/IP Networking. Concepts, Issues and Solutions by Mahbub Hassan, Raj
Jain)

3.1. Theory:
The two key processes that a model of TCP needs to include are:
3.1.1. The dynamics of the window that define the number of packets that a TCP source can
transmit into the network
3.1.2. The packet loss process that indicates current traffic loads or congestion within the network
Now, during the interval in which TCP receives information that packets are not being lost in the network,
TCP increases its window linearly. When the source deduce that a packet has been lost itreduces its
window by a factor of the current window size.
The standard assumption in this case is that the window size is related to the transmission rate by the
roundtrip time (RTT)
𝑇𝑟𝑎𝑛𝑚𝑖𝑠𝑠𝑖𝑜𝑛𝑅𝑎𝑡𝑒 = 𝑊𝑖𝑛𝑑𝑜𝑤 𝑆𝑖𝑧𝑒/𝑅𝑇𝑇

3.2. Network setup:

Open NetSim and click Examples > Experiments > Mathematical-Modeling-of-TCP > Sample-1 as
shown below:

NetSim UI displays the configuration file corresponding to this experiment as shown below:
3.3. Procedure:

The following set of procedures were done to generate this sample:


Step 1: A network scenario is designed in NetSim GUI comprising of 2 Wired Nodes and 1 Routerin the
“Internetworks” Network Library.
Step 2: In the Source Node, i.e., Wired Node 2, in the TRANSPORT LAYER Properties,Congestion
Control Algorithm is set to CUBIC.
Note: Accept default properties for the Router.

Step 3: The Link Properties are set according to the table given below:
Link Properties Wired Link 1 Wired Link 2
Max Uplink Speed (Mbps) 10 10
Max Downlink Speed (Mbps) 10 10
Uplink propagation delay (µs) 100000 100000
Downlink propagation delay (µs) 100000 100000
Uplink BER 0 0
Downlink BER 0 0

Step 4: Right click on the Application Flow App1 CBR and select Properties or click on theApplication
icon present in the top ribbon/toolbar.
A CBR Application is generated from Wired Node 2 i.e., Source to Wired Node 3 i.e., Destination with
Packet Size remaining 1460 Bytes and Inter Arrival Time set to 1168 µs.
The Packet Size and Inter Arrival Time parameters are set such that the Generation Rate equals10 Mbps.
Generation Rate can be calculated using the formula:
𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑜𝑛 𝑅𝑎𝑡𝑒 (𝑀𝑏𝑝𝑠) = 𝑃𝑎𝑐𝑘𝑒𝑡 𝑆𝑖𝑧𝑒 (𝐵𝑦𝑡𝑒𝑠) ∗ 8/𝐼𝑛𝑡𝑒𝑟𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 (µ𝑠)
Step 5: Click on Run simulation. The simulation time is set to 100 seconds.

3.4. Output I:
Theoretical Calculation:
In the output of simulation, the throughput measured equals the transmissions rates since there arepacket
errors or losses in the network. This implies that the expected theoretical value of throughputshould be
𝑇ℎ𝑟𝑜𝑢𝑔ℎ𝑝𝑢𝑡(𝑀𝑏𝑝𝑠) = 𝑊𝑖𝑛𝑑𝑜𝑤 𝑆𝑖𝑧𝑒/𝑅𝑇𝑇
Window size = 65535Bytes = 65535*8 = 524280bits
RTT = 100ms*4 = 400ms = 0.4s
Expected Throughput (Mbps) = 524280/0.4 = 1.3Mbps
Note that even though we have a 10 Mbps links the Throughput is limited to 1.3 Mbps, because TCP
window size is limited to 65KB.
Simulation Output:
After running simulation, check throughput in Application metrics. The throughput obtained in NetSimis
1.24Mbps. The reason for the slightly lower throughput is due to the time taken initially for window to
grow.
Part 2: TCP Model for a packet loss process:

3.5. Theory:

The simplest model in TCP that one can devise considers a periodic pattern in the dynamics of congestion
window and the packet losses in steady state. TCP window evolves according to genericdynamics common
to all TCP versions with each periodic loss event triggering a single, multiplicative window reduction.
Because the steady state situation is being considered, a maximum window sizeW is always achieved by
the time a packet is lost, which results in the window being reduced to W/2.The operation of the system in
steady state means that packet losses occur with constant probabilityp, so that, on average, 1/p packets are
transmitted into the network between each packet loss.

A trace of the window size results in a period saw tooth plot


The total number of packets transferred in a period would be the area underneath the trapezoidal shape of
the period
1𝑇 𝑊 𝑊
No of Packets = 2𝑅𝑇𝑇 ( 2 + 1 )

Because of constant loss probability, p, the number of packets is given by 1/p. And the time taken to increase
the window from W/2 to W is T = RTT. This gives us

1 𝑊 𝑊 𝑊
𝑝
= (
4 2
+ 1)

Solving this for W and applying that value of W gives us the average sending rate of TCP source, which is
the number of packets transmitted during each period is
1 3
Sending Rate = 𝑅𝑇𝑇 (√2𝑝)

where,
RTT – Round Trip Time
p – Packet Error Rate = 1 − (1 − 𝐵𝐸𝑅) 𝑃𝑎𝑐𝑘𝑒𝑡 𝑙𝑒𝑛𝑔𝑡ℎ
3.6. Procedure:

The following changes in settings are done from the previous sample:
Step 1: In the Link Properties for both the links, Uplink and Downlink Bit Error Rate is set to 0.000001.
Step 2: Packet Trace is enabled in the NetSim GUI and hence we are able to calculate the Layer- wise
Overheads which gets added in different layers of the TCP/IP Stack.
Step 3: Click on Run simulation. The simulation time is set to 100 seconds.

3.7. Observation:

Even though the packet size at the application layer is 1460 bytes, as the packet moves down the layers,
some overhead is added which results in a greater packet size. This is the actual payload that is transmitted
by the physical layer (1526 Bytes). The overheads added in different layers are shown in the table below
and can be obtained from packet trace:
Layer-wise Overhead (Bytes)
TRANSPORT LAYER 20
NETWORK LAYER 20
DATALINK LAYER 26
PHYSICAL LAYER 0
TOTAL 66

Therefore, the payload size = Packet Size + Overhead


= 1460 Bytes + 66 Bytes
= 1526 Bytes

3.8. Output II:


Theoretical Calculation:

The number of packets transmitted per second is


𝑋̅̅ = 1/𝑅𝑇𝑇√3/2𝑝

RTT = 4*100ms = 0.4 s


Packet length = 1526*8 = 12208 bits
Packet Error Rate = 1 − (1 − 0.000001)12208 = 0.012

= 1/0.4√ 3 = 27.95 packets per second


2∗0.012

Throughput (Mbps) = 27.95*1526*8 = 0.32Mbps

Simulation Output:

After running simulation, check throughput in Application metrics. The throughput obtained in NetSimis
0.26 Mbps. The reason for the slight difference in the results in that the theoretical model is a simplistic
model that does not factor in additional TCP features such as a) limits on the window size enforced by
thereceiver b) Timeouts c) Duplicate ack’s etc.
4. Study how throughput and error of a Wireless LAN network changes as the
distance between the Access Point and the wireless nodes is varied.
4.1. Introduction
In this experiment we will study the physical layer standard for IEEE 802.11b Wi-Fi. A physical layer
standard (abbreviated as PHY standard) defines the mechanism by which logical information bits are
transmitted over the wireless channel that has been allotted to the Wi-Fi system. Wi-Fi systems are confined
to working in an approximately 80MHz bandwidth in the 2.4GHz ISM band. Within thisbandwidth, any
particular Wi-Fi Access Point (AP) must choose to work in one of 13 channels, eachof nominal bandwidth
22MHz. In this experiment, we aim to study how the packet error performanceof an IEEE 802.11b AP-STA
connection varies as the distance between the AP and the STA varies.
4.2. Background
The IEEE 802.11b standard defines 4 digital modulation schemes for such channels. All are based on Direct
Sequence Spread Spectrum (DSSS) with a chipping rate of 11 million chips per second (11Mcps). An 11
chip Barker code yields 1 million symbols per second (1Msps). These symbols areDifferential Phase Shift
Keying modulated to get 1 bit per symbol, thereby yielding 1Mbps, and Quaternary Differential Phased
Keying modulated to get 2 bits per symbol, thereby yielding 2Mbps.In order to get 5.5Mbps and 11Mbps,
each symbol is made from 8 chips, so that the symbol rate is 1.375Msps. A technique called Complementary
Code Keying (CCK) then provides 4 bits per symbol,yielding 5.5Mbps, and 8 bits per symbol, which yields
11Mbps.
A simple qualitative fact is that, for a given signal to noise ratio at the receiver, as the modulation scheme
attempts to send more bits per second, the bit error probability increases. This happens because, as the bit
rate increases, the bit sequences that the receiver needs to distinguish betweenbecome closer packed, so that
bit errors become harder to resolve. The signal to noise ratio (SNR) at the receiver depends on the
transmission power, the attenuation of power from the transmitter tothe receiver, and noise power.

𝑃𝑟𝑒𝑐𝑒𝑖𝑣𝑒𝑑
𝑆𝑁𝑅 =
𝑁0𝑊

Where 𝑁0 is the noise power spectral density (W/Hz) and 𝑊 is the system bandwidth (nominally 22Mhz).
The noise power works out to approximately −100dBm. The received power (𝑃𝑟𝑒𝑐𝑒𝑖𝑣𝑒𝑑) is obtained by
subtracting the path-loss, between the transmitter and the receiver, from the transmitted power (e.g., 𝑃𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑡
= 0 dBm, would arise from a transmit power of 1mW). A simple expression forpath-loss is given by
𝑃𝑟𝑒𝑐𝑒𝑖𝑣𝑒𝑑 = 𝑃𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑡 − 𝑐0 − 10 𝜂 𝑙𝑜𝑔10 𝑑
where 𝑐0 is the path loss at the “reference” distance of 1m, 𝜂 is the path-loss exponent and 𝑑 is the distance
between the transmitter and the receiver. It may be noted that this deterministic expressionignores random
phenomena such as “shadowing” and “fading.”
As 𝑑 increases, the received power decreases; e.g., doubling the distance reduced the received power by
approximately 3𝜂, since log10 2 ≈ 0.3. Typical values of 𝜂, indoors, could be 3 to 5, resultingin 9dB to 15dB
additional path loss for doubling the value of 𝑑.
4.3. Network Setup

Open NetSim and click Examples > Experiments > Study-throughput-and-error-of-a-WLAN-


varies-with-distance > Sample-1 as shown below:

NetSim UI displays the configuration file corresponding to this experiment as shown below:

4.4. Procedure:
The following set of procedures were done to generate this sample.
Step 1: A network scenario is created in NetSim GUI comprising of 1 Wired Node, 1 Router, 1 Access
Point and 1 Wireless Node.
Step 2: In the Destination Node, i.e., Wireless Node 4, the Interface 1 (WIRELESS) > Physical Layer,
Protocol Standard is set to IEEE802.11b and in the Datalink Layer, Rate Adaptation is set to False.
Wireless Node 4Properties Access Point
X/Lat 200 200
Y/Lon 30 0
Interface Wireless properties
IEEE Standard 802.11b 802.11b
Rate _Adaptation False False
Step 3: In the Source Node, i.e., Wired Node 2 and in the Destination Node, i.e., Wireless Node 4,TCP
Protocol in the Transport Layer is disabled.
Step 4: Wired and Wireless links properties are set as follows:
Wireless Link Properties
Channel Characteristics Path loss only
Path Loss Model Log Distance
Path Loss Exponent 3
Wired Link Properties
Uplink Speed (Mbps) 100
Downlink Speed (Mbps) 100
Uplink BER 0.0000001
Downlink BER 0.0000001

Step 5: Right click on App1 CBR and select Properties or click on the Application icon present in the top
ribbon/toolbar.
A CBR Application is generated from Wired Node 2 i.e., Source to Wireless Node 4 i.e., Destination
with Packet Size set to 1450 Bytes and Inter Arrival Time set to 770 µs. It is set such that, the Generation
Rate equals to 15 Mbps.
Step 6: Packet Trace is enabled in NetSim GUI. At the end of the simulation, a very large .csv file is
containing all the packet information is available for the users to perform packet level analysis.
Similarly do the other samples by varying the distance between Access Point and Wireless Node as60, 85,
90, 100, 110, 115, 180, 260, 360, 400, 420, 440, 460, 480, and 500 m.
4.5. Output:
Note down the values of Data rate and Throughput for all the samples and compare with IEEE standards
Phy rate can be calculated using packet trace by using the formula shown below:

𝑃ℎ𝑦 𝑟𝑎𝑡𝑒 (802.11𝑏) = 𝑃ℎ𝑦_𝑙𝑎𝑦𝑒𝑟_𝑝𝑎𝑦𝑙𝑜𝑎𝑑 ∗ 8/(𝑝ℎ𝑦 𝑒𝑛𝑑 𝑡𝑖𝑚𝑒 − 𝑝ℎ𝑦 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 − 192)
192 micro seconds is the approximate preamble time for 802.11b
Calculate PHY rate for all the data packets coming from Access Point to Wireless node. For doing this please
refer section 7.5.1 How to set filters to NetSim Packet Trace file from NetSim’s User Manual. Filter Packet
Type to CBR, Transmitter to Access Point and Receiver to Wireless node.

Since 𝑷𝑬𝑹 = 𝟏 − (𝟏 − 𝑩𝑬𝑹) 𝑷𝑳 where PER is packet error rate, PL is packet length in bits and BER
is bit error rate, we get
𝑩𝑬𝑹 =𝟏− 𝒆 l 𝒐𝒈 (𝟏−𝑷𝑬𝑹)
𝑷𝑳

On tabulating the results, you would see


802.11b
Distance(m) PHY rate (Mbps) Application Packets Packets Packet error
(Channel capacity) Throughput(Mbps) Transmitted Errored probability
30 11 5.9276 5110 0 0
60 11 5.9276 5110 0 0
85 11 5.842920 5101 64 0.0125
90 11 5.53204 5063 294 0.058
100 5.5 3.78856 3266 0 0
110 5.5 3.78856 3266 0 0
115 5.5 3.64588 3253 110 0.033
180 2 1.6762 1445 0 0
260 2 1.6762 1445 0 0
360 2 1.66808 1445 7 0.004
400 2 1.48016 1436 160 0.110
420 1 0.89204 769 0 0
440 1 0.89204 769 0 0
460 1 0.89204 769 0 0
480 1 0.89204 769 0 0
500 0 0 0 0 0

Data Rate vs. Distance


12

10
Data Rate (Mbps)

0
30 60 85 90 100 110 115 180 260 360 400 420 440 460 480
Distance (m)

Application Throughput vs. Distance


Application Throughput (Mbps)

7
6
5
4
3
2
1
30 60 85 90 100 110 115 180 260 360 400 420 440 460 480 500
Distance (m)
Note: All the above plots highly depend upon the placement of nodes in the simulation environment. So, note thateven if the
placement is slightly different, the same set of values will not be got but one would notice a similar trend.

4.6. Inference:
We notice that as the distance increases, the 802.11b PHY rate (channel capacity decreases)
decreases. This is because the underlying data rate depends on the received power at the receiver.
𝑅𝑒𝑐𝑒𝑖𝑣𝑒𝑑 𝑃𝑜𝑤𝑒𝑟 = 𝑇𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑒𝑑 𝑃𝑜𝑤𝑒𝑟 − 𝑅𝐹 𝑙𝑜𝑠𝑠𝑒𝑠
RF losses are directly proportional to distance to the power of path loss exponent. As RF propagationlosses
increase, the received power decreases.
We can see that the rate drops from 11 Mbps to 5.5 Mbps at around 95m, and then to 2 Mbps at 175m
and to 1 Mbps at 415m (in this case the path loss exponent is set to 3.0). We also notice howthe packet
error rate increases with distance, then when the data rate changes (a lower modulationscheme is chosen),
the error rate drops. This happens for all the transitions i.e., 11 to 5.5, 5.5 to 2 and from 2 to 1 Mbps. One
must note that WLAN involves ACK packets after data transmission. These additional packet
transmissions led to reduced Application throughput of 5.9 Mbps (at lower distances) even though the
PHY layer data rate is 11 Mbps and the error rates is almost NIL. The application throughput is dependent
on the PHY rate and the channel error rate, and one can noticeit drops / rise accordingly.
5. Multi-AP Wi-Fi Networks: Channel Allocation.
5.1. Introduction

A single Wi-Fi Access Point (AP) can connect laptops and other devices that are a few 10s of metersdistance
from the AP, the actual coverage depending on the propagation characteristics of the building in which the
Wi-Fi network is deployed. Thus, for large office buildings, apartment complexes, etc., a single AP does
not suffice, and multiple APs need to be installed, each coveringa part of the building. We will focus on
2.4GHz and 5GHz systems. In each of these systems the available bandwidth is organized into channels,
with each AP being assigned to one of the channels.For example, 2.4GHz Wi-Fi systems operate in the band
2401MHz to 2495MHz, which has 14 overlapping channels each of 22MHz. There are 3 nonoverlapping
channels, namely, Channels 1, 6, and 11, which are centered at 2412MHz, 2437MHz, and 2462MHz.
Evidently, if neighboring APsare assigned to the same channel or overlapping channels they will interfere,
thereby leading to poorperformance. On the other hand, since there are only three nonoverlapping channels,
some care must be taken in assigning channels to APs so that nearby APs have nonoverlapping channels,
whereas APs that are far apart can use the same or overlapping channels.

In this experiment we will understand some basic issues that arise in multi-AP networks, particularlywith
attention to channel allocation to the APs.

5.2. Network Setup:

Open NetSim and click Examples > Experiments > Motivation-for-channel-allocation-in-WLAN as


shown below:

NetSim UI displays the configuration file corresponding to this experiment as shown below:
APs on the same channel:
Sample1:
The following set of procedures were done to generate this sample:
Step 1: A network scenario is designed in NetSim GUI comprising of 1 Wired Node, 1 L2 Switch, 3Wireless
Nodes and 3 Access Points in the “Internetworks” Network Library.
Step 2: The device positions are set as per the table given below:
General Properties
Device Name X Y
AP_1 15 5
AP_2 15 10
AP_3 15 15
Wireless_Node_6 20 5
Wireless_Node_7 20 10
Wireless_Node_8 20 20
Step 3: TCP is disabled in Wired Node 1.
Step 4: In the INTERFACE (WIRELESS) > PHYSICAL LAYER Properties of all the WirelessNodes and
Access Points, the Protocol Standard is set to IEEE 802.11 b.
Step 5: In all the Wired Link Properties, Bit Error Rate and Propagation Delay is set to 0.
Step 6: The Wireless Link Properties are set as follows:
Channel Characteristics PATH LOSS ONLY
Path Loss Model LOG DISTANCE
Path Loss Exponent 3.5
Step 7: Right click on the Application Flow App1 CBR and select Properties or click on theApplication
icon present in the top ribbon/toolbar.

A CBR Application is generated from Wired Node 1 i.e., Source to Wireless Node 6 i.e. Destinationwith
Packet Size set to 1460 Bytes and Inter Arrival Time set to 1168µs.

The Packet Size and Inter Arrival Time parameters are set such that the Generation Rate equals10 Mbps.
Generation Rate can be calculated using the formula:

𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑜𝑛 𝑅𝑎𝑡𝑒 (𝑀𝑏𝑝𝑠) = 𝑃𝑎𝑐𝑘𝑒𝑡 𝑆𝑖𝑧𝑒 (𝐵𝑦𝑡𝑒𝑠) ∗ 8/𝐼𝑛𝑡𝑒𝑟𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 (µ𝑠)


Similarly, two more CBR applications are generated.
Step 8: Run the Simulation for 10 Seconds and note down the throughput.
Sample2:
The following changes in settings are done from the previous sample:
Step 1: Before we start designing the network scenario, the Grid Length is set to 1000 meters.This can be
set by choosing the Menu Option Settings > Environment Settings > Grid from theGUI.
Step 2: From the previous sample, we have removed App2 CBR (i.e., from Wired Node1 to Wireless
Node7), set distance between the other 2 Access Points (AP 1 and AP 3) as 300m anddistance between APs
and Wireless nodes as 10m as shown below:

Step 3: The device positions are set according to the table given below:
General Properties
Device Name X Y
AP_1 400 0
AP_2 400 200
AP_3 400 400
Wireless_Node_6 410 0
Wireless_Node_7 410 200
Wireless_Node_8 410 400
Step 4: Run the Simulation for 10 Seconds and note down the throughput.
Sample3:
The following changes in settings are done from the previous sample:
Step 1: The distance between the Access Points (AP 1 and AP 3) is set to 150m and distancebetween APs
and Wireless nodes as 10m as shown below:

Step 2: The device positions are set according to the table given below:
General Properties
Device Name X Y
AP_1 400 0
AP_2 400 200
AP_3 400 400
Wireless_Node_6 410 0
Wireless_Node_7 410 200
Wireless_Node_8 410 400

Step 3: Run the Simulation for 10 Seconds and note down the throughput.
Sample4:
The following changes in settings are done from the previous sample:
Step 1: From the previous sample, we have removed App1 CBR (i.e., from Wired Node 1 to Wireless Node
6), set distance between the other 2 Access Points (AP 2 and AP 3) as 1500m anddistance between APs and
Wireless nodes as 10m as shown below:

Step 2: The device positions are set according to the table given below:
General Properties
Device Name X Y
AP_1 400 0
AP_2 400 200
AP_3 400 400
Wireless_Node_6 410 0
Wireless_Node_7 410 200
Wireless_Node_8 410 400
Step 3: Run the Simulation for 10 Seconds and note down the throughput.

Sample5:
The following changes in settings are done from the previous sample:
Step 1: From Sample 3, we have removed first and third applications as shown below:

Step 2: The device positions are set according to the table given below:
General Properties
Device Name X Y
AP_1 400 0
AP_2 400 200
AP_3 400 400
Wireless_Node_6 410 0
Wireless_Node_7 410 200
Wireless_Node_8 410 400
Step 3: Run the Simulation for 10 Seconds and note down the throughput.
APs in different channel:
The following changes in settings are done from the previous sample:
Step 1: In Sample 3, we have changed standard channel to 11_2462 under INTERFACE(WIRELESS) >
DATALINK LAYER Properties of AP 2.
Step 2: Run the Simulation for 10 Seconds and note down the throughput.
5.3. Output:

After running simulation, check throughput in Application metrics as shown in the below screenshot:

Sample Throughput (Mbps)


AP_1 AP_2 AP_3
All APs on the same channel
1 2.03 2.11 2.04
2 5.94 N/A 5.92
3 5.42 0.63 5.41
4 N/A 3.29 3.26
5 N/A 5.92 N/A
Each AP on a different nonoverlapping channel
1 5.94 5.92 5.92
NOTE: Please refer “Wi-Fi UDP Download Throughput” experiment for theoretical WLAN throughput
calculations in NetSim Experiment Manual.
5.4. Discussion

We recall that each AP is associated with one station (STA; e.g., a laptop). All the APs are connectedto the
same server which is sending separate UDP packet streams to each of the STAs via the corresponding AP.
The packet transmission rate from the server is large enough so that the AP queue in permanently
backlogged, i.e., the rate at which the server transmits packets is larger thanthe rate at which the AP can
empty the packet queue.

1. All APs on the same channel

Case 1: All the APs and their associated STAs are close together, so that all devices (APsand STAs)
can sense every other device.

The table shows that all the AP-STA links achieve the same UDP throughput. This isbecause all the AP-
STA links are equivalent (since all interfere with each other), and only one can be active at one time. The
throughput for this scenario can be predicted from the analysis in Section 7.4 of the book Wireless
Networking by Anurag Kumar, D. Manjunath and Joy Kuri.

Case 2: AP1 and AP3 are close to their associated STAs but are 400m apart. The link fromAP2 to its STA
is half-way between the other two APs, and is not carrying any traffic.

The table shows that both the links from AP1 and AP3 to their respective STAs carrythe same throughput,
of 5.94Mbps and 5.92Mbps. These are also the throughputs that each link would have if the other was not
present, indicating that the two links arefar enough apart that they do not interfere.
Case 3: This is the same scenario as Case 2, but the AP2-STA link is now carrying traffic
We find that, in comparison with Case2, the AP1-STA and AP3-STA carry slightly lower throughputs of
about 5.4Mbps, whereas the AP2-STA link carries a small throughput of 0.63Mbps. Comparing Cases 1 and
3 we conclude that in these networks there can be severe unfairness depending on the relative placement of
theAP-STA links. In Case 1, all the links could sense each other, and each got a fair chance. In Case 3, we
have what is called the “link-in-the-middle problem.” The AP2-STA link is close enough to interfere with
the AP1-STA link and the AP3-STA link, whereas the AP1-STA link and the AP3-STA link do not “see”
each other. The AP2- STA link competes with the links on either side, whereas the other links compete only
with the link in the center, which thereby gets suppressed in favor of the outer links.
Case 4: Here we stop the traffic to AP1 but send the traffic to the AP2-STA link and the AP3-STA link.
The two active links interfere with each other, but the situation is symmetric betweenthem (unlike in Case
3), and they obtain equal throughput. Again, the throughput obtained by these two links can be predicted by
the analysis mentioned earlier in thissection.
Case 5: Now we send traffic only to AP2.
The throughput is now 5.92Mbps, since the AP2-STA link can transmit without interference; there are no
collisions. The reason that this throughput is less than the sum of the two throughputs in Case 4 is that the
single link acting by itself, with all theattendant overheads, is unable to occupy the channel fully.

2. Each AP on a different nonoverlapping channel


There is only one case here. Having observed the various situations that arose in the previoussubsection when
all the APs are on the same channel, now we consider the case where all the AP-STA pairs are each on a
different nonoverlapping channel. As expected, every AP- STA pair gets the same throughput as when they
are alone on the network.
6. Plot the characteristic curve of throughput versus offered traffic for a Pure
and Slotted ALOHA system.

NOTE: NetSim Academic supports a maximum of 100 nodes and hence this experiment can only
be done partially with NetSim Academic. NetSim Standard/Pro would be required to simulate all
the configurations.

6.1. Theory:

ALOHA provides a wireless data network. It is a multiple access protocol (this protocol is for allocating a
multiple access channel). There are two main versions of ALOHA: pure and slotted. They differ with respect
to whether or not time is divided up into discrete slots into which all frames must fit.

Pure ALOHA:
In pure Aloha, time is continuous. In Pure ALOHA, users transmit whenever they have data to be sent. There
will be collisions and the colliding frames will be damaged. Senders need some way to find out if this is the
case. If the frame was destroyed, the sender just waits a random amount of timeand sends it again. The waiting
time must be random or the same frames will collide over and over,in lockstep. Systems in which multiple
users share a common channel in a way that can lead to conflicts are known as contention systems.
The probability of no other traffic being initiated during the entire vulnerable period is given by 𝑒−2𝐺
which leads to S= 𝐺 ∗ 𝑒−2𝐺 where, S (frames per frame time) is the mean of the Poisson distribution with
which frames are being generated. For reasonable throughput S should lie between0 and 0.5.
G is the mean of the Poisson distribution followed by the transmission attempts per frame time, old and new
combined. Old frames mean those frames that have previously suffered collisions.
The maximum throughput occurs at G = 0.5, with S = 1/2e, which is about 0.184. In other words, thebest we
can hope for is a channel utilization of18%. This result is not very encouraging, but with everyone
transmitting at will, we could hardly have expected a 100% success rate.

Slotted ALOHA:
In slotted Aloha, time is divided up into discrete intervals, each interval corresponding to one frame.
In Slotted ALOHA, a computer is required to wait for the beginning of the next slot in order to send the next
packet. The probability of no other traffic being initiated during the entire vulnerable period is given by 𝑒−𝐺
which leads to S = 𝐺 ∗ 𝑒−𝐺 where, S (frames per frame time) is the mean of the Poisson distribution with
which frames are being generated. For reasonable throughput S should liebetween 0 and 1.
G is the mean of the Poisson distribution followed by the transmission attempts per frame time, oldand new
combined. Old frames mean those frames that have previously suffered collisions.

It is easy to note that Slotted ALOHA peaks at G=1, with a throughput of or about 0.368. It means
that if the system is operating at G=1, the probability of an empty slot is 0.368.
Calculations used in NetSim to obtain the plot between S and G:
Using NetSim, the attempts per packet time (G) can be calculated as follows;

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑎𝑐𝑘𝑒𝑡 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑒𝑑 ∗ 𝑆𝑙𝑜𝑡 𝑙𝑒𝑛𝑔𝑡ℎ(𝑠)


𝐺=
𝑆𝑇
Where, G = Attempts per packet time
ST = Simulation time (in second)

The throughput (in Mbps) per packet time can be obtained as follows:
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑎𝑐𝑘𝑒𝑡 𝑢𝑐𝑒𝑠𝑠 ∗ 𝑆𝑙𝑜𝑡 𝑙𝑒𝑛𝑔𝑡ℎ(𝑠)
S=
𝑆𝑇

Where, S = Throughput per packet time


ST = Simulation time (in second)
In the following experiment, we have taken packet size=1460 (Data Size) + 28 (Overheads) = 1488 bytes.
Bandwidth is 10 Mbps and hence, packet time comes as 1.2 milliseconds.
(Reference: A good reference for this topic is Section 4.2.1: ALOHA, of the book, Computer Networking,
5th Edition by Tanenbaum and Wetherall)
6.2. Network Set Up:
Part-1
Open NetSim and click Examples > Experiments > Pure-and-Slotted-Aloha-System as shown below:
NetSim UI displays the configuration file corresponding to this experiment as shown below:

Sample Inputs:
Input for Sample 1: Drop 10 nodes (i.e., 9 Nodes are generating traffic.)
Node 2, 3, 4, 5, 6, 7, 8, 9, and 10 generates traffic. The properties of Node 2, 3, 4, 5, 6, 7, 8, 9, and10 which
transmits data to Node 1 are selected as follows
Wireless Node Properties:
Wireless Node Properties
Transport Layer
TCP disable
Interface1_Wireless (PHYSICAL_LAYER)
Data Rate(mbps) 10
Interface1_Wireless (DATALINK_LAYER)
Retry Limit 0
MAC_Buffer FALSE
Slot Length(µs) 1200
(Note: Slot Length(µs) parameter present only in Slotted Aloha -- Wireless Node Properties -- Interface_1
(Wireless).)

Right click on the Adhoc link and select the channel characteristics as no path loss.
Application Properties: Right click on the Application icon and set following properties as shownin below
figure:
Application_1 Properties
Application Method Unicast
Application Type Custom
Source_Id 2
Destination_Id 1
Packet Size Distribution Constant
Value (bytes) 1460
Inter Arrival Time Distribution Exponential
Packet Inter Arrival Time (µs) 200000

Similarly create 8 more application, i.e., Source_Id as 3, 4, 5, 6, 7, 8, 9 and Destination_Id as 1, setPacket


Size and Inter Arrival Time as shown in above table.
Simulation Time- 10 Seconds
Note: The Simulation Time can be selected only after doing the following two tasks,
• Set the properties of Nodes
• Then click on Run Simulation button
• Obtain the values of Total Number of Packets Transmitted and Collided from the results window
of NetSim

Input for Sample2: Drop 20 nodes (i.e. 19 Nodes are generating traffic.)
Nodes 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, and 20 transmit data to Node 1.
Continue the experiment by increasing the number of nodes generating traffic as 29, 39, 49, 59, 69,79, 89,
99, 109, 119, 129, 139, 149, 159, 169, 179, 189 and 199 nodes.
Part-2
Slotted ALOHA:
Input for Sample1: Drop 20 nodes (i.e., 19 Nodes are generating traffic.)
Nodes 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, and 20 transmit data to Node 1 and setproperties
for nodes and application as mentioned above.
Continue the experiment by increasing the number of nodes generating traffic as 39, 59, 79, 99, 119,139, 159,
179, 199, 219, 239, 259, 279, 299, 319, 339, 359, 379, and 399 nodes.
6.3. Output:

Comparison Table: The values of Total Number of Packets Transmitted and Collided obtained from the
network statistics after running NetSim simulation are provided in the table below along withThroughput per
packet time& Number of Packets Transmitted per packet time
Pure Aloha:
Number Total Total Total number Throughput Number of Packets per
of nodes number of number of Packets per packet Packets packet time
generating Packets of Success time(G) Transmitted theoretical
traffic Transmitted Packets (Packets per packet (S = 𝑮 ∗
Collided Transmitted time(S) 𝒆−𝟐𝑮)
-Packets
Collided)

9 494 60 434 0.05928 0.05208 0.05265


19 978 187 791 0.11736 0.09492 0.09281
29 1482 415 1067 0.17784 0.12804 0.12461
39 1991 700 1291 0.23892 0.15492 0.14816
49 2443 1056 1387 0.29316 0.16644 0.16311
59 2907 1429 1478 0.34884 0.17736 0.17363
69 3435 1834 1601 0.4122 0.19212 0.18075
79 3964 2377 1587 0.47568 0.19044 0.18371
89 4468 2902 1566 0.53616 0.18792 0.18348
99 4998 3468 1530 0.59976 0.1836 0.18073
109 5538 4073 1465 0.66456 0.1758 0.17592
119 6023 4574 1449 0.72276 0.17388 0.1703
129 6503 5102 1401 0.78036 0.16812 0.16386
139 6992 5650 1342 0.83904 0.16104 0.15668
149 7481 6208 1273 0.89772 0.15276 0.14907
159 7998 6787 1211 0.95976 0.14532 0.14078
169 8507 7341 1166 1.02084 0.13992 0.13252
179 9008 7924 1084 1.08096 0.13008 0.12442
189 9486 8483 1003 1.13832 0.12036 0.11682
199 10025 9093 932 1.203 0.11184 0.10848

Slotted Aloha:
Number of Total Total Total number Throughput Number of Packets per
nodes number of number of Packets per packet Packets packet time
generating Packets of Success time(G) Transmitted theoretical
traffic Transmitted Packets (Packets per packet (S = 𝑮 ∗ 𝒆−𝑮)
Collided Transmitted time(S)
-Packets
Collided)
19 974 111 863 0.11688 0.10356 0.10399
39 1981 407 1574 0.23772 0.18888 0.18742
59 2893 891 2002 0.34716 0.24024 0.24534
79 3946 1504 2442 0.47352 0.29304 0.29491
99 4976 2286 2690 0.59712 0.3228 0.32865
119 5996 3144 2852 0.71952 0.34224 0.3504
139 6961 3999 2962 0.83532 0.35544 0.36231
159 7971 4979 2992 0.95652 0.35904 0.36752
179 8969 5994 2975 1.07628 0.357 0.36686
199 9983 7042 2941 1.19796 0.35292 0.36156
219 10926 8011 2915 1.31112 0.3498 0.35337
239 11928 9073 2855 1.43136 0.3426 0.34207
259 12969 10224 2745 1.55628 0.3294 0.32825
279 13916 11266 2650 1.66992 0.318 0.31438
299 14945 12430 2515 1.7934 0.3018 0.29841
319 15967 13592 2375 1.91604 0.285 0.28202
339 17011 14765 2246 2.04132 0.26952 0.26508
359 17977 15895 2082 2.15724 0.24984 0.24947
379 18983 17010 1973 2.27796 0.23676 0.23348
399 19987 18146 1841 2.39844 0.22092 0.21792

Pure Aloha
Throughput per packet time

0.25
0.2
0.15
0.1
0.05
0
0.06
0.12
0.18
0.24
0.29
0.35
0.41
0.48
0.54
0.60
0.66
0.72
0.78
0.84
0.90
0.96
1.02
1.08
1.14
1.21

Packet Transmitted per packet time

Simulation Theory
Slotted Aloha

Throughput per packet time


0.4

0.3

0.2

0.1

0
0.12
0.24
0.35
0.47
0.60
0.73
0.84
0.96
1.08
1.20
1.31
1.43
1.56
1.67
1.79
1.92
2.04
2.16
2.28
2.40
Packet transmitted per packet time

Simulation Theory

Thus, the following characteristic plot for the Pure ALOHA and Slotted ALOHA is obtained, which
matches the theoretical result.
7. Quality of Service (QoS) in 802.11e based WLANs.
7.1. Theory:
IEEE 802.11e Medium Access Control (MAC) is a supplement to the IEEE 802.11 Wireless Local Area
Network (WLAN) standard to support Quality-of-Service (QoS). When 802.11e is enabled high-priority
traffic has a higher chance of being sent than low-priority traffic: an application with high priority traffic
waits a little less before its packet is processed and compared to an application with low priority traffic. The
various application traffic generated in NetSim have the following priority and QoS Values:
Application Type Priority Value Priority QoS Class
Voice – One way 8 Medium RTPS
Voice – Two way 8 High UGS
Video 6 Low nRTPS
FTP 2 Low BE
Database 2 Low BE
Custom 2 Low BE

eRTPS QoS class is available in NetSim which has a priority value of 4. The QoS class for eachapplication
mentioned in the table above is fixed and can be changed by the user.

7.2. Network Setup:


Open NetSim and click on Examples > Experiments > Quality-of-Service-in-802.11e > Sample-1 as shown below:
NetSim UI displays the configuration file corresponding to this experiment as shown below:

7.3. Procedure:

Sample 1: The following set of procedures were done to generate this sample:
Step 1: A network scenario is designed in NetSim GUI comprising of 1 Wired Node, 2 WirelessNodes, 1
Router, and 1 Access Point in the “Internetworks” Network Library.

Step 2: The device positions are set as per the below table:
Access Point 2 Wireless Node4 Wireless Node 5

X/Lat 250 300 250


Y/Lon 100 100 150
Step 3: TCP Protocol is set to Disable in all the devices.
Step 4: Wired Link Properties is set as follows:

Step 5: Go to Wireless Link Properties, the “Channel Characteristics” is set to NO PATHLOSS.

Step 6: In the Interface Wireless > Data Link Layer Properties of the Access Point, IEEE 802.11eis set to
Enable and Buffer Size is set to 5MB.
Step 7: Right click on the Application Flow App1 VOICE or App2 CBR and select Properties or clickon the
Application icon present in the top ribbon/toolbar.
A VOICE Application is generated from Wired Node 1 i.e. Source to Wireless Node 4 i.e. Destinationwith
Packet Size set to 1000 Bytes and Inter Arrival Time set to 800µs. The “Codec” parameter is set to Custom.
A CBR Application is generated from Wired Node 1 i.e. Source to Wireless Node 5 i.e. Destination with
Packet Size set to 1000 Bytes and Inter Arrival Time set to 800µs.
The Packet Size and Inter Arrival Time parameters are set such that the Generation Rate equals 10Mbps.
Generation Rate can be calculated using the formula:
𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑜𝑛 𝑅𝑎𝑡𝑒 (𝑀𝑏𝑝𝑠) = 𝑃𝑎𝑐𝑘𝑒𝑡 𝑆𝑖𝑧𝑒 (𝐵𝑦𝑡𝑒𝑠) ∗ 8/𝐼𝑛𝑡𝑒𝑟𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 (µ𝑠)
Step 8: Run the Simulation for 10 Seconds. Note down the Application Throughput.
Sample 2: The following changes in settings are done from the previous sample:
Step 1: In the Interface Wireless > Datalink Layer Properties of the Wireless Node 5 and AccessPoint,
IEEE 802.11e is set to Disable.
Step 2: Run the Simulation for 10 Seconds. Note down the Application Throughput.
7.4. Output:
IEEE 802.11e Application Generation Throughput Delay (Micro.
rate (Mbps) (Mbps) Sec.)
Enable Voice 10 3.22 945561.8
(Sample 1) CBR 10 2.14 6466262.9
Disable (Sample Voice 10 2.64 3672706.7
2) CBR 10 2.64 3671315.4

7.5. Inference:

In sample 1, since QoS is enabled, voice sees a higher priority than CBR. Hence voice packets in the queue
are first transmitted before CBR packets are transmitted. In sample 2, since QoS has been disabled, priority
is not considered for the applications. Hence, they both see the same throughput.
As an additional note, when QoS is enabled the throughput for voice is 3.22 Mbps and for CBR it is 2.14,
and when QoS is disabled the throughput for both is 2.64 Mbps per application or 5.28 Mbps for both
applications put together. This value of around 5.5 Mbps is the maximum throughput an 802.11b access
point can support. There is a slight drop in overall throughput when stations are present due to contention
between the two stations.
8. Study the hidden node problem in WLAN.
8.1. Theory:

Hidden nodes in a wireless network are nodes that are out of range of other nodes or a collection ofnodes. In
a wireless network, it is likely that the node at the far edge of the access point's range, which is known as A,
can see the access point, but it is unlikely that the same node can see a nodeon the opposite end of the access
point's range, C. These nodes are known as hidden.

The problem is when nodes A and C start to send packets simultaneously to the access point B. Because the
nodes A and C are out of range of each other and so cannot detect a collision while transmitting, Carrier
sense multiple access with collision detection (CSMA/CD) does not work, and collisions occur, which then
corrupt the data received by the access point.
To overcome the hidden node problem, RTS/CTS handshaking (IEEE 802.11 RTS/CTS) is implemented in
conjunction with the Carrier sense multiple access with collision avoidance (CSMA/CA) scheme.
The same problem exists in a MANET.
8.2. Network Setup:

Open NetSim and click on Examples > Experiments > Hidden-Node-Problem-in-WLAN >Sample-1 as
shown below:
NetSim UI displays the configuration file corresponding to this experiment as shown below:

8.3. Procedure:
Sample 1: The following set of procedures were done to generate this sample:

Step 1: A network scenario is designed in NetSim GUI comprising of 1 Wired Node, 2 Wireless
Nodes, 1 L2 Switch, and 1 Access Point in the “Internetworks” Network Library.
Step 2: The device positions are set as follows:
Access Point 2 Wireless Node 4 Wireless Node 5
X/Lat 250 150 350

Y/Lon 100 150 150

Step 3: In the Interface Wireless > Data Link Layer Properties of Access Point, “RTS Threshold” is set
to 3000.
In NetSim RTS CTS mechanism can be enabled or disabled in WLAN using RTS THRESHOLD
parameter. RTS CTS mechanism is enabled if the RTS THRESHOLD is less than the packet size. RTS
CTS mechanism is disabled if the RTS THRESHOLD is greater than the packet size.
Step 4: TCP Protocol is set to Disable in all the devices.
Step 5: Wireless Link Properties is set as follows:
Wireless Link Properties

Channel Characteristics Path Loss Only

Path Loss Model LOG_DISTANCE

Path Loss Exponent(n) 2

Step 6: Right click on the Application Flow App1 CBR or App2 CBR and select Properties or click on
the Application icon present in the top ribbon/toolbar.
A CBR Application is generated from Wireless Node 4 i.e., Source to Wired Node 1 i.e. Destination with
Packet Size remaining 1460 Bytes and Inter Arrival Time remaining 20000µs. Another CBR Application
is generated from Wireless Node 5 i.e., Source to Wired Node 1 i.e., Destination with Packet Size
remaining 1460 Bytes and Inter Arrival Time remaining 20000µs.

NOTE: Packet size here refers to the size of the packet along with the overheads added in the layers
above and not the application layer packet size.
Step 7: Run the Simulation for 10 Seconds.
Sample 2:
The following changes in settings are done from the previous sample:
Step 1: In the Interface Wireless > Data Link Layer Properties of Access Point, “RTS Threshold” is
set to 1000.
Step 2: Run the Simulation for 10 Seconds.
8.4. Output:
From the “Link Metrics” in the Results Dashboard, we can see the Data Packet and Control PacketCollisions.
A comparison table with and without RTS/CTS mechanism is given below:
Collided Packets Without RTS/CTS With RTS/CTS

Data Packets 22 0

Control Packets 0 20

8.5. Inference:
During simulations performed without RTS CTS mechanism enabled we notice data packet collisions. This
is because nodes Wireless Node 4 and Wireless Node 5 transmit in parallel as they are out of range of each
other. RTS CTS mechanism helps in avoiding data packet collisions with the help of RTS and CTS control
packets that are exchanged before attempting transmissions. However, there can be control packet collisions
which may involve, WLAN Ack's and RTS, CTS packets.
9. Study how call blocking probability varies as the load on a GSM network
is continuously increased.
9.1. Network Setup:

Open NetSim and click Examples > Experiments > Call-blocking-probability as shown below:

NetSim UI displays the configuration file corresponding to this experiment as shown below:

9.2. Procedure:

The following set of procedures were done to generate this sample:


Step 1: A network scenario is designed in NetSim GUI comprising of 4 Mobile Stations, 1 MSC,and 1
Base Station in the “Cellular Networks” Network Library.
Step 2: Ensure all the Mobile Stations are placed within the range of Base Station.

Step 3: In the Interface GSM > Data Link Layer Properties of MSC 2, Uplink BW Min and UplinkBW Max
are set to 890 MHz and 890.2 MHz respectively.
Step 4: Right click on the Application Flow App1 ERLANG CALL and select Properties or click onthe
Application icon present in the top ribbon/toolbar. The applications are set as per the below table:
Application Properties Application 1 Application2
Application type Erlang_call Erlang_call
Source_Id 3 5
Destination_Id 4 6
Call
Duration_ Distribution Exponential Exponential
Duration(s) 60 60
Inter Arrival Time (sec) 10 10
IAT_ Distribution Exponential Exponential
Codec Custom Custom
Inter Arrival Time distribution Constant Constant
Packet Distribution Constant Constant
Service Type CBR CBR
Packet Size 33 33
Inter Arrival Time (µs) 20000 20000

Step 5: Run the Simulation for 100 Seconds.


The following changes in settings are done from the previous sample:
Step 1: In the next sample, increase the number of Mobile Stations by 2 and add one moreapplication
between them.
Step 2: Run the Simulation for 100 Seconds.
The following changes in settings are done from the previous sample:
Step 1: Similarly, increase the number of Mobile Stations by 2 up to 20 and set properties for different
Samples by adding an application every time and changing Source ID and Destination ID. Step 2: Run the
Simulation for 100 Seconds.
9.3. Output

To view the output, go to the Cellular Metrics. In MS metrics, take sum of call blocking probability (Itis the
as ratio of Total call blocked to Total call generated).

Comparison Charts:
4
3
Call Blocking
Probability

2
1
0

1 2 3 4 5 6 7 8 9

Sample Number
All the above plots highly depend upon the placement of Mobile station in the simulation environment. So,
note that even if the placement is slightly different the same set of values will not be got but one would
notice a similar trend.
9.4. Inference:

When the number of MS is increased from 4 to 20 the call blocking probability increases from 0 to 3.46. As
we increase the number of mobile stations more calls are generated. This increases the traffic load on the
system & more calls generated implies more channel requests arrive at the basestation but the number of
channels is fixed. So, when the base station does not find any free channel, the call is blocked. An additional
observation is that the call blocking is zero until 8 MS. This is because the number of channels is sufficient
to handle all call that 6 MS may generate. Only after this the base station does not find free channels and
blocks calls.
10.Study how the throughput of LTE network varies as the distance between
the ENB and UE (User Equipment) is increased.
10.1. Theory:

LTE or Long-Term Evolution, commonly known as 4G LTE, is a standard for wireless communicationof high-
speed data for mobile phones and data terminals. It is based on the GSM/EDGE and UMTS/HSPA network
technologies, increasing the capacity and speed using a different radio interface.
The path loss in LTE is the decay of the signal power dissipated due to radiation on the wireless channels.
Path loss may be due to many effects, such as free space loss, refraction, diffraction, reflection, aperture-
medium coupling loss, and absorption.
Received power (Pr) can be calculated as:
Case 1: When no path loss Received power is same as Transmitted power, i.e., 𝑃𝑟 = 𝑃𝑡
Case 2: When Line of Sight is there, received power Pr is
𝜆 𝑑0
𝑃𝑟 = 𝑃𝑡 + 𝐺𝑡 + 𝐺𝑟 + 20 𝑙𝑜𝑔10 ( ) + 10 𝑛 𝑙𝑜𝑔10
4𝜋𝑑 𝑑

Where 𝑮𝒕 and 𝑮𝒓 are gains of transmitting and receiving antenna respectively. Here d is the distancebetween
transmitter and receiver, λ is the wavelength of the transmitted signal and 𝑑0 is reference distance at which
channel gain becomes 1. n is path loss exponent and 𝑃𝑡 is transmitted power.
10.2. Network Setup:

Open NetSim and click Examples > Experiments > Study-how-throughput-of-an-LTE-varies- with-
Distance > Sample-1 as shown below:
NetSim UI displays the configuration file corresponding to this experiment as shown below:

10.3. Procedure:

Sample 1: The following set of procedures were done to generate this sample:
NOTE: Before placement of any device grid length should be increased and it should be 10000 meters
X 10000meters. Click on Environment Settings present in the ribbon and set grid length as 10000.

Step 1: A network scenario is designed in NetSim GUI comprising of 1 User Equipment, 1 ENB, 1
MME, 1 Router, and 1 Wired Node in the “LTE/LTE-A” Network Library.

Step 2: TCP Protocol is disabled in Wired Node 1.

Step 3: The device positions are set as per the below table:
ENB 4 UE 5
X/Lat 0 50

Y/Lon 0 50

Step 4: In the Interface LTE > Physical Layer > CA1 and CA2 Properties of ENB 4, Channel
Bandwidth is set to 20 MHz for both the carriers.
Step 5: In the General Properties of UE 5 “Velocity (m/s)” parameter is set to 0.
Step 6: The Wired Link Properties are set as follows:
Link Properties Wired Link 2 Wired Link 3 Wired Link 4
Uplink Speed (Mbps) 100 100 100
Downlink Speed(Mbps) 100 100 100

Uplink BER 0 0 0

Downlink BER 0 0 0

Up Time N/A 0 0

Down Time N/A 0 0

Uplink PropagationDelay (microsec) 0 0 0


Downlink PropagationDelay (microsec) 0 0 0

Step 7: The Wireless Link Properties are set as follows:


Link Properties Wireless Link 1
Channel characteristics Path Loss Only
Path Loss Model Log Distance
Path loss Exponent(n) 4
Step 8: Right click on the Application Flow App1 CUSTOM and select Properties or click on the
Application icon present in the top ribbon/toolbar.
A CUSTOM Application is generated from Wired Node 1 i.e., Source to UE 5 i.e., Destination with
Packet Size set to 1460 Bytes and Inter Arrival Time set to 165 µs.

The Packet Size and Inter Arrival Time parameters are set such that the Generation Rate equals 70Mbps.
Generation Rate can be calculated using the formula:

𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑜𝑛 𝑅𝑎𝑡𝑒 (𝑀𝑏𝑝𝑠) = 𝑃𝑎𝑐𝑘𝑒𝑡 𝑆𝑖𝑧𝑒 (𝐵𝑦𝑡𝑒𝑠) ∗ 8/𝐼𝑛𝑡𝑒𝑟𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 (µ𝑠)


Step 9: Run the Simulation for 10 Seconds. Under Packet Animation, Don’t Play or Record
Animation option is selected for the simulation to run faster.

NOTE: If users wish to view the packet animation, then select Record Animation option.
Sample 2:
The following changes in settings are done from the previous sample for the remaining samples:

Step 1: The device positions are changed as follows:


Change in UE Properties: (x, y)
Sample 2 (100, 100)
Sample 3 (150,150)
Sample 4 (200,200)
Sample 5 (250,250)
Sample 6 (300,300)
Sample 7 (350,350)
Sample 8 (400,400)

10.4. Output:

Step 1: Distance calculation:


Calculate the Distance between ENB (x1, y1) and UE (x2, y2) as follows: √(x2-x1)2+ (y2-y1)2 For
example, for Sample 1:
ENB (x1, y1) = (0, 0); UE (x2, y2) = (50, 50);
Distance = √ (50-0)2+ (50-0)2 = √2 × 50 = 50√2 meters.
Step 2: Open any Excel File and note down the distance between the UE and ENB and the
throughput values as shown below:

Sample Distance between UE and ENB (meters) Throughput (Mbps)


1 50√2 = 70.71 68.8
2 100√2 = 140.42 61.1
3 150√2 = 212.13 54.3
4 200√2 = 282.84 47.3
5 250√2 = 353.55 30.2
6 300√2 = 424.26 19.6
7 350√2 = 494.97 15.6
8 400√2 = 565.68 12.1

Comparison Chart:

80
Throughput(Mbps)

70
60
50
40
30
20
10
0
70.71140.42212.13282.84353.55424.26494.97565.68
Distance between UE and ENB(m)
To draw these graphs by using Excel “Insert --Chart” option and then select chart type as “Line chart”.
10.5. Inference:

As the distance increases between ENB and UE, throughput decreases. The reason is that as the distance
increases between the devices, the received signal power decreases, and the LTE Phy Rate drops as the
signal power reduces.
11.Study how the throughput of LTE network varies as the Channel
bandwidth changes in the ENB (Evolved node).
11.1. Theory:

LTE or Long-Term Evolution, commonly known as 4G LTE, is a standard for wireless communicationof high-
speed data for mobile phones and data terminals. It is based on the GSM/EDGE and UMTS/HSPA network
technologies, increasing the capacity and speed using a different radio interface.
LTE supports flexible carrier bandwidths, from 1.4 MHz up to 20 MHz as well as both FDD and TDD.LTE
designed with a scalable carrier bandwidth from 1.4 MHz up to 20 MHz which bandwidth is useddepends on
the frequency band and the amount of spectrum available with a network operator.
11.2. Network Setup:

Open NetSim and click Examples > Experiments > Study-how-throughput-of-an-LTE-varies- with-
Channel-Bandwidth > Sample-1 as shown below:

NetSim UI displays the configuration file corresponding to this experiment as shown below:
11.3. Procedure:

The following set of procedures were done to generate this sample:


Step 1: A network scenario is designed in NetSim GUI comprising of 3 User Equipment’s, 1 ENB,1
MME, 1 Router, and 1 Wired Node in the “LTE/LTE-A” Network Library.
Step 2: TCP Protocol is set to Disable in Wired Node 1.
Step 3: In the Interface LTE > Physical Layer, Carrier Aggregation is set to Inter BandNoncontiguous
CA.
In the Interface LTE > Physical Layer > CA1 and CA2 Properties of ENB 4, Channel Bandwidthis set
to 10 MHz for both the carriers.

Step 4: In the General Properties of all the UE’s “Velocity (m/s)” parameter is set to 0.
Step 5: The Wired Link Properties are set as follows:
Link Properties Wired Link 1 Wired Link 2 Wired Link 3
Uplink Speed (Mbps) 1000 1000 1000
Downlink Speed (Mbps) 1000 1000 1000
Uplink BER 0 0 0
Downlink BER 0 0 0
Step 6: In the Wireless Link Properties, Channel Characteristics is set to NO PATHLOSS.
Step 7: Three CUSTOM Applications are configured as per the table given below:
Application Properties Application 1 Application 2 Application 3
Application Type Custom Custom Custom
Source ID Wired Node 1 Wired Node 1 Wired Node 1
Destination ID UE 5 UE 6 UE 7
Packet Size

Distribution Constant Constant Constant


Value(Bytes) 1460 1460 1460
Inter Arrival Time
Distribution Constant Constant Constant
Value(µs) 146 146 146

Step 8: Run the Simulation for 10 Seconds.


The following changes in settings are done from the previous sample for the remaining samples:
Sample 2:
Step 1: In the Interface LTE > Physical Layer > CA1 and CA2 Properties of ENB 4, Channel
Bandwidth is set to 10 and 5 MHz respectively.
Step 2: Run the Simulation for 10 Seconds.
Sample 3:
Step 1: In the Interface LTE > Physical Layer > CA1 and CA2 Properties of ENB 4, Channel
Bandwidth is set to 5 and 5 MHz respectively.
Step 2: Run the Simulation for 10 Seconds.

11.4. Output

Add the sum of all throughput values in each sample case:


Example: Sample 1
Application Id Throughput (Mbps)
1 23.177
2 23.177
3 23.177
Sum 69.531

Same procedure can be followed for the other samples.


Open any Excel file and note down the sum of applications throughput values as shown in below table:
Sample Channel Bandwidth (MHz) Throughput (Mbps)
1 20 69.53
2 15 52.11
3 10 34.7
Comparison Chart:
To draw these graphs by using Excel “Insert --Chart” option and then select chart type as “Line chart”.
Throughput(Mbps)

80
70
60
50
40
30
20
10
0
20 15 10

Channel Bandwidth (MHz)

11.5. Inference
LTE provides spectrum flexibility with scalable transmission bandwidth between 1.4 MHz and 20 MHz
depending on the available spectrum for flexible radio planning. The 20 MHz bandwidth can provide up
to 150 Mbps downlink user data rate and 75 Mbps uplink peak data rate with 2×2 MIMO,and 300 Mbps
with 4×4 MIMO.
As the channel bandwidth decreases the number of resource blocks also decreases. If more resource
blocks are available then a greater number of packets can be transmitted.
12. Simulate and study LTE Handover procedure.
12.1. Introduction:
As defined by 3GPP, handover is a procedure for changing the serving cell of a UE. The two eNodeBs
involved in the process are typically called the source eNB (S-eNB) and the target eNB (T-eNB). In
NetSim, handover procedure is triggered “automatically” by the serving eNodeB of the UE.
12.2. Description and Definitions:

1. Data packets are transferred to/from the UE to/from the network in both directions (Downlinkas well
as Uplink)
2. The network sends the MEASUREMENT CONTROL REQ message to the UE to set the parameters
to measure and set thresholds for those parameters. Its purpose is to instruct the UE to send a
measurement report to the network as soon as it detects the thresholds.
3. The UE sends the MEASUREMENT REPORT to the Serving eNB, which contains the RQRSfrom
all the nearby eNBs. The Serving eNB makes the decision to hand off the UE to a T- eNB (Target-
eNB) using the handover algorithm mentioned in the Introduction
4. The S-eNB then initiates the decision to handover using the X2 interface.

5. The S-eNB issues a HANDOVER REQUEST message to the T-eNB passing necessary information
to prepare the handover at the target side
6. The T-eNB sends back the HANDOVER REQUEST ACKNOWLEDGE message including a
transparent container to be sent to the UE as an RRC message to perform the handover.
7. The S-eNB generates the RRC (Radio resource control used for signaling transfer) message to
perform the handover, i.e., RRC CONNECTION RECONFIGURATION message including the
mobility Control Information.
8. The S-eNB starts forwarding the downlink data packets to the T-eNB for all the data bearerswhich
are being established in the T-eNB during the HANDOVER REQ message processing.

9. The T-eNB now requests the S-eNB to release the resources. With this, the handover procedure is
complete.
12.3. Analysis/Algorithm:

NetSim handover algorithm utilizes the Reference Signal Received Quality (RSRQ)
measurements,to trigger the handover. When the target eNB’s RSRQ crosses the serving
eNB’s RSRQ by a factorknow as margin of handover (equal to 3dB), hand over is triggered.
12.4. Network Setup:

Open NetSim and click Examples > Experiments > Simulate-and-Study-LTE-Handover-


Procedure > Sample-1 as shown below:

NetSim UI displays the configuration file corresponding to this experiment as shown below:
12.5. Procedure:
The following set of procedures were done to generate this sample:
Step 1: A network scenario is designed in NetSim GUI comprising of 2 ENBs, 1 MME, and
2 UEsin the “LTE/LTE-A” Network Library.

Step 2: The device positions are set as per the table given below:
ENB 1 ENB 2 UE 3 UE 4
X Co-ordinate 1000 4000 1000 4000
Y Co-ordinate 1500 1500 3000 3000
Step 3: In the General Properties of UE 3 and UE 4, set Mobility Model as File Based
Mobility.
Step 4: Right click on the Wireless Link 3 and select Properties, the following is set:

Similarly, it is set for Wireless Link 4.


Step 5: Right click on the Application Flow App1 CBR and select Properties or click on theApplication
icon present in the top ribbon/toolbar.

A CBR Application is generated from UE 3 i.e., Source to UE 4 i.e. Destination with Packet Size
remaining 1460Bytes and Inter Arrival Time remaining 20000µs. Additionally, the “Start Time(s)”
parameter is set to 20, while configuring the application.
File Based Mobility:
In File Based Mobility, users can write their own custom mobility models and define the movement of
the mobile users. Create a mobility.txt file for UE’s involved in mobility with each step equal to 0.5 sec
with distance 50 m. The file present in the Docs folder of NetSim Install directory
<C:\ProgramFiles\NetSim
Standard\Docs\Sample_Configuration\NetSim_Experiment_Manual\Experiment-23-LTE-
Handover\Sample-1>. For more information, please refer section 3.3.4 “File Based Mobility Format”
under MANET Technology Library as shown below:

The NetSim Mobility File format is as follows:mobility.txt


#Initial position of the UE 3
$node_(2) set X_ 1000.0
$node_(2) set Y_ 3000.0
$node_(2) set Z_ 0.0 #Initial position of the UE 4
$node_(3) set X_ 4000.0
$node_(3) set Y_ 3000.0
$node_(3) set Z_ 0.0
#Positions of the UE 3 at specific time

$time 0.0 "$node_(2) 1000.0 3000.0 0.0"


$time 0.5 "$node_(2) 1050.0 3000.0 0.0"
$time 1.0 "$node_(2) 1100.0 3000.0 0.0"
$time 1.5 "$node_(2) 1150.0 3000.0 0.0"
$time 2.0 "$node_(2) 1200.0 3000.0 0.0"
$time 2.5 "$node_(2) 1250.0 3000.0 0.0"
$time 3.0 "$node_(2) 1300.0 3000.0 0.0"
$time 3.5 "$node_(2) 1350.0 3000.0 0.0"
$time 4.0 "$node_(2) 1400.0 3000.0 0.0"
$time 4.5 "$node_(2) 1450.0 3000.0 0.0"
$time 5.0 "$node_(2) 1500.0 3000.0 0.0"
$time 5.5 "$node_(2) 1550.0 3000.0 0.0"
$time 6.0 "$node_(2) 1600.0 3000.0 0.0"
$time 6.5 "$node_(2) 1650.0 3000.0 0.0"
$time 7.0 "$node_(2) 1700.0 3000.0 0.0"
$time 7.5 "$node_(2) 1750.0 3000.0 0.0"
$time 8.0 "$node_(2) 1800.0 3000.0 0.0"
$time 8.5 "$node_(2) 1850.0 3000.0 0.0"
$time 9.0 "$node_(2) 1900.0 3000.0 0.0"
$time 9.5 "$node_(2) 1950.0 3000.0 0.0"
$time 10.0 "$node_(2) 2000.0 3000.0 0.0"

10. A data call is established between the UE, S-eNB (Source-eNB) and the network
elements. $time 10.5 "$node_(2) 2050.0 3000.0 0.0"
$time 11.0 "$node_(2) 2100.0 3000.0 0.0"
$time 11.5 "$node_(2) 2150.0 3000.0 0.0"
$time 12.0 "$node_(2) 2200.0 3000.0 0.0"

$time 12.5 "$node_(2) 2250.0 3000.0 0.0"


$time 13.0 "$node_(2) 2300.0 3000.0 0.0"
$time 13.5 "$node_(2) 2350.0 3000.0 0.0"
$time 14.0 "$node_(2) 2400.0 3000.0 0.0"
$time 14.5 "$node_(2) 2450.0 3000.0 0.0"
$time 15.0 "$node_(2) 2500.0 3000.0 0.0"
$time 15.5 "$node_(2) 2550.0 3000.0 0.0"
$time 16.0 "$node_(2) 2600.0 3000.0 0.0"
$time 16.5 "$node_(2) 2650.0 3000.0 0.0"
$time 17.0 "$node_(2) 2700.0 3000.0 0.0"
$time 17.5 "$node_(2) 2750.0 3000.0 0.0"
$time 18.0 "$node_(2) 2800.0 3000.0 0.0"
$time 18.5 "$node_(2) 2850.0 3000.0 0.0"
$time 19.0 "$node_(2) 2900.0 3000.0 0.0"
$time 19.5 "$node_(2) 2950.0 3000.0 0.0"
$time 20.0 "$node_(2) 3000.0 3000.0 0.0"
$time 20.5 "$node_(2) 3050.0 3000.0 0.0"
$time 21.0 "$node_(2) 3100.0 3000.0 0.0"
Step 6: Packet Trace is enabled in NetSim GUI. At the end of the simulation, a very large .csv file is
containing all the packet information is available for the users to perform packet level analysis.
Step 7: Run the Simulation for 50 Seconds.

12.6. Measurements and Outputs

Open Packet Animation:

As UE moves from one position to another it sends measurement report to each ENB in range. As it
moves SNR received by each ENB keeps on changing based on distance between ENB and UE. If the
difference between SNR received by new ENB to that of old ENB to which it is connected is greater at
that point handover occurs.
12.7. Inference

1. As shown in the above packet animation table, UE 3 connected to eNB 1 and


UE 4,connected to eNB 2
2. UE 3 is moving from eNB 1 to eNB 2 due to mobility

3. Then UE 3 sends the LTE_Measurement_Report to eNB 1.

4. The eNB 1 sends a LTE_Handover_Request message to the eNB 2, if the received SNR
byeNB 2 is greater than eNB 1, by 3dB (margin of handover)
5. eNB 2 checks for resource availability and sends a LTE_Handover_Request_Ack
messageto the eNB 1
6. Now UE 3 starts communicating with eNB 2 shown in the above screenshot
12.8. Additional Notes & References:
To calculate and print SNR for each pair of eNB-UE combination please refer NetSim
knowledgebase article

(https://tetcos.freshdesk.com/solution/articles/14000037296-how- can-i-print-snr-cqi-mcs-
index-and-tbs-index-value-to-a-file-)

If the wireless links have no path loss set, then there will never be any handovers because
the received power from all eNB’s will be the same.

You might also like