DDNS with host declarations
DESEtech - German P. Santillan
gsantillan at desetech.com.ar
Mon Oct 30 12:10:21 UTC 2006
> -----Original Message-----
> From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On
> Behalf Of Glenn Satchell
> Sent: Sunday, October 29, 2006 9:01 AM
> To: dhcp-users at isc.org
> Subject: Re: DDNS with host declarations
>
>
> >Date: Sun, 29 Oct 2006 12:43:46 +0100 (MET)
> >From: Jan Engelhardt <jengelh at linux01.gwdg.de>
> >To: dhcp-users at isc.org
> >Subject: Re: DDNS with host declarations
> >
> >>
> >>See the section in dhcpd.conf on classes. You can define a single class
> for
> each
> >>host based on the mac address. Then create a pool with a single IP
> address in
> >>the range. Something like this:
> >>
> >>class "xp" {
> >> match if hardware = putsomethinghere;
> >>}
> >>
> >>subnet 192.168.234.0 255.255.255.0 {
> >> ...
> >> pool {
> >> allow members of "xp";
> >> range 192.168.234.2;
> >> }
> >> ...
> >>}
> >
> >Hm there is a slight problem:
> >
> >class "xp" { match if binary-to-ascii(16, 8, ":", hardware) =
> >"00:0C:29:93:C6:21"; }
> >subnet ... {
> > range 192.168.234.10 192.168.234.40;
> > pool { allow members of "xp"; range 192.168.222.41; }
> >}
> >
> >The client always gets the IP address it used before (234.20) rather
> >than picking up .41. Is this because of the unconditional range
> >statement?
> >I also tried with `match if 1=1` but it won't get .41.
> >
> >
> >>Which can be quite clumsy if you need to have more than a few hosts
> >>defined this way.
> >
> >Well it looks a little nicer than having to put the IP in _two_
> >different places (dhcpd.conf and named db).
> >
> >
> > -`J'
> >--
> >
>
> I realiased after I sent the last message that you also need to exclude
> the class from any other ranges. Also you can simplify the match
> statement (note no quotes around the mac address, see dhcp-eval man
> page, the leading 01 is interface type and 01 is ethernet) like this:
>
> class "xp" { match if hardware = 01:00:0C:29:93:C6:21; }
> subnet ... {
> pool {
> deny members of "xp";
> deny members of "another1";
> range 192.168.234.10 192.168.234.40;
> }
> pool { allow members of "xp"; range 192.168.222.41; }
> pool { allow members of "another1; range 192.168.222.42; }
> }
>
> If you allow a particular class that implies denying all other classes.
>
> The range you offer in all the pools must be valid within the subnet,
> else you will get an error from dhcpd. You've got 192.168.234.x and
> 192.168.222.y so I guess it's not a /24 subnet.
>
> regards,
> -glenn
> --
> Glenn Satchell mailto:glenn.satchell at uniq.com.au | Some days we are
> Uniq Advances Pty Ltd http://www.uniq.com.au | the flies; some
> PO Box 70 Paddington NSW Australia 2021 | days we are the
> tel:0409-458-580 tel:02-9380-6360 fax:02-9380-6416 | windscreens...
>
>
>
>
The easy way
host foo {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address yyy.yyy.yyy.yyy;
option host-name "foo";
ddns-hostname "foo";
ddns-domainname "example.com";
}
This static entry sends a DDNS Update to BIND as Lease Transaction.
It Works!
Germán P. Santillán
Administrador de Redes
Jefe del Dpto. Técnico
DESETech Argentina S.A.
San Martín 133 - CP: B8000FIC
Bahía Blanca - Argentina
Tel/Fax: +54 (291) 456-5642
gsantillan at desetech.com.ar
http://www.desetech.com.ar
More information about the dhcp-users
mailing list