AlanT
asked on
DNS Zones And Domains
I am trying to figure out how to set up BIND DNS so that there are more than one DNS domain in a DNS zone. I have looked this up in half a dozen books and they all say it can be done but do not describe how to do it - they all only give examples of there being one DNS zone in a DNS domain and then seem to use the terms zone and domain interchangably. Which I suppose makes sense when the zone and the domain are the same thing. Do you need a seperate
database files for each domain in the zone ? or is there only one zone database covering all the domains ? Can anyone help ? By the way this is not a real world problem - I am just me trying to figure out how DNS works. And am confused about DNS domains and zones.
database files for each domain in the zone ? or is there only one zone database covering all the domains ? Can anyone help ? By the way this is not a real world problem - I am just me trying to figure out how DNS works. And am confused about DNS domains and zones.
http://support.microsoft.com/support/kb/articles/Q164/0/54.asp compares domains with zones.
what do you mean by different domains in one zone? as in www.company.com and www.site1.company.com, www.site2.company.com?
or do you mean comapany1.com and company2.com?
if the former, it is easy enough, just put it all into the one zone file like:
company.com IN SOA ..etc,etc
...ns records..
...mx records..
www IN A nnn.nnn.nnn.nnn
www.site1 IN A mmm.mmm.mmm.mmm
www.site2 IN A lll.lll.lll.llll
----- note the period marks -----
if the latter, then you just make several zone files (just use any existing zones as a template/guide), and make sure that you put the zone in the named.boot file. for NT BIND, this file is c:\winnt\named.boot (or rather %systemroot%\named.boot
cheers.
or do you mean comapany1.com and company2.com?
if the former, it is easy enough, just put it all into the one zone file like:
company.com IN SOA ..etc,etc
...ns records..
...mx records..
www IN A nnn.nnn.nnn.nnn
www.site1 IN A mmm.mmm.mmm.mmm
www.site2 IN A lll.lll.lll.llll
----- note the period marks -----
if the latter, then you just make several zone files (just use any existing zones as a template/guide), and make sure that you put the zone in the named.boot file. for NT BIND, this file is c:\winnt\named.boot (or rather %systemroot%\named.boot
cheers.
ASKER
Thanks for the information Meverest. . I actually meant the first of your two examples but describing both cases as you have lends clarity to your explanation. Just to make sure I have understood would the BIND boot file for a zone containing the domains company. , london.company. , newst.london.company . and maddoxst.london.company look like this :-
cache . cache.dns
primary company company.dns
primary london.company company.dns
primary newst.london.company company.dns
primary maddoxst.london.company company.dns
primary 100.129.inadr.arpa 100.129.inadr.arpa.dns
primary 102.10.inadr.arpa 100.120.inadr.arpa.dns
That is to have multiple domains in a zone do you just have multiple references to the zone database – one reference for each domain ? If you post an answer either confirming or correcting me I will award the 250 points.
cache . cache.dns
primary company company.dns
primary london.company company.dns
primary newst.london.company company.dns
primary maddoxst.london.company company.dns
primary 100.129.inadr.arpa 100.129.inadr.arpa.dns
primary 102.10.inadr.arpa 100.120.inadr.arpa.dns
That is to have multiple domains in a zone do you just have multiple references to the zone database – one reference for each domain ? If you post an answer either confirming or correcting me I will award the 250 points.
No,
The third field in the cache file indicates the name of the file stored in the DNS servers name.cache directory
the file goes like this:
primary [domain name] [filename]
The way you have the file set up in your example would point name lookups to the same file. DNS services are a distributed (across the Internet) database. The third field is simply the name that the server will associated with the zone file.
If you were to name all those domains to the same file. They would all use the same file on forward lookups, so if you looked up www.company or www.london.company you woudl get returned the same IP number
The third field in the cache file indicates the name of the file stored in the DNS servers name.cache directory
the file goes like this:
primary [domain name] [filename]
The way you have the file set up in your example would point name lookups to the same file. DNS services are a distributed (across the Internet) database. The third field is simply the name that the server will associated with the zone file.
If you were to name all those domains to the same file. They would all use the same file on forward lookups, so if you looked up www.company or www.london.company you woudl get returned the same IP number
no, you just need the one etry in the named.boot - ie company.com - and add entries as above, noting lack of periods at the end of each:
www IN A <address>
www.london IN A <address>
www.maddoxst.london IN A <address>
... etc ..
but i can't post an answer now, as it seems that someone has beat me to it.
;-l
cheers.
www IN A <address>
www.london IN A <address>
www.maddoxst.london IN A <address>
... etc ..
but i can't post an answer now, as it seems that someone has beat me to it.
;-l
cheers.
ASKER
bigezy thanks for the information I am only rejecting this answer to allow further discussion.
I now understand that I only need to have a reference to the highest level domain in the zone in the DNS boot file. But are you right in thinking that the result of multiple references to the zone database in the DNS Boot file, would be for hosts in different domains in the zone to be mapped to the same IP address ? The IP mappings are provided by the DNS zone database file and if there were separate mappings for www.company and www.london.company in the zone database their names could be successfully resolved.
I don’t know for sure what would happen if I set up the boot file incorrectly as I described but would suspect that either the DNS service would not start or it would start but only read the first reference to the zone file and ignore all the others but the first reference is correct so DNS would work ok – i.e. I don’t need all those references to the sub domains of company but their presence does no harm.
In either case the effect would not be incorrect name resolutions. If you can point out the flaw in my logic I will ask EE support to split the points and award yourself and meverest 125 points each. But if I am right and your information about incorrect name resolutions is not true I will make the split 150 points to meverest and 100 points to you. Does that seem fair ?
Thanks for your input.
I now understand that I only need to have a reference to the highest level domain in the zone in the DNS boot file. But are you right in thinking that the result of multiple references to the zone database in the DNS Boot file, would be for hosts in different domains in the zone to be mapped to the same IP address ? The IP mappings are provided by the DNS zone database file and if there were separate mappings for www.company and www.london.company in the zone database their names could be successfully resolved.
I don’t know for sure what would happen if I set up the boot file incorrectly as I described but would suspect that either the DNS service would not start or it would start but only read the first reference to the zone file and ignore all the others but the first reference is correct so DNS would work ok – i.e. I don’t need all those references to the sub domains of company but their presence does no harm.
In either case the effect would not be incorrect name resolutions. If you can point out the flaw in my logic I will ask EE support to split the points and award yourself and meverest 125 points each. But if I am right and your information about incorrect name resolutions is not true I will make the split 150 points to meverest and 100 points to you. Does that seem fair ?
Thanks for your input.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i disagree with bigezy.
if you want subdomains, you *do not* need seperate zone files. one will do, and one is the proper way to handle it, unless you want to host the subdomains on a different DNS host (in which case you do it defferent again - look at o'reilys 'DNS and BIND' for the last word on dns ;-)
alant - all you need is one zone file.
www IN A <address>
www.london IN A <address1>
www.maddoxst.london IN A <address2>
...etc..
or, if you use the full hostnames, you can do:
www.company.com. IN A <address>
www.london.company.com. IN A <address1>
www.maddoxst.london.company.com. IN A <address2>
(note the trainilng period on the fully qualified hostnames)
cheers.
if you want subdomains, you *do not* need seperate zone files. one will do, and one is the proper way to handle it, unless you want to host the subdomains on a different DNS host (in which case you do it defferent again - look at o'reilys 'DNS and BIND' for the last word on dns ;-)
alant - all you need is one zone file.
www IN A <address>
www.london IN A <address1>
www.maddoxst.london IN A <address2>
...etc..
or, if you use the full hostnames, you can do:
www.company.com. IN A <address>
www.london.company.com. IN A <address1>
www.maddoxst.london.company.com. IN A <address2>
(note the trainilng period on the fully qualified hostnames)
cheers.
I disagree with your disagreement. It can be done BOTH ways, and O'reily is not the bible of DNS:)
I have personally set DNS up this way on sites such as louisville.edu. The DNS system is simply a distributed database. And, the bottom line is that both of us are right. It is a matter of elegance in design.
If Alan does it the way you describe above it will work. But, if you have to administer a complex set of domains and subdomains this method tends to not be as portable. If for example you were going to extend autority for london.company to another dns server.
I have personally set DNS up this way on sites such as louisville.edu. The DNS system is simply a distributed database. And, the bottom line is that both of us are right. It is a matter of elegance in design.
If Alan does it the way you describe above it will work. But, if you have to administer a complex set of domains and subdomains this method tends to not be as portable. If for example you were going to extend autority for london.company to another dns server.
sure,
and although oreilly may not be the 'bible of dns', it is arguably the 'bible of BIND' ;-)
cheers.
and although oreilly may not be the 'bible of dns', it is arguably the 'bible of BIND' ;-)
cheers.
ASKER
Looks like this is a case of "experts differ". I cannot tell which of you is right but the advice you have both given and the debate you have had about the best way to install multiple domains in a DNS zone have contributed greatly towards getting me to understand DNS and BIND. Much more so than the books I have read. So I will ask EE support to split the points so that you will get 125 points each.
You both mention DNS and BIND by O'Reilly - is this the book I should be reading if I really want to understand DNS ?
You both mention DNS and BIND by O'Reilly - is this the book I should be reading if I really want to understand DNS ?
Alan:
Yes, the O'Reilly book is the best place to go to get you off the ground for DNS. Highly reccommended, I agree with 90% of the book :)
Edmond
Yes, the O'Reilly book is the best place to go to get you off the ground for DNS. Highly reccommended, I agree with 90% of the book :)
Edmond
i agreewith you there bigezy ;) as for points, better to choose whoever you think has answered the question most effectively for you. if you really want to give someone else points, just post a new question titled "points for <whoever>" to answer.
cheers.
cheers.
ASKER
I am rejecting this answer at the advice of EE Support so that they can split up the points and award them as I have described.
AlanT accidently accepted the answer to this question so I have issued a question for meverest to claim his share of the points.
Ian
Community Support @ Experts Exchange
Ian
Community Support @ Experts Exchange