服务器虚拟机ping不通百度,未知的名称或服务,解决方法
ping不通百度,未知的名称或服务解决方法route添加一条路由,需要先安装net-tools工具包[root@localhost ~]# yum install net-tools -y[root@localhost ~]# route -nKernel IP routing tableDestinationGatewayGenmaskFlags Metric RefUse Iface192.1
·
ping不通百度,未知的名称或服务
解决方法
route添加一条路由,需要先安装net-tools工具包
[root@localhost ~]# yum install net-tools -y
[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp3s0
[root@localhost ~]# route add default gw 192.168.1.1
[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 enp3s0
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp3s0
成功解决
[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (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 ms
64 bytes from 220.181.38.149 (220.181.38.149): icmp_seq=2 ttl=49 time=2.64 ms
^C
--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 2.647/3.193/3.739/0.546 ms
更多推荐
已为社区贡献2条内容
所有评论(0)