Toolvito

Works on this device

Mtu Calculator

The MTU (maximum transmission unit) of a link is the largest IP packet it carries. Choose the layers that wrap your packets, and the page takes their headers off the MTU to show the payload and the TCP segment size that are left. It also splits a large packet into fragments and shows how efficient a packet size is.

Enter your values

Take the headers of each layer off the MTU of the link to see what is left for your data.

Your values

The largest IP packet that the link carries. 1,500 bytes is usual on Ethernet. The Ethernet header and the frame check are not part of it.

Used on many DSL and fibre lines. It leaves an MTU of 1,492 on Ethernet.

Type 0 for none. Count them only if the link was not made larger to hold them.

Bytes of any other layer. Use it for encryption (IPsec, WireGuard, OpenVPN): its size depends on the cipher and the mode, so read it from your product. Also for a GRE key (4 bytes) or a VLAN tag inside a tunnel (4 bytes).

Most packets have none: type 0. IPv4 options are 0 to 40 bytes in steps of 4. IPv6 extension headers come in steps of 8.

A TCP header is 20 bytes without options and at most 60 with them. Time stamps use 12 bytes in each segment. Type 0 if you do not know.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Type the MTU of the link. 1,500 bytes is usual on Ethernet.
  2. Tick PPPoE if the line uses it, type the number of MPLS labels, and choose a tunnel if there is one.
  3. Type other overhead in bytes for layers that are not in the list, such as encryption.
  4. Choose the IP version and the transport of your own packets.
  5. Choose Calculate. The table shows each layer, its standard, its bytes and what is left.

Header sizes that are built in

These sizes are fixed by the standards named. The size of an IPv4 or TCP header grows with options: type those bytes yourself.

Header sizes and their standards
Header Bytes Standard
IPv4 header without options (20 to 60 with options) 20 RFC 791
IPv6 header (extension headers are extra) 40 RFC 8200
TCP header without options (20 to 60 with options) 20 RFC 9293
UDP header 8 RFC 768
ICMP echo header (ping), also for IPv6 8 RFC 792 and RFC 4443
PPPoE header (6) and PPP protocol field (2) 8 RFC 2516
MPLS label, each 4 RFC 3032
GRE header without key or sequence number 4 RFC 2784
VXLAN header 8 RFC 7348
Inner Ethernet header inside VXLAN 14 IEEE 802.3
IPv6 fragment header 8 RFC 8200

A tunnel also adds an outer IP header of 20 bytes (IPv4) or 40 bytes (IPv6). So GRE over IPv4 takes 24 bytes and VXLAN over IPv4 takes 20 + 8 + 8 + 14 = 50 bytes. Overheads of encryption such as IPsec, WireGuard or OpenVPN depend on the cipher, the mode and the version. They are not built in: read the figure from your product and type it as other overhead.

The rules

  • MTU for your IP packets = MTU of the link − the headers of the layers that wrap your packets.
  • TCP MSS = MTU for your IP packets − fixed IP header − 20. The MSS that a host announces does not take options into account (RFC 9293). A sender that uses options puts less data into each segment.
  • Largest UDP payload and largest ping size = MTU for your IP packets − IP header − 8.
  • IPv4 fragments: each fragment repeats the IP header. Each one but the last carries the largest multiple of 8 bytes that fits. The offset field counts in units of 8 bytes.
  • Efficiency = data in the packet ÷ (size of the packet + framing bytes outside it) × 100.

Worked examples

Ethernet: 1,500 − 20 (IPv4) − 20 (TCP) = 1,460 bytes. This is the usual TCP MSS. With IPv6 it is 1,500 − 40 − 20 = 1,440 bytes.

PPPoE: 1,500 − 8 = 1,492 bytes for IP packets, so the TCP MSS is 1,452 bytes.

GRE over IPv4: 1,500 − 20 − 4 = 1,476 bytes for IP packets, and a TCP MSS of 1,436 bytes.

VXLAN over IPv4: 1,500 − 50 = 1,450 bytes for IP packets. To carry packets of 1,500 bytes inside, the link needs an MTU of 1,550 bytes.

Ping: to test an MTU of 1,500 with IPv4, send a ping of 1,500 − 20 − 8 = 1,472 bytes that may not be split.

Fragments: an IPv4 packet of 4,000 bytes over a link with an MTU of 1,500 has 3,980 bytes of data. It becomes 3 fragments with 1,480, 1,480 and 1,020 bytes of data. Their offset fields are 0, 185 and 370.

Efficiency: a packet of 1,500 bytes with 40 bytes of headers and 38 bytes of Ethernet framing is 94.93% data. A jumbo packet of 9,000 bytes is 99.14% data.

Limits you should know

  • The MTU is the size of the IP packet. The Ethernet header (14 bytes) and the frame check (4 bytes) are outside it, and so is a VLAN tag on most equipment.
  • The page does not test your path. A packet that is too large for a link on the way is split or dropped. Test with a ping of a set size that may not be split.
  • One tunnel at a time can be chosen. Add the bytes of a second tunnel as other overhead.
  • No overheads of encryption or of any product are built in, because they vary.
  • The fragment table assumes that every fragment repeats the whole IPv4 header, and for IPv6 that there are no other extension headers.
  • For the rate that headers leave on a link, see the Network Throughput Calculator. For addresses and subnets, see the IP & Subnet Calculator.

Related tools