MTU/MSS - How to test using PING

From Tech-Wiki
Jump to: navigation, search

MTU = max transmission unit of a Layer 2 Frame
MSS = max segment size of a Layer 4 protocol

For TCP/IP:
MSS = MTU-40 (TCP and IP headers are 40 bytes)

Testing MTU using Winodws ping command

ping -f -l X hostname   (set do not fragment and set icmp payload to X)

Simple loop for Windows ping testing

FOR /L %A IN (1200,1,1473) DO ping -f -n 3 -l %A hostname >> C:\mtu-test.txt

If X = 1388 gets a reponse then
MTU = X + 28 (20 for IP header and 8 for the ICMP header)
MTU = 1416
MSS = 1416 - 40 = 1376