|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
# dhcpd.conf
|
|
|
|
|
{{ ansible_managed }}
|
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
|
|
|
|
|
default-lease-time 86400;
|
|
|
|
|
max-lease-time 86400;
|
|
|
|
@ -24,6 +24,7 @@ authoritative;
|
|
|
|
|
|
|
|
|
|
# Use this to send dhcp log messages to a different log file (you also
|
|
|
|
|
# have to hack syslog.conf to complete the redirection).
|
|
|
|
|
# XXX: This was enabled in one building and disabled in another.
|
|
|
|
|
#log-facility local7;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -65,21 +66,42 @@ subnet 10.{{ subnet_ids.users_wifi }}.0.0 netmask 255.255.0.0 {
|
|
|
|
|
include "/var/local/re2o-services/dhcp/generated/dhcp.wifi.{{ apartment_block }}.auro.re.list";
|
|
|
|
|
|
|
|
|
|
pool {
|
|
|
|
|
range 10.{{ subnet_ids.users_wifi }}.8.0 10.{{ subnet_ids.users_wired }}.10.255;
|
|
|
|
|
range 10.{{ subnet_ids.users_wifi }}.8.0 10.{{ subnet_ids.users_wifi }}.10.255;
|
|
|
|
|
|
|
|
|
|
{% if failover is defined %}
|
|
|
|
|
failover peer "dhcp-failover" {
|
|
|
|
|
{% if dhcp_failover is defined %}
|
|
|
|
|
failover peer "dhcp-failover";
|
|
|
|
|
{% endif %}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{% if dhcp_failover is defined %}
|
|
|
|
|
failover peer "dhcp-failover" {
|
|
|
|
|
{% if inventory_hostname == dhcp_failover.primary_host %}
|
|
|
|
|
primary;
|
|
|
|
|
split 128;
|
|
|
|
|
|
|
|
|
|
# MCLT = Maximum Client Lead Time.
|
|
|
|
|
# Must be specified on the primary, forbidden on the secondary.
|
|
|
|
|
mclt 3600;
|
|
|
|
|
address {{ failover.own_address }};
|
|
|
|
|
|
|
|
|
|
# Address or DNS name on which this node listens for connections
|
|
|
|
|
# from its failover peer.
|
|
|
|
|
address {{ dhcp_failover.primary_host }};
|
|
|
|
|
peer address {{ dhcp_failover.secondary_host }};
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if inventory_hostname == dhcp_failover.secondary_host %}
|
|
|
|
|
secondary;
|
|
|
|
|
# Address and peer address are reversed on the secondary node.
|
|
|
|
|
address {{ dhcp_failover.secondary_host }};
|
|
|
|
|
peer address {{ dhcp_failover.primary_host }};
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
# The following options can be shared between primary and
|
|
|
|
|
# secondary failover peers.
|
|
|
|
|
port 647;
|
|
|
|
|
peer address {{ failover.peer_address }};
|
|
|
|
|
peer port 647;
|
|
|
|
|
split 128;
|
|
|
|
|
max-response-delay 30;
|
|
|
|
|
max-unacked-updates 10;
|
|
|
|
|
load balance max seconds 3;
|
|
|
|
|
}
|
|
|
|
|
{% endif %}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|