Today, in the development of colleagues, the intranet can not access their own servers through the domain name! And then did the following tests to discover the problem:
[Root@itmop ~]# Ping www.downcc.com
Ping:unknown Host Www.downcc.com
[Root@itmop ~] #ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) bytes of data.
Bytes from 192.168.1.1:icmp_seq=1 ttl=64 time=0.537 ms
Bytes from 192.168.1.1:icmp_seq=2 ttl=64 time=0.430 ms
-192.168.1.1 Ping statistics-
2 packets transmitted, 2 received, 0% packet loss, time 999ms
RTT Min/avg/max/mdev = 0.430/0.483/0.537/0.057 ms
[Root@itmop ~] #cat/etc/host.conf
Order Bind,hosts
After a search after the solution, the reasons and methods are as follows:
[Root@itmop ~]# grep host/etc/nsswitch.conf
#hosts: DB Files Nisplus NIS DNS
Hosts:files
Host only find files do not go to DNS, it should be hosts:files DNS!