3

We have some Red Hat servers, cluster servers for a mabri cluster.

A few questions:

  1. Which Linux command prints the current MTU value? We have not yet configured MTU in the ifcfg file)

  2. What is the default MTU value (assuming that we installed the Red Hat machine from an ISO image)

  3. In which cases do we need to use high MTU values and what is the maximum value?

  4. What is the formula to calculate the MTU?

Matthias Braun
  • 7,797
  • 7
  • 45
  • 54
yael
  • 12,598
  • 51
  • 169
  • 303

1 Answers1

8

In my opinion the question should not be "How to know ...if"; it is more suitable asking "When should I setup Jumbo frames".

As per your questions about MTU/Jumbo frames:

  1. To see your MTU, either ifconfig or ip do:

    $ ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.249 netmask 255.255.255.0 broadcast 192.168.1.255 ether 00:0c:29:40:68:ee txqueuelen 1000 (Ethernet) RX packets 50182 bytes 22054712 (21.0 MiB) RX errors 0 dropped 3 overruns 0 frame 0 TX packets 6674 bytes 838613 (818.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Or with ip:

$ ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:40:68:ee brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.249/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever

Or more simply:

$ ip link show eth0 | grep mtu
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
  1. Normally in IPv4, the default is MTU being 1500 (bytes).

3 and 4)

Usually the default MTU is fine. Rarely you have to change it for lower, temporarily, when dealing with communications problems, when firewalls are blocking ICMP packets which do not allow MTU to be negotiated.

The other situation you may wish to change MTU is for defining JUMBO frames.

However, you do not benefit alway of using JUMBO frames, only in specific cases like a dedicated VLAN of file servers or maybe DB servers, and on top of that, in a VLAN with JUMBO frames ALL the machines have to be configured for JUMBO frames; the switches also have to support JUMBO frames.

You surely do not want to use JUMBO frames for Internet facing systems, like web servers or DNS servers.

For setting in run time an interface for JUMBO frames:

ip link set eth0 mtu 9000

Or in /etc/network/interfaces (in Debian) for making it permanent:

auto eth0
iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    mtu 9000

For RH based systems:

Do vi /etc/sysconfig/network-scripts/ifcfg-eth0

and add:

MTU="9000"
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227