Print

When Is 54 Not Equal to 54? A Look at 802.11a, b, and g Throughput

by Matthew Gast, author of 802.11 Wireless Networks: The Definitive Guide
08/08/2003 (updated: 8/14/2003)

Now that the 802.11g standard has been finalized, comparisons with the other standards in the 802.11 family are inevitable. One conclusion that is frequently drawn is that 802.11g offers similar speeds to 802.11a. After all, both products are advertised as having a data rate of 54 Mbps.

This article develops a simple model for the maximum TCP throughput of 802.11 networks so that a comparison can move beyond a simple comparison of nominal bit rates. According to the model, 802.11g is significantly faster than 802.11b. In a network consisting only of 802.11g clients, it is even slightly faster than 802.11a. However, "protection" mechanisms added to 802.11g to ensure backwards compatibility with legacy 802.11b clients can cut the throughput by 50 percent or more.

Technology Transactions per second Mbps of TCP payload throughput Transactional speed relative to 802.11b
11b, 11 Mbps 479 5.6 1.0
11a, 54 Mbps 2,336 27.3 4.9
11g, 54 Mbps/no protection 2,336 27.3 4.9
11g, 54 Mbps/CTS-to-self protection 1,113 13.0 2.3
11g, 54 Mbps/RTS/CTS protection 750 8.8 1.6

The Transactional Model

The basic transactional model assumed by this article is a maximum-length frame containing a single TCP segment followed by a TCP acknowledgement. To cope with the inherent unreliability of radio waves, the 802.11 MAC requires positive acknowledgement of every transmission. Each TCP packet must therefore be wrapped up in a frame exchange. The complete transaction consists of the two 802.11 data frames carrying TCP embedded in their respective exchanges:

The TCP data segment:

  • Distributed Interframe Space (DIFS): this interframe space indicates that an exchange has completed, and it is safe to access the medium again.
  • The data frame containing the TCP segment.
  • A Short Interframe Space (SIFS), which is a small gap between the data frame and its acknowledgement.
  • The 802.11 ACK frame.

The TCP ACK:

  • DIFS
  • The data frame containing the TCP ACK
  • SIFS
  • 802.11 ACK frame

For this model, I will assume that the host operating system limits the outgoing frame size to 1,500 bytes. 802.11 permits much larger frame sizes, but this flexibility has not traditionally been used by client products. Most access points connect to existing networks with Ethernet, and therefore limit the payload size to the maximum Ethernet payload size. (In fact, this simple precaution is required to obtain Wi-Fi certification.)

Related Reading

802.11 Wireless Networks: The Definitive Guide
Creating and Administering Wireless Networks
By Matthew Gast

Encapsulation

In addition to the payload data, there are 36 additional bytes of data added in the encapsulation process. The 802.11 MAC header adds 28 bytes of data for various control and management functions, error detection, and addressing. A further eight bytes are added by the SNAP encapsulation header to identify the network layer protocol. (For further encapsulation details, see Figures 3-9 and 3-13 of 802.11 Wireless Networks.) The total size of the MAC payload for the TCP data segment is 1,536 bytes (12,288 bits). For the TCP ACK, the 40 bytes of TCP/IP header information also gets a further 36 bytes of SNAP header for a total of 76 bytes (608 bits).

Throughput

This article measures the throughput of the network at the TCP payload layer. Each transaction delivers one data frame. There are 1,500 bytes of Ethernet payload, but 40 bytes must be subtracted for headers. By adding up the total time required for each component of the transaction, a transaction rate can be derived. For the throughput, simply multiply by 1,460 bytes.

Weaknesses of the Model

The transactional model is quite simple, and neglects several important effects. First of all, it assumes a steady stream of well-ordered frames with no contention for the medium. 802.11 implements collision avoidance and exponential backoff, so in reality, the time between frame exchanges will be longer than one DIFS. Exponential backoff in the presence of contention will further decrease throughput. My initial back-of-the envelope estimate is that contention for the medium would reduce the maximum throughput figures above by 25% to 50%, depending on the exact assumptions made.

Furthermore, there is always the possibility of simultaneous transmission. 802.11 will order layer two frames and prevent collisions, but higher-layer packets may be transmitted simultaneously. 802.11 treats TCP segments and acknowledgements as unrelated higher-layer frames, so a certain number of collisions are expected. (One engineer has told me that up to 10% retransmissions should be expected for TCP/IP on 802.11 due to this effect.)

Furthermore, the model ignores the sophistication in the TCP acknowledgement model. To avoid constraining throughput, TCP uses "sliding windows" and allows multiple outstanding frames to be transmitted before acknowledgement. In practice, TCP acknowledgements can apply to multiple segments, so this model overstates the impact of higher-layer protocol acknowledgements.

The Baseline: 802.11b at 11 Mbps

The baseline speed comes from 802.11b. It is not as fast as the newer specifications, but it's what most of the 802.11 cards out in the world do. I'll do the calculation for 802.11b first, and then compare everything else to the result for 802.11b.

First off, the basic timing numbers for 802.11b:

  • SIFS = 10 µs
  • Slot time = 20 µs
  • DIFS = 2 x Slot time + SIFS = 50 µs

802.11b requires that a preamble be prepended to every frame before it is transmitted to the air. That preamble may be either the traditional "long" preamble, which requires 192 µs for transmission, or it may be an optional "short" preamble that requires only 96 µs. (For a diagram of the physical layer headers in 802.11b, see Figure 10-26 in 802.11 Wireless Networks.) Support of the long preamble is mandatory, and is the default setting on most devices. In the interest of reducing the number of calculations, this article will perform calculations using only the long preamble.

802.11b running at the max speed divides data up into 8-bit symbols. There are 1,536 8-bit blocks in the TCP data segment, and 76 8-bit blocks in the TCP acknowledgement. The ACK does not have SNAP headers, and is only 14 bytes long.

Encoding the MAC frames is easy. 802.11b divides up the MAC frame into a series of 8-bit "symbols," and then transmits 1.375 million symbols per second. So add up the individual components of the transaction to get the total duration:

  TCP data TCP ACK
DIFS 50 µs 50 µs
802.11 Data 192 µs + 1536/1.375 Msps
= 192 µs + 1,118 µs
= 1,310 µs
192 µs + 76/1.375 Msps
= 192 µs + 56 µs
= 248 µs
SIFS 10 µs 10 µs
802.11 ACK 192 µs + 14/1.375 Msps
= 192 µs + 11 µs
= 203 µs


= 203 µs
Frame exchange total 1,573 µs 511 µs
Transaction Total 2,084 µs  

Each transaction requires 2,084 µs. At that duration, 479 exchanges can complete per second. With a TCP payload of 1,460 bytes per exchange, the throughput is 5.7 Mbps.

802.11a

802.11a is faster than 802.11b for two reasons: timing relationships between frames in the exchanges are tighter, and the encoding used by 802.11a does not require such long preambles for synchronization.

Here are the basic timing numbers for 802.11a:

  • SIFS = 16 µs
  • Slot time = 9 µs
  • DIFS = 2 x Slot time + SIFS = 34 µs

Like 802.11b, 802.11a divides data up into a series of symbols for transmission. However, the encoding used by 802.11a uses much larger symbols. At 54 Mbps, each symbol encodes 216 bits. (For a full listing of encoding block sizes, see Table 11-3 in 802.11 Wireless Networks.) The OFDM encoding used by 802.11a adds six bits for encoding purposes to the end of the frame, so our maximum-length frame of 1,536 bytes becomes a series of 12,288 data bits plus the six tail bits. The total bit string of 12,294 bits can be encoded in 57 symbols. The 608 bit TCP ACK plus tail bits requires four symbols, and the 802.11 ACK also requires just one symbol.

Each frame is prepared for transmission in the air with a 20 µs header to synchronize the receiver. Following the 20 µs header is a series of symbols, each requiring 4 µs for transmission.

  TCP data TCP ACK
DIFS 34 µs 34 µs
802.11 Data 20 µs + 57 * 4 µs/symbol
= 20 µs + 228 µs
= 248 µs
20 µs + 3 * 4 µs/symbol
= 20 + 12 µs
= 32 µs
SIFS 16 µs 16 µs
802.11 ACK 20 µs + 1 * 4 µs/symbol
= 20 µs + 4 µs
= 24 µs
= 24 µs
Frame exchange total 322 µs 106 µs
Transaction Total 428 µs  

At 428 µs per transaction, it is possible to complete 2,336 exchanges per second. That corresponds to a throughput of 27.3 Mbps.

Pages: 1, 2

Next Pagearrow