What is DNS?
The Domain
Name System (DNS) is the phonebook of the Internet. Humans access information
online through domain names, like rjsnetworkcloudacademy.com or linkedin.com.
Web browsers interact through Internet Protocol (IP) addresses. DNS translates
domain names to IP addresses so browsers can load Internet resources.
Every single device on the Internet has a unique IP address
by which it can be uniquely identified by the other online devices. A DNS
server eliminates the need for us to memorize these IP addresses every time we
want to visit a site or connect to a device. It is much easier for us to type
in a URL than IPv4 IP addresses (E.g. 192.168.1.1) or, worse, the more complex
IPv6 addresses (E.g. 2400:cb00:2048:1::c629:d7a2).
- DNS is a directory service that provides a mapping between the name of a host on the network and its numerical address.
- The core function of DNS is to map symbolic names to IP Addresses.
Three main
functions of DNS:
- Name Space: Namespace is about how domain names are structured and used in terms of what makes a name valid, what kind of format it should have, what characters and symbols are allowed in it, as well as how names are interpreted.
- Name
Resolution: This
function is known as name resolution, since in most cases names are resolved to
IP.
- Name Registration: Name registration, as the name suggests how a domain is registered, how its uniqueness is guaranteed, and what are the registration authorities responsible for the name assignment process.
The DNS architecture consists of a hierarchical and
decentralized name resolution system for computers, services or any other
resources connected to the Internet or a private network. It stores the various
associated information of the domain names assigned to each of the resources.
Queries for a resource pass through the DNS – with the URLs
as parameters. The DNS then takes the URLs, translates them into the target IP
addresses, and sends the queries towards the correct resource.
How does DNS work?
The first thing we need to know is that there isn’t a single
DNS, but a selection of them, that can help resolve a single IP address.
A computer has its own cache of DNS data – a local
IP-address-to-URL matching – that it uses for quick references. But it can’t
store all the information for every website or device out there; hence, the
need for root, recursive, Top Level, Second Level, and authoritative DNS
servers.
When a user asks to go to a website, the browser first
checks the local DNS cache for the correct resolution (from URL to IP address)
and, if not found, goes:
- Out to the recursive DNS server – which is normally operated by the local ISP provider – to check which root DNS server it needs to go to find an answer. Once the address is found, it is escalated to…
- One of the root DNS servers out there – which are run by about 13 independent organizations – to find the address of the correct Top-Level DNS (TLD) server to query for the address depending on whether it is a “.com”, “.org” or “.net” site, for example. Root DNS sit at the top of the DNS hierarchy. It should be noted here that every website address or URL has an implied “.” at the end, even if we don’t type it in. This “.” designates (or points to) the DNS root nameservers at the top of the DNS hierarchy where it can find information about the correct TLD server to head on to.
- At the TLD server – of which there are about 1000 spread across the globe – the query is pointed towards the correct authoritative DNS where the required information (IP address) is actually stored.
- And, at the authoritative DNS server – which holds a broad range of IP address information – the corresponding IP is sent back to the recursive DNS, which forwards it to the client machine and the user (you) can go on to the website.
Every time a query is made, the IP address to URL mapping is
cached in every DNS for the next user instead of having to go back and search
for the information every single time. This helps in keeping the servers
synchronized and updated and results in faster response times.
No comments:
Post a Comment