My computer's Ethernet adapter uses 1,500 byte Ethernet frames. Normally this means that my Local Area Connection's MTU is
But my (IPv4) connection to the Internet has some overhead. This means that my actual MTU when communicating to the Internet is
1492. This is causing all the regular problems that exist with mis-configured interface MTU.
The Router Can Fix It
Obviously i could use
netsh, and override my network interface with a custom MTU. But i don't want to do that. My router's DHCP server already knows that the MTU is
1492. If asked, the DHCP Server will respond with DHCP option 26:
- 26 MTU Interface =
So it was driving me nuts why the DHCP server isn't telling my Windows 7 machine the MTU setting as one of the items it returns in the DHCP offer:
- 54 DHCP Server Identifier =
- 51 IP Address Lease Time =
- 1 Subnet Mask =
- 15 Domain Name =
- 3 Router =
- 6 Domain Name Server =
No MTU Interface! So my machine's Ethernet is stuck at
DHCP server's did what it's supposed to do
It took more digging, but i realized that DHCP Server's only give what the client asked for. During my Windows 7 DHCP Discover, Windows 7 enumerates the list of all the DHCP options it would like returned:
- 1 Subnet Mask
- 15 Domain Name
- 3 Router
- 6 Domain Name Server
- 44 NetBIOS over TCP/IP Name Server
- 46 NetBIOS over TCP/IP Node Type
- 47 NetBIOS over TCP/IP Scope
- 31 Perform Router Discovery
- 33 Static Route
- 121 Classless Static Route
- 249 Classless Static Route (Microsoft)
- 43 Vendor-Specific Information
Windows 7 isn't even asking for the MTU!
It must know what it's doing
Windows must have a reason why it's not asking for the MTU; but i don't know what it is. At first i thought it was because it was using Path Maximum MTU Discovery. But
PMTU only works for TCP connections, uses the TCP
MSS (Maximum Segment Size) option, and requires that the local
MSS option be correct.
In my case the TCP MSS setting (which comes from the MTU option) is wrong. It is
1500 interface MTU - 20 bytes IP header = 1480 bytes - 20 bytes TCP header = 1460 bytes MSS
which is too high.
Note: I can confirm Windows is using an MSS of 1460 bytes from a
SYNpacket, when a TCP connection is being established.
If not PathMTU, then what?
What is Windows 7 thinking? What is the intended behavior here? What were the network stack developers at Microsoft thinking should happen?
Now pretend that my Internet MTU is actually 1472 (which it is), and pretend that my Ethernet adapter actually uses
8,192 byte Ethernet frames (which it does). What is a corporation supposed to do? Am i supposed to walk up to every machine in the enterprise and type:
>netsh interface ipv4 set interface interface="Local Area Connection" mtu=1472 store=persistent
That's not reasonable. And even if it were reasonable, it's not what i'm asking.
I'm trying to understand what Windows wants to have happen. i'm trying to understand how it should behave. i'm trying to learn something here. Pretend that my Internet gateway is a 576 byte ATM; how do i instruct Windows 7 machines that the MTU if they want to send to the Internet is 576 bytes?