askmara man page

askmara — do simple dns queries


askmara queries the user-specified dns server for records, and outputs the reply in a csv2-compatible format (csv2 is the format of zone files that maradns uses).


askmara [-n] [ -v | -t timeout] query [ server ]


If this is present, the following argument is the askmara timeout, in seconds. Note that askmara can not both have a user-defined timeout and verbose output.
If this is set, askmara will verbosely output the complete reply that the server sent. Note that this verbose output is not csv2-compatible.
If this is set, askmara, when sending out a query, will not request DNS recursion; in other words, askmara will request that the remote DNS server not contact other DNS servers to answer the query in question.
dns record to be queried. The query has two sections: The type of record we desire, and the hostname we want this record for.

The type of query can have two forms: A one-letter mnemonic, or a numeric rtype followed by a colon. This is immediately concatenated by the full name of the host name we wish to look up.

For example, to ask for the IP of '', we can use the one-letter mnemonic, in the form '', or we can use the numeric RR followed by a colon, giving the query '' (since A has the record type of one). Note that the query name needs the trailing dot at the end.

Askmara supports a handful one-letter mnemonics, as follows:

A signifies a request for an A (ipv4 address) RR

N signifies a NS RR

C signifies that we are asking for a CNAME RR

S signifies that we want a SOA RR

P signifies that we want a PTR RR

@ signifies that we mant a MX RR

T signifies that we want a TXT RR

Z signifies that we want to ask for all RRs.

IP address of the dns server to be queried. If no server is given, askmara will query


Asking the server with the ip for the IP address of


Asking the server with the ip for the IP address of


Asking the server with the ip address for the IP address of, using the rr_number:query format:


Asking the server with the ip address for a SRV record. In particular, we ask for the "http over tcp" service for Since askmara doesn't have a mnemonic for SRV record types, we use the numeric code (33 for SRV):


Asking the server with the ip address for the AAAA (ipv6 ip) record for


Note that the output will be a raw DNS packet in both the SRV and AAAA examples.


When askmara is asked for an SOA record, the output of askmara closely resembles the format of a csv2 file, but can not be parsed as a csv2 file without modification.

askmara outputs multi-chunk ("character-string") TXT records incorrectly (it only outputs the first chunk).

See Also



MaraDNS is written by Sam Trenholme. Jaakko Niemi used 5 minutes to roll this manpage together, which Sam has subsequently revised.


askmara January 2002 askmara