The Domain Name System (DNS) is a hierarchical and distributed database meant to translate host names to IP addresses, and IP addresses to host names.
Each time a user sends an email or go to a web site, by entering a domain name, the user’s computer uses DNS to find the correct server destination. Thus, DNS is perhaps the most important component of the Internet.
Introduction
Briefly DNS works so that when a user enters an URL (e.g. http://www.example.com) in their web browser, the operating system sends a DNS query to the computer’s specified DNS server (usually administered by the user’s ISP), often through a local firewall or gateway.
The DNS server first checks if the domain name (e.g. www.example.com) is saved in the memory (called cache), in case some other user (at the same ISP) recently asked for that domain name.
If the answer is cached, the DNS server will return the IP address. If not, the DNS server will forward the query to the domain name’s authoritative DNS servers, receiving the response, saving it to the cache and returning to the user’s operating system.
Hierarchical Database
As a hierarchical database, data is stored in a tree structure. Basically from the root zone down to the top-level domain zone (e.g. .com, .net), further to the second-level domain zone (e.g. registrera-doman.com), third-level domain zone (e.g. se.registrera-doman.com) and fourth-level domain zone (e.g. www.se.registrera-doman.com) and so on.
Subdomain
Regarding subdomains, every domain name is in fact a subdomain of the level above, e.g. www.registrera-doman.com is a subdomain of registrera-doman.com, as registrera-doman.com is a subdomain of .com, as .com is a subdomain of the root zone. The only domain that is in fact not a subdomain is the root domain itself. However in an everyday context, a subdomain is often described as a domain below the second-level domain (SLD) – e.g. www.registrera-doman.com.
Distributed Database
As a distributed database, the responsibility of DNS is delegated to a huge amount of servers, called name servers, on the Internet.
The domain name system’s root zone has currently 13 authoritative name servers responsible to delegate authoritative name servers for each top-level domain (TLD). The TLD has a set of name servers (depending on TLD) responsible to delegate name servers for each second-level domain. The second level name servers are in turn, responsible for the third level name servers.
Domain name: www.registrera-doman.com
TLD: .com
Second level: registrera-doman.com
Third level: www
Resolver
A DNS resolver is a client-side application responsible for querying authoritative DNS servers recursively for translation of domain names or IP addresses.
In general there are two kind of resolvers, the recursive resolver and the stub resolver.
Recursive Resolver
To improve the performance and reduce the traffic over the Internet between users and authoritative name servers, recursive DNS resolvers is almost always used. A recursive resolver handles the request from the user’s computer and then queries recursively from the root name servers until an answer is found. The answers is then provided to the user, hence the load is balanced between several parts on the way – which reduces traffic and improves the performance for the end-user.
The performance is greatly improved by caching at the recursive resolver.
Most commonly the recursive DNS resolver is provided by the Internet Service Provider (ISP), which is queried by the local stub resolver at the user’s computer.
Stub Resolver
Most computers are using a stub resolver locally which only sends the query forward to the recursive resolver. The stub resolver is a main component in most common operating system, and the user is seldom aware of that the application exists – it just works.
Caching
To improve efficiency at DNS resolvers, the resolver is programmed to keep an authoritative answer in a type of memory – called caching. This means that when receiving a question of a DNS record already known, the resolver can answer this directly to the user, without the need to query all responsible name servers recursively, which reduces the response time for the user.
This efficiency does however comes at a cost. An answer received from a recursive resolver can be wrong, if the data has been changed at the authoritative name servers since cached by the resolver. The length of the cache is determined by the DNS record value TTL.
TTL
The DNS record value TTL (time-to-live) determines for how long a DNS record should be cached at a recursive resolver. The value is defined in seconds and is commonly set to 86400 (24h), which is considered a good balance between performance and manageability.
A too low value can effect the performance negatively, since the response time in this case will be longer (for the user). Also if the authoritative name server temporarily doesn’t respond, no response will be returned to the user, but with a higher TTL this may not occur. However, in this case, the problem isn’t really the TTL but the authoritative name server – but nonetheless it can become useful.
A too high value will effect the manageability negatively, since it takes a longer time for a change of record to be published all over the Internet. Thus it’s common practice to lower the TTL value in good time before a planned change.
Domain Name Registration Services
Domain name registration services are services offered by a domain name registrar to domain name holders, and includes services such as domain registration, domain transfer, domain delegation, domain renewal and domain owner change. Domain registrar’s are operating according to the registry of the top-level domain (e.g. .com, .net), and are assigned by the registry.
Domain Registration
Domain registration is a domain service registering a domain name at a top-level domain (e.g. .com, .net). The registration includes providing contact information about the holder of the domain name, and the domain name’s name servers.
The procedure may differ depending on top-level domain and domain registrar.
Domain Transfer
Domain transfer is a domain service transferring a domain name from one registrar to another – thus changing the provider of that domain’s registration services. The process does not affect the operation of the domain name.
The procedure may differ depending on top-level domain and domain registrar.
Domain Delegation
Domain delegation is a domain service changing name servers of a domain name.
The procedure may differ depending on top-level domain and domain registrar.
Domain Renewal
Domain renewal is a domain service extending the registration period of a domain name, mostly with one year.
The procedure may differ depending on top-level domain and domain registrar.
Domain Owner Change
Domain owner change is a domain service changing the current owner of a domain name to another legal entity. Some registries and registrars offer this as a free service, however administrative fees are not unusual.
See Also
Further Reading
- http://en.wikipedia.org/wiki/Domain_Name_System
- http://www.zytrax.com/books/dns/
- http://www.icann.org/en/faq/
- http://en.wikipedia.org/wiki/Domain_registration
- http://www.icann.org/en/general/glossary.htm
- http://www.internic.net/faqs/authoritative-dns.html