Skip Navigation

Wireless Networking in Alpine Linux

This lesson explains how wireless networking works on Linux systems in general with Alpine-specific notes. It also explains how the various networking components fit into the OSI Model.

Page Contents

The OSI Model

Recall from your previous networking course that we can represent a network as a set of layers using the OSI Model, as shown in Figure 1. At the bottom of the network stack, we have the physical layer, which includes the hardware used to make the network connection. Above the physical layer, we have (in order) the data link, network, transport, session, presentation, and application layers.

OSI Model diagram

Figure 1: The OSI Model.

At each layer, we can have protocols, which are software-defined ways to communicate at the same layer between two different devices.

Linux Wireless Stack

To connect to a WiFi network in Linux, several pieces of software are involved:

  1. The Linux kernel, which sits at the lowest layer and contains the device driver for the WiFi adapter. The kernel provides an interface to interact with the card at the Physical Layer of the OSI Model (at a minimum).
  2. Software that handles WiFi authentication, which is part of the Data Link Layer for WiFi.
  3. A DHCP client to obtain an IP address and set up routing tables to send traffic over the WiFi connection. These components are part of the Network Layer.
  4. A tool to manage network startup and start the DHCP client, which is part of the Application Layer.

While there is only one Linux kernel, there are actually multiple choices for the wireless authentication software and DHCP client/route management system.

Alpine Linux

A stock distribution of Alpine Linux includes the following applications for the layers of the wireless stack above the kernel:

Of these tools, the wpa_supplicant is a bit dated and sometimes has some difficulties with newer WiFi standards and systems, making it difficult to impossible to authenticate to a wireless access point. Also, ifupdown-ng is better suited to servers and static desktop systems than it is to laptops and other devices that roam between networks, since it operates on the principle that the connection is established once and remains persistent.

Alternatives

We can improve our WiFi (and wired, for that matter) experience by switching out these tools for some others that are available in the Alpine Linux software repository:

The process of switching out the pieces can be a little cumbersome, but the result will be a system that is easier to use when traveling between different WiFi networks.