How to check supported MTU value for destination system and/or intermediate network ?
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
MTUis supported in the network from each end point, because the client will sendICMP ECHORequest withDo-Not-Fragmentset (ip.flags.df=1) while theICMP ECHOResponse may not haveDo-Not-Fragmentset. ThereforeMTUtests must be done usingping -M dofrom 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
MTUvalue is not enabled in the client side thepingoutput will be:PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 8184 data bytes ping: sendto: Message too long -
If the
MTUvalue is enabled in client but not in destination and destination's response sets Do-Not-Fragment (or switch in between) thepingoutput will be:PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 8184 data bytes Request timeout for icmp_seq 0 -
If the
MTUis supported and enabled in client but not in destination and destination's response does not set Do-Not-Fragment thepingoutput will succeed although asymmetric MTUs exit. For this reason,ping -M domust be done from both endpoints. -
If the
MTUis supported and enabled in client and destination thepingoutput 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