DNS and DHCP Problems

Asked by Lumpy

I have two NICs installed on my server, both of them are set to obtain an IP address through DHCP. One is in a private network with no access to the outside world (my lab network). The DHCP server in my lab network has an IP address of 192.168.0.250. The other NIC is in a public network, getting an IP address from a server that has an IP address of 192.168.1.254. This server is acting as a DNS forwarder for the ISP. Ubuntu will always set up 192.168.0.250 as the DNS, even if you add 192.168.1.254 in the resolv.conf or through the GUI in the network tab. Once you add the 1.254 address to the resolv.conf file and reboot and/or restart the network, the resolv.conf file gets overwritten, and the 0.250 address is back in the DNS entry. Do you think that Ubuntu is trying to use 192.168.0.250 because it is a lower address than 192.168.1.254? Why does Ubuntu overwrite any changes you make in the resolv.conf file? Thanks for taking the time to read this, and any help you might have.

All the Best to you,
Lumpy

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
John Rose
Solved:
Last query:
Last reply:
Revision history for this message
Best John Rose (johnaaronrose) said :
#1

The /etc/resolv.conf file is overwritten by the domain-name-servers info from /etc/dhcp3/dhclient.conf at login or running sudo bash /etc/init.d/networking restart (which is a script doing this action). Therefore amend /etc/dhcp3/dhclient.conf appropriately.

Revision history for this message
Lumpy (jimk38) said :
#2

Thanks John Rose, that solved my question.