Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Feb 1998 09:48:04 -0700
From:      Warner Losh <imp@village.org>
To:        John Goerzen <jgoerzen@gesundheit.cs.twsu.edu>
Cc:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: Changing networks frequently 
Message-ID:  <199802031648.JAA20450@harmony.village.org>
In-Reply-To: Your message of "Mon, 02 Feb 1998 17:37:55 CST." <Pine.LNX.3.96.980202173135.15936A-100000@gesundheit.cs.twsu.edu> 
References:  <Pine.LNX.3.96.980202173135.15936A-100000@gesundheit.cs.twsu.edu>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.LNX.3.96.980202173135.15936A-100000@gesundheit.cs.twsu.edu> 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



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