You are not logged in.

#1 2022-12-18 01:14:32

kpl_kampfsemmel
Member
From: Austria
Registered: 2019-12-10
Posts: 6

systemd-networkd: multiple VLAN bridges for qemu/kvm

Hello!

I have a computer with only one physical network interface which I intend to use as a qemu/kvm hypervisor.
On the switch port I have 3 VLANs:
- untagged 1048 "mgt" for management
- tagged 1000 "dmz"
- tagged 1248 "gst"

As far as I understand, I need a bridge for each of those networks in order to be able to assign virtual machines to the correct VLAN.
So far, I was able to create a bridge for the untagged connection and assign an IP address for the hypervisor's primary management connection.
Here's the content of the three configuration files I created in /etc/systemd/network/:

# br1048-mgt.netdev
[NetDev]
Name=br1048-mgt
Kind=bridge
MACAddress=00:07:32:3a:1f:94

# br1048-mgt-enp1s0.network
[Match]
Name=enp1s0
[Network]
Bridge=br1048-mgt

# br1048-mgt.network
[Match]
Name=br1048-mgt
[Network]
Address=192.168.24.203/26
Gateway=192.168.24.193

I didn't find a working configuration for the tagged connections though.
Here's what I tried (and failed):

# br1000-dmz.netdev
[NetDev]
Name=br1000-dmz
Kind=bridge

# enp1s0.1000.netdev
[NetDev]
Name=enp1s0.1000
Kind=vlan
[VLAN]
Id=1000

# br1000-dmz-enp1s0.1000.network
[Match]
Name=enp1s0.1000
[Network]
Bridge=br1000-dmz

The ArchWiki page about systemd-network configuration was a huge help, but doesn't seem to contain anything on this specific setup. (Or I was too blind to see it.)
Can someone point me into the right direction here?

Last edited by kpl_kampfsemmel (2022-12-18 01:22:35)

Offline

Board footer

Powered by FluxBB