I have a MIPSEL machine running on QEMU. In order to enable networking inside my qemu MIPSEL machine, I use a bridge virbr0.

First, I create the interface tap0 and bring it up. I do it as follows :-

sudo tunctl -t tap0 && sudo ifconfig tap0 up`

Next, I add tap0 and the interface that brings in the internet connection(in this case eth1) to the bridge.

sudo brctl addif virbr0 tap0

sudo brctl addif virbr0 eth1

Finally, I start off my QEMU machine with the flags -net nic -net tap,ifname=tap0,script=no,downscript=no.

At this point a couple of things happen.

  1. I am not able to access the internet connection from my QEMU MIPS machine. It seems to be able to ping virbr0 and eth1's ip address, however, it is unable to reach the internet.
  2. The second I add the eth1 interface to virbr0 my host loses its ability to connect to the internet. It is able to connect to the internet only if I remove eth1 from virbr0.

How can I solve [1] and/or [2]?



1 Answer 1


For number 2, if you have a physical interface on a bridge, the bridge should be the thing that has the IP address, not the physical interface. I suspect your eth1 still has the address. Try assigning the IP to virbr0 instead. So, do an ip addr del from eth1 and then ip addr add with the same IP/netmask to virbr0. Also, use ip route show to make sure the default route is not going to try to go out eth1 as well. Note, that eth1 still needs to be up, it just should not have an IP address.

I suspect that will also help clear up number 1, assuming your VM is getting a suitable IP for reaching the network.

  • This is great thanks! Now I get the internet from within the QEMU image but I don't seem to from the host machine(the eth1 interface does not have an ip address of its own at this point). Is that the intended result?
    – user3655
    Jun 10, 2015 at 11:04
  • 1
    @uki you should be able to get network access back for the host itself by adding the IP information that had previously been on eth1 to the bridge itself. Ultimately eth1 will still be used for traffic, but it will never need to explicitly have an address of its own Jun 10, 2015 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy