debiandhcp

ISC-DHCP ignores static host definition and provides dynamic IP instead


Debian 11

DHCP version - isc-dhcpd-4.4.3-P1

I have an issue wherein various devices on my LAN are receiving dynamic IPs from my DHCP server's pool rather than taking the static IP that's been assigned in the various host sections. My DHCP.conf setting can be seen below. I have checked the MAC addresses in the conf file against both the journey entries for the server and agains the leases file, they are correct. I have also tried using the UID that was being sent from my U6Pro device, on the advice of ChatGPT. That too didn't work.

subnet 192.168.1.128 netmask 255.255.255.128 {
  option routers 192.168.1.1;
  option domain-name-servers 192.168.1.1;
  option subnet-mask 255.255.255.0;
  range 192.168.1.150 192.168.1.220;
}

# D-Link AP
host DLINK_AP {
  hardware ethernet 18:0F:76:3C:91:38;
  fixed-address 192.168.1.102;
}

host HP_Printer {
  hardware ethernet 40:B8:9A:0C:56:49;
  fixed-address 192.168.1.103;
}

host U6PRO_AP {
  hardware ethernet 0C:EA:14:6E:55:E9;
  fixed-address 192.168.1.105;
}

An example of the journel file output from the U6Pro device is below. It clearly shows ISC receiving a DISCOVER packet and then OFFERING a dynanic IP.

May 20 22:39:48 server dhcpd[3950]: DHCPDISCOVER from 0c:ea:14:6e:55:e9 via enp1s0
May 20 22:39:49 server dhcpd[3950]: DHCPOFFER on 192.168.1.167 to 0c:ea:14:6e:55:e9 (U6Pro) via enp1s0
May 20 22:39:49 server dhcpd[3950]: DHCPREQUEST for 192.168.1.167 (192.168.54.141) from 0c:ea:14:6e:55:e9 (U6Pro) via enp1s0
May 20 22:39:49 server dhcpd[3950]: DHCPACK on 192.168.1.167 to 0c:ea:14:6e:55:e9 (U6Pro) via enp1s0

Why are my static IP definitions being ignored?

Thanks.


Solution

  • Your subnet 192.168.1.128/25 does not include these addresses

    Try :

    subnet 192.168.1.0 netmask 255.255.255.0 {
      option routers 192.168.1.1;
      option domain-name-servers 192.168.1.1;
      option subnet-mask 255.255.255.0;
      range 192.168.1.150 192.168.1.220;
    }