Looking for "class" how-to

Glenn Satchell Glenn.Satchell at uniq.com.au
Wed Sep 16 02:40:13 UTC 2009

Hi Peter

Don't know of a tutorial or howto, but I can give you an example and an
explanation from my current dhcpd.conf.

The key to a class is how you match a client to become a member of that
class. The syntax of "if" is defined in the dhcp-eval man page. You can
use any combination of numerical, string and options in the if
statement. The options, such as vendor-class-identifier, mentioned
below, are described in the dhcp-options man page.

There are two ways classes are used:

1. To define settings you want to be valid for members of that class.
So this allows you to set different things, like lease times, dns
servers or others. In the example below I am setting specific
information for clients that are using PXE boot prior to installation.

2. Allow or deny access to a pool where IP address ranges, and other
subnet type info is required (or not as the case may be).

class "PXE" {
  match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
  next-server drill.uniq.com.au;
  filename "pxegrub.I86PC.Solaris_10-1";
  # 10 minutes should be long enough for PXE
  max-lease-time 600;

  # don't use multicast tftp option
  vendor-option-space PXE;
  option PXE.mtftp-ip;

subnet ... {
  pool {
    allow members of "PXE";

If you have some more questions, please feel free to post followups
to the list. Also searching the list archives should turn up lots
of other examples.

Glenn Satchell   mailto:glenn.satchell at uniq.com.au | Miss 9: What do you
Uniq Advances Pty Ltd       http://www.uniq.com.au | do at work Dad?
PO Box 70 Paddington NSW Australia 2021            | Miss 6: He just
tel:0409-458-580     fax:02-9380-6416              | types random stuff.

>Date: Tue, 15 Sep 2009 15:19:39 -0500
>From: Peter Laws <plaws at ou.edu>
>To: Users of ISC DHCP <dhcp-users at lists.isc.org>
>Subject: Looking for "class" how-to
>X-BeenThere: dhcp-users at lists.isc.org
>Need to write a class, have no idea how to do it.  Yes, I have man pages. 
>No, I don't find them helpful.
>Anyone got a link to a tutorial?
>Peter Laws / N5UWY
>National Weather Center / Network Operations Center
>University of Oklahoma Information Technology
>plaws at ou.edu
>Feedback? Contact my director, Craig Cochell, craigc at ou.edu. Thank you!
>dhcp-users mailing list
>dhcp-users at lists.isc.org

More information about the dhcp-users mailing list