Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Aug 2000 19:14:03 -0500
From:      "Chris Silva" <bitsurfer@mediaone.net>
To:        "Nathaniel G H" <bsd_appliance@bemail.org>, <freebsd-questions@FreeBSD.ORG>
Subject:   RE: DHCP "refresh" question
Message-ID:  <KCELIGPCPGAIDMNBHMOGGEGHDDAA.bitsurfer@mediaone.net>
In-Reply-To: <200008231928.MAA03243@mail2.bigmailbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Here' what I did, it's not the best way I'm sure, but this works perfect for
me ;)
Oh, xl0 is MY nic, insert yours....

/etc/renew.dhcp
dpid=`ps aux |grep "dhclient " |awk '{print $2}'`
kill -9 ${dpid}
/sbin/dhclient xl0

/etc/crontab
# Kill and renew the DHCP settings for my cable modem
0	0,4,8,12,16,20	*	*	*	root	/etc/renew.dhcp



#-----Original Message-----
#From: owner-freebsd-questions@FreeBSD.ORG
#[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Nathaniel G H
#Sent: Wednesday, August 23, 2000 2:28 PM
#To: freebsd-questions@FreeBSD.ORG
#Subject: Re: DHCP "refresh" question
#
#
#>> How can I fix this?  Is there any way to tell the machine to
#>> obtain a new address when there is no route to an external host?
#>
#>The easy way would be to kill the dhclient and restart it...
#
#That is quite obvious, and very simple... but it requires human
#intervention.  I was trying to find out if there is a way to do
#this automatically.  It needs to happen when the DHCP address is
#no longer valid, but the lease time has not expired.
#
#Thanks,
#NGH
#
#
#------------------------------------------------------------
#Free email: http://BeMail.org/
#Free BeOS: http://free.be.com/
#
#
#
#
#To Unsubscribe: send mail to majordomo@FreeBSD.org
#with "unsubscribe freebsd-questions" in the body of the message



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?KCELIGPCPGAIDMNBHMOGGEGHDDAA.bitsurfer>