Domain names and the DNS
The DNS helps to manage computer naming by providing a way to avoid name clashes. If you call your computer “newton”, you don’t want to receive traffic destined for a computer with the same name on the other side of the world. Domain names accomplish this.
A domain name is a set of labels (comprising letters, numbers, and hyphens) separated by full-stops. Nominet’s domain name, nominet.org.uk, is one such example. Each domain is run by an individual or organisation, and within that domain, the manager has total control over naming. So Nominet can name a computer in their domain ‘newton’ without reference to anyone else. To the rest of the world, the full name of the computer will be ‘newton.nominet.org.uk’. If the manager of ‘example.com’ decided to name one of their computers ‘newton’, there would be no clash: ‘newton.example.com’ is completely different to ‘newton.nominet.org.uk’.
Top-level and second-level domain names
The domain manager has full control over naming within the domain, but they may choose to delegate management of sub-domains. The labels in a domain name form a hierarchy, with the most specific label on the left and the most general on the right. Taking the example of ‘nominet.org.uk’, the right-most – and hence most general – label is ‘uk’. (This is an example of a “top-level domain”.) Nominet manages the ‘uk’ top-level domain. It is now possible to have a domain within the top level, for example nominet.uk. Within .uk a number of sub-domains (known as “second-level domains”) are in operation. Some of these are also managed by Nominet, e.g. ‘co.uk’ (for commercial UK organisations) and ‘org.uk’ (for non-commercial UK organisations). Others, such as ‘ac.uk’ (UK academic institutions) and ‘gov.uk’ (UK government systems) are managed by separate organisations. Since their management has been delegated, Nominet has no right to allocate names in those domains, even though it manages the encompassing top-level ‘uk’ domain.
Looking up a domain name
So how is the DNS used to look up the address of a computer? The answer is that each domain is served by one or more nameservers. Running special software, these are computers that translate computer names to addresses. Your computer passes a domain name to the nameservers and they respond with the address. The operation is perhaps best explained by an example:
Process of looking up a domain name
In the following explanation, the numbers in brackets refer to the numbers in the diagram above.
Suppose you want to visit the Nominet web site and so type the name ‘www.nominet.org.uk’ into your browser. Assuming that you are using your home computer, your computer will send a query to a piece of software called a ‘resolver’ (also known as a ‘recursive nameserver’) on one of your ISP’s computers (1).
The resolver forwards the query to one of the ‘root’ nameservers (2). There are about 200 of these located around the world, and their addresses are supplied with the resolver software. Root nameservers are key to the DNS, which is why there are so many of them (although the DNS is so resilient that it would continue to function even if a majority of them were taken out of service.)
In this particular case, the root nameserver doesn’t know the address of ‘www.nominet.org.uk’, but it recognises that the name is in the top-level ‘uk’ domain and sends a ‘referral’ back to the resolver (3). This is a message which lists the ‘uk’ nameservers and in effect says: “I don’t know the address for this domain name, I suggest that you try one of these computers”.
When it receives this reply, the resolver chooses one of the ‘uk’ nameservers and sends the query to it (4). The ‘uk’ nameserver gives the same response: “I don’t know the address for this domain name, I suggest that you try one of these computers”, but this time with a list of the ‘org.uk’ nameservers (5).
The query is then sent to one of the ‘org.uk’ nameservers (6), which again denies knowledge of the ‘www.nominet.org.uk’ domain name, but refers the resolver to the nameservers for ‘nominet.org.uk’ (7).
When a ‘nominet.org.uk’ nameserver is queried (8), it is able answer the question and sends back the address of ‘www.nominet.org.uk’ (9). The resolver passes this response back to your computer (10), which can then make use of the information to access the Nominet web site.
This process requires a lot of communication between several computers, and can take a (relatively) long time. To speed it up, the resolver remembers the results of recent queries; if you make a request for ‘www.nominet.org.uk’ and the resolver has recently answered the same question from someone else, the resolver will pass back the address without consulting other nameservers. Even if it doesn’t have that information available, it may be that the addresses of one or more of the root, ‘uk’, ‘org.uk’ or ‘nominet.org.uk’ nameservers are in memory; if so, the query process can be short-circuited by starting the search at one of them.
Minerva House, Edmund Halley Road, Oxford Science Park, OX4 4DQ, United Kingdom