Score:0

linux bridge vlan-aware and untagged traffic

ge flag

I have the following use case. A machine which runs VMs that have to be located to a VLAN with ID 166. The traffic must go out of an physical interface enp89s0 which is connected to the primary network non-tagged traffic. For such use cases in Linux a bridge helps to connect stuff together. The machine uses a Linux distro so I use netword to configure the network interfaces. Here my attempts:

br0.netdev

[NetDev]
Name=br0
Kind=bridge
[Bridge]
DefaultPVID=1
STP=no
VLANFiltering=yes

br0.network

[Match]
Name=br0
[Network]
VLAN=enp89s0
VLAN=eth166
[BridgeVLAN]
VLAN=1
[BridgeVLAN]
VLAN=166

I have considered that the default lan has VLAN=1.

The problem is that when I apply this configuration the enp89s0 interface loses IP addresses and get unreachable.

So my question here is how to have a bridge configured properly that deal with a VLAN and a network untagged.

ge flag
What I'm doing is exactly what described in here https://serverfault.com/a/1111805 what I do not understand is how to let that the physical interface receive the ip address
Score:1
mm flag

when you place a physical interface to a bridge, you don't configure IP-related parameters on it anymore, the interface basically disappears. In a usual case, it is the bridge which will receive ip address/mask for that interface. In case of vlan-aware bridge, you configure a vlan interface on top of that bridge with the neecessary vid and ip/mask.

Score:0
hk flag

If anyone is interested in how to setup the VLAN-aware bridge with "management" (untagged) IP address. It is not necessary to have a virtual interface over the bridge. It is just sufficient to have a default/native VID (= VLAN ID with enabled PVID option) with untagged egress set on the bridge, e.g.

bridge vlan add dev br0 vid 100 pvid untagged self

and the same default VID enabled for all interfaces from which the bridge IP should be available, e.g.

bridge vlan add dev eth0 vid 100 pvid master

Note: It is not necessary to have the untagged egress set for the default VID on eth0.

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.