From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 08:48:59 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 F02A716A4CF for ; Fri, 6 Feb 2004 08:48:59 -0800 (PST) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F35A43D41 for ; Fri, 6 Feb 2004 08:48:56 -0800 (PST) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.no-ip.com ([66.30.196.44]) by comcast.net (rwcrmhc13) with ESMTP id <2004020616485601500jqpvoe>; Fri, 6 Feb 2004 16:48:56 +0000 Received: by be-well.no-ip.com (Postfix, from userid 1147) id B829411; Fri, 6 Feb 2004 11:48:55 -0500 (EST) Sender: lowell@be-well.ilk.org To: zhangweiwu@realss.com References: From: Lowell Gilbert Date: 06 Feb 2004 11:48:55 -0500 In-Reply-To: Message-ID: <44hdy4887c.fsf@be-well.ilk.org> Lines: 22 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: to let dhclient renew ip address X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 16:49:00 -0000 "Zhang Weiwu" writes: > I am using a notebook (5.2 on a Thinkpad T40). Sometimes I move it > from one room to another (managed by different dhcp server), and I > cannot figure out a fast way to tell the dhclient(8) to renew my > address. I read the manuals. It seems the only way I can do is to: > > weiwu>su > (su to root) > #setenv interface fxp0 > #setenv reason RENEW > #dhclient-script > (.... dhclient output) > > Isn't there a faster way to do it? I am courious why not dhclient be > designed to just renew the address upon receiving a signal, say INT? According to dhclient(8), OMAPI is used for this sort of functionality, and omshell(1) should be able to do this kind of manipulation (including "suspending" the agent instead of stopping it). You do need to set up authentication first, even for local use. Otherwise, you can always just kill and restart the dhclient.