blog.up-link.ro android bsd linux unix & open-source world

24May/100

How To change MTU size under FreeBSD and Linux

WP Greet Box icon
Hello there! If you are new here, you might want to subscribe to the RSS feed or subscribe via E-mail for updates on this topic.

The maximum transmission unit (MTU) of a layer of a communications protocol is the size (in bytes) of the largest protocol data unit that the layer can pass onwards.

1. Changing the MTU size with ifconfig tool

In order to change the MTU size, use ifconfig as follows:

ifconfig [Interface] mtu [SIZE] up
ifconfig eth0 mtu 1500 up

NOTE: This will only work if supported by both the network interface card and the network components such as switch.

2. Changing the MTU size permanently under CentOS / RHEL / Fedora Linux

Edit /etc/sysconfig/network-scripts/ifcfg-eth0, enter

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

Add MTU, settings:

MTU="1500"
IPV6_MTU="1500"

Save and close the file.

Restart the network:

service network restart

3. Changing the MTU size permanently under Debian and Ubuntu Linux

Edit /etc/network/interfaces, enter:

vi /etc/network/interfaces

Add mtu as follows for required interface:

mtu 1500

Save and close the file. Restart the network, enter:

/etc/init.d/networking restart

4. Changing the MTU size permanently under FreeBSD

Set MTU settings by editing /etc/rc.conf file:

vi /etc/rc.conf

Modify interface xl0 as follows, enter:

ifconfig_xl0="inet x.x.x.x netmask y.y.y.y mtu 1500"

Save and close the file. Restart the network:

/etc/rc.d/netif restart

5. Changing the MTU size permanently (other Linux distros) using rc.local

Edit /etc/rc.local and add the following line:

/sbin/ifconfig eth0 mtu 1500 up
Print This Post Print This Post
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


*

No trackbacks yet.