36 lines
1014 B
Plaintext
36 lines
1014 B
Plaintext
|
option domain-name-servers <%= ', '.join(@dns_resolvers_ipv4) %>;
|
||
|
option ntp-servers <%= ', '.join(@ntp_servers_ipv4) %>;
|
||
|
|
||
|
# specify API server URL (RFC8910)
|
||
|
option default-url "https://<%= @service_name %>/api/captive-portal";
|
||
|
|
||
|
default-lease-time 600;
|
||
|
max-lease-time 3600;
|
||
|
|
||
|
authoritative;
|
||
|
|
||
|
<% if @instances.length == 2 -%>
|
||
|
failover peer "dhcp-peer" {
|
||
|
<% if @instance_index == 0 %>primary<% else %>secondary<% end %>;
|
||
|
address <%= @instances[@instance_index]['external_ipv4'] %>;
|
||
|
peer address <%= @instances[1-@instance_index]['external_ipv4'] %>;
|
||
|
max-response-delay 60;
|
||
|
max-unacked-updates 10;
|
||
|
load balance max seconds 3;
|
||
|
<% if @instance_index == 0 -%>
|
||
|
split 128;
|
||
|
mclt 180;
|
||
|
<%- end %>
|
||
|
}
|
||
|
<%- end %>
|
||
|
|
||
|
subnet <%= @client_ipv4_net %> netmask <%= @client_netmask %> {
|
||
|
option routers <%= @client_ipv4_gateway %>;
|
||
|
pool {
|
||
|
range <%= @client_ipv4_dhcp_from %> <%= @client_ipv4_dhcp_to %>;
|
||
|
<% if @instances.length == 2 -%>
|
||
|
failover peer "dhcp-peer";
|
||
|
<%- end %>
|
||
|
}
|
||
|
}
|