Tuesday, 11 August 2009

DHCP Not Updating DNS

So I had a weird problem -- suddenly my DHCP server stopped updating my DNS server when my main laptop that I use all the time renewed its DHCP lease. It seemed to be working fine for all other machines on my network.

After much fooling around and some reading, I discovered in the middle of some document a statement that the DHCP server keeps track of whether it thinks it has updated the DNS server, to avoid one round trip when renewing a lease. This means that if the DHCP server thinks it has updated DNS, it won't try again and if the DNS server doesn't have that address, it'll never get it.

Well, the DNS server will never get it until you do the following on the DHCP client machine to force a release of the lease:
sudo dhclient -r
Once you do that and then renew the lease again (e.g. disconnect and connect the network) everything is fine.

No comments: