DHCP client logging


On systems running Oracle Linux 7 or CentOS 7, DHCP client logging was easily readable and quite explicit. Here’s what the corresponding information in /var/log/messages looked like:

Jun  6 08:47:56 ... dhcp4 (enp3s0):   address
Jun  6 08:47:56 ... dhcp4 (enp3s0):   plen 24 (
Jun  6 08:47:56 ... dhcp4 (enp3s0):   gateway
Jun  6 08:47:56 ... dhcp4 (enp3s0):   lease time 43200
Jun  6 08:47:56 ... dhcp4 (enp3s0):   nameserver ''

Is there something similar under Rocky Linux 8 ? Here’s the only scarce bit of information I could display:

$ journalctl | grep dhcp
... dhcp4 (enp3s0): state changed new lease, address=

Any suggestions on how to retrieve the other bits of information (gateway, lease time, nameserver) in the logs ?

The “dhcp” lines come from NetworkManager, so we can discard other sources. Alas, journalctl -u NetworkManager does not have anything useful extra on top of those dhcp lines.

In fact, a quick browse does not see other data than the address in “files” within /run or /var

I wonder whether NM has logging options.

One could set the NM to use the dhcpclient. Someone stated that it might be more reliable in some cases than NM’s own client implementation. With the other client would come those familiar logs.

1 Like