Changing MTU value

I changed the mtu value in /etc/docker/daemon.json file. Then sysemctl daemon-reload and systemctl restart docker.service.

This new value was reflected properly in the default bridge network. The command docker network inspect bridge showed the new value.

But I was expecting the output of ip link command to list docker0 interface with the MTU that I set. It didn’t. It showed only the default MTU (1500).

Then I tried doing this in another way by providing –mtu option in the ExecStart section of docker.service file. Restarting the service also had the same effect. The docker network inspect bridge command showed the new value whereas ip link command on host machine showed only the default MTU (1500).

Is this correct? Or am I doing something wrong over here.

Please clarify

1 Like
Issue type: Bug

OS Version/build: Ubuntu 18.04 18.04.4 LTS (Bionic Beaver)

App version: 19.03.11 ( have tried downgrading as well)

Steps to reproduce: When the docker0 mtu value is equal to wlan mtu value we can not download packages inside a docker container neither we can curl google.com

Tried:

  1. mtu: 1450 in /etc/default/daemon.json

  2. Tried passing mtu value to dockerd in ExecStart

  3. Tried re-install docker as well and all the available solutions on different blogs.

I am not able to access internet from my containers because of this.

Any leads are highly appreciated.

Resolved after resetting my router.

Did you ever figure this out?

On two of my boxes doing sudo ip link set docker0 mtu 9000 works as expected.

Though my question is why do we have to do this… and on my synology, I get RTNETLINK answers: Invalid argument which makes no sense.