Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Struggling with classes not work (Mark Mc Nicholas)
   2. Re: Struggling with classes not work (Simon Hobson)


----------------------------------------------------------------------

Message: 1
Date: Mon, 4 Jan 2021 22:59:41 +0000
From: Mark Mc Nicholas <mark...@section9.ie>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Struggling with classes not work
Message-ID:
        <CA+huvoo8Fm28nDG7jmbRohxOOi0tvQhF9G62-uhFPgdZ8=a...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

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@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-0001.htm>

------------------------------

Message: 2
Date: Tue, 5 Jan 2021 11:49:29 +0000
From: Simon Hobson <dh...@thehobsons.co.uk>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: Struggling with classes not work
Message-ID: <f7abd615-8b10-4f61-83b4-fd6135b7a...@thehobsons.co.uk>
Content-Type: text/plain; charset=us-ascii

Mark Mc Nicholas <mark...@section9.ie> wrote:

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

Is it "option vendor-class-identifier" or just "vendor-class-identifier" ?
I'm a bit rusty, and TBH never really used classes much anyway, but I vaguely 
recall that "option vendor-class-identifier" would be the option value set by 
the server, while "vendor-class-identifier" would match the field in the 
incoming packet.

Simon



------------------------------

Subject: Digest Footer

_______________________________________________
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

End of dhcp-users Digest, Vol 147, Issue 2
******************************************

Reply via email to