How to write zone files?

Brian subdude at post.com
Thu Apr 20 20:25:18 UTC 2000


Hi T:

WWL wrote in message ...
>I am interested in learning more about writing zone files. It seems that
>this must be mastered before using the free DNS service at
>granitecanyon.com.

>Any ideas?


Sorry about the blank posting.

Here is an example of how I have created resource records at
"granitecanyon.com".

Let us say your domain name is "bugs.com", your personal name is "Grass
Hopper", your telephone number is "604 555-1234", you have an email address
"grass at post.com" and an IP address "24.113.52.103". We shall assume you have
registered your domain with a registrar like Network Solutions
"networksolutions.com" or a less expensive company like "alldns.com". You
will need the IP address's of the granitecanyon.com nameservers when you
register your domain;

ns1.granitecanyon.com    205.166.226.38
ns2.granitecanyon.com    216.17.165.20

Here is the important data:

     Domain name:   bugs.com
         My name:   Grass Hopper
Telephone number:   604 555-1234
      IP address:   24.113.52.103

Now to create the required resource records for "granitecanyon.com".

----------<clip here>----------
bugs.com.       IN NS ns1.granitecanyon.com.
bugs.com.       IN NS ns2.granitecanyon.com.

bugs.com.       IN RP grass.post.com. grass.bugs.com.
grass.bugs.com. IN TXT "Grass Hopper, (604) 555-1234"

localhost       IN A 127.0.0.1
bugs.com.       IN A 24.113.52.103
www             IN CNAME bugs.com.
ftp             IN CNAME bugs.com.
mail            IN CNAME bugs.com.
bugs.com.       IN MX 10 bugs.com.
----------<clip here>----------

Don't miss any periods, typos and extra characters.

The first two lines tell everybody you are using ns1 (nameserver one) and
ns2 at granitecanyon.com as your primary and secondary nameservers.

The third line is blank; not required but I like a little white space.

Line four tells everybody that you, Grass Hopper, are the RP "responsible
person" for this domain and that your email address is grass at post.com (note
the use of a period, NOT an @ symbol in the RP line). Please use an email
address other than one at your new domain. The reason should be obvious, if
you have difficulties with your domain not resolving and want to make
changes, you are required to acknowledge an email sent to the above email
address - if your domain isn't functioning you won't be able to receive and
acknowledge the changes. It is amazing how many people are stumpted by this.
Get a free account at mail.com and use it for your RP email address.

Line five gives your full name and telephone number. If you like, substitute
your NIC handle for your telephone number like this "Grass Hopper", NIC
GH4231".

Line six, more white space.

Line seven is the same on all sites, it assigns the default internal domain
name "localhost" the default internel IP address "127.0.0.1" - do not
change.

Line eight is where you tell the world your domain name "bugs.com" resolves
to "24.113.52.103", your IP address.

Lines nine, ten and eleven all assign CNAMEs (canonical names) to the domain
names on the right. If you want people to be able to type "www.bugs.com" and
be directed to "bugs.com", then you have to make a CNAME reference. "ftp"
and "mail" are the other obvious CNAMEs.

Line twelve is your MX (mail exchange) record which tells mail programs that
your primary mailserver resides on "bugs.com" and to send mail there. The
number "10" is a preference number; if there is more than one MX entry the
second mailserver should be assigned a higher number, i.e. your second
preference;

bugs.com.    IN MX 20 other-mail-server.com.

Create your RRs (resource records) in a text editor like "vi" or "notepad"
at home - please make sure there are no typos, missed periods or extraneous
characters.

When you think it looks right, start a free account at "granitecanyon.com"
by selecting the "Create primary DNS" and cut and paste your RRs into the
editor window - do not forget your chosen password or you will be f-cked,
and make sure you enter an email address NOT on your new domain or you will
be f-cked.

When satisfied, hit the "send" buttom and watch for error messages. If your
RRs are accepted, you will receive an email request for acknowledgement
usually within 15 minutes*. Check it over again and don't be dismayed if
your
quote symbols " have turned into asterix * - just hit "Reply" and send it
back. Don't worry about the ">" symbols, this is JUST confirmation. Do not
edit the records on the confirmation email if they are incorrect, go back to
granitecanyon.com and edit them using "Edit primary DNS".

It usually takes granitecanyon.com ~24 hours to load new or updated records,
don't fret. Check the granitecanyon "kiss-of-death" list to see if your
domain has been rejected by BIND - "Status Update - zones rejected by BIND
in the last reload due to DNS syntax errors, only".

To see if granitecanyon is serving your domain, try this in unix/Linux;

nslookup bugs.com ns1.granitecanyon.com <enter>

If that returns your IP address you are in business, as far as
granitecanyon.com goes.

Now try;

nslookup bugs.com <enter>

If that returns your IP address you are in business.

Also try; www.bugs.com, ftp.bugs.com and mail.bugs.com to make sure all is
well with your CNAMES.

Hope this helps out.

Best regards,

Brian

(* granitecanyon.com has been taking as long as 48 hours to
email acknowledgement messages - what can I say, be patient)





More information about the bind-users mailing list