centos7沒有eth0解決方法
阿新 • • 發佈:2019-02-03
su
cd /etc/sysconfig/network-scripts/
把ifcfg-xxx重新命名成 ifcfg-eth0
vi ifcfg-eth0
參照如下修改,沒有的補上
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
IPADDR=192.168.18.100
NETMASK=255.255.255.0
PREFIX=24
GATEWAY=192.168.18.2
DNS1=192.168.18.2
DNS2=144.144.144.144
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
DEVICE=eth0
UUID=544910dd-bfa3-4b0e-9ca6-4c1d6b03712f # or HWADDR
ONBOOT=yes
儲存,重啟網絡卡
systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl restart network