address pools

Randy Grimshaw rgrimsha at syr.edu
Thu Nov 16 15:51:54 UTC 2006


Perhaps some examples:

option space LWAPP;
option LWAPP.controller code 241 = ip-address;
class "LWAPP" {
  match option vendor-class-identifier;
}
subclass "LWAPP" "Cisco AP c1130"
{
  vendor-option-space LWAPP;
  option LWAPP.controller 10.21.0.19;
}
# and later you can use allow members of "LWAPP"

class "RAS" {
   match if substring (option dhcp-client-identifier, 1, 3) = "RAS";
}
# and later you can use deny members of "RAS"

on commit {
  log(info,
    concat("Fingerprint:\t",
      binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
      "\t",
      binary-to-ascii(10, 8, "-", option dhcp-parameter-request-list),
      "\t",
      pick-first-value(option vendor-class-identifier,"no-identifier")
    )
  );
}
log-facility local3;
# you can store these to a class also but it has been more useful to me
as a log. (1)
# it only displays no-identifier if the client supplied value is absent
(3)(5) you can also ovveride client supplied values
# no. the identifier is not the hardware (4)

there are many places in the config where data is redundant, I build
the config from SQl tables. (2)
yes (6)

<><Randy


<><Randall Grimshaw
Room 203 Machinery Hall
Syracuse University
Syracuse, NY   13244
315-443-5779
rgrimsha at syr.edu

>>> Chris at InfoGreat.com 11/16/2006 10:26:57 AM >>>
Hi Glenn,

Thanks.

You've answered many questions and raised a few.  Brief answers are
probably
all that is necessary.  If I can get an answer to the first question,
then I
may even be able to find my own answers to the rest...

==================
~~~~~~~~~~~~~~~~~~
1) Is it possible to echo values so I can see what dhcpd is doing and
why?
Maybe a trace of some kind?
~~~~~~~~~~~~~~~~~~
==================

2) Using the subclass, I need to record the MAC address in two places
-- the
subclass directive and the host directive.  Is there any way to
combine
these?  For example, being able to subclass based on host name as
assigned
by dhcpd?  Cut-and-paste makes the typing easy, but there is always
the
possibility of version skew...

3) What does "match-first value"  mean?  I find exactly two references
in
man dhcpd.conf and they are both uses -- no explanations.  I can guess,
but
I've been wrong before...

4) I've seen indications that dhcp-client-identifier is
<protocol>:<MAC
address>, where <protocol> == "1" in the case of ethernet.  Is this
correct?

5) What is "dhcp-client-identifier" and can I set it through dhcpd or
is the
completely the jurisdiction of the client?  Why do I need it, if I have
my
heart set on using the MAC address?

6) My class can clearly have more than on thing, but can my thing be in
more
than one class?

These are some of the questions that I still have after reading the
man
pages, and I found three of them, and after getting very helpful
advice.

Chris.

Fill what's empty, empty what's full, and scratch where it itches.
Life is a journey, not a destination ...










> -----Original Message-----
> From: dhcp-users-bounce at isc.org 
> [mailto:dhcp-users-bounce at isc.org] On Behalf Of Glenn Satchell
> Sent: Thursday, November 16, 2006 6:39 AM
> To: dhcp-users at isc.org 
> Subject: RE: address pools
> 
> 
> >From: "Chris Miller" <Chris at InfoGreat.com>
> >To: <dhcp-users at isc.org>
> >Subject: RE: address pools
> >Date: Thu, 16 Nov 2006 06:25:33 -0800
> >
> >Hi Simon,
> >
> >THANKS THANKS THANKS THANK THANKS and yet again THANKS  for 
> the comments.
> >:-)
> >
> >I did discover classes and I'm aware that I can "allow" and "deny' 
> >members of <class> in the pools, but it is not clear haw I 
> assert that 
> >my hosts are members of <class>.  The doc show lots of ways to 
> >interrogate options that are already there but I'm hoping I 
> can do something like:
> >
> >	Host trax {hardware ethernet XX:XX:XX:XX:XX:XX; class 
> "servers"' }
> >
> >... or even
> >
> >	Host trax {hardware ethernet XX:XX:XX:XX:XX:XX; class 
> "servers"'; 
> >class "static"; class "infrastructure"}
> >
> >... but I've found nothing that hints at this.  Google was 
> no help either.
> 
> Keep reading :) a bit further down in the dhcpd.conf man page 
> it talks about Sub-Classes. This is what you want.
> 
>      class "servers" {
>        match pick-first-value (option dhcp-client-identifier, 
> hardware);
>      }
> 
>      class "infrastructure" {
>        match pick-first-value (option dhcp-client-identifier, 
> hardware);
>      }
> 
>      subclass "servers" 1:8:0:2b:4c:39:ad;
>      subclass "infrastructure" 1:8:0:2b:a9:cc:e3;
>      subclass "servers" 1:0:0:c4:aa:29:44;
> 
> Note the '1' at the beginning of the mac address in the 
> subclass - it's the media type, and 1 is ethernet.
> 
> >This was why I thought if I declared my host in the scope of 
> the pool, 
> >that their address would be allocated from that pool -- not 
> really so 
> >silly, you see.  And the docs are quiet good at one level, 
> but there is 
> >a larger context that is not clear -- as evidenced by some of my 
> >confusion.  All the statements and options are clearly explained but

> >the higher level discussion of how to assemble them to 
> achieve certain goals is not at all clear.
> >Unless I'm reading the wrong docs ...  ?
> 
> A host declaration is a bit smarter than that, because a host 
> could potentially have different addresses, eg if it was a 
> laptop that moved to different subnets.
> 
> There is an excellent book: The DHCP Handbook by Ted Lemon 
> and Ralph Droms, now in 2nd Ed. Ted was the original author 
> of the ISC dhcpd, and Ralph was/is the chair of the IETF DHC 
> Working Group, so they both know a fair bit about dhcp :)
> 
> regards,
> -glenn
> 




More information about the dhcp-users mailing list