From owner-freebsd-questions Fri Jul 27 5:54:47 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-141-144.mmcable.com [24.27.141.144]) by hub.freebsd.org (Postfix) with SMTP id 3F38F37B405 for ; Fri, 27 Jul 2001 05:54:42 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 62854 invoked by uid 100); 27 Jul 2001 12:54:41 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15201.25745.612595.527152@guru.mired.org> Date: Fri, 27 Jul 2001 07:54:41 -0500 To: Noah Dunker , dude@shell.schulte.org Cc: questions@freebsd.org Subject: RE: DHCP client IP In-Reply-To: <6823823@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ 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 Noah Dunker types: > Just in case... I forgot to explain how it works... > > It just uploads a file (by default, it's called ip.html) to a web-server > that you can FTP into. > > You can go there, and it'll show you the ifconfig information for your NIC, > so you know what it's IP address changed to. It would be better to use a dynamic DNS system. It's the same idea - your system tells a system at a known IP what it's IP is - but instead of putting it on an ftp server, you put it in a DNS server, so you can access things by name. If you don't care what the name is, take a look at . > Noah Dunker > Systems Analyst/Technician > Johnson County Community College > > > ------------ > > I hacked a script called "setip" I found on freshmeat. It's meant for ppp > dialups. > > This works fine. put it in Cron to run every 5 minutes. > > make sure your .netrc file has the FTP information to FTP in with your > username and password. > > yes, it's really a hacked kludge, but it works for me! > > #!/usr/local/bin/bash > if [ `ifconfig ep0 | wc -l ` -gt 1 ] > then > if [ "`cat ~/.ipaddr`" != "`ifconfig ep0`" ] > then > date > ~/.ip.dat > ifconfig tun0 >> ~/.ip.dat > ifconfig tun0 > ~/.ipaddr > ftp host.mydomain.com << EOTEXT > /dev/null > lcd /home/myaccount > cd /home/myaccount/public_html > put .ip.dat ip.html > EOTEXT > echo "PUT" > fi > fi > > > > -----Original Message----- > From: J [mailto:dude@shell.schulte.org] > Sent: Thursday, July 26, 2001 4:32 PM > To: Jonathan Chen > Cc: questions@FreeBSD.ORG > Subject: Re: DHCP client IP > > > I think you got me wrong. The client works fine. The only problem is, i > cant use remote access on it because i dont know what it's IP address is. > That's why i was asking if there was a way to guess what the next IP > address would be. > > thanks again. > > _______________________________________________ > > /"\ ASCII Ribbon campaign against E-Mail > \ / in gratuitous HTML and Microsoft > X proprietary formats. > / \ > > > On Fri, 27 Jul 2001, Jonathan Chen wrote: > > Date: Fri, 27 Jul 2001 09:16:52 +1200 > From: Jonathan Chen > To: J > Cc: questions@FreeBSD.ORG > Subject: Re: DHCP client IP > > On Thu, Jul 26, 2001 at 02:15:30PM -0500, J wrote: > > I've recently installed FreeBSD on one of the computers in my college's > > lab. All computers here are DHCP clients, and their IP addres is never > > static. Is there a way to predict the next IP address? Also, if the > > computer doesnt get logged off, will this prevent the IP address from > > regulating? Please cc: > > In /etc/rc.conf: > > ifconfig_xl0="DHCP" > > Change the xl0 to your NIC interface... > -- Mike Meyer http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message