新买的无线usb网卡,
lsusb
Bus 003 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
iw list
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
* P2P-client
* P2P-GO
下面我准备将它做成无线热点。
本地网络环境:pppoe拨号上网,eth0 板载网卡,wlan0 usb无线网卡。
思路:将eth0接收的internet信号,通过wlan0转发,其他上网设备接收这个信号,实现上网。
cat /etc/network/interfaces
auto dsl-provider
iface dsl-provider inet ppp
pre-up /bin/ip link set eth0 up
provider dsl-provider
auto eth0
iface eth0 inet static
address 192.168.22.1
netmask 255.255.255.0
dns-server 114.114.114.114
auto wlan0
iface wlan0 inet static
address 192.168.22.2
netmask 255.255.255.0
cat /etc/hostapd/hostapd.conf
hw_mode=g
channel=11
driver=nl80211
ssid=test
interface=wlan0
# encryption
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
ctrl_interface=/var/run/hostapd
# Only root can configure hostapd
ctrl_interface_group=0
cat /etc/dnsmasq.conf
interface=wlan0
listen-address=192.168.22.1
dhcp-range=192.168.22.2,192.168.22.150,12h
dhcp-option=3,192.168.22.1
dhcp-option=6,114.114.114.114
上面的配置文件已经配置好后,执行下面的命令。
nmcli radio wifi off
rfkill unblock wlan
ifconfig wlan0 192.168.22.2 up
service dnsmasq restart
service hostapd restart
hostapd /etc/hostapd/hostapd.conf
创造的这个热点: ssid `test` and password `password`.
请看我的pc端信息:
hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlan0 with hwaddr 00:1a:8c:30:08:b1 and ssid "test"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: authenticated
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED f0:79:59:cb:d8:eb
wlan0: STA f0:79:59:cb:d8:eb RADIUS: starting accounting session 5789EE90-00000000
wlan0: STA f0:79:59:cb:d8:eb WPA: pairwise key handshake completed (RSN)
wlan0: AP-STA-DISCONNECTED f0:79:59:cb:d8:eb
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: authenticated
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED f0:79:59:cb:d8:eb
wlan0: STA f0:79:59:cb:d8:eb RADIUS: starting accounting session 5789EE90-00000001
wlan0: STA f0:79:59:cb:d8:eb WPA: pairwise key handshake completed (RSN)
用android手机联网,android手机,一直处于authenticating状态,就是无法联网,请问,原因在哪里?如何解决?
如何创造ap热点?
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
- vickycq
- 帖子: 4507
- 注册时间: 2011-03-20 13:12
- 系统: Debian
- 来自: 山东省寿光县
- 联系:
Re: 如何创造ap热点?
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
欢迎所有 Debian GNU/Linux 用户