ping不通百度,未知的名称或服务
解决方法
route添加一条路由,需要先安装net-tools工具包
[root@localhost ~]# yum install net-tools -y
[root@localhost ~]# route -nKernel IP routing tableDestinationGateway Genmask Flags Metric Ref Use Iface192.168.1.00.0.0.0 255.255.255.0 U100 0 0 enp3s0
[root@localhost ~]# route add default gw 192.168.1.1[root@localhost ~]# route -nKernel IP routing tableDestinationGateway Genmask Flags Metric Ref Use Iface0.0.0.0 192.168.1.10.0.0.0 UG 00 0 enp3s0192.168.1.00.0.0.0 255.255.255.0 U100 0 0 enp3s0
成功解决
[root@localhost ~]# ping PING www. (220.181.38.149) 56(84) bytes of data.64 bytes from 220.181.38.149 (220.181.38.149): icmp_seq=1 ttl=49 time=3.73 ms64 bytes from 220.181.38.149 (220.181.38.149): icmp_seq=2 ttl=49 time=2.64 ms^C--- www. ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1001msrtt min/avg/max/mdev = 2.647/3.193/3.739/0.546 ms