skip to content

In 802.11 association, what does the station's request carry, what does the access point check before answering, and how does reassociation differ?

level: middleimportance: should knowfreq 24%

answer

  1. capabilities, rates, SSID, RSN
  2. AP validates against its own offer
  3. non-zero status means refused
  4. AID indexes the TIM bitmap
  5. reassociation names the old AP

basics

~20 s

An 802.11 Association Request carries capabilities, listen interval, SSID, supported rates and, when protected, the RSN element with the chosen suites; the AP validates them and replies with a status code and association ID. Reassociation adds the current AP's address.

solid answer

~50 s

The **Association Request** has two fixed fields, **Capability Information** and **Listen Interval**, then elements: the **SSID**, **Supported Rates** (and Extended Supported Rates), the **RSN element** with the pairwise cipher and AKM the station picked from the beacon's offer plus capability bits such as management-frame protection, and capability elements for the higher-throughput PHY features. The AP checks that the SSID is its own, that the rates and capabilities are acceptable, that the RSN choices are among those it offers, that its PMF policy is met and that it has room. The **Association Response** carries a **status code** (0 for success; for example 31 when PMF is required but missing, 43 for an AKM it does not offer) and an **association ID** from 1 to 2007. A **Reassociation Request** adds the **Current AP address** and is sent when a station moves to another AP of the same network.

go deeper

for a junior

Recall that the station asks to associate, the AP answers with a status code, and success brings an association ID; a non-zero status means refusal.

for a middle

Explain the fields in the request and response, the checks the AP makes, the common status codes, and what the Current AP address adds to a reassociation.

for a senior

Diagnose refusals by comparing the beacon's RSN element and capabilities with the station's request, and recognise status 17, 31 and 43 on sight.

for a principal

Treat association checks as policy enforcement: each requirement you add (PMF required, a narrower AKM list, rate floors) becomes a refusal for some client population, so plan the rollout.

## What association decides Association is the moment an **802.11 station** and an **access point (AP)** agree on the terms of the link. The beacon or probe response told the station what the AP offers; the **Association Request** says what the station has chosen and what it can do; the **Association Response** says yes or no. After a success the station is in **State 3**, and on a protected network the key handshake follows. ## The request The layout below follows the management-frame structures in the Linux 802.11 headers (`struct ieee80211_mgmt`). | Part | Field or element | What it tells the AP | |---|---|---| | fixed | Capability Information | general capabilities, including the ESS and Privacy bits | | fixed | Listen Interval | how many beacon intervals the station may sleep between wake-ups | | element | SSID | which network the station wants to join | | element | Supported Rates, Extended Supported Rates | the legacy data rates the station supports | | element | RSN element | the pairwise cipher and authentication and key-management method (AKM) chosen, plus RSN capabilities such as management-frame-protection capable | | elements | HT, VHT, HE and EHT capability elements | the higher-throughput PHY features the station supports | | element | WMM or QoS information | whether the station uses prioritised access | A **Reassociation Request** has the same layout plus one fixed field, the **Current AP address**, which names the AP the station is currently associated with. ## What the AP checks hostapd, the open-source reference AP implementation, shows the checks an AP makes before it answers. The status codes are the standard's; the names in parentheses are those in the Linux 802.11 headers. 1. **The SSID must match.** An unknown SSID is logged as "Station tried to associate with unknown SSID" and refused with status 1 (`WLAN_STATUS_UNSPECIFIED_FAILURE`). 2. **Rates and capabilities must be usable.** A request with no Supported Rates element is refused; the standard also defines status 18 (`WLAN_STATUS_ASSOC_DENIED_RATES`) for a station that cannot use the network's basic rates. 3. **The RSN choices must be on offer.** An invalid group cipher is status 41, an invalid pairwise cipher 42, and an AKM the network does not accept 43 (`WLAN_STATUS_INVALID_AKMP`). 4. **The PMF policy must be met.** With hostapd's `ieee80211w=2` (PMF required), a station whose RSN element does not set the management-frame-protection-capable bit is refused with status 31 (`WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION`). 5. **There must be room.** If the AP cannot take another station, the answer is status 17 (`WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA`); hostapd can already refuse a new station with 17 at authentication when its table reaches `max_num_sta`. ## The response and the association ID The **Association Response** carries Capability Information, a **Status Code** and, on success, an **Association ID (AID)**, followed by the AP's own rates and capability elements. 802.11 allows at most 2007 association IDs (`IEEE80211_MAX_AID` in the Linux headers), and hostapd's comment on `max_num_sta` says the setting should not be larger than that. The AID matters after the join. Every beacon carries a **Traffic Indication Map (TIM)** whose bitmap has one bit per AID: when the AP is buffering frames for a sleeping station, it sets that station's bit, and the station, waking to read beacons, sees it and collects its traffic. The **listen interval** in the request tells the AP how long it may have to buffer. ## Reassociation - **When.** A station that is associated with one AP and moves to another AP of the same network sends a **Reassociation Request** to the new AP; the new AP answers with a **Reassociation Response**. - **What is different.** The request names the **Current AP address**, so the network can identify where the station came from. The checks and status codes are the same as for association. - **What it does not skip.** State in 802.11 is per AP: the station must first authenticate to the new AP, and on a WPA2 or WPA3 network keys must be established again afterwards. Mechanisms that shorten that roaming step are covered with fast roaming. ## Reading it in a capture In Wireshark, `wlan.fixed.status_code` shows the status in authentication and association responses, `wlan.fixed.aid` the association ID, `wlan.fixed.current_ap` the old AP in a reassociation request, and `wlan.ssid` the SSID element. Comparing the RSN element in the beacon with the one in the request is often the fastest way to explain a refusal.

  • What is the association ID used for once the station has joined?
    The AP identifies the station by its AID (1 to 2007) in its station table and in the Traffic Indication Map that every beacon carries. When the AP buffers frames for a sleeping station it sets the bit for that AID; the station, waking to read beacons, sees its bit and retrieves the buffered traffic.
  • Why must a roaming station authenticate to the new AP before it can reassociate?
    802.11 state is kept per AP. Being associated with the old AP gives the station no state at the new one, so it starts in State 1 there and must reach State 2 by authenticating. Open-system authentication costs only two frames; the expensive part is the key exchange that follows, which fast-roaming mechanisms are designed to shorten.

  • The AP assigns the station's IP address in the association response.
  • The association ID is just the station's MAC address.
  • A refused association always means a wrong passphrase.
  • Reassociation lets a station skip authenticating to the new AP.
  • Reassociation Requests go only to the AP the station already uses.