Solved

DNS Zone File Config

Posted on 2002-05-20
8
283 Views
Last Modified: 2010-05-18
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!
0
Comment
Question by:cfinniga
  • 4
  • 4
8 Comments
 
LVL 7

Expert Comment

by:yoren
ID: 7022738
I think MX records cannot point to CNAMEs. Make your "mail" entry an [A]ddress.
0
 

Author Comment

by:cfinniga
ID: 7023444
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
 
LVL 7

Expert Comment

by:yoren
ID: 7023499
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
 

Author Comment

by:cfinniga
ID: 7024090
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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 7

Accepted Solution

by:
yoren earned 60 total points
ID: 7024953
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
 

Author Comment

by:cfinniga
ID: 7026152
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
 
LVL 7

Expert Comment

by:yoren
ID: 7026224
That's right. I think you've got it now :)
0
 

Author Comment

by:cfinniga
ID: 7026245
Thanks again yoren!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now