Classless CIDR delegation...

Joseph S D Yao jsdy at tux.org
Sun Aug 16 04:08:19 UTC 2009


On Sat, Aug 15, 2009 at 06:59:03PM -0700, Gregory Hicks wrote:
...
>  zone "96-28.55.139.64.in-addr.arpa" {
>         type master ;
>         file "db.96-28.55.139.64.in-addr.arpa" ;
>         allow-update { none; };
> };
> 
> This is my reverse zone:
> 
> ----
> $ORIGIN .
> $TTL 3600
> 
> 96-28.55.139.64.in-addr.arpa.  IN SOA ns.hicks.net. hostmaster.ns.hicks-net.net (	2009081502	; serial
...
> 97.139.55.64.in-addr.arpa.	IN PTR	localhost. ; rtr.hicks-net.net.
> 98.139.55.64.in-addr.arpa.	IN PTR	localhost. ; fw.hicks-net.net.
> 99.139.55.64.in-addr.arpa.	IN PTR	mx.hicks-net.net ; mx.hicks-net.net.
> 100.139.55.64.in-addr.arpa.	IN PTR	young-one.hicks-net.net.
> 101.139.55.64.in-addr.arpa.	IN PTR	young.hicks-net.net.
> 102.139.55.64.in-addr.arpa.	IN PTR	kris.hicks-net.net. (laptop)
> 108.139.55.64.in-addr.arpa.	IN PTR	metis.hicks-net.net.
> ----
> 
> I have tried this variant on the PTR record.  (There were others but I
> cannot remember them.)  Anyway, all failed.
> 
> 97.96-28.139.55.64.in-addr.arpa.  IN PTR localhost.
...


Mr. Hicks,

The inconsistency between the order of the numbers in the IP address
fields of

	96-28.55.139.64.in-addr.arpa.  IN SOA ns.hicks.net. hostmaster.ns.hicks-net.net (	2009081502	; serial

and

	97.96-28.139.55.64.in-addr.arpa.  IN PTR localhost.

has already noted.  Otherwise, the above is the correct form, rather
than the first format.

I would try to reduce the use of "$ORIGIN" as a rule.  Why use it at
all???  It is often used in examples just to show where the origin
currently is, but as the ARM points out, it need not appear in the
actual zone files.  I would have:


=======================================================================
$TTL 3600	; default positive TTL = 1 hour

@	IN SOA ns.hicks-net.net. hostmaster.ns.hicks-net.net. (
	2009081502	; serial
	3600		; refresh
	900		; retry
	604800		; expire (1 week)
	3600		; NEGATIVE TTL (1 hour)
	)

	IN NS	ns.hicks-net.net.
	IN NS	ns0.xname.org.
	IN NS	ns1.xname.org.

; 96	IN PTR	network.hicks-net.net.
97	IN PTR	r.hicks-net.net.
98	IN PTR	f.hicks-net.net.
99	IN PTR	mx.hicks-net.net.
100	IN PTR	young-one.hicks-net.net.
101	IN PTR	young.hicks-net.net.
102	IN PTR	kris.hicks-net.net. ; (laptop)
108	IN PTR	metis.hicks-net.net.
; 111	IN PTR	broadcast.hicks-net.net.
=======================================================================

Note particularly:

(1)  Lack of $ORIGIN anywhere.  This reduces complexity.
(2)  Added comment to $TTL, correcting comment error on new line 8.
(3)  Use of "@" (default origin) on line 3 to use origin from
     named.conf [reducing complexity].
(4)  Corrected MNAME (source name server) in SOA record on line 3.
(5)  Added of "." to end of RNAME (e-mail address) on line 3.
(6)  Broke line 3 into 3+4 just for readability.
(7)  Corrected comment on line 8, NEGATIVE TTL.  Too many zone files
     have the old commentary, which was obsoleted by RFC 2308.
(8)  Added a "." to end of ns1's name on line 13.
(9)  Removed "A" record between lines 13 and 14 - there does not need to
     be an IP address for the name "96-28.55.139.64.in-addr.arpa".
(10) Removed "MX" record between lines 13 and 14 - there is probably no
     e-mail being sent to *@96-28.55.139.64.in-addr.arpa.
(11) I often add lines like ll. 15 & 23 just as delimiters.
     Uncommented.  Your choice.
(12) With no $ORIGIN, one can use the last field only of the IP
     addresses in ll. 16-22.
(13) Don't PTR anything to "localhost." - either give it a reasonable
     name or comment out the entire line.  Use the full name in the
     internal view, whichever you do.  (ll. 16-17)
(14) Added "." to end of name on l. 18 and removed comment that is the
     same as the name and therefore useless.
(15) Put a ";" before "(laptop)" on l. 21 - good comment but it needs to
     BE a comment and not part of the PTR declaration.

Note also that the PARENT name server(s)

	55.139.64.in-addr.arpa  nameserver = ns1.megapath.net.
	55.139.64.in-addr.arpa  nameserver = ns2.megapath.net.

MUST have something very like:

"named.conf":

zone "55.139.64.in-addr.arpa" {
	type master;
	file "zone.64.139.55";
	allow-update { none; };
};

"zone.64.139.55":

$TTL	...
@	IN SOA	...
	IN NS	...

...

; delegate 64.139.55.96/28 to Mr. Hicks' name servers
96-28	IN NS		ns.hicks-net.net.
	IN NS		ns0.xname.org.
	IN NS		ns1.xname.org.
96	IN CNAME	96.96-28
97	IN CNAME	97.96-28
...
110	IN CNAME	110.96-28
111	IN CNAME	111.96-28


Incidentally, the CNAME records can also be auto-generated by inserting

$GENERATE	96-111	$	CNAME	$.96-28

I hope that this helps!


-- 
/*********************************************************************\
**
** Joe Yao				jsdy at tux.org - Joseph S. D. Yao
**
\*********************************************************************/



More information about the bind-users mailing list