WLAN Lab Script
WLAN Lab Script
1 Introduction 5
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Preparation and evaluation of the experiment . . . . . . . . . . . 6
2 Theoretical Basics 7
2.1 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Network structure . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 ISO/OSI reference model . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Physical layer . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.2 Data link layer . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.3 Network layer . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.4 Transport layer . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.5 Application oriented layers . . . . . . . . . . . . . . . . . 12
2.4 The IEEE 802.11 standards series . . . . . . . . . . . . . . . . . . 12
2.4.1 Physical layer . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.2 MAC layer . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 Parameters to describe the WLAN performance . . . . . . . . . . 17
3 Preparatory Problems 19
6 Evaluation Problems 27
A Abbreviations 29
B References 31
4 CONTENTS
Chapter 1
Introduction
1.1 Motivation
In recent years, the demand for wireless local networks (WLAN) has rapidly
increased. The development of the 802.11 standards series by the Institute of
Electrical and Electronics Engineers (IEEE) enabled the dissemination of wire-
less WLAN products in the mass market by ensuring interoperability between
wireless devices of different vendors. The University of Bremen was one of the
first German universities which became equipped with wireless LAN. The ad-
vantages of WLAN are:
wireless nodes can be connected with each other directly, without infras-
tructure, i. e. switches.
higher cost,
lower bandwidth,
interference by other radio applications in the same frequency band (e. g.,
microwave ovens, Bluetooth, ZigBee, HomeRF).
Considering the pros and cons shows that wireless networks cannot replace
wired networks, they can only be a supplement. In this student’s lab, the be-
haviour of a WLAN shall be investigated in a real-life experiment and in a
simulation. A major focus is the reduction of the throughput due to a degra-
dation of the reception quality.
5
6 CHAPTER 1. INTRODUCTION
Theoretical Basics
2.1 Standards
When the first wireless LANs appeared, only proprietary solutions were avail-
able. Later, new standards were developed by the IEEE (Institute of Electrical
and Electronics Engineers) and the European ETSI (European Telecommu-
nications Standards Institute). While the ETSI Hiperlan standard only was
theoretically defined, the 802.11 standard of the IEEE was available in com-
mercial products. Both standards support data rates of 2 Mbit/s and work in
the 2.4 GHz band. The IEEE 802.11 standard was updated some years later:
IEEE 802.11b, which is considered in this experiment, supports data rates up
to 11 Mbit/s in the 2.4 GHz band. Even though a large number of enhanced
versions of the standard have meanwhile been developed, any WLAN device
still is able to fall back to 802.11b in case of bad channel conditions. Further
versions of the standard based on OFDM (Orthogonal Frequency Division Mul-
tiplex) provide 54 Mbit/s on 2.4 GHz (802.11g) and on 5 GHz (802.11a), as well
as 600 Mbit/s (802.11n) and several Gbit/s (802.11ac and ad). Since 802.11g
and 802.11b work on the same frequency band, hardware which supports both
802.11g and 802.11b can be easily manufactured so that compatibility with older
devices which only support 802.11b is provided. In 2009, another enhanced ver-
sion called 802.11n has been released which achieves gross speeds up to 600
Mbit/s using, among other measurements, multiple antennas at the sender and
the receiver. In this way, there is more than one transmission path between the
sender and the receiver available so that the capacity of the transmission link
is increased. Further, the channel access scheme is also improved by aggregat-
ing multiple frames and thus reducing transmission overhead caused by waiting
periods and packet headers. Finally, the newly released standards 802.11ac and
802.11ad provide speeds in the Gbit/s range.
While the 802.11 extensions described up to now define best-effort networks
which do not provide any guarantee for Quality-of-Service (QoS) parameters
such as a minimum thoughput or a maximum delay, another IEEE 802.11 ex-
tension called IEEE 802.11e was defined which supports QoS.
7
8 CHAPTER 2. THEORETICAL BASICS
services to higher layers. For this, a communication between two layers n and
n + 1 is needed. Moreover, one layer of a particular entity can communicate
with the layer of another entity by a so-called peer-to-peer protocol.
In the following paragraphs, the tasks of the individual layers are described
using a data transfer by the TCP/IP protocol.
bitwise modulation with Manchester coding (constant bit values will not
result in a constant sending signal); voltage level between −2.2 and 0 V,
Error correction. In the OSI reference model, the LLC layer maintains the
error detection and correction by ARQ (automatic repeat request). Errors are
detected at the receiver, using checksums. In case of an error, the damaged
packet is retransmitted. In contrast to this, in the IEEE 802 protocol stack, the
error detection and ARQ is maintained by the MAC sublayer.
radio channels from losses due to congestion, the reaction is the same in both
cases. In case of a packet loss due to a bad channel, this behaviour, however,
will result in an unnecessary reduction of the throughout.
Since there is no connection setup or flow control in case of the connectionless
UDP, a higher throughput can be achieved. Since packets can be lost when
using UDP, this protocol is only suitable for simple applications based on a
request/response scheme.
FHSS. The frequency hopping method changes the carrier frequency at con-
stant time intervals between a number of subchannels, according to a prede-
fined hopping sequence. The hopping sequence must be synchronised between
the sender and the receiver. Even though this method is no longer supported
in the current WLAN standards, it is used for example in Bluetooth.
DSSS. The direct sequence spread spectrum method is used in the radio
network which is used in the experiment. The spreading can for example be
done by a XOR calculation between the user data bit sequence and a random
data sequence.
1 0
1 bit 1 bit
0100100011110110111000
1011011100010110111000
11 chips 11 chips
The random data sequences are not true random, but PN (pseudo random nu-
merical) sequences which can be restored at the receiver. To achieve spreading,
14 CHAPTER 2. THEORETICAL BASICS
the PN sequences must have a higher clock rate than the data sequences. The
spreading sequence in figure 2.6 has 11 signals inside a data bit; this is referred
to as 11 chips per bit. This data stream (11 Mchips/s at a user data rate of 1
Mbit/s) is modulated with a DBPSK (Differential Binary Phase Shift Keying)
and despread with the same sequence at the receiver after the demodulation.
For the transmission of this data sequence an RF bandwidth of 22 MHz is re-
quired.
To implement higher data rates, other modulation schemes such as DQPSK
(Differential Quadrature Phase Shift Keying) are used. In this modulation
scheme, the chiprate is constant, however, the data rate is doubled, since the
chips can be allocated in the complex-valued symbol space, in contrast to the
real-valued symbol space used for DBPSK.
The further modulation schemes are given in table 2.1.
For the transmission with 5.5 and 11 Mbit/s, a modulation scheme called Com-
plementary Coded Keying (CCK) is used. The basic idea is that so called com-
plementary sequences are stored in a table and particular user data sequences
are related to one of these chip sequences. In the second step, two further send-
ing data bits are used for the rotation of the complex signal space. In figure 2.7,
this principle is depicted using the example of a 11 Mbit/s transmission.
When using a higher-rate modulation scheme, it must be considered that the
requirements for the channel increase with the data rate. Thus, a WLAN system
will switch down to a modulation scheme with a lower data rate, but a higher
robustness, if the conditions of the channel become poor.
In figure 2.8 it is shown that a narrowband noise on the transmission channel
becomes broader after the despreading. Most of the noise can be filtered.
In the ISM band from 2400 to 2483.5 MHz, exactly three channels can be used
without overlapping. The DSSS method also allows an overlapping of channels,
so that 13 channels are provided in the standard (figure 2.9).
Another important feature of the physical layer is link adaptation. This means
that the device automatically selects the modulation scheme according to the
channel conditions. The better the C/I on the channel is, the faster can be the
modulation scheme.
Interframe space. If, in case of the free channel, all stations which are ready
to send would start to send at once, the probability for a collision would be high.
To prevent this, the stations must not start the transmission before a priority-
dependent waiting period (IFS, Interframe Space) has expired. Transmission
requests with a high priority, i. e. management data like an acknowledgement,
use a SIFS (Short Interframe Space); transmission requests with lower priority
(normal data frames) wait for the duration of a DIFS (Distributed Coordination
Function Interframe Space) before they start the transmission. After the DIFS
has expired, a backoff process is started, where each terminal determines an
equally distributed random number between 0 and a contention window (CW).
The backoff time results from the multiplication of this random number with
the time slot interval. If the channel is idle, the backoff time is reduced by one
slot interval. When the backoff timer has expired, the transmission is started.
This method (see also fig. 2.10) cannot entirely prevent collisions, however, the
collision probability can be reduced. After a correct transmission the receiver
sends an acknowledgement to the sender. If there is no acknowledgement, the
backoff process is restarted. For collision avoidance, after each transmission
error, the contention window size is doubled.
Virtual carrier sense with RTS and CTS. For performance reasons, colli-
sion detection would be the preferred method in contrast to collision avoidance,
as it is the case for wired LANs. However, in case of wireless LANs, it cannot
be assumed that each station can hear each other station. Hence, it cannot
be guaranteed that each of the stations in a network can detect a collision.
Moreover, simultaneous sending and receiving is not possible in radio networks,
which would be another requirement for a collision detection.
Consider fig. 2.11: When station A sends a packet to station B, station C does
not note this event and will as well send a packet to B, which will result in
a collision. Hence, a virtual carrier sense has been introduced, which works as
follows: first, station A sends a short RTS frame (Ready To Send) to station B.
B responds with a CTS (Clear To Send). All other stations (including C) now
know that the channel is busy. Besides the information about the busy state of
the channel, all stations not participating in the current communication are also
informed for what time duration the channel will presumably be busy. Since no
transmissions are allowed during this time, collisions of the data packets can be
excluded. When transferring the RTS frames, collisions still can appear. In this
case, the RTS/CTS procedure is restarted after the backoff. The disadvantage
of this handshake method is the additional overhead which will take effect
2.5. PARAMETERS TO DESCRIBE THE WLAN PERFORMANCE 17
Latency time: the time which elapses between the beginning of the sending
of a data packet and the reception of the acknowledgement.
Chapter 3
Preparatory Problems
Problem 1
Why is in general no collision detection possible in a radio network?
Problem 2
Will, in case of poor reception, the deviation of the throughput and the latency
time be the worse or equal in comparison to the situation of good reception?
Give reasons.
Problem 3
Will, in case of poor reception, the absolute value and the deviation of the
latency time be higher for a TCP or a UDP connection? Give reasons.
Problem 4
Why is it useless to measure the packet loss rate of a TCP connection? Give
reasons.
Problem 5
Why is it useful to assign different, non-overlapping frequency channels to neigh-
boring radio cells?
Problem 6
Determine the average theoretical throughput of payload (in kbyte/s) for a
Wireless LAN connection between an access point and a mobile station. Data
packets are sent from the access point to the mobile station which responds to
each data packet with an acknowledgement. The data packets have a 24-byte
PHY header which is transmitted with a physical bitrate of 1 Mbit/s; after that,
the MAC header (34 bytes) and the user payload (1500 bytes) are transmitted
with a bitrate of 11 Mbit/s. After receiving the data packet, the mobile station
waits for a fixed-length break of 10 microseconds before sending the acknowl-
edgement packet. The acknowledgement includes a 20-byte PHY header which
19
20 CHAPTER 3. PREPARATORY PROBLEMS
Problem 7
How does an incorrectly selected PN sequence affect the decoding at the re-
ceiver? Illustrate the effect in a graphical way by spreading a data sequence
{1 0 1} with the spreading sequence {1 0 0 1 0 1 1 0 1 1 0} and despread-
ing with the sequence {0 0 1 1 1 1 0 1 0 0 1}. Moreover, determine the RF
bandwith of the modulated signal at a data rate of 1 Mbit/s. A DBPSK is used
as the modulation scheme. Specify the chip rate and the number of chips per bit.
Problem 8
Given are 20 measurement values in floating-point format in a 20-element ar-
ray values. Write program lines in a programming language of your choice
which calculate the mean value and the standard deviation of the 20 values and
store the results in the floating-point variables meanval and stddev. Some lan-
guages provide predefined commands to calculate the mean value and standard
deviation; these commands must not be used.
Chapter 4
This section describes the measurement equipment and the software used for
measurement and simulation.
Along the corridor, a measuring tape with a length of 30 m is laid out. The
laptop is moved along the tape on a cart. In this way, several properties of the
wireless LAN connection dependent on the distance to the access points shall
be examined.
21
22 CHAPTER 4. DESIGN OF THE EXPERIMENT
Each group is provided an access point whose frequency channel covers a fre-
quency range which does not overlap with the channels of other access points
(see also fig. 2.9).
For some of the measurements, the measurement software utilises the open
source tool netperf1 by Hewlett-Packard.
The options for the traffic program used in the experiment are:
--server <name>
With this option, the name of the server in the fixed network is specified who
shall serve the measurement requests. Alternatively, an IP number can be spec-
ified instead of the name. This option is mandatory.
--[tcp | udp]
By default, both a TCP and a UDP measurement are executed. If, however,
a measurement shall only be executed for one of the transport protocols, this
option can be specified.
--dispvals
This option causes the program to show the results of the individual measure-
ments to be shown on the screen. By default, only the results of the total
measurements are shown.
For the creation of simulation models, the OMNET tool includes the following
functions:
a channel over which the packets are transferred between the stations;
a statistical evaluation with which the throughput and the latency can be
measured.
If there are output files of the traffic program named results.tcp and
results.udp, delete them with the command
rm ./results.*
for a TCP connection, mean value and standard deviation of the values
signal/noise ratio, packet throughput and latency time.
Start with the measurements at the zero mark of the measuring tape and use
the following command to take 20 measurements at each measuring point.
./traffic --server <name> --samples 20 --dispvals
Notice: The name of the server is provided to you by the lab supervisor.
The program should now begin with the TCP measurement. Once it is finished,
the measurement results can be stored in the file results.tcp. To do so, press
y and finally <Enter>. If the measurement result is not satisfactory, saving can
be abandoned by pressing n and <Enter>. After that, the programme executes
the UDP measurements in the same way, whose results are stored in the file
results.udp.
24
5.2. SIMULATIVE ANALYSIS OF THE WLAN TRANSMISSION 25
values are stored in the file. Write down the numbers of the measurement se-
ries and the corresponding distance from the zero mark of the measuring tape,
since in the evaluation some values shall be displayed depending on the distance!
Important: During an ongoing measurement, the cart and the laptop must
not be moved, because this would falsify the measurement results significantly.
When measuring at 10 m distance from the zero mark, write down the first 10
individual measurements of the TCP delay which are displayed on the computer
screen. These values are needed for the later evaluation of the experiment. After
that, continue with the experiment as described above.
The higher the distance from the access point becomes, the worse the trans-
mission quality becomes. At large distances, the measurements will take in-
creasingly more time until finally the measurement software ‘hangs’, because
the connection between laptop and server broke down and can no longer be
established.
In this case, the ongoing measurement can be aborted by pressing the keys
<Ctrl + C>. Do not save the results, but repeat the measurement instead. If
this also does not succeed, the measurement series can be ended at this point.
Notice: It can happen that the measurement will succeed for one of the pro-
tocols, but not for the other. In this case, only repeat the failed measurement
by appending the option --tcp or --udp to the call of the traffic program.
Then, the measurement will only be executed for the specified protocol.
After finishing the measurements, do not forget to copy the measurement data
files to your memory stick so that you have them available for further analysis
when preparing your report.
For the fixed-station scenario, the results, i. e. the throughput, the delay and
the respective standard deviations, can be displayed as numerical values. For
the mobility scenario, graphs can be plotted which show the throughput and
delay as a function of the time. Considering constant speed, this can easily be
interpreted as a function of distance.
For each group, a computer with the OMNET simulator is provided. Details
how to work with OMNET and how to implement, run and evaluate the scenario
described above are given in a separate documentation file
omnet-tutorial.pdf which can be found in the “Files” section of Stud.IP.
The simulation models resemble the physical experiment: a file transfer which
is based on TCP is investigated as well as a streaming scenario where UDP
is used. For each scenario, two simulations are run: In the first simulation, the
wireless station is located at a fixed position close to the access point. Determine
the mean value and the standard deviation of the throughput and the delay as
described in the OMNET instruction sheet and write down the values. In the
second simulation, the wireless station is mobile and moves away from the access
point at a constant speed. Obtain the files with the throughput and delay values
as a function of the time resp. distance as described in the tutorial. Do not forget
to take the files home for later analysis in your lab report.
Chapter 6
Evaluation Problems
Problem 1.2
Show the mean value and standard deviation of the measured values dependent
on the distance in a table:
Problem 1.3
Consider the packet loss rates measured for the UDP transmission. What effect
not typical for UDP transmissions will occur? Give a reason!
Problem 1.4
Show the measured results graphically while displaying the standard deviation
as error bars. TCP and UDP measurements shall be entered in the same diagram
for a better overview. The diagrams have to be supplied with a complete legend.
TCP and UDP curves and the respective error bars have to be identified by
different colours or line styles. Draw the following diagrams:
27
28 CHAPTER 6. EVALUATION PROBLEMS
Important: Before plotting the graph which shows the throughput as a func-
tion of the signal-to-noise ratio, sort the entries of the measurement logfile in
ascending order of the signal-to-noise ratios.
Which effects can be observed concerning the shape of the curves and the stan-
dard deviation? Which different or common properties can be observed between
the two transport protocols? Give a reason!
Problem 1.5
Are there “runaways” in your curves, i. e. values which deviate largely from the
ideal shape of the curve? Explain these runaways considering the experimental
setup and the physical environment of the experiments.
Problem 2.2
Show the curves for the throughput and the delay which you measured for the
TCP and UDP mobility scenario simulations. What is the maximum range of
the connection? Compare the shape of the curves with those which you got for
the physical measurement. Does the simulation model reflect the real behaviour
of the WLAN transmission well?
Appendix A
Abbreviations
ACK Acknowledge
AP Access Point
ARQ Automatic Repeat Request
BSS Basic Service Set
CCK Complementary Coded Keying
CSMA/CA Carrier Sense Multiple Access with Collision Avoidance
CSMA/CD Carrier Sense Multiple Access with Collision Detection
CTS Clear To Send
CW Contention Window
DCF Distributed Coordination Function
DIFS Distributed Coordination Function Interframe Space
DLL Data Link Layer
DBPSK Differential Binary Phase Shift Keying
DQPSK Differential Quadrature Phase Shift Keying
DSSS Direct Sequence Spread Spectrum
ESS Extended Service Set
ETSI European Telecommunications Standards Institute
FCS Frame Check Sequence
FTP File Transfer Protocol
FHSS Frequency Hopping Spread Spectrum
GSM Global System Mobile
HIPERLAN HIgh PErformace Local Area Network
HTTP Hyper Text Transfer Protocol
IEEE Institute of Electrical and Electronics Engineers
IFS Interframe Space
IP Internet Protocol
ISM Industrial, Scientific and Medical
ISO International Standardization Organization
LAN Lacal Area Network
LLC Logical Link Control
MAC Medium Access Control
29
30 APPENDIX A. ABBREVIATIONS
References
http://www.lanline.de
http://www.tecchannel.de
http://www.opnet.com
31