how respond only to specific clients

Simon Hobson dhcp1 at
Thu Jun 22 16:04:19 UTC 2006

Douglas Sterner wrote:

>Trying to use the dhcp-client-identifier option to only give out IP's to
>authorized workstations. Well the short story is it doesn't work. My
>clients all have Internal as there DCI but are unable to get an address
>with this config. Do I need to use pools, the man pages have been vague on
>examples. In addition dhcp-client-identifier, 0, 3 where can I find out
>what the 0 and 3 mean, I haven't found a good reference as of yet.
>#192.168.40.X Network
>class "Internal" {
>   match if substring (option dhcp-client-identifier, 0, 3) = "Internal";
>subnet netmask {
>         pool {
>                 option netbios-node-type 8;
>                 ddns-updates on;
>                 range;
>                 option subnet-mask;
>                 option routers;
>                 allow members of "Internal";
>               deny unknown-clients;
>               authoritative;
>         }

Try this, though as Glenn points out, you may find you need to start 
at character 1 instead of 0.

class "Internal" {
   match if substring (option dhcp-client-identifier, 0, 8) = "Internal";
subnet netmask {
   option netbios-node-type 8;
   ddns-updates on;
   option subnet-mask;
   option routers;
   pool {
     allow members of "Internal";

Glenn wrote:

>The substring operator is described in the dhcp-eval man page. The 0,3
>describe the offset and length, so a substring of length 3 can never
>equal "Internal". You probably want to just drop the whole substring bit
>and use something like this:
>#192.168.40.X Network
>class "Internal" {
>   match if option dhcp-client-identifier = "Internal";

No, that WILL NOT WORK. If the clients give "Internal" as their 
client ID then they will all get the same IP address.


More information about the dhcp-users mailing list