Change your MTU under Vista or Windows 7
October 23, 2009 – 21:11This information is available in many many other places, however I am putting it on here because I know it will be here for me to refer to. Also it is handy, as I know I can access my web-site even if the MTU is misconfigured.
For some reason that has escaped me Path MTU Discovery 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 dos 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 CMD Shell 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 “Local Area Connection 2″ (if you happened to plug into the second network port). 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 CMD shell 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 CMD Shell type the following replacing my MTU of 1458 with your own value:
netsh interface ipv4 set subinterface "Local Area Connection" mtu=1458 store=persistentOr if you are using a Wireless connection:
netsh interface ipv4 set subinterface "Wireless Network Connection" mtu=1458 store=persistentIf all has gone well you should have a perfectly working internet connection.
87 Responses to “Change your MTU under Vista or Windows 7”
Exactly the right answer. I’ve seen sites that recommend the netsh but offer no procedure to determine the correct value. Others have you hacking the registry.
Thanks.
By Rich on Feb 14, 2010
This procedure works fine on Vista, but not on my Windows 7 machine, there is no “ipv4″ on my machine, only “ip”.
Tried variations, but I haven’t managed to get anything to work, thought “ping site -f -l 1430″ shows that this is the route for solving my internet access problems…
By Chops on Apr 6, 2010
@Chops: What is the result of the command `netsh interface ipv4 show subinterfaces` is there anything special about your setup? do you use a standard ethernet to connect to the internet or are you using PPPoE or similar?
By Richard Slater on Apr 10, 2010
Thank you Richard, for your clear and concise instructions — you saved me from an internetless hell.
By thegreatunwashed on Apr 13, 2010
and what if OS is not Windows Vista or 7 an dalso modme is not having MTU like in huawei
By wajiha on Apr 17, 2010
@wajiah, Microsoft has a HOW TO on changing the MTU under XP ( http://support.microsoft.com/kb/826159 ). If the connection your Huawei modem doesn’t have a MTU property it is doing something slightly different, what that is I wouldn’t like to guess.
By Richard Slater on Apr 17, 2010
Hello,
I’ve got a problem.
When ever I try to upload a file more than 100KB in http, the network connection of my computer stop (disconnect), can’t event login to router
I have to disable the Network Connection and then enable again to make everything work again
I ask some friends, they tell me try to reset the MTU.
I use you command and see that my MTU is 1500, but when use this tool speedguide.net/analyzer.php, the MTU result is 1440
And I can’t ping any site althought I still can access it in the Internet Browser
I use windows 7 pro
Can you please help me to solve this problem?
By soulofdark on Jun 21, 2010
That sounds more like it is an issue with the router than with Windows 7. Have you got another router you could try? It is possible that the router doesn’t handle some setting or other, however what that setting may be I do not know. I can highly recommend Super User as a great place to get your question answered. When you do post on Super User post back here with a link to help others who may be having a similar problem.
By Richard Slater on Jun 21, 2010
ping requested could not find host http://www.cantreachthissite.com please check the name and try again
what does that mean and what should i do?
By chinaman88 on Jul 6, 2010
You need to use a site that dosn’t work for you, http://www.cantreachthissite.com was simply a place holder. Sites that you can’t reach vary depending on network configuration.
By Richard Slater on Jul 6, 2010
i also have problem with some websites
after i did step 2 i had an error message it says general failure 4x. please help
By chinaman88 on Jul 7, 2010
got it. found out that its my software thats blocking the website..
thanks so much
By chinaman88 on Jul 7, 2010
Thank you very much,
And I’m lucky this is one of the few sites that worked, since all other links that google provided on how to change my MTU didn’t open, cause of mtu problems
and this is a much nicer solution than those manual REG fixes.
By zidar on Aug 9, 2010
Hi I tried your suggestion but now after rebooting when I run an elevated command prompt it appears that the “d” key is stuck down.It isn’t but if I go to type in to Goole search it doe’s the same!Any ideas? Oh if I run Malwarebytes while trying the problen stop’s but it doesn’t find any problems and it only happened after I rebooted! Thanks
By Doubleg on Sep 10, 2010
have you tried a different keyboard? it is possible that something has got under one of the keys.
By Richard Slater on Sep 11, 2010
Hi ….
I am facing the similar issue for one particular website that I could access it before a month but not now anymore.
I have windows 7 and have tried the way mentioned here but no success.
I get the message “Packet needs to be fragmented but DF set” When I set mtu=1465 and “Request Time Out” for any value less than 1465. (I tried 20 random values <= 1464)
I am using wireless connection and cant figure out how to solve this.
I noticed that "netash" works with both IPv4 and IPv6.
Please help.
Thanks
By Charmis on Sep 15, 2010
@Charmis, That doesn’t sound like a MTU issue, which tend to be very black and white. I would recommend you post your problem on superuser.com giving as much information as possible, including the name and URL of the website.
By Richard Slater on Sep 16, 2010
Hey Rich first of all thank you for the post, it would be really nice if you could try to help me, I’m from France but everything is exactly the same, I’ve done everything right and when I try the last step, then I get something like ” element unfounded ” do you have any idea why?
By Allan on Sep 17, 2010
Hey Allan,
Can you try the following command:
netsh interface ipv4 show subinterfacesIt should print a list of subinterfaces can you paste those in here, I suspect “Local Area Connection” doesn’t translate in your culture.
By Richard Slater on Sep 17, 2010
I have a question for you. I am a somewhat experienced network and IT professional. I am fine with production networks, but am having trouble with my home network. I tried changing the MTU size on both my computer and my router, and still cannot seem to access some websites, and my network connection is slower than it should be. Do you have any other suggestions?
BTW, my MTU size is 1500, and I can hit the website at 1472 MTU and lower, but not MTU 1473 or higher, with do not fragment set.
By Derek on Sep 21, 2010
To clarify, when you MTU is set to 1472 there are still websites you can’t access?
You could check your:
c:\Windows\System32\drivers\etc\hosts
File to see if anything has maliciously added something to that file. If you connect another computer to your network does it exhibit the same issues as your computer. Try to work out if it is an issue with your computer or the network.
By Richard Slater on Sep 21, 2010
Great article,
thanx! Where does the 28 to add come from? It gave me exactly the number, my router recommended…
By Micha on Sep 30, 2010
20 bytes are required by the IP Header, and 8 bytes are required by the ping command (technically the ICMP Echo request).
By Richard Slater on Sep 30, 2010
Hi
Im using windows 7+ pppoe. I see two interfaces (my connection´s name and the local area network thingy)… help me!
By Mr Bunny on Oct 2, 2010
@Mr Bunny – how do you connect to the internet? through a USB modem or through a router?
By Richard Slater on Oct 2, 2010
USB modem (directly, with ethernet cable)
By Mr Bunny on Oct 2, 2010
direct to the point. It worked fine in W7 x64 for my pppoe connection. Great! Thank you so much!!!
By Jorge on Oct 3, 2010
By Mr Bunny on Oct 3, 2010
Tried this technique and worked fine up to the point of finding the valid MTU value but the 3rd step failed. I got a message saying I needed to go to administrator level, but I was logged in as the Administrator user so not clear how to move forward and apply the fix?
By Graeme on Oct 6, 2010
In Vista and Windows 7 applications don’t automatically get administrator privilege, they either need to request it or the user needs to explicitly start the application as an Administrator. The way to do this with the Command Prompt is as follows:
You will know it has worked because the title bar will start with “Administrator:”, hope that helps.
By Richard Slater on Oct 7, 2010
What is the default mtu for the Loopback Pseudo-Interface 1. I somehow set it to 1300. Not sure if there are any detrimental effects but would like to set it to default if I can.
By Jon Baum on Oct 14, 2010
Hello Jon, I suspect it will be 4,294,967,295 for you. Which is either a “magic number” for unlimited or the highest possible number that can be stored in an unsigned 32-bit integer.
By Richard Slater on Oct 16, 2010
Thanks Richard, I always forget about this and yet again had a new machine (my first Win7 this time) not able to browse all websites (eg http://www.google.com worked and http://www.mcafee.com didn’t, well it redirected, then stopped). The above commands worked fine btw.
But, what I don’t understand is if this problem of routers not passing ICMP properly then why don’t a vast number of people don’t get the problem, rather than apparently a few (else there would be bigger coverage I think). I wonder if it my home router that is at fault (a Cisco SOHO 97). Just wondering if you have any background insight.
One point perhaps to add to yor above explanation is that it may be worth checking that the value in use before you start experimenting is not already low, like 1400, because my tests indicate the ping command will then fail with values above 1372, and you could end up setting the value succesively lower, but not actually fixing whatever other problem you may have! So maybe best to set to 1500 before starting, and then not testing any values above 1500-28?
And since I’m writing, and you haven’t got bored reading this, maybe you can throw someinsight onto a similar but different problem whereby uploads and download to some site just give up partway through. For instance I can downloada 10MB test file off one site, but another site will get to say 4.xMB then stop (where this same position is a common, but not the only, stopping point). Sometimes it restarts, and if I’m using FF I can use the pause/restart download control to jiggle it to the end, but with downloads controlled directly by a program (with no pause/restart) there is often no way to force it to continue. This happens on wired as well as wireless and even in Safe Mode. Any suggestions would be much appreciated.
By Dave on Oct 29, 2010
Hello Dave,
I am not sure why everyone doesn’t suffer from these issues. Possibly it is due to the software that is distributed for Broadband connections “fixing” it before the user ever uses a web browser.
If your router has decent logging, I would recommend checking to make sure the connection isn’t dropping for a few seconds fairly regularly.
By Richard Slater on Oct 31, 2010
Hi
Thanks, and just to say that having tried a spare, the upload/download problem seems to be localised to the router, must be getting old or something, but nevertheless an odd “partial failure” problem that was difficult to isolate.
By Dave on Nov 8, 2010
Hi,
I am trying to connect my xbox to play games online through my 3g dongle which is plugged into my laptop. The xbox says MTU settings require a minimum MTU setting of 1364. I have tried ‘pinging’ the website mentioned above and all numbers i have tried come back with ‘OK’… Although the maximum number I have tried is 65000 (maximum allowed – which still comes back as “OK”!!)
Please help! Please let me know if you need more information….
Thanks
By Matthew on Dec 10, 2010
I have neither a Xbox or a 3G dongle, can I suggest you ask your question on http://superuser.com/
By Richard Slater on Dec 11, 2010
i did this to change the MTU for xbox live but it didn’t work. CMD said the requested operation requires elevation (run as administrator) but I am the admin
By bernardG on Dec 27, 2010
Richard
I’m a novice at computers and I was getting totally frustrated with my hotmail not working with windows 7- until i stumbled across your explanation of the process. i needed to go down to 1464 but i finally got things going. Thank you so much from one very happy lady.
By liz seager on Dec 28, 2010
You will need to run CMD as an Administrator.
By Richard Slater on Dec 29, 2010
There is a spelling mistake in your article: “…however if it dos affect you…” should be DOES not DOS. Also, a few people made the same mistake in their comments. It’s not DOE’S, it’s DOES!!!
-Jamie M.
By Jamie M. on Jan 3, 2011
Richard,
Apologize that I contact you by giving a comment on a different subject.
In ‘superuser’ you have given answer on a question about getting an ACER Aspire 5102WLMI with 4GB of memory up and running beyond POST. I have exactly that problem, but don’t get it resolved despite your answer. I have made a photograph of the PCB tracks under the DIMMs. Would you please be so kind to give me a clue what to do (referring to that picture)? Can you please let me know where to send the photograph? Thank you very much in advance!
Hub Lemeer
The Netherlands
hub@lemeertjes.com
By Hub Lemeer on Jan 10, 2011
@Hub Lemeer: My suggestion would be to post on Super User… that way I and many other computer enthusiasts will see the post.
By Richard Slater on Jan 10, 2011
Hi Richard,
I used to have this problem as well but now it is fixed (thanks to this guide). Now my other problem is computers connecting to the internet through wireless (laptops, cellphones, etc.) can’t surf the net (only google).
my question is, do i have to set the same MTU value of the router as my computer? (in this case, the MTU value of my PC is 1400)
additional information – i connect to the internet through my router (Belkin Double N+ Wireless Router).
thanks in advance!
By Eizyark on Jan 12, 2011
@Eizyark,
Possibly… in theory you should be able to set the MTU on your router, some routers also allow you to set the MTU to be sent out via DHCP. However I have never got it to work on my Linksys router. Sorry I couldn’t be any more help, if you find a solution please post it up your future comments will be automatically approved.
Richard
By Richard Slater on Jan 12, 2011
Thanx!It help me.My MTU is 576
By Alex on Jan 31, 2011
Hi Richard,
I am running Window 7 64bit. I recently installed XP Mode in an attempt to use the Cisco 32bit VPN. (I never did get it to work it connects but I can’t bridge between 64bit programs and after running it I can no longer connect to my router) Anyway that’s a different subject, I am now experiencing very slow file transfers. Network drive to my PC as well as to/from USB drives. Have you heard of similiar occurences?
Thanks,
Richard
By Richard De Rocco on Feb 1, 2011
Hi Richard,
I have one Windows 7 machine and one XP machine. I have a NetGear WNDR3700 (or, rather, N600 — the new name for the same model). Ethernet over PPPoE. All seems to work fine except transferring large files between the two computers, which usually fails. NetGear business-level tech support said they’ve solved this by lowering the MTU.
Usning ping tests on DSL Reports and in your suggestions, it’s clear I need to be at 1492. Using your steps, it’s clear that I’m currently at 1500 on the Windows 7 machine. I don’t yet know where I cam on the XP machine.
Do you agree that lower the MTU is a reasonable step to take for solving the file transfer issue between the two machines?
If so, out of curiosity, what does your fix modify (just in case I want to put it back)?
And have you found anything newer on how to find and change the MTU in XP?
Thanks!
By Jay on Feb 2, 2011
Hi Richard and Jay,
I can’t see how it would affect transfers to and from USB Drives, that doesn’t make very much sense. Transfers across a network would indeed be impacted by reducing the MTU… in effect you are reducing the efficiency of network traffic as the TCP/IP stack is slicing the data up into smaller packets, each of these packets still needs to be labelled with where it is going these labels take up a fixed amount of space, so by reducing the MTU you only reduce the amount of space left in the packet for data.
@Jay as to your specific problem, if the shoe fits… if it solves the problem and has minimal side effects the do it. You can adjust your MTU in XP with DrTCP (available from DSL Reports). You can use any value up to 1500 with the same method I described above.
By Richard Slater on Feb 3, 2011
I tried your suggestion, but I keep getting “Element not found”o matter what setting I use.
Can this be fixed?
By Gary N. on Feb 5, 2011
Not sure, can I suggest you post on http://superuser.com/
By Richard Slater on Feb 5, 2011
Yes – thanks, spot on fix.
One thing, you say “The host name should be a site you can not reach” where you actually mean pick a host you have problems reaching – ie. don’t use some made up name that doesnt exist and therfore cannot reach as it will obviously never work!!
Please reword that sentance as its confusing some.
By Al on Feb 15, 2011
Hi !
Thanks for the tip!
I’m just having a little problem.. When I type, say ping google.com -t -l 1400, the number of bytes I send is 1400 (compared to the usual 32 that I have). After having found my MTU and set it with your command, when I simply type ping google.com, it shows 32 bytes sent, and not my MTU that I set earlier.. Is it normal ?
Thanks
(Oh, and my situation is a bit awkward, my PC is connected with Eth to a Wireless bridge and I know wireless allows greater MTU..)
By Andy on Mar 8, 2011
I am having the same Windows 7 issue as everyone else. My wireless router is detected (Belkin G Wireless) but the yellow triangle appears and says “No Internet Access.” However, a different laptop using Vista Basic has no such issues using the same router and the internet runs normally.
When I tried your “ping http://www.yahoo.com -f -l 1472″ I get the following error message: “Ping request could not find host http://www.yahoo.com. Please check the name and try again.” This occurs even when I reduce the number as low as 1000. It seems as if it can’t even attempt the ping becuase of the lack of an Internet connection, but that is what I am trying to fix!
This is a brand new computer and it does not even have Office loaded. It was working fine earlier and then it stopped. Nothing was downloaded or automatically updated, so I don’t know what would have triggered it. It just happened when it came out of sleep mode and no amount of reboots have worked.
Any help would be greatly appreciated!
By Richard on Mar 22, 2011
Hi Richard,
Sounds like you have bigger problems than this article describes, can I suggest you post your problem on SuperUser your question will be seen by many more expert users than the comments of this blog post. I would suggest you post the above information plus some further information about your environment, including the output from the command `ipconfig /all`.
Hope That Helps,
Richard
By Richard Slater on Mar 22, 2011
Thanks Richard – I kept getting kicked off an online game I was playing – changing the MTU solved the problem.
I thank you, my widow doesn’t
B
By Brent on Mar 22, 2011
talktalk engineer directed me to your site in order set the mtu in my laptop as at his end, it was showing as 1563 where as my router was showing the correct value of 1432. Any suggestions.
By Tom on Mar 24, 2011
For those putting the http:// in the ping command, drop that.
ping http://www.site.com -f -l 1492
-ec
By Edison Carter on Apr 5, 2011
I see what is going on…this web site keeps adding the http…
ping site.without.com -f -l 1492
By Edison Carter on Apr 5, 2011
Glad I found your website through Google Search. Instructions were clear, and helped me get the MTU set on my Mom’s PPPoE DSL connected PC.
Your contribution to the knowledge base on the internet is greatly appreciated.
Thanks!
By Tim Raymer on Apr 9, 2011
Thanks for helping us all out! The above change works well (1472 for ping), but I can’t quite understand. I have a computer attached to a wireless router. The router is also connected to a NAS drive. All three have their own MTU default. Should the NAS drive MTU be reduced the same way as the PC? Should all three be the same MTU value?
By Ken on Apr 13, 2011
If a device needs to connect to the internet via your broadband link then it will need to have it’s MTU updated, if it is only going to be used locally you can leave it at the default.
By Richard Slater on Apr 13, 2011
Richard – many thanks for this. I can now listen wirelessly to my NAS-stored music on my hi-fi! The required MTU for my Netgear ReadyNAS Duo is 1430.
By Roy Simpson on Jul 26, 2011
Thanks so much for the info, I normally use something like dr tcp but this wouldn’t work. Thanks again
By James on Aug 15, 2011
Hi, I have problem with upload. After changing of MTU – donwload is little bit faster and its great. from 7MB to 9MB (max. speed). But upload is still same about 2,5MB. This is happening only with windows. When i try upload with linux on the same network it is 9/9MB in both directions. I have to say that is not problem of the local network but i have wifi-n reserved connection to the gateway and problem with upload is only via wifi. So please can you help me what is wrong settings in windows? Thanks
By krynn on Sep 16, 2011
Hi krynn,
I don’t know personally, can I suggest that you post your question up on http://superuser.com/. Explain your problem clearly as you have in your comment then thousands of geeks like me will see it!
All the best
By Richard Slater on Sep 17, 2011
Altering the MTU setting solved problems I have had for months – couldn’t access certain sites and itunes always timed out
noted a comment re my wireless router having an MTU limit of 1400
reset the pc and BINGO !
Can’t believe it was so simple
Thanks for the helpful advice
By YorkieSteve on Oct 5, 2011
I have done everything,but when I try to set it says “this operation requires elevation” What does this mean?
By Travis on Oct 6, 2011
You need to run the command prompt as an administrator.
By Richard Slater on Oct 8, 2011
Thank you thank you thank.
I had a brand new PC straight out of the box failing to get internet connectivity on 99% of sites, and got nothing from Microsoft except rote “have you tried the troubleshooting function” and “it must be your ethernet connection.”
The MTU was set to high by just 12. Fixed it, and now things are working great. Thanks again.
By Windows7Starter on Oct 22, 2011
I’m trying to connect to an apache web server on my own network from a Windows7 netbook and your info is very helpful in pinning down where the problem lies. The Apache system is directly ether connected to the router.
Other systems work fine. All works ok if the netbook is connected via ether cable but not via wifi. The MTU for both connections is shown as 1500.
With the netbook ether connected the ping gives ok for 1472 and below, and ‘needs to be fragmented’ is 1473 and above just as your article describes. All consistent with MTU of 1500.
With wifi though I get ping ok for 1468 and below, ‘need to fragment’ for 1473 and up. The area between ie 1469 to 1472 inclusive gives timeout.
If I ping the router from W7 + wifi it gives a clean split at 1472/3.
If I ping from the ubuntu box (using linux ping) the other way I get exactly the same symptoms.
Can anyone shed light on this ‘gap’ and why it does not show whwn pinging the router?
regards
Phil
By Phil Brady on Oct 25, 2011
Hey, I have two questions, first that is a -L right after -f right? and second when I ping the website, it says request timed out everytime, help please!
By Mikey Romar on Nov 4, 2011
Hey Richard,
I followed the directions in your well-written article to fix my mother-in-law’s Internet. She emitted a happy cheer when the lottery website finally opened for her. Thank you!
Cheers,
Ryan
By Ryan on Nov 14, 2011
yep, thats l for lemur. If it says request time out then the site is unreachable, your problem is something additional or perhaps other than a MTU issue.
By Richard Slater on Nov 14, 2011
Thanks it worked on windows 7
i kept lowering mtu size within my pppoe connection till i tuned to 1350 and it works
By sami on Nov 21, 2011
Does this process work if you are behind a router (router’s MTU is currently set to manual/1492)? and if the value I got was 1372 do I need to set this for all windows machines AND the router itself?
By Johnathan on Dec 13, 2011
yes, it works if you are behind a router.
By Richard Slater on Dec 14, 2011
tooo good iformation…i am so much impressed… thank u so very much…
By anonymous on Jan 6, 2012
Thank you SO much – I was looking everywhere for simple solution for my problem that didn’t involve downloading other programs! This worked perfectly!
By Christine on Jan 14, 2012