You are not logged in.
Pages: 1
I have a Ralink RT2870 USB Wireless adaptor, and want to use it as an access point. (for the next step, I would like to create a bridge between eth0 and wlan0) However, client could not get IP address and connect to AP properly.
[root@arch ozan]# lsusb
Bus 001 Device 002: ID 7392:7711 Edimax Technology Co., Ltd EW-7711UTn nLite Wireless Adapter [Ralink RT2870]
First I enabled IP forwarding;
[root@arch ozan]# cat /proc/sys/net/ipv4/ip_forward
1
I installed hostapd;
interface=wlan0
driver=nl80211
ssid=testing
hw_mode=g
channel=11
auth_algs=1
ignore_broadcast_ssid=0
(I do not want to have password protection for my WiFi network.)
When I run hostapd -dd /etc/hostapd/hostapd.conf it generates below output;
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Add own interface ifindex 3
nl80211: New interface mon.wlan0 created: ifindex=4
nl80211: Add own interface ifindex 4
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=10 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=10 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=10 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=10 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=10 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=10 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=9 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=9 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=9 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=9 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=9 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=9 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=10 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=10 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=10 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=10 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=10 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=10 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=9 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=9 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=9 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=9 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=9 dBm
Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=9 dBm
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Completing interface initialization
Mode: IEEE 802.11g Channel: 11 Frequency: 2462 MHz
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr AC-POINT-MAC-ADDRESS and ssid 'testing'
nl80211: Set beacon (beacon_set=0)
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
STA CLIENT-MAC-ADDRESS sent probe request for our SSID
mgmt::proberesp cb
mgmt::auth
authentication: STA=CLIENT-MAC-ADDRESS auth_alg=0 auth_transaction=1 status_code=0 wep=0
New STA
wlan0: STA CLIENT-MAC-ADDRESS IEEE 802.11: authentication OK (open system)
wlan0: STA CLIENT-MAC-ADDRESS MLME: MLME-AUTHENTICATE.indication(CLIENT-MAC-ADDRESS, OPEN_SYSTEM)
wlan0: STA CLIENT-MAC-ADDRESS MLME: MLME-DELETEKEYS.request(CLIENT-MAC-ADDRESS)
authentication reply: STA=CLIENT-MAC-ADDRESS auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: CLIENT-MAC-ADDRESS IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=CLIENT-MAC-ADDRESS capab_info=0x421 listen_interval=1
new AID 1
wlan0: STA CLIENT-MAC-ADDRESS IEEE 802.11: association OK (aid 1)
mgmt::assoc_resp cb
wlan0: STA CLIENT-MAC-ADDRESS IEEE 802.11: associated (aid 1)
AP-STA-CONNECTED CLIENT-MAC-ADDRESS
wlan0: STA CLIENT-MAC-ADDRESS MLME: MLME-ASSOCIATE.indication(CLIENT-MAC-ADDRESS)
wlan0: STA CLIENT-MAC-ADDRESS MLME: MLME-DELETEKEYS.request(CLIENT-MAC-ADDRESS)
wlan0: STA CLIENT-MAC-ADDRESS RADIUS: starting accounting session 4CF1A278-00000000
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA CLIENT-MAC-ADDRESS sent probe request for our SSID
STA CLIENT-MAC-ADDRESS sent probe request for broadcast SSID
STA CLIENT-MAC-ADDRESS sent probe request for our SSID
STA CLIENT-MAC-ADDRESS sent probe request for broadcast SSID
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
During this output generated by archlinux, client (Windows XP) shows "Acquiring Network Address" message and then it changes to "Limited or No Connectivity" error.
hostadp logs does not show any IP assigment.
[root@arch ozan]# uname -a
Linux arch 2.6.36-ARCH #1 SMP PREEMPT Wed Nov 24 00:39:57 CET 2010 x86_64 Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz GenuineIntel GNU/Linux
ifconfig output, during hostapd running;
[root@arch ozan]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:XX:XX:XX:XX:XX
inet addr:192.168.2.6 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: xx00::00x:x0xx:xxxx:479f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36579 errors:0 dropped:0 overruns:0 frame:0
TX packets:42296 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18895683 (18.0 Mb) TX bytes:6188489 (5.9 Mb)
Interrupt:41 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
mon.wlan0 Link encap:UNSPEC HWaddr 00-XX-XX-XX-XX-XX-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5276 (5.1 Kb) TX bytes:0 (0.0 b)
wlan0 Link encap:Ethernet HWaddr 00:XX:XX:XX:XX:XX
inet6 addr: xx00::00x:0xxx:xx00:ecba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69 errors:0 dropped:0 overruns:0 frame:0
TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10000 (9.7 Kb) TX bytes:12394 (12.1 Kb)
How can I fix this problem?
Offline
Well, do you have any DHCP server running on your (Linux) machine ? Have you tried setting an IP address manually on your Windows machine ?
hostapd is just an 802.11 AP and authenticator, it won't do anything else.
To begin, you should try setting an IP address on your wlan0 interface (like 192.168.1.1/24), and also set an IP address on your Windows machine (like 192.168.1.2/24), and then try pinging one machine from the other.
Offline
First of all thanks for your reply.
I have NetworkManager on my Linux machine, I did not make any configuration for DHCP server.
I set manual IP on the Windows client machine, and it connected to AP via wireless successfully, but I mixed IPs.
How can I configure DHCP to give proper IP address to wireled and wireless clients?
Offline
You can install either ISC DHCP server (pacman -S dhcp) or dnsmasq (pacman -S dnsmasq).
I'm personally used to the ISC DHCP server. Here's a minimal /etc/dhcpd.conf fuke that should get you started (look at the original dhcpd.conf for a bit more information) :
authoritative;
log-facility daemon;
# Server won't answer to request on this subnet
subnet 192.168.1.0 netmask 255.255.255.0 {
}
subnet 192.168.5.0 netmask 255.255.255.0 {
range 192.168.5.10 192.168.5.20;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.5.255;
option routers 192.168.5.1;
option domain-name-servers 192.168.5.1;
option interface-mtu 1492;
}
Before starting the server, you need to set an IP address on one of your network interface (wlan0 or br0 if you bridge your ethernet and wireless interface together). In this example, 192.168.5.1 would be a good value.
Depending on your setup and what you want to achieve (like sharing an internet connection?), you might have to also setup a DNS server, enable IP forwarding, etc... This can get a bit complex depending on your networking knowledge.
Offline
Pages: 1