[Dnsmasq-discuss] Using dhcp-hosts for static entries
Geert Stappers
stappers at stappers.nl
Sat Aug 22 15:25:51 BST 2020
New attempt
On Sat, Aug 22, 2020 at 03:42:37PM +0200, Geert Stappers wrote:
> On Sat, Aug 22, 2020 at 02:38:40PM +0200, Olivier wrote:
> > Hello,
> >
> > I've discovered dhcp-hostsfile option.
> >
> > Is it possible to use this file as an alternative way to define static DNS
> > entries as you would with an /etc/hosts file (and as updating with a simple
> > SIGUP seems be convenient to me) ?
> >
> > If I'm correctly understanding man page (see [1]), it should be possible
> > with a line like
> > "--dhcp-host=lap,192.168.0.199" which "allocate the machine lap the IP address 192.168.0.199".
>
> See [2]
>
> "--dhcp-host=192.168.0.199,lap" which "allocate the machine lap the IP address 192.168.0.199".
"--dhcp-host=identification,192.168.0.199,lap"
When identified, assign address 192.168.0.199 to it, add 'lap' as
hostname into DNS part of dnsmasq. Device should take 'lap' as hostname.
> > In this exact contact, what does "lap" stands for given dhcp-host syntax
> > (see [2]) ? Is it an hostname ? An id ? A tag ?
>
> Hostname. id is prefix with "id:", tag is prefix with "tag:"
>
>
> > May I add that with Debian Buster's 2.80, both lines bellow failed:
> > foo,1.2.3.4
> > 1.2.3.4,bar
>
> More likely that "failed" means this time
> what is configured was not the complete configuration
>
>
>
>
> Groeten
> Geert Stappers
>
> [1] http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
> [2] -G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][tag:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]
Choose "identification" from "<hwaddr>" or "id:<client_id>"
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list