Computers communicate with each other by using an IP address (IPv4 or IPv6), but how come we are using hostnames like www.google.com to access the web server of Google where their website is hosted? By using DNS, we can be able to access websites with easy-to-remember names.
Imagine always remembering IP addresses to access specific websites. That is not a convenient way by typing only a hostname on the web browser like www.google.com instead of typing 188.8.131.52 (Google web server’s public IP address), which will simplify the process of accessing the website.
What is a Domain Name System (DNS)?
DNS is a decentralized and hierarchical naming convention system for computers or other resources that are connected to the Internet or to the Local Area Network (LAN). It uses a hostname to identify other computers. DNS solves the issue of remembering all the IP addresses by converting (resolving) them into a hostname that the website administrator can customize. The primary purpose of DNS is to resolve the hostnames to the IP addresses. The Uniform Resource Locator (URL) or a domain name of the website is a lot easier to remember compared to the IP address of the website.
Before the DNS is being implemented, the computer can use a domain name by using a host file. The host file contains the hostname and maps it to a specific IP address. Whenever the computer wants to visit a website on the internet, it will check first on the host file and map it to the IP address of the website. What if the hostname of the website or its IP address is not registered on the host file? The computer will not be able to connect to the website.
Frequently updating the host file is not a convenient and efficient way as the internet is continuously growing. To solve the issue, a DNS Server (Name Server) was created. The DNS servers are being the root servers for its domain and contain all the DNS records for the specific domain like TLD. Top-Level Domain (TLD) is a domain that contains a root (.) and ends name like .net, .com, or .org. On the other hand, the Fully Qualified Domain Name (FQDN) contains a hostname, domain name, and TLD. When accessing www.google.com, “www” is the hostname, “google” is the domain name, and “.com” is the TLD.
Domain Name System Operation
When a computer is trying to access a website using hostname – www.google.com, it will send a DNS query or DNS lookup to the DNS server that will request an IP address of the website. Next, the DNS server will respond with an IP address (184.108.40.206) for www.google.com. When the computer has the IP address of the website (www.google.com), it will request and establish a connection to the web server where the website is hosted using the IP address. The below image shows the process of DNS.
What if the DNS does not have the record for the specific hostname? The DNS server will request and exchange information with other DNS servers located somewhere on the Internet and will respond to the customer with the IP address of the hostname. The DNS requests are sent using the UDP port 53. However, it can failover and use TCP.
Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.
We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: