From owner-freebsd-questions@FreeBSD.ORG Tue Apr 27 07:27:46 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 350B216A4CE for ; Tue, 27 Apr 2004 07:27:46 -0700 (PDT) Received: from internet.potentialtech.com (h-66-167-251-6.phlapafg.covad.net [66.167.251.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id C66D743D5C for ; Tue, 27 Apr 2004 07:27:45 -0700 (PDT) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com (pa-plum1c-102.pit.adelphia.net [24.53.179.102]) by internet.potentialtech.com (Postfix) with ESMTP id ECC0B69A7B; Tue, 27 Apr 2004 10:27:44 -0400 (EDT) Message-ID: <408E6D34.3080704@potentialtech.com> Date: Tue, 27 Apr 2004 10:24:52 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rob References: <408DBF4D.1000900@users.sourceforge.net> In-Reply-To: <408DBF4D.1000900@users.sourceforge.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: dhcpd-client floods /var/log/messages. Can I stop this? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2004 14:27:46 -0000 Rob wrote: > Hi, > > I have a PC that gets its internet via dhcp-client. > Eventually this will connect to my ISP, but for now it > is served by a dhcpd-server on another FreeBSD PC of mine. Your question got me curious, so I did a little hunting ... Unfortunately, I couldn't find any config options for dhclient to reduce (or stop) the logging. 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). 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. HTH. > On the server, /usr/local/etc/dhcpd.conf is configured > as: > authoritative; > ddns-update-style ad-hoc; > subnet 10.0.0.0 netmask 255.255.255.0 { > range 10.0.0.2 10.0.0.254; > option routers 10.0.0.1; > option broadcast-address 10.0.0.255; > option subnet-mask 255.255.255.0; > option domain-name "thuis.domein"; > option domain-name-servers ercc.snu.ac.kr, erccw1.snu.ac.kr; > > default-lease-time 600; > max-lease-time 7200; > } > > When I go to the client PC (10.0.0.254) and check its > /var/log/messages file, it is flooded with lines like this: > > [...] > Apr 27 10:28:21 router dhclient: New Network Number: 10.0.0.0 > Apr 27 10:28:21 router dhclient: New Broadcast Address: 10.0.0.255 > Apr 27 10:33:14 router dhclient: New Network Number: 10.0.0.0 > Apr 27 10:33:14 router dhclient: New Broadcast Address: 10.0.0.255 > Apr 27 10:37:57 router dhclient: New Network Number: 10.0.0.0 > Apr 27 10:37:57 router dhclient: New Broadcast Address: 10.0.0.255 > Apr 27 10:42:28 router dhclient: New Network Number: 10.0.0.0 > Apr 27 10:42:28 router dhclient: New Broadcast Address: 10.0.0.255 > Apr 27 10:46:24 router dhclient: New Network Number: 10.0.0.0 > Apr 27 10:46:24 router dhclient: New Broadcast Address: 10.0.0.255 > Apr 27 10:51:11 router dhclient: New Network Number: 10.0.0.0 > Apr 27 10:51:11 router dhclient: New Broadcast Address: 10.0.0.255 > Apr 27 10:54:58 router dhclient: New Network Number: 10.0.0.0 > Apr 27 10:54:58 router dhclient: New Broadcast Address: 10.0.0.255 > > > I don't need all these lines in my messages file; it actually obscures > other relevant information in here. What can I do to dhclient to > not do this? -- Bill Moran Potential Technologies http://www.potentialtech.com