Hi guys,
I found this two commands have not much difference to find domain ip address and name, so just wondering what exactly the difference and when we are using it.
thanks guys
I found this two commands have not much difference to find domain ip address and name, so just wondering what exactly the difference and when we are using it.
Code:
[master@au.com ~]$ nslookup localhost
Server: 192.168.1.254
Address: 192.168.1.254#53
Non-authoritative answer:
Name: localhost
Address: 127.0.0.1
[master@au.com ~]$ dig localhost
; <<>> DiG 9.5.1-P2-RedHat-9.5.1-2.P2.fc10 <<>> localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3616
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;localhost. IN A
;; ANSWER SECTION:
localhost. 0 IN A 127.0.0.1
;; Query time: 17 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Thu May 7 19:41:49 2009
;; MSG SIZE rcvd: 43
thanks guys