调整配置文件
[root@localhost ~]# cd /etc/sysconfig/network-scripts/ [root@localhost network-scripts]# ls ifcfg-ens33 [root@localhost network-scripts]# vi ifcfg-ens33
TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" #BOOTPROTO="dhcp" # 设置静态IP BOOTPROTO="static" 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="ens33" UUID="e6783344-8348-4c7e-9cca-3f07360b567a" DEVICE="ens33" ONBOOT="yes" # 设置IP地址 PREFIX=24 IPADDR=192.168.1.80 GATEWAY=192.168.1.1 NETMASK=255.255.255.0 DNS1=192.168.1.1