So al clients from static and dhcp pool get the DNS address 10.0.1.174, only one device with the correct MAC address gets the DNS address 1.1.1.1 and 1.0.0.1.
The client with the corresponding MAC adres is getting the right DNS settings, BUT is getting an IP address from the dhcp pool and NOT from the static lease list.
When I add an # in front of the dhcp-host line, the client is getting an IP from the static lease and off course not the correct DNS settings.
I’m clueless what I’m doing wrong, any ideas?
Last edited by ray_308 on Fri Jan 17, 2020 20:50; edited 1 time in total
Joined: 13 Aug 2013 Posts: 6870 Location: Romerike, Norway
Posted: Thu Jan 16, 2020 20:15 Post subject:
You have to set the static IP address on the dhcp-host
--dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]
Specify per host parameters for the DHCP server. This allows a machine with a particular hardware address to be always allocated the same hostname, IP address and lease time. A hostname specified like this overrides any supplied by the DHCP client on the machine. It is also allowable to omit the hardware address and include the hostname, in which case the IP address and lease times will apply to any machine claiming that name. For example --dhcp-host=00:20:e0:3b:13:af,wap,infinite tells dnsmasq to give the machine with hardware address 00:20:e0:3b:13:af the name wap, and an infinite DHCP lease. --dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the machine lap the IP address 192.168.0.199.
The client whit MAC DC:56:E7:89:xx:xx is getting the right dns settings, but still an IP address from the dhcp pool instead of the dhcp-host option (10.0.1.120).
I think that I'm doing something wrong, but can't find out what.. _________________ I'm not a complete idiot, some parts are missing.