Basic DNS Tools
FreeBSD includes several tools for inspecting DNS information. Since most DNS runs over UDP (User Datagram Protocol, see Chapter 6), you cannot use telnet to manually query a server as we will do with email and web services later. Your only access to live DNS information is through host(1) and dig(1).
The host(1) Command
Use host(1) for a quick forward DNS check (finding the IP address of a known hostname). For example, to check my publisher's web page, I do the following:
host www.nostarch.comwww.nostarch.com has address 188.8.131.52
This is perhaps the simplest DNS query you can have: "Here's a hostname, what's its IP address?" Other seemingly simple queries generate more complicated results.
host www.cnn.comwww.cnn.com is ...