From owner-freebsd-mobile Tue Oct 28 03:11:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA15320 for mobile-outgoing; Tue, 28 Oct 1997 03:11:27 -0800 (PST) (envelope-from owner-freebsd-mobile) Received: from vanuata (vanuata.dcs.gla.ac.uk [130.209.240.50]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA15297 for ; Tue, 28 Oct 1997 03:11:15 -0800 (PST) (envelope-from simonm@dcs.gla.ac.uk) Received: from solander.dcs.gla.ac.uk (actually host solander) by vanuata with SMTP (MMTA) with ESMTP; Tue, 28 Oct 1997 11:10:34 +0000 Received: (from simonm@localhost) by solander.dcs.gla.ac.uk (8.8.7/8.8.7) id LAA03462; Tue, 28 Oct 1997 11:10:32 GMT To: freebsd-mobile@freebsd.org Subject: Re: How do you solve... References: <1548.877976963@critter.freebsd.dk> From: Simon Marlow Date: 28 Oct 1997 11:10:32 +0000 In-Reply-To: Poul-Henning Kamp's message of Mon, 27 Oct 1997 19:29:23 +0100 Message-ID: Lines: 28 X-Mailer: Gnus v5.3/Emacs 19.34 Sender: owner-freebsd-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Poul-Henning Kamp 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