dhclient and wpa_supplicant
Eric Schuele
e.schuele at computer.org
Sun Jul 31 13:58:22 GMT 2005
Sam Leffler wrote:
> Eric Schuele wrote:
>
>> Sam Leffler wrote:
>>
>>> Eric Schuele wrote:
>>>
>>
>> <big-snip>
>>
>>>> dhclient.conf contains
>>>> ===========================
>>>> interface "ath0" {
>>>> #send option host-name "myhost";
>>>> #send option domain-name "nxdomain.org";
>>>> send dhcp-client-identifier "myhost";
>>>>
>>>> media
>>>> ### Home
>>>> "ssid <home_ssid> mode 11b channel 11 wepmode on weptxkey 1 wepkey
>>>> 0x<home_wepkey>",
>>>> ### Office
>>>> "ssid <office_ssid mode 11b channel 6 wepmode on weptxkey 1 wepkey
>>>> 0x<office_wepkey>";
>>>> request subnet-mask, broadcast-address, routers,
>>>> domain-name-servers, domain-name;
>>>> }
>>>
>>>
>>>
>>>
>>> Do not use media statements to setup wireless parameters; this does
>>> not work. You need to run wpa_supplicant and let it identify the
>>> network and setup the key parameters.
>>
>>
>>
>> How do I tell wpa_supplicant about the network media? I had found an
>> older post of yours regarding NOT doing it in dhclient.conf.... but
>> I've found no other way to accomplish it.
>
>
> The above dhclient.conf lists media settings that are all handled by
> wpa_supplicant so you don't specify any of them. Specifically you set
> ssid, band, channel, and wep parameters; all these are handled by
> wpa_supplicant.
>
> The intent is that dhclient deal only with the dhcp protocol and stop
> being involved in the discovery and selection of wireless networks (a
> job wpa_supplicant is better equipped to handle).
>
>>
>>>
>>>>
>>>> wpa_supplicant.conf
>>>> =============================
>>>> ctrl_interface=/var/run/wpa_supplicant
>>>> ctrl_interface_group=wheel
>>>>
>>>> # Home Network
>>>> network={
>>>> ssid="<home_ssid>"
>>>> scan_ssid=1
>>>> key_mgmt=NONE
>>>> wep_tx_keyidx=0
>>>> wep_key0="<home_wepkey>"
>>>> }
>>>>
>>>> # Office Network
>>>> network={
>>>> ssid="<office_ssid>"
>>>> scan_ssid=1
>>>> key_mgmt=NONE
>>>> wep_tx_keyidx=0
>>>> wep_key0="<office_wepkey>"
>>>> }
>>>>
>>>
>>> Not sure you need scan_ssid set, I'd leave it out.
>>>
>>> If you have problems try disabling auto-startup of ath0 and run
>>> wpa_supplicant by hand with the -d flag to see what it's doing. Once
>>> that's going then enable startup in rc.conf. If you continue to have
>>> problems provide the output wpa_supplicant -d -i ath0 -c
>>> /etc/wpa_supplicant.conf (or similar) when you have trouble. There is
>>> also a pending issue with locating some ap's that are setup to hide
>>> their ssid. If one of the ap's is configured in this way contact me
>>> directly--I've been trying to collect the info I need to identify
>>> what's going on.
>>
>>
>>
>> Both my APs (home and office) hide their ssids. One is a wrt54g
>> (home), the other is linksys as well... though I forget the model at
>> the moment (FWIW its a/b/g). What can I do to provide the info you need?
>
>
> These should work; I've had reports of problems with certain Cisco ap's.
> Note however that configuring an ap to hide it's ssid adds no real
> security.
>
FWIW... I set my AP to broadcast the ssid. It then quickly associated
with it. But then dhclient 'broke the association' when it tried to
acquire a lease (I have removed the media lines from dhclient.conf)? and
subsequent wpa_supplicant attempts would no longer detect or associate
with the AP... till I reboot.
Attached is that log. (forgot to attach to last msg)
What else can I provide to help.
> Sam
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>
--
Regards,
Eric
-------------- next part --------------
Script started on Sun Jul 31 08:31:25 2005
You have mail.
fangorn# wpa_supplicant -d -i ath0 -c /etc/wpa_supplicant.conf &
[1] 607
fangorn# Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'default'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0 (from group name 'wheel')
Priority group 0
id=0 ssid='wLAN_WEP_Kx6L04o2'
id=1 ssid='laquinta-g'
Initializing interface (2) 'ath0'
Own MAC address: 00:0e:9b:53:31:9d
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_del_key: keyidx=0
wpa_driver_bsd_del_key: keyidx=1
wpa_driver_bsd_del_key: keyidx=2
wpa_driver_bsd_del_key: keyidx=3
wpa_driver_bsd_set_countermeasures: enabled=0
wpa_driver_bsd_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (2 BSSes)
Scan results: 2
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
1: 00:0f:66:00:ca:5c ssid='wLAN_WEP_Kx6L04o2' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
selected non-WPA AP 00:0f:66:00:ca:5c ssid='wLAN_WEP_Kx6L04o2'
Trying to associate with 00:0f:66:00:ca:5c (SSID='wLAN_WEP_Kx6L04o2' freq=2462 MHz)
Cancelling scan request
Automatic auth_alg selection: 0x1
No keys have been configured - skip key clearing
wpa_driver_bsd_set_key: alg=WEP addr=ff:ff:ff:ff:ff:ff key_idx=0 set_tx=1 seq_len=0 key_len=16
wpa_driver_bsd_set_drop_unencrypted: enabled=1
wpa_driver_bsd_associate: ssid 'wLAN_WEP_Kx6L04o2' wpa ie len 0 pairwise 4 group 4 key mgmt 2
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 5 sec 0 usec
Association event - clear replay counter
Associated to a new BSS: BSSID=00:0f:66:00:ca:5c
Associated with 00:0f:66:00:ca:5c
Cancelling authentication timeout
fangorn# ifconfig
bfe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
ether 00:0d:56:b4:f1:50
media: Ethernet autoselect (none)
status: no carrier
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:0e:9b:53:31:9d
media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
status: associated
ssid wLAN_WEP_Kx6L04o2 channel 11 bssid 00:0f:66:00:ca:5c
authmode OPEN privacy ON deftxkey 1 wepkey 1:128-bit txpowmax 54
protmode CTS roaming MANUAL bintval 250
fwe0: flags=108802<BROADCAST,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
options=8<VLAN_MTU>
ether 3a:4f:c0:57:18:81
ch 1 dma -1
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
fangorn# dhclient ath0
Setting scan request: 0 sec 100000 usec
Added BSSID 00:0f:66:00:ca:5c into blacklist
Disconnect event - remove keys
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No APs found - clear blacklist and try again
Removed BSSID 00:0f:66:00:ca:5c from blacklist (clear)
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 14
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
^C
fangorn# ifcoStarting AP scan (broadcast SSID)
fniReceived 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
g
ifcofnig: Command not found.
fangorn# Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Selecting BSS from priority group 0
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
[Kfangorn# Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:13:10:94:f4:07 ssid='linksys' wpa_ie_len=0 rsn_ie_len=0
skip - no WPA/RSN IE
No suitable AP found.
Setting scan request: 5 sec 0 usec
exit
exit
Script done on Sun Jul 31 08:33:32 2005
More information about the freebsd-questions
mailing list