feilongsky 发表于 2014-08-08 13:26

无线NAT为什么速度减慢为一半不到?

一台机器通过带定向天线的无线网卡接入互联网,网速很快,下载速度可以达到800KB/S,有时达到1MB/S.

又加了一张无线网卡做成热点,为近距离的手机、平板、笔记本提供无线上网。

/usr/etc/hostapd.conf 内容如下:
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=zhuanmaidian
hw_mode=g
channel=10
interface=wlan1
driver=nl80211
ignore_broadcast_ssid=0
macaddr_acl=0
auth_algs=1
wpa=3
wpa_passphrase=zhm098765
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=TKIP CCMP

启动hostapd时,运行命令:
ifconfig wlan1 192.168.2.1 netmask 255.255.255.0 up
/usr/local/bin/hostapd -B /usr/etc/hostapd.conf
dhcpd -cf /etc/dhcpd.conf wlan1
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

所有的无线设备如平板、手机都可以正常连上wlan1,也可以上网。
但是速度减慢了不少,就算只有一台平板或手机上网,下载速度也才100多K.
为什么网速损失这么多?

热点机器上的iptables -L结果:
Chain INPUT (policy ACCEPT)
target   prot opt source               destination         
Chain FORWARD (policy ACCEPT)
target   prot opt source               destination         
Chain OUTPUT (policy ACCEPT)
target   prot opt source               destination

sysctl 一切为默认,系统是slackware.

feilongsky 发表于 2014-08-10 06:43

??????
页: [1]
查看完整版本: 无线NAT为什么速度减慢为一半不到?