[Kea-users] able to DROP both Windows 8.x and Windows 7 clients?

Darren Ankney darren.ankney at gmail.com
Wed Sep 6 10:19:10 UTC 2023


HI,

I'm glad it worked for you!

Thank you,

Darren Ankney

On Tue, Sep 5, 2023 at 10:42 PM wildgrass <wildgrass at gmail.com> wrote:
>
> Thanks very much Darren.
> You were right on. I was having trouble with the syntax of the "or" in
> the test condition - where and whether to use double-quotes and
> brackets.
>
> If it were possible I would buy you several cups of coffee :)
>
> Regards,
> wildgrass
> > ------------------------------
> >
> > Message: 5
> > Date: Tue, 5 Sep 2023 07:04:17 -0400
> > From: Darren Ankney <darren.ankney at gmail.com>
> > To: kea-users at lists.isc.org
> > Subject: Re: [Kea-users] able to DROP both Windows 8.x and Windows 7
> >         clients?
> > Message-ID:
> >         <CAKabWHhiLm35tDX_i93RPrzamjiq8TzCNFhKB9bd-AnoEygjEw at mail.gmail.com>
> > Content-Type: text/plain; charset="UTF-8"
> >
> > Hi,
> >
> > You can combine the substring in the test line using an "or" to match
> > both cases simultaneously:
> >
> > {
> >     "Dhcp4": {
> >         "interfaces-config": {
> >             "interfaces": [
> >                 "ens256"
> >             ]
> >         },
> >         "lease-database": {
> >             "type": "memfile",
> >             "persist": false
> >         },
> >         "client-classes": [
> >             {
> >                 "name": "DROP",
> >                 "comment": "Windows7-8",
> >                 "test": "substring(option[55].hex,0,12) ==
> > 0x010f03062c2e2f1f2179f92b or substring(option[55].hex,0,13) ==
> > 0x010f03062c2e2f1f2179f9fc2b"
> >             }
> >         ],
> >         "calculate-tee-times": true,
> >         "loggers": [
> >             {
> >                 "name": "kea-dhcp4",
> >                 "severity": "INFO",
> >                 "output_options": [
> >                     {
> >                         "output": "stdout"
> >                     }
> >                 ]
> >             }
> >         ]
> >     }
> > }
> >
> > Thank you,
> >
> > Darren Ankney
> >
> > On Tue, Sep 5, 2023 at 6:23?AM wildgrass <wildgrass at gmail.com> wrote:
> > >
> > > Dear all,
> > >
> > > I'm using kea 2.5.
> > >
> > > Showing config snippets for brevity. If I have just one DROP class
> > > definition with one test condition it works fine.
> > >
> > > My aim : to DROP both Windows 8.x and Windows 7 clients
> > >
> > > Tried the following with no joy. Can anyone tell me if my aim is
> > > achievable in kea 2.5 and if so, what am I missing. I searched through
> > > the ARM but have no luck finding something that has been helpful so
> > > far.
> > >
> > >
> > >     "client-classes": [
> > >       {
> > >         "name": "DROP",
> > >         "comment": "Windows7".
> > >         "test": "substring(option[55].hex,0,12) == 0x010f03062c2e2f1f2179f92b"
> > >       },
> > >       {
> > >         "name": "DROP",
> > >         "comment": "Windows8",
> > >         "test": "substring(option[55].hex,0,13) == 0x010f03062c2e2f1f2179f9fc2b"
> > >       },
> > >
> > > Error messsage:
> > > Can't add class: Client Class: DROP has already been defined
> > > (/etc/kea/kea-dhcp4.conf:9:7)
> > >
> > > -------------------------------------------------------
> > >
> > >       {
> > >         "name": "DROP",
> > >         "comment": "Windows7and8",
> > >         "test": "substring(option[55].hex,0,12) ==
> > > 0x010f03062c2e2f1f2179f92b" or "substring(option[55].hex,0,13) ==
> > > 0x010f03062c2e2f1f2179f9fc2b"
> > >       },
> > >
> > > Error message:
> > > Error using file '/etc/kea/kea-dhcp4.conf':
> > > /etc/kea/kea-dhcp4.conf:7.80: Invalid character: o
> > >
> > > -------------------------------------------------------
> > >
> > >       {
> > >         "name": "DROP",
> > >         "comment": "Windows7and8",
> > >         "test": ("substring(option[55].hex,0,12) ==
> > > 0x010f03062c2e2f1f2179f92b" or "substring(option[55].hex,0,13) ==
> > > 0x010f03062c2e2f1f2179f9fc2b")
> > >       },
> > >
> > > Error message:
> > > Error using file '/etc/kea/kea-dhcp4.conf':
> > > /etc/kea/kea-dhcp4.conf:7.17: Invalid character: (
> > > --
> > > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> > >
> > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> > >
> > > Kea-users mailing list
> > > Kea-users at lists.isc.org
> > > https://lists.isc.org/mailman/listinfo/kea-users
> >
> >
> > ------------------------------
> >
> > 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.
> >
> > Kea-users mailing list
> > Kea-users at lists.isc.org
> > https://lists.isc.org/mailman/listinfo/kea-users
> >
> >
> > ------------------------------
> >
> > End of Kea-users Digest, Vol 111, Issue 3
> > *****************************************
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users


More information about the Kea-users mailing list