2 domains in 1 zone file...how?

James Raftery james-bind-users at now.ie
Thu Jan 25 18:25:04 UTC 2001


On Thu, Jan 25, 2001 at 12:05:32PM -0600, Jamie P. Bontrager wrote:
> If I have domain-a.com and domain-b.com that both point to the same ip and
> website, is there a way to combine zone files for both domains in bind 8?  I
> cannot find any reference to this in the O'Reilly book on bind.

Yes - you can reference the same zone file in the 'file' statement of
the zone clauses. You need to construct a zone file that uses
unqualified names - the nameserver will append the zone name for records
that don't end with a period.
So when it loads the domain-a.com zone from the file it will qualify all
the unqualified names with domain-a.com and likewise for domain-b.com.

> If someone is doing this, could you post a sample zone file if possible?

@          IN      SOA     ns1.domain.com. root.ns1.domain.com. (
                2001012211  ; Serial
                10800       ; Refresh - 3 hours
                3600        ; Retry - 1 hour
                604800      ; Expire - 1 week
                86400       ; Minimum - 24 hours
           )
;
; Primary and secondary name servers for this zone
;
    IN      NS      ns1.domain.com.
    IN      NS      ns1.domain.com.
;
; SMTP mail exchanger
;
   IN      MX      10 ns1.domain.com.
   IN      MX      100 ns2.domain.com.
   IN      A       192.192.192.1
;
; Addresses for canonical names and aliases
localhost              IN      A               127.0.0.1
loopback               IN      CNAME           localhost
;
www                    IN      A               192.192.192.1
ftp                    IN      CNAME           www


james
-- 
James Raftery (JBR54)
  "It's somewhere in the Red Hat district"  --  A network engineer's
   freudian slip when talking about Amsterdam's nightlife at RIPE 38.



More information about the bind-users mailing list