# IEEE 802.11 Throughput¶

## Goals¶

This example analyzes how application-level throughput changes as a function of nominal bitrate in an 802.11g network.

INET version: 4.0
Source files location: inet/showcases/wireless/throughput

## The model¶

### Application-level throughput¶

802.11 modes are denoted by the nominal data bitrate (e.g. 54 Mbps). However, the bitrate available for an application is less than the nominal bitrate because of protocol overhead like preambles, physical and MAC headers, TCP and IP headers, interframe spaces, and backoff periods. In this model, the actual application-level throughput is measured.

### Configuration¶

The network contains two WirelessHost’s, at a distance of 1 meter, one of them acting as traffic source, the other one as traffic sink. The source host sends a UDP stream to the destination host in ad-hoc mode. The simulation is run with a small packet size of 100 bytes, 1000 bytes, and the default maximum unfragmented packet size in 802.11, 2236 bytes. (The maximum transfer unit in 802.11 by default is 2304 bytes, which corresponds to 2236 bytes of application data.) The simulation will be run several times, with different bitrates. The UDP application in the source host is configured to saturate the channel at all bitrates and packet sizes. There will be no packets lost in the physical layer because the hosts are close to each other, and background noise is configured to be very low.

The parameter study iterates over the following 802.11g bitrates: 6, 9, 12, 18, 24, 36, 48, and 54 Mbps. Each simulation runs for 1 second, and the UDP throughput is averaged for this interval.

## Results¶

Throughput measured in the simulation is compared to analytically obtained values. The application level throughput can be calculated from the nominal bitrate and the payload size, for example, using the excel sheet here.) It takes the DIFS, data frame duration, SIFS, ACK duration, and backoff period into account. It assumes an average backoff time that is half of the minimal contention window to calculate the theoretical throughput:

• throughput = 1 / frameExchangeDuration * payloadLength * 8 [bps]

• where frameExchangeDuration = DIFS + backoffDuration + dataFrameDuration + SIFS + ACKFrameDuration

• and backoffDuration = minContentionWindow / 2 * slotTime

The following plot compares the computed throughput to the results of the simulation for all bitrates and both packet sizes:

The following sequence chart excerpt illustrates overhead increasing with bitrate. It shows frame exchanges for 1000-byte UDP packets, with bitrates of 6, 18, and 54 Mbps, on the same linear timescale. One can see how the proportion of data parts shrinks compared to the duration of the frame exchange as bitrates increase.

The following sequence chart illustrates the relative sizes of the preamble, physical header, and data part of a 54 Mbps frame exchange. The preamble and the physical header has the same duration regardless of the bitrate, further increasing overhead at higher bitrates.

There are techniques that increase application-level throughput by reducing overhead. For example, in 802.11n, overhead at high bitrates is reduced by using block acknowledgment and frame aggregation. When block acknowledgment is used, multiple data frames can be acknowledged with a single block acknowledgment frame (instead of ACKing each data frame one-by-one.) Frame aggregation allows multiple data frames to be sent following a preamble and a physical header in a single transmission. Recent versions of the INET Framework support these 802.11 features, but they are out of scope for this simulation example.