Sub topic 9
How a Device Finds and Joins a Network
This chapter assumes you know what an SSID and a BSSID are, and that you understand channels and the shared medium. It covers the steps a device takes between "Wi-Fi is on" and "I have an IP address."
Overview of the join sequence
A device joins an access point (AP) in four stages: discover, authenticate, associate, and then get an IP address. The first three are 802.11 steps. The last is ordinary IP networking and is not part of Wi-Fi itself.
Step 1: Discovery by scanning
An AP announces itself with a beacon, a short management frame sent about every 100 ms (a common default). A beacon carries the SSID, the supported rates, the channel, and the security method.
A client learns about APs in one of two ways:
- Passive scanning: the client tunes to each channel and listens for beacons. This is slow, because it must wait on every channel. It is the only option on DFS channels, where a client may not transmit first.
- Active scanning: the client sends a probe request on each channel. Any AP that hears it replies with a probe response, which carries the same information as a beacon.
If several APs advertise the same SSID, the client picks one using signal strength and the capabilities it sees. This is why one SSID can map to many BSSIDs.
Step 2: Authentication
In 802.11, "authentication" is a leftover step. With WPA2-Personal it uses "Open System" and proves nothing. WPA3-Personal uses a stronger exchange called SAE at this point. Real identity checking happens in the security handshake after association.
Step 3: Association
The client sends an association request listing its capabilities, such as supported rates, channel widths, and standards (n, ac, ax). The AP replies with an association response that includes an association ID. After this, the AP will forward frames for the client.
Step 4: Security handshake and IP address
With WPA2 or WPA3, a 4-way handshake follows association. It uses a key derived from the passphrase to create fresh encryption keys for this session. Only then can data flow. The client then asks for an IP address by DHCP, like any wired device.
Seeing it on Linux
You can watch the result of scanning with iw:
# Active scan; list SSID, frequency and signal for each AP found
sudo iw dev wlan0 scan | grep -E 'SSID:|freq:|signal:'
# Show the AP you are currently associated with
iw dev wlan0 linkThe link output shows the BSSID you associated with, its frequency, and your signal level.
Common problems
| Symptom | Likely cause |
|---|---|
| Network not listed | AP on a channel your region or card does not support |
| Connects, then no internet | Association worked but DHCP failed |
| Repeated password failure | Failure in the 4-way handshake, usually a wrong passphrase |
| Slow to find 5 GHz networks | Passive scanning on DFS channels |
Exercise
A laptop shows a network in its list, accepts the password, and shows "connected," but no web pages load. Which stages of the join sequence succeeded, and which is the most likely one to have failed?
Show answer
Scanning, authentication, association, and the security handshake succeeded, since the password was accepted and the laptop is connected. The most likely failure is the IP layer, such as DHCP not giving the laptop an address, because that step happens after the 802.11 steps.