To send DNS queries, just pass in the domain you want to query as a command-line argument.
By default, dog will request A records.
Specifying record types
You can request other types of record, such as MX or AAAA, by including an all-caps argument.
dog example.com MX
You can specify which DNS server the request should be sent to by prefixing an argument with the “
dog example.com @22.214.171.124
The DNS protocol actually has support for different classes of networked computers.
By default, DNS requests are queried with the
IN (Internet) class, but there’s also
CH (Chaosnet), an early network, and
HS (Hesiod), an alternate naming system.
To use any of these three, pass them as command-line arguments.
There are no record types called
CH, so this is unambiguous.
dog example.com CH
This command-line syntax was picked because it’s easy to type on a whim. However, if you’re using dog as part of an automated script, or you want to be less ambiguous, there are long-form versions of the above:
--queryoptions specify domains to query.
--typeoptions specify record types.
--classoptions specify DNS classes.
--nameserveroptions specify DNS servers to send requests to.
dog -q example.com -t A -n 126.96.36.199