I'm trying to use Raspberry Pi as a WiFi repeater, but routing speed is extremely slow. I've configured hostapd to work on wlan0 (onboard WiFi adapter) and wpa_supplicant on wlan1 (external adapter). Everything works fine except the speed. Home router provides internet about 80-90 Mbit/s, but connected devices receive only 5-15 Mbit/s.
The strange thing is that speedtest running on raspberry gives 80-90 Mbit/s.
What i've tried:
- Different external adapters - did not help.
- If i receive internet from ethernet cable i have about 40-50 Mbit/s, so seems that the onboard adapter is not a bottleneck.
- If i run hostapd on external adapter and receive with onboard one - same problem.
- I tried to run hostapd and wpa_supplicant on 2 external adapters - same problem.
- I tried different distributives (raspbian, ubuntu)
- I tried different boards (rpi b+, rpi b v1.2).
- Tried to experiment with wifi bands (receive on channel 1, share on channel 11) - no result.
- Tried to change device orientation (according to this answer RPI wifi repeater - slow internet speed)
- CPU loading in all tests is about 10% [Updated].
So seems that the problem is in forwarding soft inside the OS. Can anyone help me?
iptables -t nat -I POSTROUTING -o wlan1 -j MASQUERADE
Routing table is configured automatically with wpa_supplicant