You know the Spiel: you're looking at a logfile containing BIND's querylog output, and you think: what do those flags really mean? Here's a sample logfile entry:

client 192.168.117.234#53311: view authoritative: query: example.org IN NS -EDC (192.168.36.217)

As usual, the best documentation is the source code. I extracted this snippet from bin/named/query.c for your pleasure. :-)

ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
      level, "query: %s %s %s %s%s%s%s%s%s (%s)", namebuf,
      classname, typename, WANTRECURSION(client) ? "+" : "-",
      (client->signer != NULL) ? "S": "",
      (client->opt != NULL) ? "E" : "",
      ((client->attributes & NS_CLIENTATTR_TCP) != 0) ?
             "T" : "",
      ((extflags & DNS_MESSAGEEXTFLAG_DO) != 0) ? "D" : "",
      ((flags & DNS_MESSAGEFLAG_CD) != 0) ? "C" : "",
      onbuf);

Non capiche? Ok, I'll translate. It starts off with the client's IP address and port number. Then comes "query" and the name that was queried, the class (IN) and type (NS). The flags indicate whether recursion was requested (+) or not (-), if the request was signed (S), whether EDNS0 was enabled (E), DNSSEC was requested (D) or if the CD (checking disabled) flag was in use (C). And finally, if the connection arrived over TCP, a T is indicated. The default is UDP which is not otherwise mentioned. [Flags missing means they weren't set.] And last, in parenthesis, the client's destination address (i.e. the address of the name server).

Flattr this
DNS, BIND, and named :: 22 Feb 2011 :: e-mail

Comments

blog comments powered by Disqus