TCP/IP Service: Domain Name System (DNS)

J

Jarret W. Buse

Guest
TCP/IP Service: Domain Name System (DNS)

Domain Names are a well known concept on the Internet. Domain Names are a hierarchical naming system for hosts, services and resources.

NOTE: Domain Names are also used on local networks, not just the Internet.

Domain Name Servers store a database of Domain Names and the associated IP Address to allow a connection to be made to the remote host. As seen in the article TCP/IP, an IP Address is required for connecting to hosts on a network. DNS Servers are listed in the TCP/IP Configuration screen as shown in the Configuring Transmission Control Protocol/Internet Protocol (TCP/IP) article.

NOTE: For systems using Domain Host Control Protocol (DHCP), the settings are auto-configured.

DNS Servers are used to translate the Domain Name, or “friendly name”, of a host to an IP Address. You must remember that all information sent on the Internet is routed by IP Addresses only. When a browser is opened a user may type in ‘www.linux.org’ into the address bar. Frames routed around the Internet do not have the name ‘www.linux.org’ encapsulated into the frame. IP Addresses are used instead and in a frame for a request to ‘www.linux.org’, you would see the address of 209.92.24.80.

If an address is unknown the system can perform a few steps to determine the IP Address of the Domain Name:
  1. Check local name – if the local host name is the name being sought, then a connection is made to the local host.
  2. Checks hosts file – the host file (\etc\hosts) is a text file containing IP Addresses and the associated Domain Name.
  3. Checks DNS Server – the primary and secondary DNS server is contacted which are configured in the TCP/IP settings.
Once the IP Address is found communications can be made to the host system. If an IP Address is not found, then an error is returned that the host cannot be found.

DNS Resolution works in a simple manner. A Root Server is contacted first and is queried about the end of the Domain Name being searched. For instance, if you look up ‘www.linux.org’ the Root Server is asked for a ‘.org’ server. An IP Address is given for a server which contains a database for the ‘.org’ servers. Once received, your system contacts the ‘.org’ server and asks for the address of the ‘linux.org’ server. The new IP Address is queried for the ‘www.linux.org’ host. Of course, this may be the server which has the ‘www’ service and your system can query it for a web page. Say you were looking for another service, such as FTP. If the FTP service is not hosted on the linux.org server, your system would receive another IP Address and you would query that host for the service.

There are many DNS Servers on the Internet to provide redundancy for Domain Name Resolution. It is usually best to override DNS Server Addresses in your TCP/IP configuration. Two DNS Server Addresses should be used from different companies. It may be common that if one server is unreachable the others from the same company will be as well. Try some of the following:
  • Google 8.8.8.8
  • Google 8.8.4.4
  • Norton 198.153.192.1
  • Norton 198.153.194.1
  • Verizon 4.2.2.1
  • Verizon 4.2.2.2
  • Verizon 4.2.2.3
  • Verizon 4.2.2.4
  • Verizon 4.2.2.5
  • Verizon 4.2.2.6
NOTE: To find two which should work best try to ping them and determine which two servers give a faster response and set TCP/IP to use those two servers. Set the fastest server as the Primary DNS Server and the second fastest as the Secondary. You may not note much, if any, of a difference. It is smart to always have a list of DNS addresses available in case your regular DNS Servers fail. Without a DNS Server the Internet is useless unless you know the IP Addresses of the servers you wish to access.

As you should be noticing the Root DNS Servers are very critical to the function of the Internet. The root servers are named A through M since there are thirteen main root servers for each root. A list of all of the root zones can be found at http://www.iana.org/domains/root/db.

For example, the A Root Server for the ‘.org’ zone would be ‘a.public-root.org’ which has an IP Address of 46.244.10.5. Another example is L Root Server the ‘.com’ zone at ‘l.public-root.com’ found at the address of 128.65.160.37. Instead of using the name of ‘public-root’ you could also use ‘root-server’. The addresses are different since there are multiple roots available in each zone to provide redundancy.

NOTE: For the location and addresses of the worldwide public-root system which copies the databases to other affiliated servers, go to public-root.com.

Be aware that when a web address is resolved to an IP Address, such as ‘linux.org’, the server is queried for the www service. Once queried the web server is set to send a default page; this is not due to the IP Address. An example would be if you type in the web browser address bar ‘www.somewhere.com’ and it changes to ‘www.somewhere.com/default.html’. The web service is set to send every browser from the main IP Address to the page ‘default.html’.

Be aware that the Internet is a very large place and surfing it is not a simple process. There are many background details taking place to make everything work smoothly. Without the DNS Servers, you could not surf the Internet without knowing the IP Addresses of each web site you would wish to visit. Historically, all the addresses used to be manually placed in the \etc\hosts file to allow for browsing before DNS was implemented in TCP/IP.
 

Attachments

  • slide.jpg
    slide.jpg
    29.3 KB · Views: 136,111


I like a lot your reviews.

One question: why "it is usually best to override DNS Server Addresses in your TCP/IP configuration."? For example, my iPhone takes by default in my wifi network this: 192.168.1.254; that is my default gateway (router). The routher has this DNS server address in its configuration: 213.140.208.226 that has the best rating of pings (36 ms), also maybe the router has a DNS-cache so it could be even faster than query directly to a DNS Server, then why is best override the default DNS Server Address?

An article of IPv6 would be awesome. Do it please!!
 
Last edited:
There are times that the DNS Servers configured by default may sometimes be slow. If you are getting a ping time to your DNS Server of 36ms, that is a fast server. Do not change it unless you can find a server that is faster, but I would doubt it. I have seen some DNS Servers with a ping time of over 100ms. These are too slow and your system Name Resolution time can be improved.

Changing the DNS Server is a possible configuration boost to help improve your system speed when accessing the Web. The same could be true on a WAN if the DNS Servers are not truly local to the LAN you are on. Just be aware the TCP/IP can sometimes have its efficiency improved.

Also, always have a secondary DNS Server configured in case the primary goes off-line. For this reason, I usually try to have my secondary DNS Server from a different provider. My local ISP actually had both their DNS Servers go offline at the same time (very poor redundancy). I could do nothing until I used a different DNS Server. It isn't good to pay for a service that doesn't work.

Try to always have a backup. Those DNS Servers are so very important. Without them, the Internet would not work.

Thanks for the "likes" and I have done an IPv6 article that should be on the site soon. The article covers the addressing of IPv6, but I may do others for IPv6.

Great minds think alike!
 
In fact, you're covering all my Internet Programming lessons. IPv6 and DNS servers are my current topics.
But you explain quite more clear than my teacher does.
So, thank you very much!
 
I am glad you are getting help from my articles. I was an instructor for three years and have written books on certification topics. If there are more topics you would like to see, please drop me a line through the Linux.org messaging system (click my name under my picture on the left and leave me a note). My personal goal has always been to try and teach.
Thanks for reading and I hope you continue learning.
 

Members online


Latest posts

Top