How do I determine the MTU size?

I got confused about the frames (frames). I don't understand how it is calculated? Should the MTU be constant or not? - in my router and on the network card, different default values are set, and in the network card this value is greater.

And what is included in the MTU - just the payload or the entire frame? Information about this is contradictory, somewhere they write that this MTU is the entire frame, somewhere that only the payload. As it really is, someone in any way brazenly lying? It is unlikely that the receiving device having a limit on the MTU for example 1500 thinks: "so, what would I calculate - the entire frame of 1540 or the payload of 1500..... to accept or not to accept, what to do..... error...error...... "

And it is not clear how the receiving device understands where the frame ends, because according to Wikipedia https://ru.wikipedia.org/wiki/Ethernet the payload can be variable, and the total frame length or payload length is not specified?

Author: Павел Игорев, 2017-11-30

1 answers

Maximum transmission unit (MTU) is the maximum amount of data that can be transmitted by the protocol in a single iteration. For example, the Ethernet MTU is 1500, which means that the maximum amount of data carried by an Ethernet frame cannot exceed 1500 bytes (excluding the Ethernet header and FCS (frame check sequence).

No, you do not need to increase this value for a reason: if a packet that exceeds the set IP MTU reaches the interface, the packet is either fragmented, or, if the DF (DO NOT Fragment) flag is set in the IP header, it is canceled, and the device will generate (not always, though) an ICMP message Fragmentation Needed and send it back to the sender of the original packet. Therefore, I would not exceed the value set in the network card without special need. You can even ping the following routers in packets of different lengths with the DF flag set to determine what maximum MTU it will accept without fragmentation. The chances are great, that the size will be even smaller than 1500.

There are a good article on Habr, explaining a number of points.

 1
Author: Viktor Tomilov, 2017-12-01 03:10:44