Isc-dhcp-server config for banni/accueil vlans

This commit is contained in:
chirac 2020-10-17 19:48:34 +02:00
parent 0d7bfbd872
commit 68f7fd5b59
3 changed files with 44 additions and 2 deletions

View file

@ -57,7 +57,8 @@ subnet_ids:
ap: "14{{ apartment_block_id }}"
users_wired: "{{ apartment_block_id }}0"
users_wifi: "{{ apartment_block_id }}1"
users_banni: "{{ apartment_block_id }}2"
users_accueil: "{{ apartment_block_id }}3"
# Keepalived
keepalived_password: "{{ vault_keepalived_password[apartment_block] }}"

View file

@ -19,6 +19,6 @@
INTERFACESv4="ens19"
INTERFACESv6=""
{% else %}
INTERFACESv4="ens19 ens20 ens21"
INTERFACESv4="ens19 ens20 ens21 ens22 ens23"
INTERFACESv6=""
{% endif %}

View file

@ -51,3 +51,44 @@ subnet 10.{{ subnet_ids.users_wifi }}.0.0 netmask 255.255.0.0 {
{% endif %}
}
}
# Banni
subnet 10.{{ subnet_ids.users_banni }}.0.0 netmask 255.255.0.0 {
interface "ens22";
option subnet-mask 255.255.0.0;
option broadcast-address 10.{{ subnet_ids.users_banni }}.255.255;
option routers 10.{{ subnet_ids.users_banni }}.0.{{ router_ip_suffix }};
option domain-name "banni.{{ apartment_block_dhcp }}.auro.re";
option domain-search "auro.re";
option domain-name-servers 10.{{ subnet_ids.users_banni }}.0.{{ dns_host_suffix_main }}, 10.{{ subnet_ids.users_banni }}.0.{{ dns_host_suffix_backup }};
pool {
range 10.{{ subnet_ids.users_banni }}.1.0 10.{{ subnet_ids.users_banni }}.2.255;
{% if dhcp_failover is defined %}
failover peer "dhcp-failover";
{% endif %}
}
}
# Accueil
subnet 10.{{ subnet_ids.users_accueil }}.0.0 netmask 255.255.0.0 {
interface "ens23";
option subnet-mask 255.255.0.0;
option broadcast-address 10.{{ subnet_ids.users_accueil }}.255.255;
option routers 10.{{ subnet_ids.users_accueil }}.0.{{ router_ip_suffix }};
option domain-name "accueil.{{ apartment_block_dhcp }}.auro.re";
option domain-search "auro.re";
option domain-name-servers 10.{{ subnet_ids.users_accueil }}.0.{{ dns_host_suffix_main }}, 10.{{ subnet_ids.users_accueil }}.0.{{ dns_host_suffix_backup }};
pool {
range 10.{{ subnet_ids.users_accueil }}.1.0 10.{{ subnet_ids.users_accueil }}.2.255;
{% if dhcp_failover is defined %}
failover peer "dhcp-failover";
{% endif %}
}
}