Wi-Fi is a suite of wireless network protocols developed to connect devices to each other by forming an IP-based Wireless Local Area Network (WLAN).
Wi-Fi is based on the IEEE 802.11 Working Group’s family of standards, which defines both the Physical (PHY) and Medium Access Control (MAC) layers of the protocol stack. These layers manage various low-level operations in a wireless device, such as the transmission and reception of radio signals, data rate, channel access, error control and much more. Adhering to a common and unified set of standards ensures seamless interoperability between devices from different vendors.
Wireless Local Area Network (WLAN): A computer network that links devices using wireless communication within a limited area. Physical (PHY) layer: The bottom layer of the protocol stack that consists of things like the transceiver. Medium Access Control (MAC) layer: The protocol layer that sits above the PHY and controls the hardware responsible for interaction with the wireless transmission medium.
While the IEEE (Institute of Electrical and Electronics Engineers) drives the development of the Wi-Fi ecosystem through its 802.11 standards, the Wi-Fi Alliance takes care of the other parts. The Wi-Fi Alliance is an association of industry-leaders dedicated to fostering the Wi-Fi brand by certifying devices, ensuring interoperability between different vendors, and promoting the Wi-Fi brand by driving its worldwide adoption.
Wi-Fi is built on two main device categories that we will be using in this course: Access Points (APs) and Stations (STAs).
An AP acts as the main central node in the Wi-Fi network, broadcasting a wireless signal to allow other devices (STAs) to connect to the network wirelessly.
An STA is a device that connects wirelessly to the AP to join the Wi-Fi network, using the IEEE 802.11 standards to gain access. Common examples of STAs are mobile phones, tablets, and laptops. Please note that although some literature defines STAs as “any device that has the capability to use the 802.11 protocol”, meaning APs are also classified as STAs, these terms will be mutually exclusive in this course.
When one or more STAs connect to an AP and form a WLAN, it is referred to as an Infrastructure Basic Service Set (BSS). A BSS is the most common scenario when discussing Wi-Fi networks.
While other types of service sets exist, they are out of the scope of this course. Such sets include Independent Basic Service Sets (IBSSs), where STAs connect to each other without an AP, and Extended Service Sets (ESSs), where multiple BSSs form an extended network where STAs can roam across the different coverage areas.
A BSS has a name that is used by STAs during the connection process. This name is referred to as the Service Set Identifier (SSID). The SSID is not a secure way to refer to Wi-Fi networks because it is user-defined and can be altered. An impostor could use the same SSID to deceive STAs into connecting to it instead of the intended AP (known as an evil twin attack). Because of this, BSSs use the MAC address of the AP as another identifier, known as the Basic Service Set Identifier (BSSID). This helps STAs to connect to the desired AP when there are multiple APs with the same SSID:
Access Point (AP): A device that connects to a wired network and broadcasts a wireless signal. Station (STA): A device that connects to a wireless network and communicates with the AP. Infrastructure Basic Service Set (BSS): The most basic form of a WLAN with an AP and one or more STAs. Service Set Identifier (SSID): A user-defined name for a Wi-Fi network. Basic Service Set identifier (BSSID): The MAC address of the AP.
Device joining procedure
An STA is responsible for initiating the procedure to connect to an AP. The procedure has thee main steps:
The STA needs to know if there are APs it can connect to. This discovery can be done using either active or passive scanning.
With passive scanning, the STA listens on each frequency channel for beacons sent out periodically by APs. After the STA has scanned all its supported channels, it has populated a scan results list with all the beacons it has taken record of.
Conversely, in active scanning, the Wi-Fi station does not wait for beacons from APs and instead transmits a probe request, probing for available APs nearby. Normally, requests are sent to the broadcast address and received by all APs in range. Optionally, the STA can probe for a certain AP by including its SSID. This kind of probe is called a directed probe request.
Unless certain privacy measures are implemented, any AP listening to a broadcasted probe request replies with a probe response that the STA uses to populate a scan results list of the APs.
After discovery, the STA can choose to initiate a connection procedure to an AP. It sends an authentication request, and the AP responds with an authentication response. Note that this authentication procedure will look different depending on the security method used.
After the response, the STA sends an association request, which includes its supported 802.11 capabilities, such as supported data rates, channels, and security protocols. If the AP chooses to accept the connection, it sends back an association response.
Then, depending on if security was requested, a security procedure is performed between the devices.
Data transfer over 802.11
Once the 802.11 connection is successfully established and the device has an IP address, data transfer can now take place between the AP and the STA over the Wi-Fi network. Data in Wi-Fi is sent over 802.11 frames, commonly containing IP packets. However, one can use any other data protocol as well.
When an AP receives an 802.11 frame, it inspects the destination address to check if the packet is intended for an STA in the same Wi-Fi network, or a remote device on the internet. If the packet is intended for a device on the same network, the AP routes it accordingly, and if it is intended for an external device, the AP routes the packet to the internet.
Broadcast, multicast, and unicast
Wi-Fi supports three main forms of traffic, namely: broadcast, multicast, and unicast traffic.
Unicast traffic refers to a data stream being sent from a sender to a single receiver. Unicast traffic requires a unique destination address and is the most reliable transmission method, as the receiver must acknowledge the packet. It is also the form of traffic that generates the least network load, has the least latency, and is the most secure. E-mail exchange is a common example of unicast traffic.
Multicast traffic refers to a data stream being sent from a sender to multiple receivers, using a special multicast address. Multicast transmissions can be an efficient way of delivering the same message to multiple recipients. A common use of multicast is to discover devices locally on the network, such as printers, smart speakers, and smart home products.
Broadcast traffic refers to a data stream being sent from an AP to all STAs registered with it, using a unique broadcast address. This form of traffic is commonly used for network joining and maintenance, for example, when an AP needs to broadcast a certain parameter change in the network.
If you are sending a message to multiple devices, this can be done by sending a unicast message to each device or through one multicast transmission. In this case, a single multicast transmission can also be used to decrease signaling and overhead traffic over the network.
It is good practice to limit broadcast transmissions unless strictly needed, as it causes the most congestion over the network.
Frequency bands and Wi-Fi radio channels
The 802.11 standards specify Wi-Fi radios to use multiple frequency bands, including but not limited to, sub-1 GHz, 2.4 GHz, 3.65 GHz, 5 GHz, and 6 GHz. However, local regulations in each country or region limit which of these frequency bands Wi-Fi devices can use. This leads to Wi-Fi devices mostly operating in one of two unlicensed frequency bands: the 2.4 GHz band, commonly referred to as the Industrial Scientific and Medical (ISM) band and the newer 5 GHz band.
Unlike many other wireless protocols, Wi-Fi does not commonly use any frequency hopping multiple access schemes. Therefore, the choice of the frequency band and RF channel to operate on is key to ensuring good system performance.
Differences between the 2.4 GHz and 5 GHz bands
The 2.4 GHz ISM band is the most commonly used unlicensed frequency band, including by other technologies. It includes a total of 14 RF channels, each with a bandwidth of 20 MHz and a separation of only 5 MHz. Since the 2,4 GHz band only spans 100 MHz, most of the 14 RF channels are overlapping. In fact, only three channels, 1,6 and 11, are non-overlapping channels and are consequently the most commonly used.
In addition, channel bonding makes it possible to utilize 40 MHz bandwidth, but due to channel overlap, the being can only be done on two channels that don’t overlap.
The exact number of channels available for you might vary due to local regulations. For example, in North America, only 11 of these 14 channels are allowed, while in Europe 13 channels are allowed.
Because it is so widely used by different technologies, the ISM band can suffer from congestion and interference, but it provides good range and obstacle penetration due to its lower frequency. The range and penetration make it suitable for larger areas or environments with many signal obstructions. The 5 GHz band has been specified for Wi-Fi devices to off-load the ISM band.
The 5 GHz band brings different advantages to Wi-Fi radios. Such as:
The 5 GHz band generally suffers from less congestion than the 2.4 GHz band.
The 5 GHz band itself is broader than the 2.4 GHz band, providing more non-overlapping RF channels to choose from.
This makes it well-suited for environments requiring high-speed data transfer or having many devices connected simultaneously. However, this also comes with its drawbacks, as the 5 GHz band uses a higher frequency, which attenuates and is absorbed by obstacles more easily. Devices using the 5 GHz band also consume more power due to the higher throughput and have less coverage due to the increased signal attenuation.
The choice of Wi-Fi band will depend on your application’s specific needs and environment. If long-range and good obstacle penetration is needed, then the 2.4 GHz band is the way to go. However, if the application dictates high speeds, multiple simultaneous transmissions, or will be deployed in a crowded area, then the 5 GHz band is a better option.