Posts

Showing posts with the label How DNS Works

How DNS Works v2

Image
This is one of my tutorials originally published at xmodulo.com Domain Name System (DNS) is one of the most critical services in the Internet. Without DNS, we would not be able to access the web. Before going into the details on how DNS works, a little on the background may be helpful. When you are accessing, say, Google, your traffic originates from your computer, goes through the backbone of your ISP, and then their own upstream provider and so on; until it reaches Google's network. In the TCP/IP-based current Internet, the transit communication from your computer all the way to Google's network is driven by a set of intermediate routers based on the IP address of the destination web server of Google. This means we need to know the IP address of Google's web server to access Google service. However, it is almost impossible for us to keep more than hundreds of IP addresses in our memory. What if there could be a mechanism to map IP addresses to domain n...

How DNS Works

Image
Domain Name System A newer version of this article is available in my blog. In any network, the hosts primarily communicate between each other through IP addresses. For example, if my computer is doing a google search, my computer is actually communicating with the IP address of one of the web servers of google.com. However, even if the computer is efficient with numbers, humans on the other hand work better with names. For this reason, the TCP/IP protocol includes the Domain Name System (DNS)  to link between IPs and computer names i.e. hostnames. The DNS is a distributed database of computers that is responsible for resolving hostnames against IP addresses and vice-versa. Any DNS query involves two parts. The Resolver: The resolver forms up or initiates the query. The resolver itself does not run as a program. /etc/resolv.conf is an example of a resolver. Name Server: The Name Server is the service running in the server that responds to the DNS qu...