涉及到三个配置文件,分别是:
1. /etc/sysconfig/network
2. /etc/sysconfig/network-scripts/ifcfg-eth0
3. /etc/resolv.conf
首先修改/etc/sysconfig/network 如图:
然后修改/etc/sysconfig/network-scripts/ifcfg-eth0 如图:
最后 service network restart 重启网卡就OK了
https://jingyan.baidu.com/article/ff42efa9d58ae4c19e2202a1.html