I used to have to explain the difference between Domain Name Servers and Name Servers to a friend of mine all the time. He builds web sites. I know he’s not alone in his confusion; DNS confuses a lot of people. Below is how it all works in a nutshell, I hope that this helps you understand how the Internet works.
IP Addresses:
The internet works by assigning a unique address to each device attached to it. This address is called an Internet Protocol Address or IP Address for short. It’s a 32 bit number that’s commonly written as 4 segments or octets (called an octet because each 4th is 8 bits) such as 10.10.1.1 or 216.54.217.22. Each octet can range between 0 and 255. This address works just like your street address: a packet (a chunk of communication between two devices) leaving your computer and heading for this website moves through the Internet via devices call routers. Just as the name implies, routers route traffic. The router looks at the destination IP Address and knows which way to send the packet. Just like a package you’ve physically mailed moves through various post offices and delivery vehicles (the mail man, big mail trucks, airplanes, etc.) your packets of internet traffic move across all types of communication channels (phone lines, cable lines, fiber, etc.) and Internet providers (Spectrum, Level3, Time-Warner, etc.). It finally arrives at its destination, and in just the same way, it finds its way back based on your IP Address.
The Internet would be much less popular if you had to remember IP Addresses when you wanted to visit a web page. To make it easier, a naming scheme is used.
Name Servers:
A Name Server holds the information that relates the IP Addresses for a web site to the names used to access that web site. When I registered the domain name for my web site, I told the registrar the Name Server I was using, I have my own servers, however, most people will use the Name Servers provided by their hosting facility (where they rent the server space for their web site). My Name Server is configured to have a “zone” for my domain and that zone contains records that relate a domain name to an address. There are different types of addresses or “records” too. For example an “A Record”, or Address Record is used for the main website or for ftp, etc., just converting a domain name to an IP address. On the other hand, A Mail Record, or “MX Record”, is used for the mail server, for example, I have an “A Record” for this site that points to an IP address, and the “MX Record” could point to a different server if I had a different server for email.
Domain Name Servers:
Each Internet Provider has DNS servers (Domain Name Server), as you browse the internet, your computer is constantly sending requests to these DNS servers to get IP Addresses for the domain names you type in or the links you click on. A Domain Name Server stores the domain names and associated IP Addresses for an amount of time. If the time specified for caching a domain name and IP Address relationship has passed the DNS server will delete it from its cache. When a request for an IP Address is made, if the DNS server does not have the address in its cache, the DNS Server will make a request to a set of special servers on the internet called Root Servers, that contain the addresses for all the Name Servers and which domain names each one controls. It then sends a request to the name server for that domain to get the IP Address for the domain name and returns it to the computer or device making the original request.
So What’s the Difference Between Name Servers and DNS Servers?
A web site’s IP Addresses are stored on DNS Servers (Domain Name Server). The exact DNS Server that controls a domain is stored on a Name Server. Root Servers on the Internet are used to find the correct Name Server for a domain.
How the Internet Works!
As you browse the Internet, DNS servers provided by your Internet Service Provider (who you get your internet service from), either provide the correct IP address back to your computer from cache, or, look up the Name Server for your domain and then makes query to the correct Name Server to get the IP Address for the domain you’re trying to reach. That IP address is returned to your browser (Chrome for example) and then your browser sends requests to that IP address to get the information from your website. That traffic is routed between your PC/phone/tablet/etc and the website as detailed above.
Until next time,
Fred