DHCPD intermittently assigning incorrect addresses

Issues related to configuring your network
Post Reply
pquesinb
Posts: 5
Joined: 2011/10/08 22:34:36
Location: Severn, MD
Contact:

DHCPD intermittently assigning incorrect addresses

Post by pquesinb » 2014/06/25 15:41:29

dhcpd is configured to hand out a few static address assignments based on MAC address, but it's intermittently assigning the incorrect address to clients. This involves Windows 7 clients as well as Aastra IP phones, sometimes they grab an address totally unrelated to the dynamic assignment range or their hosts entry in dhcpd.conf. This doesn't happen all the time but it's happening often enough to be a problem.

Here's a current example:
Windows 7 PC is supposed to be assigned 10.0.0.213 according to the following entry in dhcpd.conf:
host lhall {
# lhall-pc.ourdomain;
hardware ethernet D0:67:E5:1B:00:AF;
fixed-address 10.0.0.213;
}
But right now it's residing at IP address 10.0.0.11. Taking a look at the messages log file, we see a bunch of entries like the following:
Jun 24 15:15:07 Server dhcpd: DHCPINFORM from 10.0.0.213 via eth2
Jun 24 15:15:07 Server dhcpd: DHCPACK to 10.0.0.213 (d0:67:e5:1b:00:af) via eth2

and this is great, but then there's the following set of entries:
Jun 24 15:56:43 Server dhcpd: DHCPINFORM from 10.0.0.213 via eth2
Jun 24 15:56:43 Server dhcpd: DHCPACK to 10.0.0.213 (d0:67:e5:1b:00:af) via eth2
Jun 24 15:56:43 Server dhcpd: Dynamic and static leases present for 10.0.0.213.
Jun 24 15:56:43 Server dhcpd: Remove host declaration lhall or remove 10.0.0.213
Jun 24 15:56:43 Server dhcpd: from the dynamic address pool for 10.0.0/24
Jun 24 15:56:44 Server dhcpd: unable to add reverse map from 213.0.0.10.in-addr.arpa. to LHall-PC.ourdomain.com: timed out
Jun 24 15:56:44 Server dhcpd: DHCPREQUEST for 10.0.0.213 from d0:67:e5:1b:00:af via eth2
Jun 24 15:56:44 Server dhcpd: DHCPACK on 10.0.0.213 to d0:67:e5:1b:00:af via eth2
Jun 24 15:56:44 Server dhcpd: DHCPDISCOVER from d0:67:e5:1b:00:af via eth2
Jun 24 15:56:44 Server dhcpd: DHCPOFFER on 10.0.0.213 to d0:67:e5:1b:00:af via eth2
Jun 24 15:56:44 Server dhcpd: DHCPREQUEST for 10.0.0.11 (10.0.0.1) from d0:67:e5:1b:00:af via eth2: lease 10.0.0.11 unavailable.
Jun 24 15:56:44 Server dhcpd: DHCPNAK on 10.0.0.11 to d0:67:e5:1b:00:af via eth2
Jun 24 15:56:47 Server dhcpd: DHCPINFORM from 10.0.0.11 via eth2
Jun 24 15:56:47 Server dhcpd: DHCPACK to 10.0.0.11 (d0:67:e5:1b:00:af) via eth2

After that, we see entries like:
Jun 24 15:58:07 Server dhcpd: DHCPINFORM from 10.0.0.11 via eth2
Jun 24 15:58:07 Server dhcpd: DHCPACK to 10.0.0.11 (d0:67:e5:1b:00:af) via eth2

So it looks like dhcpd becomes confused and thinks that workstation's lease is already in use (by someone else?) when it requests renewal. At that point the client just decides it's going to use IP address 10.0.0.11 and ignore the server. So now I'm confused... any reason for this behavior? Note that 10.0.0.11 does not reside within the range of assignable address within dhcpd.conf. Would changing the dynamic address range to NOT include the static assignments help?

The address of this server is 10.0.0.15, 10.0.0.1 is the router/gateway address. Here is the full dhcpd.conf file:

authoritative;
ddns-update-style interim;
#ignore client-updates;

# Questions about this file or server configuration may be directed to Phil Quesinberry - phil2@mydomain.com

subnet 10.0.0.0 netmask 255.255.255.0 {

# --- default gateway
option routers 10.0.0.1;
option subnet-mask 255.255.255.0;

option nis-domain "ourdomain.com";
option domain-name "ourdomain.com";
option domain-name-servers 10.0.0.15;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 10.0.0.1;
# option netbios-name-servers 10.0.0.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 10.0.0.101 10.0.0.240;
default-lease-time 216000;
max-lease-time 432000;

# we want the nameserver to appear at a fixed address
#host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
#}

# Keep the phones at the same IP addresses for direct media port-forwarding
host 225 {
# 225.ourdomain;
hardware ethernet 00:08:5D:26:F7:D3;
fixed-address 10.0.0.158;
}

host 226 {
# 226.ourdomain;
hardware ethernet 00:08:5D:26:f7:D0;
fixed-address 10.0.0.162;
}

host 227 {
# 227.ourdomain;
hardware ethernet 00:08:5D:22:3D:29;
fixed-address 10.0.0.190;
}

host 257 {
# 257.ourdomain;
hardware ethernet 00:08:5D:26:F8:E9;
fixed-address 10.0.0.194;
}

host 519 {
# 519.ourdomain;
hardware ethernet 00:0E:08:29:4C:3C;
fixed-address 10.0.0.159;
}

# Assign static IPs to workstations so lease changes don't break RDP port-forwarding
host vicky-pc {
# vicky-pc.ourdomain;
hardware ethernet B8:AC:6F:38:61:7C;
fixed-address 10.0.0.178;
}

host tina-pc {
# tina-pc.ourdomain;
hardware ethernet F0:4D:A2:EA:36:B5;
fixed-address 10.0.0.188;
}

host exec01 {
# exec01.ourdomain;
hardware ethernet F0:4D:A2:EA:36:56;
fixed-address 10.0.0.191;
}

host lhall {
# lhall-pc.ourdomain;
hardware ethernet D0:67:E5:1B:00:AF;
fixed-address 10.0.0.213;
}


}

Many thanks for any possible insights into this problem.

- Phil

drk
Posts: 405
Joined: 2014/01/30 20:38:28

Re: DHCPD intermittently assigning incorrect addresses

Post by drk » 2014/06/25 16:06:01

If you're assigning static IPs then don't use a dynamic pool. If you still want to have a mix of static and dynamic then keep the range of dynamic out of where you're assigning static.

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: DHCPD intermittently assigning incorrect addresses

Post by stevemowbray » 2014/06/25 16:07:13

The server is telling you the problem:

Jun 24 15:56:43 Server dhcpd: Dynamic and static leases present for 10.0.0.213.
Jun 24 15:56:43 Server dhcpd: Remove host declaration lhall or remove 10.0.0.213
Jun 24 15:56:43 Server dhcpd: from the dynamic address pool for 10.0.0/24

i.e. 10.0.0.213 is in this dynamic range you have defined:
range dynamic-bootp 10.0.0.101 10.0.0.240;

Change the range so it doesn't include 10.0.0.213 or change the static assignment so it's outside the range 101-240.

pquesinb
Posts: 5
Joined: 2011/10/08 22:34:36
Location: Severn, MD
Contact:

Re: DHCPD intermittently assigning incorrect addresses

Post by pquesinb » 2014/06/25 18:24:33

Thanks for the replies. I wondered if that could be the problem, what was confusing to me was the fact that it worked most of the time and would assign the static IP even though it was in the dynamic pool, but then would occasionally complain about it and fail.

I've corrected the configuration so hopefully that will end the misbehavior.

Thanks again to all,

- Phil

pquesinb
Posts: 5
Joined: 2011/10/08 22:34:36
Location: Severn, MD
Contact:

Re: DHCPD intermittently assigning incorrect addresses

Post by pquesinb » 2014/07/02 18:08:13

Just as an update - I was still having the same problem with clients seeming to intermittently ignore address assignments, just without the "hey idiot, check your settings" messages in the log. It then occurred to me that the Comcast router might be handing out DHCP addresses and that was indeed the case. I disabled that and everything appears to be fine. Guess I should have Wiresharked it...

So, if anyone else experiences a similar problem and comes across this message, check for another "helpful" DHCP server.

Cheers,

- Phil

Post Reply