Categories
Debian Windows 7

Find max MTU size

MTU
Maximum Transmission unit is how big of a fragment can be sent. TCP/IP fragments data that doesn’t fit into one window (just about everything), then reassembles it at the far end. If the MTU is wrong, networking will fail.

I was wondering what the max MTU size was from my PC to our gateway … here is how I found the max mtu size

MTU
Maximum Transmission unit is how big of a fragment can be sent. TCP/IP fragments data that doesn’t fit into one window (just about everything), then reassembles it at the far end. If the MTU is wrong, networking will fail.

I was wondering what the max MTU size was from my PC to our gateway … here is how I found the max mtu size


Y:\>for /L %i in (11825,1,12000) do @ping -l %i -n 1 10.0.0.1 | find "Reply" && ping -n 1 -w 1000 224.0.0.0>NUL
Reply from 10.0.0.1: bytes=11825 time=6ms TTL=255
Reply from 10.0.0.1: bytes=11826 time=6ms TTL=255
(...omitted for brevity...)
Reply from 10.0.0.1: bytes=11833 time=6ms TTL=255
Reply from 10.0.0.1: bytes=11834 time=6ms TTL=255
^C^C
Y:\>

This batch file to find the max MTU size died at 11834~ in the 3 tests I ran, so 11834~ is the highest MTU this hop allows.
The loop starts at 11825, increments by 1, until it hits 12000 and does the “do” part of above, replacing %i with the current variable. The @ping doesn’t echo back the ping command, and the find command strips out only what we want to see.
The red part is optional, and is how to pause a windows batch loop on each iteration for 1 second. If you omit it, the loop works like a cisco ping and goes very fast.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.