Don’t write “no free leases” messages from ISC DHCP server to systemd log

isc-dhcpjournald

I have a DHCP server that provides TFTP server IP, NBP (Network Bootstrp Program) and IP addresses to PXE clients.
When a machine boots normally (not PXE boot) it gets an IP address from another DHCP server.

Every time a machine boots normally the problem is that the (PXE)DHCP server log gets lots of messages like this:

DHCPDISCOVER from 00:11:22:33:aa:bb via eth0: network 10.1.2.0/24: no
free leases

How can I configure the (PXE)DHCP to not write those messages to the log?

Best Answer

when a non-PXE client boots up it broadcasts a DHCPDISCOVERY packet that is caught by both the DHCP sever and the proxyDHCP server.

The DHCP server will continue with the DORA (DISCOVERY-OFFER-REQUEST-ACCEPT) sequence providing an IP address, mask, and some DHCP options. On the other hand the proxyDHCP when the client is not identified as a booting PXE device immediately stops the DORA sequence remaining quiet. This does not prevent the proxyDHCP engine for logging the DHCPDISCOVER event (or even the DHCPREQUEST that the client sends as part of the DORA sequence when getting its IP from the DHCP server)

The message that you receive is not really correct.

DHCPDISCOVER from 00:11:22:33:aa:bb via eth0: network 10.1.2.0/24: no free leases

In your case (proxyDHCP) a more appropriated message should only say

DHCPDISCOVER from 00:11:22:33:aa:bb via eth0: network 10.1.2.0/24

because the DHCPDISCOVER packet received by a proxyDHCP should never mention anything related to IP leases; a proxyDHCP does not provide IP addresses.

if you want to avoid these messages being logged you must check the proxyDHCP documentation and see if that is possible or not.

i.e. Serva as proxyDHCP logs the DHCPDISCOVERY and DHCPREQUEST packets from non-PXE clients and that behavior in this case cannot be turned off. (I'm related to Serva development)