Help creating a network bridge with the plasma-nm applet

I am trying to get a QEMU/KVM virtual machine to be on the same network subnet as the host and appear as just another device. I would like to be able to do this with network manager.

Relevant package version numbers:

bridge-utils v1.7.1-2

plasma-nm v6.5.3-1

qemu-full v10.1.2-2

libvirt 11.9.0-1

I have read many guides detailing how to do this (The arch wiki included) but cannot get anything to work. My bridge interface is either perpetually ‘Setting Network Address’ (as per the plasma-nm applet) or does not even initiate at all.

This is my plasma-nm attempt methodology:

  1. ‘Add new connection’; click bridge; enter connection name and interface name (in my case br0).
  2. Add an Ethernet-type bridged connection and restrict it to my enp2s0 interface.
  3. Click the mac randomizer (Should I do this?) and leave the link negotiation to ignore (Should I do this aswell?)
  4. Click save then configure the IPv4 method setting to be Automatic.

To the extent of my knowledge in bridged networking this should work, and repeating the same steps manually in nmtui produces the same result as mentioned above.

I would really appreciate some help and insight if possible!

Thanks :slight_smile:

I also have had trouble creating bridges with NetworkManager through the applet. I don’t think the applet supports this function right now, or it’s a bug.

The solution I found was to just use the command line, but that’s relatively straightforward.

Before you do this make sure you have brought down any existing connections that will use the interfaces you want to enslave to the bridge. You can do this in network settings. I’d also disable automatic connecting.

Network Manager

Below are the steps needed to set this up. You can change the names of the connections to suit your needs, and make sure the interface names (eth0) match those on your system.

First create the bridge like so:

nmcli connection add type bridge con-name QemuBridge ifname br0

Then create the connections that will be enslaved to the bridge. Do this for as many interfaces as you want for the bridge.

nmcli connection add type ethernet slave-type bridge con-name QemuBridgePort1 ifname eth0 master br0

You can verify that this has worked using:

nmcli device status

Which will give you a result like so:

QemuBridge      12594394-6d5a-4514-a654-3c8ad0fa2214  bridge     br0
QemuBridgePort1 9a692349-c91b-497d-87c0-4e4706e66255  ethernet   eth0

You may need to bring the connection down and then up again using:

nmcli connection down QemuBridge
nmcli connection up QemuBridge

You can verify this is working with ip -a which will show you something like this:

eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether aa:bb:cc::dd::ee::ff brd ff:ff:ff:ff:ff:ff
br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 82:4d:ca:5c:5f:7b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic noprefixroute br0
       valid_lft 86288sec preferred_lft 86288sec
    inet6 ::/64 scope global dynamic noprefixroute 
       valid_lft 86113sec preferred_lft 313sec
    inet6 ::/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

QEMU

If you are using Virtual Manchine Manager you can open your VM and navigate to the network interface settings. In the drop down menu select Bridge Device, and enter the name of the bridge, in this case br0. Alternatively edit the xml file to something like this:

<interface type="bridge">
  <mac address="11:22:33:44:55:66"/>
  <source bridge="br0"/>
  <model type="virtio"/>
  <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
</interface>

Let me know if you need any more help :slight_smile:

To expand a bit. Once you have the bridge set up using nmcli and then you go and check the Plasma network settings for the bridge. You’ll note that the enslaved interfaces aren’t listed anywhere. They do show up with nmtui which leads me to conclude that the applet is either bugged or does not support this.