配置Host AP

1.nanopi板子插上USB Wifi

2.ifconfig

wlan0     Link encap:Ethernet  HWaddr 20:0d:b0:4d:4e:95
          inet addr:192.168.8.1  Bcast:192.168.8.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:29 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:0 (0.0 B)  TX bytes:0 (0.0 B)

WiFi名字:wlan0

3.nano /etc/network/interfaces

设置Wifi网卡(wlan0)IP地址

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.8.1
netmask 255.255.255.0

auto eth0
iface eth0 inet dhcp

4. nano /etc/hostapd/hostapd.conf

设置Wifi网卡(wlan0)hostapd

country_code=CN
interface=wlan0
ssid=79872873
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

5. nano /etc/dnsmasq.conf

设置Wifi网卡(wlan0)dhcp

interface=wlan0
  dhcp-range=192.168.8.100,192.168.8.249,255.255.255.0,24h

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值