User Tools

Site Tools


misc:netplan_wifi_bond

Netplan WiFi Bond

While playing with Ubuntu on a HP T520 thin client, I found there was built in WiFi. As I often use these devices for hosting services (Home Assistant, Pi-Hole, etc), having the WiFi interface as a redundant connection was appealing. The first attempt ended in disaster when I dropped the box off my Dad's home network and locked myself out. A second attempt revealed the following configuration to work well:

/etc/netplan/01-netcfg.yaml

network:
  version: 2
  renderer: networkd
  wifis:
    wlan0:
      dhcp4: no
      dhcp6: no
      access-points:
        "SSID":
           password: "password"
  ethernets:
    eth0:
      dhcp4: no
      dhcp6: no
  bonds:
    bond0:
      dhcp4: yes
      dhcp6: yes
      interfaces:
        - wlan0
        - eth0
      parameters:
        mode: active-backup
        primary: eth0
        fail-over-mac-policy: active
        mii-monitor-interval: 200
        up-delay: 200

This works very reliable, with a minimal fail-over time between Ethernet and WiFi. For services that rely on a consistent IP address (and in come cases consistent network interface, ie DHCP) this a good solution.

misc/netplan_wifi_bond.txt · Last modified: 2021/08/03 23:17 by a