Change your MTU under Vista, Windows 7 or Windows 8

October 23, 2009 – 21:11

I have been updating this blog post over the years since I first discovered the issue with my computer in Windows Vista, now I am on Windows 8 and also on [[Wikipedia:Fiber_to_the_x|FTTC broadband]]; [[Wikipedia:Path_MTU_discovery|Path MTU Discovery]] seems to just work. I have tested the process so the approach and the commands still work in Windows 8, I however no longer need to use this process personally.

For some reason that has escaped me [[Wikipedia:Path_MTU_discovery|Path MTU Discovery]] (PMTUD) in Windows just doesn’t seem to figure out the MTU for a given path (something to do with routers being poorly configured to not respond to [[Wikipedia:Internet_Control_Message_Protocol|ICMP]] requests). So Windows uses the default. For the most part this doesn’t affect anyone, however if it does affect you, it really annoys you. Failure of PMTUD will result in some websites not loading correctly, having trouble connecting to normally reliable online services and general Internet weirdness.

The resolution is to set your default MTU to one lower than the [[Wikipedia:Ethernet]] default of 1500. Here is how:

Step 1: Find your MTU

From an elevated Command Prompt in Vista/Windows 7 or the same elevated Command Prompt in Windows 8 enter the following command:

netsh interface ipv4 show subinterfaces

You should get something like this

MTU         MediaSenseState  Bytes In    Bytes Out  Interface
----------  ---------------  ---------   ---------  -------------
4294967295  1                0           13487914   Loopback Pseudo-Interface 1
1500        1                3734493902  282497358  Local Area Connection

If you are using Ethernet cable you will be looking for “Local Area Connection” or “Ethernet”. If you are using Wireless you will be looking for “Wireless Network Connection”. The MTU is in the first column.

Step 2: Find out what it should be

In the Command Prompt type:

ping -f -l 1472

The host name should be a site you can not reach, -f marks the packet as one that 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 lower 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 1430 succeeds but 1431 fails, so 1430 + 28 = 1458.

Step 3: Set your MTU

Now you have identified the interface you need to change and the ideal MTU for you, now it is time to make the change. Again from an elevated Command Prompt type the following replacing my MTU of 1458 with your own value:

netsh interface ipv4 set subinterface "Local Area Connection" mtu=1458 store=persistent

Or if you are using a Wireless connection:

netsh interface ipv4 set subinterface "Wireless Network Connection" mtu=1458 store=persistent

If all has gone well you should have a perfectly working internet connection.

  1. 170 Responses to “Change your MTU under Vista, Windows 7 or Windows 8”

  2. hi man my problem is :
    my win is 8.1
    I follow your steps and raised my packet size till reach the maximum value and every time I have a successful ping request
    and the “Packet needs to be fragmented but DF set.”. never show up. what should I do
    plz help

    By Hamaada on Apr 27, 2015

  3. hi Richard

    I am using a d-link 615 W/L router (PPPoE – Cable broad band User/namepasswd), my MTU size keeps going down, it started from 1472, now its working on 1272, it goes down by 28 bytes, looks like the header size is increasing (or may be getting duplicated).

    my ipv4/6 sizes are 1500 (1472+28), i wonder what am i missing here !

    C:\Users\User>netsh interface ipv4 show subinterfaces

    MTU MediaSenseState Bytes In Bytes Out Interface
    —— ————— ——— ——— ————-
    4294967295 1 0 121293 Loopback Pseudo-Interface 1
    1500 1 17627891 2376327 Local Area Connection

    C:\Users\User>netsh interface ipv6 show subinterfaces

    MTU MediaSenseState Bytes In Bytes Out Interface
    —— ————— ——— ——— ————-
    4294967295 1 0 282603 Loopback Pseudo-Interface 1
    1500 1 0 306343 Local Area Connection

    C:\Users\User>ping -f -l 1273

    Pinging [] with 1273 bytes of data:
    Reply from Packet needs to be fragmented but DF set.
    Packet needs to be fragmented but DF set.
    Packet needs to be fragmented but DF set.

    C:\Users\User>ping -f -l 1272

    Pinging [] with 1272 bytes of data:
    Reply from bytes=64 (sent 1272) time=3ms TTL=59
    Reply from bytes=64 (sent 1272) time=3ms TTL=59
    Reply from bytes=64 (sent 1272) time=3ms TTL=59
    Reply from bytes=64 (sent 1272) time=3ms TTL=59

    Thanks in advance, i see you are doing a great job helping others ! much appreciated (i have already learned so much just by reading this article)


    By Prashant on Jun 20, 2015

  4. An old site – but great info. Had issues with google web pages inc gmail (and anything accessing google resources like fonts) dropping out on a regular basis. Changed WiFi MTU to 1464 and it now works perfectly.

    many thanks!!

    By Adam on Jul 1, 2015

  5. I must be doing something wrong. I have followed your instructions precisely, but am already down to 1290 and it still won’t connect to “” Are you using that as a place marker for an actual site? I don’t have another site that just simply won’t connect. I’m trying to set the MTU to help cut down on the speed reduction from using my vpn. Thanks for the great article.

    By Patrick Dieter on Jul 24, 2015

  6. Hi,
    I’m using Win 7.
    Your article explains how to change MTU for the all OS. But do you know if we can do that by GPO for only some URL?

    Thanks for your article.

    By Alacran on Oct 9, 2015

  7. Dont you also need to adjust the ipv6 MTU?

    By Dustin on Dec 16, 2015

  8. Hi Richard,
    Thanks for the great article. I’ve a lot of questions about MTU, however previous posters seem to have asked most of them. I just want to know, let’s say (and it is) my router (actually DSL modem router) have MTU as 1480. I have 2 clients connected to same router. Client 1 is a Windows 7 box and MTU was set to 1480 as well. But client 2 is XP SP2 and what i found 1464 is OK for it. So, do i have to change and enter different MTU values for EVERY (EACH) computer eventhough connected to the same router?

    And the big question, why does MTU vary for each computer although connected to same router? Ethernet/Wifi differs?


    By Onur on Feb 12, 2016

  9. I’ve spent days trying to network a Windows 7 and XP machine together and this problem was at the root of the difficulties. The solution worked perfectly. Many thanks!

    By Terry Stewart on Jun 5, 2016

  10. It could be a difference between WiFi and Ethernet; I have never experienced this behaviour, though. At the end of the day, you have done what you need to do to get it working, frustrating as it may have been to get there.

    By Richard Slater on Jun 22, 2016

  11. I have never had a broadband provider that has supported IPv6 directly, this has meant that any use of IPv6 has been through a tunnel, which is largely immune from these issues.

    By Richard Slater on Jun 22, 2016

  12. You cannot apply MTU settings on a URL by URL basis; it is a property of the network adapter, not a web browser. As for applying MTU settings with Group Policy then there doesn’t seem to be a built-in setting. However, you could either script the change or build a group policy extension of your own.

    By Richard Slater on Jun 22, 2016

  13. Yes, is just a placeholder for a site that you cannot access. It’s not directly related to the target site as the problem usually lies between you and the site itself.

    By Richard Slater on Jun 22, 2016

  14. I suspect the problems you are experiencing are not related to your MTU, can I suggest to investigate further.

    By Richard Slater on Jun 22, 2016

  15. I m searching for mtu from 1 hr in command prompt but i cant find my mtu value. It always show ” ping request could not find host please check the name and try again”. What should i do?

    By Amar on Sep 21, 2016

  16. Hey Richard, i’m also working on my MTU settings at the moment, i also found out that my ideal MTU would be 1464, but when i want to change the mtu to 1464 and i type in the command you wrote about the cmd says something like “the syntax for the file name, folder name or the data media name is wrong” (sry i’m using german windows the translation may be bad). I’m using Windows 10 on a Laptop with WiFi connection. I opened the cmd as admin and the direction is C:\WINDOWS\system32>

    By Janek on Oct 17, 2016

  17. Hi, I followed your guidance, I got the best mtu e.g. 1430 I restart Windows then test again I got another mtu value, and keep getting different mtu values every time I test after restart Windows, what’s going on?

    By bonbonboi on May 22, 2017

  1. 4 Trackback(s)

  2. Aug 27, 2015: Ethernet, MTU, TCP,IP ,ICMP packet size | andrewlaihk
  3. Feb 24, 2016: MTU Size Matters | Thee DocKtor's Blog
  4. Oct 14, 2017: Hálózatok | InfoTan
  5. Jul 27, 2020: Linux HowTo: Changing MTU on Windows 8 - TECHPRPR

Post a Comment