Need help setting up a scope using the oui of network cards

Simon Hobson dhcp1 at
Wed Feb 20 19:24:09 UTC 2008

chrisfritz at wrote:

>Thanks in advance for any advice or assistance.  I need help trying 
>to set up a scope to give out addresses according to the oui of the 
>mac address vendor.  I researched the man pages and came accross 
>vendor encapsulation and sub classes but not sure if I am on the 
>right track.  Any help is greatly appreciated.  Thanks.

Try 'man dhcpd.conf', look for the section on classes and subclasses. 
That deals with setting up of classes (and subclasses) but based on 
MAC address.

Now, 'man dhcpd-eval' will tell you how to get a substring.

So what you will end up with, in it simplest form, is something like :

class "some-vendor" {
   match if substring(hardware,0,4)=1:aa:bb:cc);


subnet ....
   pool {
     allow members of "some-vendor" ;

You'll have to check the syntax for that lot.

You can also do subclasses in much the same way, simply replace 
"hardware" in the example with "substring(hardware,0,4)" - and 
probably drop the "pick first value" stuff.

So you'd end up with :

        class "allocation-class-1" {
          match substring(hardware,0,4);

        subclass "allocation-class-1" 1:8:0:2b;
        subclass "allocation-class-1" 1:0:0:c4;

More information about the dhcp-users mailing list