cancel
Showing results for 
Search instead for 
Did you mean: 

TCP over Wireguard VPN

Elm9264
Newbie
Posts: 1
Registered: a week ago

TCP over Wireguard VPN

Hi 

Hoping a SuperUser (or someone with knowledge) can help.

TCP connections carried over WireGuard VPN are catastrophically bad  - consistently dropping to around 10–15 Mbps with very high TCP retransmissions (on a 900/110 connection).

I’ve tried multiple Linux hosts, multiple WireGuard servers, different hardware, two different VPSs, so I don’t believe it is specific to a single device or WireGuard configuration. LAN performance is normal.

Is there anything on a Plusnet line that can affect TCP flows or UDP/Wireguard traffic - rate limiting, PPPoE issues, MSS or MTU handling - or anything related to packet loss, retransmissions, errors on my line? Any known issues affecting VPN traffic?

Any help/info gratefully received.

5 REPLIES 5
corringham
Seasoned Champion
Posts: 1,716
Thanks: 933
Fixes: 23
Registered: ‎25-09-2015

Re: TCP over Wireguard VPN

That sounds like an MTU issue. Try lowering the MTU for your connection.
As you may be aware, this can be necessary as a VPN adds a wrapper around each packet which makes it larger - if that exceeds the MTU of the link the packet will be split into two for transmission and then (hopefully) reassembled at the far end.

However, in the best case that adds work which slows things down, and in the worst the packets don't get reassembled (some devices are very bad at this!) and are dropped.
In your case with high retransmission rates it sounds as if packets are being dropped.

Dan_the_Van
Superuser
Superuser
Posts: 4,793
Thanks: 3,112
Fixes: 144
Registered: ‎25-06-2007

Re: TCP over Wireguard VPN

Full Fibre 900/100, Wireguard server is hosted on a raspberry pi.

This thread has prompted me to reseach Wireguard MTU.

It appears Wireguard default is 1420; it assumes the WAN connection MTU is 1500; but TP-Link route can be only set a maximum of 1492 which is recommended for PPPoE.

So the suggestion is to reduce the Wireguard to 1412

But, I haven't noticed anything which prompts me to think I need to change anything, until now!

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

MisterW
Superuser
Superuser
Posts: 19,715
Thanks: 8,764
Fixes: 569
Registered: ‎30-07-2007

Re: TCP over Wireguard VPN

@Dan_the_Van I run a wireguard connection to the office. The MTU is also set at the 1420 default but I havent noticed any problems

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

corringham
Seasoned Champion
Posts: 1,716
Thanks: 933
Fixes: 23
Registered: ‎25-09-2015

Re: TCP over Wireguard VPN

MTU can vary according to the individual path - it isn't an exact science - so it may be worth lowering it if only to rule it out as a possible cause.

Also, if the OP has a static IP I recall that the MTU is slightly lower for that (a static IPs is routed differently).

spile
Aspiring Pro
Posts: 179
Thanks: 70
Fixes: 1
Registered: ‎03-08-2007

Re: TCP over Wireguard VPN

Im running Wireguard on a RPI4 on a 500Mb connection. I’ve never had a speed issue.