]> git.proxmox.com Git - pve-network.git/commit
sdn: dhcp: add dnsmasq plugin
authorStefan Hanreich <s.hanreich@proxmox.com>
Fri, 17 Nov 2023 11:39:46 +0000 (12:39 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 18 Nov 2023 14:59:50 +0000 (15:59 +0100)
commit33074dfbee329a7beacf5dbb64dea18f2763bca7
tree5d66da493a8d07238972aa6732146de26094bccd
parentb240ff0b1f3ca4f24d825961bb1d96f454889b79
sdn: dhcp: add dnsmasq plugin

The plugin creates a dnsmasq@<zone> service that spawns a dnsmasq
instance that handles dhcp for that zone.

The configuration files for a dnsmasq instance lie within
/etc/dnsmasq.d/<zone>

The plugin generates the following configuration files:
* 00-default.conf
  Contains the default global configuration for dnsmasq. Disables DNS,
  enables some specific options for Windows, does some
  security-related configuration and makes dnsmasq bind only to the
  interfaces it is responsible for
* 10-<subnet>.conf
  Contains the default settings for a subnet. Sets dhcp options for
  DNS and gateway.
* 10-<subnet>.ranges.conf
  Contains the configuration of DHCP ranges for a subnet.
* ethers
  Contains the MAC address to IP mappings for a zone.

Every subnet gets assigned a tag in the dnsmasq configuration that is
equal to the subnet_id. This can be used to override / set additional
configuration options on a per-subnet basis.

Additionally it creates the file /etc/default/dnsmasq.<zone> that
provides default options for the dnsmasq service.

Leases are stored in /var/lib/misc/dnsmasq.<zone>.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
debian/control
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm [new file with mode: 0644]