Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Oct 2002 23:19:56 -0400
From:      Bob Johnson <bob88@bobj.org>
To:        Eric Gebhart <saseag@unx.sas.com>, FreeBSD mobile list <freebsd-mobile@FreeBSD.ORG>
Subject:   Re: Mobile Networking.
Message-ID:  <200210062319.56654.bob88@bobj.org>
In-Reply-To: <20021006151306.B11678@unx.sas.com>
References:  <20021006151306.B11678@unx.sas.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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.

>
[...]
>
> 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.

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.  

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.

>
> Eric

- Bob


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?200210062319.56654.bob88>