forked from zentralwerk/network
nixos-module/container/dhcp-server: don't set max-valid-lifetime but hold-reclaimed-time
hope that works without depleting the address pools
This commit is contained in:
parent
dd3d650e46
commit
dbc0e14f63
|
@ -29,6 +29,8 @@ in
|
||||||
# TODO: use with kea >= 2.5.0
|
# TODO: use with kea >= 2.5.0
|
||||||
# ddns-conflict-resolution-mode = "check-exists-with-dhcid";
|
# ddns-conflict-resolution-mode = "check-exists-with-dhcid";
|
||||||
ddns-use-conflict-resolution = false;
|
ddns-use-conflict-resolution = false;
|
||||||
|
expired-leases-processing.hold-reclaimed-time = builtins.foldl' lib.max
|
||||||
|
3600 (concatMapDhcpNets (net: { dhcp, ... }: dhcp.max-time));
|
||||||
|
|
||||||
subnet4 = concatMapDhcpNets (net: { vlan, subnet4, hosts4, dhcp, domainName, ... }: {
|
subnet4 = concatMapDhcpNets (net: { vlan, subnet4, hosts4, dhcp, domainName, ... }: {
|
||||||
id = vlan;
|
id = vlan;
|
||||||
|
@ -36,8 +38,9 @@ in
|
||||||
pools = [ {
|
pools = [ {
|
||||||
pool = "${dhcp.start} - ${dhcp.end}";
|
pool = "${dhcp.start} - ${dhcp.end}";
|
||||||
} ];
|
} ];
|
||||||
|
renew-timer = builtins.ceil (.5 * dhcp.time);
|
||||||
|
rebind-timer = builtins.ceil (.85 * dhcp.time);
|
||||||
valid-lifetime = dhcp.time;
|
valid-lifetime = dhcp.time;
|
||||||
max-valid-lifetime = dhcp.max-time;
|
|
||||||
option-data = [ {
|
option-data = [ {
|
||||||
space = "dhcp4";
|
space = "dhcp4";
|
||||||
name = "routers";
|
name = "routers";
|
||||||
|
|
Loading…
Reference in New Issue