Centos – fixed-address is not behaving properly with DHCP version 4.2.5

centosisc-dhcp

If I configure an IP address range in dhcp, and allocate two addresses to two different MACs using fixed-address, and if those two or one of the systems is not active in the network, then the corresponding IP address is getting assigned to some other system which is not mentioned in any host declaration.

I have configured dhcp server 4.2.5 on CentOS 7.1 and configured dhcpd.conf as given below:

log-facility local7;
ping-checks;
ping-timeout 5;
deny declines;
lease-file-name "/etc/dhcp/dhcpd.leases";
infinite-is-reserved on;

#######################- eth0 -#######################
subnet 192.168.72.0 netmask 255.255.255.0 {
        range 192.168.72.56 192.168.72.100;
        option domain-name-servers 192.168.72.35;
        option routers 192.168.72.35;
        default-lease-time 86400;
        max-lease-time 172800;
}
host abc {
        hardware ethernet 00:90:fb:38:15:ae;
        fixed-address 192.168.72.56;
}
host xyz {
        hardware ethernet 11:22:88:55:66:22;
        fixed-address 192.168.72.57;
} 

Now if the system with MAC address "11:22:88:55:66:22" is not active in the network, then IP address "192.168.72.57" can be assigned to any other machine.

But if the system with MAC address "11:22:88:55:66:22" is active then it's working properly.

Please tell me whether it is expected behaviour or not. In the previous version of dhcp 4.1 I never observed this behaviour.

I thought a reserved IP address should not get assigned to any other system.

Best Answer

Adding an entry in dhcpd.leases solved my problem.

I added the following entry in the /etc/dhcp/dhcpd.leases file:

lease 192.168.72.56 {
  binding state active;
  reserved;
  hardware ethernet 00:90:fb:38:15:ae;
}