Skip to main content

CHANGING MTU VALUE FOR UBUNTU/CENTOS

MTU is the maximum transmission unit.It is the size of the largest datagram that can be transmitted through a given network. Any messages larger than the MTU are divided into smaller packets before being sent.In some cases we have to increase MTU value for enabling jumbo frames

UBUNTU
Command:
#ifcfg eth0 mtu 2000

Configuration file:
#vi /etc/network/interfaces

iface eth0 inet static
address 192.168.0.1
network 192.168.0.0
gateway 192.168.0.254
netmask 255.255.255.0
mtu 2000

Restart service
#/etc/init.d/networking restart

To view MTU value
#ifconfig eth0 | grep MTU

CENTOS
Command:
#ifcfg eth0 mtu 1492

Configuration file:
#vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.1.23
MTU 2000

Restart service
# /etc/init.d/network restart

To view MTU value
#ifconfig eth0 | grep MTU


Note:if ifconfig command is not available you can install net-tools package in ubuntu/centos for it.