http://blog.csdn.net/aman1111/article/details/48224585
centos7无法自动识别网卡需要自己配置HWADDR=00:15:5D:03:03:D9
静态IP配置
文件 /etc/sysconfig/network-scripts/ifcfg-eth0 内容
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=79fa9776-14f5-4270-b477-e29a132eddbf
DEVICE=eth0
ONBOOT=yes
IPADDR=45.36.36.212
GATEWAY=45.36.36.1
NETMASK=255.255.255.0
HWADDR=00:15:5D:03:03:D9
** DNS配置
复制到指定位置 不要之写
修改 /etc/NetworkManager/NetworkManager.conf 文件,在main部分添加 “dns=none” 选项:
[main] plugins=ifcfg-rh dns=none
NetworkManager重新装载上面修改的配置 # systemctl restart NetworkManager.service手工修改 /etc/resolv.conf
nameserver 114.114.114.114 nameserver 8.8.8.8
网友评论