I'd warn you not not to do it unless you are really certain, that this is what you really want (like having two servers directly connected by cross-over cable over Gigabit Ethernet interfaces).
There's already PMTUD algorithm, which is able to deduce MTU size across the path. And when rising MTU above that you'll either experience some packet loss or will make network-administrating guys sad, because their routers and switches will have to fragment your packets using CPU as opposed to fast routing with ASICs.
If that's what you want, then you may want to see http://wiki.archlinux.org/index.php/Jumbo_Frames, which has some nice numbers and hints. The basic command is ip link set mtu 4000 dev eth0 (or ifconfig eth0 mtu 4000 for older ifconfig tool) for 4K packets.
I'd warn you not not to do it unless you are really certain, that this is what you really want (like having two servers directly connected by cross-over cable over Gigabit Ethernet interfaces).
There's already PMTUD algorithm, which is able to deduce MTU size across the path. And when rising MTU above that you'll either experience some packet loss or will make network-administrating guys sad, because their routers and switches will have to fragment your packets using CPU as opposed to fast routing with ASICs.
If that's what you want, then you may want to see http://wiki.archlinux.org/index.php/Jumbo_Frames, which has some nice numbers and hints. The basic command is
ip link set mtu 4000 dev eth0
(orifconfig eth0 mtu 4000
for older ifconfig tool) for 4K packets.Changing the MTU size with ifconfig command
In order to change the MTU size, use /sbin/ifconfig command as follows:
Changing the MTU size permanently under CentOS / RHEL / Fedora Linux
Add MTU, settings:
Save and close the file. Restart networking:
Note for IPV6 set dedicated MTU as follows:
Changing the MTU size permanently under Debian / Ubuntu Linux
Edit /etc/network/interfaces, enter:
Add mtu as follows for required interface:
Save and close the file. Restart the networking, enter:
Changing the MTU size permanently (other Linux distros)
Edit /etc/rc.local and add the following line:
Assuming you mean MTU (Maximum Transmission Unit), check out this article: http://www.debianhelp.co.uk/mtu.htm (should be similar across Linuxen)
I think it's in the
area. There will be 'iface' entries. Locate your interface and change the mtu line (or add one at the end if there is none).
Just remember that this is not magic. If you increase the MTU too much, you will have network problems.
To check without 'burning' the configuration into your /etc files, you can try
where, eth0 is your interface name. This change will be lost on reboot.