Score:0

Netplan support for configuring an interface's VLAN inside bridge

aw flag

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?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.