Score:1

How to setup permanent MTU size in RHEL 7 for eth0 interface?

cn flag

I am using RHEL 7 and trying to setup permanent MTU size to 8500. Not able to find a way to set it up permanently. The server does not have dhcp.conf file in it.

I am using below command for temporary solution. But the MTU size gets reset after server reboot. If anyone has luck achieving a permanent solution please suggest.

ifconfig eth0 mtu 8500 up
Score:2
cn flag

You can either add MTU=8500 to the config file in /etc/sysconfig/network-scripts directory (as per this page on the RHEL site).

Or, I expect there's a way to do it with nmcli - nmcli con show ... will list all the options - just look through that for MTU and then use nmcli con mod to update it.

Score:0
cr flag
Don

The MTU can be changed on the fly for testing.

You can set the MTU with this command: ip link set mtu 9000 eth0

but remember to add to ifcfg file to make permanent.

Score:0
tj flag

Create /etc/dhcp/dhclient-eth0.conf and add the following lines to it

interface "eth0" {
supersede interface-mtu 1500;
}

For more details please refer to https://github.com/linux-enhancement/set_mtu.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.