当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 3 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 如何创造ap热点?
帖子发表于 : 2016-07-21 14:24 

注册: 2016-07-08 17:43
帖子: 87
系统: debian8
送出感谢: 12
接收感谢: 0 次
新买的无线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状态,就是无法联网,请问,原因在哪里?如何解决?


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 如何创造ap热点?
帖子发表于 : 2016-07-21 15:01 

注册: 2009-08-04 16:33
帖子: 16892
送出感谢: 21
接收感谢: 1827
看看 能否幫上忙
https://help.ubuntu.com/community/WifiD ... ccessPoint
https://help.ubuntu.com/community/WifiD ... rnal_links
及其連結文章


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 如何创造ap热点?
帖子发表于 : 2016-07-21 16:29 
头像

注册: 2011-03-20 13:12
帖子: 4521
地址: 山东省寿光县
系统: Debian
送出感谢: 105
接收感谢: 997
whaha 写道:
上网方式是pppoe拨号

尝试使用 https://github.com/oblique/create_ap
无路由器使用 NAT 模式


_________________
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 3 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译