Linux – Why can I receive ethernet frames bigger than the current MTU size

linuxmtu

I configured the MTU size to 1000 with ip link set eth0 mtu 1000 on link eth0.
I disabled Generic receiving offloading (gro) with ethtool -K gro off (since this can lead to "false" frame length in tcpdump (see here))
But if I capture now with tcpdump I still get packets which are larger than 1000, e.g. 1500 bytes.

What I am doing wrong ?

On the receiving side with MTU set to 1000:

eth0: mtu 1000

14:27:38.361168 IP XXXXXX > YYYYYY: ICMP echo > request, id 3273, seq
1, length 1480 14:27:38.361495 IP YYYYYY > XXXXXX: ICMP echo reply,
id 3273, seq 1, length 976

Best Answer

MTU is the maximum packet size that can be sent through an interface. MTU doesn't limit the maximum packet size that can be received.

RFC 1191 says:

... When one IP host has a large amount of data to send to another host, the data is transmitted as a series of IP datagrams. It is usually preferable that these datagrams be of the largest size that does not require fragmentation anywhere along the path from the source to the destination. (For the case against fragmentation, see [5].) This datagram size is referred to as the Path MTU (PMTU), and it is equal to the minimum of the MTUs of each hop in the path. A shortcoming of the current Internet protocol suite is the lack of a standard mechanism for a host to discover the PMTU of an arbitrary path.

      Note: The Path MTU is what in [1] is called the "Effective MTU
      for sending" (EMTU_S).  A PMTU is associated with a path,
      which is a particular combination of IP source and destination
      address and perhaps a Type-of-service (TOS)...