From owner-freebsd-questions Tue Sep 25 6:15:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail5.nc.rr.com (fe5.southeast.rr.com [24.93.67.52]) by hub.freebsd.org (Postfix) with ESMTP id EF21C37B438 for ; Tue, 25 Sep 2001 06:15:25 -0700 (PDT) Received: from i8k.babbleon.org ([66.57.85.154]) by mail5.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Tue, 25 Sep 2001 09:15:25 -0400 Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: David Strait Subject: Re: DHCP going nuts? Date: Tue, 25 Sep 2001 01:00:25 -0400 X-Mailer: KMail [version 1.2] Cc: freebsd-questions@FreeBSD.ORG References: <200109241221.f8OCLak22081@bmcgover-pc.cisco.com> In-Reply-To: <200109241221.f8OCLak22081@bmcgover-pc.cisco.com> MIME-Version: 1.0 Message-Id: <0109250100250B.03197@i8k.babbleon.org> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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