Bit of help / guidance with a dhcpd.conf file

Japhy Bartlett japhy at pearachute.com
Thu Jul 3 20:38:15 UTC 2008


Hi -

I'm still having a bit of trouble, and I'm wondering if I'm not
understanding the subclassing right, or the (option
agent.remote-id,2,6)

Using this .conf file:

###

 class "known" {
    match substring (option agent.remote-id,2,6);
 }
 subclass "known" 00:1b:38:75:a5:ea;
 subclass "known" 00:00:00:00:00:01;
 # repeat for all sub-class matches.
# include "/var/conf/dhcpd.known";


shared-network pearachute.net {

authoritative;
option domain-name "bh.pearachute.net";
option domain-name-servers 216.163.32.51, 216.163.32.52,
207.179.71.27, 207.179.70.27;
default-lease-time 600;
max-lease-time 7200;

#This subnet should be statically assigned IPs, for servers, etc.
#The pool/range is included as a reference for the network topology.

subnet 192.168.0.0 netmask 255.255.255.0 {
#   pool {
#     range 192.168.0.1 192.168.0.255;
#     option broadcast-address 192.168.0.255;
#        }
   }

## known subnet:
subnet 192.168.1.0 netmask 255.255.255.0 {

   option broadcast-address 192.168.1.255;

   pool {
     range 192.168.1.1 192.168.1.255;
     allow members of "known";
        }
   }

## public subnet:
subnet 192.168.2.0 netmask 255.255.255.0 {


   pool {
     range 192.168.2.1 192.168.2.2;
     option broadcast-address 192.168.2.255;
     deny members of "known";
        }
   }

} #end shared network

###

When I connect a laptop with the matching MAC address, I receive the
IP 192.168.2.2.  So - how come it isn't matching?

Earlier, I had posted:

  if ( binary-to-ascii (16,8,":", substring (option agent.remote-id,2,6) )
       = "00:1b:38:75:a5:ea";

from an example I'd found somewhere.  Does option agent.remote-id,2,6
return the MAC in binary form?  Trying to use the binary-to-ascii
snippet doesn't work either.

Here is the log of dhclient, from the laptop's perspective:

###
$ sudo dhclient eth0
There is already a pid file /var/run/dhclient.pid with pid 0
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:1b:38:75:a5:ea
Sending on   LPF/eth0/00:1b:38:75:a5:ea
Sending on   Socket/fallback
DHCPREQUEST of 192.168.0.100 on eth0 to 255.255.255.255 port 67
DHCPREQUEST of 192.168.0.100 on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPOFFER of 192.168.2.2 from 192.168.0.0
DHCPREQUEST of 192.168.2.2 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.2.2 from 192.168.0.0
bound to 192.168.2.2 -- renewal in 298 seconds.
###

I'm a bit stuck - is there any way to debug what the dhcpd is seeing
the MAC as?  Why it's not matching?  Or have I made some elementary
mistake elsewhere in the file?

Thanks for any advice,

- Japhy


More information about the dhcp-users mailing list