1

I've been trying to get mac addresses with a certain OUI into a certain address pool. I haven't been able to get it to work at all. Here is a snippet of my dhcpd.conf and how it's applied.

class "testphones" {
        match hardware;
}
subclass "testphones" 1:00:07:3b:cb:c9:cf; 

class "avaya-9630" {
   match if substring(hardware,1,3) = "00:07:3b"; 
}

subnet 172.18.16.0 netmask 255.255.248.000 {
    option subnet-mask 255.255.248.000;
    option broadcast-address 172.18.23.255;
    option routers  172.18.16.1;
    option avaya-242 "OPTIONS"

    pool {
        range  172.18.18.1  172.18.23.254;
        deny members of "testphones";
        deny members of "avaya-9630";
    }

}

subnet 10.X.128.0 netmask 255.255.248.000 {
    option subnet-mask 255.255.248.000;
    option broadcast-address 10.X.135.255;
    option routers  10.X.128.5;
    option avaya-242 "OPTIONS";
    pool {
            range  10.X.129.1  10.X.134.255;
            allow members of "testphones";
            allow members of "avaya-9630";
    }
}

I don't get any of the mac addresses to match the "avaya-9630" class. They all get handed IPs from the first (172.18.16.0/21) subnet. The "testphone" does work, though. It goes into the 10.X subnet.

Why does the "testphone" class work but not the "avaya-9630" class?

One thing that might cause a problem is I'm using a petty old version of ISC DHCP (3.0.1). I don't know if the syntax is different for that older version. The man pages seem to indicate I'm doing it right.

I've tried various iterations of the "match" line. I tested with the following:

match if substring(hardware,1,3) = "1:00:07:3b";
match if substring(hardware,0,3) = "1:00:07:3b";
match if substring(hardware,1,4) = "1:00:07:3b";

None worked.

Your thoughts are appreciated.

1 Answer 1

-1

It works without the quotation mark. For example, in this case:

match if substring(hardware,1,3) = 00:07:3b;

This way, it works in my production environment.

2
  • 4
    Please give a working example of what you mean.
    – Sven
    Apr 12, 2018 at 11:37
  • Sure. Example added.
    – Zsombor
    Apr 13, 2018 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.