More Than One Zone on a Name Server Question

Sebastian Castro Avila secastro at nic.cl
Thu Feb 17 20:12:20 UTC 2005


On Wed, 16 Feb 2005 22:03:52 +0000, Tom Naves <tman at sdf.lonestar.org>  
wrote:

> I am trying to figure how to add dns zone to my existing dns server.  My
> existing zone is mydomain.com and I am adding mydomain.net.  I looked in
> DNS and BIND and figured the way to do it was.
>
> One
>
> Add the new zone statement to my named.conf file e.g.,
>
> };
>
> zone  "mydomain.com" {
>  	type master;
>  	file  "db.mydomain.com";
> };
>
> zone  "mydomain.net" {
>  	type master;
>  	file  "db.mydomain.net";
> };
>

This step is OK.

>
> Two
>
> Add another db file to /var/named e.g.,
>
> db.mydomain.net
>
> Which looks like this:
>
> $TTL 86400
> mydomain.net.	IN		SOA	linux.mydomain.com.
> dns.mydomain.com. (
>  				1; serial
>  				28800 ; refresh
>  				7200  ;  retry
>  				604800 ; expire
>  				86400 ; negative caching ttl
>  				)
>
>  			IN	NS	linux.mydomain.com.
>
> mydomain.net.		IN	MX	10	mail
> mydomain.net.		IN	MX	20	mail2
>
> localhost		IN	A	127.0.0.1
>
> mail			IN	A	192.168.1.131
> mail2			IN	A	192.168.1.134
> linux.mydomain.com.	IN	A	192.168.1.144
>
> When I run rndc reload it loads and seems to work o.k. but I get the
> following message in syslog:
>
> Feb 16 13:14:20 linux named[1605]: dns_master_load: db.mydomain.net:19:
> ignoring out-of-zone data (linux.mydomain.com)
>
> Is this normal or is something out of whack?
>

Is quite normal. If you pay attention to the message, you will see is  
warning about "defining a record in the wrong zone".

You are declaring the existence of "linux.mydomain.com" within the  
"mydomain.net" zone. That situation must be prohibited, because anyone  
could be able to create record for any zone without being authoritative  
for them. To explain my point, replace "linux.mydomain.com" by  
"www.google.com".

So, declare "linux.mydomain.com" within "mydomain.com" zone.


> Also mydomain.com and mydomain.net are using addresses on the same  
> subnet.
> In my reverse lookup files for mydomain.com I have the A records in the
> abbreviated form e.g.,
>
> hostname   IN  A  x.x.x.x  The FQDN is derived from the SOA i.e.,
>
> mydomain.com. IN  SOA  linux.mydomain.com.  dns.mydomain.com
>
> Can I just add the hosts from mydomain.net to this file in theis form:
>
> mail.mydomain.net.  IN  A  192.168.1.131 or do I need separate files for
> the additional zone?  And if so how do you do it?
>

It seems you are a little bit confused about your zones.

In "mydomain.com" zone file, you declare records under that zone  
"test.mydomain.com", "arthur.mydomain.com", etc.

Within your reverse zones (probably 1.168.192.in-addr.arpa) you define  
records under that zone (131.1.168.192.in-addr.arpa pointing to  
"mail.mydomain.net", 144.1.168.192.in-addr.arpa pointing to  
"linux.mydomain.com", etc).

So, you must create records under the corresponding zone.

I hope it helps

> Thanks
>
> Tom
>
-- 
Sebastian E. Castro Avila             sebastian at nic.cl
Administrador de DNS, NIC Chile
Fono: (2) 9407705                  Fax  : (2) 9407701



More information about the bind-users mailing list