Switch from systemd-networkd to NetworkManager

I have a working Network setup, based on systemd-networkd, which allow me to bridge to KVM guests to the “vlan trunk” or individual “vlan”, per virtual NIC.

enp1s0.network

[Match]
Name=enp1s0

[Network]
VLAN=vl1
VLAN=vl6
VLAN=vl100
Bridge=br0

br0.netdev

[NetDev]
Name=br0
Kind=bridge

br0.network

[Match]
Name=br0

[Network]
DHCP=no

For each vlan (vl1, vl6 and vl100), I have 4 similar files for each of them:

vl1.netdev

[NetDev]
Name=vl1
Kind=vlan

[VLAN]
Id=1

vl1.network

[Match]
Name=vl1

[Network]
Bridge=br1

br1.netdev

[Match]
Name=vl1

[Network]
Bridge=br1

br1.network

[Match]
Name=br1

[Network]
DHCP=ipv4

For each bridge, br0, br1, br6, br100, I have a xml file for them:

br0.xml
<network>
   <name>br0</name>
   <forward mode='bridge'/>
   <bridge name='br0' />
</network>

Then for each, I run
$sudo virsh net-define br0.xml

In the Guest, via virt-manager, if I want to bridge to vl100 (for PXE boot testing), I will add a NIC with Network source of Bridge device…, then enter br100 in Device Name.

It works:

  • vm0 bridge to br0, then create vlan interface in NetworkManger inside the guest to any vlan even those undefined in the host
  • vm1 bridge to vl1
  • vmA brdige to both vl100 and vl6
  • etc

All the guests seems working concurrently well enough for me.

But I know NetworkManager is the default for Fedora. So I would like to recreate my setup using nmcli.

I tried with nm-connection-editor, but only able to create br0. Then have no ideas on how to create br1, etc.

1 Like