WiFi Network Structure
- Typically uses a star topology network.
- The Basic Service Set (BSS) is a set of access point(s) with multiple connected clients.
- Access points (APs) manage multiple connected clients.
- The Service Set ID (SSID) identifies the network and broadcast by the AP in beacons.
____ Client / [AP] --- Client \ ------ Client ^^^^^^^^^^^^^^^^^^^^^^^^^^ Basic Service Set - The original superframe structure consists of a beacon, a contention-free period followed by a contention period repeating periodically at intervals of ms.
Contention Free Period Contention Period |------------------------|-------------------------| [ PCF Access ] [ DCF Access ] - Point Coordination Function (PCF) is generally unimplemented and considered an ineffective Quality of Service technique. It is a MAC technique used in IEEE 802.11 based WLANs, including WiFi to coordinate communication within the network.
- An AP will poll associated stations sequentially granting them explicit transmission rights. Operates in an alternating structure is above.
- PCF was superseded by Hybrid Coordination Function (HCF) in 802.11e, which remains complex and limited to specialized hardware.
Contention-Based Access
Practical WiFi networks utilize a continuous contention-based access period governed by the Distributed Coordination Function (DCF). This requires nodes to listen to the wireless medium before transmitting. They must wait for a Distributed Inter-Frame Space (DIFS) period if the channel is idle before initiating transmission.
CBA CBA CBA CBA
<---|x|----------|x|----------|x|--------------|x|----------> (time)
|x| := Beacon time
This is the base communication method for WiFi. All data packets require immediate acknowledgement (ACK) by the receiving device. DCF employs CA and random backoff.
Packets can occupy the channel for extended durations up to ms. This is a problem because it forces waiting devices to continuously perform active physical carrier sensing for the entire window, wasting power.
- Device initiates transmission to AP requiring ms air time.
- Device queues a packet and utilizes CSMA/CA to determine when it can send.
- detects and backs off. must be actively listening for the entire ms period to monitor channel availability.
- ’s signal may drop for whatever reason (obstruction, multipath fading, distance, etc). will see the channel is free and send.
- ’s packet collides with and fails. The Network Allocation Vector (NAV) fixes this. Each packet is required to have notation of their duration, allowing to wait ms instead of listening for ms.
However, we may have the Hidden Terminal Problem where cannot see each other. The solution is to use Request/Clear To Send (RTS/CTS).
Request To Send / Clear To Send (RTS/CTS)
RTS/CTS is a method to solve the Hidden Terminal Problem by sending four packets
(RTS, CTS, DATA, Ack)
This is extra overhead (could have just sent DATA). A significant portion of traffic is just application-layer Acks. So in practice, it’s only used for very large packets.
Backoff Mechanisms
A device will listen for activity. If the channel is free, they wait for an Inter Frame Spacing (IFS) duration. If the medium is free after IFS, transmission proceeds. If the channel is busy however, randomly select a number of backoff Slots. Count down Slots when the medium is not busy. If it is busy when the backoff completes, increase maximum backoff Slots and repeat.
Tiered Contention Multiple Access (TCMA)
The idea is to assign different IFS based on traffic class. It prioritizes communication. Acknowledgements are sent with Short IFS (SIFS). This always transmits before new data clears the CSMA check. New data is sent with DCF IFS (DIFS).
<---DIFS--->|
<--PIFS-->| |
<-SIFS->| | | Contention
______ | | | ___Window__ _______
| | | | | | | | | | | |
| Busy | | | | | | |..|..| |Data TX|
|______|________|_|_|__|_|__|__|__|_|_______|
--------+----+-----+--------+-----+---+--+-----+---------> Time
| \ \
Other stations buffer | \ \
and defer frames | Backoff
slots
The Contention Window (CW) is the maximum backoff amount. The Backoff Count (BO) is the current remaining backoff. When attempting to send, if busy Backoff is selected in , then we countdown slots whenever medium is not busy. At attempt to transmit if not busy. If the medium is busy, then double the window to .
For 802.11g,
- Slot time
- or ms.
- SIFS , PIFS and DIFS
We can get more quality of service based on application via EDCA. The lowest to highest priority are
- Background
- Best Effort
- Video
- Voice We can expand to more IFS lengths for different traffic categories.