netstat -apn|grep
127.0.0.1:53tcp 0 0
127.0.0.1:53 0.0.0.0:* LISTEN 7674/named
udp 0 0
127.0.0.1:53 0.0.0.0:* 7674/named
cat /etc/resolv.conf
nameserver 127.0.0.1
cat /etc/nsswitch.conf |grep hosts
hosts: files dns
cat /etc/hosts
#127.0.0.1 localhost.localdomain localhost
cat /etc/host.conf
multi on
order bind,hosts
nospoof on
host localhost
localhost has address 127.0.0.1
nslookup localhost
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: localhost
Address: 127.0.0.1
dig localhost
; <<>> DiG 9.5.1-P3 <<>> localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49166
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;localhost. IN A
;; ANSWER SECTION:
localhost. 38400 IN A 127.0.0.1
;; AUTHORITY SECTION:
localhost. 38400 IN NS localhost.
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Mar 29 20:33:24 2010
;; MSG SIZE rcvd: 57
ping localhost
ping: unknown host localhost