Beaconing ============ Common IEs in IEEE 802.11b Beacons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------+--------------------+----------------------------------------------+ | Element ID | Field | Description | +=============+====================+==============================================+ | 0 | SSID | Network name (0–32 bytes) | | 1 | Supported Rates | List of basic and extended data rates | | 3 | DS Parameter Set | Current channel number | | 5 | TIM | Traffic Indication Map for power save STAs | | 42 | ERP Information | (Optional) for 802.11g coexistence | +-------------+--------------------+----------------------------------------------+ Beacon Transmission Process --------------------------- 1. AP maintains a 64-bit TSF timer. 2. At each TBTT: - AP assembles beacon with updated TSF timestamp. - Inserts TIM and DTIM information. 3. If channel is idle → transmit immediately. 4. If channel is busy → defer using DIFS + random backoff. 5. Beacon transmitted at lowest basic rate (e.g., 1 Mbps). 6. All STAs receiving beacon update TSF timers. Power Save Coordination via TIM and DTIM ---------------------------------------- Traffic Indication Map (TIM) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The **TIM** IE identifies STAs with buffered unicast data. +----------------------+-----------------------------------------+ | Field | Description | +======================+=========================================+ | DTIM Count | Beacons until next DTIM beacon | | DTIM Period | Frequency of DTIM beacons | | Bitmap Control | Offset of partial virtual bitmap | | Partial Virtual Bitmap | Bits mapping AIDs of PS STAs | +----------------------+-----------------------------------------+ - Each associated STA has an **AID (Association ID)**. - If bit = 1 → AP has buffered data for that STA. Delivery TIM (DTIM) ~~~~~~~~~~~~~~~~~~~ DTIMs indicate pending **broadcast/multicast** traffic. - When `DTIM Count = 0`, the beacon is a **DTIM beacon**. - After DTIM beacon, AP transmits all queued broadcast/multicast frames. - PS STAs must wake at every DTIM to receive these frames. Example: .. code-block:: none DTIM Period = 3 Beacons: #1 → #2 → #3 (DTIM) AP sends broadcast/multicast after #3 Power Save Timing Example ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: none STA: (Doze)........Wake→Receive Beacon(TIM Bit=0)→Sleep STA: (Doze)........Wake→Beacon(TIM Bit=1)→Send PS-Poll→Receive Data→Sleep Infrastructure vs IBSS Beaconing -------------------------------- Infrastructure BSS ~~~~~~~~~~~~~~~~~~ - AP is the **beacon source**. - Beacons define network timing for all associated STAs. - TSF synchronization is one-way (AP → STA). IBSS (Ad Hoc) Beaconing ~~~~~~~~~~~~~~~~~~~~~~~~ - No centralized AP. - All STAs maintain their own TSF timers. - At each TBTT: 1. Each STA sets a random **Beacon Delay** timer. 2. If another beacon is heard before expiry → cancel own beacon. 3. If timer expires → STA transmits beacon. - Ensures exactly one beacon per interval. - All STAs synchronize TSF using the first beacon received. TSF Synchronization in IBSS ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: none STA1: Random delay = 30 µs STA2: Random delay = 50 µs STA3: Random delay = 70 µs STA1 transmits beacon first → STA2, STA3 sync to STA1 TSF. Beacon Frame Example (Field Breakdown) -------------------------------------- | Field | Example Value | Description | |--------|----------------|-------------| | Timestamp | 0x0000123456789ABC | TSF timer value | | Beacon Interval | 0x0064 | 100 TU (102.4 ms) | | Capability Info | 0x0431 | ESS + Short Preamble + Privacy | | SSID | "MyWiFi" | Network name | | Supported Rates | 1, 2, 5.5, 11 Mbps | Basic data rates | | DS Parameter Set | Channel 6 | Operating channel | | TIM | DTIM Count=1, Period=3, Bitmap=0x40 | PS indication | NAV and Beacon Duration ----------------------- - Beacon **Duration field = 0**, so beacons do **not** reserve the channel. - No ACK is transmitted (broadcast frame). - STAs may begin contention immediately after beacon transmission ends. Beacon Timing Parameters (802.11b) ---------------------------------- +------------------+-------------------------+ | Parameter | Typical Value | +==================+=========================+ | SlotTime | 20 µs | | SIFS | 10 µs | | DIFS | 50 µs | | Beacon Interval | 100 TU (102.4 ms) | | PHY Preamble | 192 µs (long preamble) | | Rate | 1 Mbps (basic rate) | +------------------+-------------------------+ Beacon Filtering and Scanning ----------------------------- - STAs can perform **passive scanning** (listening for beacons) or **active scanning** (sending Probe Requests and receiving Probe Responses). - Filters are applied by SSID, BSSID, and channel. - Beacons carry all information needed to join a BSS. Advantages and Tradeoffs ------------------------ +------------------+----------------------------------------+--------------------------------------+ | Aspect | Benefit | Tradeoff | +==================+========================================+======================================+ | Synchronization | All STAs share common TSF time | Drift if beacons missed | | Power Save | Enables doze scheduling (TIM/DTIM) | Increased latency | | Discovery | Allows passive network detection | Beacon overhead on busy channels | | Redundancy | Regular transmission ensures recovery | Collisions possible (IBSS) | +------------------+----------------------------------------+--------------------------------------+ Timing Example — Infrastructure Beacon Sequence ------------------------------------------------ .. code-block:: none |<-- Beacon Interval (100 TU) -->| AP: [Beacon]..........[Beacon]..........[Beacon] STA:(Sleep).......Wake→Receive→Sleep→Wake→Receive... References ---------- - IEEE Std **802.11-2020**, Clause **10.2.1.4 (Beacon Generation & Synchronization)** - IEEE Std **802.11b-1999**, Clause **18.2.3.5 (Beacon Transmission and TSF)** - Gast, M. *802.11 Wireless Networks: The Definitive Guide*, O’Reilly - Tanenbaum & Wetherall, *Computer Networks* (5th Edition) - Heusse et al., *Performance Anomaly of 802.11b*, IEEE INFOCOM 2003 Figures -------- .. figure:: _static/beacon_frame_structure.svg :align: center :alt: Beacon frame format Structure of IEEE 802.11b Beacon frame and main fields. .. figure:: _static/beacon_timing_sequence.svg :align: center :alt: Beacon interval and TSF synchronization Beacon interval, TSF synchronization, and wake/sleep behavior.