Setting up DNS

Setting up DNS

This page explains the basics on how to get your nameserver up and going. It will not get too deep into the "whys" since there are a number of other sources for that information. I have also used the FONT COLOR=whatever tag quite often, so these pages will look better with a more recent version of Netscape or whatever else can display that tag.

Assumptions...

This page assumes you are using a Unixish operating system, but will probably be useful for NT & Mac admins as well. It also assumes that you have the BIND (named) binary installed on your machine.

We'll use the following domain and IP addresses as an example:

Domain name: mydomain.com
Class C:     192.168.222.0
Router:      192.168.222.1 is  marbella.mydomain.com and   gw.mydomain.com
Web Server:  192.168.222.2 is   sevilla.mydomain.com and  www.mydomain.com
Mail Server: 192.168.222.3 is    madrid.mydomain.com and mail.mydomain.com
FTP Server:  192.168.222.4 is tarragona.mydomain.com and  ftp.mydomain.com
The web server will also be the primary name server and the mail server will do secondary. Just substitute your domain name for mydomain.com and your class C for 192.168.222.*.

Color scheme:
1.: these are line numbers that need to be deleted in the actual files.
mydomain.com: things in blue are items that need to be changed to suit your particular setup.

Files needed on primary nameserver

Change db.mydomain.com to db.[whatever your domain is] and db.192.168.222 to db.[whatever your class C is].

/etc/resolv.conf
/var/named/db.cache
/var/named/db.127.0.0
/etc/named.boot
/var/named/db.mydomain.com
/var/named/db.192.168.222

Files needed on secondary nameserver

/etc/resolv.conf
/var/named/db.cache
/var/named/db.127.0.0
/etc/named.boot (secondary)

Note that the locations and names of these files can vary quite a bit, but this naming scheme will work fine.

Text files of examples used here
Common Mistakes
Other sources of info

I'm sorry this page is so ugly...

I also have the whole page tarred and gzipped for handy dandy off-line viewing.

Copyleft 1997 Jeff Moe
This is a new page, so please send comments/suggestions to: jeffdns@verinet.com

Check out More Geek Stuff!