Re: switching between WAPs

2007-09-20 Thread Heiko Wundram (Beenic)
Am Donnerstag 20 September 2007 04:47:03 schrieb C Thala:
 That OS from the NorthWestern US seems to keep a list of WAPs and will
 detect whenever you are in the vicinity of one and use the available
 one. How can I get FreeBSD to do the same?

Try setting up a wpa_supplicant configuration (and putting WPA DHCP in 
rc.conf); that does the proximity-switching for you (and does so for me, 
happily).

I don't really know whether wpa_supplicant works with non-security-enabled 
(i.e. non-WEP and non-WPA) wireless networks, but I guess there's a switch to 
tell it to do so.

-- 
Heiko Wundram
Product  Application Development
-
Office Germany - EXPO PARK HANNOVER
 
Beenic Networks GmbH
Mailänder Straße 2
30539 Hannover
 
Fon+49 511 / 590 935 - 15
Fax+49 511 / 590 935 - 29
Mail   [EMAIL PROTECTED]


Beenic Networks GmbH
-
Sitz der Gesellschaft: Hannover
Geschäftsführer: Jorge Delgado
Registernummer: HRB 61869
Registergericht: Amtsgericht Hannover
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: switching between WAPs

2007-09-20 Thread Matthias Apitz
El día Thursday, September 20, 2007 a las 08:43:57AM +0200, Heiko Wundram 
(Beenic) escribió:

 Am Donnerstag 20 September 2007 04:47:03 schrieb C Thala:
  That OS from the NorthWestern US seems to keep a list of WAPs and will
  detect whenever you are in the vicinity of one and use the available
  one. How can I get FreeBSD to do the same?
 
 Try setting up a wpa_supplicant configuration (and putting WPA DHCP in 
 rc.conf); that does the proximity-switching for you (and does so for me, 
 happily).
 
 I don't really know whether wpa_supplicant works with non-security-enabled 
 (i.e. non-WEP and non-WPA) wireless networks, but I guess there's a switch to 
 tell it to do so.

I have some 10 diffrent AP in my file /etc/wpa_supplicant.conf
because I'm traveling often to diffrent locations of our company,
WPA-PSK and WEP, for example:


# Coimbra
#
network={
ssid=x
key_mgmt=WPA-PSK
psk=x
}

# Westeregeln
#
network={
ssid=x
scan_ssid=0
key_mgmt=NONE
wep_tx_keyidx=0
wep_key0=x
}

in /etc/rc.conf I only have

ifconfig_iwi0=WPA

but in addition I'm using the daemon devd(8) to set the IP stuff
of iwi0 accordingly to the network I'm associating; you need two
files for this:

/usr/local/etc/devd/iwi.conf

notify 1 {
match system  IFNET;
match subsystem   iwi0;
match typeLINK_UP;
action /usr/local/etc/devd/iwi.sh $subsystem $type;
};
notify 1 {
match system  IFNET;
match subsystem   iwi0;
match typeLINK_DOWN;
action /usr/local/etc/devd/iwi.sh $subsystem $type;
};

and the work is done in the sheel script /usr/local/etc/devd/iwi.sh
like for example:

#!/bin/sh
#
echo `date`: $0 $*  /tmp/devd.out

case $2 in
'LINK_DOWN')
exit 0 ;
;;
esac

ap=`/sbin/ifconfig iwi0 list sta | awk '{print $1;}' | fgrep -v ADDR`

case ${ap} in

'00:04:e2:a1:76:0b')
printf ap [%s] seems to be the Oberhaching office\n ${ap}  
/tmp/devd.out ;
#
ifconfig bge0 222.222.222.2 netmask 255.255.255.0
ifconfig bge0 down
dhclient iwi0
#
# drop and reload the firewall rules
ipf -D
ipf -E
ipmon -Ds
ipf -Fa -f /etc/ipf.rules.sisis
ipnat -CF -f /etc/ipnat.rules.sisis
;;
...
*)
printf ap [%s] not known in %s\n ${ap} $0  /tmp/devd.out ;
;;
esac

exit 0

this means when you get associated to an AP and LINK comes UP, the
devd(8) wakes up and runs the sheel script doing all the right work;
works really nice;

matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC PICA GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e [EMAIL PROTECTED] - w http://www.oclcpica.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


switching between WAPs

2007-09-19 Thread C Thala
I have two primary WAPs that I connect to on my FreeBSD desktop, my
rc.conf contains these entries:

   ifconfig_ipw0=ssid wap1 DHCP
   ifconfig_ipw0=ssid wap2 DHCP

The problem is that depending on which place I am at, I have to boot
up, have networking fail, edit the rc.conf file, comment out the WAP I
am not using and uncomment the WAP I am using and either restart netif
or reboot.

I have to do this everytime I go to the other wap.

That OS from the NorthWestern US seems to keep a list of WAPs and will
detect whenever you are in the vicinity of one and use the available
one. How can I get FreeBSD to do the same?

C
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]