Date: Tue, 25 Sep 2001 01:00:25 -0400 From: Brian T.Schellenberger <bts@babbleon.org> To: David Strait <basilisk@umail.ucsb.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: DHCP going nuts? Message-ID: <0109250100250B.03197@i8k.babbleon.org> In-Reply-To: <200109241221.f8OCLak22081@bmcgover-pc.cisco.com> References: <200109241221.f8OCLak22081@bmcgover-pc.cisco.com>
next in thread | previous in thread | raw e-mail | index | archive | help
David Strait wrote: > >I'm having a problem with my dhclient, or, for the most part, setting up > > my internet numbers. The problem follows an unusual pattern. > > [...] > > >My number is xxx.yyy.zzz.173 "Your" number? Assigned by whom? > >On FreeBSD, my dhclient gets this address: > >xxx.yyy.zzz.172 If you use dhclient, then whatever it assigns you is supposed to be your number for that session; if you use DHCP then you don't *have* a static address, so you shouldn't have hardcoded assumptions that you do. Rather, your code should dynamically use the one that session was assigned. Here's one way to do it in a script: set ipaddr = `ifconfig fxp0 | grep inet | tr '\t' ' ' | sed -e 's/^.*inet //' -e 's/ .*$//'` I'm sure there are lots of other ways to do this as well. 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?0109250100250B.03197>