Docker overlay network MTU mismatch drops large UDP frames after cluster MTU reduced — intermittent packet loss between services
Environment
Docker Swarm overlay network spanning three Linux hosts (Ubuntu 22.04) connected over WAN with MTU 1400 after an ISP change; overlay network default_vxlan mtu remained at 1500; containers communicate using high-throughput UDP-based protocol (MPEG-TS).
Symptoms
Large UDP packets (~1400–1450 bytes) sent between containers intermittently drop, causing stream corruption and retransmits at application layer. TCP traffic unaffected. Host-level ping of jumbo payloads shows fragmentation or loss when size > 1360. Drops appear correlated to large packet sizes and only when sent between containers on different hosts (overlay VXLAN path).
Observations
ip link show shows physical NIC MTU set to 1400. Docker overlay network vxlan0 created with default mtu 65536 but Docker's internal encapsulation adds 50 bytes overhead. iptables offload and GRO/TSO enabled. tcpdump on physical interface shows fragmented outer UDP packets and occasional host kernel dropping fragments with 'ICMP frag needed' absent because ICMP filtered by firewall. Disabling GRO/TSO reduced but did not eliminate loss.
Already attempted
Set docker daemon 'mtu': 1400 and restarted Docker daemon on all hosts; issue reduced but intermittent drops remained. Lowering application UDP payload to 1200 solved problem. Disabled offloads (ethtool -K) temporarily on NICs with partial improvement. Tried setting sysctl net.ipv4.ip_no_pmtu_disc=1 (not recommended) — no stable fix.
Question
What's the correct overlay/Docker and host configuration to prevent VXLAN-encapsulated packets from being fragmented or dropped when the physical MTU is lower, while preserving performance?
Verified community troubleshooting
This is classic VXLAN/PMTU mismatch. Set Docker's overlay MTU on all nodes so inner packets plus VXLAN overhead fit the physical MTU (e.g., physical 1400 minus ~60 => docker mtu ~1340). Restart Docker on each host so overlay networks agree. Also allow ICMP 'fragmentation needed' through any firewalls so PMTU can adjust. Verify by sending large UDP test packets and checking tcpdump on the physical NIC to ensure packets are not fragmented. Roll back if other overlay networks need different sizing and test gradually.
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Virtualization51% match
Docker Swarm overlay: intermittent packet loss between nodes after lowering MTU — vxlan fragmented frames dropped
Open0 answers - Virtualization44% match
Docker Swarm overlay network: intermittent inter-node packet loss when two overlay networks share the same subnet/VNI
Open0 answers - Networking42% match
Docker overlay network experiences severe packet loss and retransmits after NIC firmware update — large VXLAN packets fragmented by offload regression
Open0 answers - Linux29% match
Ubuntu 22.04: Docker containers intermittently lose DNS after host switches to systemd-resolved stub resolver during network changes
Solved1 answer - Software27% match
docker-compose fails with 'no such network' after compose v2 upgrade; existing overlay network collisions on Ubuntu 22.04
Open0 answers