Two domain names, same IP adresses

David Botham dns at botham.net
Mon Feb 17 22:05:47 UTC 2003



> -----Original Message-----
> From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org] On
> Behalf Of Andreas Moroder
> Sent: Monday, February 17, 2003 1:44 AM
> To: comp-protocols-dns-bind at isc.org
> Subject: Two domain names, same IP adresses
> 
> Hello,
> 
> because of historical reasons, we have two domain names
> se-nord.provinz.bz.it and sb-brixen.it for the same network.
> Today my named.conf looks like
> 
> ....
> zone "se-nord.provinz.bz.it" in {
>          type master;
>          file "se-nord.zone";
> };
> 
> zone "sb-brixen.it" in {
>          type master;
>          file "sb-brixen.zone";
> };
> ....
> 
> and I have the two files that look like
> 
> sb.brixen.-zone)
> 
> $TTL 2D
> sb-brixen.it.           IN SOA          voyager2   root.localhost. (
>                                  2002012004      ; serial
>                                  1D              ; refresh
>                                  2H              ; retry
>                                  1W              ; expiry
>                                  2D )            ; minimum
> 
>                  IN NS           voyager2
>                  IN MX           10 titan
> 
> proton1         IN      A       10.53.4.8
> proton2         IN      A       10.53.4.9
> .....
> 
> and se-nord.zone )
> 
> TTL 2D
> se-nord.provinz.bz.it.  IN      SOA     voyager2 root.localhost. (
>                          2003021402
>                          1D
>                          2H
>                          1W
>                          2D )
> 
>                  IN NS           voyager2
>                  IN MX           10 titan
> 
> 
> proton1         IN      A       10.53.4.8
> proton2         IN      A       10.53.4.9
> ....
> 
> that have all the same entries except the domain.
> 
> How can I configure named to use only one zone file that works with
both
> domains ?

[...snatched from the archives]

Here is an example of a zone db file that would work for any number of
zones being mastered by the same name server where all of the zone data
is the same:



@	IN	SOA	ns1.domain.com.	admin.domain.com. (
			2003020200
			28800
			14400
			604800
			86400)

@	IN	NS	ns1.domain.com.
@	IN	NS	ns2.domain.com.

@	IN	MX	mail.domain.com.
@	IN	MX	mail2.domain.com.


@	IN	A	10.200.5.43
ns1	IN	A	192.168.1.1
ns2	IN	A	192.168.1.2
mail	IN	A	192.168.1.3
mail2	IN	A	192.168.1.4

www	IN	CNAME	@


[added later...
Remember, that on the Slave server, the name of the zone db backup file
*must* be unique.  Use a script for this purpose if you have many to
create.
...done addition]


Notice that "@" is a substitute for the ORIGIN, which unless otherwise
explicitly changed, is the name of the zone as specified in the "zone"
statement of named.conf.  Therefore, the above zone db file could be
used for any number of domains that contain the same information.  Some
companies need to have hundreds of domains contain the same information
due to the fact that they have registered every possible mis-spelling of
their domain name.  Although, I don't know why I am telling you this, as
you already have a reason to use a zone db like the one above...



Thanks,


Dave...

[end snatching...]

> 
> Thank you very much
> 
> Andreas Moroder




More information about the bind-users mailing list