Click to See Complete Forum and Search --> : Some questions about DNS zone files


robeb
03-18-2003, 06:48 PM
Can someone can look this over and let me know if I know what the hell I'm talking about. I'm trying to figure this whole DNS thing out.

In a typical zone file you might have...

mydomain.com. IN SOA ns.mydomain.com.

This means that any request to resolve the domain mydomain.com or any subdomain of mydomain.com will be sent to ns.mydomain.com or whatever the name of the name server is.

Thus, the name server must also have a NS record and a A or CNAME record to resolve itself, correct? So...

mydomain.com. IN NS ns.mydomain.com.
ns.mydomain.com. IN A 1.2.3.4

This is so when you use a comand like "dig" you get back the Authority Section of the name server (ns.mydomain.com) and Additional Section, which lists the resolved IP of the name server (1.2.3.4).

So, it wouldn't be a good idea to have something like

blah.mydomain IN NS ns.mydomain.com.

unless blah.mydomain.com resolved to an actual IP. Hence, the reason we have

mydomain.com. IN NS ns.mydomain.com.

because mydomain.com does resolve to an actual IP address.

bwkaz
03-18-2003, 08:23 PM
But (for example) justlinux.com does resolve to an actual IP address. ;)

You have an NS record for each subdomain that you host. If you own and administer the mydomain.com domain, and want to sell (or whatever) a subdomain of that, called theirdomain.mydomain.com, then you would need an NS record for "theirdomain" pointing at whichever name server serves the theirdomain.mydomain.com domain.

For example, when Internet.com bought the rights to use the justlinux.com domain, whoever they bought the name from put an NS record in the .com zone, that points at Internet.com's name server for the justlinux.com domain. This is so that www.justlinux.com resolves properly using Internet.com's nameserver.

Make any sense?

robeb
03-19-2003, 08:17 PM
It's beginning to make sense. Intenet.com's name servers are used to resolve justlinux.com's domain name to an IP address. So, somewhere in their zone files they have a NS record that says:

justlinux.com IN NS ns1.internet.com
justlinux.com IN NS ns2.internet.com

Plus, the name servers have an A record for justlinux.com and www.justlinux.com:

justlinux.com IN A 63.236.73.208
www.justlinux.com IN A 63.236.73.208

Or maybe they use CNAME record:

www.justlinux.com IN CNAME justlinux.com

Is that correct?

bwkaz
03-20-2003, 11:26 AM
Sounds about right to me.

:)