Skip to content
7LayerX

Internet fundamentals / Hands-on lab

MTU and MSS: Find the Packet Size Limit

Explore MTU, TCP MSS, IPv4 fragmentation, IPv6 Packet Too Big, and Path MTU Discovery in a step-by-step interactive network simulation.

beginnerTCP/IPMTUMSSPath MTU Discovery

Lab goal

Use the simulator to see how a packet moves from a sender to a server when one link has a smaller Maximum Transmission Unit (MTU) than the links around it. Change the IP version, packet size, tunnel MTU, and feedback policy to compare forwarding, fragmentation, Path MTU Discovery, and a black-hole symptom.

This is a browser-based teaching model. It does not send packets from your device or change your network settings.

Start with the difference between MTU and MSS

MTU is a link’s limit for the network-layer packet it can carry. For IP, that means the IP header plus the IP payload. The Ethernet header and frame check sequence are outside that IP MTU calculation. A common Ethernet IP MTU is 1500 bytes, but networks, tunnels, and interfaces can use other values.

TCP Maximum Segment Size (MSS) describes the maximum amount of TCP data an endpoint is prepared to receive in one TCP segment. Endpoints can advertise an MSS option in TCP SYN segments. Each endpoint advertises its own receive limit; TCP does not negotiate one shared MSS number. The sender must also fit the segment inside the IP packet size its path can carry.

With the basic headers and a 1500-byte IP MTU:

ExampleCalculationTCP data limit
IPv4 with a 20-byte IP header and 20-byte TCP header1500 − 20 − 201460 bytes
IPv6 with a 40-byte base header and 20-byte TCP header1500 − 40 − 201440 bytes

These are common baseline calculations, not guaranteed values for every packet. TCP options, IPv4 options, IPv6 extension headers, and receiver limits can reduce the data that fits.

Interactive lab

Maximize the lab for a focused, full-screen workspace.

Explore the packet path

One segment. One smaller link. What changes?

Adjust the IP version, TCP data size, and tunnel MTU. Step through the path to see forwarding, fragmentation, feedback, or a PMTU black-hole symptom.

SRC

Client

Builds the IP packet

01

Access router

First-hop MTU: 1500 B

02

Tunnel edge

Tunnel MTU: 1420 B

03

Transit router

Forwards within MTU

DST

Server

Receives TCP data

IP MTU measures the IP packet; Ethernet framing is not included.

Packet controls

1460 B
256 BSource-link ceiling: 1460 B
1420 B
1280 B1500 B

Step 1 of 6

ready

The sender builds a TCP segment

1460 bytes of TCP data + 20 bytes of TCP header + 20 bytes of IPV4 header = 1500 bytes.

The IP packet size is what the network-layer MTU checks. Link-layer framing is outside this example’s MTU calculation.

IP packet

1500 B

Path MTU

1420 B

Path-limited TCP data

1380 B

Packet anatomy

What the MTU counts

IP packet: 1500 B · link limit: 1420 B

IPV4 header 20 B

TCP header 20 B

TCP data 1460 B

The Ethernet header and frame check sequence sit outside this IP MTU illustration. They still contribute to the size of the Layer 2 frame on the medium.

Network layer

MTU · the packet limit

A link MTU is the largest network-layer packet that can be carried over that link without network-layer fragmentation. The path MTU is constrained by the smallest relevant MTU along a route. Common Ethernet IP MTU is 1500 bytes, but it is not universal.

Transport layer · TCP

MSS · the TCP data limit

MSS is the maximum TCP data a receiver says it can accept in one segment. A sender also has to respect the packet size its path can carry. With base headers, 1500 − 20 − 20 gives an IPv4 MSS of 1460 bytes; for IPv6, 1500 − 40 − 20 gives 1440 bytes.

Path MTU Discovery and the black-hole symptom

Classic PMTUD starts with a packet size the sender believes the path can carry. If a router cannot forward it, the router drops it and sends a useful ICMP error back. The sender can then reduce its packet size. If that feedback is filtered, larger transfers may stall while small packets continue to work. For TCP, a correctly sized MSS can avoid sending segments that exceed the known path limit. Packetization-Layer PMTUD provides an approach that can probe packet sizes without depending on ICMP feedback alone.

IPv4

With DF set, an oversized packet is dropped and the router can return “Fragmentation Needed” (ICMP Type 3, Code 4).

IPv6

Transit routers do not fragment IPv6 packets; they drop an oversized packet and can return ICMPv6 “Packet Too Big” (Type 2, Code 0).

Field notes

  • An MTU mismatch can be limited to one tunnel or direction.
  • MSS options are exchanged in TCP SYNs; this is not a single shared MSS negotiation.
  • TCP options and IP extension/options headers reduce the data that fits in a packet.
  • A small ping reply proves reachability for that probe size, not for larger application packets.

Teaching model: the path, MTU values, and controls are illustrative. This lab does not send packets from your device. Real encapsulation, router policy, TCP options, and host behavior vary by network and platform.

Why a tunnel can change packet sizing

Encapsulation adds outer headers around the original packet. Encryption, tunnel protocol, padding, and the underlay path all affect the space available for the inner IP packet. That is why a packet that fits a 1500-byte Ethernet link can be too large for a tunnel path. There is no single tunnel MTU that applies to every VPN or provider network.

When you use the simulator, compare the IP packet size with the configured path MTU. The lab keeps the local link at 1500 bytes and lets you adjust one constrained path segment. The topology and values are illustrative; measure the MTU for the real path before changing a production interface.

What happens when a packet is too large?

IPv4: fragmentation or feedback

If an IPv4 packet is too large for the next link and fragmentation is allowed, a router may split the datagram into fragments. Each fragment gets an IPv4 header; the destination host reassembles the original datagram. Fragment offsets use 8-byte units, so non-final fragment data is aligned on an 8-byte boundary.

If the IPv4 Don’t Fragment (DF) flag is set, the router drops a packet that cannot fit and can report the limit with ICMP Destination Unreachable, “Fragmentation Needed” (Type 3, Code 4). Classic IPv4 Path MTU Discovery uses this feedback so the sender can reduce packet size instead of relying on router fragmentation.

IPv6: the source adjusts

Transit routers do not fragment IPv6 packets. If a packet is larger than the next link’s MTU, a router drops it and can send ICMPv6 “Packet Too Big” (Type 2, Code 0) back to the source. The source then sends smaller packets; if IPv6 fragmentation is needed, it is performed by the source using a Fragment extension header.

When feedback is filtered

If the required ICMP message cannot reach the sender, Path MTU Discovery may not learn about the smaller link. Small requests can work while larger transfers stall or time out. This symptom is often called a Path MTU black hole. It is a clue to investigate, not proof of a particular firewall fault: compare packet sizes and check both directions of the path.

Packetization-Layer Path MTU Discovery (PLPMTUD) is another approach. It probes packet sizes at a higher layer and can reduce dependence on ICMP error feedback. It still requires protocol and endpoint support. RFC 4821 describes a general IP PLPMTUD method; RFC 8899 specifies PLPMTUD for datagram transports.

A safe troubleshooting sequence

  1. Confirm the source and destination, IP version, and whether the problem affects one direction or both.
  2. Check interface MTUs along the path, including tunnel interfaces and encapsulation overhead.
  3. Compare small and larger probes. A small successful ping shows that the small probe can pass; it does not prove larger application packets will pass.
  4. Check that necessary ICMP errors are allowed back to the source. Avoid a blanket “block all ICMP” rule.
  5. If the network design uses TCP MSS adjustment, verify the SYN/SYN-ACK MSS values and the effective packet size at the tunnel boundary.
  6. Change one setting at a time, then repeat the same test from both ends where possible.

For a controlled IPv4 path test on Linux, ping -4 -M do -s 1472 <destination> sends 1472 bytes of ICMP data. With the 8-byte ICMP header and 20-byte IPv4 header, that is a 1500-byte IP packet, assuming no IPv4 options. Windows has the similar form ping -f -l 1472 <destination>. Choose a destination you are authorized to test, and adjust the probe size to the path you are measuring. The command’s payload size is not itself the MTU.

tracepath <destination> on Linux can also report path MTU information when supported by the route and the network. Tool output and behavior vary by operating system and network policy.

Key takeaways

  • MTU limits an IP packet on a link; MSS limits TCP data in one segment.
  • Headers consume part of the packet budget. Ethernet framing is not part of the IP MTU value.
  • A tunnel can lower the effective path MTU because of encapsulation overhead.
  • IPv4 may fragment when permitted; IPv6 routers do not fragment packets in transit.
  • PMTUD feedback must be able to reach the sender, or larger traffic may stall.
  • Use measured path values and the relevant platform documentation before making network changes.

Standards and further reading

Common questions

Does a 1500-byte MTU mean 1500 bytes of application data?

No. The MTU applies to the IP packet, including the IP header. TCP and other transport headers also use space, so the application data limit is smaller.

Is MSS the same as MTU?

No. MTU is an IP packet limit on a link. MSS is a TCP data limit advertised by a receiver; the sender also has to respect the IP packet size allowed by its path.

Why can ping work while a website or file transfer stalls?

A small ping may fit even when larger packets do not. If a smaller path MTU is present and the sender does not receive the required error feedback, larger TCP traffic can stall. Ping is one diagnostic clue, not a complete application test.

Do IPv6 routers fragment oversized packets?

No. A transit router drops an oversized IPv6 packet and can send an ICMPv6 Packet Too Big message. If fragmentation is needed, the source host performs it.

Continue learning

Continue with the Internet Fundamentals topic or explore why ping can work while an application fails. You can also use the subnet calculator when checking address ranges alongside network sizing.

Pass it along

Found this useful? Share it.

Choose a platform or copy the direct link.

LinkedInXFacebook

Continue practicing

Continue reading

Reader signal

Was this useful?

Your feedback helps shape the next field note and lab.

… views

Views count when this page opens. You can change or remove your vote during this tab session.