Search code examples
android-fragmentsmtu

Why are MTU sizes checked by "netsh interface ip show subinterfaces" and "ping google.com -l 1472 -f" different?


I am checking the MTU size of a USB tethering connection, but I got different results with different commands...

By using "netsh interface ip show subinterfaces" I get the following results (Local Area Connection 8 is the tethering connection):

C:\Users\Chris>netsh interface ip show subinterfaces

MTU MediaSenseState Bytes In Bytes Out Interface


4294967295 1 0 1350760 Loopback Pseudo-Interface 1 1500 2 3756376356 10363121083 Wireless Network Connection 1500 5 0 0 Local Area Connection 1500 1 178477 238360 Local Area Connection 8

But by using "ping google.com -l 1472 -f" I got the following results:

C:\Users\Chris>ping google.com -l 1472 -f

Pinging google.com [216.58.220.142] with 1472 bytes of data: Reply from 192.168.42.129: Packet needs to be fragmented but DF set. Packet needs to be fragmented but DF set. Packet needs to be fragmented but DF set. Packet needs to be fragmented but DF set.

The tethering connection is the only working connection when I check. If the MTU size is 1500 the ping method should work... I am a little bit confused here. Could anyone tell me what's the difference between the 2 method?


Solution

  • netsh shows the MTU of the interface itself. But your ping command sends packets through your interface into the wider world of the Internet. Somewhere along the path between your interface and google.com there is a router with a smaller MTU than 1472 bytes. This is called Path MTU.