[Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

john doe johndoe65534 at mail.com
Mon Jan 7 16:41:41 GMT 2019


On 1/7/2019 4:23 PM, smicha wrote:
> Hi all,
> 
> first of all, thank you for the grade software !!!
> But I have a small questions regarding "dnsmasq" and DHCP requests.
> 
> Background:
> We have running different, isolated test-landscapes. In each network a
> VM is running with dnsmasq, which do the DHCP/DNS task.
> Some of the VM's in the landscape needs to have a "static" DHCP-IP,
> because a Firewall in front of the landscape routes traffic to the VM's
> (Rules are IP based)
> 
> So far so good.
> 
> Sometimes, when VM's (with the static DHCP-IP) has some problems and
> crash's and can not "release" there DHCP-IP, we need to re-deploy the
> same VM from our pool.
> But, when the re-deployement process is starting, that new VM will have
> a different MAC Address per default. The Hostname is the same as before
> the old one had.
> 
> Now, the problem is begin, because dnsmasq have already a valid DHCP
> lease for the old (destroyed) VM and the new, re-deployed VM will get a
> different IP as expect.
> 
> I see in the dnsmasq logfile the following message:
> 
>       not using configured address 10.117.247.79 because it is leased to
> 00:50:56:85:02:ff
> 
> The traffic from the firewall in front of, can reach the new VM (because
> the new VM does not have the correct expected IP).
> 
> In the past I use the tool "dhcp_release" to fix the issue, but now I
> ask is there an other way to fix this problem.
> 
> 
> Question:
> I there an option, that dnsmasq ignore the Client MAC address for
> "static" DHCP leases?
> 
> 
> As far as I see, dnsmasq use a combination of "Hostname" and "MAC" for
> the DHCP leases.
> 
> 
> I hope I could describe my problem understandable ;-)
> 

Some hints from dnsmasq.conf:

# Give the machine which says its name is "bert" IP address
# 192.168.0.70 and an infinite lease
#dhcp-host=bert,192.168.0.70,infinite

# Always give the host with client identifier 01:02:02:04
# the IP address 192.168.0.60
#dhcp-host=id:01:02:02:04,192.168.0.60

# Always give the host with client identifier "marjorie"
# the IP address 192.168.0.60
#dhcp-host=id:marjorie,192.168.0.60

# Enable the address given for "judge" in /etc/hosts
# to be given to a machine presenting the name "judge" when
# it asks for a DHCP lease.
#dhcp-host=judge


See also (1) for more info on 'dhcp-host'.


1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

-- 
John Doe



More information about the Dnsmasq-discuss mailing list