LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Help Needed: ISC DHCPD MAC address matching classes confusion (https://www.linuxquestions.org/questions/linux-networking-3/help-needed-isc-dhcpd-mac-address-matching-classes-confusion-4175517633/)

filius_deus 09-06-2014 06:24 PM

Help Needed: ISC DHCPD MAC address matching classes confusion
 
'm having trouble successfully matching a mix of different mac address classes to their appropriate subnet declarations. These classes are meant to differentiate IP phones, kvm guests and desktops from each other. So far only the IP Phones (grandstream class) correctly. The pcs class is a mix of different kinds of mac addresses but they all fall into the same (wrong category). I'm wondering if anyone can review my configuration, and set me straight what I am doing improperly?

class "grandstream" {
match if (substring(hardware, 1, 3) = 00:0b:82);
}
class "vms" {
match if (substring(hardware, 1, 3) = 52:54:00);
}

class "pcs" {
#match if not
#(substring(hardware, 1, 3) = 00:0b:82);
match if (binary-to-ascii (16,8,":",substring(hardware, 1, 3)) = "24:BE:05")
or (binary-to-ascii (16,8,":",substring(hardware, 1, 3)) = "00:1C:C0")
or (binary-to-ascii (16,8,":",substring(hardware, 1, 3)) = "A4:BA:DB")
or (binary-to-ascii (16,8,":",substring(hardware, 1, 3)) = "02:80:FD")
or (binary-to-ascii (16,8,":",substring(hardware, 1, 3)) = "5C:F8:A1");
log (debug, (binary-to-ascii (16,8,":",substring(hardware, 1, 3))));
}

#shared-network we-we {
subnet 192.168.1.0 netmask 255.255.255.0 {
pool {
range 192.168.1.10 192.168.1.210;
deny members of "grandstream";
allow members of "pcs";
allow members of "vms";
}
# Subnet for management network
subnet 192.168.10.0 netmask 255.255.255.0 {
pool {
deny members of "grandstream";
deny members of "pcs";
range 192.168.10.200 192.168.10.253;
}
# Subnet for future lan network
subnet 192.168.20.0 netmask 255.255.255.0 {
pool{
deny members of "grandstream";
deny members of "pcs";
range 192.168.20.10 192.168.20.210;
}
# Subnet for future servers network
subnet 192.168.30.0 netmask 255.255.255.0 {
pool {
deny members of "grandstream";
deny members of "pcs";
range 192.168.30.200 192.168.30.253;
}
# Subnet for future phone network
subnet 192.168.40.0 netmask 255.255.255.0 {
pool {
allow members of "grandstream";
deny members of "pcs";
range 192.168.40.200 192.168.40.240;
}
# Subnet for future wifi-guests network
subnet 1


All times are GMT -5. The time now is 07:33 AM.