From owner-freebsd-mobile Tue Feb 3 08:48:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA20367 for freebsd-mobile-outgoing; Tue, 3 Feb 1998 08:48:18 -0800 (PST) (envelope-from owner-freebsd-mobile@FreeBSD.ORG) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id IAA20341 for ; Tue, 3 Feb 1998 08:48:11 -0800 (PST) (envelope-from imp@village.org) Received: from harmony [10.0.0.6] by rover.village.org with esmtp (Exim 1.71 #1) id 0xzlVo-0005SF-00; Tue, 3 Feb 1998 09:47:52 -0700 Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.8.8/8.8.3) with ESMTP id JAA20450; Tue, 3 Feb 1998 09:48:05 -0700 (MST) Message-Id: <199802031648.JAA20450@harmony.village.org> To: John Goerzen Subject: Re: Changing networks frequently Cc: freebsd-mobile@FreeBSD.ORG In-reply-to: Your message of "Mon, 02 Feb 1998 17:37:55 CST." References: Date: Tue, 03 Feb 1998 09:48:04 -0700 From: Warner Losh Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe freebsd-mobile" In message John Goerzen writes: : I have what I hope is a simple question. : : I have an IBM Thinkpad 310ED (P133MMX) and have put FreeBSD 2.2.5 release : on it (works great; see below). I also have a Linksys PCMCIA ethernet : "combo" card (does 10baseT and 10base2). I will be using this machine in : at least two different network environments (different IP address, : netmask, nameservers, routers, etc.). ... : So, my question is: How do I easily reconfigure the laptop when switching : between these networks? One thing I considered was to tar up all the : configs for each network and just untar the stuff into the root directory. : But that doesn't quite take care of everything. I have an ultra simple script called "netloc" that will copy files from a cached area. sudo netloc home or sudo netloc work changes the IP address, resolv.conf, etc for me. : But -- network A is behind a firewall, and the hostname of the smart host : there is not resolvable anywhere else. When I am on network B, sendmail : quickly bounces all the messages that are queued up, claiming that the : smart host doesn't exist because it couldn't look up its name. This is a : rather puzzling thing and I'm not quite sure what to do about it. (When : not connected to any network, it deferrs the message with a "no route to : host" indication, which is very good. I just hook it up and run sendmail : -q to send the stuff.) Hmmm, you could put that host in your /etc/hosts file. Have it search that last and use a "bogus" unroutable IP address if the host's real address isn't unreachable from network B. I have my laptop live in three places, and the one thing I had to do was kill and restart sendmail each time. There are likely other gotchas that I've not pressed the envelope enough to see yet. Mike Smith also posted a longish script to do this a couple of months ago. It should be in the archives... Warner