How To Change MTU Value Of Network Interface In Linux
MTU (Maximum Transmission Unit) is related to TCP/IP networking which refers to the size (in bytes) of the largest datagram that can be pass at a time.
We can see current MTU value as below :
$ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0F:EA:91:04:07
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20f:eaff:fe91:407/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:141567 errors:0 dropped:0 overruns:0 frame:0
TX packets:141306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:101087512 (96.4 MiB) TX bytes:32695783 (31.1 MiB)
Interrupt:18 Base address:0xc000
OR
$ip link list
1: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0f:ea:91:04:07 brd ff:ff:ff:ff:ff:ff
i.e. current MTU value is 1500 , now we need to change it to 1300, then do the following steps
# ifconfig eth0 mtu 1300
OR
# ip link set dev eth0 mtu 1300
and verify values by ifconfig or ip link list commands.
To make the setting permanent for eth0, edit the configuration file:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=00:0F:EE:70:01:02
IPADDR=192.168.1.115
NETMASK=255.255.255.0
NETWORK=192.168.1.0
MTU=1300
ONBOOT=yes
TYPE=Ethernet
That`s it , you are done with this.
Cheers !!
AJ
We can see current MTU value as below :
$ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0F:EA:91:04:07
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20f:eaff:fe91:407/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:141567 errors:0 dropped:0 overruns:0 frame:0
TX packets:141306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:101087512 (96.4 MiB) TX bytes:32695783 (31.1 MiB)
Interrupt:18 Base address:0xc000
OR
$ip link list
1: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0f:ea:91:04:07 brd ff:ff:ff:ff:ff:ff
i.e. current MTU value is 1500 , now we need to change it to 1300, then do the following steps
# ifconfig eth0 mtu 1300
OR
# ip link set dev eth0 mtu 1300
and verify values by ifconfig or ip link list commands.
To make the setting permanent for eth0, edit the configuration file:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=00:0F:EE:70:01:02
IPADDR=192.168.1.115
NETMASK=255.255.255.0
NETWORK=192.168.1.0
MTU=1300
ONBOOT=yes
TYPE=Ethernet
That`s it , you are done with this.
Cheers !!
AJ
Comments
Post a Comment