This week I have struggled with DNS and had problems.
I set up my domain at the end of last week, so DNS servers should have refreshed by now.
I have my domain hosted at 1and1 (I can hear you sighing already) and I set up "ns1." and "ns2." subdomains with the A records pointing to the 2 nameserver IPs on my server. I'm using DirectAdmin and I've set up the nameservers correctly on there. Named is running.
It works about 50% of the time, randomly, in different parts of the world. That's the best way to describe it. My server never goes down, I'm convinced that's not the issue.
Here's an example of NS2 failing:
Searching for www.mydomain.co.uk A record at k.root-servers.net Got referral to ns1.nic.uk. [took 88 ms]
Searching for www.mydomain.co.uk A record at ns1.nic.uk. Got referral to ns2.mydomain.co.uk. [took 86 ms]
Searching for www.mydomain.co.uk A record at ns2.mydomain.co.uk. Error: Couldn't resolve DNS server name/IP [ns2.mydomain.co.uk].
An error occurred: Couldn't resolve DNS server name/IP [ns2.mydomain.co.uk].
I could not get to the nameserver authoritative for www.mydomain.co.uk. Sorry!
But try it again and NS1 works:
Searching for www.mydomain.co.uk A record at l.root-servers.net Got referral to NSA.NIC.uk. [took 70 ms]
Searching for www.mydomain.co.uk A record at NSA.NIC.uk. Got referral to ns1.mydomain.co.uk. [took 24 ms]
Searching for www.mydomain.co.uk A record at ns1.mydomain.co.uk. Reports an answer.
Record is: blah
Looking up at ns2.mydomain.co.uk.... Timed out.
Looking up at ns1.mydomain.co.uk.... Reports 1 A record(s). 74ms.
Now let me tell you ... there is NO difference between NS1 and NS2 apart from the IP addresses. They are both registered with the same registrar (1and1) on the same domain, they are both set up on my server, they are both pingable (by me). They both resolve to my server.
What on earth is going on here? Add to this the fact that it seems to be completely random? I'm lost.
It looks like ns2.mydomain is not setup correctly with the registar. I would delete it and try to readd it. The resolving problem it is having is with the registar, for some reason or another it is not giving the ip for ns2 when it is queried.
John W, CISSP, C|EH
MS Information Security and Assurance ITEagleEye.com - Server Administration and Security Yawig.com - Managed VPS and Dedicated Servers with VIP Service