---
title: "How to set MTU size in Linux and Windows"
slug: "how-to-set-mtu-size"
updated: 2025-12-23T14:50:00Z
published: 2025-12-23T14:50:00Z
canonical: "docs.swxtch.io/how-to-set-mtu-size"
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to set MTU size in Linux and Windows

> [!NOTE]
> **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 packages. 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.

![MTU Size_discovery](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/MTU%20Size_discovery.png)

> [!WARNING]
> **NOTE**
> 
> In this example, the UDP length error shows it is exceeding the Length.

### Change MTU size on Linux

1. First, **check** the current MTU size by running the following command:

```shell
ip addr | grep mtu
```

****Example output****

```shell
$ 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 10000
```

As can be seen, the MTU size of `eth1` is 3900.
2. To TEMPORARILY change the MTU size, use:

```shell
sudo ip link set dev <interface_name> mtu <new_mtu_value>
```

This will last until the next reboot.

****Example command****

```shell
sudo ip link set dev eth1 mtu 2000
```

The command will not give any output if correctly executed. So, it is recommended to validate with the command used in step 1.
3. **Validate** the change is set by running again:

```shell
ip addr | grep mtu
```

****Example output****

```shell
$ 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 10000
```

As can be seen, the MTU size of eth1 is now 2000.

> [!NOTE]
> **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

1. **Check** the current InterfaceAlias and the MTU size by running:

```powershell
Get-NetIPInterface -AddressFamily IPv4
```

****Example output****

```powershell
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       ActiveStore
```

As can be seen, the MTU size of the local adapters (Local Area Connection* X) is 1500.
2. **Set** the MTU Size using the following commands:

```powershell
Set-NetIPInterface -InterfaceAlias "Interface Name" -NlMtuBytes <New MTU Value>
```

Where “Interface Name” is the InterfaceAlias of the Ethernet adaptor to be set. Note that a successfully executed command won’t give any output.
3. **Validate** the MTU by running the same command used in step 1.

#### Using Configuration

1. **Go** to the Network connection → “Control Panel\Network and Internet\Network Connections” ![MTU Size_windows set 2](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/MTU%20Size_windows%20set%202.png)
2. **Right-click** on the Ethernet Adaptor that the traffic is expected on and select Properties. ![MTU Size_windows set 3](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/MTU%20Size_windows%20set%203.png)
3. **Select** “Configure” ![MTU Size_windows set 4](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/MTU%20Size_windows%20set%204.png)
4. **Go** to Advanced, look for and select "Jumbo Packet": ![MTU Size_windows set 5](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/MTU%20Size_windows%20set%205.png)
5. **Select** the desired size, for example"4088 Bytes", then select "OK". ![MTU Size_windows set 6](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/MTU%20Size_windows%20set%206.png)
6. In order to validate the changes, **use** PowerShell as explained above
