
64
|
Chapter 3: The Domain Name System
Address: 64.233.167.99#53
Default server: google.com
Address: 64.233.187.99#53
Default server: google.com
Address: 72.14.207.99#53
The host subcommmand provides a simple utility for performing lookups. When no
arguments or options are given, host prints a short summary of its command-line
arguments and options. People use it primarily to convert names to IP addresses and
vice versa. Here’s an example:
> host centralsoft.org
centralsoft.org has address 70.253.158.42
When you put host in verbose mode with the -v option, it provides information simi-
lar to the dig command:
> host -v centralsoft.org
Trying "centralsoft.org"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43756
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;centralsoft.org. IN A
;; ANSWER SECTION:
centralsoft.org. 86400 IN A 70.253.158.42
;; AUTHORITY SECTION:
centralsoft.org. 29437 IN NS server1.centralsoft.org.
Received 71 bytes from 68.94.156.1#53 in 30 ms
This information came from the IP address 68.94.156.1, port number 53, which is
the nameserver specified in the resolv.conf file of the desktop performing the lookup.
You can use host again to find out the name of that server:
> host 68.94.156.1
1.156.94.68.in-addr.arpa domain name pointer dnsr1.sbcglobal.net.
Type exit to quit an interactive nslookup session.
You can also use named to do troubleshooting