Network issues on host to link a bridge device

Hi everyone, I try set up a virtual machine with a network device on bridge mode but I can’t.

I would like set up a network device in bridge mode to connect a Qemud virtual with Internet using real IP from the host, similar to VirtualBox do.

I have been looking for an answers on Arch Wiki ( Network bridge - ArchWiki ) but following the steps on “iproute2” section, it break network connection with Internet.

What could be doing wrong?


It starts with the Hardware. If you are using Ethernet, it can work, but if you only have a Wifi device it will often not work. But this depends on your hardware.

The other problem is mixing methods. If you want to do it via manual commands, it will not go well if you are also using programs like NetworkManager. You need to decide if you want to use a tool like NetworkManager for your GUI or do it manually on the command line. (NM supports creating bridges).

What did you mean by this? The host IP and the VM IP will never be the same. The closest will be a NAT, because form the Outside it will look like one system. The VM and the host uses the same IP on the network which is connected to the host.
With a bridge, your VM will be using a IP in the same Network address space as the host, but it will not be the same IP.


Thanks you for your detailed reply.

I am using Ethernet.

To set up a network device on bridge mode, I have been using iproute2 so $ ip link command to create it and assign it the main host interface such as master.

:thinking: true… I didn’t know that. Could be failed because I have been running NetworkManager such as the main software to manage the network settings and iproute2 can’t change the network settings at the same time?

Yeah! That it’s, I have explained bad.

Yes, this creates a big mess. If you want to use iproute2 (I would not suggest that) disable NM. Or at least make sure that NM does not start any of the saved connections. Keep in mind that using iproute2 will not survive a reboot.

If you use a DE(XFCE,KDE,Gnome,…), I would suggest you use NM. It is very simple. Make sure nothing from you experiments are still there. Start the nm-connection-editor, create a bridge, add one Ethernet Bridge connection in the bridge settings. Set up the bridge IPv4 and IPv6 settings to your liking. Make sure the bridge and the new Ethernet connection are the only connections that are started automatically. And you are done.

Unfortunately on XFCE, the nm-applet can’t really handle a bridge. You see that it is connected and you can switch to normal Ethernet connections, but you don’t see the bridge in the drop down menu.


Thanks you so much for your reply and forgive me for taking so time to answer you, but I have been working in other projects on holidays.

Ok, I have created a bridge network device and I have linked it (such us slave) with a new Ethernet connection. However seem it don’t work.

$ nmcli connection show

NAME                 UUID                                  TYPE      DEVICE  >
quemud-1             3d018dc9-7dab-4edd-b628-bd8b605f64c6  bridge    brquemud1
brquemud1 port 1     b604cee7-e89a-483f-bc30-0ec34b543620  ethernet  enp6s0

They are up, working for my host (I have got Internet connection too). Also is detected to libvirt/quemud but my VM can’t connect it.

I have been looking for an other way to set up it, and I have follow this tutorial. I have did not “Optional” step because I suppose that libvirt is doing that for me, in fact I can see it through the GUI:

<interface type="bridge">
  <mac address="00:00:00:00:00:00"/>
  <source bridge="brquemud1"/>
  <model type="rtl8139"/>
  <link state="up"/>
  <address type="pci" domain="0x0000" bus="0x0b" slot="0x01" function="0x0"/>

I am following all the steps but my VM don’t connect it:

VM network setting:

Some idea?

EDIT: Neverdeless I had tried “Optional” step mentioned above but It didn’t work. Today, I was checking VM network settings (.xml above) and I tried changing model type from “rtl8139” to “virtio” and now work.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.