Info
Content

LACP Bonding on Ubuntu 18.04 (Netplan)


Use your favourite text editor to open the netplan config .yaml file.

nano /etc/netplan/01-netcfg.yaml

Ensure the file looks identical to the template below, making sure to adjust the interfacesip addressnetmask and gateway ip to your servers' needs.

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
    eno2:
      dhcp4: no
  bonds:
    bond0:
      interfaces: [eno1eno2]
      addresses: [192.168.1.2/24]
      gateway4: 192.168.1.254
      nameservers:
        addresses: [77.247.176.114, 77.247.176.115, 85.159.238.17]
      parameters:
        mode: 802.3ad
        mii-monitor-interval: 1
        transmit-hash-policy: layer3+4

Keep in mind that netplan is very strict on it's use of spacing - be sure to use the correct amount of spaces like in the example above.

Apply the new configuration to make use of it effective immediately

netplan apply
No Comments
Back to top