[Dnsmasq-discuss] dhcp-host=hostnameonly does not work

john doe johndoe65534 at mail.com
Thu May 19 19:22:30 UTC 2022


On 5/19/2022 4:46 PM, Maulis Adam via Dnsmasq-discuss wrote:
> Hello,
>
> I like to configure my dhcp server with as little redundacy as possible.
> But it looks like the IP address needs to be written both of /etc/hosts
> and /etc/dnsmasq.conf
>
> The client machines are in the /etc/hosts for example:
>
> 192.168.64.200 cntemplate.hpc
>
> The non-default dnsmasq config options are:
>
> no-resolv
> server=192.168.5.251
> expand-hosts
> domain=hpc
>
> Case 1:
> dhcp-range=192.168.64.0,static
> dhcp-host=cntemplate
>
> Does not work, syslog said:
> May 19 15:53:47 gw00 dnsmasq-dhcp[4912]: DHCPDISCOVER(vlan164)
> 02:00:00:00:00:65 no address available
>
> Case 2:
> dhcp-range=192.168.64.0,static
> dhcp-host=cntemplate,192.168.64.200
>
> Working, but needed a duplicate entry both of /etc/hosts and
> /etc/dnsmasq.conf
>
> Case 3:
> dhcp-range=192.168.64.100,192.168.64.250
> dhcp-host=cntemplate,192.168.64.200
>
> Working, but needed a duplicate entry both of /etc/hosts and
> /etc/dnsmasq.conf
>
> Case 4:
> dhcp-range=192.168.64.100,192.168.64.250
> dhcp-host=cntemplate
>

I might be missing something here but why do you use the option
'dhcp-host' if you specify the hostname in '/etc/hosts'?

--
John Doe



More information about the Dnsmasq-discuss mailing list