Categories
Networking

Tech Tip: Determining MTU via MacOSX Ping oh yeah and Windows

The command:
ping -D -s 1472

What the command does
ping = Obvious
-D = Don’t fragment
-s <value> = the ping size.

Why did I start with 1472? That is the total packet size plus 28 bytes, which equals a 1500 byte packet.

Example Output:

Justins-MacBook-Pro:~ j2sw$ ping -D -s 1472 4.2.2.2
PING 4.2.2.2 (4.2.2.2): 1472 data bytes
1480 bytes from 4.2.2.2: icmp_seq=0 ttl=57 time=426.164 ms
1480 bytes from 4.2.2.2: icmp_seq=1 ttl=57 time=110.762 ms

--- 4.2.2.2 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 110.762/268.463/426.164/157.701 ms

Justins-MacBook-Pro:~ j2sw$ ping -D -s 1473 4.2.2.2

PING 4.2.2.2 (4.2.2.2): 1473 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
Request timeout for icmp_seq 0

If you want to learn how to do this on windows:
https://kb.netgear.com/19863/Ping-Test-to-determine-Optimal-MTU-Size-on-Router

%d bloggers like this: