[Kea-users] Proper usage of flex_id hook

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Proper usage of flex_id hook

TroYy
Looking for proper way of identifying hosts that showing up with option82

As for now some limitations with library not allowing me to do what I've
planned

Assuming that client's discover contains option 82, suboption 1 contains
vlan, unit and port of the switch. Suboption 2 holds mac of the switch.

As a working test example of my expression

"identifier-expression": "concat(substring(relay4[1].hex,2,2), pkt4.mac)",
identyfies host as vlan+client_mac

My desireable client's identificator should be ideally
(client's_hwaddr)*+*(switch_port)*+*(switch_mac)

Is my understanding correct, that library`s identifier-expression can't
contain three different strings from packet, because only affordable way to
add strings is by using "concat" expression which allows concatenation only
for *two* arguments?

If its true, then only variants, considering that client's mac is a must,
are:
client_mac + switch_mac
client_mac + vlan
client_mac + switch_port
client_mac + vlan,unit,port(bc arguments go in a row)



--
Sent from: http://kea-users.7364.n8.nabble.com/
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Proper usage of flex_id hook

Bob Harold
I have not used Kea yet, but can you just concat twice:
concat(concat(a, b), c)

--
Bob Harold



On Thu, Dec 26, 2019 at 8:45 AM TroYy <[hidden email]> wrote:
Looking for proper way of identifying hosts that showing up with option82

As for now some limitations with library not allowing me to do what I've
planned

Assuming that client's discover contains option 82, suboption 1 contains
vlan, unit and port of the switch. Suboption 2 holds mac of the switch.

As a working test example of my expression

"identifier-expression": "concat(substring(relay4[1].hex,2,2), pkt4.mac)",
identyfies host as vlan+client_mac

My desireable client's identificator should be ideally
(client's_hwaddr)*+*(switch_port)*+*(switch_mac)

Is my understanding correct, that library`s identifier-expression can't
contain three different strings from packet, because only affordable way to
add strings is by using "concat" expression which allows concatenation only
for *two* arguments?

If its true, then only variants, considering that client's mac is a must,
are:
client_mac + switch_mac
client_mac + vlan
client_mac + switch_port
client_mac + vlan,unit,port(bc arguments go in a row)



--
Sent from: http://kea-users.7364.n8.nabble.com/
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users