hosts解析出错
我在hosts文件配置如下
[root@snd ~]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
我在命令行上ping locahost,本来应该显示127.0.0.1的,但是显示确实如下的结果,显示网卡上某个ip地址返回的信息
[root@snd ~]#ping localhost
PING localhost (220.250.64.225) 56(84) bytes of data.
64 bytes from 220.250.64.225: icmp_seq=1 ttl=247 time=30.3 ms
64 bytes from 220.250.64.225: icmp_seq=2 ttl=247 time=30.3 ms
64 bytes from 220.250.64.225: icmp_seq=3 ttl=247 time=30.5 ms
64 bytes from 220.250.64.225: icmp_seq=4 ttl=247 time=30.2 ms
64 bytes from 220.250.64.225: icmp_seq=5 ttl=247 time=30.3 ms
64 bytes from 220.250.64.225: icmp_seq=6 ttl=247 time=30.2 ms
这导致我的tomcat启动没法成功。
本来应该返回如下的结果,这样就没问题
[root@snd ~]# ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.036 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.035 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.033 ms
host.conf 内容如下
[root@snd ~]#cat /etc/host.conf
multi on
各位高手,帮我看看,按照我的hosts的配置,ping localhost,返回的为啥不是127.0.0.1啊,快救救我啊