Skip site navigation (1)Skip section navigation (2)
Date:      28 Oct 1997 11:10:32 +0000
From:      Simon Marlow <simonm@dcs.gla.ac.uk>
To:        freebsd-mobile@freebsd.org
Subject:   Re: How do you solve...
Message-ID:  <t63elmrvmf.fsf@solander.dcs.gla.ac.uk>
In-Reply-To: Poul-Henning Kamp's message of Mon, 27 Oct 1997 19:29:23 %2B0100
References:  <1548.877976963@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp <phk@critter.freebsd.dk> writes:

> >I take it back and forth between home and work.  I'd like it to have
> >different IP numbers at the two location.  I'd love for this to be
> >completely automatic.  Any chance of that happening?  Is DHCP what I
> >want to use?
> 
> I have two small aliases that 
> 
> 	home	(rm -f /var/tmp/@work)
> 	work	(touch /var/tmp/@work)
> 
> my /etc/pccard.ether (or whatever it is called today) looks for
> this file and decideds which IP to configure.  Works great.

Alternatively, you can try to do it automatically: my pccard_ether
tries each possible ifconfig in turn, pinging a known address to find
out where it is.  When a successful ping happens, it continues to
configure the system appropriately for the location.  Admittedly, this
is a hack, but it works fine.

Cheers,
	Simon

-- 
Simon Marlow						 simonm@dcs.gla.ac.uk
University of Glasgow			    http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?t63elmrvmf.fsf>