Wireless LANs (IEEE 802.11 / Wi-Fi)
1. IEEE 802.11 Architecture
The IEEE 802.11 standard defines the physical layer and MAC sublayer for Wireless Local Area Networks (WLANs), commercially branded as Wi-Fi.
[ Distribution System (DS) ] (Ethernet Backbone)
/ \
/ \
[ Access Point ] [ Access Point ]
(AP 1) (AP 2)
/ \ / \
[STA1] [STA2] [STA3] [STA4]
\___________/ \___________/
BSS 1 BSS 2
<----------------------------->
Extended Service Set (ESS)
Core Architectural Building Blocks:
- BSS (Basic Service Set): The fundamental building block of a WLAN:
- Infrastructure BSS: Stations communicate only through a centralized Access Point (AP) connected to a wired backbone.
- Ad-hoc BSS (Independent BSS - IBSS): Peer-to-peer network where wireless stations communicate directly with one another without an AP.
- ESS (Extended Service Set):
- Created by interconnecting two or more infrastructure BSSs through a Distribution System (DS) (typically wired switched Ethernet).
- Allows mobile wireless clients to roam seamlessly between APs without dropping active TCP connections.
- Station Types (Mobility):
- No-transition mobility: Stationary or operates only within a single BSS.
- BSS-transition mobility: Moves from one BSS to another within the same ESS.
- ESS-transition mobility: Moves from one ESS to another (may require IP address re-assignment).
2. Why CSMA/CD Fails in Wireless: Hidden & Exposed Stations
Wired Ethernet uses CSMA/CD (Collision Detection), but wireless networks cannot use CD for two fundamental reasons:
- Dynamic Range / Signal Attenuation: A transmitting radio's signal is thousands of times stronger than incoming received signals. The transmitter's own signal drowns out any colliding signal at its antenna.
- Hidden Terminal Problem: Not all stations can hear each other.
A. HIDDEN TERMINAL PROBLEM
[ Station A ] <==== Range ====> [ Access Point ] <==== Range ====> [ Station C ]
| |
+----- A cannot hear C; both transmit to AP simultaneously --------+
===> DISASTROUS COLLISION AT THE ACCESS POINT!
B. EXPOSED TERMINAL PROBLEM
[ Station A ] <--- Transmits to ---> [ Station B ]
[ Station C ] <--- Wants to send to ---> [ Station D ]
Station C hears B's transmission and mistakenly delays sending to D,
even though transmitting to D would NOT interfere with B's reception!
- Hidden Station Problem: Station A and Station C are out of radio range of each other, but both are in range of AP B. Both sense the channel idle and transmit simultaneously, resulting in a destructive collision at AP B.
- Exposed Station Problem: Station C senses transmission between A and B and unnecessary defers transmitting to Station D, unnecessarily wasting channel throughput.
3. The MAC Solution: CSMA/CA and RTS/CTS
To prevent collisions, 802.11 implements CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) using Distributed Coordination Function (DCF):
Sender A Access Point Other Stations
| | |
|-- Waits DIFS + Backoff --------->| |
| | |
|-- RTS (Request to Send) -------->| |
| |-- RTS heard: Set NAV timer ----->|
| | (Do not transmit) |
|<- CTS (Clear to Send) -----------| |
| |-- CTS heard: Confirm NAV ------->|
|-- DATA Frame ------------------->| |
| | |
|<- ACK (Acknowledgment) ----------| |
The RTS/CTS Handshake Protocol:
- RTS (Request to Send): Sender sends a short RTS control frame containing the NAV (Network Allocation Vector), declaring the duration needed to transmit the data frame and receive the ACK.
- CTS (Clear to Send): AP broadcasts a CTS frame granting permission and reiterating the NAV duration.
- NAV (Virtual Carrier Sensing): All hidden stations hearing the CTS set an internal timer (NAV) and refrain from transmitting until the transaction completes, completely eliminating the hidden terminal collision.
- SIFS / DIFS (Interframe Spaces):
- SIFS (Short Interframe Space): Shortest waiting period, reserved for immediate priority frames (CTS, ACK).
- DIFS (DCF Interframe Space): Longer waiting period required before a station can attempt to send an RTS or initial data frame.
4. IEEE 802.11 Standards Comparison
| Standard | Release | Frequency Band | Max Data Rate | Modulation / Channel Bandwidth |
|---|---|---|---|---|
| 802.11b | 1999 | DSSS / HR-DSSS () | ||
| 802.11a | 1999 | OFDM () | ||
| 802.11g | 2003 | OFDM () | ||
| 802.11n (Wi-Fi 4) | 2009 | MIMO (), OFDM () | ||
| 802.11ac (Wi-Fi 5) | 2013 | MU-MIMO, 256-QAM () | ||
| 802.11ax (Wi-Fi 6/6E) | 2021 | OFDMA, 1024-QAM, Target Wake Time |
5. IEEE 802.11 Frame Format
+----+----------+--------+--------+--------+-------+--------+---------------+---------+
| FC | Duration | Addr 1 | Addr 2 | Addr 3 | SeqCtl| Addr 4 | Data Payload | FCS |
| 2B | 2 B | 6 B | 6 B | 6 B | 2 B | 6 B | 0-2312 bytes | 4 B |
+----+----------+--------+--------+--------+-------+--------+---------------+---------+
- Frame Control (FC - 2 bytes): Contains Protocol version, Type (Management, Control, Data), Subtype, To DS, From DS, Retry, Power Management, and WEP/security flags.
- Duration / ID (2 bytes): Encodes the NAV duration in microseconds.
- Four Address Fields (6 bytes each): Depending on the values of
To DSandFrom DSflags:- Destination Address (DA).
- Source Address (SA).
- BSSID (MAC of the Access Point).
- Receiver Address (RA) / Transmitter Address (TA) for wireless distribution systems (mesh/bridge).
6. Key Exam Questions & Takeaways
- Why is CSMA/CD unsuitable for wireless networks?
- Transmitters cannot reliably detect collisions while transmitting because local transmit power overwhelms faint incoming collisions from distant stations. Furthermore, hidden stations cannot hear each other.
- Explain the Hidden Terminal Problem and how RTS/CTS resolves it.
- Two stations outside each other's radio coverage transmit to the same central access point at the same time, causing collisions. The RTS/CTS exchange reserves the channel: the AP sends a CTS heard by all stations in its range, setting their NAV timers to silence them.
- What is the Network Allocation Vector (NAV)?
- A timer maintained in software by wireless stations representing virtual carrier sensing. A station must not transmit while its NAV is non-zero.
- Order the 802.11 Interframe Spaces by increasing duration.
- .