0

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 192.168.1.1.

Initially eth1 is disabled and DNS assigned (checked via /etc/resolv.conf) is 192.168.1.1. When I enable eth1, internet on this system stops working, I checked with /etc/resolv.conf and now DNS is 127.0.0.1 (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 192.168.56.0/24. 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 10.0.2.15). IP of host machine is 192.168.1.x and router IP is 192.168.1.1 which is default gateway for host and DNS too. This is hown DNS is propagated upto guest machine via xenbr0.

3
  • 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
    Commented May 14, 2014 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 192.168.1.1 might be taking another interface out, but as I can still ping it so it shouldn't be the case. Commented May 14, 2014 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. Commented May 14, 2014 at 2:05

1 Answer 1

2

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

2
  • which script is that? anyway to avoid it (other than manually adding dns servers to /etc/network/interfaces)? Commented May 15, 2014 at 10:13
  • 1
    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. Commented Aug 11, 2014 at 20:04

You must log in to answer this question.

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