# # dnsmasq configuration # <% if dhcp_range != 'absent' -%> # This to enable the integrated DHCP server, you need # to supply the range of addresses available for lease and optionally # a lease time. If you have more than one network, you will need to # repeat this for each network on which you want to supply DHCP # service. dhcp-range=<%= dhcp_range %> <% end -%> <% if dhcp_authoritative != 'absent' -%> # Set the DHCP server to authoritative mode. In this mode it will barge in # and take over the lease for any client which broadcasts on the network, # whether it has a record of the lease or not. This avoids long timeouts # when a machine wakes up on a new network. dhcp-authoritative <% end -%> <% if dhcp_gw != 'absent' -%> # Override the default route supplied by dnsmasq, which assumes the # router is the same machine as the one running dnsmasq. dhcp-option=3,<%= dhcp_gw %> <% end -%> <% if dhcp_nameservers != 'absent' -%> # upstream nameserver server=<%= dhcp_nameservers %> <% end -%> <% if dhcp_script != 'absent' -%> # Run an executable when a DHCP lease is created or destroyed. # The arguments sent to the script are "add" or "del", # then the MAC address, the IP address and finally the hostname # if there is one. dhcp-script=<%= dhcp_script %> <% end -%> <% if dhcp_hostsfile != 'absent' -%> # This file is puppet here by puppet and the above script is filling # it with the mac address,. This same file is # also used to assign the static ip and hostname to a specific mac # address. Take care editing this file. dhcp_hostsfile=<%= dhcp_hostsfile %> <% end -%> # # dns configuration # # Never forward plain names (without a dot or domain part) domain-needed # Never forward addresses in the non-routed address spaces. bogus-priv <% if domain != 'absent' -%> # Set this (and domain: see below) if you want to have a domain # automatically added to simple names in a hosts-file. expand-hosts # Set the domain for dnsmasq. this is optional, but if it is set, it # does the following things. # 1) Allows DHCP hosts to have fully qualified domain names, as long # as the domain part matches this setting. # 2) Sets the "domain" DHCP option thereby potentially setting the # domain of all systems configured by DHCP # 3) Provides the domain part for "expand-hosts" domain=<%= domain %> <% end -%> <% if dhcp_boot != 'absent' -%> # The file sent to the tftp client, followed by the # tftp servername and ip dhcp-boot=<%= dhcp_boot %> <% end -%> <% if tftp_root != 'absent' -%> # Set the relative root directory for files availble via TFTP. tftp-root=<%= tftp_root %> <% end -%> <% if log_queries != 'absent' -%> # For debugging purposes, log each DNS query as it passes through # dnsmasq. log-queries <% end -%> <% if log_dhcp != 'absent' -%> # Log lots of extra information about DHCP transactions. log-dhcp <% end -%>