The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Networking

Networking Network related discussions (including general TCP/IP stuff, routing, etc).

Reply
 
Thread Tools Display Modes
  #1  
Old November 5th, 2009, 14:10
idle idle is offline
Junior Member
 
Join Date: Nov 2008
Location: Russia, Saint Petersburg
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Question hostapd problem.

Hello.
I'm trying to setup wireless AP using ral under FreeBSD7.2.
Here is my configuration:
Code:
[root@razumit ~]#cat /etc/hostapd.conf
interface=ral0
driver=bsd
logger_syslog=3
logger_syslog_level=3
logger_stdout=3
logger_stdout_level=3
debug=3
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=freebsdAP
macaddr_acl=0
auth_algs=3
eapol_key_index_workaround=0
own_ip_addr=192.168.0.1
wpa=1
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK WPA-EAP
wpa_pairwise=TKIP CCMP
[root@razumit ~]#ifconfig ral0 list caps
ral0=2181e500<IBSS,HOSTAP,TXPMGT,SHSLOT,SHPREAMBLE,MONITOR,WPA1,WPA2,BGSCAN>
[root@razumit ~]#ifconfig ral0
ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:21:91:82:30:57
        inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
        media: IEEE 802.11 Wireless Ethernet autoselect <hostap> (autoselect <hostap>)
        status: associated
        ssid freebsdAP channel 11 (2462 Mhz 11g) bssid 00:21:91:82:30:57
        authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit txpower 50
        scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7
        roam:rate11g 5 protmode CTS dtimperiod 1
When I'm trying to connect from station, its ask for pass, and report no answer from AP.
tcpdump -iral0 with various options show nothing, hmm.
Perhaps I'm missing something obvious, but I can't get it.
Reply With Quote
  #2  
Old November 5th, 2009, 14:53
SirDice's Avatar
SirDice SirDice is offline
Giant Locked
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 2,637
Thanks: 5
Thanked 286 Times in 278 Posts
Default

Do you also have in /etc/rc.conf:
Code:
hostapd_enable="YES"
And have hostapd running?

# /etc/rc.d/hostapd start
__________________
Oliver's Law:
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old November 5th, 2009, 15:13
idle idle is offline
Junior Member
 
Join Date: Nov 2008
Location: Russia, Saint Petersburg
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sure.
I've tried to debug it with hostapd -ddd /etc/hostapd.conf.
But got nothing.
Reply With Quote
  #4  
Old November 5th, 2009, 15:16
SirDice's Avatar
SirDice SirDice is offline
Giant Locked
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 2,637
Thanks: 5
Thanked 286 Times in 278 Posts
Default

Are all the needed wlan modules loaded?

Post the output of kldstat. Also what's in /etc/rc.conf regarding the network interface?
__________________
Oliver's Law:
Experience is something you don't get until just after you need it.
Reply With Quote
  #5  
Old November 5th, 2009, 16:19
idle idle is offline
Junior Member
 
Join Date: Nov 2008
Location: Russia, Saint Petersburg
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by SirDice View Post
Are all the needed wlan modules loaded?

Post the output of kldstat. Also what's in /etc/rc.conf regarding the network interface?
I guess so. It complained about wlan_xuath, until I've compiled it to kernel.
Code:
[root@razumit ~]#kldstat -v | grep wlan
                332 wlan_scan_sta
                331 wlan_scan_ap
                330 wlan
                329 wlan_wep
                328 wlan_tkip
                327 wlan_ccmp
                326 wlan_amrr
                333 wlan_xauth
[root@razumit ~]#grep ifc /etc/rc.conf
ifconfig_ral0="inet 192.168.0.1/24 ssid freebsdAP channel 11 mediaopt hostap"
[root@razumit ~]#ifconfig
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=2808<VLAN_MTU,WOL_UCAST,WOL_MAGIC>
        ether 00:21:91:1f:c4:10
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
ral0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:21:91:82:30:57
        inet 192.168.0.1 netmask 0xfffffff0 broadcast 192.168.0.15
        media: IEEE 802.11 Wireless Ethernet autoselect <hostap> (autoselect <hostap>)
        status: no carrier
        ssid freebsdAP channel 11 (2462 Mhz 11g)
        authmode AUTO privacy OFF deftxkey 2 txpower 50 scanvalid 60 bgscan
        bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 roam:rate11g 5
        protmode CTS dtimperiod 1
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet 127.0.0.1 netmask 0xff000000
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
        inet 89.112.0.167 --> 81.9.101.110 netmask 0xffffffff
        Opened by PID 385
Reply With Quote
  #6  
Old November 5th, 2009, 16:24
idle idle is offline
Junior Member
 
Join Date: Nov 2008
Location: Russia, Saint Petersburg
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It was down by the moment I wrote the reply, but this is not the reason.
When I'm testing it is up, like in first ifconfig output.
Reply With Quote
  #7  
Old November 5th, 2009, 18:06
SirDice's Avatar
SirDice SirDice is offline
Giant Locked
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 2,637
Thanks: 5
Thanked 286 Times in 278 Posts
Default

Try running # hostapd -ddK /etc/hostapd.conf to see if the key it receives is correct.
__________________
Oliver's Law:
Experience is something you don't get until just after you need it.
Reply With Quote
  #8  
Old November 5th, 2009, 19:06
idle idle is offline
Junior Member
 
Join Date: Nov 2008
Location: Russia, Saint Petersburg
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
[root@razumit ~]#hostapd -ddK /etc/hostapd.conf
Configuration file: /etc/hostapd.conf
ctrl_interface_group=0
bsd_set_iface_flags: dev_up=0
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
ral0: IEEE 802.11 Fetching hardware channel/rate support not supported.
Flushing old station entries
bsd_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
Deauthenticate all stations
bsd_set_privacy: enabled=0
bsd_del_key: addr=00:00:00:00:00:00 key_idx=0
bsd_del_key: addr=00:00:00:00:00:00 key_idx=1
bsd_del_key: addr=00:00:00:00:00:00 key_idx=2
bsd_del_key: addr=00:00:00:00:00:00 key_idx=3
bsd_get_ssid: ssid="freebsdAP"
Using interface ral0 with hwaddr 00:21:91:82:30:57 and ssid 'freebsdAP'
SSID - hexdump_ascii(len=9):
     66 72 65 65 62 73 64 41 50                        freebsdAP
PSK (ASCII passphrase) - hexdump_ascii(len=8):
     46 77 70 61 50 61 73 73                           password
PSK (from passphrase) - hexdump(len=32): 66 c8 8b 29 3d 26 fa d5 fe ed 97 6b 83 b1 f8 77 38 49 c0 13 cd b1 19 c2 77 d2 ef 1f 6d 64 e2 d1
bsd_set_ieee8021x: enabled=1
bsd_configure_wpa: group key cipher=TKIP (1)
bsd_configure_wpa: pairwise key ciphers=0xa
bsd_configure_wpa: key management algorithms=0x2
bsd_configure_wpa: rsn capabilities=0x0
bsd_configure_wpa: enable WPA= 0x1
bsd_set_iface_flags: dev_up=1
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): 81 86 05 8e 23 3e 70 c0 dd 89 e7 79 d1 4b 2a f5 9e 5d 38 3d 0d 68 d0 cc ad d9 53 89 af 9f 4a 41
GTK - hexdump(len=32): e3 5c fe d8 0d 3b 4b a4 6d f0 a7 9e f3 40 ea 47 38 e5 05 92 f4 6c 71 08 75 16 23 e7 94 4c 16 94
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
bsd_set_key: alg=TKIP addr=00:00:00:00:00:00 key_idx=1
bsd_set_privacy: enabled=1
ral0: Setup of interface done.
This is all I get. Without option -K output the is same.
Reply With Quote
  #9  
Old November 6th, 2009, 08:45
SirDice's Avatar
SirDice SirDice is offline
Giant Locked
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 2,637
Thanks: 5
Thanked 286 Times in 278 Posts
Default

Leave the hostapd running with the -ddK switches then try to authenticate with a client. See what happens and where things might go wrong.
__________________
Oliver's Law:
Experience is something you don't get until just after you need it.
Reply With Quote
  #10  
Old November 6th, 2009, 12:39
idle idle is offline
Junior Member
 
Join Date: Nov 2008
Location: Russia, Saint Petersburg
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That is what I did.
All the output you can see above.
Reply With Quote
  #11  
Old November 6th, 2009, 14:30
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 329
Thanks: 3
Thanked 25 Times in 25 Posts
Default

Try input/output flags with wlandebug(8), if it doesnt work you need to build custom kernel ...
Reply With Quote
  #12  
Old November 7th, 2009, 14:51
idle idle is offline
Junior Member
 
Join Date: Nov 2008
Location: Russia, Saint Petersburg
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Following set give me absolutely nothing useful, while I try to connect, apart of posted above.
Code:
wlandebug -i ral0 debug
tcpdump -iral0 &
tcpdump -iral0 -y ieee802_11 &
tcpdump -iral0 -y ieee802_11_radio &
hostapd -dddK /etc/hostapd.conf &
I in perplexity how it can be?

This is log/messages for this time.
Code:
Nov  7 16:40:01 razumit ral0: [00:21:91:82:30:57] station with aid 0 leaves
Nov  7 16:40:01 razumit ral0: synchronized with 00:21:91:82:30:57 ssid "freebsdAP" channel 11 start 1Mb
Quote:
Originally Posted by richardpl View Post
Try input/output flags with wlandebug(8), if it doesnt work you need to build custom kernel ...
What is it "custom kernel", could you clarify pls.
Reply With Quote
  #13  
Old November 8th, 2009, 00:51
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 329
Thanks: 3
Thanked 25 Times in 25 Posts
Default

Try ral sysctl debug option:
sysctl dev.ral.0.debug=15

Last edited by DutchDaemon; November 8th, 2009 at 02:14.
Reply With Quote
  #14  
Old November 8th, 2009, 04:14
pat pat is offline
Junior Member
 
Join Date: May 2009
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

I got mine working with :
Code:
# This field is a bit field that can be used to enable WPA (IEEE 02.11i/D3.0)
# and/or WPA2 (full IEEE 802.11i/RSN):
# bit0 = WPA
# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
wpa=2
# Clients do not have to share the same PSK
wpa_psk_file=/etc/hostapd.wpa_psk
# Since TKIP now falls in matter of seconds, rely exclusively on CCMP.
wpa_pairwise=CCMP
ifconfig output should look like:
Code:
...
authmode WPA2/802.11i privacy MIXED deftxkey 3 AES-CCM 2:128-bit AES-CCM 3:128-bit
...
Cheers mates
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba-problem 1:doesn't start, 2:host-related problem naguz Web & Network Services 7 September 29th, 2009 16:40
geometry problem maby? boot problem gulanito Installing & Upgrading 6 August 13th, 2009 17:19
Problem with configuration of 2’nd DSL link on FreeBSD 7.2 (gateway problem?) fanz Networking 1 August 13th, 2009 05:04
Specifying Multiple config files for hostapd via rc.conf epoxy General 0 August 2nd, 2009 19:42
freebsd hostapd wlan performance psunix Web & Network Services 0 December 18th, 2008 22:58


All times are GMT +1. The time now is 13:04.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.