if pub has more than 50% active leases, limit max-lifetime
This commit is contained in:
parent
a328d67753
commit
0d551a082d
|
@ -16,6 +16,7 @@ dhcp:
|
|||
end: 172.20.77.254
|
||||
time: 30
|
||||
max-time: 3600
|
||||
lower-max-time: 50
|
||||
opts:
|
||||
host-opts:
|
||||
routers: pub-gw.pub
|
||||
|
|
|
@ -8,6 +8,10 @@ subnet {{ subnet.split('/')[0] }} netmask {{ netmasks[subnet.split('/')[1]] }} {
|
|||
authoritative;
|
||||
default-lease-time {{ conf['time'] }};
|
||||
max-lease-time {{ conf['max-time'] }};
|
||||
{%- if iface in ['pub'] %}
|
||||
min-lease-time {{ conf['time'] }};
|
||||
adaptive-lease-time-threshold {{ conf['lower-max-time'] }};
|
||||
{%- endif %}
|
||||
range {{ conf['start'] }} {{ conf['end'] }};
|
||||
{%- for name, value in (conf.get('opts') or {}).items() %}
|
||||
option {{ name }} {{ value }};
|
||||
|
|
Loading…
Reference in New Issue