I have a linux bridge set up with some VMs/containers, as well as one or more physical interfaces. The goal is for container interfaces to run on different VLANs, with the uplink connections (managed by netplan) also on the associated VLANs. The netplan setup looks roughly something like this:
version: 2
bonds:
bond0:
interfaces: [eno3, eno4]
parameters:
mode: 802.3ad
min-links: 1
vlans:
bond0.2001:
id: 2001
link: bond0
dhcp4: no
bridges:
sw:
interfaces: [bond0.2001]
link-local: []
The problem is that the mechanism netplan uses to associate the "vlan" interface with the bridge doesn't actually associate it with the desired vlan inside the bridge:
$ brctl show
bridge name bridge id STP enabled interfaces
sw 8000.2ea3ff2f0b00 no bond0.2001
$ bridge vlan
port vlan-id
bond0.2001 1 PVID Egress Untagged
container1 2001 PVID Egress Untagged
So if everything inside the bridge runs on the same vlan (or no vlan), and there is only one physical interface, things will work and the physical interface will tag egress traffic. But mixing vlans within the bridge seems impossible given that netplan always gives every physical interface inside the bridge the same vlan 1. Am I missing something?