LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-26-2012, 10:42 AM   #1
ravi.xolve
Member
 
Registered: Jul 2006
Posts: 89

Rep: Reputation: 15
Unhappy hostapd access point is unable to complete the connection


Hi, I am using openSuse 12.1. I am trying to use hostapd v0.7.3 to make my laptop as an access point.

My network card is:

04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)

And I am using b43 driver with firmware downloaded using b43-fwcutter. The wireless works fine and it connects to hotspots.

The hostapd config file I am using is:

Code:
interface=wlan0
#bridge=br0
driver=nl80211

ssid=SampleNetwork
hw_mode=g
channel=11

macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
The hotspot starts well, it is detected by other computer and it shows following output on the command prompt:

Code:
Configuration file: sample_hostapd.conf
Using interface wlan0 with hwaddr xx:xx:xx:xx:xx:xx and ssid 'MyNetwork'
But when I connect the other laptop with this access point I get the messages as:

Code:
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated (aid 1)
AP-STA-CONNECTED yy:yy:yy:yy:yy:yy
wlan0: STA yy:yy:yy:yy:yy:yy RADIUS: starting accounting session 4F4A5E40-00000000
wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated (aid 1)
wlan0: STA yy:yy:yy:yy:yy:yy RADIUS: starting accounting session 4F4A5E40-00000001
wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated (aid 1)
wlan0: STA yy:yy:yy:yy:yy:yy RADIUS: starting accounting session 4F4A5E40-00000002
wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated (aid 1)
wlan0: STA yy:yy:yy:yy:yy:yy RADIUS: starting accounting session 4F4A5E40-00000003
wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated (aid 1)
wlan0: STA yy:yy:yy:yy:yy:yy RADIUS: starting accounting session 4F4A5E40-00000004
wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated (aid 1)
wlan0: STA yy:yy:yy:yy:yy:yy RADIUS: starting accounting session 4F4A5E40-00000005
wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated (aid 1)
wlan0: STA yy:yy:yy:yy:yy:yy RADIUS: starting accounting session 4F4A5E40-00000006
wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)

The configuration is never completed after sometime it shows to "Limited Connectivity" at the other laptop which just means no connectivity. What is the solution to this problem please help.
 
Old 03-24-2012, 05:45 PM   #2
questionsasker
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
Post

same problem here ( exactly the same one )

my system :
ubuntu 11.10
tplink TL-WN822N ( AR9287 + AR7010 )
 
Old 03-29-2012, 12:55 AM   #3
questionsasker
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
i found a workaround :

first make sure you have dnsmasq-base package installed .

then :

stop hostapd

create an ad hoc network and enable "shared to other computers" on its settings

connect to that ad hoc network

start hostapd

now it works. your laptop will receive network addresses from 10.42.43.0/24 range and the hostapd host will get ip 10.42.43.1 on wlan0


edit:

please let me know if it worked for you
 
Old 03-30-2012, 10:40 AM   #4
WizadNoNext
Member
 
Registered: Nov 2009
Posts: 125

Rep: Reputation: 9
You need DHCP server or DHCP relay on computer with AP. You actually connect without any problem - you lack IP on connected interface.
Secondly I do not understand why you do not use bridge for this AP. It would make configuration easier.
Code:
brctl addbr br0
brctl addif br0 eth0
hostapd -B /etc/hostapd/hostapd.conf
and it is simply working!

At the moment I have two servers, both with ieee802.11 cards working as AP. On both servers ieee802.11 cards are in bridge br0. One of servers have DHCP server, which serves IPs to any computer connected to internal network.

Actually, if you would put your ieee802.11 card on bridge along with eth0, you do not need any DHCP server nor DHCP relay, as DHCP server in router (or whatever eth0 is connected to) would serve IPs to whatever would be connected to ieee802.11 card.
Why you people like to complicate your lives?
 
Old 03-30-2012, 12:47 PM   #5
ravi.xolve
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
@WizadNoNext
When I create a bridge the Internet (DNS lookups) on laptop stop working. When I delete the bridge it start working fine.

Last edited by ravi.xolve; 04-12-2012 at 09:57 AM.
 
Old 03-30-2012, 05:23 PM   #6
WizadNoNext
Member
 
Registered: Nov 2009
Posts: 125

Rep: Reputation: 9
ravi.xolve

I have solution for you:
Lets say you two NIC (eth0 and wlan0) on bridge br0 and bridge have address 192.168.170.1 and underlying network is 192.168.170.0/24 then:
Code:
iptables -I INPUT -i br0 -m physdev --physdev-in wlan0 -j ACCEPT
iptables -I INPUT -i br0 -m physdev --physdev-in eth0 -j ACCEPT
iptables -I INPUT -i wlan0 -j ACCEPT
iptables -I INPUT -i eth0 -j ACCEPT
ebtables -t broute -I BROUTING -p ipv4 --ip-src 192.168.170.0/24 --ip-dst ! 192.168.170.0/24 -j redirect --redirect-target DROP
Then it would work. The ! character is most important there, as it states everything "else then" 192.168.170.0/24.
DO NOT redirect or DROP anything destined for your network (especially, if you do not have keyboard and display or serial terminal for box on which you are doing so)!

NICs on bridge should not have IPv4 addresses and bridge should be in promisc mode (you could promisc NICs as well - it won't hurt).

Last edited by WizadNoNext; 03-30-2012 at 05:26 PM.
 
Old 04-09-2012, 01:58 PM   #7
ravi.xolve
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
Problem with creating bride and loosing the Internet connection on primary laptop happens a lot. Because I have no router at my premises and I directly connect to ISP with a modem (hence single IP), that might be the reason I cannot use bridge.
 
Old 04-10-2012, 06:01 AM   #8
WizadNoNext
Member
 
Registered: Nov 2009
Posts: 125

Rep: Reputation: 9
Then, you have to route it.
 
  


Reply

Tags
hostapd, wi-fi, wireless


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Turn your Linux computer in a wireless access point using hostapd LXer Syndicated Linux News 0 08-27-2010 11:00 AM
How to setup hostapd access point in opensuse? alex2002 Linux - Networking 4 07-15-2009 03:50 PM
Unable to connect to private wireless access point jwholey Linux - Wireless Networking 1 04-24-2007 04:55 AM
Help, ... hostapd Access point stop ... ERBRMN Linux - Networking 0 02-17-2006 12:10 AM
Connection to access point OK, but cannot access the network/internet Nymphetamine Linux - Wireless Networking 29 01-13-2005 02:59 PM


All times are GMT -5. The time now is 03:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration