Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On my wireless network, I can tracepath to a mac using MTU of 1500 on Ubuntu linux 12.04.

(Mac MTU is set to 1470 for some reason, but reply frames are not that big so this does not matter)

When I tracepath to my HP printer, it never responds to any frame that is 1514 bytes long: MTU(1500) + Ethernet(14) (SRC(6) + DST(6) + type(2)) = 1514

But if I set my MTU to 1498, my printer responds. An MTU of 1499 fails also.

Note: Setting MTU to 1500 on my Mac causes printing to fail as well so I doubt it is anything to do with either computer, nor my router.

Update: If I tracepath to google.com I can see my router (on its WAN link) reply with ICMP packets stating that fragmentation is needed and subsequent frame MTU needs to be 1474.

tracepath changes frame size to match this and continues. This means it now sends frames that are 1488 bytes long.

For my printer, it does not send back any ICMP packet stating that it can not process a 1500 byte payload. It is as if it is black-holing frames larger that 1512 bytes.

Update: Newer Macs use 1500 and they print fine. When I looked at what was happening, my Mac would try 1500 first and if it failed it dropped MTU to 1470 (from memory) - an interesting work-around from Apple.

share|improve this question
add comment

1 Answer 1

Actually MTU is inclusive of the 28 byte header. Based on what you have described, your printer appears to configured for an MTU of 1498 which is reasonable.


If you set your computer's MTU to 1500 then it will send packets up to 1500 bytes in total size (not 1514 as you have described).

Another way of determining the MTU of your path or a particular host is to use the ping command:

-f sets the Do Not Fragment bit 
-l configures the data size (remember to add 28 bytes for the header)

So to test host.example.com for an MTU of 1500 you would use

ping -f -l 1472 host.example.com.

share|improve this answer
    
Thanks Jeremy. Not sure where 28 bytes comes from, but MTU is payload size, not frame size - I'm pretty sure of that. I am also puzzled that you suggest that a MTU of 1498 is reasonable given than I would have expected 1500 as a 'default' Ethernet MTU. I have learnt something more which I will add to my question. –  philcolbourn May 27 '12 at 0:22
    
I usually see "MTU size" and "packet size" used to refer to Ethernet payload (max = 1500 bytes) and "Ethernet frame size" to refer to the whole Ethernet frame: payload + Ethernet header + CRC trailer. Because you are using traceroute and ping over IP you must take into account the IP header which is 28 bytes. –  Jeremy W May 28 '12 at 15:31
    
OK, I see what you mean. I had already edited my question to use 'frame'. I guess 28 bytes is IP (20 bytes) and ICMP (8 bytes). But, none of this discussion is relevant as I see it - my printer just does not like a 1500 byte MTU and I can not see why. –  philcolbourn May 29 '12 at 4:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.