[root@node01 ~]# ping www.baidu.com
ping: www.baidu.com: Name or service not known
需要配置dns服务器
解决
vim /etc/sysconfig/network-scripts/ifcfg-ens33
添加
DNS1=8.8.8.8
DNS2=114.114.114.114
重启网卡
service network restart
成功
[root@node01 ~]# ping www.baidu.com
PING www.a.shifen.com (39.156.66.18) 56(84) bytes of data.
64 bytes from 39.156.66.18 (39.156.66.18): icmp_seq=1 ttl=128 time=42.8 ms
参考:https://blog.csdn.net/weixin_41045798/article/details/88694878