Skip to content

Configure network

This process configures your server to use Netplan and systemd-resolved to manage both ethernet and Wi-Fi connections through a single, unified configuration file.


  1. Terminal window
    lspci -nnk | grep -iA 3 net

    If the network controller says “Broadcom” and “BCM43xx”, install the drivers below; otherwise, skip to step 2.

    Ensure the non-free repository component is enabled for your Debian release. (deb and deb-src)

    Terminal window
    sudo nano /etc/apt/sources.list

    Update package lists.

    Terminal window
    sudo apt update

    Check that the Broadcom driver package is available.

    Terminal window
    apt-cache policy broadcom-sta-dkms

    Install the kernel headers, DKMS, NetworkManager and the Broadcom driver.

    Terminal window
    sudo apt install -y linux-headers-$(uname -r) dkms network-manager && sudo apt install -y broadcom-sta-dkms

    Verification: If the output includes wl with a nonzero size, the driver module is loaded.

    Terminal window
    sudo modprobe -r b44 b43 b43legacy ssb brcmsmac bcma && sudo modprobe wl && lsmod | grep wl

    Remove any wireless interfaces if they exist.

    Terminal window
    sudo nano /etc/network/interfaces

    Disable Wi-Fi power saving to help prevent connection drops.

    /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
    sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
    Terminal window
    [connection]
    wifi.powersave = 2

    Restart NetworkManager.

    Terminal window
    sudo systemctl restart NetworkManager

    Configure the corporate Wi-Fi connection using WPA-Enterprise credentials.

    Terminal window
    sudo nmcli connection add type wifi con-name corporate-wifi ssid "YourSSID" wifi-sec.key-mgmt wpa-eap 802-1x.eap peap 802-1x.identity "your_username" 802-1x.password "your_password" 802-1x.phase2-auth mschapv2

    Connect to the corporate Wi-Fi network.

    Terminal window
    sudo nmcli connection up corporate-wifi

    For changes to take effect, reboot the system.

    Terminal window
    sudo reboot

    Verify the driver is active by running ip link. A wireless interface, typically wlan0, should now appear in the list.

  2. Terminal window
    sudo apt install wpasupplicant -y && sudo systemctl enable --now wpa_supplicant
  3. Terminal window
    sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
    1. Open netplan config

      Terminal window
      sudo nano /etc/systemd/resolved.conf.d/10-override-dns.conf
    2. Update config

      /etc/systemd/resolved.conf.d/10-override-dns.conf
      [Resolve]
      DNS=1.1.1.1 8.8.8.8
      FallbackDNS=1.0.0.1 8.8.4.4
      Domains=~.
      DNSStubListener=no

  4. Terminal window
    sudo systemctl restart systemd-resolved
  5. Terminal window
    sudo systemctl enable systemd-networkd-wait-online.service
  6. Terminal window
    sudo reboot