From owner-freebsd-questions Thu Jul 26 14:57:25 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ns-exch05.jccc.net (ns-exch05.jccc.net [198.248.56.5]) by hub.freebsd.org (Postfix) with ESMTP id E38C137B401 for ; Thu, 26 Jul 2001 14:57:20 -0700 (PDT) (envelope-from ndunker@jccc.net) Received: by ns-exch05 with Internet Mail Service (5.5.2653.19) id <3MZQP4PJ>; Thu, 26 Jul 2001 16:56:49 -0500 Message-ID: From: Noah Dunker To: 'J' , Jonathan Chen Cc: questions@FreeBSD.ORG Subject: RE: DHCP client IP Date: Thu, 26 Jul 2001 16:56:46 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" 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 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... 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