0

I have setup new isc-dhcp-server in ubuntu 20.04. all client getting connect but showing there logs (no free leases)

client connected only 25 machine.

sudo tail -f /var/log/syslog
Sep  9 09:43:57 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from b6:df:34:66:aa:41 via eth2: network 172.16.136.0/23: no free leases
Sep  9 09:43:58 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from 9a:33:bb:83:f9:16 via eth2: network 172.16.136.0/23: no free leases
Sep  9 09:44:01 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from b6:df:34:66:aa:41 via eth2: network 172.16.136.0/23: no free leases
Sep  9 09:44:05 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from d2:84:01:b4:b1:b8 via eth1: network 172.16.160.0/19: no free leases
Sep  9 09:44:06 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from 9a:33:bb:83:f9:16 via eth2: network 172.16.136.0/23: no free leases
Sep  9 09:44:08 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from d2:84:01:b4:b1:b8 via eth1: network 172.16.160.0/19: no free leases
Sep  9 09:44:09 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from d2:84:01:b4:b1:b8 via eth1: network 172.16.160.0/19: no free leases
Sep  9 09:44:10 ggn-dhcp-srv dhcpd[49319]: DHCPDISCOVER from b6:df:34:66:aa:41 via eth2: network 172.16.136.0/23: no free leases

cat /etc/dhcp/dhcpd.conf enter image description here so many IPs are free still showing ** no free leases**

vidarlo
  • 6,654
  • 2
  • 18
  • 31
  • How have you determined that "so many IPs are free"? You can look at `/var/lib/dhcpd/dhcpd.leases` to see what leases have been assigned. – larsks Sep 09 '22 at 14:10
  • I have removed and deleted the file still same. I can see list in dhcpd.leases not more then 25 machine – Aslam Raza Sep 09 '22 at 14:36

1 Answers1

1

You have deny unknown-clients in your pool configuration, which means clients can only receive an address from DHCP if they have a static DHCP reservation defined for their MAC address in a host section. I don't see any of those in your posted configuration file.

It sounds like you don't want to use static reservations, so just remove the deny unknown-clients; line and restart dhcpd.

Mintra
  • 561
  • 3
  • 7