seperate wg and udp header
This commit is contained in:
parent
c73b7f78fb
commit
ef97e765c1
|
@ -128,8 +128,10 @@ The MTU for WireGuard is calculated from the following components:
|
|||
- IP header
|
||||
- For IPv4 20 Bytes
|
||||
- For IPv6 40 bytes
|
||||
- UDP header
|
||||
- This is a constant 8 bytes
|
||||
- WireGuard header
|
||||
- This is a constant 40 bytes.
|
||||
- This is a constant 32 bytes
|
||||
|
||||
So if the Clearnet connection has an MTU of 1500, the tunnel MTU when tunneling over IPv4 is 1440 and for IPv6 it is 1420. This has been taken into account in WireGuard, so the default MTU of WireGuard is 1420. This means that WireGuard can be tunneled over IPv4 or IPv6 without worry. However, if you are sure that you want to tunnel over IPv4 and you want a higher packet size, you can set the MTU to 1440. On the other hand, if the Clearnet interface has a lower MTU than 1500, you should lower the WireGuard MTU to avoid bugs and IP fragmentation.
|
||||
When using wg-quick, you can adjust the MTU with the following statement under `[Interface]` in the configuration file:
|
||||
|
|
Loading…
Reference in New Issue