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=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




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