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 FTTC broadband; 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 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 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 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 www.cantreachthissite.com -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.

Be Sociable, Share!
    1. 165 Responses to “Change your MTU under Vista, Windows 7 or Windows 8”

    2. Richard,

      I found an alternative website. thank you.:)

      Renzie

      By Renzie on Jun 6, 2012

    3. i used this method and successfully changed my MTU, thanks so much!
      but i have a related question. every time i reboot or shut my computer down and boot it up again later, the MTU settings i adjusted are lost 🙁
      i’m running cmd.exe as administrator and using store=persistent at the end of the command line, but still it keeps resetting itself to MTU=1300 after every (re)boot.

      is there anything i can do to save this setting ?

      By Matt on Jun 25, 2012

    4. Works for me. Thank you very much!

      By little daddy on Jul 7, 2012

    5. Great article – thanks. Issue for me though is…
      > default router (Belkin) mtu = 1454
      > laptop; Win7; wireless connection
      > ran the ping test: frag cleared at 1420
      > changed mtu (on the laptop) to 1420
      ping (same site) now fragments???
      ping using mtu 1454… still fragments???
      > changed mtu on the router to 1420
      ping still fragments

      Did the same with a hard-wired connection, same results – looking at this because of outlook/internet transport delays

      By SteveG on Jul 31, 2012

    6. Thanks for this post. I have a pc running windows 7 at 1500 mtu, a pc running xp, but hooked up to a remote server via vpn and both are connected to the modem via linksys E4200 router. I understand vpn default mtu setting is 1400. I have now lowered the mtu settings for both the router as well as win7 pc to match this. But when pinging at 1400, I do see frags, but when I lower it to 1372, dont see any frags. My web browsing is very fast, but I also have a Vonage voip hooked up to the router. Will the frags at 1400 mtu cause problems on voip resulting in poor voice quality? thanks for your help

      By maka thuka on Aug 16, 2012

    7. subsequent to my earlier post, the setting of 1400 MTU, my iPad cannot connect to internet. I went back up to 1462 and the iPad is working fine. But on pinging the frag issue remains, which also is seen in voip quality and slower page loading on win 7 pc. Just cant win. Help will be highly appreciated

      By maka thuka on Aug 16, 2012

    8. I followed the instructions on this, but every time I set the mtu to a new value, I do a test ping and it times out. I am constantly lowering it until I get a successful ping, but once I set it again, its useless again. I can’t get to google and I know if I change the router mtu I can get it to work, but the X-box requires a min value of 1436 or some such. Please help.

      By FWT on Aug 28, 2012

    9. Oh and I forgot to add, the laptop in question works fine on other networks.

      By FWT on Aug 28, 2012

    10. Thank you Richard. This solved my Error 10053 instantly. Fantastic tutorial man. (Win7-HomePre64)

      By Donny on Sep 5, 2012

    11. Hi Richard,

      My problem is back again. It was fine yesterday after I changed the MTU. I tried to do the same thing, but it didn’t work. Any help is appreciated.

      By Donny on Sep 6, 2012

    12. ive tried this n wont work to be honestdont have a clue ive read up on loads of thing about it i just cant get face bookto load but every other program will help

      By laura on Nov 16, 2012

    13. thanks man,that was that much helpful !

      By prabaharan on Dec 23, 2012

    14. Hello!

      I found out that my ideal MTU is 1500… and that just doesn’t make any sense to me because it seems that everyone has to lower theirs to some degree. I get to leave mine at its current setting? The default setting? My ideal is really the default? My head hurts.

      By Alec on Jan 17, 2013

    15. 1500 is perfect, that simply means that there is nothing in between you and the sites you are trying to connect to that need a smaller MTU. It is in fact the way it should be, alas it’s not a perfect world for the rest of us.

      By Richard Slater on Jan 17, 2013

    16. the following link gives another way of achieving same – by editing registry…

      http://www.windowsreference.com/windows-2000/how-to-manually-set-the-mtu-size-in-windows-xp-2003-2000-vista/

      By Shekky on Jan 29, 2013

    17. Hi

      I’ve followed all your very clear instructions and managed to find out that the MTU needs to be 1458 but I don’t know which of figures I need to change because I get 3 interfaces as well as the default one. They are:

      Wireless Network Connection
      Local Area Connection
      Wireless Network Connection 2

      I’m not sure whether I should change them all or not.

      I’ve tried changing both wireless networks but it hasn’t worked.

      I know that the problem lies with my new machine as my previous one and another currently in use is working fine.

      Any help much appreciated.

      Many thanks

      By Gill on Mar 21, 2013

    18. Richard,

      Thank you, thank you, thank you! You’re the man. I was dealing with the same issue you were and nothing I did worked. I did basically the same things you did and zero. I knew it was a Windows issue because I installed Linux Ubuntu side by side and had no problems with the net. I let it go for a couple of weeks and a voice popped into my head this morning to search for the answer again. I did and your fix was the first one that popped up! All is fine again, thanks again!

      By Alex on Mar 23, 2013

    19. Thanks a ton!! I had been using this wifi hotsopt since last 2-3 months, but it was not giving enough speed to download on my android. But your solution worked like a charm!! Again Thanks a lot..

      By Vaibhav Natekar on Mar 30, 2013

    20. there is a hyper-v host with a single windows 7 .VHD that can be accessed multiple times concurrently. how can I set globally? as I get a 4 or 7 at the end of my connection?

      By Chris Frenzel on Apr 20, 2013

    21. I am facing the problem of invalid ip config. while using LAN wire but my wifi works fine.
      So i tried using the technique mentioned above to fix the problem.
      When I have tried pinging http://www.google.com, it keeps showing that the host name couldn’t be found!

      How do i fix this thing.. any help ?

      By Shubham on Apr 28, 2013

    22. Also, with regard to my last inquiry, i would like to mention that with the same wired connection I am able to connect to a different internet by changing the ipv4 and proxy settings using the same LAN port.
      This problem started to happen only after I installed ‘Connectify’ used to create wi-fi hotspot.
      Initially i was able to access the same internet connection with the same port without any problem and was able to switch between the two proxies and ipv4 connection settings.

      By Shubham on Apr 28, 2013

    23. I had a problem yesterday where suddenly I could only access Google search and the search pages of eBay. If I tried to access one of the sites a Google search listed, or if I tried to do something else on eBay like place a bid, I got a “Firefox cannot find the server at …” error. When this had lasted most of the day, I switched off everything, including the router/modem, for a couple of hours, and then things worked ok again. I’m using a new TPLink modem on BT Broadband and I thought it probably was something to do with the modem, but if it happens again, would an MTU change be a more permanent fix?

      By Phil on Apr 28, 2013

    24. are you pinging http://www.google.com?, for example:

      ping -l 1472 -f http://google.com

      this would be incorrect as you are specifying the scheme (protocol, i.e. http), the correct command is:

      ping -l 1472 -f google.com

      By Richard Slater on Apr 28, 2013

    25. I would suggest it is unlikely, MTU issues in my experience have always been all or nothing.

      By Richard Slater on Apr 28, 2013

    26. Hi.
      In the final step the procedure failed and showed that “element not found” !!
      what does that mean????

      By sunnyD on May 18, 2013

    27. what was the exact command you used?

      By Richard Slater on May 18, 2013

    28. This really helped. I was not able to access certain sites like yahoo.com, microsoft.com on my Windows 7. Thanks for sharing this information.

      By Gargi on May 28, 2013

    29. Error 101 (net::ERR_CONNECTION_RESET): The connection was reset. I have changed mtu but still can’t access facebook page and when I am pinging http://www.facebook.com it shows
      packet needs to be fragmented but DF set.
      (4 times)
      packet stastics
      packets: sent=4, recevied=0, lost=4(100% loss)

      By priyanka on Jun 1, 2013

    30. “Element not Found”

      Microsoft Windows [Version 6.2.9200]
      (c) 2012 Microsoft Corporation. All rights reserved.

      C:\WINDOWS\system32>netsh interface ipv4 set subinterface “Local Area Connection
      ” mtu=1492 store=persistent
      Element not found.

      C:\WINDOWS\system32>netsh interface ipv4 set subinterface “wireless Network Conn
      ection” mtu=1492 store=persistent
      The filename, directory name, or volume label syntax is incorrect.

      C:\WINDOWS\system32>ping http://www.cantreachhissite.com -f -l 1464

      Pinging http://www.cantreachhissite.com [199.101.28.20] with 1464 bytes of data:
      Reply from 199.101.28.20: bytes=1464 time=200ms TTL=57
      Reply from 199.101.28.20: bytes=1464 time=187ms TTL=57
      Reply from 199.101.28.20: bytes=1464 time=95ms TTL=57
      Reply from 199.101.28.20: bytes=1464 time=123ms TTL=57

      Ping statistics for 199.101.28.20:
      Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
      Approximate round trip times in milli-seconds:
      Minimum = 95ms, Maximum = 200ms, Average = 151ms

      C:\WINDOWS\system32>netsh interface ipv4 set subinterface “Local Area Connection
      ” mtu=1492 store=persistent
      Element not found.

      C:\WINDOWS\system32>netsh interface ipv4 show subinterfaces

      MTU MediaSenseState Bytes In Bytes Out Interface
      —— ————— ——— ——— ————-
      4294967295 1 0 1043600 Loopback Pseudo-Interface 1
      1500 2 4577841 362517 Wi-Fi
      1500 5 0 103320 Local Area Connection* 11
      1500 1 342157502 16746163 Ethernet

      C:\WINDOWS\system32>

      By lily k on Jul 2, 2013

    31. Hi Richard,

      Excelent article!, I was going crazy! until I reach your site.

      I just have a question. I´m facing this issue when we try to access a tomcat server (installed on a windows 7 box) from another lan (connected to server windows 7 box via lan to lan through satellite link).
      I need to stablish mtu in windows 7 box too(where I have the tomcat installed) ?
      thanks,
      Walter

      By Walter on Jul 11, 2013

    32. Thanks a ton Richard , this really helped . Had this problem for months finally found the solution here . Kudos !!!!

      By Kat on Aug 29, 2013

    33. Hello guys, I have a question. My mtu value is 1500, so it says that about “packet needs to be gragmented…” so i look for a lower value, and found where the msg doesnt show anymore. But when i Set it to that Value, and ping with the working value, it appears again, and now the working value is the same -28, and so on…
      Any ideas?

      By Luis on Sep 1, 2013

    34. Because every packet has an overhead over the size of the packet, Wikipedia has a good diagram to help visualize this overhead.

      By Richard Slater on Sep 1, 2013

    35. Thank you for your reply, but I really don’t know what to do with that. I don’t know much about networks. Any idea what can cause this? because I can browse any site when i restart my pc, but after a while the error starts to pop up in every site. I clear the cache, but that’s not working. Thank you for your time.

      By Luis on Sep 2, 2013

    36. So far I tried:
      1) reset my hosts file.
      2) Change mtu.
      3) I’ve checked and I’m not using any proxy.

      I was thinking about reinstall my antivirus, since in one forum i saw a guy who had this issue and had to reinstall his Avast antivirus to make it work again. But if any of you have an idea, would be useful.

      By Luis on Sep 9, 2013

    37. Hello Rechard,
      Everything works well for me till third step.
      But in the third step i got an error that Element not found.What to do?Please help…!!

      By Ketul on Sep 28, 2013

    38. What’s Going down i’m new to this, I stumbled upon this I’ve found It absolutely useful and it has helped me out loads.
      I hope to give a contribution & assist other users like its aided
      me. Great job.

      By Top infomercial production companies Los Angeles on Oct 12, 2013

    39. I also got the element not found on the third step windows 8.1 64 bit, PPOE, DSL, Router

      By Bill on Nov 2, 2013

    40. Thanks for a very informative explanation and straightforward instructions.

      By jimmy on Nov 13, 2013

    41. SOLUTION TO “element not found” error

      When you run the command , “netsh interface ipv4 show subinterfaces”

      pay attention to the interface name in the column and use only this name while running the command
      “netsh interface ipv4 set subinterface “Wireless Network Connection” mtu=1458 store=persistent”

      For e.g. I was running the above command as it is but then I saw that I had named my “Wireless Network Connection” to “Wireless” some time back.
      Therefore I ran the command like this “netsh interface ipv4 set subinterface “Wireless” mtu=1458 store=persistent”

      Notice that I wrote “Wireless” in place of “Wireless Network Connection” and it worked.

      By Pooja on Nov 22, 2013

    42. It’s different under windows 8 for those with the “Element not found” error,

      You must replace the word “Local Area Connection” in the command, with the applicable “Ethernet” or “Wi-Fi”

      Hope this helps someone, spent 15 minutes trying to figure that out.

      By johndoe on Dec 4, 2013

    43. Hi,

      I’m using Win 8.1
      When I change the mtu size in cmd it changes to the value i select, but after rebooting it’s back to 1500. Somebody got an idea for me ?

      By dnl on Jan 9, 2014

    44. I am having the same issue as dnl above; I am using Win 8.1 and after changing my MTU everything works great, but once I reboot the MTU goes back to its default.

      By Robert on Feb 25, 2014

    45. Thank you Johndoe. 🙂

      By Maruf on Mar 7, 2014

    46. looked for the mtu settings in the driver settings. but is even better! works perfectly under win8. Thx!

      By lukas on Apr 21, 2015

    47. I can’t access winmtr.net on my computer using any browser….but when I ping the site I get results using command prompt….any comments

      By John Wiseman on Apr 22, 2015

    1. 4 Trackback(s)

    2. Sep 25, 2012: Error 101 (net::ERR_CONNECTION_RESET): The connection was reset « Encounters with Reality
    3. Mar 10, 2013: Getting into the PvP channel - Page 2 - Dungeon Fighter Online Source
    4. Jul 26, 2013: گرفتن سرعت 150 mbps از مودم dlink 2730u
    5. Aug 11, 2013: Troubleshooting SSH connectivity issues

    Post a Comment

    Please leave these two fields as-is: