Re: Extending range of Statics
Am Mittwoch, 9. Dezember 2009 schrieb Klaus Ade Johnstad:
> /etc/bind/debian-edu/db.intern
> /etc/bind/debian-edu/db.10
>
Hi Klaus, once again thank you for pointing to
this generic definition of hosts. I knew it was there - and
the howto in the wiki gives the same information (now) - but
still have some questions about it.
db.intern and db.10 look very similar (as they define corresponding
ranges), and I wonder if this redundancy could be used to unify those
two files (in order to reduce points of failure).
I don't know where this kind of syntax comes from:
// from db.10:
; Addresses 10.0.2.10-29 is used to name thin client servers
$GENERATE 0-19 ${10}.2 PTR ltspserver${0,2}.intern.
//corresponding part in db.intern:
; Thin client servers in
$GENERATE 0-19 ltspserver${0,2} A 10.0.2.${10,2}
This is obviosly equivalent for (pseudo C-code):
for (i=0; i<= 19; i++)
printf("ltspserver%02d A 10.0.2.%02d, i, i+10);
Considering this, the first step to extend the range of static would be
to extend the range within 10.0.2.0/24 (up to static204/10.0.2.254):
// change db.10 to:
; Reserve some addresses for staticly assigned addresses
$GENERATE 0-204 ${50}.2 PTR static${0,3}.intern.
// or 3^?
; REPLACING
; $GENERATE 0-155 ${100}.2 PTR dhcp${0,3}.intern.
// here, we could replace 156 by 0 - but in order to keep further logs
valid, dhcp0-dhcp155 could be left as gap:
; GENERATE to make dhcp names under 3.0.10.in-addr.arpa
< $GENERATE 0-243 $.3 PTR dhcp${156,3}.intern.
> $GENERATE 0-243 $.3 PTR dhcp${0,3}.intern.
//now, same in db.intern:
; Static addresses in 10.0.2/24
< $GENERATE 0-49 static${0,2} A 10.0.2.${50}
> $GENERATE 0-204 static${0,3} A 10.0.2.${50}
; dhcp names in 10.0.2.0/24 and 10.0.3.0/24
<$GENERATE 0-155 dhcp${0,3} A 10.0.2.${100}
>; $GENERATE 0-155 dhcp${0,3} A 10.0.2.${100}
$GENERATE 0-243 dhcp${156,3} A 10.0.3.$
Thank you, if you confirm this, we can put this into wiki (and possibly
even into svn).
Regards
Ralf
Reply to: