<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 24, 2018 at 7:15 AM tony <<a href="mailto:lists@vanderhoff.org">lists@vanderhoff.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I'm running a DHCP server (4.3) under Debian Stretch to serve a small<br>
local domain. It behaves well for most clients, but I have a laptop<br>
(also Debian Stretch) for which I wish to assign a fixed address. My<br>
server configuration is this (tony-lt being the laptop):<br>
------------------------------------------------------------------<br>
# The ddns-updates-style parameter controls whether or not the server will<br>
# attempt to do a DNS update when a lease is confirmed. We default to the<br>
# behavior of the version 2 packages ('none', since DHCP v2 didn't<br>
# have support for DDNS.)<br>
ddns-update-style none;<br>
<br>
# option definitions common to all supported networks...<br>
#option domain-name "<a href="http://example.org" rel="noreferrer" target="_blank">example.org</a>";<br>
option domain-name "<a href="http://chalet.vanderhoff.org" rel="noreferrer" target="_blank">chalet.vanderhoff.org</a>";<br>
#option domain-name-servers <a href="http://ns1.example.org" rel="noreferrer" target="_blank">ns1.example.org</a>, <a href="http://ns2.example.org" rel="noreferrer" target="_blank">ns2.example.org</a>;<br>
option domain-name-servers 192.168.1.1;<br>
<br>
default-lease-time 600;<br>
max-lease-time 7200;<br>
<br>
# If this DHCP server is the official DHCP server for the local<br>
# network, the authoritative directive should be uncommented.<br>
authoritative;<br>
<br>
# Use this to send dhcp log messages to a different log file (you also<br>
# have to hack syslog.conf to complete the redirection).<br>
log-facility local7;<br>
<br>
# No service will be given on this subnet, but declaring it helps the<br>
# DHCP server to understand the network topology.<br>
<br>
#subnet 10.152.187.0 netmask 255.255.255.0 {<br>
#}<br>
<br>
# This is a very basic subnet declaration.<br>
<br>
subnet 192.168.1.0 netmask 255.255.255.0<br>
{<br>
range 192.168.1.200 192.168.1.254;<br>
option routers 192.168.1.10;<br>
}<br>
<br>
host tony-lt<br>
{<br>
hardware ethernet 0c:60:76:6c:e6:6f;<br>
fixed-address 192.168.1.199;<br>
}<br>
------------------------------------------------------------------<br>
<br>
Despite this configuration I have failed to get that address for the<br>
laptop; it seems to be stuck on 192.168.1.254, currently. It may have<br>
legitimately had that address in the past.<br>
<br>
I have stopped and cleared the client via 'dhclient -r', deleted the<br>
files in /var/lib/dhclient, before restarting it with 'dhclient -v, It<br>
immediately requests ..254<br>
<br>
I'm seeing this in the server log:<br>
------------------------------------------------------------------<br>
Oct 24 12:52:04 router-pi dhcpd[1068]: DHCPREQUEST for 192.168.1.254<br>
from 0c:60:76:6c:e6:6f (tony-lt) via eth0<br>
Oct 24 12:52:04 router-pi dhcpd[1068]: DHCPACK on 192.168.1.254 to<br>
0c:60:76:6c:e6:6f via eth0<br>
Oct 24 12:52:24 router-pi dhcpd[1068]: DHCPREQUEST for 192.168.1.244<br>
from f4:81:39:82:53:c4 via eth0<br>
Oct 24 12:52:24 router-pi dhcpd[1068]: DHCPACK on 192.168.1.244 to<br>
f4:81:39:82:53:c4 via eth0<br>
Oct 24 12:52:32 router-pi dhcpd[1068]: DHCPREQUEST for 192.168.1.254<br>
from 0c:60:76:6c:e6:6f via eth0<br>
Oct 24 12:52:32 router-pi dhcpd[1068]: DHCPACK on 192.168.1.254 to<br>
0c:60:76:6c:e6:6f (tony-lt) via eth0<br>
Oct 24 12:52:41 router-pi dhcpd[1068]: reuse_lease: lease age 9 (secs)<br>
under 25% threshold, reply with unaltered, existing lease for 192.168.1.254<br>
Oct 24 12:52:41 router-pi dhcpd[1068]: DHCPREQUEST for 192.168.1.254<br>
from 0c:60:76:6c:e6:6f (tony-lt) via eth0<br>
Oct 24 12:52:41 router-pi dhcpd[1068]: DHCPACK on 192.168.1.254 to<br>
0c:60:76:6c:e6:6f (tony-lt) via eth0<br>
------------------------------------------------------------------<br>
<br>
Apart from the rather frequent lease request, which I suspect is due to<br>
NetworkManager on this laptop, what is the 'reuse-lease' comment?<br>
<br>
Has anyone any suggestions on how to fix this, please?<br>
<br>
Cheers, Tony<br></blockquote><div><br></div><div>In this situation I typically create a 'fake' host reservation for the old IP with a dummy MAC address, which forces the DHCP server to refuse to give out that address. Once the laptop gets the right IP, then the fake entry can be removed.</div><div><br></div><div>-- </div><div>Bob Harold</div><div> </div></div></div>