How to temporarily change the mtu of an interface in Linux

Home > Search > How-to
  by

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
. . .

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments