dhcpd-client floods /var/log/messages. Can I stop this?

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Tue Apr 27 07:58:57 PDT 2004

Bill Moran <wmoran at potentialtech.com> writes:

> Unfortunately, I couldn't find any config options for dhclient to
> reduce (or stop) the logging.

It's always possible to configure syslog to put the messages elsewhere
(or nowhere at all).  dhclient logs to the 'user' facility at the
'notice' level, so I just limit 'user' messages to the 'warning' level
in /var/log/messages, and have a separate log file for 'notice' (and

The relevant syslog.conf(5) lines look like this:
     *.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err;user.warning	/var/log/messages
     user.notice 					/var/log/user.messages

> However, I do have an improvement that can be implemented on the dhcp
> server.  If you see below, you default lease time is 10 minutes (600
> seconds)  In the logs, your lease is being renewed every 5 minutes (per
> the dhcp spec, the client should start trying to renew the lease
> halfway before it expires).

[Unless the server indicates a different renewal time... half the
lease is only a default.]

Also note that the original DHCP spec suggested leases be at least an
hour.  This requirement was removed when the spec was updated.

> So, one way to reduce the amount of data that is logged is to increase
> the default lease time.  If you have more addresses than you have
> machines (which is probably likely with the IP range you're using) you
> can safely set the lease time to several days (maybe even weeks ... I
> don't remember what the max value is).  If you set the default lease
> time to two days (for example) you will only get a renewal log message
> once a day.

The maximum value is 2 to the 32nd (minus one) seconds.  This is over
100 years.  In the environment described by the original poster,
there's no reason to be renewing every 10 minutes; he controls the
whole LAN.  

More information about the freebsd-questions mailing list