mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 18:48:36 -07:00
First pass of configurable MTU and max MTU increase.
This commit is contained in:
parent
6ef247fb93
commit
107e3e4106
6 changed files with 22 additions and 29 deletions
|
@ -61,28 +61,8 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* Maximum MTU for ZeroTier virtual networks
|
||||
*
|
||||
* This is pretty much an unchangeable global constant. To make it change
|
||||
* across nodes would require logic to send ICMP packet too big messages,
|
||||
* which would complicate things. 1500 has been good enough on most LANs
|
||||
* for ages, so a larger MTU should be fine for the forseeable future. This
|
||||
* typically results in two UDP packets per single large frame. Experimental
|
||||
* results seem to show that this is good. Larger MTUs resulting in more
|
||||
* fragments seemed too brittle on slow/crummy links for no benefit.
|
||||
*
|
||||
* If this does change, also change it in tap.h in the tuntaposx code under
|
||||
* mac-tap.
|
||||
*
|
||||
* Overhead for a normal frame split into two packets:
|
||||
*
|
||||
* 1414 = 1444 (typical UDP MTU) - 28 (packet header) - 2 (ethertype)
|
||||
* 1428 = 1444 (typical UDP MTU) - 16 (fragment header)
|
||||
* SUM: 2842
|
||||
*
|
||||
* We use 2800, which leaves some room for other payload in other types of
|
||||
* messages such as multicast propagation or future support for bridging.
|
||||
*/
|
||||
#define ZT_MAX_MTU 2800
|
||||
#define ZT_MAX_MTU 10000
|
||||
|
||||
/**
|
||||
* Maximum length of network short name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue