A
A
Alexander2016-07-23 10:37:44
linux
Alexander, 2016-07-23 10:37:44

How to bind dnsmasq-dhcp to external DNS by name?

The external DNS server (NSD) is configured with the example.com zone for the local network, and the hosts on the local network are explicitly allocated addresses, for example:

example.com. IN NS ns.example.com.
ns.example.com. IN A 192.168.0.10
host1.example.com. IN A 192.168.0.20

The dnsmasq settings are as follows:
domain = example.com
server = /example.com/192.168.0.10
server = 8.8.8.8
dhcp-range = 192.168.0.100, 192.168.0.200, 255.255.255.0

In this state, dnsmasq normally resolves host1.example.com to an ip address.
Now you need to configure the issuance of addresses by DHCP nodes:
  • linked to name
  • not tied to MAC
  • without duplication of IP addresses from the zone in dnsmasq

The simple "dhcp-host = host1, 192.168.0.20" option works, but requires duplicate addresses in the zone and dnsmasq settings. It is also interesting for me to have only one place where the name-address match is set.
Is it possible to do this?
UPD: In a real network, DNSSEC is used in split-horizon mode, which is why I want to simplify the dnsmasq setup as much as possible so that there is no way to screw up during maintenance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question