Date: Mon, 7 Oct 2002 00:53:42 -0400 From: Eric Gebhart <saseag@unx.sas.com> To: FreeBSD mobile list <freebsd-mobile@freebsd.org> Subject: Re: Mobile Networking. Message-ID: <20021007005342.I11678@unx.sas.com> In-Reply-To: <200210062319.56654.bob88@bobj.org>; from bob88@bobj.org on Sun, Oct 06, 2002 at 11:19:56PM -0400 References: <20021006151306.B11678@unx.sas.com> <200210062319.56654.bob88@bobj.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Bob Johnson's Original Message ----- > On Sunday 06 October 2002 03:13 pm, Eric Gebhart appears to have > 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=DHCP 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 > won't try to use dhclient if it isn't in the system. Yep. Builtin. So if I want to use the wireless pccard I have to comment out the fxp0 entry in rc.conf. > [...] > > > > 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 > having a different pcmcia network card for each network I used my > laptop on. So in pccard.conf I ran whatever scripts were necessary > to configure the system for the network that went with a particular > card. > > I no longer take my laptop to work, and I'm not sure how I would deal > with it now because I'd be using the same wireless card I use at home. > It seems to me you are mostly on the right track. A script executed > when your wireless card is inserted can do whatever it takes to figure > out what network it is on and configure accordingly. Although I think > it would probably be better to use the hooks provided by dhclient so > that you won't run the script until after you have an IP number. Then > your script can probably identify the network based on IP number, > and configure accordingly. But you can't get your IP number until you have a network. And you can't have a network until you know which AP you are talking to, get past WEP... > > See dhclient-script(8), and look at the HOOKS section. Basically, > if you have an executable script named /etc/dhclient-exit-hooks, > dhclient will execute it after the interface is configured. There are > also hooks for running things before dhcp configuration where you > might be able to set WEP keys and such. E.g. it might ask you which > network you are on and then issue the appropriate ifconfig command > to set up the WEP keys, or it might even try the candidate keys in > sequence until it finds one that allows the wireless card to associate. I have used the dhclient hooks in the past. It might be a good idea to use them for this. My current solution is to turn off dhcp. That keeps rc.network from doing stupid things. I have a script in /usr/local/etc/rc.d/ which is the important parts of rc.network surrounded by a little bit of intelligence. It figures out which devices are active, and chooses the most preferred one. Currently I have an additional loop that tries to detect known AP's if the chosen device is wireless. After all that I run dhclient on it. I think I got a better method off list. It modifies the pccardd behavior to detect the AP's. This is the flakey part of my system. So anything I can do to make it work better is a good thing. After all that, I have another rc.d script that figures out the Network location. I attempt to locate a known machine on one of the known networks. if it finds it then it runs that networks's startup-hook. Otherwise it runs a default startup-hook. > There real solutiion to the WEP key problem is to not use WEP, > e.g. have an IPsec server on each network and tunnel all of your > traffic through it. That has advantages for both you and the operator > of the network, but obviously you may not get to say how all of the > networks you use are operated. I agree with that. I hate WEP. But at work they insist on it. Even when we use tunnels. I like the tunnel method better. WAR people may think it's an open AP. But they won't get anywhere with it. > - Bob Eric To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021007005342.I11678>