Tuesday, January 29, 2013

How to change your MTU size under Vista or Windows 7

  • Find your MTU
From an elevated command prompt enter the following command:

netsh interface ipv4 show subinterfaces

  • Find out what it should be
ping www.google.com -f -l 1472

The host name should be a site you can not reach, -f denotes that icmp packets should not be fragmented, the -l 1472 sets the size of the packet (1472 = Ethernet Default MTU – Packet Header, where the Ethernet Default MTU is 1500 and the Packet Header is 28 bytes).
If the packet can’t be sent because it would need to be fragmented you will get something similar to this:

Packet needs to be fragmented but DF set.

Keep trying lowering packet sizes by 10 (i.e. -l 1460, 1450, 1440, etc.) until you get a successful ping request. Raise your packet sizes by one until you get a "Packet needs to be fragmented but DF set.". The last successful value plus 28 will be your MTU value.
In my case a packet size of 1464 succeeds but 1463 fails, so 1464 + 28 = 1492.

  • Set your MTU
netsh interface ipv4 set subinterface "Local Area Connection" mtu=1492 store=persistent

For more information you can read the following link.

No comments:

Post a Comment