我需要永久性地将MTU更改为1500.永久地我的意思是,如果我重新启动系统或将重新启动服务,它将始终是1500.
我遵循了这篇文章http://www.cyberciti.biz/faq/centos-rhel-redhat-fedora-debian-linux-mtu-size/
但不幸的是,它对我不起作用.
这是我做的:
检查当前的MTU:
eth0:
将MTU =“1500”添加到/ etc / sysconfig / network-scripts / ifcfg-eth0:
[root@ip-xx-xx-xxx~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
PERSISTENT_DHCLIENT=yes
IPV6_MTU="1500"
MTU="1500"
然后再次检查MTU,(没有运气):
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-xx-xx-xxx ~]# ip addr show eth0
2: eth0:
/ sbin / ifconfig改变了MTU但只是暂时的
[root@ip-xx-xx-xxx ~]# /sbin/ifconfig eth0 mtu 1500 up
[root@ip-xx-xx-xxx ~]# ip addr show eth0
2: eth0:
如果我重新启动网络,它再次是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:
最佳答案