How to check supported MTU value for destination system and/or intermediate network ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (All versions).

Issue

  • How to test a particular MTU value is support?
  • How I can check if this MTU size is supported by each Network Card?
  • Is there any checklist to verify our environment is prepared for enable MTU change?
  • How to test the custom Jumbo Frames are supported?

Resolution

It is important to test if MTU is supported in the network from each end point, because the client will send ICMP ECHO Request with Do-Not-Fragment set (ip.flags.df=1) while the ICMP ECHO Response may not have Do-Not-Fragment set. Therefore MTU tests must be done using ping -M do from each endpoint in order to reveal asymmetric MTUs.

# ping -M do -s 8972 [destination IP]
Note: there is an overhead of 28 bytes for the packet size. 8 bytes for ICMP headers and 20 bytes for IP header, so the MTU is 28 bytes larger than the figure you establish through the method above. So to test for MTU of 9000, you actually need to set your ping packet size to 9000-28 = 8972.
  • By adjusting the MTU value its possible to find the supported MTU value in the network.

  • If the MTU value is not enabled in the client side the ping output will be:

    PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 8184 data bytes
    ping: sendto: Message too long
    
  • If the MTU value is enabled in client but not in destination and destination's response sets Do-Not-Fragment (or switch in between) the ping output will be:

    PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 8184 data bytes
    Request timeout for icmp_seq 0
    
  • If the MTU is supported and enabled in client but not in destination and destination's response does not set Do-Not-Fragment the ping output will succeed although asymmetric MTUs exit. For this reason, ping -M do must be done from both endpoints.

  • If the MTU is supported and enabled in client and destination the ping output will be:

    PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 8184 data bytes
    8192 bytes from xxx.xxx.xxx.xxx: icmp_seq=0 ttl=128 time=0.714 ms
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments