2020-04-06 14:41:34 +02:00
|
|
|
# {{ ansible_managed }}
|
2019-05-04 10:54:51 +02:00
|
|
|
|
2020-04-05 17:39:27 +02:00
|
|
|
default-lease-time 86400;
|
|
|
|
max-lease-time 86400;
|
2019-05-04 10:54:51 +02:00
|
|
|
|
2020-04-05 17:39:27 +02:00
|
|
|
# Option definitions common to all supported networks.
|
2019-05-04 10:54:51 +02:00
|
|
|
|
2020-04-05 17:39:27 +02:00
|
|
|
# The MTU theoretically could go as high as 1496 (4-byte VLAN tag).
|
|
|
|
option interface-mtu 1400;
|
|
|
|
option root-path "/";
|
2019-05-04 10:54:51 +02:00
|
|
|
|
|
|
|
# The ddns-updates-style parameter controls whether or not the server will
|
|
|
|
# attempt to do a DNS update when a lease is confirmed. We default to the
|
|
|
|
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
|
|
|
# have support for DDNS.)
|
|
|
|
ddns-update-style none;
|
|
|
|
|
|
|
|
# If this DHCP server is the official DHCP server for the local
|
|
|
|
# network, the authoritative directive should be uncommented.
|
|
|
|
authoritative;
|
|
|
|
|
2020-04-06 17:42:54 +02:00
|
|
|
log-facility local7;
|
2019-05-04 10:54:51 +02:00
|
|
|
|
2020-04-06 16:54:20 +02:00
|
|
|
{% if dhcp_failover is defined %}
|
2020-04-06 17:28:04 +02:00
|
|
|
include "/etc/dhcp/dhcp-failover.conf";
|
2020-04-06 16:54:20 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2020-04-05 17:39:27 +02:00
|
|
|
# Bornes WiFi
|
|
|
|
subnet 10.{{ subnet_ids.ap }}.0.0 netmask 255.255.0.0 {
|
|
|
|
interface "ens19";
|
|
|
|
option subnet-mask 255.255.0.0;
|
|
|
|
option broadcast-address 10.{{ subnet_ids.ap }}.255.255;
|
|
|
|
option routers 10.{{ subnet_ids.ap }}.0.250;
|
|
|
|
option domain-name "borne.auro.re";
|
|
|
|
option domain-search "borne.auro.re";
|
2020-04-18 15:39:32 +02:00
|
|
|
|
2020-04-18 16:51:37 +02:00
|
|
|
option domain-name-servers 10.{{ subnet_ids.ap }}.0.{{ dns_host_suffix_main }}, 10.{{ subnet_ids.ap }}.0.{{ dns_host_suffix_backup }}, {{ upstream_dns_servers|join(', ') }};
|
2020-04-05 17:39:27 +02:00
|
|
|
include "/var/local/re2o-services/dhcp/generated/dhcp.borne.auro.re.list";
|
|
|
|
|
|
|
|
deny unknown-clients;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Users filaire
|
|
|
|
subnet 10.{{ subnet_ids.users_wired }}.0.0 netmask 255.255.0.0 {
|
|
|
|
interface "ens20";
|
|
|
|
option subnet-mask 255.255.0.0;
|
|
|
|
option broadcast-address 10.{{ subnet_ids.users_wired }}.255.255;
|
|
|
|
option routers 10.{{ subnet_ids.users_wired }}.0.240;
|
|
|
|
option domain-name "fil.{{ apartment_block }}.auro.re";
|
|
|
|
option domain-search "auro.re";
|
2020-04-18 15:39:32 +02:00
|
|
|
|
2020-04-18 16:51:37 +02:00
|
|
|
option domain-name-servers 10.{{ subnet_ids.users_wired }}.0.{{ dns_host_suffix_main }}, 10.{{ subnet_ids.users_wired }}.0.{{ dns_host_suffix_backup }}, {{ upstream_dns_servers|join(', ') }};
|
2020-04-18 15:39:32 +02:00
|
|
|
|
2020-04-05 17:39:27 +02:00
|
|
|
include "/var/local/re2o-services/dhcp/generated/dhcp.fil.{{ apartment_block }}.auro.re.list";
|
|
|
|
|
|
|
|
deny unknown-clients;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Users WiFi
|
2020-04-05 19:48:56 +02:00
|
|
|
subnet 10.{{ subnet_ids.users_wifi }}.0.0 netmask 255.255.0.0 {
|
2020-04-05 17:39:27 +02:00
|
|
|
interface "ens21";
|
|
|
|
option subnet-mask 255.255.0.0;
|
2020-04-05 19:48:56 +02:00
|
|
|
option broadcast-address 10.{{ subnet_ids.users_wifi }}.255.255;
|
|
|
|
option routers 10.{{ subnet_ids.users_wifi }}.0.240;
|
2020-04-05 17:39:27 +02:00
|
|
|
option domain-name "wifi.{{ apartment_block }}.auro.re";
|
|
|
|
option domain-search "auro.re";
|
2020-04-18 15:39:32 +02:00
|
|
|
|
2020-04-18 16:51:37 +02:00
|
|
|
option domain-name-servers 10.{{ subnet_ids.users_wifi }}.0.{{ dns_host_suffix_main }}, 10.{{ subnet_ids.users_wifi }}.0.{{ dns_host_suffix_backup }}, {{ upstream_dns_servers|join(', ') }};
|
2020-04-18 15:39:32 +02:00
|
|
|
|
2020-04-05 17:39:27 +02:00
|
|
|
include "/var/local/re2o-services/dhcp/generated/dhcp.wifi.{{ apartment_block }}.auro.re.list";
|
|
|
|
|
|
|
|
pool {
|
2020-04-06 14:41:34 +02:00
|
|
|
range 10.{{ subnet_ids.users_wifi }}.8.0 10.{{ subnet_ids.users_wifi }}.10.255;
|
2020-04-05 17:39:27 +02:00
|
|
|
|
2020-04-06 14:41:34 +02:00
|
|
|
{% if dhcp_failover is defined %}
|
|
|
|
failover peer "dhcp-failover";
|
|
|
|
{% endif %}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|