How to set MTU size in Linux and Windows¶
WHAT TO EXPECT
In this article, users will learn how to change the MTU size of a given VM.
In some cases, the MTU Size of the multicast group may exceed the default limit of the OS. It can also happen that, in some circumstances, the user may need a small MTU size to send smaller packets. This article will explain how to increase the MTU size if this should occur.
To know if the MTU size has been exceeded, Wireshark or tcpdump can be used. Below is an example from Wireshark.

NOTE
In this example, the UDP length error shows it is exceeding the Length.
Change MTU size on Linux¶
-
First, check the current MTU size by running the following command:
Example output¶
$ ip addr | grep mtu 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 3900 qdisc mq state UP group default qlen 1000 4: enP15351s2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 3900 qdisc mq master eth1 state UP group default qlen 1000 5: enP9096s1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth0 state UP group default qlen 1000 6: swx0: <BROADCAST,NOARP,PROMISC,UP,LOWER_UP> mtu 4096 qdisc mq state UNKNOWN group default qlen 10000As can be seen, the MTU size of
eth1is 3900. -
To TEMPORARILY change the MTU size, use:
This will last until the next reboot.
Example command¶
The command will not give any output if correctly executed. So, it is recommended to validate with the command used in step 1.
-
Validate the change is set by running again:
Example output¶
$ ip addr | grep mtu 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2000 qdisc mq state UP group default qlen 1000 4: enP15351s2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 2000 qdisc mq master eth1 state UP group default qlen 1000 5: enP9096s1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth0 state UP group default qlen 1000 6: swx0: <BROADCAST,NOARP,PROMISC,UP,LOWER_UP> mtu 4096 qdisc mq state UNKNOWN group default qlen 10000As can be seen, the MTU size of eth1 is now 2000.
PLEASE NOTE
For permanent changes, the procedure will vary depending on the Linux distro (roughly, RHEL-based or Debian-based), and the network manager used (like netplan on Debian-based and nmcli or ifcfg for RHEL-based). Please consult the network admin to get directives.
Change MTU size on Windows¶
Using PowerShell¶
-
Check the current InterfaceAlias and the MTU size by running:
Example output¶
PS C:\Windows\System32> Get-NetIPInterface -AddressFamily IPv4 ifIndex InterfaceAlias AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp ConnectionState PolicyStore ------- -------------- ------------- ------------ --------------- ---- --------------- ----------- 12 Local Area Connection* 4 IPv4 1500 25 Disabled Disconnected ActiveStore 18 Local Area Connection* 3 IPv4 1500 25 Enabled Disconnected ActiveStore 1 Loopback Pseudo-Interface 1 IPv4 4294967295 75 Disabled Connected ActiveStoreAs can be seen, the MTU size of the local adapters (Local Area Connection* X) is 1500.
-
Set the MTU Size using the following commands:
Where “Interface Name” is the InterfaceAlias of the Ethernet adapter to be set. Note that a successfully executed command won’t give any output.
-
Validate the MTU by running the same command used in step 1.
Using Configuration¶
- Go to the Network connection → “Control Panel\Network and Internet\Network Connections”

- Right-click on the Ethernet Adapter that the traffic is expected on and select Properties.

- Select “Configure”

- Go to Advanced, look for and select "Jumbo Packet":

- Select the desired size, for example "4088 Bytes", then select "OK".

- In order to validate the changes, use PowerShell as explained above