I have a weird issue with my MikroTik RouterBOARD hEX - RB750Gr3 (running Router OS 7.8).
Certain TCP connections are extremely slow, for example this 93 KB file takes ages to download from the clients in the router’s LAN:
curl https://gewerbeauskunft.bremen.de/navigaweb/res/themes/System_09.12.06/js/jquery-1.11.3.min.js > /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 95957 0 95957 0 0 1998 0 --:--:-- 0:00:48 --:--:-- 1279
Took 48 seconds!
This is reproducible and also happens on other clients on the same LAN.
However, fetching the file on the router itself is fast:
[admin@MikroTik] > /tool/fetch url="https://gewerbeauskunft.bremen.de/navigaweb/res/themes/System_09.12.06/js/jquery-1.11.3.min.js"
status: finished
downloaded: 93KiB-z pause]
total: 0KiB
duration: 1s
So I wanted to see what’s going on and started a packet capture on the router:
[admin@MikroTik] /tool/sniffer> set filter-dst-ip-address="141.91.174.108"
[admin@MikroTik] /tool/sniffer> start
Then ran the curl command from above again on one of my clients:
curl https://gewerbeauskunft.bremen.de/navigaweb/res/themes/System_09.12.06/js/jquery-1.11.3.min.js > /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 95957 0 95957 0 0 444k 0 --:--:-- --:--:-- --:--:-- 457k
To my surprise, it finished instantly. After stopping the packet capture, it’s slow again. I’ve reproduced this many times to ensure it’s not a coincidence.
What’s going on here?
Not sure if related, but it might be worth noting that the internet connection is established through a PPPoE tunnel with an MTU of 1492. However, MSS clamping is enabled and seems to be working fine. I can see the MMS value being reduced from 1460 to 1452:
1 0.000000 192.168.88.218 141.91.174.108 TCP 78 56741 → 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=64 TSval=1863267890 TSecr=0 SACK_PERM
2 0.000029 192.168.88.218 141.91.174.108 TCP 78 [TCP Retransmission] [TCP Port numbers reused] 56741 → 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=64 TSval=1863267890 TSecr=0 SACK_PERM
3 0.000154 79.213.184.215 141.91.174.108 TCP 78 56741 → 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1452 WS=64 TSval=1863267890 TSecr=0 SACK_PERM
I have also tested with a client with MTU set to 1450, and the same issue is still present.