Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

DNS (dns)

Reached from

Lower layerSelectorValue
udpdst_port / src_port53 (0x0035)

Fields

FieldTypeDefaultAutoDescription
iduint(16)4660Query identifier, copied into the response.
qrenum(1)0 (query)Query (0) or response (1).
opcodeenum(4)0 (query)Kind of query (0 = standard query, 4 = NOTIFY, 5 = UPDATE).
aauint(1)0Authoritative answer flag.
tcuint(1)0Truncation flag.
rduint(1)1Recursion desired flag.
rauint(1)0Recursion available flag.
zuint(1)0Reserved bit (must be 0).
aduint(1)0Authentic data flag (DNSSEC).
cduint(1)0Checking disabled flag (DNSSEC).
rcodeenum(4)0 (no_error)Response code (0 = NOERROR, 3 = NXDOMAIN, …).
qdcountuint(16)1Number of entries in the question section.
ancountuint(16)0Number of resource records in the answer section.
nscountuint(16)0Number of resource records in the authority section.
arcountuint(16)0Number of resource records in the additional section.
sectionsbytes — rest of the PDU07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01Question / answer / authority / additional sections (length-prefixed label names); opaque octets.

qr

ValueName
0query
1response

opcode

ValueName
0query
1iquery
2status
4notify
5update

rcode

ValueName
0no_error
1format_error
2server_failure
3nx_domain
4not_implemented
5refused

Constraints

LevelRule
warningz = 0
warningheader and payload at most 512 octets

Sample templates

  • dns-query — templates/protocols/app/dns-query.wpg.yaml
  • dns-response — templates/protocols/app/dns-response.wpg.yaml