Wireless LAN throughput

In this lab session we'll investigate the different Wi-Fi settings and features which impact the throughput in a WLAN hotspot network. This course is provided by Ghent University and iMinds as part of the FORGE project, Forging Online Education through FIRE.

Learn more about FORGE »

Introduction

You will be using actual hardware (and no simulations) to experiment with different settings and features of Wi-Fi (Wireless Fidelity, based on IEEE 802.11 standards) when deploying a WLAN (Wireless Local Area Network) hotspot network. By using this hardware to solve multiple questions in a set of well-thought-out exercise scenarios, you will gain a better insight in the different aspects which impact the achievable throughput in your WLAN.

Live experimentation

The wireless nodes you will be using are part of the iMinds w-iLab.t Zwijnaarde testbed (a.k.a. "wilab2"), which is physically located at the Zwijnaarde campus in Belgium but can be configured, managed and tested completely from within the web interface you are currently using. This web interface itself is controlling the wireless nodes and is also dynamically created and hosted at the iMinds Virtual Wall testbed, which is physically located at the Zuiderpoort offices (Ghent) in Belgium.

These so called FIRE (Future Internet Research and Experimentation) testbeds can also be used in research projects to collaborate with industry partners to e.g. study and improve WLAN functionality. However, the configuration and experiments that you will perform during this lab session do not differ from the ones that are also applicable within your own WLAN at home.

The configuration of the hardware at the testbed is automatically done using a process called provisioning. This includes the reservation of three machines in the wireless testbed with the appropriate hardware, installing the required operating system and tools, and making these machines available through SSH (secure shell). You can view the status of the required hardware in the box below. You can check the availability and/or ask to start the provisioning process.


Usage of iMinds iLab.t Virtual Wall and w-iLab.t

Provisioning

Verifying experiment node availability

Wi-Fi concepts

Wi-Fi stands for "Wireless Fidelity" and is the most known and wide spread type of WLAN. It is a registered trademark of the Wi-Fi Alliance and allows guaranteed interoperability with other devices with the Wi-Fi certified label.

The Wi-Fi Alliance is a global non-profit industry association of hundreds of leading companies devoted to seamless connectivity. With technology development, market building, and regulatory programs, the Wi-Fi Alliance has enabled widespread adoption of Wi-Fi worldwide. It was established in 1999 by six companies: 3Com, Aironet, Intersil, Lucent Technologies, Nokia and Symbol Technologies.

All Wi-Fi products are based on the family of technical standards (IEEE 802.11) made by the IEEE (Institute of Electrical and Electronics Engineers). Thus, whereas the IEEE actually develops the technology, the Wi-Fi Alliance ensures that the actual products are in conformance with the specifications of the standard and it grants the usage of the Wi-Fi label and logo for these products.

Infrastructure and Ad Hoc

An infrastructure network is comparable to Ethernet networks, an Access Point (AP) fulfills the same function as a hub or switch. It is a central control network: most functionality is included in a central entity, i.e. the access point ('the infrastructure'). the access point can coordinate access to the wireless medium. Stations are quite simple, there is no direct communication between stations.

An Ad Hoc network on the other hand has distributed control: no infrastructure is required: nodes that are within radio range can communicate (directly or via neighboring forwarding nodes), it can be a single-hop or multi-hop network. Nodes are more complex (e.g. each node has to implement medium access mechanisms)

Medium access

The original IEEE 802.11 standard already specified different medium access methods, with the mandatory basic method based on a version of CSMA/CA (Carriers Sense Multiple Access / Collision Avoidance) using a randomized 'back-off' mechanism.

For all access methods, several parameters for controlling the waiting time before medium access are important. The three different parameters that define the priorities of medium access are shown and explained below. The values of the parameters depend on the PHY (physical layer) and are defined in relation to a slot time. Slot time is derived from the medium propagation delay, transmitter delay, and other PHY dependent parameters.


802.11 priorities for medium access

The medium, as shown, can be busy or idle, which is detected by the Clear Channel Assessment (CCA). If the medium is busy this can be due to data frames or other control frames. During a contention phase several nodes try to access the medium.

Priorities for medium access are defined through different inter-frame spaces:

Setup, tools and testbed usage

In the figure below the topology of your test hardware is displayed. Three linux machines are equipped with IEEE 802.11 wireless network cards which have an external antenna. These machines can communicate with each other directly (ad-hoc mode) or one could function as a WLAN access point (infrastructure mode)


General setup

This lab session uses the 802.11a standard, which operates in the 5 GHz ISM (Industrial, Science and Medical) band, which is less crowed compared to the 2.4 GHz band. This allows the usage of 13 non-overlapping channels. Hence, we are able to create 13 different live wireless test networks. Each (group of) student(s) will be allocated to one of these test networks. When multiple (groups of) students are allocated to the same test networks, you will have to wait for the experiment of the other (group of) student(s) to be completed and you will be queued.


802.11a wireless channels

We have hidden all the complexity of the iMinds w-iLab.t Zwijnaarde testbed and the iMinds Virtual Wall for you. You don't need to perform any manual commands during this lab session, simply clicking start/stop buttons will initiate all required steps and provide you with a live graph of the measured results. During an experiment run, you will see a status bar indicating the progress of the experiment at the bottom of this page. Although the experiments are fully automated, you should still try to understand the tools that are being used with experiments. To this end, you are able to check which commands are executed for each exercise by clicking the show/hide buttons.

To measure the UDP or TCP throughput on a wireless link, we are using the IPerf tool within the automated experiments. IPerf reports bandwidth, delay jitter and datagram loss and has a client-server architecture. The tool is already installed on all systems in our setup. To get a look at the command syntax visit the Ubuntu manpage for more information.

If you need to test the throughput between two computers, the system will:

By adding options to the client and/or server side, IPerf can be configured as desired.

Question 1

Describe the meaning of the different command line options used in iperf -c 10.10.5.3 -i 1 -u -b 10M -l 900

Infrastructure mode

In the first part of this lab session, we will evaluate the throughput of an IEEE 802.11 configuration in infrastructure mode using one of the machines as an access point. This machine if configured using hostapd, a linux tool that handles all the technicalities of maintaining an access point.

Using the discussed setup, you can now perform a series of exercises to explore the characteristics of communication between wireless stations and an access point. For your convenience we have made each exercise available through a widget, with graphs presenting the throughput of the station to the access point. Behind the scenes IPerf is used in conjunction with OMF to execute the proper commands on the correct machines and collect the resulting data.

Communication between station and access point

In these first exercises we'll evaluate the performance and characteristics of a single connection in infrastructure mode. More specifically, an IPerf server is started on the access point and one IPerf client is started on the first station.

Exercise 1-1: UDP throughput

Test the UDP throughput for the standard IPerf packet size (i.e. no packet size explicitly specified) from station 1 to the access point (i.e. the IPerf server runs on the access point). Always use the -b option in order to get the maximum achievable throughput when testing UDP.

Executed on the access point:

iperf -s -u -i 1

Executed on station 1:

iperf -c 10.33.1.1 -u -b 50M

Question 2

What is the measured UDP throughput in infrastructure mode from station to access point?

Exercise 1-2: TCP throughput

Now test the TCP throughput from station 1 to the access point (i.e. the Iperf server runs on the access point).

Executed on the access point:

iperf -s -i 1

Executed on station 1:

iperf -c 10.33.1.1

Question 3

What is the measured TCP throughput in infrastructure mode from station to access point? Compare this throughput with the physical data rate of 54 Mbps that the hardware is configured with. Can you explain the difference (generic, no calculations needed)?

Question 4

Why is the TCP throughput lower compared to the UDP throughput? What is (are) the limiting factor(s) in the TCP protocol?

Exercise 1-3: UDP throughput with variable packet size

In this exercise, we'll look at UDP throughput again, but with different packet sizes. Increase the packet size until you notice a significant (i.e. >2 Mbps) drop in throughput. You can choose three values to experiment with for one experiment execution. You can also edit these values directly in the station execute code.

Executed on the access point:

iperf -s -u -i 1

Executed on station 1:

iperf -c 10.33.1.1 -u -b 50M -l 
iperf -c 10.33.1.1 -u -b 50M -l 
iperf -c 10.33.1.1 -u -b 50M -l 

Question 5

What is the optimum packet size (accuracy 1 byte) and the corresponding data rate for maximum UDP throughput?

Question 6

Why is the throughput lower if you use a packet size higher than the optimum? Explain the optimum value as identified previously.

Hint:
  1. look at configuration settings at network layer (output of ifconfig) and data link layer (output of iwconfig).
  2. What are the sizes of the headers of IP, UDP, etc. ?
forge@sta1:~$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:0e:8e:30:9c:f2
          inet addr:10.33.1.100  Bcast:10.33.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:8eff:fe30:9cf2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30909 errors:0 dropped:0 overruns:0 frame:0
          TX packets:598602 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2064380 (2.0 MB)  TX bytes:749683968 (749.6 MB)
forge@sta1:~$ iwconfig wlan0
wlan0     IEEE 802.11abgn  ESSID:"forge_wlan_inf10"
          Mode:Managed  Frequency:5.7 GHz  Access Point: 00:0E:8E:30:9C:DB
          Bit Rate=54 Mb/s   Tx-Power=17 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=41/70  Signal level=-69 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:7   Missed beacon:0

Communication between multiple stations and access point

After looking at the characteristics of one wireless connection, we'll use both stations of our setup to see how two wireless streams relate in a contending medium. For this reason, two IPerf server instances are started on the access point, each on a different port. Each Station starts its own IPerf client.

Exercise 2-1: UDP throughput with 2 streams

Test the UDP throughput for the standard IPerf packet size (i.e. no packet size explicitly specified) with simultaneous traffic from station 1 to the access point and from station 2 the access point. First, only the traffic from station 1 is started, after 5 seconds the IPerf client on station 2 is started.

Executed on the access point:

iperf -s -u -i 1 -p 5001
iperf -s -u -i 1 -p 5002

Executed on station 1:

iperf -c 10.33.1.1 -u -b 50M -p 5001

Executed on station 2 after 5s:

iperf -c 10.33.1.1 -u -b 50M -p 5002

Question 7

What is the throughput that each of the two stations obtains in infrastructure mode during simultaneous data traffic to the access point?

Exercise 2-2: UDP throughput with 2 streams and variable packet size

We'll now evaluate the effect of packet size on contending streams, by starting constant background UDP traffic from station 1 to the IPerf server with packet size 1200 bytes. Next, the throughput from station 2 to the server can be evaluated varying the packet size using the sliders below. You can choose three values to experiment with for one experiment execution. You can also edit these values directly in the station execute code.

Executed on the access point:

iperf -s -u -i 1 -p 5001
iperf -s -u -i 1 -p 5002

Executed on station 1:

iperf -c 10.33.1.1 -u -b 50M -p 5001 -l 1200

Executed on station 2:

iperf -c 10.33.1.1 -p 5002 -u -b 50M -l 
iperf -c 10.33.1.1 -p 5002 -u -b 50M -l 
iperf -c 10.33.1.1 -p 5002 -u -b 50M -l 

Question 8

How does the throughput between station 1 and station 2 change? Is there fairness in throughput between both connections? Why (not)?

Hint: try to figure out how many packets each station sends to the server.

Exercise 2-3: UDP throughput with 2 streams and variable data rate

Test the UDP throughput for the ideal IPerf packet size with simultaneous traffic from station 1 to the access point and from station 2 the access point. First, this will give similar results to Exercise 2-1. After 10 seconds the physical data rate of station 2 will be lowered to 12Mbit/s. Note that the physical data rate of station 1 remains unaltered.

Executed on the access point:

iperf -s -u -i 1 -p 5001
iperf -s -u -i 1 -p 5002

Executed on station 1:

iperf -c 10.33.1.1 -u -b 50M -p 5001

Executed on station 2:

iperf -c 10.33.1.1 -u -b 50M -p 5002
after 10 seconds:
iwconfig wlan0 set rate 12M

Question 9

Explain why changing the data rate on one station affects the data speed of the other station.

Communication between stations

This section evaluates the performance of two stations communicating in an infrastructure network. The IPerf instances will be executed on station 1 and 2, the access point will be used behind the scenes to maintain the network.

Exercise 3-1: UDP throughput between stations

Test the UDP throughput with a default Iperf packet size for a connection between client 1 and client 2 (i.e. run the Iperf server on client 2).

Executed on station 1:

iperf -c 10.33.1.101 -u -b 50M

Executed on station 2:

iperf -s -u -i 1

Question 10

What is the throughput in infrastructure mode from station 1 to station 2? Does it differ from the throughput from station to access point? Why (not)?

Ad-Hoc mode

In the second part of this lab session, we will evaluate the throughput of an IEEE 802.11 configuration in Ad-Hoc mode, using only the two stations from the previous section.

Although the topology is simpler than the infrastructure example (we don't need an access point to manage the communication) the complexity of the stations increases since both are responsible of maintaining the Ad-Hoc network

This added complexity is more or less invisible to the user, since the following command will suffice to join (or create) an Ad-Hoc network: iwconfig wlan1 mode ad-hoc essid wlan_adhoc channel 40

Communication between two Ad-Hoc nodes

Exercise 4-1: UDP throughput in ad-hoc mode

Test the UDP throughput for the standard Iperf packet size between station 2 and station 1. Note that this is the same end-to-end communication as in Exercise 3-1. How does the throughput compare?

Executed on the station 1:

iperf -s -u -i 1

Executed on station 2:

iperf -c 10.44.1.100 -u -b 50M

Question 11

What is the throughput in ad hoc mode from station 1 to station 2? Compare the throughput between 2 stations in ad-hoc mode with the throughput measured in infrastructure mode (previous question). Is it higher or lower than in ad-hoc mode? Why?

Question 12

(Theoretical question) Assume that the total achievable wireless throughput is X Mbit/s. Fill in the table with the achievable throughput for each data stream (as a fraction of X) in two different wireless scenarios. Compare ad-hoc against infrastructure mode for both scenarios.

In the first scenario, station 1 is transmitting data to station 2 and station 2 is simultaneously transmitting data to station 1. In the second scenario, station 1 is transmitting data to station 2 and station 2 is simultaneously transmitting data to the gateway

Note:

  • In ad hoc mode, the 3rd station also behaves as a gateway to the Internet.
  • Assume there are no bandwidth limitations to the Internet.

Ad-hocinfrastructure
Scenario 1
throughput from client 1 to client 2 ?? ??
throughput from client 2 to client 1 ?? ??
Scenario 2
throughput from client 1 to client 2 ?? ??
throughput from client 2 to gateway ?? ??

Question 13

Which configuration (Ad-Hoc or infrastructure) in the previous question has the highest throughput? Why would you then use the other one?

Quality of Service in infrastructure mode

In this part of this lab session we will investigate how we can guarantee quality of service using the IEEE 802.11e features in a wireless LAN infrastructure network.

IEEE 802.11 defines 4 traffic classes: Background (BK), Best Effort (BE), Video (VI) and Voice (VO). These classes are typically mapped on different queues, each with different priority. Next to the queuing mechanism, parameters concerning the random back off mechanism are exploited to further differentiate between the different classes.

In order to use a certain traffic class, the driver inspects the Differentiated Services Code Point (DSCP) of the IP header. Based on this value, the driver will use a certain traffic class at the data link layer.

  • a DSCP value 0x80 implies the use of the Video traffic class
  • a DSCP value 0xE0 implies the use of the Voice traffic class

For these exercise we will designate station 1 as the source of a HD video stream, trying to fully occupy the medium. Station 2 will be used as a VoIP client, characterized by a low bandwidth stream with relatively small packets. Depending on the exercise, both stations can also send a Best Effort stream to maximally occupy the medium, but without priority.

QoS between multiple stations and access point

Exercise 5-1: Best effort and Video traffic class

Test the UDP throughput with simultaneous traffic from station 1 and 2 to the access point. Traffic from station 1 is 20Mbps video stream, the first 10 seconds as Best Effort traffic, afterwards with a prioritized Video traffic class. The stream from station 2 is a Best Effort stream, trying to maximally occupy the medium. Compare the throughput of non prioritized vs. prioritized.

Executed on the access point:

iperf -s -u -i 1 -p 5001
iperf -s -u -i 1 -p 5002

Executed on station 1:

iperf -c 10.33.1.1 -u -b 20M -p 5001
after 10 seconds:
iperf -c 10.33.1.1 -u -b 20M -p 5001 -S 0x80

Executed on station 2:

iperf -c 10.33.1.1 -u -b 50M -p 5002

Question 14

What is the throughput for each station? What is the total throughput? Explain what you see.

Exercise 5-2: Best effort and Voice traffic class

For this test we setup an IPerf stream on station 2 which emulates a 1 Mbps audio stream with packets of 250 bytes. On station 1 a continuous Best Effort stream is active that tries to maximally occupy the medium. First, station 2 will try it's stream as Best Effort, afterward the Voice traffic class is used.

Executed on the access point:

iperf -s -u -i 1 -p 5001
iperf -s -u -i 1 -p 5002

Executed on station 1:

iperf -c 10.33.1.1 -u -b 50M -p 5001

Executed on station 2:

iperf -c 10.33.1.1 -u -b 1M -p 5002 -l 250
after 15 seconds:
iperf -c 10.33.1.1 -u -b 1M -p 5002 -l 250 -S 0xE0

Question 15

What are the differences between both streams? Explain.

Hint: What are the typical requirements for a high quality audio reception?