Avatar of hcsoitb
hcsoitb asked on

How can I change the MTU value in Windows registry.

The company I work for is using an application which requires the MTU max value to be 1260 on 150 desktops running Windows XP OS.  I have ran into a brick wall trying to find a way of manipulating this registry value. I have been unsuccessful in finding anything unique to the path of the adapter interface. All of the Adapter IDs are different.
I trying to find out if there is a wildcard that I can use to get pass this key or possibly a script or automated approach to changing the value of the MTU size
*Below is the registry path.

Windows XP

Avatar of undefined
Last Comment

8/22/2022 - Mon


Jcimarron, I found that document earlier but it wasn't the solution I needed. The registry key path listed below in Example 1, is the actual key that I'm trying to modify. I can manually go in and edit the MTU value but, what I'm trying to do is find a way to automate the process due to the amount to desktops needing this modification. I tried using desktop authority registry tool to make the registry change but the adapter id is unique to each adapter and I have not found a way to add a wild card (Example 2)  or something similar to replace the adapter id.

Example 1: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{7B0B3235-7E04-4EF3-A7FB-D39F02FF7440}
Example 2: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%\MTU

The way windows xp set its interface MTU is per interface ID in the registry. Hence scripting a registry update may involve in going through all subkey under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces.

This may not be a safe solution as it might change other interface that is listed there that you do not want the MTU to change.

However, windows enables Path MTU Discovery by default. Hence, it is possible that you can set your network switches (if it has a feature to define PMTUD) and set the required MTU size to all ports connected to the PCs involve. By doing so, the affected windows xp interface that is connecting to the configured port will adjust its MTU size dynamically as per advertised by the switch when it connect to the network.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Thanks Johnccd for pointing me in the right direction. I was able to get one of our developers to create a VB script to achieve the results I needed. The script is listed below.

' Enumerates subKeys in a specified path
const HKEY_LOCAL_MACHINE = &H80000002
machine = "."
Set engine =GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
machine & "\root\default:StdRegProv")
keyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces"

' Gets all the subkeys under keyPath
engine.EnumKey HKEY_LOCAL_MACHINE, keyPath, subKeys
' Enumerate sub keys
For Each subkey In subKeys
    mtuPath = keyPath & "\" & subKey
    ' The following line is for debugging only
    ' and should be commented when the script runs
    ' WScript.echo mtuPath
    mtuKeyName = "MTU"
    mtuValue = 1260
    engine.SetDWORDValue HKEY_LOCAL_MACHINE, mtuPath, mtuKeyName, mtuValue

Thanks for your assistance in resolving this issue.