這個(gè)不是說(shuō)你的無(wú)線(xiàn)網(wǎng)卡是150M就一定連接成150M,原因如下:

創(chuàng)新互聯(lián)建站-專(zhuān)業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性?xún)r(jià)比西充網(wǎng)站開(kāi)發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式西充網(wǎng)站制作公司更省心,省錢(qián),快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋西充地區(qū)。費(fèi)用合理售后完善,10余年實(shí)體公司更值得信賴(lài)。
WiFi設(shè)斗穗野置問(wèn)題,WiFi一般會(huì)設(shè)置成自族滾動(dòng)分配帶寬,比如說(shuō)300M的WiFi,10個(gè)人連接,可能每個(gè)人平均分配到30M,無(wú)線(xiàn)顯卡里也顯示30M,當(dāng)然不會(huì)這么公平的,可能會(huì)多或者會(huì)少,即使是手動(dòng)分配,也不會(huì)超過(guò)100M;
電腦無(wú)線(xiàn)網(wǎng)卡本地設(shè)置,在無(wú)線(xiàn)網(wǎng)卡屬性中有一個(gè)設(shè)置,會(huì)強(qiáng)制帶寬到多少;
最后一個(gè)就是協(xié)議,看你的無(wú)線(xiàn)網(wǎng)卡和WiFi支持那種802.1哪種協(xié)議,a/b/n/g/ac,每個(gè)協(xié)議有個(gè)最大空喊允許帶寬。
第一步:安裝應(yīng)用;
apt-get install hostapd dnsmasq
第二步:配置文件;
修改/etc/hostapd/hostapd.conf
1
2
3
4
5
6
7
8
9
10
interface=wlan0
driver=nl80211
ssid=hotspot # Your WAP name, change it to something more unique
hw_mode=g
channel=6 # You may want to change this if the channel is too crowded
wpa=1
wpa_passphrase=hotspot_password # Password for clients
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_ptk_rekey=600
修改/彎局etc/dnsmasq.conf
1
2
3
4
5
6
7
8
9
# disables dnsmasq reading any other files like /etc/resolv.conf for nameservers
no-resolv
# Interface to bind to
interface=wlan0
# Specify starting_range,end_range,lease_time
dhcp-range=10.0.0.3,10.0.0.20,12h
# dns addresses to send to the clients
server=8.8.8.8
server=8.8.4.4
第三步:添加腳步;
將以下腳本添加到/etc/network/if-up.d/wapstart:
#!/bin/sh
WIRE=eth0
WIFI=wlan0
# Only run script for wired interface
if [ ! "$IFACE" = "$WIRE" ]
then
exit 0
fi
# Setup wireless interface
ifconfig $WIFI up 10.0.0.1 netmask 255.255.255.0
# Start dnsmasq
/etc/游鬧含init.d/dnsmasq start
#Enable NAT
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface $WIRE -j MASQUERADE
iptables --append FORWARD --in-interface $WIFI -j ACCEPT
# Start the Wireless Access Point service
/etc/init.d/hostapd start
exit 0
將以下腳本添加到/etc/network/if-post-down.d/wapstop:
#!/神笑bin/bash
WIRE=eth0
WIFI=wlan0
# Only run script for wired interface
if [ ! "$IFACE" = "$WIRE" ]
then
exit 0
fi
# Stops Wireless Access Point services
/etc/init.d/hostapd stop
/etc/init.d/dnsmasq stop
# Asked nice the first time...
killall dnsmasq
killall hostapd
ifconfig $WIFI down
為這兩個(gè)腳本加上可執(zhí)行權(quán)限:
chmod +x /etc/network/if-up.d/wapstart
chmod +x /etc/network/if-post-down.d/wapstop
最后一步:使用咯;
ifconfig eth0 down
ifconfig eth0 up
本文標(biāo)題:linux命令開(kāi)熱點(diǎn) linux 熱點(diǎn)函數(shù)
URL標(biāo)題:http://chinadenli.net/article7/dspgiij.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站內(nèi)鏈、微信小程序、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、App設(shè)計(jì)、做網(wǎng)站、網(wǎng)站制作
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容