17.10 netplan config with bridge
Solution 1:
your configuration could look like this:
network:
version: 2
renderer: networkd
ethernets:
enp10s0:
dhcp4: false
bridges:
br0:
interfaces: [enp10s0]
dhcp4: true
parameters:
stp: false
forward-delay: 0
Solution 2:
Here's my config that's very similar to above. This worked for me with 18.04 LTS:
network:
version: 2
ethernets:
enp5s0f0:
dhcp4: true
enp5s0f1:
dhcp4: true
bridges:
br0:
interfaces: [enp5s0f0]
dhcp4: true
optional: true
Solution 3:
Here is a yaml that I just completed on mine to get bridge working. This was a headache to do for me, because I am terrible with Linux. This is on Ubuntu Server 18.04 LTS, but I am a bit confused, because the .yaml is "50-cloud-init.yaml", but I didn't do the cloud install, just the normal server. Maybe that is normal, but it didn't seem to match up with the naming convention I was finding in tutorials. Side note, while this DOES work on my server, I am having a HELL of a time with KVM. The machine SHOWS running in virsh, but it sits there with the CPU pegged, isn't pingable, but doesn't give errors. In 14.04, it JUST WORKED. I am tempted to downgrade.
After you completed the .yaml changes, you can verify them, then apply them with the following commands:
sudo netplan --debug generate
sudo netplan apply
Note any errors you get start from the top left corner, including commented out lines. starting with Line 0, and column 0.
network:
version: 2
renderer: networkd
ethernets:
switchports:
# all cards on second PCI bus;
# unconfigured by themselves, will be added to br0 below
match:
name: enp1*
mtu: 4400
bridges:
# the key name is the name for virtual (created) interfaces;
# no match: and set-name: allowed
br0:
# IDs of the components; switchports expands into multiple interfaces
interfaces: [switchports]
addresses: [172.16.5.20/24]
gateway4: 172.16.5.1
nameservers:
addresses: [172.16.5.2]
parameters:
forward-delay: 0
stp: false