vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
NAME=ens33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.42.230
NETMASK=255.255.255.0
GATEWAY=192.168.42.2
DNS1=8.8.8.8
NM_CONTROLLED=no
# 禁用networkmanager 与network 冲突;解决挂起后重启,IP改变
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
网友评论