0

does anyone know if linux bridge supports passing multiple VLANS? I have seen many example like eth0.VLAN_id then add this to the BR0 for example and that works. What i am actually looking for is to pass many VLANS on BR0 for example eth0.11,eth0.2,eth0.3. All of these are binded to BR0, but it does not work.

After lots of searching i tried binding the VLAN to the bridge instead of the physical adapters but that has not worked. For example i had BR0.1 BR0.14 and so on. This does not work. Adding multiple VLANS and binding them to the physical interface does not work. Multiple VLANS to the same bridge also results in the VLAN tagged traffic to be dropped.

Anyone have any ideas on how to achieve this with linux bridge? The reason i am asking is what if i have a FW that has many sub interfaces in different VLANS and each top level interface is linked to a single br interface. In other words can a linux bridge be trunk port?

0

Have you tried something like this:

network:
    version: 2
    renderer: networkd
    ethernets:
        ens1: {}

    vlans:
        vlan2:
            dhcp4: no
            dhcp6: no
            accept-ra: no
            id: 2
            link: ens1
        vlan3:
            dhcp4: no
            dhcp6: no
            accept-ra: no
            id: 3
            link: ens1

    bridges:
        br2:
            dhcp4: no
            dhcp6: no
            interfaces: [ vlan2 ]
        br3:
            dhcp4: no
            dhcp6: no
            interfaces: [ vlan3 ]

This would essentially create a switch attached to ens1, "trunking" for vlans 2 & 3.

  • Hi thanks for this example and i know this works what i want is to pass vlan 2 and 3 on the BR2 for example. So mutliple vlans via a single BR interface if that makes sense. – ognjen Oct 22 '19 at 11:01
  • Gotcha, in that case you can remove the second bride (br3 in this case) and just add the other vlan to the first bridge, e.g. interfaces: [ vlan2, vlan3 ] – fencepencil Oct 23 '19 at 1:30
  • ok cool do you also have the brctl commands to achieve this. I am going to test this shortly – ognjen Oct 23 '19 at 10:50
  • For Virt Manager to see it, you'll need to create a file in /etc/libvirt/qemu/networks/. Call it br2.xml for example. And then create something like this: Netplan Examples – fencepencil Oct 24 '19 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.