JSI Tip 9683. How can I set the MTU value for my LAN on a Windows XP or Windows Server 2003 computer?

Jerold Schulman

August 28, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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:

LANMTU Mask MTU

Where:

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 offsetlocal ENABLEDELAYEDEXPANSIONif {%2}=={} goto errset mask=%1set /a MTU=%2if %MTU% LSS 68 goto err1call TCPIFKEY %mask% keyif "%key%" EQU "NONE" goto err2REG ADD %key% /V MTU /T REG_DWORD /F /D %MTU%endlocalgoto :EOF:err@echo Syntax LANMTU Mask MTUendlocalgoto :EOF:err1@echo Syntax LANMTU Mask MTU - %2 less than 68.endlocalgoto :EOF:err2@echo Syntax LANMTU Mask MTU - No interface found.endlocal



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like