I have scripted LANMTU.BAT to set the MTU value for my LAN on a Windows XP or Windows Server 2003 computer?

The syntax for using LANMTU.BAT is:



MasK is the IP address string that uniquely identifies your LAN, like 192.168.0. or 192.168.                              MTU  is the maximum packet size in bytes that the transport transmits over the underlying network.
NOTE: LANMTU.BAT uses TCPIFKEY, which must be located in a folder that is in your PATH.

NOTE: See Default MTU value for your network topology.

LANMTU.bat contains:

@echo off                              setlocal ENABLEDELAYEDEXPANSION                              if \{%2\}==\{\} goto err                              set mask=%1                              set /a MTU=%2                              if %MTU% LSS 68 goto err1                              call TCPIFKEY %mask% key                              if "%key%" EQU "NONE" goto err2                              REG ADD %key% /V MTU /T REG_DWORD /F /D %MTU%                              endlocal                              goto :EOF                              :err                              @echo Syntax LANMTU Mask MTU                              endlocal                              goto :EOF                              :err1                              @echo Syntax LANMTU Mask MTU - %2 less than 68.                              endlocal                              goto :EOF                              :err2                              @echo Syntax LANMTU Mask MTU - No interface found.                              endlocal