Software sending larger than MTU between containers

I’ve got a puzzle here, if I run iperf3 between two docker containers on the same network, the segments grow beyond the MTU of the eth0 interface.

I do see the lo interface has an MTU of 65535, but the eth0 has an MTU of 1500

Is it possible its using the lo interface to enforce the MTU on the container network?

Thank you for any insight, this is driving me crazy.

/ # ifconfig
eth0 Link encap:Ethernet HWaddr 09:42:AC:14:00:04
inet addr:172.20.0.4 Bcast:172.20.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:810 (810.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Containers communicate on Docker networks, not through your eth0 and not through any loopback interface.

Here is what I wrote about Docker Networks, although I haven’t mentioned MTU, but you can hopefully understand better how network traffic goes between containers

1 Like