August 31st, 2011, 03:11 AM
Domain using it's child name server's as name servers
Hello, I have a domain mydomain.com that has a child name server ns1.mydomain.com. The child name servers work fine serving other domains, ie otherdomain.com. However, when setting the name server for mydomain.com to ns1.mydomain.com it does not work and fails without any information with dig. Please let me know what the problem is.
August 31st, 2011, 08:06 AM
Have you checked the logs on the server for errors? What happens during a dig? This would probably be quicker if you posted the domain name or some config files.
August 31st, 2011, 08:50 AM
Problem was resolved, I did not know you had to specify ns1 IN A ip in the domain zone file. A little circular imo
Is there a reason why DNS requires the IPs of the nameservers? What's the point of that if they are specified at the registrar. Name server IP forwarding/redirection? So does a DNS request go like this:
Ask registrar for name server IPs
Ask name server IPs for actual IPs
Go to actual IPs and get info
Why doesnt DNS default to the registrar IPs?
Last edited by imagenesis; August 31st, 2011 at 09:03 AM.
August 31st, 2011, 11:00 AM
That's sort of close. A lookup starts at the root servers. They refer to the tld servers, from there the tld servers give you glue records. Glue records are those direct IP's to the name servers. The thing with glue records is that they are only used for that recursive lookup. The answer from them is a referral and non-authoritative (no aa flag). So it's like a one time use token to query a server directly.
Originally Posted by imagenesis
On the response you should get the name servers in the authority section and since the response came from the name servers that are authoritative, the info can be cached and used. The problem is that if someone is using DNS software that allows them to not have A records for the name servers (newer software won't even load the zone), the authority section is cached still. But if it's cached with no IP, the next time the server has a query for that domain it will go directly to the name servers in the cache and not do a recursive lookup. So if it can't resolve the name servers, you'll get a servfail and the name servers will be ncached(3hrs default). If the NS A record points to the wrong IP's, then you just get servfails.