Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2001 16:58:52 -0500
From:      Noah Dunker <ndunker@jccc.net>
To:        Noah Dunker <ndunker@jccc.net>, 'J' <dude@shell.schulte.org>, Jonathan Chen <jonathan.chen@itouch.co.nz>
Cc:        questions@FreeBSD.ORG
Subject:   RE: DHCP client IP
Message-ID:  <C18E28011272D41180AD00B0D0496C0801C021EE@ns-exch05>

next in thread | raw e-mail | index | archive | help
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.

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 <jonathan.chen@itouch.co.nz>
To: J <dude@shell.schulte.org>
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

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?C18E28011272D41180AD00B0D0496C0801C021EE>