<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">
<div dir="auto">Hi!
<div dir="auto"><br>
</div>
<div dir="auto">All of them seem to have quite a few cons and the configuration files can already be quite large. But A looks like the better option at first glance but the others aren't too bad either so it's difficult to tell.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Being able to reference subnets or even common configuration options would make it less complicated. Defining all subnets in a common pool of subnets with user specified names would be a nice fit for any kind of organization.</div>
<div dir="auto"><br>
</div>
<div dir="auto">JSON doesn't support anything out of the ordinary. You could look at YAML as an alternative to JSON since it supports everything JSON supports but YAML also allows you to use anchors and references which are only visible to the user and the
interpreter but the result would be just as if things were copied and pasted.</div>
<div dir="auto"><br>
</div>
<div dir="auto">So would would YAML be a viable alternative configuration file format? Allow the user to use either format and if they want a more complex setup then they could utilize the strengths of YAML. A YAML processing tool would see references which
is why I propose this. It would avoid some Kea-specific concepts and stick to a format that supports referencing out of the box.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Best regards,</div>
<div dir="auto">Tobias D</div>
</div>
<div><br>
<div>Den 31 aug. 2017 3:33 em skrev Marcin Siodelski <marcin@isc.org>:<br>
<blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><font size="2"><span style="font-size:10pt">
<div>Hello Kea Users,<br>
<br>
We are currently working on implementation of a "shared networks"<br>
mechanism in Kea, to provide ability for grouping multiple subnets<br>
belonging to the same link.<br>
<br>
This is useful to extend address pools for clients on the same physical<br>
link, i.e. clients located on this link may get addresses from different<br>
subnets. In such case, the DHCP server would allocate addresses from<br>
another subnet (and its pools) if there are no more addresses available<br>
in the first subnet.<br>
<br>
It is also useful in cable networks, when a cable modem and a router are<br>
on the same physical link but they should get addresses from different<br>
subnets. Client classification is used in such case.<br>
<br>
The ISC engineering team has been working on a design for this feature.<br>
One of the contentious points is how to organize shared networks<br>
configuration within the Kea config file.<br>
<br>
We have discussed three different options. Let's call them A, B, C,<br>
which are briefly discussed below. The ISC engineering team is leaning<br>
towards A, but we'd also like to get some input from our Users what they<br>
think might be more convenient.<br>
<br>
Proposal A<br>
<br>
Sample configuration link:<br>
<a href="http://kea.isc.org/wiki/SharedSubnetsDesign#ConfigurationFormat">http://kea.isc.org/wiki/SharedSubnetsDesign#ConfigurationFormat</a><br>
<br>
In this case, the shared-networks list contains a full specification of<br>
each subnet that belongs to shared networks. It is still possible to<br>
define subnets outside of the shared-networks scope. Such subnets will<br>
not be associated with any shared network.<br>
<br>
Pros:<br>
- Make use of hierarchical nature of JSON - subnets enclosed within<br>
shared-networks structure belong to shared-networks. Other subnets do<br>
not. No need to refer to subnets from another structure by name or id etc.<br>
- Avoid configuration error whereby a single subnet may belong to<br>
different shared networks.<br>
- Avoid configuration error caused by manual matching of subnets with<br>
networks.<br>
- Is compatible with autogenerated subnet identifiers.<br>
- JSON viewing tools can be used to visualize which subnets belong to<br>
shared network by simply looking at the JSON hierarchy.<br>
- Is similar to other configuration structures we use (except option<br>
definitions).<br>
- Is similar to how it is organized in ISC DHCP.<br>
<br>
Cons:<br>
- Moving subnets between shared networks requires copy pasting large<br>
portions of configuration (entire subnet specification has to be<br>
copied), possibly between distant locations in the configuration file.<br>
- Makes it hard to see how many subnets are specified within a shared<br>
network without JSON processing tools that can hide portions of the<br>
configuration.<br>
<br>
<br>
Proposal B<br>
Sample configuration link:<br>
<a href="http://kea.isc.org/wiki/SharedSubnetsDesign#Alternative1">http://kea.isc.org/wiki/SharedSubnetsDesign#Alternative1</a><br>
<br>
This is the first of the proposals in which all subnets are defined at<br>
the same configuration level (regardless if they belong to shared<br>
networks or not). The shared-networks structure is separate and for each<br>
network it refers to subnet ids that belong to the shared network.<br>
<br>
Pros:<br>
- shared-networks structure is much smaller because it only contains<br>
subnet identifiers, rather than full subnet definitions. It may also<br>
contain DHCP options etc.<br>
- It makes it easier to move subnets between shared networks (or remove<br>
them entirely) because it is just a matter of copy pasting subnet ids,<br>
rather than full network specifications.<br>
<br>
Cons:<br>
- User error prone: subnet ids specified within shared-networks must<br>
exist. It is easy to specify id of non-existing subnet or id of a wrong<br>
subnet.<br>
- User error prone: it is possible to specify the same id in two<br>
different networks which is not allowed<br>
- If there are many subnets, specifying a subnet and associating it with<br>
a shared network means update to the config file in two different<br>
(possibly distant) locations.<br>
- Removal of a subnet belonging to a shared network requires config<br>
update in two different locations.<br>
- Is incompatible with autogenerated subnet identifiers because these<br>
identifiers may vary between server configurations, e.g. when any subnet<br>
is removed.<br>
- Generic JSON tools can't do matching between subnets and shared<br>
networks because they can't interpret subnet ids as a reference.<br>
<br>
<br>
Proposal C<br>
Sample configuration link:<br>
<a href="http://kea.isc.org/wiki/SharedSubnetsDesign#Alternative2">http://kea.isc.org/wiki/SharedSubnetsDesign#Alternative2</a><br>
<br>
Pros:<br>
- Has the same pros as proposal B<br>
- It avoids the use of subnet ids, but uses shared network names (subnet<br>
ids autogeneration problem is solved)<br>
- Resolves a problem with proposal B, whereby it was possible to assign<br>
a single subnet to multiple networks.<br>
- Removal of a subnet is easier than in B, because it is enough to<br>
delete subnet declaration.<br>
<br>
Cons:<br>
- Comparing to B, it makes it harder to know how many subnets belong to<br>
shared network, because we'd need to search for all subnets that have a<br>
parameter "network" set to a given name.<br>
- Some other unresolved cons from proposal B.<br>
<br>
<br>
We're planning to close the discussion around Monday/Tuesday next week.<br>
We'd appreciate any input before that time.<br>
<br>
Kind Regards,<br>
<br>
Marcin Siodelski<br>
ISC Engineering Team<br>
_______________________________________________<br>
Kea-users mailing list<br>
Kea-users@lists.isc.org<br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</div>
</span></font></div>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>