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. Re: Struggling with classes not work (Mark Mc Nicholas) 2. Re: Struggling with classes not work (Simon Hobson) 3. Re: Struggling with classes not work (Thomas Markwalder) 4. Re: Struggling with classes not work (Mark Mc Nicholas) 5. Re: Struggling with classes not work (Thomas Markwalder) ---------------------------------------------------------------------- Message: 1 Date: Tue, 5 Jan 2021 12:11:37 +0000 From: Mark Mc Nicholas <mark...@section9.ie> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: Struggling with classes not work Message-ID: <CA+huvopfwgF=KdT_unG=qxxscmfv7qp4w-tu5fzfgzogj2u...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hey Simon, Thanks for the suggestion, I've just tried a very quick check changing the match statement to " match if vendor-class-identifier = "Mips_boot";" however from a very quick glance the result looked the same as the device didn't boot and I saw no log lines "Devboot" on the console. I will do a more detailed check this evening. I still welcome input from other users please Cheers Mark On Tue, Jan 5, 2021 at 11:50 AM Simon Hobson <dh...@thehobsons.co.uk> wrote: > 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 > > _______________________________________________ > 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 > -- Begin at the beginning,and go on till you come to the end: then stop. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20210105/10bc5f7f/attachment-0001.htm> ------------------------------ Message: 2 Date: Tue, 5 Jan 2021 12:22:43 +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: <6870cace-213b-414c-900f-3ab40258e...@thehobsons.co.uk> Content-Type: text/plain; charset=us-ascii Mark Mc Nicholas <mark...@section9.ie> wrote: > > Hey Simon, > Thanks for the suggestion, > I've just tried a very quick check changing the match statement to " match if > vendor-class-identifier = "Mips_boot";" > however from a very quick glance the result looked the same as the device > didn't boot and I saw no log lines "Devboot" on the console. One other thing to check is EXACTLY what the value is that you are testing for - in particular, look at a hex dump of the packet (or a decoded version of it). I've been caught out with things like trailing nulls, so it's 6 bytes of "value"0x00 not five bytes of "value" and the matching in dhcpd is very precise on this - they don't match. Simon ------------------------------ Message: 3 Date: Tue, 5 Jan 2021 07:33:27 -0500 From: Thomas Markwalder <tm...@isc.org> To: dhcp-users@lists.isc.org Subject: Re: Struggling with classes not work Message-ID: <43f578d1-22cf-3ce0-daf6-cd000f9ca...@isc.org> Content-Type: text/plain; charset=utf-8; format=flowed Hi Mark: I suspect Simon's hunch is correct, the vendor identifier may actually be longer than "Mips_boot".? I just tried this configuration snippet and it works fine: class "Mips_boot" { ??? match if (option vendor-class-identifier = "Mips_boot"); ??? next-server 192.168.20.10; ??? log (info,"Devboot"); } subnet 178.16.1.0 netmask 255.255.255.0 { ??? pool { ??????? range 178.16.1.100 178.16.1.125; ??? } } I get the log statement and the client gets next-server.?? If there are additional bytes after "Mips_boot" which you do not care about you can use substr: match if substring (option vendor-class-identifier, 0, 9) = "Mips_boot"; On 1/5/21 7:22 AM, Simon Hobson wrote: > Mark Mc Nicholas <mark...@section9.ie> wrote: >> Hey Simon, >> Thanks for the suggestion, >> I've just tried a very quick check changing the match statement to " match >> if vendor-class-identifier = "Mips_boot";" >> however from a very quick glance the result looked the same as the device >> didn't boot and I saw no log lines "Devboot" on the console. > One other thing to check is EXACTLY what the value is that you are testing > for - in particular, look at a hex dump of the packet (or a decoded version > of it). I've been caught out with things like trailing nulls, so it's 6 bytes > of "value"0x00 not five bytes of "value" and the matching in dhcpd is very > precise on this - they don't match. > > Simon > > > _______________________________________________ > 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 ------------------------------ Message: 4 Date: Tue, 5 Jan 2021 12:47:59 +0000 From: Mark Mc Nicholas <mark...@section9.ie> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: Struggling with classes not work Message-ID: <ca+huvoqeubgr9o+h4z3-4hzjb0aub-tbc61zzmrahswxtpw...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Thomas, Firstly thank you for testing that is a great help to know it's working :) and my expectation of seeing the log line is correct. I've just tried match if substring (option vendor-class-identifier, 0, 9) = "Mips_boot"; and no joy I then tried match if not (substring (option vendor-class-identifier, 0, 9) = "Mips_boot"); which if I'm correct means that all devices should go into this class (Which is fine on a test network) but still it didn't work, I also tried match if not (option vendor-class-identifier = "Mips_boot"); with the same logic of all devices should go here. However neither presented the next server or created the log line. Using wireshark I took a look at the BOOTP request and the vendor-class-identifier length is listed as being 9 the entry in the lease file doesn't show anything other than the Mips_boot statement Cheers Mark On Tue, Jan 5, 2021 at 12:33 PM Thomas Markwalder <tm...@isc.org> wrote: > Hi Mark: > > I suspect Simon's hunch is correct, the vendor identifier may actually > be longer than "Mips_boot". I just tried this configuration snippet and > it works fine: > > > class "Mips_boot" { > match if (option vendor-class-identifier = "Mips_boot"); > next-server 192.168.20.10; > log (info,"Devboot"); > } > > subnet 178.16.1.0 netmask 255.255.255.0 { > pool { > range 178.16.1.100 178.16.1.125; > } > } > > I get the log statement and the client gets next-server. If there are > additional bytes after "Mips_boot" which you do not care about you can > use substr: > > match if substring (option vendor-class-identifier, 0, 9) = "Mips_boot"; > > > > > On 1/5/21 7:22 AM, Simon Hobson wrote: > > Mark Mc Nicholas <mark...@section9.ie> wrote: > >> Hey Simon, > >> Thanks for the suggestion, > >> I've just tried a very quick check changing the match statement to " > match if vendor-class-identifier = "Mips_boot";" > >> however from a very quick glance the result looked the same as the > device didn't boot and I saw no log lines "Devboot" on the console. > > One other thing to check is EXACTLY what the value is that you are > testing for - in particular, look at a hex dump of the packet (or a decoded > version of it). I've been caught out with things like trailing nulls, so > it's 6 bytes of "value"0x00 not five bytes of "value" and the matching in > dhcpd is very precise on this - they don't match. > > > > Simon > > > > > > _______________________________________________ > > 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 > > _______________________________________________ > 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 > -- Begin at the beginning,and go on till you come to the end: then stop. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20210105/dacdebab/attachment-0001.htm> ------------------------------ Message: 5 Date: Tue, 5 Jan 2021 09:08:31 -0500 From: Thomas Markwalder <tm...@isc.org> To: dhcp-users@lists.isc.org Subject: Re: Struggling with classes not work Message-ID: <264ae1bb-7a28-fd0e-c52e-d2e8fe884...@isc.org> Content-Type: text/plain; charset=utf-8; format=flowed Hi: The reason is works for me is that my client is DHCP client.? This my server output: " : Listening on LPF/enp0s10/08:00:27:c7:c6:20/178.16.1.0/24 Sending on?? LPF/enp0s10/08:00:27:c7:c6:20/178.16.1.0/24 Sending on?? Socket/fallback/fallback-net Server starting service. Devboot DHCPDISCOVER from 08:00:27:25:d3:f4 via enp0s10 DHCPOFFER on 178.16.1.100 to 08:00:27:25:d3:f4 via enp0s10 Devboot DHCPREQUEST for 178.16.1.100 (178.16.1.30) from 08:00:27:25:d3:f4 via enp0s10 DHCPACK on 178.16.1.100 to 08:00:27:25:d3:f4 via enp0s10 " Your's appears to be a BOOTP client.? BOOTP packets do not go through classification. ------------------------------ 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 3 ******************************************