[Kea-users] DHCP Classes Kea Configuration
Francis Dupont
fdupont at isc.org
Thu Dec 6 08:28:12 UTC 2018
"Jordan Tinsley" writes:
> class "APPLE" {
>
>
>
> match if ( substring (hardware,1,3) = b0:19:c6 ) or
>
> ( substring (hardware,1,3) = d8:a2:5e ) or
>
> ( substring (hardware,1,3) = b8:c7:5d ) or
>
> ( substring (hardware,1,3) = 6c:70:9f ) or
>
> ( substring (hardware,1,3) = 88:1f:a1 );
I assume it is a configuration for DHCPv4.
Either you use the admin/user manual to find corresponding expressions:
- class => "client-classes" list at global scope
- match if => "test" entry
- or => or (binary operator but the parser knows it is associative)
- = => ==
- substring => substring
- hardware => pkt4.mac but Kea does not include the hardware type
- aa:bb:cc => 0xaabbcc
or you add a '}' to close the class definition and give this to the
ISC DHCP to Kea Migration Assistant, with some edits to wrap long lines
and make this message more readable than the raw cut & paste.
{
"Dhcp4": {
"client-classes": [
{
"name": "APPLE",
"test": "((((substring(pkt4.mac,0,3) == 0xb019c6) or
(substring(pkt4.mac,0,3) == 0xd8a25e)) or
(substring(pkt4.mac,0,3) == 0xb8c75d)) or
(substring(pkt4.mac,0,3) == 0x6c709f)) or
(substring(pkt4.mac,0,3) == 0x881fa1)"
}
]
}
}
Regards
Francis Dupont <fdupont at isc.org>
More information about the Kea-users
mailing list