I need to change forever MTUon 1500. Constantly, I mean, if I reboot the system or do it service network restart, it will always be 1500.
I followed this article http://www.cyberciti.biz/faq/centos-rhel-redhat-fedora-debian-linux-mtu-size/
But unfortunately this does not work for me.
Here is what I did:
check current MTU:
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP qlen 1000
Posted MTU="1500"in /etc/sysconfig/network-scripts/ifcfg-eth0:
[root@ip-xx-xx-xxx~]
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
PERSISTENT_DHCLIENT=yes
IPV6_MTU="1500"
MTU="1500"
Then check again MTU(no luck):
root@ip-xx-xx-xxx ~]
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
[ OK ]
[root@ip-xx-xx-xxx ~]
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP qlen 1000
/sbin/ifconfigchanged MTUbut only temporarily
[root@ip-xx-xx-xxx ~]
[root@ip-xx-xx-xxx ~]
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
If I restart network, it will again be 9001:
[root@ip-xx-xx-xxx ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
[ OK ]
[root@ip-10-0-1-135 ~]# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP qlen 1000