The 802.11 State Machine
The 802.11 standard defines four states of client connectivity. These four states are usually referenced as the 802.11 state machine. Management frame communications are used between a client station and an AP as a client transitions between the four states towards established layer 2 connectivity. These four states are as follows:
- State 1: Initial start state, unauthenticated and unassociated
- State 2: Authenticated, not associated
- State 3: Authenticated and associated (pending RSN authentication)
- State 4: Authenticated and associated

The purpose of the 802.11 state machine is for clients and an AP to be able to discover each other and establish a secure relationship, with the final goal of the client joining the basic service set (BSS). If no security is used, only three states are needed. In most cases, PSK or 802.1X/EAP authentication is required, and all four states will then occur.