Category: DNS Overview

Share this post...Tweet about this on TwitterShare on Google+0Share on Facebook0

Introduction:

Anyone running websites on a dedicated server deals with DNS in order to make their websites point to that server.

There are two basic ways this is done:

  1. DNS hosted by someone else, such as your domain registrar or data center, who creates all of the necessary DNS zone info on their servers. There are also third party companies which do this for a fee.
  2. DNS hosted locally on your own box.

This second option is preferable to most people as the server administrator will have complete control over the zone info and does not need to wait for an outside provider to submit the info to their servers; the administrator can do it himself and it will be done automatically when a website, pointer domain, or subdomain is created.

However, it does require a bit of setup and understanding of what DNS is and how the DNS system works on the internet. This document aims to make this process as painless as possible.

Basic Explanation of DNS and How It Works:

DNS stands for Domain Name System. Simply put, DNS is a worldwide database identifying domains and the Internet Protocol (IP) address of the server on which they are hosted.

Every computer connected to the internet (even your own home computer) has an IP address. For example, the IP address of the machine hosting interworx.com is 69.56.137.23. There are two types of IP addresses: static and dynamic.

  • A web server requires a static IP (an IP that does not change).
  • In most cases the IP of your local machine will be dynamic (meaning that it will change every time you connect to the Internet).

To make this whole thing clearer, let’s go through the process your browser goes through when you visit our site.

When you type¬†interworx.com the first thing your browser does is contacts your internet service provider’s local nameservers (called resolvers) and asks for the name of the nameserver that holds authoritative info about the location of that website. In this case it will tell your browser ns1.nexcess.net and ns3.nexcess.net on IP addresses 64.62.157.2 and 66.118.161.151.

In most cases you will use ns1 and ns2 for your own nameservers. We use ns1 and ns3 because they are in two different data centers, which makes it more redundant; in the event that there is a problem with one, the other should still be accessable.

Your browser then tries to contact ns1.nexcess.net at the IP address provided and asks for the IP address of the machine hosting interworx.com. If it is unable to contact ns1.nexcess.net then it attempts to contact ns3.nexcess.net. If both contacts are unsuccessful the attempt times out and you get an error message.

In this case ns1.nexcess.net tells your browser that interworx.com is hosted on 69.56.137.23.

Your browser then contacts 69.56.137.23 on port 80 (the standard port for non secure websites) or 443 (the secure website port).

It knows which to contact based on whether you put the protocol http:// (non secure) or https:// (secure, note the s) in front of interworx.com. It will assume non secure if you don’t type a protocol.

From here the Apache web server will be listening on port 80 for these requests (assuming it is up, that is) and then serve the files located in /home/interwo1/interworx.com/html/ to your browser.

Email and FTP use different ports and different software, but the basics of the DNS lookup are the same.

This is a very simplistic explanation of a very complicated thing, so many details have been left out, but you can find out more info about DNS from numerous books and Internet sources.

Citation Source: DNS
Nov 15, 2012, 8:21 pmBy: InterWorx
DNS Overview
0 votes, 0.00 avg. rating (0% score)
(0) Comments

Leave a Reply
Surround code blocks with <pre>code</pre>

Your email address will not be published.

Comments

Top Rated

Broken Link