[Kea-users] Subclass and include files

Sten Carlsen stenc at s-carlsen.dk
Wed Oct 18 01:26:42 UTC 2017


Thanks,


On 17-10-2017 23.39, Tomek Mrugalski wrote:
> On 17/10/2017 19:58, Sten Carlsen wrote:
>> I use subclass for keeping a list of devices that are allowed to be
>> given an address and depending on the class they match, they will be
>> given a gateway or not (I want some devices to NOT be able to
>> communicate to the Internet). Devices that do not belong to any class
>> are given an address in a different subnet with no routing to the
>> general network.
> You should look at host reservations. You can define host reservations
> that consist of a mac address and a class name. Kea will pick the
> reservation and then assign the device to a class (or classes).
>
> You can then specify a class and routers option for it. Just don't
> specify any expression for it. The only way for a client to be
> assigned to that class would be through matching host reservation.
This looks right for my needs, in the present dhcpd I can reserve a pool
for unknown hosts and be sure my classified hosts do not end up in this.
How do the equivalent of allow/deny work in Kea? Is there a similar way
to reserve a pool for "unknown hosts?
>
>> I don't find an equivalent to this in Kea, so how would be the best
>> way to translate my subclass statements to "something" in Kea?
> There's no specific equivalent of subclasses. Years ago I was told
> that subsclasses were developed as a workaround for the class
> limitations. Kea's implementation of classes is in principle more
> flexible (e.g. there are no limits to how many classes a packet could
> belong), so it's unlikely that subclasses would ever be implemented.
Ok, I found them convenient. Other constructs could be just as convenient.
>
>> Today I use a separate file for defining all the subclass members and
>> include that in the main configuration file, so I only edit that file
>> when a new device is added. Can a file be included into the main
>> configuration in Kea?
> Sure, you can do that. Put host reservations in separate file and
> include it, as Jason suggested.
Perfect for starters.
>
>> At some day in the future I expect to use a MySql database as the
>> main storage, but not right now. The future also brings ipV6
>> configuration.
> This will scale up nicely once you start using MySQL (or Postgres) as
> you can keep host reservations in those DBs.
Would also make management easy to implement via a web interface.

Thanks again, very helpful.
>
> Tomek
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

"MALE BOVINE MANURE!!!" 




More information about the Kea-users mailing list