I have two vanilla (only the wireguard packages are added, and configured to the installed system) x86 OpenWRT 19.07.2 appliances connected together with wireguard:
Router local ip: 192.168.11.254
Router wireguard ip: 192.168.22.1
Router local ip: 192.168.33.254
Router wireguard ip: 192.168.22.2
My problem is as follows:
When transferring (running iperf server (both UDP and TCP), or pulling a file with wget) on the Client on Site B (192.168.33.120), the speed is just abnormally slow:
192.168.22.1 to 192.168.33.120: about 3.5MB/sec
192.168.11.254 (note that is the very same device as above, just its local address) to 192.168.33.120: about 1.70MB/sec
- the same measurement applies if i pull anything from 192.168.11.0/24
If i initiate the test from the router on Site B:
192.168.22.1 to 192.168.22.2: about 20MB/sec (wire speed)
192.168.11.254 (again, the same device, just different address) to 192.168.22.2: about 20MB/sec (wire speed)
If I set up a portforward on Site B router (192.168.33.254:81 to 192.168.22.2:80: socat TCP4-LISTEN:81,su=nobody,fork,reuseaddr TCP4:192.168.22.1:80), then run the wget http://192.168.33.254:81/testfile on the client (192.168.33.120), I am getting wire speed again.
Downloading on the client (192.168.33.120) anything from the internet is also at wire speed.
I do not see any cpu, interrupt starvation on either of the routers during the tests.
I have tried permuting mtu_fix on all interfaces, but nothing changed.
All measurements were repeated multiple times, at different times of day, and are consistent.
This indicates that it is not an ISP throttling, or mtu issue on the VPN.
Could you help me diagnose and solve this issue?