When packet switching networks were first developed, addressing was exclusively numerical. With networks such as The Advanced Research Projects Agency Network (ARPANET), there was little need for developing alternative methods as the number of participating nodes were limited. However, as the network expanded, it soon became evident that while using numerics was a very methodical approach, the addresses themselves proved increasingly hard for humans to memorize. The first solution was to distribute a file called ‘hosts.txt’ to all the nodes of the network, allowing them to map names to the addresses. However, keeping such a centralized system up-to-date would prove difficult. It was clear that a more scalable and automated solution was needed. In 1982, the original system was replaced by the Domain Name System (DNS), which is a hierarchical distribution system that allows IP-addresses and domain names to be assigned to each other in both directions. This enables people to access ‘example.com’, instead of its IP-address ‘18.104.22.168’.
A domain name can be separated into different entities, or labels, consisting of the top-level domain (.com) and at least one sub domain (example.com). In addition, there can be up to 127 levels of sub domains (something.example.com and something.something.example.com). To keep track of this, DNS-servers are assigned different zones containing domains of responsibility. This allows for the system to be balanced and decentralized. At the very top are thirteen root servers, listing the authoritative name servers for the top-level domains that make up the second level.
When you connect to a service running at www.example.com, a query is sent using a resolver. The first recipients of the full query are the root servers that quickly reply by listing the authoritative name servers (in this case c.gtld-servers.net) responsible for ‘.com’. This is done because the root servers have no information on the IP of the full query. A new query is then initiated for each level, where the target is defined by the previous level, following the path downwards until the query matches the initial one. The response contains the IP-address (the A/AAAA-record) for the domain name. To make this less resource exhausting, cache servers are used to store results for a configured period of time, so that you do not have to query the root servers every time you want to perform a nslookup. Below is an example of a non-cached query:
|Visit www.example.com||→||IP of www.example.com?||→||a.root-servers.net|
|Me||←||No info on full IP. Ask m.gtld-servers.net about .com||←||a.root-servers.net|
|Me||→||IP of www.example.com?||→||m.gtld-servers.net|
|Me||←||No info on full IP. Ask b.iana-servers.net about example.com||←||m.gtld-servers.net|
|Me||→||IP of www.example.com?||→||b.iana-servers.net|
|Me||←||www.example.com has IP 22.214.171.124||←||b.iana-servers.net|
By entering a domain name in the field above, you will get detailed information on the nameservers associated with a domain name.