libnetwork
libnetwork copied to clipboard
MTU option for macvlan driver
"docker network create -d macvlan -o com.docker.network.driver.mtu=1450
The option to change MTU for macvlan is implemented with a different option (if so, what is it?) or is this feature not available?
Same problem here, i took a quick look at the source and sadly it is not implemented for macvlan.
My workaround is to give the container cap net_admin and set the mtu inside of the container.
Another workaround might be manually setting the MTU on the sub-interface
sudo ip link set dev ens4.40 mtu 1500
I understand that this is bridge driver option not macvlan driver option. https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options For my testing, every option described in here only worked for bridge.
Any update on this? Currently have this issue and do similar to https://github.com/moby/libnetwork/issues/2274#issuecomment-695339465 or https://github.com/moby/libnetwork/issues/2274#issuecomment-1173926870
@H4R0 did you ever find a way to automate this behavior?
Edit. For now I just fix issues by running a script on system startup instead of allowing docker to restart containers on its own.