When connecting Windows 11 to specialized corporate VPNs, cloud tunnels (such as GRE or WireGuard), Jumbo Frame storage networks (SANs), or PPPoE broadband connections, network packets that exceed the path Maximum Transmission Unit (MTU) can lead to silent packet fragmentation, dropped TCP handshakes, or stalling web downloads. The NetTCPIP module in PowerShell provides fine-grained control over network layer interface parameters through the Set-NetIPInterface cmdlet. Beyond MTU adjustments, this cmdlet allows network engineers to configure interface routing metrics, neighbor discovery timers, directed MAC broadcasting, and DHCP operational flags.
Understanding IP Interface Properties and MTU
In Windows networking, an IP interface represents the network-layer (Layer 3) configuration bound to a physical or virtual network adapter. Key parameters governed at this layer include:
- NlMtu (Network Layer MTU): The maximum packet size in bytes that the interface will transmit without fragmentation. Standard Ethernet uses 1,500 bytes; PPPoE connections often require 1,492 bytes; encapsulated VPN tunnels typically mandate 1,350 to 1,420 bytes; and high-performance storage networks utilize 9,000-byte Jumbo Frames.
- InterfaceMetric: The integer routing cost assigned to the interface. Windows chooses routes with lower metrics when multiple default gateways are present.
- NeighborDiscovery: Enables IPv6 Neighbor Discovery (ND) or IPv4 ARP caching mechanisms.
- Dhcp: Specifies whether the interface actively solicits IP configurations from a local DHCP server.
Modifying these parameters via PowerShell provides persistent, immediate configuration without navigating legacy Control Panel applets or editing obscure registry values.
Auditing Current Interface Configurations with Get-NetIPInterface
To inspect your current network layer settings, open an elevated PowerShell prompt by right-clicking Start and selecting Terminal (Admin).
Execute the Get-NetIPInterface cmdlet to view a summary of all active interfaces:
Get-NetIPInterface | Format-Table InterfaceAlias, InterfaceIndex, AddressFamily, NlMtu, InterfaceMetric, Dhcp, ConnectionState
The resulting table displays parameters separately for IPv4 and IPv6:
InterfaceAlias InterfaceIndex AddressFamily NlMtu InterfaceMetric Dhcp ConnectionState
-------------- -------------- ------------- ----- --------------- --------- ---------------
Ethernet 8 IPv4 1500 25 Enabled Connected
Ethernet 8 IPv6 1500 25 Enabled Connected
Wi-Fi 14 IPv4 1500 35 Enabled Connected
Wi-Fi 14 IPv6 1500 35 Enabled Connected
Take note of the InterfaceAlias (e.g., "Ethernet" or "Wi-Fi") or the numeric InterfaceIndex (e.g., 8), as these identifiers target your changes.
Configuring Custom MTU Sizes on an Interface
If you experience stalling connections over a VPN tunnel or need to accommodate a PPPoE broadband provider, lowering the MTU prevents packet fragmentation.
To set the IPv4 MTU on your "Ethernet" interface to 1400 bytes, execute:
Set-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv4 -NlMtu 1400
To ensure consistent packet sizing across modern dual-stack networks, update the IPv6 stack on the same adapter:
Set-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv6 -NlMtu 1400
Conversely, if your network infrastructure and switch fabric support 9K Jumbo Frames for high-throughput NAS or iSCSI storage, expand the MTU:
Set-NetIPInterface -InterfaceAlias "Ethernet" -NlMtu 9000
Verify your updated MTU value immediately:
Get-NetIPInterface -InterfaceAlias "Ethernet" | Select-Object AddressFamily, NlMtu
Setting Custom Interface Routing Metrics
By default, Windows automatically calculates an interface metric based on link speed. However, when connecting simultaneously to a wired dock and Wi-Fi, you may want to ensure that high-speed Ethernet traffic is strictly preferred over wireless connections.
First, disable automatic metric assignment on the adapter, and assign a lower explicit metric (e.g., 10) to the primary interface:
Set-NetIPInterface -InterfaceAlias "Ethernet" -AutomaticMetric Disabled -InterfaceMetric 10
Then assign a higher metric (e.g., 50) to the secondary connection:
Set-NetIPInterface -InterfaceAlias "Wi-Fi" -AutomaticMetric Disabled -InterfaceMetric 50
Windows routing tables will prioritize outbound packets across the Ethernet adapter whenever both interfaces are connected.
Tuning Neighbor Unreachability Detection (NUD)
In high-availability server or cluster environments, detecting a disconnected gateway quickly allows failover routes to take effect without prolonged timeouts. The -NeighborUnreachabilityDetection parameter controls whether the Windows network stack actively probes neighboring gateways and switches.
To verify and enforce active Neighbor Unreachability Detection on an interface, execute:
Set-NetIPInterface -InterfaceAlias "Ethernet" -NeighborUnreachabilityDetection Enabled
Resetting Interface Metrics to Automatic Defaults
If network troubleshooting requires restoring default Windows metric calculations and standard MTU limits, re-enable automatic settings:
Set-NetIPInterface -InterfaceAlias "Ethernet" -AutomaticMetric Enabled
Set-NetIPInterface -InterfaceAlias "Ethernet" -NlMtu 1500
Using Set-NetIPInterface provides system administrators with precise, scriptable control over Windows 11 Layer 3 networking, resolving MTU mismatches and optimizing multi-homed routing with minimal overhead.