Skip site navigation (1)Skip section navigation (2)
Date:      06 Feb 2004 11:48:55 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        zhangweiwu@realss.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: to let dhclient renew ip address
Message-ID:  <44hdy4887c.fsf@be-well.ilk.org>
In-Reply-To: <Law11-F60d27sVXiT5800039f3a@hotmail.com>
References:  <Law11-F60d27sVXiT5800039f3a@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Zhang Weiwu" <weiwuzhang@hotmail.com> 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.



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