12

I kind of know why glue records are needed (cyclic dependencies), but when are they needed? Are they only needed when setting a domain's nameservers to my own machine on the internet - like "ns1.mydomainonmyserver.com" ??

Is there any need / point in making glue records when using external / hosting provider's nameservers?

3 Answers 3

13

You only need glue records when the hostname for your nameserver is part of the same domain as it's trying to serve.

Glue records are published in the parent zone. Hence if the operator of example.com wanted to have nameservers named ns1.example.com and ns2.example.com then the .com domain would need something like:

example.com.     IN NS ns1.example.com.
                 IN NS ns2.example.com.
ns1.example.com. IN A  192.0.2.1
ns2.example.com. IN A  198.51.100.5

(example subnets taken from RFC 5737).

The child zone would usually have the same A records in it (even if only for consistency), but when they're in the child zone they're not technically glue records any more.

4
  • In real life I've learned that some domain providers need glue records even when dns is not the one authoritative for domain that it is subdomain of and domain being subject is not that domain. Like they need glue records for ns4.example.com to add dns for somedomain.com when ns4.example.com does not serve example com (ns1 and ns2 does).
    – Zbyszek
    Jan 20, 2016 at 19:01
  • Is that a typo ('...the .com domain would need...') or is it real?
    – david.pfx
    Mar 21, 2017 at 0:40
  • @david.pfx no, that's not a typo - the glue records go in the parent domain
    – Alnitak
    Mar 21, 2017 at 1:33
  • @Alnitak: So I understand how to add records to the 'example.com' domain, but how would you suggest I go about adding records to the '.com' domain?
    – david.pfx
    Mar 22, 2017 at 3:58
3

I guess this entry from Wikipedia should answer that pretty well:

Circular dependencies and glue records

Name servers in delegations appear listed by name, rather than by IP address. This means that a resolving name server must issue another DNS request to find out the IP address of the server to which it has been referred. Since this can introduce a circular dependency if the nameserver referred to is under the domain for which it is authoritative, it is occasionally necessary for the nameserver providing the delegation to also provide the IP address of the next nameserver. This record is called a glue record.

For example, assume that the sub-domain en.wikipedia.org contains further sub-domains (such as something.en.wikipedia.org) and that the authoritative name server for these lives at ns1.something.en.wikipedia.org. A computer trying to resolve something.en.wikipedia.org will thus first have to resolve ns1.something.en.wikipedia.org. Since ns1 is also under the something.en.wikipedia.org subdomain, resolving ns1.something.en.wikipedia.org requires resolving something.en.wikipedia.org which is exactly the circular dependency mentioned above. The dependency is broken by the glue record in the nameserver of en.wikipedia.org that provides the IP address of ns1.something.en.wikipedia.org directly to the requestor, enabling it to bootstrap the process by figuring out where ns1.something.en.wikipedia.org is located.

1
  • 4
    not upvoting someone just for quoting Wikipedia...
    – Alnitak
    Apr 26, 2010 at 7:23
1

In regard to the when, they are needed when you first introduce a new nameserver to the Internet. Once that nameserver has a glue record it can be found by name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .