TCP Window Size Calculator
Calculate optimal TCP window size and maximum throughput based on bandwidth and round-trip latency (bandwidth-delay product).
Calculate optimal MTU size, payload capacity, and overhead for different encapsulation types including VXLAN, GRE, and IPsec.
| Encapsulation | Overhead | Inner MTU | TCP MSS | Efficiency |
|---|---|---|---|---|
| None (raw) | 0B | 1,500.00B | 1,460.00B | 97.30% |
| VXLAN | 50B | 1,450.00B | 1,410.00B | 94.00% |
| Geneve | 50B | 1,450.00B | 1,410.00B | 94.00% |
| GRE | 24B | 1,476.00B | 1,436.00B | 95.70% |
| GRE + Key | 28B | 1,472.00B | 1,432.00B | 95.50% |
| IPsec (AES-GCM) | 50B | 1,450.00B | 1,410.00B | 94.00% |
| IPsec (AES-CBC) | 73B | 1,427.00B | 1,387.00B | 92.50% |
| WireGuard | 60B | 1,440.00B | 1,400.00B | 93.30% |
| MPLS (1 label) | 4B | 1,496.00B | 1,456.00B | 97.10% |
| MPLS (2 labels) | 8B | 1,492.00B | 1,452.00B | 96.80% |
| PPPoE | 8B | 1,492.00B | 1,452.00B | 96.80% |
| 802.1Q VLAN | 4B | 1,496.00B | 1,456.00B | 97.10% |
| Q-in-Q (double VLAN) | 8B | 1,492.00B | 1,452.00B | 96.80% |
| Medium | MTU | Notes |
|---|---|---|
| Ethernet | 1500 | IEEE 802.3 standard |
| Jumbo Frame | 9000 | Data center, requires switch support |
| PPPoE (DSL) | 1492 | 8B PPPoE overhead |
| ATM (AAL5) | 9180 | Legacy WAN |
| IPv6 minimum | 1280 | Required by RFC 8200 |
| Loopback | 65535 | OS internal |
Maximum Transmission Unit (MTU) is the largest packet size a network link can transmit without fragmentation. Standard Ethernet MTU is 1500 bytes. However, encapsulation protocols (VXLAN, GRE, IPsec) add headers that reduce the available payload, potentially causing fragmentation and performance degradation.
This calculator determines the effective payload size after accounting for various encapsulation overheads. It helps network engineers set inner MTU values correctly to avoid fragmentation when using overlay networks, VPNs, or tunneling protocols.
MTU mismatches are a subtle but impactful source of network issues. When a packet exceeds the MTU of a link, it must be fragmented (adding overhead and delay) or dropped (causing TCP retransmissions). Proper MTU configuration prevents both scenarios.
MTU mismatches cause fragmentation, packet drops, and mysterious connectivity issues. This calculator ensures correct MTU settings for encapsulated traffic, preventing performance degradation.
Effective Payload = physical_MTU โ encapsulation_overhead
VXLAN Overhead = 50 bytes (8 VXLAN + 8 UDP + 20 IP + 14 Ethernet)
GRE Overhead = 24 bytes (4 GRE + 20 IP)
IPsec Overhead = 50โ73 bytes (varies by cipher)Result: Effective payload: 1450 bytes
Physical MTU 1500 bytes โ 50 bytes VXLAN overhead = 1450 bytes effective payload. Set inner VM/container MTU to 1450 to prevent fragmentation. Alternatively, use jumbo frames (MTU 9000) for the physical network to support full 1500-byte inner packets.
Larger MTU means fewer packets for the same data, reducing per-packet overhead (headers, interrupts, context switches). This is why jumbo frames (MTU 9000) improve throughput by 10โ30% in data center networks. However, larger packets also mean more data retransmitted on packet loss.
Modern cloud and container networking relies heavily on overlay protocols (VXLAN, Geneve, WireGuard). Each adds overhead that reduces effective MTU. The best practice is jumbo frames on the physical/underlay network, preserving full 1500-byte MTU for tenant/overlay traffic.
Path MTU Discovery (PMTUD) uses ICMP Packet Too Big messages to determine the smallest MTU along a network path. When firewalls block ICMP, PMTUD fails silently, causing TCP connections to stall for large packets. Always allow ICMP Type 3 Code 4 through firewalls.
Last updated:
Standard Ethernet MTU is 1500 bytes. This is the payload of an Ethernet frame, not including the 14-byte Ethernet header and 4-byte FCS. Most networks default to this value. Jumbo frames increase MTU to 9000 bytes but require end-to-end support.
When a packet exceeds a link's MTU and the Don't Fragment (DF) bit is set, the packet is dropped. TCP negotiates MSS to avoid this, but ICMP-based Path MTU Discovery can be blocked by firewalls, causing black-hole routing for large packets.
In data centers and between cloud instances in the same VPC, jumbo frames improve throughput by reducing per-packet overhead. However, all devices on the path must support jumbo frames. Don't use them for internet-facing traffic.
VXLAN adds 50 bytes of overhead: 14 (outer Ethernet) + 20 (outer IP) + 8 (UDP) + 8 (VXLAN header). With a 1500-byte physical MTU, the inner MTU is reduced to 1450 bytes. Use jumbo frames (9000+) on the underlay to avoid this reduction.
IPsec overhead varies by cipher suite: AES-128-GCM adds ~50 bytes, AES-256-CBC adds ~73 bytes. Include ESP header, IV, padding, and authentication. For a 1500-byte MTU with standard AES-GCM, the effective payload is ~1450 bytes.
Use ping with the don't-fragment flag: ping -f -s 1472 target (1472 + 28 bytes IP/ICMP header = 1500). Decrease the size until pings succeed to find the actual path MTU. This is manual PMTUD (Path MTU Discovery).
Calculate optimal TCP window size and maximum throughput based on bandwidth and round-trip latency (bandwidth-delay product).
Calculate file transfer time and effective throughput from bandwidth, latency, and protocol overhead for network planning.
Calculate VLAN capacity and plan broadcast domain sizing based on host count, traffic patterns, and performance targets.