# dhcpd.conf # # {{ ansible_managed }} # # DHCP Server Configuration file. # see /usr/share/doc/dhcp/dhcpd.conf.example # see dhcpd.conf(5) man page # # option definitions common to all supported networks... option domain-name "las.kit.edu"; option domain-name-servers 129.13.64.5, 129.13.96.2; default-lease-time 60; max-lease-time 720; # Use this to enble / disable dynamic dns updates globally. ddns-update-style none; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # failover https://www.madboa.com/geek/dhcp-failover/ # https://kb.isc.org/article/AA-00502/0/A-Basic-Guide-to-Configuring-DHCP-Failover.html failover peer "dhcp-failover" { {% if primary_dhcpd == ansible_default_ipv4.address %} primary; address {{ primary_dhcpd }}; {% else %} secondary; address {{ secondary_dhcpd }}; {% endif %} port 647; peer address {% if primary_dhcpd == ansible_default_ipv4.address %} {{ secondary_dhcpd }}; {% else %} {{ primary_dhcpd }}; {% endif %} peer port 647; max-response-delay 30; max-unacked-updates 10; load balance max seconds 3; {% if primary_dhcpd == ansible_default_ipv4.address %} mclt 1800; split 128; {% endif %} } # A slightly different configuration for an internal subnet. subnet 129.13.108.0 netmask 255.255.255.0 { option routers 129.13.108.254; option broadcast-address 129.13.255.255; option domain-name "las.kit.edu"; option domain-name-servers 129.13.64.5, 129.13.96.2; pool { failover peer "dhcp-failover"; default-lease-time 1800; max-lease-time 7200; range 129.13.108.70 129.13.108.89; deny unknown-clients; } } include "/etc/dhcp/host-list-las";