1.打开配置信息:vi /etc/sysconfig/network-scripts/ifcfg-ens33
配置信息如下:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
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=76f0ec41-7f00-4ae9-8224-39e7786e1a2b
DEVICE=ens33
ONBOOT=yes?? ??? ?(改yes)
IPADDR=192.168.100.131?? ??? ?(根据自己的情况改)
GATEWAY=192.168.100.2?? ??? ?
NETMASK=255.255.255.0
DNS1=192.168.100.2
2.配置好重启网卡:service network restart