DNS setup

Simon Hobson dhcp at thehobsons.co.uk
Tue May 16 17:56:56 UTC 2006


Bruce Hudson wrote:
>  >> I don't know the DNS-Server adresses because they will be obtained
>>>  automatically by the pppd-daemon on each dial in from my internet
>>>  service provider. How I have to setup my DHCP-Server to make these
>>>  obtained DNS-adresses known to the DHCP-Server configuration so they
>>>  can be obtained by the DHCP-Clients?
>>
>>  Do the DNS servers actually change on each dialin ? If so, ditch the
>>  ISP and find one that knows how to run a network !
>
>     While I agree with Simon, for completeness sake you can also have your
>DHCP config include a global "option domain-name-servers" statement from a
>separate file. Then simply modify your init script to generate this file
>from the values in the system's resolver config before the DHCP server is
>started.

Which is why I asked how often they change. Configuring the 
nameservers option from the resolver config will not work for clients 
obtaining their lease before a change occurs. You would have to 
trigger a script to run every time the resolver config changed, 
taking care of course not to remove the nameservers when the resolver 
is empty (ppp down), and restart the dhcp server.

Since a common chain of events is likely to be :
client boots and gets lease
client attempts to access internet
access triggers ppp to bring up link
resolver config updated -> dhcp config updated
--> client still has old nameserver list

If the nameservers change infrequently then this isn't a problem, but 
if they change a lot then you will have random "client can't resolve 
anything" problems.

The other advantage of running your own dns server is that you can 
use it to resolve names internally (cf recent discussion). You could 
use it as a forwarder, in which case it is easier to update the 
forwarder config and reload bind than it is to persuade dhcp clients 
to change.

Simon


More information about the dhcp-users mailing list