DNS and DHCP not agreeing on an IP address

dhcpdomain-name-systemwindows 7windows-server-2003

I'm having a problem where our Windows Server 2003 domain controller assigns my Windows 7 computer one IP address (x.x.x.75) via DHCP, but reports another (x.x.x.84) via DNS. This causes some interesting behavior on the network. If I change my adapter settings to get IP and DNS addresses from DHCP, I can access the internet, but no one on our network can access my computer. If I change my IP manually to what DNS says it is, I lose my internet access, but everyone can get to my computer again.

I know that we have some old, invalid reverse DNS pointers hanging around (a reverse lookup on an IP address often gives more than one result, usually not including the one that is correct), so that could be contributing, but my problem is recent, and the invalid reverse pointers have been around a long time.

What's going on, and how do I fix it?

Best Answer

Do you have DNS aging and/or DNS scavenging properly configured? As you said yourself, it sounds like you have too many old DNS records hanging around on your domain controller. My suggestion is to look into setting up DNS scavenging or at the very least, delete the old A record (x.x.x.84) and then renew your workstation's DHCP lease for testing purposes.

DNS scavenging will periodically remove the old DNS records that were dynamically generated when a client received a DHCP lease. This is a Good Thing (TM). DNS records are only good (and useful) if they are actually fresh. Having a bunch of records that point to clients that are no longer there isn't useful.

You might also want to look at your DHCP lease TTL to make sure that it appropriately matches your DNS TTL and "aging" policy. A contrived example: if your TTL for DHCP leases is 12 hours and your DNS aging policy is to keep records for three weeks, you're just setting yourself up for trouble.

The earlier mentioned technet blog post is a good place to start.