From owner-freebsd-mobile Tue Mar 21 21:17:59 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from ptldpop5.ptld.uswest.net (mail.ptld.uswest.net [198.36.160.5]) by hub.freebsd.org (Postfix) with SMTP id D236F37BFA4 for ; Tue, 21 Mar 2000 21:17:53 -0800 (PST) (envelope-from wwoods@cybcon.com) Received: (qmail 24943 invoked by alias); 22 Mar 2000 05:17:47 -0000 Delivered-To: fixup-freebsd-mobile@FreeBSD.ORG@fixme Received: (qmail 24902 invoked by uid 0); 22 Mar 2000 05:17:43 -0000 Received: from unknown (HELO laptop.cybcon.com) (63.227.213.90) by pop.ptld.uswest.net with SMTP; 22 Mar 2000 05:17:43 -0000 Content-Length: 3103 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20000321233526.F85043@cc942873-a.ewndsr1.nj.home.com> Date: Tue, 21 Mar 2000 21:17:42 -0800 (PST) Reply-To: bwoods2@uswest.net From: William Woods To: cjclark@home.com Subject: Re: switching between connected/disconnected operation? Cc: freebsd-mobile@FreeBSD.ORG, Lars Eggert Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I have done EXACTLY this....I use a few scripts called: 1) Worklan ifconfig ep0 inet 63.227.213.90 netmask 255.255.255.248 ifconfig ep0 up route add default 63.227.213.94 ifconfig -a 2) Homelan ifconfig ep0 inet 63.227.213.90 netmask 255.255.255.248 ifconfig ep0 up route add default 205.147.64.44 ifconfig -a 3) Dialup ppp -auto cybcon I put these scripts in /usr/local/sbin, made them executable. Now, when I boot I use the script I want depending on where I am. Also, need to be root to run these. On 22-Mar-00 Crist J. Clark wrote: > On Tue, Mar 21, 2000 at 06:40:54PM +0000, Lars Eggert wrote: >> Hi, >> >> we're trying to come up with a way to configure our laptops so that we >> can easily switch between connected (i.e. we have a net) and >> disconnected (we have no net) states. This does not need to be >> automatic (would be nice though), having users type "net on|off" in a >> shell is perfectly fine. >> >> Looking at /etc, it seems that what we'd like requires non-trivial >> changes to the configuration; the laptops we'd like this for run a >> number of services that would need to be started/stopped: NIS, NFS >> (clients), inetd, sendmail, sshd, lpd, amd, named, etc. Some of these >> should be okay to leave running when disconnecting (e.g. inetd, sshd). >> Others (NIS, NFS, amd) must be stopped/restarted. >> >> Has anyone ever done this? How? Any pointers? This is for 4.0-RELEASE, >> btw. > > I am very interested in this too, and what I would like to do is even > more complicated. There are four basic network states I would have my > notebook in, > > 1) Ethernet on 192.168.x.0 LAN in my apartment > > 2) Ethernet on 192.168.y.0 LAN in my office > > 3) Dial-in, PPP, to the registered net in the office > > 4) Stand-alone > > Some states would preferably have NFS mounted volumes; some would even > want to run services like NIS or Samba. All networked states need to > have DNS handled from both the standpoint of different servers and > what the machine gives itself for the domain portion of the hostname. > > Right now, I need to get in there and do some serious tweaking as root > to get one setup to work after being in another. Ideally, I'd want to > make the computer figure out which net it is on during boot, but I > think this might not be the level to start at. My first goal is to > script or otherwise automate the changes root does to go from one > state to the other. > > I am sure others out there have wanted to use their notebooks in ways > like this. How have you all handled it? > -- > Crist J. Clark cjclark@home.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-mobile" in the body of the message ---------------------------------- E-Mail: bwoods2@uswest.net Date: 21-Mar-00 Time: 21:13:36l ---------------------------------- NOTICE TO BULK E-MAILERS: Pursuant to US Code, Title 47, Chapter 5, Subchapter II, 227, and all unsolicited commercial e-mail sent to this address is subject to a download and archival fee in the amount of $500 US To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message