I’ve been struggling with the MTU topic for a while and I still can’t get how it really works. The majority of books that I read and the courses that I attended all seem to treat this subject in a superficial way.
I tried sending pings between a Mac Os host and a Windows host by simulating different mtu scenarios. Both hosts are in the same Lan and are connected to a Wifi router.
Mac Os host , mtu 1500
Windows host, mtu 1300
I sent a 1500 bytes ip packet with icmp echo request out of the Mac Os interface to the Windows 1300 mtu interface. The Windows machine accepts the packet normally and then sends back the echo reply by fragmenting the ip packet into two parts .
Mac Os host , mtu 1300
Windows host, mtu 1500
This scenario is the opposite of the first one. Hower when I send a 1500 bytes ip packet with ping request to the Mac Os host I don’t get any answer ( shouldn’t the Mac Os host have sent icmp error fragmentation needed ? ).
This behaviour it’s a little confusing. Is the mtu concerned with ingoing, outgoing or both directions traffic ?
How could be explained the different behaviour of the Mac Os and Windows hosts ?
A lot of books and resources talk about “next hop mtu” when referring to icmp error fragmentation needed. This statement seems appropriate if we have a scenario like this :
In this case when we send a packet bigger than 1492 destined to host B the router is going to send an ICMP error fragmentation needed ( provided that it hasn’t a firewall that prevents that from occurring ). This is because the “mtu interface to the next hop” is only 1492 bytes.
However consider this other scenario :
Let’s say I send a 1500 bytes ip packet with icmp echo request to R1 ( address 10.0.0.2 ). What is R1 going to do in this case ? Accept the packet as the Windows host did ? Simply drop the packet as the Mac Os host did ? Drop the packet and send an icmp error fragmentation needed ?
Is there some mtu wizard who could explain how things really work when it comes to mtu and try to make some order by explaining and putting together the scenarios I just showed ? What is this mtu at its core ? Is it a hardware limitation ( NIC )? Is it a software limitation ?
Big thank you to whoever is going to clarify this topic !