I'm trying to reinstall an Ubuntu server to 18.04.
I discovered that 18.04 uses Netplan, and I'm having trouble creating a bond interface using this.
Updated configuration:
############# BOND - VLAN ##################
network:
version: 2
renderer: networkd
ethernets:
switchports:
match: {name: "ens*"}
bonds:
bond0:
interfaces: [switchports]
parameters:
mode: balance-alb
vlans:
inet:
id: 50
link: bond0
addresses: [X.X.X.X/24]
gateway4: X.X.X.252
dhcp4: no
nameservers:
addresses: [X.X.X.33]
It seems that I shouldn't have 2 match statements and ens* in a single statement did it - I'll clean this up when I get it to work..
I have installed ifenslave & bridge-utils as someone suggested this, still nothing.
Also I've enabled the bonding module in /etc/modules
.
My original issue was that the interface was in UP state, but I could only ping the interface itself, not anything else.
I couldn't get this to work, so I ended up renaming the /etc/netplan/<name>.yaml
file and installing ifupdown
.
If anyone has a clue as to why this didn't work, I'll be happy to know :)
I installed Ubuntu Server and surprising enough it asked me if I wanted to to setup bonding.
This is the yaml file that was setup:
I will update this as I learn more about the newer style of networking configuration in Ubuntu.
UPDATE
To change this to be static address do the following:
!Note! Your default *.yaml file name may be different.
!Note! You can name your config file whatever you want just make sure it ends with .yaml
In this file (my-network-file.yaml) copy from above and append the following changes:
Make sure you change the ip addresses to reflect your network. After this, I just rebooted the machine and my new network config was loaded and working.
You can alternatively use:
This should apply the new config without a need for a reboot.
Side Note You may want to observe spacing and not use tabs as this may cause issues with your config file.
If you're unsure of your network interfaces you can do one of the following
or
Hope this helps!