Calculate MTU of a circuit
Checking MTU for the Internet circuit
1. Windows
ping [url] -f -l <packet_size> The -f flag prohibits packet fragmentation. The -l <packet_size> flag sets the size of the packet when it is sent to the network. Note that the -l flag uses the lowercase letter L.
ping www.google.com -f -l 1450
2. Linux
ping -M do -s 1490 google.com -M do - implies do not fragment the packet -s - size of packet
We have the MSS (Maximum Segment Size) value, which defines the maximum size of the data block in bytes. This parameter does not take into account the length of the ICMP and IP headers. In our case MTU value = MSS + IP header + ICMP header.
Now let's add 28 bytes reserved for the data header (20 bytes for the IP header and 8 bytes for the ICMP request header) to the number obtained during the test. Thus, for our example, MTU=1472+28=1500 bytes (this is the optimal value for the MTU parameter).
2024-03-31 : Article Created
2025-02-04 : Minor changes