Today I had a chat about MTU with a customer. MTU is my second favorite topic for tech talks in front of the coffee machine, STP is still the first because there are so many misconceptions about it. Even QoS is funny, people has many creative ideas and expectations from it.
Let’s talk about MTU. Everything begun today from a ping (it’s italian in the screenshot, but you know the output by heart right?)
Why do we have packet loss if the MTU is 1500 and we set a size of 1500? After some tests he found the biggest MTU that works without fragmentation is 1472. Why?
The ping command can set the data size in the payload, but doesn’t count the IP and ICMP headers that are appended to the data.
The rule is: the sum must be 1500.
The reason is: the switch has a default MTU of 1518 bytes of which 18 are the ethernet header, so 1500 bytes are available for the IP MTU.
Let’s see Wireshark to confirm :
On the Wireshark capture we can see the frame with the Ethernet Header, IPv4 Header and ICMP header. The ICMP packet has a payload of 1472 bytes.
Notice that the size on wire of the frame is 1514, we expected 1518 right? The explanation can be found HERE: the NIC driver does not send the FCS to Wireshark.
MTU for a Cisco CCIE R/S student is often correlated to PPPoE so this is a good chance to review it.
When PPPoE is used on an interface, we set the dialer MTU with the command
interface Dialer1 mtu 1492
Why is it necessary?
The reason is we need a total interface IP MTU of 1500 bytes to send the packet unfragmented, and we need 8 bytes for the PPP header, so we have 1492 bytes available. The physical interface must receive a total packet size from the dialer of 1492 bytes, so we set the MTU on the dialer.
The two different commands we have to set the MTU in a Cisco router are:
- ip mtu: set the MTU of the IP payload to be sent. That includes any L3 header so the available data may be less than 1480 bytes
- mtu: set the interface MTU. That includes any L2 header (PPP, Ethernet)
Other cases that need MTU tuning may be QinQ tunneling, IPSec and other tunnels.
It’s good to understand how MTU works to entertain people in front of the coffee machine… and to configure and troubleshoot network devices too ;-)