Repository navigation
Change MTU for rootless containers #27905
Replies: 3 comments
|
I think it's just the option format.
So instead of: network_cmd_options = ["--mtu=1500"] try: network_cmd_options = ["mtu=1500"] with: [network] The containers.conf docs actually list That also explains the error: Podman is treating |
|
for my 'piaware' container I have mtu set in the container file with this line: for and when I |
|
The 65520 isn't coming from slirp4netns — its own default is 1500. That 65520 is podman: when podman launches slirp4netns for the default rootless network it sets the MTU to 65520 itself (it's documented in containers.conf: Your [engine]
network_cmd_options = ["mtu=1500"]Two side notes:
Verify with your
|
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am experiencing an issue where the MTU of the default
podmannetwork is65520, which causes connection drops.After a deeper analysis, I found that if I create a custom network with an MTU of
1500, the connection drops do not occur. The question I have is: How can I set the MTU to1500for both root and rootless containers?I tried to solve the problem myself. I edited the file
/etc/containers/containers.conf, definedslirp4netnsas thedefault_rootless_network_cmd, and added--mtu=1500toengine.network_cmd_options.When I start a container as root, I see that the MTU is correctly set to
1500:However, running the same command without
sudoresults in the following error:When I run
slirp4netnsnow, I see that there is a--mtuflag, which has the default of MTU 1500, but seems to be set by podman. I don't understand why podman has a problem with this option, when I configure it viacontainers.confto restore it's default behavior. Can anyone help me with this? I can't solve this problem on my own.Here is some additional information:
$ tree ~/.config/containers/ /home/markus/.config/containers/ ├── auth.json ├── networks ├── podman │ └── machineAll reactions