Keeping cache.dns Current
As we explained in Chapter 4, the cache.dns file tells your server where the servers for the root zone are. We also explained that, unlike a BIND name server (which never modifies the cache file), a Microsoft DNS Server updates cache.dns with its current notion of the root name servers every time it exits.
The root name servers don’t change very often, but they do change. A Microsoft DNS Server that starts with a proper cache file should, in theory, always have the current list of root name servers in its cache file. A good practice and a part of maintaining your name server is to check your cache.dns file a couple times a year. In Chapter 4, we told you to get the current cache file by ftping to ftp.rs.internic.net. That’s probably the best method to keep the file current. Remember that you must stop the name server before updating cache.dns! If you don’t, the cache file you install will be overwritten the next time the server does stop.
You can use dig, a utility that works like nslookup, to retrieve the current list of roots just by running:
C:\> dig @a.root-servers.net . ns > cache.dns
See Chapter 12 for more details about using dig.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access