Showing posts with label Internet. Show all posts
Showing posts with label Internet. Show all posts

Windows Vista and Scalable Networking

Over a year ago, I explored an issue of Windows Vista and its problems with using default networking settings relevant to Windows Scaling. The first known problem with Windows Scaling was an exciting networking option called Receive Window AutoTuning, which became a problem when an older router was in use.

Besides AutoTuning, which is a problem with older routers, there are two additional networking options - TCP Offload ("Chimney") and Receive-side Scaling ("RSS"), which are a similar problem with older networking adapters. If your computer suffers from symptoms similar to the well known MTU setting problem, and you get no relief from disabling RWin AutoTuning, consider disabling TCP Offload and Receive-side Scaling.

In a Vista command window (Run as Admin), enter

netsh interface tcp set global chimney=disabled
netsh interface tcp set global rss=disabled


TCP Chimney Offload takes a portion of the TCP/IP network stack, currently run on your computer as part of the Windows operating system, and runs it in a dedicated processor on a TOE capable network adapter. Less work for the operating system + processing as part of the physical networking adapter = better performance.

Receive-side Scaling allows processing of incoming network traffic to be properly run on a multi-processor computer, by ensuring that all packets from a single TCP network connection are consistently processed by the same processor. All incoming packets for each TCP connection processed by the same processor = packets never getting out of sequence, which can be a problem otherwise with multiple processors. Obviously, you'll need a multiple processor system, to get any benefit here.

Try Internet access with TCP Offload and Receive-side Scaling disabled, and see if network performance improves. If it does, see if you can upgrade or replace your network card with one that is TOE capable, which was stated to cost $25 - $50 earlier this year. Once you have the right network hardware, or if the above change doesn't provide any relief from your symptoms, you can re enable TCP Offload and Receive-side Scaling
netsh interface tcp set global chimney=enable
netsh interface tcp set global rss=enable


If you do see a bandwidth improvement and / or network utilisation drop after enabling chimney and / or rss, restart the system. You may see still more improvement after restarting. Use of proper tools for objective measurement of bandwidth and network utilisation, access to high speed Internet service, and use of high bandwidth network applications like streaming video, will make the success of this change a bit easier to assess.

Besides Scalable Networking, look at other possible problems with Windows Vista Networking Innovations, in Windows Vista and Explicit Congestion Notification.

For more details about this issue, see

Setting The MTU In Windows Vista

Long ago, when I first heard of the dynamic tuning in the Windows Vista TCP/IP stack, I envisioned the manual setting of the static MTU to be a thing of the past. Unfortunately, I was wrong - the MTU is still a fixed setting, in Vista.

The legendary tool, DrTCP, which is used by everybody to change the MTU in Windows 2000 and XP, doesn't work under Windows Vista. Fortunately, Microsoft now allows us to adjust the MTU using the "netsh" command. As other commands in Windows Vista, you run "netsh" using the command window, in Administrative mode.

To see what interfaces you have on your computer, type

netsh interface ipv4 show subinterfaces

To change the MTU, type
netsh interface ipv4 set subinterface "Local Area Connection" mtu=nnnn store=persistent

where
Local Area Connection is the name of the network connection on your computer, from the list obtained above.
nnnn is the desired value for MTU.

Reboot after making the change.

>> Top

AutoTuning In Vista Maybe Not Ready For Prime Time

As you surf the web, you will be in conversation with dozens of web servers, and each conversation might have different latency and stability issues. On a less stable (or low bandwidth) connection, a small Receive Window would be a good idea; on a more stable (or high bandwidth) connection, a larger window gives much better performance. With Windows XP and previous, you were limited to a single Receive Window setting, which would apply to all Internet connections, all of the time.

One of the long awaited features in Windows Vista was the ability for it to dynamically determine the Receive Window size, by individual connection. Receive Window Auto-Tuning is one of the many significant improvements in Windows Vista, in my opinion.

For a few owners of computers running Windows Vista, connectivity to the local network, or the Internet, may be problematic. Symptoms are very like the well known MTU Setting problem - some servers, some of the time, can't be contacted, or give poor performance. Copying files locally, from one computer to another, may be fast in one direction, and agonizingly slow in another.

But we know that your local network isn't running through a router, so how would an MTU setting affect your local connection?

The MTU isn't always the culprit in this case. If you have an older firewall or router, that doesn't support Windows Scaling (an essential component in Receive Window Auto-Tuning), you may have this problem. Apparently the lack of Windows Scaling can affect local performance too.

If you are faced by symptoms like an MTU setting problem, that involve a computer running Windows Vista, first try disabling Auto-Tuning. In a Vista command window (Run as Admin), enter

netsh interface tcp set global autotuning=disabled
or
netsh interface tcp set global autotuninglevel=disabled

Then shutdown and restart.

Try Internet access with Auto-Tuning shut off, and see if things stabilise. If they do, see if you can upgrade or replace your router. Check with the vendor, and see if a firmware update is available; if not, consider replacing the router. If your router is incapable of supporting Windows Scaling, it may lack other features that you will also enjoy.

Besides RWin AutoTuning, look at other possible problems with Windows Scaling, in Windows Vista and Scalable Networking.

If you see no improvement in your symptoms, turn Auto-Tuning back on before making other changes. Layered Troubleshooting principles suggest one change at a time.
netsh interface tcp set global autotuning=normal
or
netsh interface tcp set global autotuninglevel=normal


Note the lexicographical variations expressed, above. Some experts state that the relevant keyword is "autotuning", others state "autotuninglevel". There is also a confusion about the value for "autotuning" / "autotuninglevel", which may be either "enabled" or "normal". I suspect that there are two possibilities, "autotuning=enabled" and "autotuninglevel=normal", but I haven't found an authoritative reference, discussing the possibilities.

For more information, see

>> Top

Internet Connectivity Problems Caused By The MTU Setting

The messages sent and received between your computer, and the Internet web servers that you're accessing, may go thru dozens of networks. The Internet is, by design, dynamic. The networks that you use, to access any server, may change within seconds.

Any one of those networks might have a restriction on the maximum message (packet) size that it will accept. Each computer has a setting, called the Maximum Transmission Unit (MTU), which controls how large it may make any packet. The larger your packets, the fewer packets required for sending or receiving a web page, but the greater chance any network have a problem with your packet size.

Setting the MTU on your computer can be a double edged sword.


  • If you make the MTU too large, some networks will split (fragment) your packets. Some servers may have a problem with fragmented packets, causing the dreaded "Server not available..." error, or other symptoms.
  • If you make the MTU too small, your computer will send and receive small packets. You'll be able to access any server, thru any network, but a web page will require too many packets. The speed that your web pages download will make you think you're not connected at all.


If you have a problem accessing some websites (or running some programs like email or IM), but not others, or if this problem seems to come and go, you may have an MTU setting problem. The best known examples of this problem are those with dial-up or PPPoE sevice, or those using ICS. An MTU issue can affect anybody, though, and different people (computers) will, almost certainly, be affected differently, with different web sites being unreachable at different times.

Here are several articles, of differing technical detail and level, discussing the issue further, and offering ways to diagnose and correct it. Read through each one, until you find one that explains the issue to your liking. This list, like each of the ones that I create, is alphabetised.


When you get ready to adjust the MTU setting, make it easy on yourself. Download DrTCP, from DSLReports, and use it to make the changes for you. Simply copy the downloaded file into any convenient folder, and run it from there.

You'll be changing the "MaxMTU" or "MTU" value under Adapter Settings. If you have multiple network adapters, be sure to choose the one that provides the Internet service. For instructions about what values to change MTU to, see the articles linked above. Read all 6, and pick the one that you're most comfortable with.

Note: An MTU problem can be confused with, or masked by, a DNS problem, or LSP / Winsock Corruption. If you're here after trying the above procedures, unsuccessfully, consider each of the latter possibilities.

>> Top

Troubleshooting Internet Service Problems


Next to "I can't access files on Computer B from Computer A", the complaint "My Internet service doesn't work" is almost as common. There's good news here, and there's bad news. The good news? A problem with your internet service, since it only depends upon TCP/IP, will be a lot easier for you to diagnose. The bad news? Since it depends upon something outside your house, and in some cases outside your city or state, many problems will be ones that you can't fix - you have to get your ISP involved.

This article, like Troubleshooting Network Neighborhood Problems, is structured like the OSI 7-Layer Network Model. If you have multiple problems with your network, you have to diagnose and fix the lower level problems first. If you don't, how can you diagnose the higher level problems?

Now before you start troubleshooting, note that you will enjoy it more, and frequently will be more successful, when you work on a properly designed and setup network. Once you've reviewed that, I recommend that you tackle the task at hand in this order.


So what are the differences between this article, and Troubleshooting Network Neighborhood Problems? Well, there is good new, and bad news. The good news - less protocols to deal with. The bad news - more distance and juridictional issues.

With Windows Networking, if there's a problem, it's yours (or maybe the vendor of the hardware that you own, if the problem involves hardware failure on a component under warranty). With Internet Service, the responsible party could be:

  1. You.
  2. Your ISP.
  3. If your ISP leases the connection between you and their offices, the Local Exchange Carrier (your local phone service if you have DSL) might be involved.
  4. The vendor, if the problem involves hardware failure on a component under warranty.
  5. Any number of individual network and server operators. Except in special cases, you will never know these parties, let alone contact them with any chance of getting useful results.

Physical Network Problems
Your problem could be caused by a simple physical network problem.

Of course, the card, cable, port, any other network component, could be one owned by your ISP, or by the LEC, if not your ISP. Or by any of the other parties described above.

Try and diagnose physical network problems from the bottom up.

>>Top

Logical Network Problems

Did you just connect a new router, or a different computer, to your broadband modem? You can't do that casually - you may have to reset your Internet service, to register a different network device with the service.

Given a little preparation (have the correct device drivers available), you should be able to re install the drivers for the network adapter without too much trouble. This is usually one of the last things tried, but can be one of the easiest.

TCP/IP is the language of the Internet, and proper TCP/IP settings are essential. If you're unfamiliar with IP configurations and networking, ask for help.

Also, a corrupt LSP / Winsock layer can have an effect any TCP/IP connectivity. If you've just removed adware / spyware, this is always a possibility.

Did you already run the Network Setup Wizard? You have to read the wizard selections carefully.

  • If your computers all connect to a NAT router (My absolute recommendation), select Option 2 for all computers.
  • If you have a host sharing Internet service to the other computers, select Option 1 for the host, and Option 2 for the clients.


Finally, if you have a problem accessing only some websites, but not others, or if this problem seems to come and go, you may have an MTU setting problem.

>>Top

Address Resolution Problems
With Windows Networking, you have the process of Address Resolution (Local Computer Name to Address). With Internet service, you have the process of Address Resolution (Distant Computer Name to Address). Address resolution is essential.

In addition to preventing an LSP / Winsock problem from interfering with address resolution, you need to ensure that you have access to an active Domain Name System (DNS) server for address resolution. You can have a DNS server for resolving addresses on your LAN, if you wish, but your Internet access will depend upon another DNS server somewhere outside your LAN.

If your Windows XP computer is part of a domain, make sure that the domain is setup properly to provide both internal addresses and external (Internet) addresses.

The DNS infrastructure is pretty transparent to us, when it works, but sometimes it doesn't work. Right now, the bad guys are exploring ways to use DNS to get us to surf to their malicious websites. There have actually been 3 attacks, in the early months of 2005, where folks have surfed - without their intention or permission - to a malcious website - and in some cases, have downloaded software that they didn't want, nor realise. This practice is called pharming, and it is an ongoing possibility for problems.

Besides DNS resolution, you may have your Hosts file to consider.
>>Top

Security Problems
You need a personal firewall on each computer, but your personal firewall has to be properly setup and used. A misconfigured or misbehaving personal firewall, on your computer, can block access to the Internet. Your personal firewall may need setup, to trust the host - either an ICS server, or a router - providing Internet service to your computer.

If you disable your personal firewall, and the problems stop, then you at least know where to start working. But if the problems don't stop, don't assume that the firewall is not the problem. Many personal firewalls do not react properly to being disabled, and will continue to cause problems after being disabled. And look for a previously overlooked firewall, such as one bundled with your antivirus protection.

Besides a personal firewall causing problems, there are security features in your browser that can cause problems, if misconfigured.

>>Top

Network Components and Services
This section, as I hinted above, is relatively simple. Your computer requires TCP/IP. You must have "Internet Protocol (TCP/IP)", in the network items list in Local Area Connection - Properties.

If your computer is going to be supplying Internet service to other computers (using ICS), you'll need ICS running. Check that the service supplying ICS, under one of two possible names, is Started and Automatic.

  • For XP SP2, check the Windows Firewall / Internet Connection Sharing (ICS) service.
  • For XP pre-SP2, check the Internet Connection Firewall / Internet Connection Sharing (ICS) service.


If your computer is going to be supplying Internet service to other computers (using ICS), and ICS isn't running, rerun the Network Setup Wizard, and choose Option #1, This computer connects directly to the Internet. If there's a problem with the NSW, or if running the NSW doesn't produce acceptable results, check the Event Viewer for diagnostic messages.

>>Top

Virtual Private Networking
Internet usage, in general, involves casual connectivity. Any client, within reason, is encouraged to connect to any server. This is many to many connections.

What if you have two offices, located at distance from each other, and want to use the Internet to provide communications between the two? This would be a point to point connection, formally setup between the two offices. A Virtual Private Network is a pre-configured, secure communications tunnel, through an otherwise insecure network (aka the Internet), between two locations.

Setting up a VPN isn't done casually, or between changing locations; a VPN has to be deliberately designed and setup, from both ends.

>>Top

Asking For Help
If you're reading this article because you need help, please start by reading my Privacy Statement.

Spend a few minutes reading about How To Solve Network Problems.

Provide some background information about the problem, and about your network in general.

Ensure that each computer is Physically, and Logically, connected to your network, to your best ability.

>>Top

Diagnose the problem, on each computer involved, using my test outlined in Identifying A DNS Problem In Your Internet Service. Note, and report, the results of the tests.

Localise the problem (Where is it happening?), and identify its time scope (When is it happening?). If the problem is NOT in your LAN, and you have to go to your ISP for support, having solid time of day / day of week documentation could be very helpful.

How long has the problem been happening? Contrast that with how long have you had this computer setup as it is right now (And how was it setup previously?). And what was changed (hardware / software) just before the problem started?

I use PingPlotter (free) to document all my network issues, and have it running on at least one computer on my LAN, on a 24 x 365 basis. Set PingPlotter up regularly pinging a server outside your LAN, say your ISPs DNS server. If you see the trace stop somewhere when your problem is happening, where does it stop? Does it show loss of contact with your router, or with the ISPs DNS server? Make a file, if appropriate, and send it to the tech support at your ISP. A picture (or PingPlotter graph in this case) could be worth a thousand words.

>>Top

Finally, provide ipconfig information for each computer. You'll do this from a Command Window.

  1. Type "ipconfig /all >c:\ipconfig.txt" (less the "") into a command window (or a command window in Windows Vista). Note the spaces in the command, and note the difference between the "/" and "\" characters! Only type the command into a command window - do not type Start - Run - "ipconfig /all".
  2. Type "notepad c:\ipconfig.txt" (again, less the "") into the same command window.
  3. In Notepad, make sure that Format - Word Wrap is NOT checked!.
  4. Copy (Ctrl-A Ctrl-C) from the Notepad window, and paste (Ctrl-V) the entire contents of the ipconfig log, into your next posted message, properly formatted.
  5. Identify operating system (by name, version, and Service Pack level) with each ipconfig listing.
  6. Please don't munge or omit any detail, as there is nothing provided by ipconfig that could provide help, to any bad guy, in identifying an entry point to your LAN. The good guys, on the other hand, may need any or all of the details, to accurately diagnose your problem. Help Us To Help You.

Did you just run ipconfig, and get good output (similar to what's described in the ipconfig article?). Ok, fine, continue and examine the output as instructed below. If you ran it, and got no response, or no output, or if a window opened and closed so quickly you couldn't read anything, please read my article on Using The Command Window.

With IPConfig logs in hand, you may take a look at Reading IPConfig and Diagnosing Network Problems, if you're interested.

>>Top