Subnet parameters should be overridable per-host
name: Per-host subnet overrides
about: It's occasionally useful to drop an option on a one-off basis in a group
Initial Questions
If you have a configuration like:
authoritative;
log-facility daemon;
default-lease-time 3600;
max-lease-time 86400;
option domain-name "example.com";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.128 192.168.1.254;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
default-lease-time 43200;
max-lease-time 43200;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
option ntp-servers 192.168.1.40;
}
...
# and a bunch of static allocations in as "host" reservations
host switch {
hardware ethernet 00:01:02:03:04:05;
fixed-address 192.168.1.2;
option host-name "switch";
}
...
# and an alarm system that should never have a default-route
host alarm {
hardware ethernet 00:01:02:0a:0b:0c;
fixed-address 192.168.1.8;
option host-name "alarm";
option routers none;
}
In this case, it's easier to default all of the hosts as getting a default-route, except for one where that isn't the case and call that out explicitly.
In the special case of IPv4 routers, you can set it to "0.0.0.0" and an ISC-DHCP client will reject this value, but the same is not true of many other DHCP clients, including the built-in one in NetworkManager, and indeed this should be handled server-side anyway ("Be conservative in what you send...").
Prior Discussion
This has been brought up on the #isc-dhcp
IRC channel as well as the dhcp-workers
mailing list.
Limitations/Genesis
If I have a subnet with 250 hosts, 249 of which should receive a default route, and 1 of which shouldn't, I shouldn't have to write 250 host
definitions... and if I'm using dynamic allocations, this isn't even possible. Configuration should be powerful, simple, and easy.
Desired Solution Be able to override subnet defaults on a per-host basis.
Alternatives There really aren't any. Even if I were to use classes as a shorthand, I'd still need to default all hosts on my network.
Additional context None
Funding its development See below.
Participating in development I'd be willing to drive the development of this feature and do most of it myself, but I might need some guidance navigating the code base as I'm not well-versed in it.
Contacting you
Comments on this issue, or as philipp@redfish-solutions.com
via email, or as philipp64
on IRC (freenode.org
).