One detail: ISC DHCP and Kea expressions do not count the relay in the same way (client -> server or server -> client) so a priori you can't translate ISC DHCP to Kea because it may be more than one relay. I open a ticket to fix this, i.e., to use negative relay index for the ISC DHCP order as the Kea C++ code in fact as both. So if you think it is critical for you please try to convince Tomek to add this ticket in a not too far release...
Regards Francis Dupont <[email protected]> Tomek Mrugalski writes: > W dniu 05.06.2017 o 10:59, Christian Kratzer pisze: > > Hi, > > > > we currently use following in isc dhcp 4.3.5 to assign static prefixes > > to customers via dhcpv6 option 18 interface-id: > > > > host lineid-12345-prefix6 { > > host-identifier v6relopt 1 dhcp6.interface-id "Kneid-12345"; > > fixed-prefix6 2001:db:1200:0300::/56; > > } > > > > I cannot find from the documentation how above could be translated to kea. > > > > We can have upto 3 interface-id relay options inserted via the various > > ldra agents between the customer cpe and the dhcp server. > > > > The interesting option is the one nearest to the client which is added > > by the ldra agent on the l2 access switch at the edge of our network. > > Our cisco l3 relay agents also add an interface-id option at an outer > > level but that is of no use to identifiy a single customer. > > > > We use the v6relopt function new in ISC dhcp 4.3.5 to match the relay > > options nearest to the client. > > > > Is above possible in current KEA or would we have to resort to hooks to > > implement this ? > This should be possible with flexible Identifier hook. You would need to > do the following: > > 1. load flex-id hook and pecify what you want to use as a host identifier: > > "hooks-libraries": [ > { > "library": "libdhcp_flex_id.so", > "parameters": { > "identifier-expression": "relay6[2].option[18].hex" > } > } > ] > > The identifier expression defines what you want to use to identify a > host. This particular example means: look at the options inserted by the > third relay (0 is the first one, 1 is the second, 2 is third), counting > from the server side. From those options, take option 18 (interface-id) > and use it as binary (hex). > > 2. Then you'd have something like this to mimic your example: > > "reservations": [ > { > "flex-id": "'Kneid-12345'", > "prefixes": [ "2001:db:1200:0300::/56" ] > } > ] > > 3. Finally, you need to tell Kea to use flex-id as identifiers for > incoming packets. This should do the trick: > > "host-reservation-identifiers": [ "duid", "hw-address", "flex-id" ] > > Flex-id is described in User's Guide, section 14.3.3, but also there's a > nice short doc about it here: isc.org/kea. > > Hope that helps, > Tomek Mrugalski > ISC > _______________________________________________ > Kea-users mailing list > [email protected] > https://lists.isc.org/mailman/listinfo/kea-users > _______________________________________________ Kea-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/kea-users
