cfinniga
asked on
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!
$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!
I think MX records cannot point to CNAMEs. Make your "mail" entry an [A]ddress.
ASKER
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??
$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??
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.
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.
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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?
That's right. I think you've got it now :)
ASKER
Thanks again yoren!