The Broadband Guide
search advanced

Advanced Windows XP/9x Tweaking

2001-03-31 (updated: 2021-04-19) by
Tags: , , ,

This page is provided as a supplement of our Registry Tweaks articles. Here you will find more advanced information on implementing the same tweaks, methods for determining MTU, BDP and RWIN calculations, as well as other suplemental relevant information.

Determining your ISP's MTU

The TCP packet size, or the Windows Registry "MaxMTU" value you should use is limited by your ISP's MTU value, since all packets will be traveling through their equipment. To determine the MTU of your ISP, try the following:

In Dos Prompt(Command Prompt), type:
ping -f -l [packetsize] [] where [packetsize] is the amount of data you want to send ( between 0 and 1500 bytes ) and [] is your ISP's URL (you can also use your gateway, or any server your connection always passes through instead of your ISP's URL).

The largest value that does not give you the error "Packet needs to be fragmented, but DF set" will be your ISP's MTU - 28 (excluding the IP [20 bytes] and ICMP [8 bytes] headers). Use the following table to interpret the number you received and determine your ISPs MTU:


Largest non-fragmented valueYour ISPs MTUWhat you should use
14721500use 1500 (1472+28=1500) - Ethernet
146814961496 - the Ethernet standards actually call for using 1496, although 1500 is most often used for simplicity
146414921492, the Largest PPPoE MTU
145214801480, Windows XP PPPoE MTU
(or higher)
Check your Registry settings, your MTU might be the limiting factor if set to a small number.

Note: All this can be also determined automatically by using our SG TCP Optimizer program, freely available for download in the Dwonloads area of the site.

Finding the right "000n" Folder in Windows 9x

If you have multiple devices that use TCP/IP, you will have multiple "000n" folders in the Registry, under HKLM\System\CurrentControlSet\Services\Class\Net\Trans If you add the MaxMTU value to all "000n" folders with "TCP/IP" to the DriverDesc setting, chances are you will slow down your dial-up modem connection a bit ( since its optimal MaxMTU is still 576, rather than 1500 ). In order to determine which is the right one for entering the MaxMTU value, you can use any one of the following methods:

1. Open Regedit, and navigate to HKLM\System\CurrentControlSet\Services\Class\Net\Trans\000n\Ndi  You can modify the "HelpText" value to be any text value you wish. If you give each 000n folder a unique "HelpText" value, you can then distinguish between them all when you go to Network Properties and check the Description field for each TCP/IP binding.

2. Right-click on "Network Neighborhood" and choose "Properties". Find TCP/IP that's bound to the NIC you use with the Cable Modem/DSL. If it has a static IP address, you can look for that under
When you look in the right "000n" folder you will find a string value called "IPAddress" with the same IP assigned to it. At this point, you can add MaxMTU only to that folder. Note: If you have multiple NICs bound to TCP/IP, you might want to add MaxMTU to them as well, that way your LAN will benefit from the tweaks too.

3. You could also delete all but one adapter that uses TCP/IP from "Control Panel > Network". Note that before doing that, you should write down the settings of these adapters and the TCP/IP they bind to, since you will have to re-enter them later. Once you've deleted the unnecessary adapters, reboot and you will be left only with one "000n" folder ( that has "TCP/IP" assigned to DriverDesc ) in your Registry. At this point, add the MaxMTU to this folder and re-add the adapters you erased in the previous step.  

Bandwidth*Delay Product and the TCP Receive Window

The Bandwidth*Delay product (BDP) determines the maximum amount of data that can be in transit in the network. It is directly related to the Maximum TCP Receive Window (RWIN) value that should be used when tweaking your internet connection. Throughput can not exceed the BDP and the TCP Receive Window (RWIN) needs to be large enough to fit the BDP.

With that in mind, here is the BDP formula:

BDP = bandwidth * latency
BDP(bytes) = total_available_bandwidth(KBytes/sec) * max_round_trip_time(ms)

Essentially, the BDP depends on the maximum available bandwidth multiplied by the latency/delay/ping value.

RWIN (the TCP Receive Window) is the TCP buffer that determines how much data can be in transit in the network, just as the BDP. It should be big enough to accomodate BDP. In addition, the TCP specs, and related RFCs also introduce a few notable considerations for calculating an optimal RWIN value summarized below:

1. Early TCP specs (before RFC 1323) allowed for only 16 bits in headers for the RWIN value, limiting it to 16KB (65535).
2. Related RFCs recommend the value to be multiple of the MSS (packet size without headers, usually MTU - 40 bytes of TCP and IP headers).
3. Above 65535 (The maximum possible unscaled RWIN value), the TCP Window is calculated by multiplying the unscaled RWIN by a scale factor that's multiple of 2. This scale factor is stored in the TCP Options RFC1323 header extension.
4. RWIN should be calculated based on the maximum anticipated (not current) latency.
5. Even with large RWIN values, the unscaled RWIN should remain a high number for backwards compatability with legacy routers.
6. A RWIN value that's too large may perform poorly in the presense of packet loss. Even though it does not "cause" packet loss, the older congestion control TCP algorithms slow down recovery. Those algorithms, however have been superceeded by CTCP in Windows Vista/2008 (and 2003/XP64 with hotfixes).

With all those points in mind, calculating the optimal RWIN value is a bit more involved than just plugging any number in the Windows Registry. Below is a good way to accomplish this in 3 steps:

1. Determine MSS (displayed by the SG TCP Analyzer), maximum anticipated latency and advertised maximum bandwidth.
(for example, 1460 MSS, 300ms max latency, 6Mbit/s max bandwidth).

2. Find the optimal unscaled RWIN value (largest even multiple of MSS less than 65535):
65535 / 1460 (MSS) = 44.9
round down to even number = 44
44 * 1460 (MSS) = 64240 (this is the optimal unscaled RWIN value)

3. Multiply the unscaled RWIN by 2 until the result is close to/larger than the BDP.
Our BDP for 6Mbps @ 300 latency is:
6000 kbps * 300ms = 1800000 / 8 = 225000 bytes
64240 (unscaled RWIN) * 2 * 2 ... = 256960 (number larger than BDP, this is the optimal RWIN)

Note that the above calculations are already implemented in both the TCP Analyzer and the TCP Optimizer. The BDP can also be easily determined using our online BDP Calculator.

UDP Packet Size

UDP over IP has a total header length of 32 bytes (12 bytes for UDP, and 20 bytes for IP).
To change the UDP packet size, in the Windows Registry:

MaximumUdpPacketSize=576  (DWORD, default value is 1280 bytes. Must be a number between 512 and 16384)
Recommended values: between 512 and 1468.

Note: When you configure the UDP packet size, remember that UDP packets must travel through different devices that may not support large UDP packets. Some network equipment cannot handle packets larger than 1468 bytes, particularly under heavy load.

For additional tweaks and information, check some of our other related Registry Tweaking Articles, or visit the
downloads section with downloadable registry patches and our free tweaking tool, the TCP Optimizer.


  User Reviews/Comments:
by anonymous - 2008-08-06 03:00
For Firefox users you can dowload an add on called tweak network settings, you can get this from the Firfox website. The add on will then be listed under the tool menu, you have an option of default setting or power setting. This will change max setting to 40 max connection to 16,and both max persistent setting to 16, it also turns on pipelining and proxy pipelining with a maxrequests of 8
by Drbaltazar - 2016-10-26 20:46
Udp size

4.5.1. Note that a 512-octet UDP payload requires a 576-octet IP
reassembly buffer. Choosing 1280 on an Ethernet connected
requestor would be reasonable.
Rfc wall of text sure is filled of interesting tidbit
by Drbaltazar - 2016-11-12 18:11
Note that a 512-octet UDP payload requires a 576-octet IP reassembly
buffer. Choosing between 1280 and 1410 bytes for IP (v4 or v6) over
Ethernet would be reasonable.
This is an edit of my previous post .
This is the newest I could find (2013)
Nice to know we got a bit more wiggle room then expected . 1410 byte( cheer)
by drbaltazar - 2019-12-21 17:42

1536 seem to be the minimum for it to be recognise as ethernet 2
(what most people use now a day, i could be wrongly interpreting this )
News Glossary of Terms FAQs Polls Cool Links SpeedGuide Teams SG Premium Services SG Gear Store
Registry Tweaks Broadband Tools Downloads/Patches Broadband Hardware SG Ports Database Security Default Passwords User Stories
Broadband Routers Wireless Firewalls / VPNs Software Hardware User Reviews
Broadband Security Editorials General User Articles Quick Reference
Broadband Forums General Discussions
Advertising Awards Link to us Server Statistics Helping SG About