Server Fault is a question and answer site for system and network administrators. 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

The Ubuntu 10.04 server has eth0 Internet interface configured by means of an ISP's DHCP. At the same time the server has static eth0 LAN interface to which it provides masquerading (NAT) and LAN-internal DHCP service (dhcp3-server).

As far as I've understood the manual, I had to hardcode DNS servers to advertise through LAN DHCP with option domain-name-servers in dhcpd.conf.

But what if the ISP changes his DNS server IP silently (we use a SOHO-class ISP, so this won't surprise me much)? Can I configure dhcpd to advertise the DNS server the server uses itself, the one gotten by its DHCP client mechanism?

share|improve this question
Why not skip the ISP DNS servers since they are garbage part of the time. Maybe use the Google or OpenDNS servers? – Zoredache Dec 21 '10 at 19:31
@zoredache - I use Google servers as secondary and tertiary DNS servers in my config. I think (haven't checked, actually) using ISP's DNS servers is meant to be faster and more the "right way" (as using a server in my city instead of using overseas Google's servers every time). – Ivan Dec 22 '10 at 1:57

No, you can't configure ISC's dhcpd to advertise the DNS server the server uses itself. What is typically done in these SOHO setups is that a lightweight caching nameserver such as dnsmasq is installed on the dhcp server (in your case the Ubuntu 10.04 server) and you set option domain-name-servers to the internal (LAN) IP address of the server.

However, name server IP addresses don't change that often so you may choose to not worry about it. An ISP should send you email weeks ahead of time telling you the IP addresses of their DNS servers are changing.

(Note that if your ISP changed DNS IP addresses your Ubuntu 10.04 server would no longer be able to resolve names until it sends another dhcp request out (I'm not even sure if a renewal request can contain new DNS information).)

share|improve this answer
A decent ISP would send notices ahead of itme, yes. – Joris Dec 21 '10 at 18:56
"An ISP should send you email weeks ahead of time telling you the IP addresses of their DNS servers are changing" - I am pretty sure they won't, as they rely on DHCP for clients configuration and never mention manual configuration or anything related. I've only figured out our current DNS server from looking what was got from ISP's DHCP. – Ivan Dec 22 '10 at 1:52
"Note that if your ISP..." - thanks, a useful note. – Ivan Dec 22 '10 at 1:53

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.