Friday, July 10, 2015

What is DNS and what does it do?

DNS (Domain Name System) is a service that translates domain names into IP addresses.  With DNS, you're able to type "www.yahoo.com" into a web browser and have the browser actually load the Yahoo! web page.  If you didn't have a DNS server to rely on, that action would be impossible.

We use domain names (such as "yahoo.com" or "google.com") to label websites because the words make sense to us and we can remember them.  But to a computer, domain names are completely arbitrary and meaningless.  Computers use IP addresses to identify other computers.  So the computer that hosts Google.com has an IP address, and it's this IP address that your computer looks up when you go to Google.com.

DNS is what enables your computer to translate the words "google.com" that you type into your web browser into Google's IP address.  Your computer doesn't know where on the Internet Google.com is, or what it represents, if it can't attach an IP address to it.  All computers (and other devices) on the Internet have an IP address, and these IP addresses are how they identify themselves.

When you log on to a network, or when you connect to the Internet through an Internet service provider, your computer is probably assigned an IP address.  But at the same time that it receives its IP address, it also receives the location of that network's DNS server or servers.  This information is vital to performing many functions, including sending email, loading web pages, and downloading content.

Without a DNS server, your computer wouldn't be able to load any websites that you type into your browser (unless they were looked up earlier and remain in the DNS cache).  You could be connected to your network, and everything is good, but if your computer doesn't know where the network's DNS server can be found (or if that DNS server is down) then you can't do anything based on domain names.  Without a DNS server, you would have to know the IP address of any website you wanted to visit.

As stated earlier, most networks and Internet service providers automatically provide client computers with the location of at least one DNS server.  If your ISP doesn't have a DNS server, or if that server isn't working, there are free DNS servers online that you can point your computer to.  Your computer would use these DNS servers in the same manner, looking up any domain names that you feed it and attempting to resolve them into IP addresses.

A DNS server is a lot like a bilingual human translator.  If you are having a conversation with someone who only speaks Spanish, the translator knows what you say, and what the other person says, and it can communicate this information between the two of you.  If you say, for example, "Can I please have a napkin?" to someone who only speaks Spanish, that sentence is meaningless to them without someone to translate it.  The napkin in question could be sitting two inches from that person's hand, but until someone can translate your request into the other language, you can't get your napkin.  DNS works in much the same way.

(Originally published on Helium.com, March 2012)

No comments:

Post a Comment