connect: network is unreachable
fix: dhclient
dhclient命令的作用是:使用动态主机配置协议动态的配置网络接口的网络参数,也支持BOOTP协议。
[root@localhost cron.d]# nmcli g
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
connected full enabled enabled enabled enabled
[root@localhost cron.d]# cd /etc/sysconfig
[root@localhost sysconfig]# cd network-scripts/
[root@localhost network-scripts]# cat *
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
DEFROUTE=yes
BOOTPROTO=static
#BOOTPROTO=dhcp
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=2ba6581b-8acc-4e84-804f-3711f958a85a
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.0.156
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
NETWORK=192.168.0.1
DNS=192.168.0.1