<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>richard-slater.co.uk &#187; Netsh</title>
	<atom:link href="http://www.richard-slater.co.uk/archives/tag/netsh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richard-slater.co.uk</link>
	<description>Jesus, Life, Programming and Systems Administration</description>
	<lastBuildDate>Fri, 16 Jul 2010 21:04:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Change your MTU under Vista or Windows 7</title>
		<link>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/</link>
		<comments>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 20:11:31 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Netsh]]></category>
		<category><![CDATA[TCP/IP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=683</guid>
		<description><![CDATA[This 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 [...]]]></description>
			<content:encoded><![CDATA[<p><em>This 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 <a class='wikipedia' href='http://en.wikipedia.org/wiki/Maximum_transmission_unit' title='Wikipedia article on Maximum_transmission_unit'>MTU</a> is misconfigured.</em></p>
<p>For some reason that has escaped me <a class='wikipedia' href='http://en.wikipedia.org/wiki/Path_MTU_discovery' title='Wikipedia article on Path_MTU_discovery'>Path MTU Discovery</a> in Windows just doesn&#8217;t seem to figure out the MTU for a given path (something to do with routers being poorly configured to not respond to <a class='wikipedia' href='http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol' title='Wikipedia article on Internet_Control_Message_Protocol'>ICMP</a> requests). So Windows uses the default. For the most part this doesn&#8217;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.</p>
<p>The resolution is to set your default MTU to one lower than the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Ethernet' title='Wikipedia article on Ethernet'>Ethernet</a> default of 1500. Here is how:</p>
<p><strong>Step 1: Find your MTU</strong><br />
From an elevated CMD Shell enter the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 show subinterfaces</pre></div></div>

<p>You should get something like this</p>
<pre>MTU         MediaSenseState  Bytes In    Bytes Out  Interface
----------  ---------------  ---------   ---------  -------------
4294967295  1                0           13487914   Loopback Pseudo-Interface 1
1500        1                3734493902  282497358  Local Area Connection</pre>
<p>If you are using Ethernet cable you will be looking for &#8220;Local Area Connection&#8221; or &#8220;Local Area Connection 2&#8243; (if you happened to plug into the second network port). If you are using Wireless you will be looking for &#8220;Wireless Network Connection&#8221;. The MTU is in the first column.</p>
<p><strong>Step 2: Find out what it should be</strong></p>
<p>In the CMD shell type:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">ping www.cantreachthissite.com -f -l <span style="color: #cc66cc;">1472</span></pre></div></div>

<p>The host name should be a site you <span style="text-decoration: underline;"><strong>can not</strong></span> 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 &#8211; Packet Header, where the Ethernet Default MTU is 1500 and the Packet Header is 28 bytes)</p>
<p>If the packet can&#8217;t be sent because it would need to be fragmented you will get something similar to this:</p>
<pre>Packet needs to be fragmented but DF set.</pre>
<p>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 &#8220;Packet needs to be fragmented but DF set.&#8221;. The last successful value plus 28 will be your MTU value.</p>
<p>In my case a packet size of 1430 succeeds but 1431 fails, so 1430 + 28 = 1458.</p>
<p><strong>Step 3: Set your MTU</strong></p>
<p>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:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 <span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">subinterface &quot;Local Area Connection&quot; mtu</span>=<span style="color: #cc66cc;">1458</span> store=persistent</pre></div></div>

<p>Or if you are using a Wireless connection:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 <span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">subinterface &quot;Wireless Network Connection&quot; mtu</span>=<span style="color: #cc66cc;">1458</span> store=persistent</pre></div></div>

<p>If all has gone well you should have a perfectly working internet connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Resetting TCP/IP under Windows XP</title>
		<link>http://www.richard-slater.co.uk/archives/2005/08/03/resetting-tcpip-under-windows-xp/</link>
		<comments>http://www.richard-slater.co.uk/archives/2005/08/03/resetting-tcpip-under-windows-xp/#comments</comments>
		<pubDate>Wed, 03 Aug 2005 07:05:02 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Netsh]]></category>
		<category><![CDATA[TCP/IP]]></category>
		<category><![CDATA[WindowsXP]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/archives/2005/08/03/resetting-tcpip-under-windows-xp/</guid>
		<description><![CDATA[I have done this a couple of times at the request of BT and NTL engineers when internet connections haven&#8217;t been working as expected: netsh int ip reset [log_file_name] Very useful if you a struggling to figure out why you can&#8217;t even ping 127.0.0.1.]]></description>
			<content:encoded><![CDATA[<p><span class="postbody">I have done this a couple of times at the request of BT and NTL engineers when internet connections haven&#8217;t been working as expected:</span></p>
<p><span style="font-style: italic">netsh int ip reset [log_file_name]</span></p>
<p>Very useful if you a struggling to figure out why you can&#8217;t even ping 127.0.0.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2005/08/03/resetting-tcpip-under-windows-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
