Comments (5)
I agree with you. I will set the default MTU to 1280 and leave an optimization notice in the README. Thanks a lot!
from wgcf.
While it's slightly worse to have 1280 mtu than the precise mtu for your network setup, it would still be better than having it not work by default.
It's better to have defaults that work for most people and then leave the optimizations for people who are capable of that. I've seen some issues here that I think were caused by mtu problems (#39 #32 and #16 ).
I also want to note that while leaving the mtu as default would rarely work on my network, my speed is more than halved. Here are my speedtest stats:
- No Warp: 110-120Mbps
- With warp and default 1420 mtu: 50Mbps
- With warp and 1280 mtu: 110-120Mbps
- With warp and 1392 mtu: 110-120Mbps
I don't have any speed change with warp when my mtu is set properly (1280 vs 1392).
from wgcf.
Do you have an explanation of why reducing the MTU makes your internet work? I"ve been using the default MTU (1480?) for almost a year without any issues. I am happy to make this change if we can prove it is needed.
from wgcf.
You could check with the ping command to see that the mtu value that needs to be set is supposed to be lower. https://kb.netgear.com/19863/Ping-Test-to-determine-Optimal-MTU-Size-on-Router
I made a small bash script that automates the instructions above and makes it work on linux. It does take some time (less than 10 secs) : https://paste.debian.net/1161002/
If you decide to use the script run it like this: ./script.sh 1.1.1.1
.
While the mtu value the script keeps giving me is 1392 (which is probably works better), the cf's android client has it set to 1280 so I'd rather just use whatever they use on their official android client.
Sorry I can't give you any explanation besides that it worked for me.
from wgcf.
Thank you for the information! I ran some tests myself and here's what I found:
- Windows 10,
netsh interface ipv4 show subinterfaces
:- Wi-fi: 1500
- Wireguard (default): 1420
- Android 9,
cat /sys/class/net/*/mtu
:- wlan0: 1500
- tun0 (Wireguard through 1.1.1.1 app): 1280
I did some more reading on the choice of a MTU, and here are some references:
- https://keremerkan.net/posts/wireguard-mtu-fixes/
- https://en.wikipedia.org/wiki/Maximum_transmission_unit
Essentially, the difference comes down to how you are connected to the internet - if through PPPoE, then the maximum MTU supported is usually 1420, while for direct Ethernet connection it should be 1500. This is sometimes mitigated by the router, as it can forcefully fragment frames that are too large, but this causes excess CPU usage and you may not always have such a router. Cloudflare seem to have gone for the lowest possible MTU to ensure highest compatibility, while still supporting IPv6 - that is - MTU of 1280. I ran some quick tests and performance with a MTU of 1280 seems to be slightly worse for me than the default 1420, but I will run better testing tomorrow and report here.
from wgcf.
Related Issues (20)
- connection refused HOT 4
- [Question] Benefits over official app HOT 1
- wgcf cannot be used anymore? HOT 4
- initial connection issues on Linux and android devices. HOT 4
- Slow/None connection with google servicies when using wgcf HOT 2
- Error while doing wg-quick up wgcf-profile.conf HOT 2
- Using in go HOT 1
- Registered but warp is off HOT 1
- issue regarding WGCF v2.2.21 not functioning on Windows x86 HOT 1
- how to start/stop the warp service HOT 1
- CF IP from other country, not ours HOT 1
- How to connect via protocol TCP? HOT 1
- Request support of Cloudflare Security DNS HOT 1
- ⚠️⚠️This won't work if your provider blocks 1.1.1.1 DNS or WARP⚠️⚠️ HOT 4
- Unable to connect using debian 12 - Proxmox LXC HOT 7
- 401 Unauthorized HOT 1
- How to change warp location? HOT 1
- Get warp or warp+ data usage HOT 6
- Warp+ on trace HOT 1
- Tool makes internet speeds plumet HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wgcf.