To my surprise, windows was using my secondary DNS (18.104.22.168) instead of my primary, internal DNS! After some searching, I finally found this knowledge base article.
This behavior occurs because the Windows XP DNS Client service (Dnscache) follows a certain algorithm when it decides the order in which it uses the DNS servers configured in the TCP/IP properties. If the DNS server list is reprioritized, the Windows XP DNS Client service resets the server priority at periodic intervals. By default, the server priorities are reset every 15 minutes.Luckily, the workaround in that same article fixes the issues I was having.
To work around this behavior, modify the registry so that the DNS server that is configured first is tried first on each query. Follow these steps, and then quit Registry Editor:Even though this article is for Windows XP, this worked for me on Windows 7.
When you set ServerPriorityTimeLimit to 0 (zero), the server priorities are reset before the DNS Client service decides which DNS server to use. You must restart Windows XP for these changes to take affect. Any other value used in this field will cause the default behavior.
- Click Start, click Run, type regedit, and then click OK.
- Locate and then click the following key in the registry:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters
- On the Edit menu, point to New, and then click REG_DWORD.
- Type ServerPriorityTimeLimit, and then press ENTER.
- On the Edit menu, click Modify.
- Type 0, and then click OK.