Hi guys, I have this problem I can not sort out, I hope you can give me some ideas.
The story is I made an Wireless Access point in FreeBSD-11.1 running in an BeagleBone Black.
My wifi adapter is an Alfa AWUS036HN, recognized as "run0", 802.11g. [n not available]
The thing works, the olny problem is the maxium speed I can reach is ~ 100KByte/s .
-] I was expecting my speed to be around ten times that.
-] All speed test have been made transferring via
-] I tried to change channels, there is some variation but nothing great (about +/- 20KBytes/s).
-] I tried to remove hostapd, free network=> no significant speed changes.
*] The only thing I could still remove is the bridge ... still I have not tried that. I would like to keep the bridge if it is possible.
Here goes my full configuration. Please notice that I use abuntantly "rc.local" because
I find it a lot easier to discover the way to configure things on the shell and then stack the
successull commands sequence into "rc.local".
I don't write down the "dhcp" configuration, but I add the "ipfw" conf. It may be relevant.
Since my network is so slow it tried to avoid that Android updates suddenly vampire
the network and impede all kind of work => I put about all expendable clients of the AP in a restricted speed pipe.
Please ignore comments in Italian.
The story is I made an Wireless Access point in FreeBSD-11.1 running in an BeagleBone Black.
My wifi adapter is an Alfa AWUS036HN, recognized as "run0", 802.11g. [n not available]
The thing works, the olny problem is the maxium speed I can reach is ~ 100KByte/s .
-] I was expecting my speed to be around ten times that.
-] All speed test have been made transferring via
sftp
a large file from the access point to a client.-] I tried to change channels, there is some variation but nothing great (about +/- 20KBytes/s).
-] I tried to remove hostapd, free network=> no significant speed changes.
*] The only thing I could still remove is the bridge ... still I have not tried that. I would like to keep the bridge if it is possible.
Here goes my full configuration. Please notice that I use abuntantly "rc.local" because
I find it a lot easier to discover the way to configure things on the shell and then stack the
successull commands sequence into "rc.local".
I don't write down the "dhcp" configuration, but I add the "ipfw" conf. It may be relevant.
Since my network is so slow it tried to avoid that Android updates suddenly vampire
the network and impede all kind of work => I put about all expendable clients of the AP in a restricted speed pipe.
Please ignore comments in Italian.
Code:
---- /etc/rc.conf ------
sshd_enable="YES"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
growfs_enable="YES"
# per il controllo del traffico
dummynet_enable="YES"
# ---- per la criptazione del wifi
hostapd_enable="YES"
# -] config hostname
# hostname="wifi-tel-ap1"
hostname="wifi-ap1"
# -] per il firewall
firewall_enable="YES"
firewall_script="/etc/ipfw.rules"
# -] per la data da tenere aggiornata
ntpd_enable="YES"
Code:
----- /etc/rc.local ----
/sbin/ifconfig bridge create
/sbin/ifconfig bridge0 inet 172.16.12.1/24
/sbin/ifconfig bridge0 addm cpsw0 up
/sbin/ifconfig cpsw0 up
ifconfig wlan0 create wlandev run0 wlanmode hostap
ifconfig bridge0 addm wlan0
ifconfig wlan0 ssid NicolaTemporaneo mode 11g channel 8
ifconfig wlan0 up
route add default 172.16.12.253
/usr/local/sbin/dhcpd bridge0 -cf /etc/dhcpd.conf
Code:
----- /etc/hostapd.conf ----
nterface=wlan0
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=NicolaTemporaneo
wpa=2
wpa_passphrase=BLABLABLA
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
hw_mode=g
wmm_enabled=1
# Log all "informational messages" and above to syslog.
logger_syslog=-1
logger_syslog_level=2
Code:
----- /etc/ipfw.rules ----
#!/bin/sh
# Flush out the list before we begin.
ipfw -q -f flush
eth0="cpsw0" # la porta ethernet
# No restrictions on Loopback Interface
ipfw add 00010 allow all from any to any via lo0
# dhcp non si espanda fuori dalla rete wireless
ipfw add 00020 deny udp from any 68 to any 67 in via $eth0 # DHCP_DISCOVER
ipfw add 00030 deny udp from any 67 to any 68 out via $eth0 # DHCP_OFFER
# --- limitazione del traffico ------
PROTETTI="172.16.12.0/24{1,2,3,21,253}"
ipfw add 00040 pipe 2 ip from any to not $PROTETTI out
ipfw pipe 2 config bw 30KByte/s queue 50KBytes
# tutto il resto passa
ipfw add 00999 allow all from any to any