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 has address

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 is ...

Get Absolute FreeBSD, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.