Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

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 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. –  JuliandotNut May 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 at 2:05

1 Answer 1

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 at 10:13

Your Answer

 
discard

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.