How Wi-Fi works: SSIDs, association & roaming
Describe how a client discovers, joins and roams between access points.
By Invicly Tech, , in Computer Networking. About 12 minutes to read.
In short
Access points advertise networks with beacon frames carrying the SSID. A client scans, authenticates and associates with one AP, then exchanges data frames through it. Because radio is a shared medium, devices listen before talking and take turns using CSMA/CA.
Explained simply
An access point (AP) is the box that links wireless devices to the wired network. Every AP regularly shouts a short message called a beacon, about ten times a second, saying: I am here, my network is called Office, and this is how to join me. The network name is the SSID.
Your phone listens for these beacons, or asks out loud with a probe request: is the network Office here? It then picks the AP with the best signal, introduces itself (authentication), and asks to join (association). After that comes the security handshake, and then DHCP to get an IP address.
Radio is a shared room where only one person can speak at a time on each channel. Wi-Fi devices politely listen first, wait a random short time, and speak only if the room is quiet. This is called CSMA/CA (carrier sense multiple access with collision avoidance).
A big building needs many APs with the same SSID. As you walk around, your device decides when to move to a closer AP, which is called roaming. Good channel planning keeps neighbouring APs on different channels so they do not shout over each other.
Press Play on a diagram to walk through it one step at a time.
- Access point to Client: Beacon: SSID, supported rates, security1Beacon: SSID, supported rates, security
- Client to Access point: Probe request2Probe request
- Access point to Client: Probe response3Probe response
- Client to Access point: Authentication (open system or SAE)4Authentication (open system or SAE)
- Client to Access point: Association request5Association request
- Access point to Client: Association response, then key handshake6Association response, then key handshake
- Management
- Beacon
- Probe request and response
- Authentication
- Association and reassociation
- Deauthentication and disassociation
- Control
- ACK
- RTS and CTS
- Block Ack
- Data
- Your packets
- QoS data with WMM priority
- Null data for power saving
In depth
SSID, BSSID and ESS
A BSS (basic service set) is one AP radio plus the clients joined to it, and the BSSID is that radio's MAC address. An AP with a 2.4 GHz radio, a 5 GHz radio and three SSIDs typically has six BSSIDs, one per SSID per radio, each with a slightly different MAC. An ESS (extended service set) is a group of BSSs sharing one SSID and the same wired network, which is what lets clients roam.
The SSID is just a name of up to 32 bytes. Clients cannot tell two networks apart by name alone, which is why anyone can create a fake network with your SSID. Hiding the SSID only removes it from beacons; clients then send probe requests containing the name everywhere they go, so it adds no security.
Each beacon, sent by default every 102.4 ms, lists the SSID, supported rates, security settings and capabilities. Beacons are sent at the lowest enabled rate, so many SSIDs on many APs can waste a large share of airtime.
- Keep to three or four SSIDs per AP
- Raising the minimum data rate makes beacons shorter
- Each extra SSID adds its own beacons on every radio
Frame types and the join process
802.11 has three kinds of frames. Management frames run the network: beacons, probe requests and responses, authentication, association, reassociation, disassociation and deauthentication. Control frames help deliver data: ACK, RTS, CTS and Block Ack. Data frames carry your traffic.
Joining follows a fixed order. Discovery is passive (listening for beacons on each channel) or active (sending probe requests). The authentication frames come next; for WPA2 this is Open System, a formality, and for WPA3-Personal it carries the SAE exchange. Then the client sends an association request with its capabilities, and the AP returns an association response with an association ID. Only then does the four-way handshake create encryption keys, after which normal data, starting with DHCP, can flow.
When a client hops to another AP in the same ESS it sends a reassociation request instead, naming its previous AP.
- 1Scan
Hear beacons or send probe requests
- 2Authenticate
Open System, or SAE for WPA3
- 3Associate
Request and response, AID assigned
- 4Key handshake
802.1X if enterprise, then four-way handshake
- 5DHCP and ARP
Get an IP, find the gateway
- 6Data
Encrypted frames to and from the AP
CSMA/CA: taking turns on the air
Wired Ethernet once detected collisions while sending, but a radio cannot hear others while it transmits, so Wi-Fi avoids collisions instead. Before sending, a station checks that the channel is idle (clear channel assessment). It also respects the Duration field in frames it overhears, which sets a timer called the NAV: everyone stays quiet until the current exchange ends.
When the channel goes idle, the station waits a fixed gap, then a random backoff counted in slots. The random number comes from a contention window that starts small and doubles after each failed attempt. The receiver confirms each frame with an ACK after a short gap (SIFS); no ACK means the sender assumes a collision and retries.
WMM (Wi-Fi Multimedia) gives voice and video shorter waits and smaller windows than background traffic, so calls get through first. In the hidden-node case, where two clients cannot hear each other but both reach the AP, RTS and CTS frames reserve the channel first.
- Laptop to Access point: RTS: I need the channel for 300 microseconds1RTS: I need the channel for 300 microseconds
- Access point to Laptop: CTS: go ahead2CTS: go ahead
- Access point to Other client: Same CTS heard: set NAV, stay quiet3Same CTS heard: set NAV, stay quiet
- Laptop to Access point: Data frame4Data frame
- Access point to Laptop: ACK after SIFS5ACK after SIFS
Roaming: the client decides
In Wi-Fi, the client, not the network, decides when to roam. Most clients wait until the signal is fairly weak, often around -70 to -75 dBm, before scanning for a better AP. A sticky client is one that clings to a distant AP while a closer one is available, dragging down its own speed and that AP's airtime.
Three amendments help. 802.11k lets the AP hand the client a neighbour report, a short list of nearby APs and their channels, so it does not scan every channel. 802.11v lets the network suggest a better AP with a BSS transition management request; the client may still refuse. 802.11r (Fast BSS Transition) pre-shares keys so the client can skip the full 802.1X login on each hop, cutting roam time to well under the 50 ms that voice calls can tolerate.
For smooth roaming, design cells to overlap by about 15 to 20 percent at -67 dBm, so a better AP is always in reach.
Planning channels and power for several APs
Two APs on the same channel that can hear each other share airtime as if they were one, which is called co-channel contention. The plan is to make neighbours use different channels: 1, 6 and 11 in 2.4 GHz in a repeating pattern, and 20 or 40 MHz channels spread across 5 GHz.
Power matters as much as channels. Full power makes big cells that overlap heavily and encourages sticky clients. Phones transmit with less power than APs, so an AP shouting at 100 mW to a phone that answers at 15 mW creates a lopsided link. Moderate AP power and more APs give better results. In dense designs, turn off the 2.4 GHz radio on some APs, because there are only three channels to share.
Enterprise systems often adjust channels and power automatically (radio resource management), but always check the result with a site survey: walk the building with a survey tool and map the actual signal.
- Same channel + can hear each other = shared airtime
- Lower power, more APs, smaller cells
- Disable some 2.4 GHz radios in dense layouts
- Verify with a site survey, not a floor plan guess
Learn it in 4 short steps
About 30m each. Track them with a timer in your plan.
- 1Explain SSIDs, BSSIDs and beacons~30m
- 2Trace probe, authentication and association~30m
- 3Explain collision avoidance with CSMA/CA~30m
- 4Plan channels for several access points~30m
Key points
- SSID is the network name; BSSID is the MAC of a specific AP radio.
- Several APs share one SSID so clients can roam between them.
- Neighbouring APs should use different non-overlapping channels.
- Clients decide when to roam; 802.11k, v and r help them roam faster.
Key terms
Tap a card to flip it. 0/5 known
Examples
Finding out why calls drop in one corridor
Users say Teams calls break when they walk from the meeting rooms to the kitchen. Step 1: walk the path with a laptop printing the BSSID and signal every second. Step 2: you see the laptop holding on to AP-1 down to -80 dBm before jumping to AP-2: a sticky roam with a gap. Step 3: enable 802.11k and 802.11v so the network can steer clients, enable 802.11r for fast transitions, and lower AP-1's power so its cell does not stretch so far.
while true; do
iw dev wlan0 link | awk '/Connected to/ {b=$3} /signal/ {s=$2} END {print b, s}'
sleep 1
done
# 3c:84:6a:11:22:31 -66
# 3c:84:6a:11:22:31 -74
# 3c:84:6a:11:22:31 -80 <- should have roamed earlier
# 3c:84:6a:44:55:61 -58 <- finally on AP-2A channel plan for six APs
An office has six APs in two rows of three. Step 1: 2.4 GHz alternates 1, 6, 11 along the first row and 11, 1, 6 along the second, so no AP shares a channel with its closest neighbours. Step 2: 5 GHz uses 40 MHz channels 36, 44, 149 in row one and 157, 36, 44 in row two, avoiding DFS for stability. Step 3: set AP power to medium, and turn off 2.4 GHz on two middle APs if surveys show overlap. Step 4: survey again and adjust.
Quick reference
- SSID = network name; BSSID = one AP radio's MAC; ESS = APs sharing an SSID
- Beacon interval: 100 TU = 102.4 ms by default
- Join order: scan, authenticate, associate, four-way handshake, DHCP
- 802.11k neighbour reports, 802.11v steering suggestions, 802.11r fast transition
- Design for -67 dBm at cell edges with about 15 to 20 percent overlap
- Hidden SSIDs add no security and make clients probe for the name everywhere
- Fewer SSIDs and higher minimum rates leave more airtime for data
Common mistakes
- Putting every AP on the same channel at full power.
- Using 160 MHz channels in dense environments.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Find the BSSID, channel and security type of the AP you are connected to, and how many BSSIDs share your SSID nearby.
- Exercise 2medium
Capture the beacons and probe responses around you and list each SSID with its BSSID and channel.
- Exercise 3hard
Design a channel and power plan for a two-floor office with four APs per floor, and explain how you avoid co-channel interference between floors.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Should I hide my SSID for security?
- No. Hidden networks are still visible to anyone with a capture tool, and your devices broadcast the name in probe requests wherever they go.
- Why does my laptop stay connected to a far-away AP?
- The client chooses when to roam and many wait until the signal is very weak. Enabling 802.11k and v on the network and lowering AP power usually helps.
- Is a mesh system the same as several APs?
- Mesh APs connect to each other wirelessly instead of by cable, which uses some airtime for the backhaul. Wired APs on the same SSID perform better when cabling is possible.