[Techtalk] Re: [Issues] DNS question

Mary mary-linuxchix at puzzling.org
Wed Jun 2 16:47:21 EST 2004


NOTE: This thread is offtopic for issues, please do not include
issues at linuxchix.org in any replies. Reply to techtalk at linuxchix.org

On Tue, Jun 01, 2004, Kai MacTane wrote:
> At 6/1/04 08:16 PM , dave wrote:
> >The problem is that I gave my registrar a DynDNS.org alias which points to 
> >my DNS server. This works well now, but it is somewhat inefficient.
> >I notice that most domains have their nameservers listed as something like 
> >ns1.domain.com.
> >I would like to do this too, but would the other nameservers be able to 
> >find mine if I just made an A-name and gave that to my registrar?
> 
> The usual way, with name servers and registrars, is to give them the IP 
> address of the server. Assuming your DNS server is at 1.2.3.4, you can set 
> up something like this in your zone file:
> 
> yourdomain.com.  A  1.2.3.4
> ns1              A  1.2.3.4
> www              A  1.2.3.4

If the zone file is for yourdomain.com, you can just skip yourdomain.com
and have a zone file that looks like this:

    A   1.2.3.4
ns1 A   1.2.3.4
www A   1.2.3.4

> , then tell your domain registrar that the primary ns for yourdomain.com is 
> at 1.2.3.4, and it should all work just fine. (This is the way I have any 
> number of domains of my own set up.)

What happens here is called insertion of a "glue" record.

I tell the registrar that the nameserver for "example.com" is
"ns1.example.com" at "1.2.3.4". When the nameserver for ".com" is asked
"what are the nameservers for example.com?" it will not only reply
"ns1.example.com", it will ALSO reply with the IP address
"ns1.example.com @ 1.2.3.4"

Have a look for example at the record for google.com
(a.gtld-servers.net is one of the nameservers for .com, use
"host -t NS com." to find this out):

    $ dig google.com @a.gtld-servers.net

    ; <<>> DiG 9.2.4rc2 <<>> google.com @a.gtld-servers.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64047
    ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 4

    ;; QUESTION SECTION:
    ;google.com.                    IN      A

    ;; AUTHORITY SECTION:
    google.com.             172800  IN      NS      ns1.google.com.
    google.com.             172800  IN      NS      ns2.google.com.
    google.com.             172800  IN      NS      ns3.google.com.
    google.com.             172800  IN      NS      ns4.google.com.

    ;; ADDITIONAL SECTION:
    ns1.google.com.         172800  IN      A       216.239.32.10
    ns2.google.com.         172800  IN      A       216.239.34.10
    ns3.google.com.         172800  IN      A       216.239.36.10
    ns4.google.com.         172800  IN      A       216.239.38.10

    ;; Query time: 227 msec
    ;; SERVER: 192.5.6.30#53(a.gtld-servers.net)
    ;; WHEN: Wed Jun  2 16:39:18 2004


See the "Additional section"? That's where the glue records are coming
in. The .com nameserver is telling me not only that the nameservers are
ns1.google.com and so on, it is telling me their IP addresses. Very
handy.

Your registrar takes care of adding these for you when you tell them
your nameserver's address.

How do they know the IP in the first place? Normally there's a separate
procedure for "registering" a nameserver, at which point you will tell
the registrar the IP of the nameserver. It's always free as far as I
know, and should be accessible from your registrar's domain management
interface.

> (Meta: Does this thread belong on techtalk?)

Yes. 

-Mary


More information about the Techtalk mailing list