Bind grabs the wrong zone file.

Nate Campi nate at campin.net
Sat Apr 6 18:19:21 UTC 2002


On Sat, Apr 06, 2002 at 09:51:12AM -0500, Robert Messinger wrote:
> 
> I have a zone for example.com.  Everything works fine and
> I have a record for www.example.com.  Very easy very basic.
> 
> Now someone else creates a zone for 'www.example.com.'  When they
> create an A record for their base domain they just hijacked the 
> 'www' A record from the 'example.com' domain.

If you have conflicting records in the parent and child zone loaded into
BIND, BIND gives out the one from the child zone/subdomain.

> Is this what Bind is supposed to do?  I always thought that it 
> was supposed to look for 'example.com' first and then see if there
> is a NS record for 'www.example.com' before it would actually look
> for a zone for 'www.example.com'.

This is all on one nameserver, so it's what's expected. If a subdomain
was delegated to a *different* nameserver, any conflicting records
between the parent and child would normally be answered by the parent.
Due to the nature of the DNS, the parents are asked first, and have
first crack at answering queries.

Besides, BIND doesn't really "look" in zone files like you seem to
think, it compiles an in-memory database at startup. The authoritative
data comes from a child zone, so that's what goes in the database. Your
record from the parent zone is gone once it starts up, essentially.
-- 
"Remember: It ain't a sport if it can't kill you."
 - seen in John R. Marshall's sig



More information about the bind-users mailing list