Home > Windows Servers > What is MTU and how to change in windows ?

What is MTU and how to change in windows ?

What is MTU ?

MTU is the Maximum Transmission Unit. This is the largest physical packet size (measured in bytes) that a network can transmit. Any messages larger than the MTU are divided (broken up) into smaller packets (fragmented) before being sent.In other words, the value of MTU defines the maximum length of a data unit a protocol can send in one shot (without fragmenting)

Do we need to change MTU every time when the machine needs to communicate with other machines in different networks? Of course not, computer is very smart. With the help of PMTUD, we don’t need to change MTU manually. It can help detect the minimum MTU between different networks.

Path MTU Discovery (PMTUD)

It can help detect the minimum MTU between different networks. So no need to change MTU every time when the machine needs to communicate with other machines in different networks

For IPv4 packets, Path MTU Discovery works by setting the Don’t Fragment (DF) option bit in the IP headers of outgoing packets. Then, any device along the path whose MTU is smaller than the packet will drop it, and send back an Internet Control Message Protocol (ICMP) Fragmentation Needed (Type 3, Code 4) message containing its MTU, allowing the source host to reduce its Path MTU appropriately. The process is repeated until the MTU is small enough to traverse the entire path without fragmentation.

How to get MTU value?

 netsh int ip show int

For most Ethernet networks this is set to 1500 bytes

1

We can see that the MTU is configured 1500 on my local are connection

How to find the real MTU in the network?

Open the command prompt

  1. Type the following: ping -f -l 1600 servername
  2. You should receive the message “Packet needs to be fragmented but DF set“, which indicates that the size of the packet sent (1600 bytes) was too large for the network to send without splitting it.
  3. Keep repeating step 2, but this time use smaller numeric values (such as 1500, 1450, 1400, 1350 etc.) for the size of the data packet.
  4. Eventually you should receive the ‘standard’ PING message “Reply from XX.XX.XX.XX: bytes=xxxx time=YYms TTL=ZZZ“. This means that this packet size was small enough to fit inside the MTU.
  5. Slowly increase the data packet size again, until you find the maximum size that can be sent without receiving the message “Packet needs to be fragmented but DF set“. This is your maximum MTU size between the client PC and the destination.

But usually we don’t need to do it. since the packet will be fragmented during transferring and the PMTU discovery will help detect the minimum MTU.

How to change MTU value in the windows ?

  1. Open the command prompt in elevated mode
  2. To see what interfaces you have  connected , type netsh int ip show int
  3. netsh interface ipv4 set subinterface “Local Area Connection” mtu=1500 store=persistent

where Local Area Connection is the name of the network connection on your computer, from the list obtained above and 1500 is the desired value for MTU

2

Reboot after the changes done

More information

=====================

How do I find my optimum MTU setting

http://www.dslreports.com/faq/5793

EnablePMTUDiscovery

http://technet.microsoft.com/en-us/library/cc957539.aspx

What is ‘MTU’ and how do I change it in Windows 2008 R2

http://craigocon.wordpress.com/2012/10/03/whats-mtu-and-how-do-i-change-it-in-windows-2008-r2/

 

Advertisements
Categories: Windows Servers
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: