I am trying to add a few unmanaged bridges to LXD. I have 2 NIC's on the server, one is the main Lan for the server and it's own services and the other is meant to be used by LXD exclusively. I want that additional NIC to have a bridge to 3 vlans, one of which is untagged. Creating a bridge for the untagged vlan was easy enough using the below config:
network:
version: 2
ethernets:
enp5s0:
dhcp4: true
dhcp6: no
enx0s0:
match:
macaddress: 00:e0:4c:02:61:57
set-name: enx0s0
bridges:
lxdbr1:
interfaces:
- enx0s0
parameters:
stp: true
forward-delay: 4
dhcp4: no
dhcp6: no
Creating the tagged networks seams to be more difficult. I thought that I could simply add a vlan tag in the container configuration:
devices:
enp1s0:
nictype: bridged
parent: lxdbr1
type: nic
vlan: "32"
:
sudo ip link set lxdbr1 type bridge vlan_filtering 1
This did however not work. So I tried creating a bridge over a vlan.
bridges:
lxdbr1:
interfaces:
- enx0s0.32
parameters:
stp: true
forward-delay: 4
dhcp4: no
dhcp6: no
vlans:
enx0s0.32:
accept-ra: no
id: 32
link: enx0s0
But unlike my first untagged bridge, this had the same result as adding vlan
to the container configuration. It does not work.
I have made a lot of different attempts based on various sources, but I cannot get any vlan connection work.