Closed laduke closed 1 year ago
Actually, the fact that it's getting set to 2800 implies it's using the default instead of the network config
Some printf debugging
joining
constructor setting mtu 2800
setMtu setting mtu 2800
setMtu setting mtu 1320
setMtu setting mtu 1320
restarting zerotier (already joined)
constructor setting mtu 1320
setMtu setting mtu 1320
setMtu setting mtu 1320
so...
at case ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_UP:
it thinks the mtu is the default/2800 when it calls EthernetTap::newInstance
and
the setMtu function isn't functioning to change the mtu on the fly.
Hrmm, so for joining, it looks like zerotier is creating the interface with the default MTU before even receiving the network config?
Assuming the network config is coming in correct, it should be correct on ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_UP
So the value is either cached incorrectly, or coming across the wire incorrectly sometimes
Hi,
For me Setting mtu with local.config does not seem to work. Not sure if this is a different problem. (or I am not setting the mtu in the correct way)
sudo zerotier-cli info -j
gives
{
"address": "1234567890",
"clock": 1647550455798,
"config": {
"physical": {
"72.28.0.0/16": {
"mtu": 1200
}
},
"settings": {
"allowTcpFallbackRelay": true,
"listeningOn": [
"192.168.122.205/9993",
"192.168.122.205/29994",
"192.168.122.205/48689"
],
"portMappingEnabled": true,
"primaryPort": 9993,
...
But the actual mtu is 2800
Changing the mtu with ip link set
does work but it is no persistent.
@qt1 MTU is not settable via local.conf
. It's a network level option controlled by the network controller.
@glimberg ,
How should I set it the mtu? I do not see any dhcp option in the UI and the link is controlled by ZT , but I didn't find a way to set it there. Can you please advise? (ubuntu 21.10)
Thanks
We don't recommend altering the default MTU, and as described above, there's currently an issue with it. That said, it is a modifiable field when using the https://my.zerotier.com API directly. We don't expose a way to do it in the UI.
"We don't recommend altering the default MTU" Unfortunately my scenario is tunneling ssh via the machine, and this beaks with the default MTU. Known limitation of ssh (and also ipsec and co)
OK. Well this is still the wrong place to bring up something off the current topic. This issue is about MTU changes not being persisted on Linux boxes. For talking out specific use cases you can ask on our discussion board
Closing this since it's fixed by #1860
If you change a network's MTU, your interface still gets 2800, on Linux at least.
Leaving/Joining doesn't change it. If you restart zerotier-one, you get the network's value, but if you leave/join, it goes back to 2800.
Probably a netlink ordering thing.