Wiki DE Start in the browser

Wiki › Protocols

Wi-Fi

Wireless networks according to 802.11: SSID, joining with authentication, association and 4-way handshake, signal strength, roaming and mesh.

Layer
1 und 2
Standard
IEEE 802.11, IEEE 802.1X
See an example
See demo

How a device joins the Wi-Fi

An access point regularly sends beacons with its SSID. A client that knows the network joins in four steps:

  1. Authentication: a formality with WPA2 (open system).
  2. Association: the client asks to be admitted, the access point confirms.
  3. 4-way handshake (EAPOL): both derive a shared key from the password and random numbers without sending the password. If the password is wrong, this step fails.
  4. Then data flows, e.g. the DHCP request.

The Wi-Fi frame

The header according to IEEE 802.11 has up to four addresses and ends like Ethernet with an FCS (CRC-32). Values from a management message of the simulation.

IEEE 802.11Frame · IEEE 802.11
Frame Control2 bytes0x4000
Duration/ID2 bytes314
Address 16 bytes02:00:00:00:03:02
Address 26 bytes02:00:00:00:05:00
Address 36 bytes02:00:00:00:03:02
Sequence Control2 bytes0x0010
Address 46 bytes
QoS Control2 bytes
Frame Body0–2304 bytes21 Byte
FCS4 bytes0x2b56a31f
Left to right, in the order the bytes are sent. Grey dashed: never part of a capture (layer 1 or line framing). Point at a field for an explanation.
FieldLengthExample valueMeaning
Frame Control2 bytes0x4000Frame type (management, control, data), subtype and bits such as To DS/From DS, retry and protected (encrypted).
Duration/ID2 bytes314How long the medium remains busy (in microseconds); other stations wait that long.
Address 16 bytes02:00:00:00:03:02Receiver on the radio link (receiver address).
Address 26 bytes02:00:00:00:05:00Transmitter on the radio link (transmitter address).
Address 36 bytes02:00:00:00:03:02Depending on To DS/From DS the BSSID of the access point or the actual source or destination in the LAN.
Sequence Control2 bytes0x0010Fragment and sequence number: detects duplicates after a retransmission.
Address 4 (optional)6 bytesOnly between two access points (To DS and From DS set, e.g. wireless bridge or mesh).
QoS Control (optional)2 bytesOnly for QoS data: priority (traffic class) of the frame, basis of WMM.
Frame Body0–2304 bytes21 ByteManagement data (SSID, rates, security) or, for data, LLC/SNAP and the packet; encrypted with WPA2.
FCS4 bytes0x2b56a31fCRC-32 over header and body, as with Ethernet. Radio is error-prone: faulty frames are retransmitted.
Values: Real frame from the demo “Wi-Fi with mesh” (no. 1, 49 bytes), exactly as the packet list in leyoNET shows it.

Signal, roaming and mesh

In leyoNET the signal quality depends on distance and floors. If a client is moved in the simulation, it looks for a stronger access point with the same SSID and joins it via reassociation. A gratuitous ARP tells the switches where the client is now (ARP).

In a mesh access points connect to each other by radio; only one needs a cable.

BandProperties
2.4 GHzlarger range, few non-overlapping channels (1, 6, 11)
5 GHzmore channels and speed, shorter range

How to do it in leyoNET

The same text as in the app’s help (F1 key).

Wi-Fi

A client joins an access point when SSID and password match and it is in range. Signal strength depends on distance. The packet list shows the join: authentication, association and the WPA2 EAPOL 4-way handshake.

Roaming

When you move a Wi-Fi device during simulation, it checks signal strength. If another access point with the same SSID is clearly closer (at least 10 percentage points stronger), it reassociates there and sends a gratuitous ARP so switches learn the new path.

See an example

  • Demo “Wi-Fi with mesh” in leyoNETDemo “Wi-Fi with mesh” in leyoNET
    Wi-Fi with mesh

    Two mesh access points over two floors.

    The notebook upstairs reaches the server over the wireless mesh. Move the notebook: it switches access points (roaming).

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, ready to present.

Practise

  • ★★★☆☆ WLAN in the classroom · 2 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

What leyoNET simplifies

ProtocolLayerSimplification in the simulation
802.11 management, EAPOL2Authentication, association/reassociation and 4-way handshake as a sequence; no real encryption

Standards

  • IEEE 802.11 – Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications (current edition: IEEE 802.11-2024)
  • IEEE 802.1X – Port-Based Network Access Control (current edition: IEEE 802.1X-2020)

Read on

Found a mistake or have an idea? Source of this page on GitHub.