Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2001 11:55:36 -0500
From:      Kutulu <kutulu@kutulu.org>
To:        Peter Brezny <peter@skyrunner.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: forcing renew of DHCP lease
Message-ID:  <20011105115536.A94984@pr0n.kutulu.org>
In-Reply-To: <NEBBIGLHNDFEJMMIEGOOAEAAEFAA.peter@skyrunner.net>; from peter@skyrunner.net on Mon, Nov 05, 2001 at 11:36:02AM -0500
References:  <NEBBIGLHNDFEJMMIEGOOAEAAEFAA.peter@skyrunner.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011105115536.A94984>