For a QoS experiment, I wanted to connect two VMs to Open vSwitch. I created two tap interfaces and attached the VMs to them. I added the two tap interfaces to Open vSwitch. Finally, I added the ethernet port of my Ubuntu host machine to the switch. This, as expected, made my host machine lose Internet connectivity. To restore the connectivity, I removed ethernet port ip address and gave it to the bridge port instead. Although the Internet connectivity got restored, DNS stopped resolving domain names. In /etc/resolv.conf, I saw

search domain.name"

On doing some basic search, I found out that these lines are added by NetworkManager to use local forwarding nameserver (dnsmasq).

I am not sure why the name resolution is not working now and how I can fix it (other than by disabling dsnmasq and adding a fixed nameserver entry in resolv.conf). I believe that the name resolution requests are not being relayed to my service provider's nameserver.

I would really appreciate some help on this. Thanks in advance!

P.S. Interestingly enough, name resolution is working fine in the VMs. Their resolv.conf are configured with the DNS nameserver IP of my service provider.

1 Answer 1


If I get it right, you've included an interface controlled by the Network Manager into OVS. This is generally not a good idea, since it may lead to confusing networking behaviour, like in your case.

Unfortunately, after quick thinking I can not explain why exactly name resolution does not work (I suppose, it's related to the way NM handles interface configuration). What I advice you to do is to exclude your ethernet device from NM managed interfaces and use ifupdown (/etc/network/interfaces) instead to control this device. You'll be able to safely revert all the changes later, when you'll be done with testing.
So, here's how it can be done:

  • Edit /etc/NetworkManager/NetworkManager.conf to include the following sections:

  • Restart network manager

    sudo service network-manager restart
  • Put your interface configuration into /etc/network/interfaces. Should be something like

    allow-ovs0 eth0
    iface eth0 inet manual
      ovs_bridge ovs0
      ovs_type OVSPort
  • Add dns-nameservers directive to ovs-internal port configuration in /etc/network/interfaces (interface that owns your external ip address). Example:

    allow-ovs0 ovs0
    iface ovs0 inet static
      ovs_bridge ovs0
      ovs_type OVSIntPort
  • Finally, bring your external interface and ovs internal port down and back up:

    sudo ip link set down dev your-iface
    sudo ip link set down dev your-ovs-internal-port
    sudo ifup your-iface
    sudo ifup your-obs-internal-port

This should be enough. So, now your ethernet device is controlled by ifupdown and /etc/network/interfaces and your OVS internal port has all needed config options.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .