user@homelab:~/docs$ cat network.md
Network
Wi-Fi with netplan, rfkill unblock, and a fixed address via DHCP reservation
# contents
Overview
| Goal | Wi-Fi up on boot with a stable LAN address |
| Interface | wlp3s0 (Intel AC 3160, iwlwifi) |
| Result | DHCP 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):
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"
donehard=1 would mean a hardware switch; soft is a software block. systemd-rfkill persists the state across reboots.
2. Configure Wi-Fi (netplan)
# /etc/netplan/50-wifi.yaml
network:
version: 2
wifis:
wlp3s0:
dhcp4: true
access-points:
'<SSID>':
password: '<wifi-password>'sudo chmod 600 /etc/netplan/50-wifi.yaml
sudo netplan generate && sudo netplan applyThe 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:
ip route | grep defaultWith 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
sudo networkctl renew wlp3s0
ip -br addr show wlp3s0
networkctl status wlp3s0 --no-pagerAfter the lease renewal the interface must get the same address.