How to configure MTU value in Windows 10 & 11 using Netsh tool

MTU of the Network Interface

The MTU(maximum transmission unit) refers to the largest size of the data payload that can be carried in a single frame by a network protocol at a given layer. For Ethernet Network Interface, the MTU value refers to the maximum size of the data payload, excluding the Ethernet frame’s overhead (e.g., MAC addresses, EtherType, FCS).

Ethernet Frame Structure

The frame consists of 7 key components, divided into three main sections:

  1. Header:
    • Preamble + SFD (8 bytes, physical layer).
    • Destination MAC (6 bytes).
    • Source MAC (6 bytes).
    • EtherType (2 bytes).
  2. Payload (Data): 46–1500 bytes.
  3. Frame Check Sequence (FCS): 4 bytes.

For standard Ethernet II frames:

  • The maximum data payload size is 1500 bytes.
  • This 1500-byte limit is what is commonly referred to as the Ethernet MTU, defining the largest chunk of data that can be transmitted in a single Ethernet frame without requiring fragmentation at the data link layer (Layer 2)

It’s a key parameter in network communication protocols like TCP/IP, determining how much data can be sent in one “chunk” before it needs to be broken down into smaller pieces. MTU applies to various network layers, but it’s most commonly associated with the network interface (e.g., Ethernet, Wi-Fi) you’re using.

In Windows 10 and 11, the MTU value of the network adapter(interface), decides the maximum size of IP data packets(in byte) that can be sent by the computer.

Configuring an proper value of MTU of the network interface will increase the network efficiency. It speeds up the downloading and uploading of data by the apps.

User can view or modify it via the Command Prompt, PowerShell, or sometimes through specific driver settings for your network adapter.


The Network Layer (Layer 3), typically implemented by the Internet Protocol (IP), generates IP packets that need to be transported over a physical network. The Ethernet II frame serves as the vehicle for carrying these IP packets across the data link layer. Here’s how the Ethernet II MTU ties to the IP packet:

1. Encapsulation of IP Packet in Ethernet Payload

  • The data payload of the Ethernet II frame encapsulates the entire IP packet, which includes:
    • IP Header: Typically 20 bytes for IPv4 (without options) or 40 bytes for IPv6.
    • IP Payload: The actual data, such as a TCP segment, UDP datagram, or other protocol data.
  • The Ethernet II MTU (1500 bytes) represents the maximum size of the IP packet (IP header + IP payload) that can fit into a single Ethernet frame without requiring fragmentation.

For example:

  • For an IPv4 packet:
    • Maximum IP packet size = Ethernet MTU = 1500 bytes.
    • If the IP header is 20 bytes, the maximum IP payload (data) is 1500 – 20 = 1480 bytes.
  • For an IPv6 packet:
    • If the IP header is 40 bytes, the maximum IP payload is 1500 – 40 = 1460 bytes.

IP packet size = IP header size + IP payload size

IP payload = TCP Segment = TCP header + TCP payload


Path Maximum Transmission Unit, is the smallest MTU value supported by any link along the entire path between a source and destination in a network. Unlike the MTU of a single network interface (e.g., 1500 bytes for Ethernet), Path MTU considers the full route that packets take across multiple devices—such as routers, switches, and gateways—each of which may have its own MTU limit. The goal is to determine the largest packet size that can travel from sender to receiver without being fragmented.

How Path MTU Works

When a packet travels through a network, it passes through various segments (e.g., your local network, ISP, backbone networks). Each segment has its own MTU, and if a packet exceeds the MTU of any link, it either gets fragmented (split into smaller pieces) or dropped, depending on the protocol settings. Path MTU represents the “weakest link” in this chain—the lowest MTU along the route.

Modern networks use Path MTU Discovery (PMTUD) to dynamically figure this out:

  • The sender starts with its local MTU (e.g., 1500 bytes) and sends packets with the “Don’t Fragment” (DF) flag set in the IP header.
  • If a router along the path encounters a packet too large for its next link’s MTU, it drops the packet and sends back an ICMP “Fragmentation Needed” message with its MTU value.
  • The sender adjusts its packet size downward and retries, repeating until packets pass through without issues.
  • The result is the effective Path MTU.

Path MTU Discovery (PMTUD): Windows adjusts MSS dynamically during a connection if PMTUD detects a lower Path MTU along the route, overriding the interface MTU if needed.

Why Path MTU Matters

  1. Avoiding Fragmentation:
    • Fragmentation slows down communication because the receiving end must reassemble packets, and lost fragments require retransmission. PMTU ensures packets are sized to avoid this.
  2. Improved network efficiency: By avoiding fragmentation, PMTUD reduces the overhead associated with reassembling fragmented packets. 
  3. Reliability:
    • Some networks or firewalls block fragmented packets or ICMP messages, breaking connectivity. PMTU helps ensure packets fit within limits upfront.
  4. Reduced latency: Fragmentation can introduce delays in packet delivery, which PMTUD helps to mitigate. 
  5. Better throughput: Efficient packet transmission leads to higher network throughput. 

Example

  • Your computer (MTU 1500) sends a packet to a server.
  • The packet passes through:
    • Your router (MTU 1500)
    • ISP gateway (MTU 1492, due to PPPoE)
    • Backbone router (MTU 1500)
    • Server’s network (MTU 1400, due to a VPN tunnel)
  • The Path MTU is 1400 bytes—the smallest MTU in the chain. Packets larger than this would be dropped or fragmented.

Path MTU in Practice

  • IPv4: PMTUD is optional but widely used. If ICMP messages are blocked (common in some networks), PMTUD fails, and connectivity issues may arise.
  • IPv6: Fragmentation isn’t allowed at intermediate routers; PMTUD is mandatory, and packets exceeding the path MTU are dropped with an ICMPv6 “Packet Too Big” response.

Considerations:

  • ICMP blocking: If firewalls or other network devices block ICMP “Fragmentation Needed” messages, PMTUD will not function correctly. 
  • Dynamic paths: PMTUD is continually performed because network paths can change dynamically. 

It is useful to manually find find out the path MTU of the network and use its value to configure the MTU value of the network interface in Microsoft Window.


The TCP Maximum Segment Size (MSS) defines the largest amount of TCP data (payload) that can be transmitted in a single segment. MSS operates at Layer 4 (Transport layer).

The MTU (Maximum Transmission Unit) of a network interface in Microsoft Windows directly influences the MSS (Maximum Segment Size) because MSS is derived from the MTU, adjusted for the overhead introduced by the TCP/IP protocol headers.

How MTU Determines MSS

The MSS is essentially the MTU minus the size of the IP and TCP headers.

Therefore: MSS = MTU – (IP header size + TCP header size)

For a standard IPv4 Ethernet interface in Windows with an MTU of 1500 bytes:

  • IPv4 Header: Typically 20 bytes (IPv4 without options).
  • TCP Header: Typically 20 bytes (without options like timestamps or SACK).
  • Total Overhead: 20 (IP) + 20 (TCP) = 40 bytes.
  • MSS = 1500 – 40 = 1460 bytes.
  • This means a TCP segment can carry up to 1460 bytes of actual data, with the remaining 40 bytes used by IP and TCP headers.
    • TCP Segment = TCP Header (20) + TCP Payload (1460) = 1480 bytes
    • IP Packet Size = IP Header (20) + TCP Header (20) + TCP Payload (1460) = 1500 bytes (fits within MTU)
  • TCP ensures that its segments fit within the MTU, preventing IP fragmentation.
  • For IPv6:
    • IP Header = 40 bytes (fixed).
    • TCP Header = 20 bytes (minimum).
    • MSS = 1500 – 40 – 20 = 1440 bytes.

How Windows Handles MSS

  • TCP Stack: Windows’ TCP implementation automatically calculates MSS during the TCP handshake. The MSS value is announced in the SYN packet, based on the interface MTU minus headers.
  • Adjustment: If PMTUD detects a smaller Path MTU, Windows lowers the effective MSS for that connection without changing the interface MTU.

The Maximum Segment Size (MSS) negotiation is a critical part of establishing a TCP connection, ensuring efficient data transfer by preventing packet fragmentation. Here’s how it works:

The Role of MSS

  • MSS defines the largest amount of data (payload) that a device can receive in a single TCP segment.
  • It’s crucial for avoiding IP fragmentation, which can negatively impact network performance.

MSS and the TCP Three-Way Handshake:

  • MSS negotiation occurs during the initial TCP three-way handshake, the process that establishes a TCP connection.
    • SYN (Synchronize) Packet:
      • The client initiates the connection by sending a SYN packet to the server.
      • Within the TCP header of this SYN packet, the client includes an MSS option, indicating the maximum segment size it can receive.
    • SYN-ACK (Synchronize-Acknowledge) Packet:
      • The server responds with a SYN-ACK packet, acknowledging the client’s SYN.
      • The server’s SYN-ACK also includes its own MSS option, specifying its maximum receivable segment size.
    • ACK (Acknowledge) Packet:
      • The client sends an ACK packet to confirm the server’s SYN-ACK, completing the handshake.
      • By this point, both the client and server have each other’s MSS values.

Determining the Effective MSS:

  • After the handshake, both devices know each other’s MSS.
  • The effective MSS for the connection is the smaller of the two advertised MSS values.
  • This ensures that neither device sends TCP segments that are too large for the other to handle.

Why This Matters

  • Avoiding Fragmentation:
    • By agreeing on an MSS, devices prevent IP fragmentation, which can lead to increased latency and packet loss.
  • Optimizing Performance:
    • Proper MSS negotiation helps optimize network throughput by ensuring that data is transmitted in efficient segment sizes.

This way by setting the value of MTU of the network interface, the effective MSS value for both sending and receiving data packets is controlled.

MSS = MTU – (IP header size + TCP header size)


Network shell (netsh) is a command-line utility that allows you to configure and display the status of various network communications components.

There are multiple commands to set the MTU value of the network interface.

MTU value range for IPv4 and IPv6 Interface

A network adapter can be assigned both IPv4 and IPv6 addresses. Both act as a separate network and requires separate MTU values:

  • For IPv4 network interface
  • For IPv6 network interface

Valid Range of MTU value in Windows OS for Network interface (without jumbo frames):

  • IPv4 MTU value range: 576 to 1500
  • IPv6 MTU value range: 1280 to 1500

Preferred MTU value for IPv4 and IPv6 Interface

Preferred MTU value range for IPv4 and IPv6 Interface: 1300 to 1400

When the MTU value is set to the default of 1500 for the Ethernet, there is a high chance that the data packet sent from that device will go through fragmentation by a network routing device along the network pathway.

That’s why setting the MTU value to a lower value (1300 to 1400) ensures that the data packet send from this device has extremely low probability of getting fragmented along the network path.


1. Configure the MTU value of the IPv4 network interface using Interface name

  1. Run Command Prompt(cmd) or PowerShell in Administrator mode.

2. First you need to know the name of the IPv4 network interface.

To show the list of IPv4 network interfaces run the following command:

  • netsh interface ipv4 show subinterfaces

3. Note down the name of the IPv4 network interface that connects to the internet.

4. The netsh command for configuring the MTU value of the IPv4 network interface

Syntax : netsh interface ipv4 set subinterface interface=[network interface name] mtu=[MTU value in bytes] store=persistent

In this case :

  • Network Interface name: IntelWiFi
  • MTU value in bytes: 1400

Netsh command to set MTU value to 1400 for the IPv4 network interface named IntelWiFi is:

  • netsh interface ipv4 set subinterface interface=”IntelAX” mtu=1400 store=persistent

5. Verifying Changes. To confirm the configuration, use the command: netsh interface ipv4 show subinterfaces


2. Configure the MTU value of the IPv6 network interface using Interface name

  • Run Command Prompt(cmd) or PowerShell in Administrator mode.

1. You need to find out the name of the IPv6 network interface(if it is available). To show the list of IPv6 network interfaces run the following command:

  • netsh interface ipv6 show subinterfaces

2. Note down the Name of the IPv6 network interface that connects to the internet.

3. The Netsh command for configuring the MTU value of the IPv6 network interface

Syntax : netsh interface ipv6 set subinterface interface=[network interface name] mtu=[MTU value in bytes] store=persistent

In this case :

  • Network Interface name: IntelWiFi
  • Optimal MTU value in bytes: 1300

Netsh command to set MTU value to 1300 for the IPv6 network interface named IntelWiFi is:

  • netsh interface ipv6 set subinterface interface=”IntelAX” mtu=1300 store=persistent

4. Verifying Changes.

  • To confirm the active configuration, use the command: netsh interface ipv6 show subinterfaces
  • To confirm the persistent configuration, use the command: netsh interface ipv6 show subinterfaces store=persistent


Run Command Prompt(cmd) or PowerShell in Administrator mode.

1. First you need to know the Index number of the IPv4 network interface. To show the list of IPv4 network interfaces run the following command:

  • netsh interface ipv4 show interfaces

2. Note down the Index number (Idx) of the IPv4 network interface that connects to the internet.

3. The Netsh command for configuring the MTU value of the IPv4 network interface

Syntax : netsh interface ipv4 set subinterface [interface=]<network interface Index number> [mtu=]<MTU value in bytes> store=persistent

In this case :

  • Network Interface Index number: 16
  • MTU value in bytes: 1300

Netsh command to set MTU value to 1300 for the IPv4 network interface index number 16 is:

⦁ netsh interface ipv4 set subinterface interface=”16″ mtu=1300 store=persistent

4. Verifying Changes. To confirm the configuration, use the command: netsh interface ipv4 show interfaces


Run the PowerShell command line tool in Administrator mode.

  1. First you need to know the Index number of the IPv6 network interface. To show the list of IPv6 network interfaces run the following command:
  • netsh interface ipv6 show interfaces

2. Note down the Index number (Idx) of the IPv6 network interface that connects to the internet.

3. The Netsh command for configuring the MTU value of the IPv6 network interface

Syntax : netsh interface ipv6 set subinterface [interface=]<network interface Index number> [mtu=]<MTU value in bytes> store=persistent

In this case :

  • Network Interface Index number: 16
  • MTU value in bytes: 1400

Netsh command to set MTU value to 1300 for the IPv6 network interface index number 16 is:

⦁ netsh interface ipv6 set subinterface interface=”IntelAX” mtu=1300 store=persistent

4. Verifying Changes

  • To confirm the persistent configuration, use the command: netsh interface ipv6 show interfaces store=persistent
  • To confirm the active configuration, use the command: netsh interface ipv6 show interfaces store=active

IPv6 Router Advertisement (RA) is a critical component of the IPv6 Neighbor Discovery Protocol (NDP). Routers use RA messages to announce their presence on a network and provide essential configuration information to IPv6 hosts.

If router is advertising IPv6 MTU, then that value may override the default or manually configured MTU value of the IPv6 Network interface .


Reference