Linux Fundamentals - How to temporarily change the mtu of an interface in Linux

by
Jeremy Canfield |
Updated: September 19 2023
| Linux Fundamentals articles
The ip address set command can also be used to change the mtu. In this example, eth0 is set to send frames up to 9000 bytes.
[root@server1 ~]# ip address set mtu 9000 dev eth0
The ip address command can be used to view the mtu. The ip address command is commonly shortened, to ip addr or ip a.
[root@server1 ~]# ip address
. . .
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP) mtu 9000 qdisc pfifo_fast state UP qlen 1000
. . .
The ifconfig command can be used to change the maximum transmission unit (mtu), typically to send jumbo frames.
[root@server1 ~]$ ifconfig eth0 mtu 7000
The ifconfig command without any options will display information about the active interfaces being used. The -a (all) option can be used to display information about active and inactive interfaces.
[root@server1 ~]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 7000
. . .
Did you find this article helpful?
If so, consider buying me a coffee over at