CentOS 连不上网

[root@localhost yum.repos.d]# nmcli connection show
名称  UUID                                  类型            设备 
eth0  30ef1c27-a021-4c98-b0e6-f2bcecc3a05e  802-3-ethernet  eth0 
[root@localhost yum.repos.d]# nmcli con mod eth0 ipv4.dns "172.21.120.200   114.114.114.114"
[root@localhost yum.repos.d]# nslookup baidu.com
-bash: nslookup: 未找到命令
[root@localhost yum.repos.d]# ping baidu.com
ping: baidu.com: 未知的名称或服务
[root@localhost yum.repos.d]# nmcli con up eth0
成功激活的连接(D-Bus 激活路径:/org/freedesktop/NetworkManager/ActiveConnection/2)
[root@localhost yum.repos.d]# ping baidu.com
PING baidu.com (180.149.132.47) 56(84) bytes of data.
64 bytes from 180.149.132.47 (180.149.132.47): icmp_seq=1 ttl=52 time=204 ms
64 bytes from 180.149.132.47 (180.149.132.47): icmp_seq=2 ttl=52 time=16.1 ms

你可能感兴趣的:(CentOS 连不上网)