user@homelab:~/docs$ cat network.md

Network

Wi-Fi with netplan, rfkill unblock, and a fixed address via DHCP reservation

# contents

Overview

GoalWi-Fi up on boot with a stable LAN address
Interfacewlp3s0 (Intel AC 3160, iwlwifi)
ResultDHCP address pinned by a reservation on the gateway router

1. Unblock the radio

The adapter came up soft-blocked (soft=1), typically an airplane-mode state left by the firmware or Windows. Check and clear it through sysfs (the rfkill tool is not installed on Ubuntu Server):

shell @ server
grep . /sys/class/rfkill/*/{name,type,soft,hard}
for d in /sys/class/rfkill/*; do
  [ "$(cat "$d/type")" = "wlan" ] && echo 0 | sudo tee "$d/soft"
done

hard=1 would mean a hardware switch; soft is a software block. systemd-rfkill persists the state across reboots.

2. Configure Wi-Fi (netplan)

yaml @ server
# /etc/netplan/50-wifi.yaml
network:
  version: 2
  wifis:
    wlp3s0:
      dhcp4: true
      access-points:
        '<SSID>':
          password: '<wifi-password>'
shell @ server
sudo chmod 600 /etc/netplan/50-wifi.yaml
sudo netplan generate && sudo netplan apply

The file holds the Wi-Fi password, hence mode 600. generate validates, apply activates.

3. Pin the address

The SSH config, the kubeconfig and the k3s certificates depend on the server address, so it must not change. Create a DHCP reservation for the laptop’s Wi-Fi MAC address on the router that is the gateway of the LAN:

shell @ server
ip route | grep default

With an ISP router followed by an own Wi-Fi router, the reservation belongs on whichever device is the gateway, not necessarily the ISP box. Typical location: Advanced → Network → DHCP Server → Address Reservation.

Only devices that others connect to need a reservation (server, NAS). Clients like the Mac and iPad use randomized private Wi-Fi MAC addresses anyway.

Verify

shell @ server
sudo networkctl renew wlp3s0
ip -br addr show wlp3s0
networkctl status wlp3s0 --no-pager

After the lease renewal the interface must get the same address.

Notes