<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Yes, I grab the Circuit ID with relay4[1].hex like this:<div class=""><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>"library": "/usr/local/lib/kea/hooks/libdhcp_flex_id.so",</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>"parameters": {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>"identifier-expression": "relay4[1].hex"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>"replace-client-id": true</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> }</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">- Allan</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div><blockquote type="cite" class=""><div class="">On Dec 15, 2021, at 8:17 AM, Weisteen Per <<a href="mailto:per.weisteen@telenor.no" class="">per.weisteen@telenor.no</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I believe ISC has released the flex hook for KEA 2.0 in the standard package. At least the flex library is part of the installation under /usr/lib64/kea/hooks/<br class=""><br class="">And defining the library seems to give no error messages.<br class=""><br class=""> "library": "/usr/lib64/kea/hooks/libdhcp_flex_option.so",<br class=""> "parameters": {<br class=""> "identifier-expression": "relay4[2].hex"<br class=""> }<br class=""><br class="">Do I need to define circuit-id here under parameters?<br class=""><br class="">My challenge is also how to use circuit-id identifier correctly in a test under client-classes.<br class=""><br class=""><br class="">./PerW<br class=""><br class=""><br class="">-----Original Message-----<br class="">From: Allan M33 Access <<a href="mailto:allan@m33access.com" class="">allan@m33access.com</a>> <br class="">Sent: onsdag 15. desember 2021 12:47<br class="">To: Weisteen Per <<a href="mailto:per.weisteen@telenor.no" class="">per.weisteen@telenor.no</a>><br class="">Cc: <a href="mailto:kea-users@lists.isc.org" class="">kea-users@lists.isc.org</a><br class="">Subject: Re: [Kea-users] Selecting subnet based on circuit-id (OPEN)<br class=""><br class="">The flexible identifier hook for kea will allow you to use the dhcp option 82 sub option 1 as an identifier for leases. The flex hook is part of the premium hook packages though, purchasable on Isc’s website. The package also comes with the legal logging hook. <br class=""><br class="">My setup has the same concept, for my VLANs I set them up as individual interfaces on my box, then I define those interfaces for each subnet in the configuration. I use the flex it to use the circuit id as an identifier with “replace-client-id”: true<br class=""><br class="">Even though the circuit id does have the VLAN in it, I choose subnets by the interface the packet comes in on instead.<br class=""><br class="">-Allan<br class=""><br class=""><blockquote type="cite" class="">On Dec 15, 2021, at 5:12 AM, Weisteen Per <<a href="mailto:per.weisteen@telenor.no" class="">per.weisteen@telenor.no</a>> wrote:<br class=""><br class="">Hi<br class=""><br class="">I've just set up KEA 2.0 on a RHEL 8 box using RedHat Repository setup as instructed at <a href="http://cloudsmith.io" class="">cloudsmith.io</a>. <br class="">Seems that the packages available for me now is kea.x86_64, kea-devel.x86_64, kea-hooks.x86_64 and kea-libs.x86_64 all of which I have installed.<br class=""><br class="">Seems though I'm missing some libraries mentioned in the kea-dhcp4.conf file like libdhcp_legal_log.so and control-agent-commands.so but I assume they're not critical.<br class=""><br class="">What I initially need is to be able to select beween subnets based on which VLAN/VPN the request comes from. My network guys has set up several Cisco routers which will assign clients to one specific VLAN/VPN if the client manages to authenticate using 802.1x and to another if the authentication fails. Am I correct to believe that Cisco router will supply me with information on which VLAN/VPN a client was assigned to using circuit-id? Is this a parameter already predefined in KEA or do I have to define it somewhere?<br class=""><br class="">Thanks,<br class=""><br class=""><br class="">./PerW<br class=""><br class=""><br class="">_______________________________________________<br class="">ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" class="">https://www.isc.org/contact/</a> for more information.<br class=""><br class="">To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" class="">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br class=""><br class="">Kea-users mailing list<br class=""><a href="mailto:Kea-users@lists.isc.org" class="">Kea-users@lists.isc.org</a><br class="">https://lists.isc.org/mailman/listinfo/kea-users<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></div></body></html>