Как задать mtu в windows

Как изменить MTU в WindowsНастройка MTU (Maximum Transmission Unit) знакома большинству пользователей, которые когда-либо настраивали Wi-Fi роутеры, но доступна и в Windows для Ethernet и других подключений. MTU — это максимальный размера блока данных одного пакета в байтах (без учета размера заголовка), стандартный размер — 1500 байт.

При необходимости размер MTU в Windows 11, 10 и других версий можно изменить. В этой инструкции — о том, как это сделать, а также узнать текущий размер MTU.

Способы изменения размера MTU в Windows 11 и Windows 10

Прежде чем приступить, вы можете определить текущий размер MTU для сетевых интерфейсов, для этого достаточно запустить командную строку или Терминал от имени администратора, после чего использовать следующую команду:

netsh interface ipv4 show subinterfaces

Посмотреть текущий размер MTU

Размеры MTU будут указаны в первом столбце в результатах выполнения команды. Если вам требуется изменить размер пакета, вы можете использовать один из следующих способов.

Включение Jumbo frame

Первая возможность — включить Jumbo Frame (Jumbo-кадр), позволяющий передавать данные в размере, превышающем стандартные 1500 байт. Для этого используйте следующие шаги:

  1. Нажмите клавиши Win+R, введите ncpa.cpl и нажмите Enter.
  2. В списке подключений нажмите правой кнопкой мыши по подключению, для которого нужно включить Jumbo frame и выберите пункт «Свойства».
  3. Нажмите кнопку «Настроить» для настройки сетевого адаптера. Открыть настройки сетевого адаптера для подключения
  4. На вкладке «Дополнительно» найдите пункт «Jumbo packet» и измените его значение, затем примените настройки. Включить Jumbo frame для сетевого адаптера

При включении Jumbo frame соединение может быть кратковременно разорвано, но обычно затем работает исправно. Учитывайте, что настройка Jumbo packet может быть доступна не для всех сетевых карт, также её наличие может зависеть от используемых драйверов.

Изменение MTU в командной строке

Вторая возможность — использование командной строки для изменения размера MTU:

  1. Запустите командную строку от имени администратора и введите следующую команду, чтобы посмотреть список имен интерфейсов:
    netsh interface ipv4 show subinterfaces
  2. В следующей команде измените ИМЯ_ИНТЕРФЕЙСА и значение MTU для изменения MTU для соответствующего подключения:
    netsh interface ipv4 set subinterface ИМЯ_ИНТЕРФЕЙСА mtu=РАЗМЕР store=persistent

    Изменить MTU в командной строке

После успешного выполнения команды, размер MTU будет изменен.

Определить оптимальный размер пакета (значение MTU) для текущего Интернет-подключения можно в командной строке с помощью команды, ping адреса_сайта -f -l РАЗМЕР, например:

ping google.com -f -l 1500

Проверка ping с разными размерами пакета

Задачей будет поиск такого значения MTU, которое не приводит к сообщениям о необходимости фрагментации пакета.

Sometimes, you may have noticed that some websites don’t function well on your broadband connection. While most websites run fine, certain seem to have an issue. If you have encountered this situation, it is time to change the Maximum Transmission Unit (MTU) on Windows 11/10 computers.

How to check current MTU settings?

MTU, or Maximum Transmission Unit, is necessary or responsible for this case because it is the parameter that defines the maximum packet size that can be transmitted over a network. So by optimizing MTU, you can enhance your network performance. As a result, you can browse the internet more efficiently.

But not many are aware of how MTU functions. There are two quick ways to check the current MTU settings, these are:

Use Windows Terminal to check the current MTU value

Windows Terminal has to be the easiest way to learn about your current MTU value. To get started, follow the below steps:

  • Press Windows Key + X to access the quick menu.
  • Click Windows Terminal (Admin).
  • Now run the following command and press enter.Find MMT Windows PC
netsh interface ipv4 show subinterfaces
  • Once done, you should see the MTU value of different networks under the MTU tab.

Check MTU network adapter settings

There is also an alternative option which is checking through the Network adapter settings. For this, you need to follow the below steps:

  • Press the Windows key + R to launch Run.
  • Type ncpa.cpl and press Enter, and you should see a list of different Network adapters.
  • Right-click on any of the adapters for which you want to check the MTU and then select Properties.
  • Click the Configure button to open the adaptor connection properties
  • Switch to the Advanced Tab and select Jumbo FrameChange MTU Windows
  • Then select the higher value from the dropdown on the right.

Note: The adapter uses the default MTU value if you don’t see the Jumbo Packet option. It also means you cannot change through the control panel method.

Now that you know your MTU value, you can increase or decrease the value per your needs. To do so, there are two methods that you can follow. These are:

  1. Using Windows Terminal
  2. Changing MTU through Network Adapter settings

Let’s now look at these methods one by one below:

1] Using Windows Terminal

Changing MTU using the command prompt has to be the easiest method. All you have to do is run two commands – one to identify the interface name and the other to change the MTU value, and you are good to go. So go ahead and follow these steps:

  • First, press Windows Key + X to access the quick menu and launch Windows Terminal (Admin).
  • Now run the following command to list down all the network adapters:
netsh interface ipv4 show subinterfaces
  • Now note down the Interface name for which you want to change the MTU.
  • Next, to change the MTU value of your preferred interface, run the following command:
netsh interface ipv4 set subinterface <subinterface name> mtu=9000 store=persistent
  • Over here, replace <subinterface name> with the interface name. Also, you change the mtu=9000 value to something else per your requirements.

2]  Changing MTU through network adapter settings

You can do it through Network Adapter settings to change your MTU value through a visual interface. For this, follow the below steps:

  • Launch Run by pressing Windows Key + X.
  • Type ncpa.cpl and press Enter.
  • Right-click on your preferred Network adapter and go to Properties.
  • Next, click on the Configure button.
  • Next, select Jumbo Packet, and from the disable dropdown menu, select any of the MTU values.Select MTU Option Windows
  • Once done, save the changes and reboot your computer.

How to determine the optimal MTU Value?

Now you might be wondering what would be the ideal MTU value. You can quickly figure that out by running a command in Windows Terminal.

You need to run the ping command, which will send requests to the network and increase the size of the Packet till you get a message about the needed fragment of the Packet. So whichever website is not loading correctly, you can try the ping command with it by following the below steps:

Ping Size MTU

Launch Windows Terminal, and run the following command:

ping [url] -f -l <packet_size>

Over here, replace [url] with your respective URL and set the <packed_size> to 1450. As you run your ping, keep increasing the size with each command until you see the Packet needs to be the fragmented message.

How to troubleshoot Common Issues around MTU?

While dealing with MTU, it is easy to mess things up. If you enter the wrong MTU value, it can impact the overall network performance.

In such a case, you can try restoring the default MTU value. The default MTU value on most computers is 1500. So you can follow the above steps to change the MTU value to 1500 and see if it helps you out.

If you still face any other internet issues, running Windows Troubleshooter might be helpful. To run it, follow the below steps:

  • Press Windows Key + I to launch Settings.
  • Navigate to System > Troubleshoot > Other troubleshooters.
  • Over here, click on the Run button next to Internet Connections and let the troubleshooter run.

Conclusion

So that was all for how to change MTU on Windows 11/10. Changing MTU value using Windows Terminal is a much easier and straightforward process. While if you make the changes using Network adapters, you may not find the required options to make changes. So go ahead and try the above steps on your own and see if they are helpful to you.

4 Ways to Change the MTU Size of a network interface on Windows

The MTU is a parameter of your network interfaces that defines the size of the packets.
Depending on the connection method, especially if you are using a VPN, you may need to reduce the MTU.
This is because VPNs provide an overlay and reducing MTU can help make the connection smoother.

This article gives several methods to change the MTU of a network interface on Windows 7, 8.1, and 10.

By default, the MTU value for a network interface is 1500.
Depending on the connection mode or if you have problems, you can lower this value, for example, to 1300.

From the settings of your network cards

On Windows 7, 8.1 or Windows 10, you can change a card’s MTU very easily from Device Manager.

Open Windows Device Manager

First, you need to access Windows Device Manager.

Expand the network cards and double-click on the one that interests you.
Then in the Advanced tab, find the MTU property and change the value to the right.

Command Prompt


The second method is from the command line and then the Windows command prompt.

The Command Prompt should be opened as administrator by right-clicking and then run as administrator.

First of all, you must retrieve the name of the network interface used to connect to the internet depending on whether you are using Ethernet (cable) or WiFi.
To list the network interfaces, use the following netsh command

netsh int ipv4 show subinterface


Once the name of the interface has been located, we change the MTU value With the following command where X is the name of the interface and #### the value of the MTU.

netsh int ipv4 set subinterface “XXXXXX” mtu = #### store = persistent

SG TCP Optimizer

In Settings , select the Custom value and in the MTU field, specify the desired value. Click the Apply Changes button to apply the specified settings and restart the computer.

Option 2 In Windows operating systems, the MTU size can be changed using the special netsh utility or through the registry editor.

Via Registry Editor

At the Windows command prompt (Start> Run> cmd), type regedit to launch the registry editor.


In the Registry Editor utility window that opens, open the following registry branch:

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Class \ {4D36E972-E325—11CE-BFC1—08002bE10318}


It will contain sub-sections 0000, 0001, 0002, etc. Check the contents of these subsections carefully and stop at the fact that the value of the DriverDesc parameter is similar to the name of your network adapter through which you connect to the Internet. In this subsection, locate and store the value of the NetCfgInstanceId parameter.


Then navigate to the following registry key:

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters \ Interfaces


Find the subkey that matches the value of the NetCfgInstanceId parameter that you found earlier.


Double-click on the MTU parameter and enter the value 1400 in decimal format.
Close Registry Editor and restart the computer.

If there is no MTU setting, you need to create it. In Registry Editor, select Edit> New> DWORD Value.


Enter the parameter name – MTU. Then double-click on the MTU parameter, enter the desired value (in our example, the decimal value is MTU = 1400), then click OK.

Close Registry Editor and restart the computer.

Profile picture for user Олег

Windows Terminal cmd

Меняем MTU на сервере Windows с помощью командной строки. На тестовом сервере операционная система Windows Server 2016.

MTU (Maximum Transmission Unit) — максимальный размер полезного блока данных одного пакета. Если размер блока превышает MTU, то он может быть передан протоколом с использованием фрагментации.

Основные значения MTU в байтах:

  • Ethernet — 1500
  • 16 Mbps Token Ring — 17914
  • 4 Mbps Token Ring — 4464
  • FDDI — 4352
  • IEEE 802.3/802.2 — 1492
  • PPPoE (WAN Miniport) — 1480
  • X.25 — 576

Зачем уменьшать MTU

Иногда бывает полезно уменьшить MTU на компьютере, чтобы ускорить скорость работы по сети. Классический случай, когда дома стоит роутер и на нём указан MTU 1480. Если на домашнем компьютере указано значение MTU 1500, то большие пакеты при передачи данных могут фрагментироваться. Тормозит потоковое видео или аудио, к примеру.

Уменьшаем MTU с помощью командной строки

Командная строка запущена под администратором.

Посмотреть текущее значение MTU:

netsh interface ipv4 show subinterfaces

mtu

У меня на интерфейсе Ethernet0 указано MTU 1500.

Установить значение MTU 1452 на интерфейсе Ethernet0:

netsh interface ipv4 set subinterface "Ethernet0" mtu=1452 store=persistent

mtu

Перезагружаем компьютер. Всё.

Сброс MTU на значение по умолчанию:

netsh interface ipv4 reset

Перезагружаем компьютер.

Определить минимальное значение MTU

Вычислить минимальное значение MTU между компьютером и узлом сети можно с помощью команды ping.

ping example.com -f -l 1500

Здесь:

  • -f — запрещает фрагментировать пакеты
  • -l — размер пакета

Если пинг не проходит, то уменьшаем размер пакета.

mtu

У меня 1500 не проходит, а 1400 проходит. Истина где-то посередине. Методом научного пинга находим максимальный размер пакета, который проходит без фрагментации.

mtu

У меня получилось 1372. Прибавляем 28 байт (8 байт ICMP заголовок и 20 байт IP). 1372+28=1400.

Оптимальный размер MTU 1400.

Обновлено Обновлено:
Опубликовано Опубликовано:

Тематические термины: MTU, Windows, Linux, Роутер.

Рассмотрим процесс смены значения MTU для операционных систем семейства Windows и Linux, а также роутерах.

Для Windows
    Командная строка
    Реестр
Linux
    Разово
    Постоянно
Роутер
Читайте также

Windows

Командная строка

Открываем командную строку от имени администратора.

Вводим команду для просмотра текущего значения MTU и названия сетевого интерфейса:

netsh interface ipv4 show subinterfaces

Получаем, примерно, следующее:

   MTU  Состояние определения носителя   Вх. байт  Исх. байт  Интерфейс
——  —————  ———  ———  ————-
  1500                1  81324794839  5376993884  Ethernet

* где 1500 — значение MTU (по умолчанию для сетей Etnernet); Ethernet — название интерфейса.

Меняем MTU следующей командой:

netsh interface ipv4 set subinterface «Ethernet» mtu=1492 store=persistent

* где Ethernet — название сетевого интерфейса, которое мы получили предыдущей командой; 1492 — новое значение MTU

Реестр

Открываем реестр (команда regedit) и переходим по ветке HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318.

Внутри будут находиться другие ветки с названиями 0000, 0001, 0002 и так далее. Необходимо пройтись по каждой и найти ключ DriverDesc со значением, похожим на название нашего сетевого адаптера и записать значение ключа NetCfgInstanceId, например:

Поиск сетевого адаптера в реестре Windows

Переходим в ветку HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces. Находим ветку с нашим идентификатором, который мы записали и меняем ключ MTU (при его отсутствии, создаем — тип DWORD):

Смена MTU через реестр

Чтобы настройки применились выключаем и снова включаем сетевой интерфейс или перезагружаем компьютер.

Linux

Для примера, рассмотрим наиболее популярные дистрибутивы — CentOS и Ubuntu.

Разово

Разово (до перезагрузки) для данных двух систем настройку можно выполнить одной командой:

ip link set mtu 1400 dev eth0

* где 1400 — новое значение MTU; eth0 — сетевой интерфейс, для которого поменяли максимальный размер пакетов.

или в старых системах:

ifconfig eth0 mtu 1400

Постоянно (permanently)

Для систем на базе Debian (Ubuntu) и Red Hat (CentOS) процедура немного отличается.

Ubuntu

Открываем настройку сетевых интерфейсов:

vi /etc/network/interfaces

К нужному адаптеру добавляем строчку:

iface eth0 inet static

mtu 9000

Перезапускаем сеть:

systemctl restart networking

CentOS

Открываем конфигурационный файл для соответствующего сетевого интерфейса:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Добавляем строку:


MTU=»9000″

Перезапускаем сетевую службу:

systemctl restart network

Роутер

Смена MTU на роутерах различных производителей выполняется, примерно, по одному и тому же принципу — зайти на веб-интерфейс для настройки маршрутизатора, найти раздел с настройкой сети Интернет, задать значение MTU.

Например, для большинства устройств TP-Link: NetworkWAN:

Смена MTU на роутере TP-Link

Читайте также

Как посмотреть значение MTU

Дмитрий Моск — частный мастер

Была ли полезна вам эта инструкция?

Да            Нет

  • Как задать ip адрес компьютера на windows 10
  • Как загрузить систему windows с флешки
  • Как загрузить обновления windows 10 вручную
  • Как загрузиться с ssd в windows 10
  • Как задать пароль к папке в windows 10