vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0c:29:05:45:a8
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.0.63
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=114.114.114.114
保存退出后重启网卡服务
# systemctl restart netword
网友评论