Check Jumbo Frame Settings with Ping

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

To improve network performance jumbo frames are often used. However, if the settings are off then network performance will suffer. This article will explain how to use ping to determine if all nodes and network gear are using the correct MTU settings. Determine MTU setting Before testing can begin the MTU size needs to be determined.

On Windows the netsh command can be used:

C:\> netsh int ip show int

Idx  Met  MTU         State        Name
--------------------------------------------------------------
1    50   4294967295  connected    Loopback Pseudo-Interface 1
10   10   1500        connected    Local Area Connection

On Linux the ifconfig command can be used:

# ifconfig

eth0      Link encap:Ethernet  HWaddr 68:05:CA:03:03:88
inet addr:192.168.105.170  Bcast:192.168.105.255  Mask:255.255.255.0
inet6 addr: fe80::6a05:caff:fe03:388/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:33171101471 errors:165 dropped:0 overruns:0 frame:165
TX packets:36797914598 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3198464811000 (2.9 TiB)  TX bytes:22640130397766 (20.5 TiB)
Interrupt:16 Memory:f7ec0000-f7ee0000

Testing from Linux

On Linux, the -M, -s and -c flags will be used. The -M tells ping to NOT fragment, the -s sets the packet size and -c sets the number of pings to send. Assuming a MTU setting of 9000, subtract 28 to get the packet size to use, the command will be:

ping REMOTE_HOSTNAME -c 10 -M do -s 8972

If the MTU sizes don’t match the ping command will return “Packet needs to be fragmented by DF set”.

[root@u12 log]# ping -c 10 -M do -s 8972 t10
PING t10.citrusleaf.local (192.168.105.80) 8972(8820) bytes of data.
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)
From u12.citrusleaf.local (192.168.120.112) icmp_seq=1 Frag needed and DF set (mtu = 1500)

Testing from Windows

On Windows the flags -f and -l will be used; -f flag tells ping to NOT fragment the packets and the -l sets the packets size. Assuming a MTU setting of 9000, subtract 28 to get the packet size to use, the command will be:

ping REMOTE_HOSTNAME -f -l 8972

If MTU sizes don’t match you will get “Packet needs to be fragmented by DF set” instead of the normal ping output.

C:\Users\citrusleaf>ping t1 -f -l 8972
Pinging t1.citrusleaf.local [192.168.105.71] with 8972 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.105.71:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),