DNS Zone File Config

My DNS is working.. yet I do not think it is working entirely correctly. I say this after re-reading the zone file (named) documentation. Firstly, this is what my zone file for the domain currently looks like:


$TTL 3600

mydomain.com.au.         IN      SOA     mydomain.com.au. webmaster.mydomain.com.au. (
                        20022050519     ; serial
                        86400           ;
                        7200            ;
                        8640000         ;
                        86400 )         ;

; DNS Servers
@           IN      NS      ns1.mydomain.com.au.
@           IN      NS      friendsdomain.org.au.

; Machine Names
ns1                     IN      A       202.0.0.0
www                     IN      A       202.0.0.0
mail                    IN      A       202.0.0.0
ftp                     IN      A       202.0.0.0
misfit                  IN      A       202.0.0.0

; MX Record
@           IN      MX 1    mail.mydomain.com.au.


The IP addresses in my zone file are the same for all A recordtype entries.. just the actual address has been changed here. Now my question regards CNAME entries (aliases). Since all the machine names are for the same box (IP address), shouldn't the sub domains all be entered using the CNAME recordtype rather than the A recordtype?? So after the DNS server entries it should all be replaced with the following:

; Machine Names
@               IN     A     202.0.0.0

; Aliases
ns1                     IN      CNAME     @
www                     IN      CNAME     @
mail                    IN      CNAME     @
ftp                     IN      CNAME     @
misfit                  IN      CNAME     @
   
; MX Record
@           IN      MX 1    mail.mydomain.com.au.



Thanks in advance!
cfinnigaAsked:
Who is Participating?
 
yorenConnect With a Mentor Commented:
You're working with hostnames. A subdomain is a little different. If you decided to open a branch office in the US, for example, you might create a subdomain called "us" so that hosts there would be named "host1.us.mydomain.com.au", etc. To do that you'd probably delegate the "us" subdomain to another server:

us  IN NS ns1.us.mydomain.com.au.
ns1.us IN A 202.0.1.0


To answer your question above, "fett" is a hostname while "jango" and "boba" are aliases for "fett".
0
 
yorenCommented:
I think MX records cannot point to CNAMEs. Make your "mail" entry an [A]ddress.
0
 
cfinnigaAuthor Commented:
You are correct voren.. same with a NS entry. After more reading and messing about, I have come up with the following zone config:

$TTL 3600

mydomain.com.au.         IN      SOA     mydomain.com.au. webmaster.mydomain.com.au. (
                       20022050519     ; serial
                       86400           ;
                       7200            ;
                       8640000         ;
                       86400 )         ;

@                       IN      NS      ns1.mydomain.com.au.
@                       IN      NS      mail.hq.org.au.

; Hosts
; NS and MX records must be an A record
@                       IN      A       202.0.0.0
ns1                     IN      A       202.0.0.0
mail                    IN      A       202.0.0.0

; Nicknames
www                     IN      CNAME   @
ftp               IN     CNAME     @
sonic                   IN      CNAME   @
misfit                  IN      CNAME   @

; MX Record
@                       IN      MX      10 mail.mydomain.com.au.

I believe this is probably the better implementation??
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
yorenCommented:
Yes, that looks better. Two comments:

1. I assume that "202.0.0.0" is not the actual address you're using. By convention, ".0" addresses are reserved for identifying the network. If you're not already doing so, make sure you use something not ending in zero.

2. If you want your machine to be generally accessible from the Internet, you'll need to register your machine as a nameserver host and assign that host to your domain. You need to do that with a domain registrar such as www.netsol.com.
0
 
cfinnigaAuthor Commented:
Yep, that last zone file has fixed all my other problems aswell.. sendmail and apache. Like I said at the start, DNS (sendmail and apache also) was working.. I just didn't feel that they were working 100% correctly :)

yoren:
1. Correct. I changed the IP and domain for posting here just for security.
2. Thanks, already got one. Thats how I determined that the zone file was not entirely correct.. things were not working _exactly_ as they should have been :)

I guess for the points, some things to clarify: the CNAME records www, ftp, sonic, and misfit are just aliases for the domain name.. hence they will are not true sub domains? A true subdomain would be an entry of an A recordtype?

So if I had:
fett                    IN      A       202.0.0.0
jango                  IN      CNAME   fett
boba                  IN      CNAME   fett

fett is the actual sub domain, while jango and boba are just other names for it?

Thanks
0
 
cfinnigaAuthor Commented:
Thanks yoren, I understand what you are saying.. I think it is others that are using incorrect terminology that is confusing me.. eg. I was reading this on a site:


Sub-Domains can be used to organize the content within your web site.

Consider the following URL's

http://www.yourdomain.com  Main Web Site
http://www.yourdomain.com/info  Your Company Information
http://www.yourdomain.com/contact  Your Company Contact Info.

Using sub-domains you can offer simpler URL's to your clients:

http://www.yourdomain.com
http://info.yourdomain.com
http://contact.yourdomain.com


So, technically www, info and contact are hostnames for the domain yourdomain.com (not sub domains), but they could also be made into real sub-domains with further hostnames of their own?
0
 
yorenCommented:
That's right. I think you've got it now :)
0
 
cfinnigaAuthor Commented:
Thanks again yoren!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.