<<< Back to the Linux Tips Index

6th October 2016

Jumbo Frames

The size of an IP frame determines how much data can get into a given packet.

Typical sizes for an Ethernet network are 1500 (the official maximum for Ethernet) and 9000. 9000-byte frames are quite large, and are commonly called "Jumbo Frames". Some internet devices may have other MTU sizes.

A small frame size means that you'll need to send lots of packets, and there is an overhead with that - each frame repeats a lot of the same information in its header: source IP and port, destination IP and port, and so on. So setting a bigger frame size means that more actual data can be transmitted, and less of the metadata, in the same amount of time.

However, if devices in between the sender and recipient are using a smaller frame size, then the remainder of the packet may be lost.

In the following example, the letters, "D", "A", "T" and "A" each represent 1500 bytes of valid data, so "D A T A" is 9000 bytes, the size of a "Jumbo Frame".

Here, "DATA" gets sent, but only the first 25% gets through the router. The "ATA" is lost, so when the recipient gets the packet, it is an apparently-valid packet, but it only contains the "D", without the trailing "ATA". The "ATA" was dropped by the router because it didn't know that there was another 3 characters of data in the packet.

MTU 9000 -> MTU 1500 -> MTU 9000

This is not a bug in the router - Ethernet frames are only meant to be 1500 bytes, and this one was 4 times the length it was supposed to be. So yes, the extra 75% got lost, because, according to the standards, it shouldn't have been there.

But so long as your devices can all agree on a larger MTU size, you can set it as follows:

Red Hat / CentOS / OEL / Scientific Linux

  1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 (or ifcfg-eth2, or ifcfg-enp2s0, etc)
  2. Change (or add) the MTU line:
  3. Restart the network interface:
    sudo ifdown eth0 ; sudo ifup eth0
    Alternatively, sudo service network restart

Sample of /etc/sysconfig/network-scripts/ifcfg-eth0:


Debian / Ubuntu / etc

  1. Edit /etc/network/interfaces
  2. Add a line to the stanza for your network adapter:
    mtu 9000
  3. Restart the network interface:
    sudo ifdown eth0 ; sudo ifup eth0
    Alternatively, sudo service network restart

Sample section from /etc/network/interfaces:

iface eth0 inet static
mtu 9000


It is important to test the connectivity having set up the interfaces. To do this, the "ping -s" switch is useful. A standard Ping packet has the normal 8 bytes of ICMP headers, plus 56 bytes of "data", making a 64-byte packet. This will work on a 1500-byte network, or a 9000-byte network, so it is not a good enough test. With "ping -s 3000" you can generate a 3008-byte packet (3000 bytes of "data" plus the 8-byte header), up to "ping -s 8992" to create a 9000-byte packet, which should be able to traverse a Jumbo Frames network completely.

If either side, or some device between, is wrongly configured, then this test will fail. And, of course, any actual applications, since they are likely to want to send more than 1500 bytes at a time (after all, that is why you're enabling Jumbo Frames!), will fail. You should see a successful ping all the way up to (MTU-8) bytes:

[root@jumbo] # ping -s 8992
PING ( 8992(9000) bytes of data.
9000 bytes from icmp_seq=1 ttl=64 time=0.585 ms
9000 bytes from icmp_seq=2 ttl=64 time=0.323 ms
9000 bytes from icmp_seq=3 ttl=64 time=0.319 ms
--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2893ms
rtt min/avg/max/mdev = 0.319/0.409/0.585/0.124 ms

Top Tip:

MTU stands for Maximum Transmission Unit; that is, it's the biggest amount of data that will be put into a single packet before the system creates a further packet for the rest of the data.


Invest in your career. Buy my Shell Scripting Tutorial today:


Steve Parker - Linux / DevOps Consultant
Share on Twitter Share on Facebook Share on LinkedIn Share on Identi.ca Share on StumbleUpon