multiple subdomains in BIND 8.3.3

Kevin Darcy kcd at daimlerchrysler.com
Mon Nov 25 23:46:49 UTC 2002


Joshua Kuo wrote:

> well, my actual named.conf looks like:
>
> <named.conf>
> ========================================
> options {
>   directory "/var/named";
> };
>
> logging {
>   channel all {
>     file "/var/log/named.log" versions 3 size 20m;
>     print-time yes;
>     print-category yes;
>   };
>   category default { all; };
> };
>
> zone "." {
>   type hint;
>   file "named.ca";
> };
>
> zone "localhost" {
>   type master;
>   file "named.local.forward";
> };
>
> zone "0.0.127.in-addr.arpa" {
>   type master;
>   file "named.local.reverse";
> };
>
> include "auto_conf/named.conf.master";
> include "auto_conf/named.conf.slave";
>
> ========================================
>
> and then the auto_conf/named.conf.master looks like:
>
> <auto_conf/named.conf.master>
> ========================================
> zone "brentandheather.com" {
>   type master;
>   file "auto_master/brentandheather.com";
> };
>
> zone "catalogpress.com" {
>   type master;
>   file "auto_master/catalogpress.com";
> };
>
> zone "chakramission.com" {
>   type master;
>   file "auto_master/chakramission.com";
> };
>
> zone "ontariocc.com" {
>   type master;
>   file "auto_master/ontariocc.com";
> };
>
> zone "ontariovb.com" {
>   type master;
>   file "auto_master/ontariovb.com";
> };
>
> (hundreds of zones go in here...)
> =========================================
>
> and then in auto_master/ontariocc.com:
>
> <auto_master/ontariocc.com>
> ==========================================
>
> $TTL 86400
> @       IN      SOA     dns1.partynetworks.net. dns.partynetworks.net. (
>                         0211140003      ; Serial
>                         28800   ; Refresh
>                         7200    ; Retry
>                         604800  ; Expire
>                         86400)  ; Minimum TTL
>
> @   NS  dns1.prioritynetworks.net.
>     NS  dns2.prioritynetworks.net.
>     NS  dns3.prioritynetworks.net.
>
> $ORIGIN  ontariocc.com.
> $INCLUDE edit_master/com.ontariocc
> ==========================================
>
> and finally, is the file edit_master/com.ontariocc
>
> <edit_master/com.ontariocc>
> ==========================================
>
> @                       A           216.132.24.85
>                         MX 30       mail.ontariocc.com.
> www                     CNAME       @

Change that @ to "www.ontariovb.com." (no quotes, don't forget the trailing
dot).


- Kevin


>
> mail                    A           12.3.208.130
> ==========================================
>
> sorry, but someone else set this whole thing up before i did, and for
> the time being i just have to work with it until we rebuild our whole DNS
> system. i hope this is a bit more info for someone to give me a little
> feedback or pointers. i already have the Oreilly DNS and
> BIND book, and is reading it faithfully (and trying to understand what
> the person did before me to get the systme in its current situation).
>
> apologies from the DNS newbie.
>
> On Thu, 14 Nov 2002 12:49:19 -0800, Cricket Liu wrote:
>
> > Joshua Kuo wrote:
> >> i am trying to create two sub domains that will essentially be mirrors
> >> of one another. so that www.ontariocc.com will point to
> >> www.ontariovb.com.
> >>
> >> below is what i find in the official FAQ of this news group:
> >>
> >> Question 5.8.  Multiple Domain configuration
> >>
> >> Date: Fri Dec  2 15:40:49 EST 1994
> >>
> >> If you want to have multiple domain names pointing to the same
> >> destination, such as:
> >>
> >>       ftp ftp.biff.com connects user to -> ftp.biff.com ftp
> >>       ftp.fred.com connects user to -> ftp.biff.com ftp ftp.bowser.com
> >>       connects user to -> ftp.biff.com
> >>
> >> You may do this by using CNAMEs:
> >>
> >>       ftp.bowser.com.         IN      CNAME ftp.biff.com.
> >>
> >> You can also do the same thing with multiple A records.
> >>
> >> however, it does not mention _where_ i should have that statement to
> >> link the two names. below is what i have:
> >>
> >> zone "ontariocc.com" {
> >>   type master;
> >>
> >>   $TTL 86400
> >>   @       IN      SOA     dns1.partynetworks.net.
> >> dns.partynetworks.net.(
> >>                   0211140002  ; Serial
> >>                   28800       ; Refresh
> >>                   7200        ; Retry
> >>                   604800      ; Expire
> >>                   86400)      ; Minimum TTL
> >>
> >>   @   NS  dns1.partynetworks.net.
> >>       NS  dns2.partynetworks.net.
> >>       NS  dns3.partynetworks.net.
> >>
> >>   $ORIGIN  ontariocc.com.
> >>   @                       A           216.132.24.85
> >>                           MX 30       mail.ontariocc.com.
> >>   www                     CNAME       @ mail                    A
> >>       12.3.208.130
> >> };
> >>
> >> zone "ontariovb.com" {
> >>   type master;
> >>
> >>   $TTL 86400
> >>   @       IN      SOA     dns1.partynetworks.net.
> >> dns.partynetworks.net.(
> >>                   0211140002  ; Serial
> >>                   28800       ; Refresh
> >>                   7200        ; Retry
> >>                   604800      ; Expire
> >>                   86400)      ; Minimum TTL
> >>
> >>   @   NS  dns1.partynetworks.net.
> >>       NS  dns2.partynetworks.net.
> >>       NS  dns3.partynetworks.net.
> >>
> >>   $ORIGIN  ontariovb.com.
> >>   @                       CNAME       www.ontariocc.com.
> >>                           MX 30       mail.ontariocc.com.
> >>   www                     CNAME       @ mail                    A
> >>       mail.ontariocc.com.
> >> };
> >
> > Whoa.  You're putting zone data into named.conf.  Zone data belong in
> > zone data files, which are then referred to in named.conf.
> >
> >> is this something that i should be concerned about? am i doing anything
> >> wrong here?
> >
> > Yes, very wrong.  Start with a HOWTO on setting up a name server (or a
> > good book).  That should show you how to set up a named.conf file and
> > zone data files, and should help you understand the roles they play.
> >
> > cricket
> >
> > Men & Mice
> > DNS Software, Training and Consulting www.menandmice.com
> >
> > The DNS and BIND Cookbook, now available!
> > http://www.oreilly.com/catalog/dnsbindckbk/



More information about the bind-users mailing list