Struggling with classes not work

Mark Mc Nicholas markmcn at section9.ie
Mon Jan 4 22:59:41 UTC 2021


Hi All,
Apologies if this is an obvious one but I'm new to using classes with
isc-dhcpd.
I'm trying to set up a class to match some dev boards I am working with.
I'm trying to match on the "vendor-class-identifier" option but it's either
not working or it's not working as I expected.
I've created a lab setup with a RaspberryPi as my server for the testing,
For the test setup I'm calling dhcpd from the cli directly and keeping it
in the foreground so I can see the output and this makes restarting it
quick for this job.
The dev boards use bootp for their boot process the only option I need to
set for them is the next-server.
So I created a class as you can see below which matches on the
vendor-class-identifier which I've confirmed is being sent.
But the board never gets the next-server from the class and I never see the
log line on the console.
If I please the next server and log line in the subnet it works as
expected.
Looking in the lease file I see the vendor-class-identifier is set as
expected by the board.
I've had to scrub the mac address of the board so it's just replaced with a
placeholder.
Can anyone please advise am I missing something or is my understanding of
classes incorrect (This is very possible)
Thanks for your time
Cheers
Mark


# dhcpd --version
isc-dhcpd-4.4.1


*dhcpd.conf*
option domain-name "example.org";
option domain-name-servers 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
allow booting;
allow bootp;
ddns-update-style none;
authoritative;
subnet 192.168.20.0 netmask 255.255.255.0 {
  range dynamic-bootp 192.168.20.100 192.168.20.150;
  option domain-name-servers 198.18.198.18;
  option domain-name "blah.domain.ie.";
  option routers 192.168.20.1;
  default-lease-time 300;
  max-lease-time 300;
}

class "Devboot"{
        match if option vendor-class-identifier = "Mips_boot";
        next-server 192.168.20.10;
        log (info,"Devboot");
}


*Console Output*

root at server:/etc/dhcp# dhcpd -4 -f -d -cf /etc/dhcp/dhcpd.conf eth0
Internet Systems Consortium DHCP Server 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
Wrote 0 class decls to leases file.
Wrote 0 leases to leases file.
Listening on LPF/eth0/dc:a6:32:5a:2c:24/192.168.20.0/24
Sending on   LPF/eth0/dc:a6:32:5a:2c:24/192.168.20.0/24
Sending on   Socket/fallback/fallback-net
Server starting service.

BOOTREQUEST from AA:BB:CC:DD:EE:FF via eth0
BOOTREPLY on 192.168.20.100 to AA:BB:CC:DD:EE:FF via eth0


*dhcpd.leases*
lease 192.168.20.100 {
  starts 1 2021/01/04 22:35:33;
  ends never;
  cltt 1 2021/01/04 22:35:33;
  binding state active;
  next binding state free;
  rewind binding state free;
  dynamic-bootp;
  hardware ethernet AA:BB:CC:DD:EE:FF;
  set vendor-class-identifier = "Mips_boot";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20210104/35ba1730/attachment.htm>


More information about the dhcp-users mailing list