Configure an LACP active network interface bonding on Ubuntu 18.04 using netplan
:
root@srv01:~# mv /etc/netplan/50-cloud-init.yaml /etc/netplan/01-netcfg.yaml
root@srv01:~# cat /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: false
optional: true
eno2:
dhcp4: false
optional: true
root@srv01:~# cat /etc/netplan/02-bondings.yaml
network:
version: 2
renderer: networkd
bonds:
bond0:
interfaces: [eno1, eno2]
addresses: [192.168.1.10/24]
gateway4: 192.168.1.1
parameters:
mode: 802.3ad
nameservers:
search: [subdomain.example.com]
addresses: [1.1.1.1, 8.8.8.8]
dhcp4: false
optional: true
Apply the network interface configuration changes:
sudo netplan --debug apply