DNS - Domain Name System


Simply put, a DNS server (nameserver) translates a domain name (dslwebserver.com) into an IP number (xxx.xxx.xxx.xxx). Where do you find DNS servers? Well most DNS servers are run by large web hosts and ISP's. Some people run their own DNS servers at home, but it's probably more trouble than it is worth. You can pay an ISP or web host to use their DNS servers, but since we're trying to do everything as cheaply as possible, we'll use free DNS servers. Also, since we will probably modify our DNS information quite a bit as we experiment with the different options, the free services are nice because they allow us to change the DNS file whenever we want. With the commercial DNS servers, you have to email the people who run the server with your changes and wait for them to implement them. This could become very tedious if you make changes every day or like to experiment with different setups. There are very few free DNS services because the servers are complicated to run and there isn't much money to be made.

More Confusion about DNS?

You may be wondering about the DNS servers your DSL/Cable provider gave you along with your IP number.  Are these DNS servers the same thing as DNS servers you need to host your own domain name?  No they are not.

The DNS servers your DSL/Cable provider gave you:

  • When you type in Yahoo.com into your web browser, your web browser will ask your DSL/Cable provider's DNS servers to translate the domain name (Yahoo.com) into an IP number.  Your DSL/Cable provider's DNS server asks Yahoo's DNS server for this information.  Yahoo's DNS server gives your DSL/Cable provider's DNS server an answer (an IP number).
The DNS server you need for a domain name:
  • This server responds to inquires that are directed to the domain name that is assigned to it.  In our example, the DNS server for Yahoo.com answers all request from the Internet for the domain name Yahoo.com and replies with an IP number.
In reality, the two different name servers that I depict above can be the same machine, doing both, submitting requests and giving answers to requests.  The DNS servers our DSL/Cable provider gives us only function to submit requests, while the DNS servers we need to host a website allow us to give answers to requests.

Now that you have two sets of DNS information to play with, where do you enter this information?

The DNS servers your DSL/Cable provider gave you:

  • If you are using a router, then you enter all the information your DSL/Cable provider gave you (IP number, primary and secondary nameservers) into the router.
  • If you assign your computers on your network static IP numbers, then you must enter the DSL/Cable provider's nameserver information into the TCP/IP settings of each computer.
  • If the computers on your network get their TCP/IP information from a DHCP server, then each computer will automatically receive the proper DSL/Cable provider's nameserver info.
The DNS server you need for a domain name:
  • This information goes into only ONE place.  The domain name settings.  Do NOT put this info into your LAN network or router settings.  Go to the company that you registered your domain name at and they will have a spot for you to enter your primary and secondary DNS information (DO NOT enter the primary and secondary DNS info from your DSL/Cable provider!).
Programming your DNS Servers.

Now that we know what DNS servers are, how do we program them with the proper information?  There are actually two ways to do this.  All DNS servers get their information though zone files, which is basically a list of directions for where to send the web user.  Depending on who you are using to run your DNS, you may or may not actually need to write a zone file.  Some DNS services like ZoneEdit.com now use a web interface where you fill in the blanks and then a zone file is automatically uploaded to their servers.  However, other places like GraniteCanyon.com still require a traditional zone file.  Whether you use a "fill in the blank" method or a whole zone file, the end result is the same, the only difference is the input method.  However, for simplicity sake, I will be referring to both methods as "Zone Files" since like I just said, the file result is the same.

What is a zone file?

For each domain you create, you need to have a zone file which is basically a list of directions for where to send the web user.

The three main types of requests from the user are:

  • HTTP - Web page requests.
  • FTP - FTP servers can be directed to the same or a different server than the web requests.
  • MAIL - The email can be sent to the same or a different server than the web requests.
Which IP number do I put into the zone file?

In your zone file, the IP number that you must enter is that of your DSL/Cable line (WAN) not the internal IP number of the server (LAN).  If your IP looks like 192.168.xxx.xxx, then you made a mistake and entered your internal LAN IP number.  You cannot reach internal LAN IP numbers from the Internet.  Be careful, this is one of the biggest mistakes with writing zone file.  Look here at this diagram if your are still confused.

What is my external WAN IP number?

If you have a static IP address, this is the number your ISP gave you.  However, if you have a dynamic IP address, it might be harder for you to figure out your WAN IP number.  Use this cool website appropriately called WhatIsMyIP.com to find out your WAN IP is whether you have static or dynamic WAN IP address.

Where can I get Free DNS?

Well, you are in luck, we have found two good services that you can use for free!

  1. ZoneEdit.com - Extremely reliable, web-based, highly recommended!
  2. GraniteCanyon.com - Less reliable than ZoneEdit.com, text based, good second choice.
You can find Step-by-Step instructions on how to setup each service here for ZoneEdit.com and here for GraniteCanyon.com.   Also, if you plan on using GraniteCanyon.com, here is a super easy guide to writing a zone file.  If you can use the cut and paste buttons, then you're ready to Write a zone file

Dynamic IP Address - DNS

What if you're on DSL or Cable and have a dynamic IP address?  Can you still run a server?  The answer is a qualified "yes".  Running a server on a dynamic IP address takes more work and isn't as reliable as having a server on a static IP address.  Your dynamic IP address is assigned to you by your ISP and depending on their configurations, the IP number may change often, or it may not change for weeks at a time.

One trick to keeping your IP from not changing is to keep the computer or router that receives the IP address on all the time.  This way, the computer never "let's go" of the IP address.  The other way to keep your IP from changing is to keep the line active.  We'll talk about this a little later.

DNS with a dynamic IP address is difficult because most DNS services take 3-4 days for their nameservers to updates to take effect.  This means that every time your IP changes, you have to manually edit your zone file and wait for their nameservers to update.  This is the case with GraniteCanyon.com.  Changes made at GraniteCanyon.com take a few days to spread across the Internet.

Other DNS services such as ZoneEdit.com are more useful in the case of a dynamic IP address because changes to your zone file are updated on their nameservers almost immediately.  However, like GraniteCanyon.com, you must update your new IP number manually.

Alternatives?

There is something that can help us called "Dynamic DNS Services".  A Dynamic DNS Service will allow you to use a subdomain of their own domain name.  For example, if your desired website domain name is "coolguy" then:

  • Domain - "http://www.coolguy.com"
  • Sub Domain - "http://coolguy.dynamicDNSservice.com"
Note: "dynamicDNSservice.com" is not a real site (I think) just a generic term for those types of services. Replace "dynamicDNSservice.com" with the domain name of the service you choose.

Basically, in a subdomain, you're piggy-backing on somebody else's domain name.  There are several services out there that will let you hitch a subdomain onto their domain for free.

There are a bunch of these services and they are listed at the bottom of this page.  They are located all over the world so I advise you to pick one that has the features you need and also is geographically close to your webserver.

Wait a minute!  I thought we were talking about DNS here not domain names!  What's the point?  Oh yeah, I forgot to mention that these Dynamic DNS Services allow you to direct that subdomain to a specific IP address, namely your dynamic IP address.  Each time your IP changes, you go to the dynamic DNS service's website and update their database and within a few minutes, your subdomain gets directed to your new IP number.

This is the cool part: most of these sites (all but 1) have automatic update programs/clients that notify the dynamic DNS service of your most current IP address of your DSL/Cable line.  This way you don't have to do it yourself or wonder if you typed in the correct IP number.  Very nice.

You can then access your site by typing in your subdomain.  It might look like "http://coolguy.cjb.net".  The IP number will automatically update and you just have to remember the URL to your site.  If you find a service that has a domain name that you can live with, then you can stop here and forget about getting a domain name.  It's free and almost as good as a domain name.  Almost.  If you want a full domain name, read on.

Attach your domain name to a Dynamic DNS Service

If you have a domain name and aren't satisfied with a subdomain off somebody else's domain name, there are two hopes for you. 

1.  Some Dynamic DNS services like ZoneEdit's Dynamic DNS allows you to attaches a full domain name to a dynamic IP address.  In the previous paragraphs, those Dynamic DNS services allowed you to use their subdomains, but here we're talking about full top level domains.  This is very cool. 

2.  Alternatively, you can use a domain name redirecting service like ZoneEdit's "Web Forward" service to forward all visitors from "http://www.yoursite.com" to "http://yoursite.dynamicDNSservice.com".  "Web Forward" like many other domain name redirecting services redirects visitors to any valid Internet URL, and that's what your visitors will see when they visit your domain name. If you check the cloaked option, then your visitors won't even see the long URL -- they'll only see your short domain name. 

Either way, you have a full top level domain on a dynamic IP number.  Not bad at all.  Here is a Step-by-Step guide on how to use the DirectUpdate.net Dynamic IP address client with ZoneEdit's Dynamic DNS service: Installing and Configuring DirectUpdate Dynamic IP Client

Alternative 2 - The Ping of Death

The other way to keep your dynamic IP address from changing is to keep the line active.  Many ISP's may disconnect your IP address after a period of inactivity even if you have a router holding onto the IP address.  How do you keep your line active?  Try FREEping. This program was actually designed to monitor your network by pinging specify computers.  However, it works great at keeping your DSL/Cable connection alive and prevents your IP number from changing by maintaining traffic on your network.  Pings a specific IP address or domain name at an interval you specify.  Works only with Windows.

Here's a little trick that I picked up for Windows NT and 2000.  Most of the time when you are not using your server I assume that you log out of your computer so that it is inaccessible from grubby little hands.  However, if you have a program that is not designed to run as a service, the program will shut down when you log out which is a big problem.  The trick that I found was to hit "Control, Alt, Del", then select "Lock Computer" which will basically log you out.  The difference between 1. logging out of your computer and 2. locking your computer is that authorized users can still log into 1. while for 2. only there person who locked the computer or an authorized administrator can unlock it.  Since I now use FREEping, which isn't designed to run as a service, I can't log out of my server but I can still lock it for an additional measure of safety.

Update: You can run FREEping as a service using FireDaemon which is the best way to go.



Domain Name

Additional Information
Step-by-Step: Utilities:
  • FREEping - Free utility to monitor your network.  Pings an IP number or domain name at an interval you specify to keep your connection and IP number alive.  For Windows.
  • WhatIsMyIP.com - Use this handy website to find out what your external WAN IP address is.
  • FireDaemon - Turns programs into services.
Free DNS Nameserver Services: Dynamic DNS Update Utilities:
  • DirectUpdate.net - Shareware dynamic DNS update utility that works with many Dynamic DNS services.
Free Dynamic DNS Services:
 
Website
Automatic Dynamic IP Updater Available?
http://www.zoneedit.com
Yes
http://www.microtech.co.gg/dns
Yes
http://www.dyn.ca
Yes
http://www.dyndns.org/services/dyndns
Yes
http://hn.org
Yes
http://www.no-ip.com
Yes
http://www.dynu.com
Yes