2

I am currently puzzled by the dnsmasq configuration, and I hope someone here can help me... I've setup successfully the DHCP-Server with dnsmasq, and I've tried to include some static Host configurations based on the MAC-Addresses of the clients. Here is my dnsmasq.conf:

# port to listen for DNS queries. If set to 0, disables DNS functionality.
port=0
domain=fritz.box
dhcp-range=192.168.13.50,192.168.13.150,255.255.255.0,4h
dhcp-range=192.168.13.0,static,255.255.255.0,12h
dhcp-boot=pxelinux.0,pxeserver,192.168.13.10
# Gateway
dhcp-option=3,192.168.13.1
# DNS
dhcp-option=6,192.168.13.1
# Network Broadcast Address
dhcp-option=28,192.168.13.255
# Network Time Servers
dhcp-option=42,192.168.13.1

# linux-gurke
dhcp-host=00:1e:4f:d7:24:5e,192.186.13.6


pxe-prompt="Press F8 for menu.", 60
pxe-service=x86PC, "PXE boot from raspi", pxelinux
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-authoritative

But for some reason, even though I have an matching dhcp-host line - the host is not getting the static ip:

Oct 30 19:53:51 raspi dnsmasq-dhcp[9759]: DHCPDISCOVER(br0) 00:1e:4f:d7:24:5e
Oct 30 19:53:51 raspi dnsmasq-dhcp[9759]: DHCPOFFER(br0) 192.168.13.92 00:1e:4f:d7:24:5e
Oct 30 19:53:51 raspi dnsmasq-dhcp[9759]: DHCPREQUEST(br0) 192.168.13.92 00:1e:4f:d7:24:5e
Oct 30 19:53:51 raspi dnsmasq-dhcp[9759]: DHCPACK(br0) 192.168.13.92 00:1e:4f:d7:24:5e linux-gurke

What am I missing / doing wrong ? Any ideas?

Martin
  • 2,194
  • 7
  • 16
  • 1
    Your two dhcp-range options seem to overlap. Is it possible that's confusing dnsmasq? If you remove.the first one do you still see the problem? Grasping at straws....I don't see anything else wrong with your config. Bump up logging and check the log file? – Andrew Schulman Oct 31 '20 at 00:10
  • 1
    Thanks for your answer! I have been blind... there is a typo inside the IP address! I wrote 192.186. instead of 192.168 - Therefore dnsmasq didn't find a range for the static assignment and used the dynamic one... (I'm unsure if the second range statement is really necessary - but the documentation said so) – Martin Oct 31 '20 at 08:12
  • Doh! I missed it too! – Andrew Schulman Oct 31 '20 at 08:27

0 Answers0