From owner-freebsd-mobile Sun Oct 6 20:20:20 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D35E37B401 for ; Sun, 6 Oct 2002 20:20:19 -0700 (PDT) Received: from smtp.ufl.edu (sp16en1.nerdc.ufl.edu [128.227.74.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id B652643E6A for ; Sun, 6 Oct 2002 20:20:17 -0700 (PDT) (envelope-from bob88@bobj.org) Received: from bobj.dyndns.org (cpe-gan-68-101-90-216-cmcpe.ncf.coxexpress.com [68.101.90.216]) (authenticated bits=0) by smtp.ufl.edu (8.12.6/8.12.6/2.4.0) with ESMTP id g973KBsw035646 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 6 Oct 2002 23:20:13 -0400 Content-Type: text/plain; charset="iso-8859-1" From: Bob Johnson To: Eric Gebhart , FreeBSD mobile list Subject: Re: Mobile Networking. Date: Sun, 6 Oct 2002 23:19:56 -0400 X-Mailer: KMail [version 1.4] References: <20021006151306.B11678@unx.sas.com> In-Reply-To: <20021006151306.B11678@unx.sas.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200210062319.56654.bob88@bobj.org> X-Scanned-By: NERDC Open Systems Group (http://open-systems.ufl.edu/services/virus-scan/) Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sunday 06 October 2002 03:13 pm, Eric Gebhart appears to have=20 written: > When I started using my laptop last year I was immediately annoyed > by my networking setup. At home I have wireless. At work I had > wire. > > But If I had fxp0=3DDHCP in my rc.conf then the etc/networking script > would always do dhclient with it. Even if there was no connection on > it. Does that mean it is built in to the laptop and is not a pccard? It=20 won't try to use dhclient if it isn't in the system. > [...] > > Now I have wireless at work. So now I have multiple access points > to deal with. Each with it's own set of wep keys, channel, etc. [...] > > I have to think that these issues are common to most people who use > a laptop on more than one network. So how does everyone else deal > with these problems? In the past, I was fortunate to be able to use the simple expedient of=20 having a different pcmcia network card for each network I used my=20 laptop on. So in pccard.conf I ran whatever scripts were necessary=20 to configure the system for the network that went with a particular=20 card. I no longer take my laptop to work, and I'm not sure how I would deal=20 with it now because I'd be using the same wireless card I use at home. =20 It seems to me you are mostly on the right track. A script executed=20 when your wireless card is inserted can do whatever it takes to figure=20 out what network it is on and configure accordingly. Although I think=20 it would probably be better to use the hooks provided by dhclient so=20 that you won't run the script until after you have an IP number. Then=20 your script can probably identify the network based on IP number,=20 and configure accordingly. See dhclient-script(8), and look at the HOOKS section. Basically,=20 if you have an executable script named /etc/dhclient-exit-hooks,=20 dhclient will execute it after the interface is configured. There are=20 also hooks for running things before dhcp configuration where you=20 might be able to set WEP keys and such. E.g. it might ask you which=20 network you are on and then issue the appropriate ifconfig command=20 to set up the WEP keys, or it might even try the candidate keys in=20 sequence until it finds one that allows the wireless card to associate. =20 There real solutiion to the WEP key problem is to not use WEP,=20 e.g. have an IPsec server on each network and tunnel all of your=20 traffic through it. That has advantages for both you and the operator=20 of the network, but obviously you may not get to say how all of the=20 networks you use are operated. > > Eric - Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message