问题原文
原帖链接 · WoJ · CC BY-SA 3.0
I switched from a 192.168.0.0/24 network to 10.10.10.0/24. The addresses are provided by dnsmasq-dhcp.
The switch went fine for all devices but one - a printer (called PRINTER). This printer was assigned a fixed IP based on its name defined in /etc/hosts (via dhcp-host=PRINTER) and still does with the new ranges.
When it requests an IP address, the DHCP server states in its logs that
dnsmasq-dhcp: not giving name PRINTER to the DHCP lease of 192.168.0.20 because the name exists in /etc/hosts with address 10.10.10.20
I do not understand this message: the name indeed exists in /etc/hosts, with now the new 10.10.10.20 address. While I guess that the DHCP query from the printer hints about the old IP address it used to have, why doesn't dnsmasq just ignore that and provide the new IP address?
已采纳解答
原帖链接 · arana · CC BY-SA 3.0
Check if your printer name for old ip is here: /var/lib/misc/dnsmasq.leases and edit that file, you must stop dnsmask first
check the Lease times you setup when you configured dhcp, if you assigned too much time then it will take a while to "fix "itself
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
