Windows LAN-MTU Test

The default-MTU allows max. 1472-byte sized ping-packets to be sent (28 Bytes will always get added: 20 Byte IPv4-Header, 8 Byte ICMP-Header).

If you want to test the max. MTU of the LAN, you have to modify the IP-MTU of the Windows-NIC.

List all Interfaces

C:\>netsh interface ipv4 show interfaces

Idx Met MTU State Name
--- ---------- ---------- ------------ ---------------------------
1 75 4294967295 connected Loopback Pseudo-Interface 1
27 55 1500 disconnected WLAN
12 25 1500 disconnected Local Area Connection* 9
8 25 1500 disconnected Local Area Connection* 10
4 5 1500 disconnected ETH_DELL
23 25 1500 connected VirtualBox_Host3
13 25 1500 connected ETH_DOCK
24 25 1500 connected VirtualBox_Host1
11 25 1500 connected VirtualBox_Host2
9 25 1500 connected Npcap Loopback Adapter
5 25 65536 connected Ethernet
15 25 1500 connected VirtualBox Host-Only Network #4
14 1 1500 disconnected Ethernet 4

Interesting is for example ETH_DOCK – my active NIC when the Laptop is mounted to the „docking-station“.
C:\>netsh interface ipv4 show subinterface 13

MTU MediaSenseState Bytes In Bytes Out Interface
------ --------------- --------- --------- -------------
1500 1 255082163 60077137 ETH_DOCK

This doesn’t prove anything – the IP-Packet wont be sent through the NIC, Windows prints the „Packet neneds to be fragmented but DF set“-Message instead.
C:\>ping 192.168.2.1 -l 9000 -f

Pinging 192.168.2.1 with 9000 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.

Ping statistics for 192.168.2.1:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Modify the IP-MTU

C:\>netsh interface ipv4 set subinterface 13 mtu=9000 store=persistent
The requested operation requires elevation (Run as administrator).

@Retry as admin
C:\WINDOWS\system32>netsh interface ipv4 set subinterface 13 mtu=9000 store=persistent
Ok.

Verify the IP-MTU again
C:\> netsh interface ipv4 show subinterface 13

MTU MediaSenseState Bytes In Bytes Out Interface
------ --------------- --------- --------- -------------
9000 1 255253609 60683324 ETH_DOCK

Now the IP-Ping is sent into the LAN-Switch.

C:\> ping 192.168.2.1 -l 8972 -f

Pinging 192.168.2.1 with 8972 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.2.1:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Timeout?

Action Plan:

  • check device 192.168.2.1 – is it powert up?
  • fix the LAN-Switch-MTU?
  • fix the IP-MTU of end-device „192.168.2.1“