Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My system has 6 interfaces, a loopback, a Xen Bridge, and then 4 ethernet interfaces eth0-3. In this system, my DNS server assigned by DHCP on xenbr0 is

Initially eth1 is disabled and DNS assigned (checked via /etc/resolv.conf) is When I enable eth1, internet on this system stops working, I checked with /etc/resolv.conf and now DNS is (why?). Anyway DNS resolution doesn't work now.

Question is How can I make internet work while keeping all interfaces active? Why DNS server changes, and how to stop that?

About Environment: This is a Ubuntu 12.04 VM running in Xen in VirtualBox. eth1 is connected to a VBox host-only network eth2 and eth3 are connected to VBox internal networks, there is no config on these two interfaces. xenbr0 is xen bridge and eth0 is added as its one port. In Vbox eth0 is sharing IP with host machine via NAT (currently getting IP of host machine is 192.168.1.x and router IP is which is default gateway for host and DNS too. This is hown DNS is propagated upto guest machine via xenbr0.

share|improve this question
The information you supplied has nothing to do with DNS. The DNS entries are normally found in /etc/resolv.conf. BTW, you should tell us what is your network topology, what are the hops, your client is a virtual machine, etc. – Braiam May 14 '14 at 1:37
I added /etc/resolv.conf result. Also explained why routing table is added, so to avoid another question. My first guess was that packets to might be taking another interface out, but as I can still ping it so it shouldn't be the case. – JuliandotNut May 14 '14 at 1:40
@Braiam Sorry, there was some mistake at my end. /etc/resolv.conf does reflect a change, I updated that in my question now. – JuliandotNut May 14 '14 at 2:05
up vote 1 down vote accepted

Sounds like your system uses the same init script on all(?) interfaces, thus the most-recent DHCPconfigured connection will overwrite /etc/resolv.conf with whatever that DHCP defined

share|improve this answer
which script is that? anyway to avoid it (other than manually adding dns servers to /etc/network/interfaces)? – JuliandotNut May 15 '14 at 10:13
So it turned out that I need to keep only one DHCP enabled interface at a time. Multiple DHCP enabled interfaces create confusions like this one. – JuliandotNut Aug 11 '14 at 20:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.