TExcelTAD
Home › Wireless, IoT & Mobile Security › IEEE 802.11 Architecture: Stations, BSS, ESS and Association

IEEE 802.11 Architecture: Stations, BSS, ESS and Association

Before you can judge whether a Wi-Fi network is secure, you need its vocabulary: who talks to whom, what a "network" is when it has five access points, and which steps a phone goes through before it may send a single IP packet. Every attack and every defence in the rest of this course attaches to one of those steps. The radio side (bands, channels, signal strength, Wi-Fi generations) is in Wi-Fi Basics; this lesson covers the architecture from a security point of view.

The building blocks

Term Meaning Security note
STA (station) any 802.11 radio: a phone, a laptop, a smart plug, and also the AP's own radio each has a MAC address; clients may randomise theirs
AP (access point) a station that relays between wireless clients and the distribution system (DS), usually the wired LAN the authenticator in WPA2/WPA3
BSS (basic service set) one AP and its associated clients identified by the BSSID, normally the AP radio's MAC address
ESS (extended service set) several BSSs with the same SSID joined by a DS, so clients can roam the SSID is only a name; anyone can broadcast it
IBSS ad hoc network without an AP rarely used; no central policy point
Mesh BSS (802.11s) APs relaying to each other over radio backhaul links need protection too

One physical AP often runs several BSSs on one radio, one per SSID (staff, guests, IoT), each with its own BSSID derived from the radio's base address. That is how one box carries the separate networks of guest and IoT segmentation.

Joining a network, step by step

  1. Discovery. The AP sends beacons about ten times a second, carrying the SSID, the supported rates and the security policy (the RSN element, next lesson). A client may also send probe requests and get probe responses.
  2. 802.11 authentication. In WPA2 this is a formality called Open System (two frames, no secret). In WPA3-Personal this step carries SAE, the password-based key exchange.
  3. Association. The client sends an association request with its capabilities and the cipher and key-management choices it picked from the RSN element; the AP answers with an association ID.
  4. Key establishment (RSNA). With a PSK or SAE the 4-way handshake follows; with 802.1X an EAP exchange with a RADIUS server comes first. Only now can protected data flow.
  5. Higher layers. DHCP, then everything else (DHCP).

802.11 tracks this as connection states, and only certain frame classes are allowed in each. An AP that receives a data frame from a station that isn't associated must drop it and may answer with a deauthentication (reason code 7, "class 3 frame received from nonassociated station"). The model below follows those rules:

python · try it yourself
# Frame classes (simplified from IEEE 802.11): which frames each state allows.
CLASS = {"beacon": 1, "probe": 1, "auth": 1, "deauth": 1,
         "assoc-req": 2, "disassoc": 2,
         "eapol": 3, "data": 3}
ALLOWED = {1: {1}, 2: {1, 2}, 3: {1, 2, 3}}   # state 1: none, 2: authenticated, 3: associated
NEXT = {("auth", 1): 2, ("assoc-req", 2): 3, ("disassoc", 3): 2, ("deauth", 2): 1, ("deauth", 3): 1}

def run(frames):
    state, log = 1, []
    for f in frames:
        if CLASS[f] not in ALLOWED[state]:
            log.append(f"{f:9} in state {state}: DROP (class {CLASS[f]}), AP may send deauth reason 7")
            continue
        new = NEXT.get((f, state), state)
        log.append(f"{f:9} in state {state}: accepted" + (f", now state {new}" if new != state else ""))
        state = new
    return log

print("\n".join(run(["probe", "data", "auth", "assoc-req", "eapol", "data", "deauth", "data"])))
probe     in state 1: accepted
data      in state 1: DROP (class 3), AP may send deauth reason 7
auth      in state 1: accepted, now state 2
assoc-req in state 2: accepted, now state 3
eapol     in state 3: accepted
data      in state 3: accepted
deauth    in state 3: accepted, now state 1
data      in state 1: DROP (class 3), AP may send deauth reason 7

The second-to-last line is the root of a whole attack class: a single deauthentication frame throws a client back to state 1. Before Protected Management Frames existed, nothing proved that the frame came from the real AP. The next lesson shows the frame and the fix.

What the architecture reveals to anyone nearby

Even on a perfectly encrypted network, management frames are sent in the clear before keys exist, and frame headers stay readable afterwards:

Visible to a passive observer Why it matters
SSIDs, BSSIDs, channels, security policy (beacons) inventory for attackers and defenders alike; "hidden" SSIDs still appear in probe and association frames
client MAC addresses and the SSIDs they probe for tracking people; mitigated by MAC randomisation and wildcard probes
frame sizes, timing, which client talks to which AP traffic analysis even when payloads are encrypted
the EAPOL handshake for WPA2-Personal it allows offline passphrase guessing (later)

Hiding the SSID is therefore not a security control: clients that know a hidden network must ask for it by name, which reveals it, and they keep asking for it everywhere they go.

Detection: knowing your own ESS

Defenders start with an inventory: every BSSID that should carry each SSID. A survey (from the defender's own sensors) is then compared to it. The scan list below is synthetic:

python · try it yourself
inventory = {"LabNet": {"02:00:00:0a:0a:01", "02:00:00:0a:0a:02"},
             "LabNet-IoT": {"02:00:00:0a:0b:01"}}
survey = [  # (SSID, BSSID, channel, security) seen by the lab's sensor
    ("LabNet", "02:00:00:0a:0a:01", 6, "WPA3/WPA2"), ("LabNet", "02:00:00:0a:0a:02", 36, "WPA3/WPA2"),
    ("LabNet-IoT", "02:00:00:0a:0b:01", 11, "WPA2"), ("LabNet", "02:00:00:0a:0a:66", 6, "open"),
    ("NeighbourWiFi", "3c:5a:b4:10:20:30", 1, "WPA2"),
]
for ssid, bssid, ch, sec in survey:
    if ssid in inventory:
        verdict = "known" if bssid in inventory[ssid] else "UNKNOWN BSSID for our SSID: possible rogue or evil twin"
    else:
        verdict = "not ours (ignore, don't probe)"
    print(f"{ssid:13} {bssid}  ch {ch:>2}  {sec:9}  {verdict}")
LabNet        02:00:00:0a:0a:01  ch  6  WPA3/WPA2  known
LabNet        02:00:00:0a:0a:02  ch 36  WPA3/WPA2  known
LabNet-IoT    02:00:00:0a:0b:01  ch 11  WPA2       known
LabNet        02:00:00:0a:0a:66  ch  6  open       UNKNOWN BSSID for our SSID: possible rogue or evil twin
NeighbourWiFi 3c:5a:b4:10:20:30  ch  1  WPA2       not ours (ignore, don't probe)

An open network carrying the company's SSID is the classic evil-twin signature. Rogue APs and Wireless Intrusion Detection builds this into a proper detector.

How the architecture is secured

  • Keep an ESS inventory (SSIDs, BSSIDs, channels, security) and survey against it regularly.
  • Separate SSIDs per trust level (staff, guests, IoT), each mapped to its own VLAN behind a firewall.
  • Use the strongest security every client supports (WPA3, PMF required) and don't rely on hidden SSIDs.
  • Let clients randomise MAC addresses and use wildcard probes; on managed devices, avoid profiles that force directed probes.
  • Secure roaming: 802.11r fast transition derives keys with the same protections as the full handshake; enable it only on equipment patched against the known fast-transition bugs (KRACK, CVE-2017-13082).

Pitfalls

  • Treating the SSID as an identity: it is a label anyone can copy.
  • Believing a hidden SSID hides the network.
  • Forgetting that one AP radio may expose several BSSs, each with its own policy.

Practice

1. Why does a phone that knows a hidden SSID leak it?

The AP's beacons omit the name, so the phone must send probe requests that name the network to find it. Those probes go out wherever the phone is, revealing the SSID to anyone listening.

2. In the state model, which frames does an unauthenticated station get accepted, and why does it matter for security?

Only class 1 frames: beacons, probes, authentication and deauthentication. Without PMF, a forged deauthentication is accepted in any state and returns the client to state 1, which is why management-frame protection was added.

3. Your survey finds your SSID on three BSSIDs, two of which are on your list. What two explanations should you check first?

A new AP installed by your own team but not yet inventoried, or a rogue/evil-twin AP. Check change records and the wired side (is the BSSID's AP on your switch?) before concluding.

Test yourself

What identifies one BSS?

  1. The SSID
  2. The BSSID, normally the AP radio's MAC address
  3. The channel
  4. The IP subnet

In WPA3-Personal, which step carries the password-based key exchange SAE?

  1. Beacon
  2. 802.11 authentication
  3. DHCP
  4. Association response

Which statement about hidden SSIDs is correct?

  1. They prevent attacks
  2. They encrypt beacons
  3. They are not a security control; clients reveal the name when probing
  4. They require WPA3