BIND - sorting of reverse domain.

Mark_Andrews at isc.org Mark_Andrews at isc.org
Tue Jul 2 23:52:55 UTC 2002


> 
> It appears that BIND (I have version 9.2.1) sorts all its domain entries in t
> he
> files it stores alphabetically ("machine sort order").  That's fine for the
> forward domain file where domain/hostnames are usually alphabetic.  However,
> for the reverse domain file, it makes more sense to sort it in NUMERICAL valu
> e
> order, thus keeping adjacent IP addresses nearer to each other.  (Of course, 
> I
> don't care what named does internally with the zone as a memory image ....)
> 
> 0	IN PTR ...
> 1	IN PTR ...
> 100	IN PTR ...
> ....
> 109	IN PTR ...
> 11	IN PTR ...
> 110	IN PTR ...
> 
> Isn't very intuitive as for sorting a reverse file.  I'm thinking of this fro
> m
> the point of human readable IP management.
> 
> Comments?
> 
	The order is DNSSEC order.  To support returning signed NXDOMAIN
	responses the namserver needs to know the node that appears
	immediately before the name in the query.  To do this it sorts the
	zone when it load it into DNSSEC order.  When named writes out the
	zone it just walks the zone which results in records being emitted
	in dnssec order.

	Mark
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at isc.org


More information about the bind-users mailing list