[Dnsmasq-discuss] no address available with static range and dhcp-host
Geert Stappers
stappers at stappers.nl
Wed Jan 15 17:12:38 UTC 2025
On Wed, Jan 15, 2025 at 04:28:53PM +0100, Nicolas Granger wrote:
> Le 15/01/2025 à 13:54, john doe via Dnsmasq-discuss a écrit :
> > On 1/15/25 11:50, GRANGER Nicolas wrote:
> > > Hi all,
> > >
> > >
> > > I am unable to get dnsmasq to issue ip addresses to known hosts
> > > only. Upon DHCPDISCOVER it fails with no address available.
> > >
> > >
> > > The network interface is called lan with ip address 192.168.2.254/24
> > >
> > >
> > > $ sudo dnsmasq -d --bind-interfaces -i lan --except-interface=lo \
--dhcp-range=192.168.2.0,static,255.255.255.0 \
--dhcp-host=ac:1f:xx:xx:xx:xx,192.168.2.19
> > >
> > >
> >
> > for a simple /24, I don't specify a netmask!
> >
> > Are you sure that the client is sending the mac address that you are
> > expecting?
> >
> > What version of Dnsmasq are you using?
> >
>
> The version is 2.90 and the mac address is correct.
>
> With a regular dhcp-range, dnsmasq pulls an ip from the range, not the one
> of the host.
>
> $ sudo dnsmasq -d --bind-interfaces -i lan --except-interface=lo \
--dhcp-range=192.168.2.100,192.168.2.150,255.255.255.0 \
--dhcp-host=ac:1f:xx:xx:xx:xx,192.168.2.19
>
> dnsmasq: started, version 2.90 cachesize 150
> dnsmasq: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP
> DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect
> inotify dumpfile
> dnsmasq-dhcp: DHCP, static leases only on 192.168.2.0, lease time 1h
> dnsmasq-dhcp: DHCP, IP range 192.168.2.100 -- 192.168.2.150, lease time 1h
> dnsmasq-dhcp: DHCP, sockets bound exclusively to interface lan
> dnsmasq: reading /etc/resolv.conf
> dnsmasq: using nameserver 127.0.0.53#53
> dnsmasq: read /etc/hosts - 8 names
> dnsmasq-dhcp: DHCPDISCOVER(lan) 192.168.2.56 ac:1f:xx:xx:xx:xx
> dnsmasq-dhcp: DHCPOFFER(lan) 192.168.2.101 ac:1f:xx:xx:xx:xx
> dnsmasq-dhcp: DHCPREQUEST(lan) 192.168.2.101 ac:1f:xx:xx:xx:xx
> dnsmasq-dhcp: DHCPACK(lan) 192.168.2.101 ac:1f:xx:xx:xx:xx node19
>
And what can be seen on the wire?
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list