Thursday, March 17, 2011

Command to Change MTU in Windows 2008 R2

Maximum transmission unit or MTU is by default 1500 for TCP/IP, however it needs to be adjusted
sometimes.

1‐
In order to change MTU in Windows 2008 R2, go to command prompt and type
netsh interface ipv4 show interfaces(press ENTER)You will get a table like this


Idx Met MTU State Name
--- ---------- ---------- ------------ ----------------------
1 50 4294967295 connected Loopback Pseudo-Interface 1
11 10 1500 connected NLB
12 10 1500 connected Public


From the table above we need the value of Idx which is basically id of our NIC connected to “Public” interface
2‐
Now type this command to set the MTU value to 1400 instead of 1500 


netsh interface ipv4 set subinterface "12" mtu=1400 store=persistent  (press ENTER)

If there is no error you will have an “OK” message.

3‐
Now re‐run the command to show interface details and you will see new value of MTU against “Public” Interface
netsh interface ipv4 show interfaces

(press ENTER)

you will notice new value of MTU this time

Idx Met MTU State Name
--- ---------- ---------- ------------ -----------------------
1 50 4294967295 connected Loopback Pseudo-Interface 1
11 10 1500 connected NLB
12 10 1400 connected Public

4 comments:

  1. Good... Keep it Up Dear...
    Aqib.

    ReplyDelete
  2. Planning to use two IPs on a trunked port, one with MTU of 9000 and the other for MTU of 1500.is it possible to do when sharing the same NIC? if yes, May I know how can we do that?

    ReplyDelete
  3. Thanks for putting this up, I can never remember the syntax. It may be worth putting up something about how to determine when there is a requirement to reduce MTU size and the use of ping -f -l.

    A small point but there is a space character missing in the line "netsh interface ipv4 set subinterface "12"mtu=1400 store=persistent" between "12" and mtu

    a good concise article though

    ReplyDelete
  4. Hi,
    the command is working fine but when you view the properties of the NIC that you change the jumbo package size is not changing. and by that you won't be able to ping the vfiler with -f -l 8972 until you manually change it to Jumbo 9000. this is W2K8 R2 Enterprise SP1.
    is there any trick to fix this problem please?
    good article though.
    thanks heaps

    ReplyDelete