From owner-freebsd-questions Mon Nov 5 8:55:50 2001 Delivered-To: freebsd-questions@freebsd.org Received: from pr0n.kutulu.org (pr0n.kutulu.org [151.196.107.157]) by hub.freebsd.org (Postfix) with ESMTP id 3B3BB37B405 for ; Mon, 5 Nov 2001 08:55:47 -0800 (PST) Received: (from kutulu@localhost) by pr0n.kutulu.org (8.11.6/8.11.6) id fA5Gtbl95312; Mon, 5 Nov 2001 11:55:37 -0500 (EST) (envelope-from kutulu) Date: Mon, 5 Nov 2001 11:55:36 -0500 From: Kutulu To: Peter Brezny Cc: freebsd-questions@FreeBSD.ORG Subject: Re: forcing renew of DHCP lease Message-ID: <20011105115536.A94984@pr0n.kutulu.org> Mail-Followup-To: Peter Brezny , freebsd-questions@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from peter@skyrunner.net on Mon, Nov 05, 2001 at 11:36:02AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Nov 05, 2001 at 11:36:02AM -0500, Peter Brezny wrote: > How do you force an interface to renew its dhcp lease? (NB: I haven't use DHCP since I switched to BSD, but...) man dhclient: The -1 flag cause dhclient to try once to get a lease. If it fails, dhclient exits with exit code two. I assume it should work even if the client already has a lease. You might also check /sbin/dhclient-script: it should get called with $reason = RENEW whenever the DHCP lease gets renewed normally, so you should be able to just duplicate that. Possibly even call it directly, but I'd read the man pages & script(s) carefully first. --K To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message