Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hrvoj3e/0593df10d3dadd52cd038d5cd824e237 to your computer and use it in GitHub Desktop.
Save hrvoj3e/0593df10d3dadd52cd038d5cd824e237 to your computer and use it in GitHub Desktop.
Ubuntu 18.04 LACP Network Interface Bonding

Interface bonding

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment