rfc8906xml2.original.xml   rfc8906.xml 
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<?rfc compact="yes" ?> <!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc toc="yes" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- <!ENTITY rfc1033 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/refer
ence.RFC.1033.xml'> -->
<!ENTITY rfc1034 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.1034.xml'>
<!ENTITY rfc1035 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.1035.xml'>
<!ENTITY rfc2671 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.2671.xml'>
<!ENTITY rfc3225 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.3225.xml'>
<!ENTITY rfc3597 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.3597.xml'>
<!ENTITY rfc4035 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.4035.xml'>
<!ENTITY rfc5001 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.5001.xml'>
<!ENTITY rfc6840 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.6840.xml'>
<!ENTITY rfc6891 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.6891.xml'>
<!ENTITY rfc6895 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.6895.xml'>
<!ENTITY rfc7314 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.7314.xml'>
<!ENTITY rfc7766 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.7766.xml'>
<!ENTITY rfc7871 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.7871.xml'>
<!ENTITY rfc7873 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.
RFC.7873.xml'>
]>
<rfc ipr="trust200902" category="bcp" docName="draft-ietf-dnsop-no-response-issu <rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902"
e-23"> submissionType="IETF" category="bcp" consensus="true"
docName="draft-ietf-dnsop-no-response-issue-23" number="8906"
obsoletes="" updates="" xml:lang="en" symRefs="true" sortRefs="true"
tocInclude="true" version="3">
<!-- xml2rfc v2v3 conversion 2.44.0 -->
<front> <front>
<title abbrev="Failure To Communicate"> <title abbrev="Failure to Communicate">
A Common Operational Problem in DNS Servers - Failure To Communicate A Common Operational Problem in DNS Servers: Failure to Communicate
</title> </title>
<seriesInfo name="RFC" value="8906"/>
<seriesInfo name="BCP" value="231"/>
<author initials="M." surname="Andrews" fullname="M. Andrews"> <author initials="M." surname="Andrews" fullname="M. Andrews">
<organization abbrev="ISC">Internet Systems Consortium</organization> <organization abbrev="ISC">Internet Systems Consortium</organization>
<address> <address>
<postal> <postal>
<street>PO Box 360</street> <street>PO Box 360</street>
<city>Newmarket</city> <city>Newmarket</city>
<region>NH</region> <region>NH</region>
<code>03857</code> <code>03857</code>
<country>US</country> <country>United States of America</country>
</postal> </postal>
<email>marka@isc.org</email> <email>marka@isc.org</email>
</address> </address>
</author> </author>
<author initials="R." surname="Bellis" fullname="Ray Bellis"> <author initials="R." surname="Bellis" fullname="Ray Bellis">
<organization abbrev="ISC">Internet Systems Consortium</organization> <organization abbrev="ISC">Internet Systems Consortium</organization>
<address> <address>
<postal> <postal>
<street>PO Box 360</street> <street>PO Box 360</street>
<city>Newmarket</city> <city>Newmarket</city>
<region>NH</region> <region>NH</region>
<code>03857</code> <code>03857</code>
<country>US</country> <country>United States of America</country>
</postal> </postal>
<email>ray@isc.org</email> <email>ray@isc.org</email>
</address> </address>
</author> </author>
<date/> <date year="2020" month="September"/>
<abstract> <abstract>
<t> <t>
The DNS is a query / response protocol. Failing to respond The DNS is a query/response protocol. Failing to respond
to queries, or responding incorrectly, causes both immediate to queries, or responding incorrectly, causes both immediate
operational problems and long term problems with protocol operational problems and long-term problems with protocol
development. development.
</t> </t>
<t> <t>
This document identifies a number of common kinds of queries This document identifies a number of common kinds of queries
to which some servers either fail to respond or else respond to which some servers either fail to respond or respond
incorrectly. This document also suggests procedures for incorrectly. This document also suggests procedures for
zone operators to apply to identify and remediate the problem. zone operators to apply to identify and remediate the problem.
</t> </t>
<t> <t>
The document does not look at the DNS data itself, just the The document does not look at the DNS data itself, just the
structure of the responses. structure of the responses.
</t> </t>
</abstract> </abstract>
</front> </front>
<middle> <middle>
<section anchor="intro" title="Introduction"> <section anchor="intro" numbered="true" toc="default">
<t> <name>Introduction</name>
The DNS <xref target="RFC1034"/>, <xref target="RFC1035"/> <t>The DNS <xref target="RFC1034" format="default"/> <xref
is a query / response protocol. Failing to respond to target="RFC1035" format="default"/> is a query/response protocol.
queries, or responding incorrectly, causes both immediate Failing to respond to queries or responding incorrectly causes both
operational problems and long term problems with protocol immediate operational problems and long-term problems with protocol
development. development.</t>
</t>
<t> <t>
Failure to respond to a query is indistinguishable from Failure to respond to a query is indistinguishable from
packet loss without doing an analysis of query-response packet loss without doing an analysis of query-response
patterns. Additionally failure to respond results in patterns. Additionally, failure to respond results in
unnecessary queries being made by DNS clients, and unnecessary queries being made by DNS clients and
introduces delays to the resolution process. introduces delays to the resolution process.
</t> </t>
<t> <t>
Due to the inability to distinguish between packet loss and Due to the inability to distinguish between packet loss and
nameservers or middle boxes dropping EDNS <xref target="RFC6891"/> nameservers or middleboxes dropping Extension Mechanisms for DNS
(EDNS) <xref target="RFC6891" format="default"/>
queries, packet loss is sometimes misclassified as lack of EDNS queries, packet loss is sometimes misclassified as lack of EDNS
support which can lead to DNSSEC validation failures. support, which can lead to DNSSEC validation failures.
</t> </t>
<t> <t>
The existence of servers which fail to respond to queries The existence of servers that fail to respond to queries
results in developers being hesitant to deploy new standards. results in developers being hesitant to deploy new standards.
Such servers need to be identified and remediated. Such servers need to be identified and remediated.
</t> </t>
<t> <t>
The DNS has response codes that cover almost any conceivable The DNS has response codes that cover almost any conceivable
query response. A nameserver should be able to respond to query response. A nameserver should be able to respond to
any conceivable query using them. There should be no need any conceivable query using them. There should be no need
to drop queries because a nameserver does not understand to drop queries because a nameserver does not understand
them. them.
</t> </t>
<t> <t>
Unless a nameserver is under attack, it should respond to Unless a nameserver is under attack, it should respond to
all DNS requests directed to it. When a nameserver is under all DNS requests directed to it. When a nameserver is under
attack it may wish to drop packets. A common attack is to attack, it may wish to drop packets. A common attack is to
use a nameserver as an amplifier by sending spoofed packets. use a nameserver as an amplifier by sending spoofed packets.
This is done because response packets are bigger than the This is done because response packets are bigger than the
queries and large amplification factors are available especially queries and large amplification factors are available, especially
if EDNS is supported. Limiting the rate of responses is if EDNS is supported. Limiting the rate of responses is
reasonable when this is occurring and the client should reasonable when this is occurring, and the client should
retry. This however only works if legitimate clients are retry. However, this only works if legitimate clients are
not being forced to guess whether EDNS queries are accepted not being forced to guess whether or not EDNS queries are accepted. As
or not. As long as there are still a pool of servers that don't long as there is still a pool of servers that don't
respond to EDNS requests, clients have no way to know if respond to EDNS requests, clients have no way to know if
the lack of response is due to packet loss, or EDNS packets the lack of response is due to packet loss, EDNS packets
not being supported, or rate limiting due to the server being not being supported, or rate limiting due to the server being
under attack. Misclassification of server behaviour is under attack. Misclassification of server behaviour is
unavoidable when rate limiting is used until the population unavoidable when rate limiting is used until the population
of servers which fail to respond to well-formed queries of servers that fail to respond to well-formed queries
drops to near zero. drops to near zero.
</t> </t>
<t> <t>
Nameservers should respond to queries even if the queried Nameservers should respond to queries even if the queried
name is not for any name the server is configured to answer name is not for any name the server is configured to answer
for. Misconfigured nameservers are a common occurrence in the for. Misconfigured nameservers are a common occurrence in the
DNS and receiving queries for zones that the server is not DNS, and receiving queries for zones that the server is not
configured for is not necessarily an indication that the configured for is not necessarily an indication that the
server is under attack. Parent zone operators are advised server is under attack. Parent zone operators are advised
to regularly check that the delegating NS records are to regularly check that the delegating NS records are
consistent with those of the delegated zone and to correct consistent with those of the delegated zone and to correct
them when they are not <xref target="RFC1034"/>, Section 4.4.2, them when they are not (<xref target="RFC1034" sectionFormat="of" sectio
Paragraph 3. Doing this regularly should reduce the instances n="4.2.2"/>,
Paragraph 3).
Doing this regularly should reduce the instances
of broken delegations. of broken delegations.
</t> </t>
<t> <t>
This document does not try to identify all possible errors This document does not try to identify all possible errors
nor does it supply an exhaustive list of tests. nor does it supply an exhaustive list of tests.
</t> </t>
</section> </section>
<section anchor="consequences" title="Consequences"> <section anchor="consequences" numbered="true" toc="default">
<name>Consequences</name>
<t> <t>
Failure to follow the relevant DNS RFCs has multiple adverse Failure to follow the guidance in relevant DNS RFCs has multiple adverse
consequences. Some are caused directly by the non-compliant consequences. Some are caused directly by the non-compliant
behaviour and others as a result of work-arounds forced on behaviour and others as a result of workarounds forced on
recursive servers. Addressing known issues now will reduce recursive servers. Addressing known issues now will reduce
future interoperability issues as the DNS protocol continues future interoperability issues as the DNS protocol continues
to evolve and clients make use of newly-introduced DNS to evolve and clients make use of newly introduced DNS
features. In particular the base DNS specification features. In particular, the base DNS specification
<xref target="RFC1034"/>, <xref target="RFC1035"/> and the <xref target="RFC1034" format="default"/> <xref target="RFC1035" format=
EDNS specification <xref target="RFC6891"/>, when implemented, "default"/> and the
EDNS specification <xref target="RFC6891" format="default"/>, when imple
mented,
need to be followed. need to be followed.
</t> </t>
<t> <t>
Some examples of known consequences include: Some examples of known consequences include the following:
<list style="symbols"> </t>
<t> <ul spacing="normal">
<li>
The AD (Authenticated Data) bit in a response The AD (Authenticated Data) bit in a response
cannot be trusted to mean anything as some servers cannot be trusted to mean anything, as some servers
incorrectly copy the flag bit from the request to the incorrectly copy the flag bit from the request to the
response <xref target="RFC1035"/>, <xref target="RFC4035"/>. response <xref target="RFC1035" format="default"/> <xref
target="RFC4035" format="default"/>.
The use of the AD bit in requests is defined in The use of the AD bit in requests is defined in
<xref target="RFC6840"/>. <xref target="RFC6840" format="default"/>.
</t> </li>
<t> <li>
Widespread non-response to EDNS queries has led to Widespread non-response to EDNS queries has led to
recursive servers having to assume that EDNS is not recursive servers having to assume that EDNS is not
supported and that fallback to plain DNS is required, supported and that fallback to plain DNS is required,
potentially causing DNSSEC validation failures. potentially causing DNSSEC validation failures.
</t> </li>
<t> <li>
Widespread non-response to EDNS options requires Widespread non-response to EDNS options requires
recursive servers to decide whether to probe recursive servers to decide whether to probe
to see if it is the specific EDNS option or the use of to see if it is the specific EDNS option or the use of
EDNS in general that is causing the non response. In EDNS in general that is causing the non-response. In
the limited amount of time required to resolve a query the limited amount of time required to resolve a query
before the client times out this is not possible. before the client times out, this is not possible.
</t> </li>
<t> <li>
Incorrectly returning FORMERR to an EDNS option being Incorrectly returning FORMERR to an EDNS option being
present leads to the recursive server not being able present leads to the recursive server not being able
to determine if the server is just broken in the handling to determine if the server is just broken in the handling
of the EDNS option or doesn't support EDNS at all. of the EDNS option or if it doesn't support EDNS at all.
</t> </li>
<t> <li>
Mishandling of unknown query types has contributed Mishandling of unknown query types has contributed
to the abandonment of the transition of the SPF type. to the abandonment of the transition of the SPF type.
</t> </li>
<t> <li>
Mishandling of unknown query types has slowed up the Mishandling of unknown query types has slowed up the
development of DANE and resulted in additional rules development of DNS-Based Authentication of Named Entities (DANE)
and resulted in additional rules
being specified to reduce the probability of interacting being specified to reduce the probability of interacting
with a broken server when making TLSA queries. with a broken server when making TLSA queries.
</t> </li>
</list> </ul>
</t>
<t> <t>
The consequences of servers not following the RFCs will The consequences of servers not following the RFCs will
only grow if measures are not put in place to remove non only grow if measures are not put in place to remove non-compliant
compliant servers from the ecosystem. Working around issues servers from the ecosystem. Working around issues
due to non-compliance with RFCs is not sustainable. due to non-compliance with RFCs is not sustainable.
</t> </t>
<t> <t>
Most (if not all) of these consequences could have been Most (if not all) of these consequences could have been
avoided if action had been taken to remove non-compliant avoided if action had been taken to remove non-compliant
servers as soon as people were aware of them, i.e. to actively servers as soon as people were aware of them, i.e., to actively
seek out broken implementations and servers and inform their seek out broken implementations and servers and inform their
developers and operators that they need to fix their servers. developers and operators that they need to fix their servers.
</t> </t>
</section> </section>
<section anchor="query-kinds" title="Common kinds of queries that result in <section anchor="query-kinds" numbered="true" toc="default">
no or bad responses."> <name>Common Kinds of Queries That Result in No or Bad Responses</name>
<t> <t>
This section is broken down into Basic DNS requests and EDNS requests. This section is broken down into Basic DNS requests and EDNS requests.
</t> </t>
<section title="Basic DNS Queries"> <section numbered="true" toc="default">
<section anchor="existence" title="Zone Existence"> <name>Basic DNS Queries</name>
<section anchor="existence" numbered="true" toc="default">
<name>Zone Existence</name>
<t> <t>
If a zone is delegated to a server, that server should If a zone is delegated to a server, that server should
respond to an SOA query for that zone with an SOA record. respond to a SOA query for that zone with an SOA record.
Failing to respond at all is always incorrect, regardless Failing to respond at all is always incorrect, regardless
of the configuration of the server. Responding with of the configuration of the server. Responding with
anything other than an SOA record in the Answer section anything other than an SOA record in the answer section
indicates a bad delegation. indicates a bad delegation.
</t> </t>
</section> </section>
<section anchor="unknown" title="Unknown / Unsupported Type Queries"> <section anchor="unknown" numbered="true" toc="default">
<name>Unknown/Unsupported Type Queries</name>
<t> <t>
Some servers fail to respond to unknown or unsupported Some servers fail to respond to unknown or unsupported
types. If a server receives a query for a type that types. If a server receives a query for a type that
it doesn't recognise, or doesn't implement, it is it doesn't recognise, or doesn't implement, it is
expected to return the appropriate response as if it expected to return the appropriate response as if it
did recognise the type but does not have any data for did recognise the type but does not have any data for
that type: either NOERROR, or NXDOMAIN. The exceptions that type, i.e., either NOERROR or NXDOMAIN. The exceptions
to this are queries for Meta-RR types which may return to this are queries for Meta-RR types, which may return
NOTIMP. NOTIMP.
</t> </t>
</section> </section>
<section anchor="dns-flags" title="DNS Flags"> <section anchor="dns-flags" numbered="true" toc="default">
<name>DNS Flags</name>
<t> <t>
Some servers fail to respond to DNS queries with various Some servers fail to respond to DNS queries with various
DNS flags set, regardless of whether they are defined or DNS flags set, regardless of whether they are defined or
still reserved. At the time of writing there are servers still reserved. At the time of writing, there are servers
that fail to respond to queries with the AD flag set to 1 that fail to respond to queries with the AD flag set to 1
and servers that fail to respond to queries with the last and servers that fail to respond to queries with the last
reserved flag set. reserved flag set.
</t> </t>
<t> <t>Servers should respond to such queries. If the server does not
Servers should respond to such queries. If the server does know the meaning of a flag, it must not copy it to the response
not know the meaning of a flag it must not copy it to the (<xref target="RFC1035" sectionFormat="of" section="4.1.1"/>). If
response <xref target="RFC1035"/> Section 4.1.1. If the server the server does not understand the meaning of a request, it should
does not understand the meaning of a request it should reply reply with a FORMERR response with unknown flags set to zero.</t>
with a FORMERR response with unknown flags set to zero. <section anchor="recursion" numbered="true" toc="default">
</t> <name>Recursive Queries</name>
<section anchor="recursion" title="Recursive Queries">
<t> <t>
A non-recursive server is supposed to respond to recursive A non-recursive server is supposed to respond to recursive
queries as if the RD bit is not set <xref target="RFC1034"/>. queries as if the Recursion Desired (RD) bit is not set <xref
target="RFC1034" format="default"/>.
</t> </t>
</section> </section>
</section> </section>
<section anchor="opcode" title="Unknown DNS opcodes"> <section anchor="opcode" numbered="true" toc="default">
<name>Unknown DNS Opcodes</name>
<t> <t>
The use of previously undefined opcodes is to be expected. The use of previously undefined opcodes is to be expected.
Since the DNS was first defined two new opcodes have been Since the DNS was first defined, two new opcodes have been
added, UPDATE and NOTIFY. added, UPDATE and NOTIFY.
</t> </t>
<t> <t>
NOTIMP is the expected rcode to an unknown or unimplemented NOTIMP is the expected rcode to an unknown or unimplemented
opcode. opcode.
</t> </t><aside>
<t> <t>
Note: while new opcodes will most probably use the current NOTE: while new opcodes will most probably use the current
layout structure for the rest of the message there is no layout structure for the rest of the message, there is no
requirement that anything other than the DNS header match. requirement that anything other than the DNS header match.
</t> </t></aside>
</section> </section>
<section anchor="tcp" title="TCP Queries"> <section anchor="tcp" numbered="true" toc="default">
<name>TCP Queries</name>
<t> <t>
All DNS servers are supposed to respond to queries over All DNS servers are supposed to respond to queries over
TCP <xref target="RFC7766"/>. While firewalls should not TCP <xref target="RFC7766" format="default"/>. While firewalls shou
block TCP connection attempts, those that do they should ld not
block TCP connection attempts, those that do should
cleanly terminate the connection by sending TCP RESET cleanly terminate the connection by sending TCP RESET
or sending ICMP/ICMPv6 Administratively Prohibited or sending ICMP/ICMPv6 Administratively Prohibited
messages. Dropping TCP connections introduces excessive messages. Dropping TCP connections introduces excessive
delays to the resolution process. delays to the resolution process.
</t> </t>
</section> </section>
</section> </section>
<section title="EDNS Queries"> <section numbered="true" toc="default">
<name>EDNS Queries</name>
<t> <t>
EDNS queries are specified in <xref target="RFC6891"/>. EDNS queries are specified in <xref target="RFC6891" format="default" />.
</t> </t>
<section anchor="edns-independent" title="EDNS Queries - Version Indepen <section anchor="edns-independent" numbered="true" toc="default">
dent"> <name>EDNS Queries: Version Independent</name>
<t> <t>
Identifying servers that fail to respond to EDNS queries Identifying servers that fail to respond to EDNS queries
can be done by first confirming that the server responds can be done by first confirming that the server responds
to regular DNS queries, followed by a series of otherwise to regular DNS queries, followed by a series of otherwise
identical queries using EDNS, then making the original identical queries using EDNS, then making the original
query again. A series of EDNS queries is needed as at query again. A series of EDNS queries is needed, as at
least one DNS implementation responds to the first EDNS least one DNS implementation responds to the first EDNS
query with FORMERR but fails to respond to subsequent query with FORMERR but fails to respond to subsequent
queries from the same address for a period until a queries from the same address for a period until a
regular DNS query is made. The EDNS query should specify regular DNS query is made. The EDNS query should specify
a UDP buffer size of 512 bytes to avoid false classification a UDP buffer size of 512 bytes to avoid false classification
of not supporting EDNS due to response packet size. of not supporting EDNS due to response packet size.
</t> </t>
<t> <t>
If the server responds to the first and last queries If the server responds to the first and last queries
but fails to respond to most or all of the EDNS queries, but fails to respond to most or all of the EDNS queries,
it is probably faulty. The test should be repeated a it is probably faulty. The test should be repeated a
number of times to eliminate the likelihood of a false number of times to eliminate the likelihood of a false
positive due to packet loss. positive due to packet loss.
</t> </t>
<t> <t>
Firewalls may also block larger EDNS responses but there Firewalls may also block larger EDNS responses, but there
is no easy way to check authoritative servers to see is no easy way to check authoritative servers to see
if the firewall is mis-configured. if the firewall is misconfigured.
</t> </t>
</section> </section>
<section anchor="edns-specific" title="EDNS Queries - Version Specific"> <section anchor="edns-specific" numbered="true" toc="default">
<name>EDNS Queries: Version Specific</name>
<t> <t>
Some servers respond correctly to EDNS version 0 queries Some servers respond correctly to EDNS version 0 queries
but fail to respond to EDNS queries with version numbers but fail to respond to EDNS queries with version numbers
that are higher than zero. Servers should respond with that are higher than zero. Servers should respond with
BADVERS to EDNS queries with version numbers that they BADVERS to EDNS queries with version numbers that they
do not support. do not support.
</t> </t>
<t> <t>
Some servers respond correctly to EDNS version 0 queries Some servers respond correctly to EDNS version 0 queries
but fail to set QR=1 when responding to EDNS versions but fail to set QR=1 when responding to EDNS versions
they do not support. Such responses may be discarded they do not support. Such responses may be discarded
as invalid (as QR is not 1) or treated as requests (when the as invalid (as QR is not 1) or treated as requests (when the
source port of the original request was port 53). source port of the original request was port 53).
</t> </t>
</section> </section>
<section anchor="edns-options" title="EDNS Options"> <section anchor="edns-options" numbered="true" toc="default">
<name>EDNS Options</name>
<t> <t>
Some servers fail to respond to EDNS queries with EDNS Some servers fail to respond to EDNS queries with EDNS
options set. The original EDNS specification left this options set. The original EDNS specification left this
behaviour undefined <xref target="RFC2671"/>, but the behaviour undefined <xref target="RFC2671" format="default"/>, but t
correct behaviour was clarified in <xref target="RFC6891"/>. he
correct behaviour was clarified in <xref target="RFC6891" format="de
fault"/>.
Unknown EDNS options are supposed to be ignored by the server. Unknown EDNS options are supposed to be ignored by the server.
</t> </t>
</section> </section>
<section anchor="edns-flags" title="EDNS Flags"> <section anchor="edns-flags" numbered="true" toc="default">
<name>EDNS Flags</name>
<t> <t>
Some servers fail to respond to EDNS queries with EDNS Some servers fail to respond to EDNS queries with EDNS
flags set. Servers should ignore EDNS flags they do not flags set. Servers should ignore EDNS flags they do not
understand and must not add them to the response <xref understand and must not add them to the response <xref target="RFC68
target="RFC6891"/>. 91" format="default"/>.
</t> </t>
</section> </section>
<section anchor="truncated-edns" title="Truncated EDNS Responses"> <section anchor="truncated-edns" numbered="true" toc="default">
<name>Truncated EDNS Responses</name>
<t> <t>
Some EDNS aware servers fail to include an OPT record when a Some EDNS-aware servers fail to include an OPT record when a
truncated response is sent. An OPT record is supposed to be truncated response is sent. An OPT record is supposed to be
included in a truncated response <xref target="RFC6891"/>. included in a truncated response <xref target="RFC6891" format="defa ult"/>.
</t> </t>
<t> <t>
Some EDNS aware servers fail to honour the advertised EDNS Some EDNS-aware servers fail to honour the advertised EDNS
UDP buffer size and send over-sized responses UDP buffer size and send oversized responses
<xref target="RFC6891"/>. Servers must send UDP responses <xref target="RFC6891" format="default"/>. Servers must send UDP re
sponses
no larger than the advertised EDNS UDP buffer size. no larger than the advertised EDNS UDP buffer size.
</t> </t>
</section> </section>
<section anchor="dobit" title="DO=1 Handling"> <section anchor="dobit" numbered="true" toc="default">
<name>DO=1 Handling</name>
<t> <t>
Some nameservers incorrectly only return an EDNS response Some nameservers incorrectly only return an EDNS response
when the DO bit <xref target="RFC3225"/> is 1 in the when the DNSSEC OK (DO) bit <xref target="RFC3225" format="default"/ > is 1 in the
query. Servers that support EDNS should always respond to query. Servers that support EDNS should always respond to
EDNS requests with EDNS responses. EDNS requests with EDNS responses.
</t> </t>
<t> <t>
Some nameservers fail to copy the DO bit to the response Some nameservers fail to copy the DO bit to the response
despite clearly supporting DNSSEC by returning an RRSIG despite clearly supporting DNSSEC by returning an RRSIG
records to EDNS queries with DO=1. Nameservers that support records to EDNS queries with DO=1. Nameservers that support
DNSSEC are expected to copy the DO bit from the request to DNSSEC are expected to copy the DO bit from the request to
the response. the response.
</t> </t>
</section> </section>
<section anchor="tcp-edns" title="EDNS over TCP"> <section anchor="tcp-edns" numbered="true" toc="default">
<name>EDNS over TCP</name>
<t> <t>
Some EDNS aware servers incorrectly limit the TCP response Some EDNS-aware servers incorrectly limit the TCP response
sizes to the advertised UDP response size. This breaks DNS sizes to the advertised UDP response size. This breaks DNS
resolution to clients where the response sizes exceed the resolution to clients where the response sizes exceed the
advertised UDP response size despite the server and the client advertised UDP response size despite the server and the client
being capable of sending and receiving larger TCP responses being capable of sending and receiving larger TCP responses,
respectively. It effectively defeats setting TC=1 in UDP respectively. It effectively defeats setting TC=1 in UDP
responses. responses.
</t> </t>
</section> </section>
</section> </section>
</section> </section>
<section title="Firewalls and Load Balancers"> <section numbered="true" toc="default">
<name>Firewalls and Load Balancers</name>
<t> <t>
Firewalls and load balancers can affect the externally Firewalls and load balancers can affect the externally
visible behaviour of a nameserver. Tests for conformance visible behaviour of a nameserver. Tests for conformance
should to be done from outside of any firewall so that the should to be done from outside of any firewall so that the
system is tested as a whole. system is tested as a whole.
</t> </t>
<t> <t>
Firewalls and load balancers should not drop DNS packets Firewalls and load balancers should not drop DNS packets
that they don't understand. They should either pass that they don't understand. They should either pass
the packets or generate an appropriate error response. the packets or generate an appropriate error response.
skipping to change at line 427 skipping to change at line 434
<t> <t>
Requests for unknown query classes are normal client behaviour Requests for unknown query classes are normal client behaviour
and should not be construed as an attack. Nameservers have and should not be construed as an attack. Nameservers have
always been expected to be able to handle such queries. always been expected to be able to handle such queries.
</t> </t>
<t> <t>
Requests with unknown opcodes are normal client behaviour Requests with unknown opcodes are normal client behaviour
and should not be construed as an attack. Nameservers have and should not be construed as an attack. Nameservers have
always been expected to be able to handle such queries. always been expected to be able to handle such queries.
</t> </t>
<t> <t>Requests with unassigned flags set (DNS or EDNS) are expected client
Requests with unassigned flags set (DNS or EDNS) are expected behaviour and should not be construed as an attack. The behaviour for
client behaviour and should not be construed as an attack. unassigned flags is to ignore them in the request and to not set them in
The behaviour for unassigned flags is to ignore them in the the response. Dropping DNS/EDNS packets with unassigned flags makes it
request and to not set them in the response. Dropping DNS difficult to deploy extensions that make use of them due to the need to
/ EDNS packets with unassigned flags makes it difficult to reconfigure and update firewalls.</t>
deploy extensions that make use of them due to the need to
reconfigure and update firewalls.
</t>
<t> <t>
Requests with unknown EDNS options are expected client Requests with unknown EDNS options are expected client
behaviour and should not be construed as an attack. The behaviour and should not be construed as an attack. The
correct behaviour for unknown EDNS options is to ignore correct behaviour for unknown EDNS options is to ignore
their presence when constructing a reply. their presence when constructing a reply.
</t> </t>
<t> <t>
Requests with unknown EDNS versions are expected client Requests with unknown EDNS versions are expected client
behaviour and should not be construed as an attack. The behaviour and should not be construed as an attack. The
correct behaviour for unknown EDNS versions is to return correct behaviour for unknown EDNS versions is to return
skipping to change at line 466 skipping to change at line 470
</t> </t>
<t> <t>
DNS, and EDNS in particular, are designed to allow clients to DNS, and EDNS in particular, are designed to allow clients to
be able to use new features against older servers without be able to use new features against older servers without
having to validate every option. Indiscriminate blocking having to validate every option. Indiscriminate blocking
of messages breaks that design. of messages breaks that design.
</t> </t>
<t> <t>
However, there may be times when a nameserver mishandles However, there may be times when a nameserver mishandles
messages with a particular flag, EDNS option, EDNS version messages with a particular flag, EDNS option, EDNS version
field, opcode, type or class field or combination thereof field, opcode, type or class field, or combination thereof
to the point where the integrity of the nameserver is to the point where the integrity of the nameserver is
compromised. Firewalls should offer the ability to selectively compromised. Firewalls should offer the ability to selectively
reject messages using an appropriately constructed response reject messages using an appropriately constructed response
based on all these fields while awaiting a fix from the based on all these fields while awaiting a fix from the
nameserver vendor. Returning FORMERR or REFUSED are two nameserver vendor. Returning FORMERR or REFUSED are two
potential error codes to return. potential error codes to return.
</t> </t>
</section> </section>
<section anchor="scrubbing" title="Packet Scrubbing Services"> <section anchor="scrubbing" numbered="true" toc="default">
<name>Packet Scrubbing Services</name>
<t> <t>
Packet scrubbing services are used to filter out undesired traffic, Packet scrubbing services are used to filter out undesired traffic,
including but not limited to, denial of service traffic. This is including but not limited to denial-of-service traffic. This is
often done using heuristic analysis of the traffic. often done using heuristic analysis of the traffic.
</t> </t>
<t> <t>
Packet scrubbing services can affect the externally visible behaviour Packet scrubbing services can affect the externally visible behaviour
of a nameserver in a similar way to firewalls. If an operator of a nameserver in a similar way to firewalls. If an operator
uses a packet scrubbing service, they should check that legitimate uses a packet scrubbing service, they should check that legitimate
queries are not being blocked. queries are not being blocked.
</t> </t>
<t> <t>
Packet scrubbing services, unlike firewalls, are also turned on Packet scrubbing services, unlike firewalls, are also turned on
and off in response to denial of service attacks. One needs and off in response to denial-of-service attacks. One needs
to take care when choosing a scrubbing service. to take care when choosing a scrubbing service.
</t> </t>
<t> <t>
Ideally, Operators should run these tests against a packet scrubbing Ideally, operators should run these tests against a packet scrubbing
service to ensure that these tests are not seen as attack service to ensure that these tests are not seen as attack
vectors. vectors.
</t> </t>
</section> </section>
<section title="Whole Answer Caches"> <section numbered="true" toc="default">
<name>Whole Answer Caches</name>
<t> <t>
Whole answer caches take a previously constructed answer Whole answer caches take a previously constructed answer
and return it to a subsequent query for the same question. and return it to a subsequent query for the same question.
However, they can return the wrong response if they do not However, they can return the wrong response if they do not
take all of the relevant attributes of the query into account. take all of the relevant attributes of the query into account.
</t> </t>
<t> <t>
In addition to the standard tuple of &lt;qname,qtype,qclass&gt; In addition to the standard tuple of &lt;qname,qtype,qclass&gt;,
a non-exhaustive set of attributes that must be considered a non-exhaustive set of attributes that must be considered
include: RD, AD, CD, OPT record, DO, EDNS buffer size, EDNS include: RD, AD, CD, OPT record, DO, EDNS buffer size, EDNS
version, EDNS options, and transport. version, EDNS options, and transport.
</t> </t>
</section> </section>
<section anchor="response" title="Response Code Selection"> <section anchor="response" numbered="true" toc="default">
<name>Response Code Selection</name>
<t> <t>
Choosing the correct response code when responding to DNS Choosing the correct response code when responding to DNS
queries is important. Response codes should be chosen queries is important. Response codes should be chosen
considering how clients will handle them. considering how clients will handle them.
</t> </t>
<t> <t>
For unimplemented opcodes NOTIMP is the expected response code. For unimplemented opcodes, NOTIMP is the expected response code.
Note: Newly implemented opcodes may change the message format by Note: newly implemented opcodes may change the message format by
extending the header, changing the structure of the records, extending the header, changing the structure of the records,
etc. Servers are not expected to be able to parse these, etc. Servers are not expected to be able to parse these
and should respond with a response code of NOTIMP rather and should respond with a response code of NOTIMP rather
than FORMERR (which would be expected if there was a parse error than FORMERR (which would be expected if there was a parse error
with an known opcode). with a known opcode).
</t> </t>
<t> <t>
For unimplemented type codes, and in the absence of other For unimplemented type codes, and in the absence of other
errors, the only valid response is NoError if the qname errors, the only valid response is NOERROR if the qname
exists, and NameError (NXDOMAIN) otherwise. For Meta-RRs exists and NXDOMAIN otherwise.
NOTIMP may be returned instead.
</t> For Meta-RRs, NOTIMP may be returned instead.
<t>
If a zone cannot be loaded because it contains unimplemented
type codes that are not encoded as unknown record types
according to <xref target="RFC3597"/> then the expected
response is SERVFAIL as the whole zone should be rejected
<xref target="RFC1035"> Section 5.2</xref>. If a zone loads then
<xref target="RFC1034"> Section 4.3.2</xref> applies.
</t> </t>
<t>If a zone cannot be loaded because it contains unimplemented type
codes that are not encoded as unknown record types according to <xref
target="RFC3597" format="default"/>, then the expected response is
SERVFAIL, as the whole zone should be rejected (<xref target="RFC1035"
sectionFormat="of" section="5.2"></xref>). If a zone loads, then <xref
target="RFC1034" sectionFormat="of" section="4.3.2"></xref> applies.</t>
<t> <t>
If the server supports EDNS and receives a query with an If the server supports EDNS and receives a query with an
unsupported EDNS version, the correct response is BADVERS unsupported EDNS version, the correct response is BADVERS
<xref target="RFC6891"/>. <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t>
If the server does not support EDNS at all, FORMERR is If the server does not support EDNS at all, FORMERR is
the expected error code. That said a minimal EDNS the expected error code. That said, a minimal EDNS
server implementation requires parsing the OPT records server implementation requires parsing the OPT records
and responding with an empty OPT record in the additional and responding with an empty OPT record in the additional
section in most cases. There is no need to interpret any section in most cases. There is no need to interpret any
EDNS options present in the request as unsupported EDNS EDNS options present in the request, as unsupported EDNS
options are expected to be ignored <xref target="RFC6891"/>. options are expected to be ignored <xref target="RFC6891" format="defaul
Additionally EDNS flags can be ignored. The only part of the t"/>.
Additionally, EDNS flags can be ignored. The only part of the
OPT record that needs to be examined is the version field OPT record that needs to be examined is the version field
to determine if BADVERS needs to be sent or not. to determine if BADVERS needs to be sent or not.
</t> </t>
</section> </section>
<section anchor="testing" title="Testing"> <section anchor="testing" numbered="true" toc="default">
<name>Testing</name>
<t> <t>
Testing is divided into two sections: "Basic DNS", which all Testing is divided into two sections: "Basic DNS", which all
servers should meet, and "Extended DNS", which should be met servers should meet, and "Extended DNS", which should be met
by all servers that support EDNS (a server is deemed to by all servers that support EDNS (a server is deemed to
support EDNS if it gives a valid EDNS response to any EDNS support EDNS if it gives a valid EDNS response to any EDNS
query). If a server does not support EDNS it should still query). If a server does not support EDNS, it should still
respond to all the tests, albeit with error responses. respond to all the tests, albeit with error responses.
</t> </t>
<t> <t>
These tests query for records at the apex of a zone that the These tests query for records at the apex of a zone that the
server is nominally configured to serve. All tests should server is nominally configured to serve. All tests should
use the same zone. use the same zone.
</t> </t>
<t> <t>
It is advisable to run all of the tests below in parallel It is advisable to run all of the tests below in parallel
so as to minimise the delays due to multiple timeouts when so as to minimise the delays due to multiple timeouts when
the servers do not respond. There are 16 queries directed the servers do not respond. There are 16 queries directed
to each nameserver (assuming no packet loss) testing different to each nameserver (assuming no packet loss) testing different
aspects of Basic DNS and Extended DNS. aspects of Basic DNS and Extended DNS.
</t> </t>
<t> <t>
The tests below use dig from BIND 9.11.0 <xref target="ISC"/>. The tests below use dig from BIND 9.11.0 <xref target="ISC" format="defa ult"/>.
Replace $zone with the name of the zone being used for testing. Replace $zone with the name of the zone being used for testing.
Replace $server with the name or address of the server being tested. Replace $server with the name or address of the server being tested.
</t> </t>
<t> <t>
When testing recursive servers set RD=1 and choose a zone When testing, recursive servers set RD=1 and choose a zone
name that is known to exist and is not being served by the name that is known to exist and is not being served by the
recursive server. The root zone (".") is often a good recursive server. The root zone (".") is often a good
candidate as it is DNSSEC signed. RD=1, rather than RD=0, candidate, as it is DNSSEC signed. RD=1, rather than RD=0,
should be present in the responses for all test involving should be present in the responses for all test involving
the opcode QUERY. Non-authoritative answers (AA=0) are the opcode QUERY. Non-authoritative answers (AA=0) are
expected when talking to a recursive server. AD=1 is only expected when talking to a recursive server. AD=1 is only
expected if the server is validating responses and expected if the server is validating responses and
one or both AD=1 or DO=1 is set in the request otherwise one or both AD=1 or DO=1 is set in the request, otherwise
AD=0 is expected. AD=0 is expected.
</t> </t>
<section anchor="testing-basic" title="Testing - Basic DNS"> <section anchor="testing-basic" numbered="true" toc="default">
<name>Testing: Basic DNS</name>
<t> <t>
This first set of tests cover basic DNS server behaviour This first set of tests cover Basic DNS server behaviour
and all servers should pass these tests. and all servers should pass these tests.
</t> </t>
<section title="Is The Server Configured For The Zone?"> <section numbered="true" toc="default">
<name>Is the server configured for the zone?</name>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with no DNS flag bits set and without query is made with no DNS flag bits set and without
EDNS. EDNS.
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, and in the answer section, the rcode to be set to NOERROR, and
the AA and QR bits to be set in the header; RA may the Authoritative Answer (AA) and Query/Response (QR) bits to be
also be set <xref target="RFC1034"/>. We do not expect set in the header; the Recursion Available (RA) bits may also be
an OPT record to be returned <xref target="RFC6891"/>. set <xref target="RFC1034" format="default"/>. We
</t> do not expect an OPT record to be returned <xref target="RFC6891"
<t> format="default"/>.</t>
<figure> <t keepWithNext="true">
<preamble>
Verify the server is configured for the zone: Verify the server is configured for the zone:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +noedns +noad +norec soa $zone @$server dig +noedns +noad +norec soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: rd to NOT be present expect: flag: rd to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing Unknown Types"> <section numbered="true" toc="default">
<name>Testing Unknown Types</name>
<t> <t>
Identifying servers that fail to respond to unknown or Identifying servers that fail to respond to unknown or
unsupported types can be done by making an initial DNS unsupported types can be done by making an initial DNS
query for an A record, making a number of queries for an query for an A record, making a number of queries for an
unallocated type, then making a query for an A record unallocated type, then making a query for an A record
again. IANA maintains a registry of allocated types. again. IANA maintains a registry of allocated types <xref
target="IANA-DNS"/>.
</t> </t>
<t> <t>
If the server responds to the first and last queries but If the server responds to the first and last queries but
fails to respond to the queries for the unallocated type, fails to respond to the queries for the unallocated type,
it is probably faulty. The test should be repeated a it is probably faulty. The test should be repeated a
number of times to eliminate the likelihood of a false number of times to eliminate the likelihood of a false
positive due to packet loss. positive due to packet loss.
</t> </t>
<t> <t>
Ask for the TYPE1000 RRset at the configured zone's Ask for the TYPE1000 RRset at the configured zone's
name. This query is made with no DNS flag bits set and name. This query is made with no DNS flag bits set and
without EDNS. TYPE1000 has been chosen for this purpose without EDNS. TYPE1000 has been chosen for this purpose,
as IANA is unlikely to allocate this type in the near as IANA is unlikely to allocate this type in the near
future and it is not in a range reserved for private future and it is not in a range reserved for private
use <xref target="RFC6895"/>. Any unallocated type code use <xref target="RFC6895" format="default"/>. Any unallocated type code
could be chosen for this test. could be chosen for this test.
</t> </t>
<t> <t>
We expect no records to be returned in the answer We expect no records to be returned in the answer
section, the rcode to be set to NOERROR, and the AA and section, the rcode to be set to NOERROR, and the AA and
QR bits to be set in the header; RA may also be set QR bits to be set in the header; RA may also be set
<xref target="RFC1034"/>. We do not expect an OPT record <xref target="RFC1034" format="default"/>. We do not expect an OPT
to be returned <xref target="RFC6891"/>. record
to be returned <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that queries for an unknown type work: Check that queries for an unknown type work:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +noedns +noad +norec type1000 $zone @$server dig +noedns +noad +norec type1000 $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: an empty answer section. expect: an empty answer section.
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: rd to NOT be present expect: flag: rd to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing Header Bits"> <section numbered="true" toc="default">
<section title="Testing CD=1 Queries"> <name>Testing Header Bits</name>
<section numbered="true" toc="default">
<name>Testing CD=1 Queries</name>
<t> <t>
Ask for the SOA record of the configured zone. Ask for the SOA record of the configured zone.
This query is made with only the CD DNS flag bit set, This query is made with only the CD DNS flag bit set,
all other DNS bits clear, and without EDNS. with all other DNS bits clear, and without EDNS.
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, in the answer section, the rcode to be set to NOERROR,
and the AA and QR bits to be set in the header. We and the AA and QR bits to be set in the header. We
do not expect an OPT record to be returned. do not expect an OPT record to be returned.
</t> </t>
<t> <t>
If the server supports DNSSEC, CD should be set in If the server supports DNSSEC, CD should be set in
the response <xref target="RFC4035"/> otherwise CD the response <xref target="RFC4035" format="default"/>; otherwise,
should be clear <xref target="RFC1034"/>. CD
should be clear <xref target="RFC1034" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that queries with CD=1 work: Check that queries with CD=1 work:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +noedns +noad +norec +cd soa $zone @$server dig +noedns +noad +norec +cd soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: rd to NOT be present expect: flag: rd to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing AD=1 Queries"> <section numbered="true" toc="default">
<t> <name>Testing AD=1 Queries</name>
Ask for the SOA record of the configured zone. This <t>Ask for the SOA record of the configured zone. This query is
query is made with only the AD DNS flag bit set and made with only the AD DNS flag bit set, with all other DNS bits clear
all other DNS bits clear and without EDNS. ,
</t> and without EDNS.</t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, in the answer section, the rcode to be set to NOERROR,
and the AA and QR bits to be set in the header. We and the AA and QR bits to be set in the header. We
do not expect an OPT record to be returned. The do not expect an OPT record to be returned. The
purpose of this query is to detect blocking of queries purpose of this query is to detect blocking of queries
with the AD bit present, not the specific value of with the AD bit present, not the specific value of
AD in the response. AD in the response.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that queries with AD=1 work: Check that queries with AD=1 work:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +noedns +norec +ad soa $zone @$server dig +noedns +norec +ad soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: rd to NOT be present expect: flag: rd to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
<postamble> <t keepWithPrevious="true">
AD use in queries is defined in <xref target="RFC6840"/>. AD use in queries is defined in <xref target="RFC6840" format=
</postamble> "default"/>.
</figure>
</t> </t>
</section> </section>
<section title="Testing Reserved Bit"> <section numbered="true" toc="default">
<name>Testing Reserved Bit</name>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with only the final reserved DNS flag query is made with only the final reserved DNS flag
bit set and all other DNS bits clear and without EDNS. bit set, with all other DNS bits clear, and without EDNS.
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, in the answer section, the rcode to be set to NOERROR,
and the AA and QR bits to be set in the header; RA and the AA and QR bits to be set in the header; RA
may be set. The final reserved bit must not be set may be set. The final reserved bit must not be set
<xref target="RFC1034"/>. We do not expect an OPT <xref target="RFC1034" format="default"/>. We do not expect an OP
record to be returned <xref target="RFC6891"/>. T
record to be returned <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that queries with the last unassigned DNS Check that queries with the last unassigned DNS
header flag work and that the flag bit is not header flag work and that the flag bit is not
copied to the response: copied to the response:
</preamble> </t>
<artwork> <sourcecode name="" type="" ><![CDATA[
dig +noedns +noad +norec +zflag soa $zone @$server dig +noedns +noad +norec +zflag soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: MBZ to NOT be in the response (see below) expect: MBZ to NOT be in the response (see below)
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: rd to NOT be present expect: flag: rd to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
<postamble> <t keepWithPrevious="true"> MBZ (Must Be Zero) is a dig-specific
MBZ (Must Be Zero) is a dig-specific indication that indication that the flag bit has been incorrectly copied. See
the flag bit has been incorrectly copied. See Section <xref target="RFC1035" sectionFormat="of" section="4.1.1"/>:</t>
4.1.1, <xref target="RFC1035"/> "Z Reserved for <dl newline="false">
future use. Must be zero in all queries and <dt>"Z</dt>
responses." <dd>Reserved for future use. Must be zero in all queries and responses."</dd>
</postamble> </dl>
</figure>
</t>
</section> </section>
<section title="Testing Recursive Queries"> <section numbered="true" toc="default">
<name>Testing Recursive Queries</name>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with only the RD DNS flag bit set and query is made with only the RD DNS flag bit set and
without EDNS. without EDNS.
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, and in the answer section, the rcode to be set to NOERROR, and
the AA, QR and RD bits to be set in the header; RA the AA, QR and RD bits to be set in the header; RA
may also be set <xref target="RFC1034"/>. We do not may also be set <xref target="RFC1034" format="default"/>. We do
expect an OPT record to be returned <xref target="RFC6891"/>. not
expect an OPT record to be returned <xref target="RFC6891" format=
"default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that recursive queries work: Check that recursive queries work:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +noedns +noad +rec soa $zone @$server dig +noedns +noad +rec soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: rd to be present expect: flag: rd to be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
</section> </section>
<section title="Testing Unknown Opcodes"> <section numbered="true" toc="default">
<name>Testing Unknown Opcodes</name>
<t> <t>
Construct a DNS message that consists of only a DNS Construct a DNS message that consists of only a DNS
header with opcode set to 15 (currently not allocated), header with opcode set to 15 (currently not allocated),
no DNS header bits set and empty question, answer, no DNS header bits set, and empty question, answer,
authority and additional sections. authority, and additional sections. </t>
</t> <t keepWithNext="true">
<t>
<figure>
<preamble>
Check that new opcodes are handled: Check that new opcodes are handled:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +noedns +noad +opcode=15 +norec +header-only @$server dig +noedns +noad +opcode=15 +norec +header-only @$server
expect: status: NOTIMP expect: status: NOTIMP
expect: opcode: 15 expect: opcode: 15
expect: all sections to be empty expect: all sections to be empty
expect: flag: aa to NOT be present expect: flag: aa to NOT be present
expect: flag: rd to NOT be present expect: flag: rd to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing TCP"> <section numbered="true" toc="default">
<name>Testing TCP</name>
<t> <t>
Whether a server accepts TCP connections can be tested Whether a server accepts TCP connections can be tested
by first checking that it responds to UDP queries to by first checking that it responds to UDP queries to
confirm that it is up and operating, then attempting the confirm that it is up and operating, then attempting the
same query over TCP. An additional query should be made same query over TCP. An additional query should be made
over UDP if the TCP connection attempt fails to confirm over UDP if the TCP connection attempt fails to confirm
that the server under test is still operating. that the server under test is still operating.
</t> </t>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with no DNS flag bits set and without query is made with no DNS flag bits set and without
EDNS. This query is to be sent using TCP. EDNS. This query is to be sent using TCP.
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, and in the answer section, the rcode to be set to NOERROR, and
the AA and QR bits to be set in the header; RA may the AA and QR bits to be set in the header; RA may
also be set <xref target="RFC1034"/>. We do not expect also be set <xref target="RFC1034" format="default"/>. We do not ex
an OPT record to be returned <xref target="RFC6891"/>. pect
an OPT record to be returned <xref target="RFC6891" format="default"
/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that TCP queries work: Check that TCP queries work:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +noedns +noad +norec +tcp soa $zone @$server dig +noedns +noad +norec +tcp soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: rd to NOT be present expect: flag: rd to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
expect: the OPT record to NOT be present expect: the OPT record to NOT be present
</artwork> ]]></sourcecode>
<postamble> <t keepWithPrevious="true">
The requirement that TCP be supported is defined The requirement that TCP be supported is defined
in <xref target="RFC7766"/>. in <xref target="RFC7766" format="default"/>.
</postamble>
</figure>
</t> </t>
</section> </section>
</section> </section>
<section anchor="testing-edns" title="Testing - Extended DNS"> <section anchor="testing-edns" numbered="true" toc="default">
<name>Testing: Extended DNS</name>
<t> <t>
The next set of tests cover various aspects of EDNS The next set of tests cover various aspects of EDNS
behaviour. If any of these tests succeed (indicating behaviour. If any of these tests succeed (indicating
at least some EDNS support) then all of them should at least some EDNS support), then all of them should
succeed. There are servers that support EDNS but fail succeed. There are servers that support EDNS but fail
to handle plain EDNS queries correctly so a plain EDNS to handle plain EDNS queries correctly, so a plain EDNS
query is not a good indicator of lack of EDNS support. query is not a good indicator of lack of EDNS support.
</t> </t>
<section title="Testing Minimal EDNS"> <section numbered="true" toc="default">
<name>Testing Minimal EDNS</name>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with no DNS flag bits set. EDNS version query is made with no DNS flag bits set. EDNS version
0 is used without any EDNS options or EDNS flags set. 0 is used without any EDNS options or EDNS flags set.
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, and in the answer section, the rcode to be set to NOERROR, and
the AA and QR bits to be set in the header; RA may the AA and QR bits to be set in the header; RA may
also be set <xref target="RFC1034"/>. We expect also be set <xref target="RFC1034" format="default"/>. We expect
an OPT record to be returned. There should be no EDNS an OPT record to be returned. There should be no EDNS
flags present in the response. The EDNS version field flags present in the response. The EDNS version field
should be 0 and there should be no EDNS options present should be 0, and there should be no EDNS options present
<xref target="RFC6891"/>. <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that plain EDNS queries work: Check that plain EDNS queries work:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=0 +noad +norec soa $zone @$server dig +nocookie +edns=0 +noad +norec soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
</artwork> ]]></sourcecode>
<postamble> <t keepWithPrevious="true">
+nocookie disables sending a EDNS COOKIE option which +nocookie disables sending an EDNS COOKIE option, which
is otherwise enabled by default in BIND 9.11.0 (and is otherwise enabled by default in BIND 9.11.0 (and
later). later).
</postamble>
</figure>
</t> </t>
</section> </section>
<section title="Testing EDNS Version Negotiation"> <section numbered="true" toc="default">
<name>Testing EDNS Version Negotiation</name>
<t> <t>
Ask for the SOA record of a zone the server is nominally Ask for the SOA record of a zone the server is nominally
configured to serve. This query is made with no DNS flag configured to serve. This query is made with no DNS flag
bits set. EDNS version 1 is used without any EDNS options bits set. EDNS version 1 is used without any EDNS options
or EDNS flags set. or EDNS flags set.
</t> </t>
<t> <t>
We expect the SOA record for the zone to NOT be returned We expect the SOA record for the zone to NOT be returned
in the answer section with the extended rcode set to in the answer section with the extended rcode set to
BADVERS and the QR bit to be set in the header; RA BADVERS and the QR bit to be set in the header; RA
may also be set <xref target="RFC1034"/>. We expect may also be set <xref target="RFC1034" format="default"/>. We expec t
an OPT record to be returned. There should be no EDNS an OPT record to be returned. There should be no EDNS
flags present in the response. The EDNS version field flags present in the response. The EDNS version field
should be 0 in the response as no other EDNS version should be 0 in the response, as no other EDNS version
has as yet been specified <xref target="RFC6891"/>. has as yet been specified <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that EDNS version 1 queries work (EDNS supported): Check that EDNS version 1 queries work (EDNS supported):
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=1 +noednsneg +noad +norec soa $zone @$server dig +nocookie +edns=1 +noednsneg +noad +norec soa $zone @$server
expect: status: BADVERS expect: status: BADVERS
expect: the SOA record to NOT be present in the answer section expect: the SOA record to NOT be present in the answer section
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to NOT be present expect: flag: aa to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
</artwork> ]]></sourcecode>
<postamble> <t keepWithPrevious="true">
+noednsneg has been set as dig supports EDNS version +noednsneg has been set, as dig supports EDNS version
negotiation and we want to see only the response to the negotiation, and we want to see only the response to the
initial EDNS version 1 query. initial EDNS version 1 query.
</postamble>
</figure>
</t> </t>
</section> </section>
<section title="Testing Unknown EDNS Options"> <section numbered="true" toc="default">
<name>Testing Unknown EDNS Options</name>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with no DNS flag bits set. EDNS version query is made with no DNS flag bits set. EDNS version
0 is used without any EDNS flags. An EDNS option is 0 is used without any EDNS flags. An EDNS option is
present with a value that has not yet been assigned by present with a value that has not yet been assigned by
IANA. We have picked an unassigned code of 100 for IANA. We have picked an unassigned code of 100 for
the example below. Any unassigned EDNS option code the example below. Any unassigned EDNS option code
could have been choosen for this test. could have been chosen for this test.
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, and in the answer section, the rcode to be set to NOERROR, and
the AA and QR bits to be set in the header; RA may the AA and QR bits to be set in the header; RA may
also be set <xref target="RFC1034"/>. We expect also be set <xref target="RFC1034" format="default"/>. We expect
an OPT record to be returned. There should be no EDNS an OPT record to be returned. There should be no EDNS
flags present in the response. The EDNS version field flags present in the response. The EDNS version field
should be 0 as EDNS versions other than 0 are yet to should be 0, as EDNS versions other than 0 are yet to
be specified and there should be no EDNS options present be specified, and there should be no EDNS options present,
as unknown EDNS options are supposed to be ignored by the as unknown EDNS options are supposed to be ignored by the
server <xref target="RFC6891"/> Section 6.1.2. server (<xref target="RFC6891" sectionFormat="of" section="6.1.1"/>) .
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that EDNS queries with an unknown option work (EDNS suppor ted): Check that EDNS queries with an unknown option work (EDNS suppor ted):
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=0 +noad +norec +ednsopt=100 soa $zone @$server dig +nocookie +edns=0 +noad +norec +ednsopt=100 soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: OPT=100 to NOT be present expect: OPT=100 to NOT be present
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing Unknown EDNS Flags"> <section numbered="true" toc="default">
<name>Testing Unknown EDNS Flags</name>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with no DNS flag bits set. EDNS version query is made with no DNS flag bits set. EDNS version
0 is used without any EDNS options. An unassigned EDNS 0 is used without any EDNS options. An unassigned EDNS
flag bit is set (0x40 in this case). flag bit is set (0x40 in this case).
</t> </t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, and in the answer section, the rcode to be set to NOERROR, and
the AA and QR bits to be set in the header; RA may the AA and QR bits to be set in the header; RA may
also be set <xref target="RFC1034"/>. We expect also be set <xref target="RFC1034" format="default"/>. We expect
an OPT record to be returned. There should be no EDNS an OPT record to be returned. There should be no EDNS
flags present in the response as unknown EDNS flags are flags present in the response, as unknown EDNS flags are
supposed to be ignored. The EDNS version field supposed to be ignored. The EDNS version field
should be 0 and there should be no EDNS options present should be 0, and there should be no EDNS options present
<xref target="RFC6891"/>. <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that EDNS queries with unknown flags work (EDNS supported) : Check that EDNS queries with unknown flags work (EDNS supported) :
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=0 +noad +norec +ednsflags=0x40 soa $zone @$server dig +nocookie +edns=0 +noad +norec +ednsflags=0x40 soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: MBZ not to be present expect: MBZ not to be present
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
</artwork> ]]></sourcecode>
<postamble> <t keepWithPrevious="true">
MBZ (Must Be Zero) is a dig-specific indication that MBZ (Must Be Zero) is a dig-specific indication that
a flag bit has been incorrectly copied as per a flag bit has been incorrectly copied, as per
Section 6.1.4, <xref target="RFC6891"/>. <xref target="RFC6891" sectionFormat="of" section="6.1.4"/>.
</postamble>
</figure>
</t> </t>
</section> </section>
<section title="Testing EDNS Version Negotiation With Unknown EDNS Flags <section numbered="true" toc="default">
"> <name>Testing EDNS Version Negotiation with Unknown EDNS Flags</name>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with no DNS flag bits set. EDNS version query is made with no DNS flag bits set. EDNS version
1 is used without any EDNS options. An unassigned EDNS 1 is used without any EDNS options. An unassigned EDNS
flag bit is set (0x40 in this case). flag bit is set (0x40 in this case).
</t> </t>
<t> <t>
We expect the SOA record for the zone to NOT be returned We expect the SOA record for the zone to NOT be returned
in the answer section with the extended rcode set to in the answer section with the extended rcode set to
BADVERS and the QR bit to be set in the header; RA BADVERS and the QR bit to be set in the header; RA
may also be set <xref target="RFC1034"/>. We expect may also be set <xref target="RFC1034" format="default"/>. We expec t
an OPT record to be returned. There should be no EDNS an OPT record to be returned. There should be no EDNS
flags present in the response as unknown EDNS flags are flags present in the response, as unknown EDNS flags are
supposed to be ignored. The EDNS version field should supposed to be ignored. The EDNS version field should
be 0 as EDNS versions other than 0 are yet to be be 0, as EDNS versions other than 0 are yet to be
specified and there should be no EDNS options present specified, and there should be no EDNS options present
<xref target="RFC6891"/>. <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that EDNS version 1 queries with unknown flags work (EDNS supported): Check that EDNS version 1 queries with unknown flags work (EDNS supported):
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=1 +noednsneg +noad +norec +ednsflags=0x40 soa \ dig +nocookie +edns=1 +noednsneg +noad +norec +ednsflags=0x40 soa \
$zone @$server $zone @$server
expect: status: BADVERS expect: status: BADVERS
expect: SOA record to NOT be present expect: SOA record to NOT be present
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: MBZ not to be present expect: MBZ not to be present
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to NOT be present expect: flag: aa to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing EDNS Version Negotiation With Unknown EDNS Optio <section numbered="true" toc="default">
ns"> <name>Testing EDNS Version Negotiation with Unknown EDNS Options</name
>
<t> <t>
Ask for the SOA record of the configured zone. This Ask for the SOA record of the configured zone. This
query is made with no DNS flag bits set. EDNS version query is made with no DNS flag bits set. EDNS version
1 is used. An unknown EDNS option is present. We have 1 is used. An unknown EDNS option is present. We have
picked an unassigned code of 100 for the example below. picked an unassigned code of 100 for the example below.
Any unassigned EDNS option code could have been chosen for Any unassigned EDNS option code could have been chosen for
this test. this test.
</t> </t>
<t> <t>
We expect the SOA record for the zone to NOT be returned We expect the SOA record for the zone to NOT be returned
in the answer section with the extended rcode set to in the answer section with the extended rcode set to
BADVERS and the QR bit to be set in the header; RA BADVERS and the QR bit to be set in the header; RA
may also be set <xref target="RFC1034"/>. We expect may also be set <xref target="RFC1034" format="default"/>. We expec t
an OPT record to be returned. There should be no EDNS an OPT record to be returned. There should be no EDNS
flags present in the response. The EDNS version field flags present in the response. The EDNS version field
should be 0 as EDNS versions other than 0 are yet should be 0, as EDNS versions other than 0 are yet
to be specified and there should be no EDNS options to be specified, and there should be no EDNS options
present <xref target="RFC6891"/>. present <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that EDNS version 1 queries with unknown options work (EDN S supported): Check that EDNS version 1 queries with unknown options work (EDN S supported):
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=1 +noednsneg +noad +norec +ednsopt=100 soa \ dig +nocookie +edns=1 +noednsneg +noad +norec +ednsopt=100 soa \
$zone @$server $zone @$server
expect: status: BADVERS expect: status: BADVERS
expect: SOA record to NOT be present expect: SOA record to NOT be present
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: OPT=100 to NOT be present expect: OPT=100 to NOT be present
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to NOT be present expect: flag: aa to NOT be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing Truncated Responses"> <section numbered="true" toc="default">
<name>Testing Truncated Responses</name>
<t> <t>
Ask for the DNSKEY records of the configured zone, which Ask for the DNSKEY records of the configured zone, which
must be a DNSSEC signed zone. This query is made with must be a DNSSEC signed zone. This query is made with
no DNS flag bits set. EDNS version 0 is used without no DNS flag bits set. EDNS version 0 is used without
any EDNS options. The only EDNS flag set is DO. The any EDNS options. The only EDNS flag set is DO. The
EDNS UDP buffer size is set to 512. The intention of EDNS UDP buffer size is set to 512. The intention of
this query is to elicit a truncated response from the this query is to elicit a truncated response from the
server. Most signed DNSKEY responses are bigger than server. Most signed DNSKEY responses are bigger than
512 bytes. This test will not give a valid result if 512 bytes. This test will not give a valid result if
the zone is not signed. the zone is not signed.
</t> </t>
<t>We expect a response, the rcode to be set to NOERROR, and the AA
and QR bits to be set. AD may be set in the response if the server
supports DNSSEC; otherwise it should be clear; TC and RA may also be
set <xref target="RFC1035" format="default"/> <xref target="RFC4035"
format="default"/>. We expect an OPT record to be present in the
response. There should be no EDNS flags other than DO present in
the response. The EDNS version field should be 0, and there should
be no EDNS options present <xref target="RFC6891"
format="default"/>.</t>
<t> <t>
We expect a response, the rcode to be set to NOERROR, and If TC is not set, it is not possible to confirm that the
the AA and QR bits to be set, AD may be set in the
response if the server supports DNSSEC otherwise it
should be clear; TC and RA may also be set <xref
target="RFC1035"/> <xref target="RFC4035"/>. We expect
an OPT record to be present in the response. There
should be no EDNS flags other than DO present in the
response. The EDNS version field should be 0 and
there should be no EDNS options present <xref
target="RFC6891"/>.
</t>
<t>
If TC is not set it is not possible to confirm that the
server correctly adds the OPT record to the truncated server correctly adds the OPT record to the truncated
responses or not. responses or not.
</t> </t>
<t> <sourcecode name="" type=""><![CDATA[
<figure>
<artwork>
dig +norec +dnssec +bufsize=512 +ignore dnskey $zone @$server dig +norec +dnssec +bufsize=512 +ignore dnskey $zone @$server
expect: NOERROR expect: NOERROR
expect: OPT record with version set to 0 expect: OPT record with version set to 0
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing DO=1 Handling"> <section numbered="true" toc="default">
<name>Testing DO=1 Handling</name>
<t> <t>
Ask for the SOA record of the configured zone, which Ask for the SOA record of the configured zone, which
does not need to be DNSSEC signed. This query is made does not need to be DNSSEC signed. This query is made
with no DNS flag bits set. EDNS version 0 is used with no DNS flag bits set. EDNS version 0 is used
without any EDNS options. The only EDNS flag set is without any EDNS options. The only EDNS flag set is
DO. DO.
</t> </t>
<t> <t>We expect the SOA record for the zone to be returned in the
We expect the SOA record for the zone to be returned answer section, the rcode to be set to NOERROR, and the AA and QR
in the answer section, the rcode to be set to NOERROR, and bits to be set in the response. AD may be set in the response if the
the AA and QR bits to be set in the response, AD may server supports DNSSEC, otherwise it should be clear; RA may also be
be set in the response if the server supports DNSSEC set <xref target="RFC1034" format="default"/>. We expect an OPT
otherwise it should be clear; RA may also be set <xref record to be returned. There should be no EDNS flags other than DO
target="RFC1034"/>. We expect an OPT record to be present in the response, which should be present if the server
returned. There should be no EDNS flags other than DO supports DNSSEC. The EDNS version field should be 0, and there
present in the response which should be present if the should be no EDNS options present <xref target="RFC6891"
server supports DNSSEC. The EDNS version field should format="default"/>.</t>
be 0 and there should be no EDNS options present <t keepWithNext="true">
<xref target="RFC6891"/>.
</t>
<t>
<figure>
<preamble>
Check that DO=1 queries work (EDNS supported): Check that DO=1 queries work (EDNS supported):
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=0 +noad +norec +dnssec soa $zone @$server dig +nocookie +edns=0 +noad +norec +dnssec soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: DO=1 to be present if an RRSIG is in the response expect: DO=1 to be present if an RRSIG is in the response
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to be present expect: flag: aa to be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing EDNS Version Negotiation With DO=1"> <section numbered="true" toc="default">
<name>Testing EDNS Version Negotiation with DO=1</name>
<t> <t>
Ask for the SOA record of the configured zone, which does Ask for the SOA record of the configured zone, which does
not need to be DNSSEC signed. This query is made with no not need to be DNSSEC signed. This query is made with no
DNS flag bits set. EDNS version 1 is used without any EDNS DNS flag bits set. EDNS version 1 is used without any EDNS
options. The only EDNS flag set is DO. options. The only EDNS flag set is DO.
</t> </t>
<t> <t>We expect the SOA record for the zone NOT to be returned in the ans
We expect the SOA record for the zone to NOT be returned wer
in the answer section, the rcode to be set to NOERROR, ; section, the extended rcode to be set to BADVERS, and the QR bit to be set in
the QR bit and possibly the RA bit to be set <xref the header; RA may also be set <xref target="RFC1034"
target="RFC1034"/>. We expect an OPT record to format="default"/>.
be returned. There should be no EDNS flags other than
DO present in the response which should be there if We expect an OPT record to be returned. There
the server supports DNSSEC. The EDNS version field should be no EDNS flags other than DO present in the response, which
should be 0 and there should be no EDNS options should be there if the server supports DNSSEC. The EDNS version
present <xref target="RFC6891"/>. field should be 0, and there should be no EDNS options present <xref
</t> target="RFC6891" format="default"/>.</t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that EDNS version 1, DO=1 queries work (EDNS supported): Check that EDNS version 1, DO=1 queries work (EDNS supported):
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +nocookie +edns=1 +noednsneg +noad +norec +dnssec soa \ dig +nocookie +edns=1 +noednsneg +noad +norec +dnssec soa \
$zone @$server $zone @$server
expect: status: BADVERS expect: status: BADVERS
expect: SOA record to NOT be present expect: SOA record to NOT be present
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: DO=1 to be present if the EDNS version 0 DNSSEC query test expect: DO=1 to be present if the EDNS version 0 DNSSEC query test
returned DO=1 returned DO=1
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to NOT be present expect: flag: aa to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
<section title="Testing With Multiple Defined EDNS Options"> <section numbered="true" toc="default">
<t> <name>Testing with Multiple Defined EDNS Options</name>
Ask for the SOA record of the configured zone. This <t>Ask for the SOA record of the configured zone. This query is
query is made with no DNS flag bits set. EDNS version made with no DNS flag bits set. EDNS version 0 is used. A number
0 is used. A number of defined EDNS options are present of defined EDNS options are present (NSID <xref target="RFC5001"
(NSID <xref target="RFC5001"/>, DNS COOKIE <xref format="default"/>, DNS COOKIE <xref target="RFC7873"
target="RFC7873"/>, EDNS Client Subnet <xref format="default"/>, EDNS Client Subnet <xref target="RFC7871"
target="RFC7871"/> and EDNS Expire <xref target="RFC7314"/>). format="default"/>, and EDNS Expire <xref target="RFC7314"
</t> format="default"/>).</t>
<t> <t>
We expect the SOA record for the zone to be returned We expect the SOA record for the zone to be returned
in the answer section, the rcode to be set to NOERROR, and in the answer section, the rcode to be set to NOERROR, and
the AA and QR bits to be set in the header; RA may the AA and QR bits to be set in the header; RA may
also be set <xref target="RFC1034"/>. We expect an OPT also be set <xref target="RFC1034" format="default"/>. We expect an OPT
record to be returned. There should be no EDNS flags record to be returned. There should be no EDNS flags
present in the response. The EDNS version field should present in the response. The EDNS version field should
be 0. Any of the requested EDNS options supported be 0. Any of the requested EDNS options supported
by the server and permitted server configuration may by the server and permitted server configuration may
be returned <xref target="RFC6891"/>. be returned <xref target="RFC6891" format="default"/>.
</t> </t>
<t> <t keepWithNext="true">
<figure>
<preamble>
Check that EDNS queries with multiple defined EDNS options work: Check that EDNS queries with multiple defined EDNS options work:
</preamble> </t>
<artwork> <sourcecode name="" type=""><![CDATA[
dig +edns=0 +noad +norec +cookie +nsid +expire +subnet=0.0.0.0/0 \ dig +edns=0 +noad +norec +cookie +nsid +expire +subnet=0.0.0.0/0 \
soa $zone @$server soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: the SOA record to be present in the answer section expect: the SOA record to be present in the answer section
expect: an OPT record to be present in the additional section expect: an OPT record to be present in the additional section
expect: EDNS Version 0 in response expect: EDNS Version 0 in response
expect: flag: aa to be present expect: flag: aa to be present
expect: flag: ad to NOT be present expect: flag: ad to NOT be present
</artwork> ]]></sourcecode>
</figure>
</t>
</section> </section>
</section> </section>
<section title="When EDNS Is Not Supported"> <section numbered="true" toc="default">
<name>When EDNS Is Not Supported</name>
<t> <t>
If EDNS is not supported by the nameserver, we expect a If EDNS is not supported by the nameserver, we expect a
response to each of the above queries. That response may response to each of the above queries. That response may
be a FORMERR error response or the OPT record may just be a FORMERR error response, or the OPT record may just
be ignored. be ignored.
</t> </t>
<t> <t>
Some nameservers only return a EDNS response when a Some nameservers only return an EDNS response when a
particular EDNS option or flag (e.g. DO=1) is present in particular EDNS option or flag (e.g., DO=1) is present in
the request. This behaviour is not compliant behaviour the request. This behaviour is not compliant behaviour
and may hide other incorrect behaviour from the above and may hide other incorrect behaviour from the above
tests. Re-testing with the triggering option / flag tests. Retesting with the triggering option/flag
present will expose this misbehaviour. present will expose this misbehaviour.
</t> </t>
</section> </section>
</section> </section>
<section anchor="remediation" title="Remediation"> <section anchor="remediation" numbered="true" toc="default">
<name>Remediation</name>
<t> <t>
Nameserver operators are generally expected to test their Nameserver operators are generally expected to test their
own infrastructure for compliance to standards. The above own infrastructure for compliance to standards. The above
tests should be run when new systems are brought online, tests should be run when new systems are brought online
and should be repeated periodically to ensure continued and should be repeated periodically to ensure continued
interoperability. interoperability.
</t> </t>
<t> <t>
Domain registrants who do not maintain their own DNS Domain registrants who do not maintain their own DNS
infrastructure are entitled to a DNS service that conforms infrastructure are entitled to a DNS service that conforms
to standards and interoperates well. Registrants who become to standards and interoperates well. Registrants who become
aware that their DNS operator does not have a well maintained aware that their DNS operator does not have a well-maintained
or compliant infrastructure should insist that their service or compliant infrastructure should insist that their service
provider correct issues, and switch providers if they do provider correct issues and switch providers if they do
not. not.
</t> </t>
<t> <t>
In the event that an operator experiences problems due to In the event that an operator experiences problems due to
the behaviour of nameservers outside their control, the the behaviour of nameservers outside their control, the
above tests will help in narrowing down the precise issue(s) above tests will help in narrowing down the precise issue(s),
which can then be reported to the relevant party. which can then be reported to the relevant party.
</t> </t>
<t> <t>
If contact information for the operator of a misbehaving If contact information for the operator of a misbehaving
nameserver is not already known, the following methods of nameserver is not already known, the following methods of
communication could be considered: communication could be considered:
<list style="symbols"> </t>
<t> <ul spacing="normal">
<li>
the RNAME of the zone authoritative for the name of the the RNAME of the zone authoritative for the name of the
misbehaving server misbehaving server
</t> </li>
<li>
<t>
the RNAME of zones for which the offending server is the RNAME of zones for which the offending server is
authoritative authoritative
</t> </li>
<li>
<t>
administrative or technical contacts listed in the administrative or technical contacts listed in the
registration information for the parent domain of the registration information for the parent domain of the
name of the misbehaving server, or for zones for which name of the misbehaving server or for zones for which
the nameserver is authoritative the nameserver is authoritative
</t> </li>
<li>
<t>
the registrar or registry for such zones the registrar or registry for such zones
</t> </li>
<li>
<t> DNS-specific, operational fora (e.g., mailing lists)
DNS-specific operational fora (e.g. mailing lists) </li>
</t> </ul>
</list>
</t>
<t> <t>
Operators of parent zones may wish to regularly test the Operators of parent zones may wish to regularly test the
authoritative nameservers of their child zones.   However, authoritative nameservers of their child zones. However,
parent operators can have widely varying capabilities in parent operators can have widely varying capabilities in
terms of notification or remediation depending on whether terms of notification or remediation depending on whether
they have a direct relationship with the child operator.   they have a direct relationship with the child operator.
Many TLD registries, for example, cannot directly contact Many Top-Level Domain (TLD) registries, for example, cannot directly con
tact
their registrants and may instead need to communicate through their registrants and may instead need to communicate through
the relevant registrar.   In such cases it may be most the relevant registrar. In such cases, it may be most
efficient for registrars to take on the responsibility for efficient for registrars to take on the responsibility for
testing the name ervers of their registrants, since they testing the nameservers of their registrants, since they
have a direct relationship. have a direct relationship.
</t> </t>
<t> <t>
When notification is not effective at correcting problems When notification is not effective at correcting problems
with a misbehaving nameserver, parent operators can choose with a misbehaving nameserver, parent operators can choose
to remove NS record sets (and glue records below) that refer to remove NS record sets (and glue records below) that refer
to the faulty server until the servers are fixed. This should to the faulty server until the servers are fixed. This should
only be done as a last resort and with due consideration, as only be done as a last resort and with due consideration, as
removal of a delegation can have unanticipated side effects. removal of a delegation can have unanticipated side effects.
For example, other parts of the DNS tree may depend on names For example, other parts of the DNS tree may depend on names
below the removed zone cut, and the parent operator may find below the removed zone cut, and the parent operator may find
themselves responsible for causing new DNS failures to occur. themselves responsible for causing new DNS failures to occur.
skipping to change at line 1404 skipping to change at line 1346
When notification is not effective at correcting problems When notification is not effective at correcting problems
with a misbehaving nameserver, parent operators can choose with a misbehaving nameserver, parent operators can choose
to remove NS record sets (and glue records below) that refer to remove NS record sets (and glue records below) that refer
to the faulty server until the servers are fixed. This should to the faulty server until the servers are fixed. This should
only be done as a last resort and with due consideration, as only be done as a last resort and with due consideration, as
removal of a delegation can have unanticipated side effects. removal of a delegation can have unanticipated side effects.
For example, other parts of the DNS tree may depend on names For example, other parts of the DNS tree may depend on names
below the removed zone cut, and the parent operator may find below the removed zone cut, and the parent operator may find
themselves responsible for causing new DNS failures to occur. themselves responsible for causing new DNS failures to occur.
</t> </t>
</section> </section>
<section anchor="seccon" numbered="true" toc="default">
<section anchor="seccon" title="Security Considerations"> <name>Security Considerations</name>
<t> <t>
Testing protocol compliance can potentially result in false Testing protocol compliance can potentially result in false
reports of attempts to attack services from Intrusion Detection reports of attempts to attack services from Intrusion Detection
Services and firewalls. All of the tests are well-formed Services and firewalls. All of the tests are well-formed
(though not necessarily common) DNS queries. None of the tests (though not necessarily common) DNS queries. None of the tests
listed above should cause any harm to a protocol-compliant listed above should cause any harm to a protocol-compliant
server. server.
</t> </t>
<t> <t>
Relaxing firewall settings to ensure EDNS compliance could Relaxing firewall settings to ensure EDNS compliance could
potentially expose a critical implementation flaw in the potentially expose a critical implementation flaw in the
nameserver. Nameservers should be tested for conformance nameserver. Nameservers should be tested for conformance
before relaxing firewall settings. before relaxing firewall settings.
</t> </t>
<t> <t>
When removing delegations for non-compliant servers there When removing delegations for non-compliant servers, there
can be a knock on effect on other zones that require these can be a knock-on effect on other zones that require these
zones to be operational for the nameservers addresses to be zones to be operational for the nameservers addresses to be
resolved. resolved.
</t> </t>
</section> </section>
<section anchor="iana" title="IANA Considerations"> <section anchor="iana" numbered="true" toc="default">
<t> <name>IANA Considerations</name>
There are no actions for IANA. <t>This document has no IANA actions.</t>
</t>
</section>
<section title="Acknowledgements">
<t>
The contributions of the following are gratefully acknowledged:
</t>
<t>
Matthew Pounsett, Tim Wicinski.
</t>
</section> </section>
</middle> </middle>
<back> <back>
<references title="Normative References"> <references>
&rfc1034; &rfc1035; &rfc3225; &rfc4035; <name>References</name>
&rfc6840; &rfc6895; &rfc6891; &rfc7766; <references>
</references> <name>Normative References</name>
<references title="Informative References"> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
&rfc2671; &rfc3597; ence.RFC.1034.xml"/>
&rfc5001; &rfc7314; &rfc7871; &rfc7873; <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
<reference anchor="ISC" target="https://www.isc.org/"> ence.RFC.1035.xml"/>
<front> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
<title>Internet Systems Consortuim</title> ence.RFC.3225.xml"/>
<author/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
<date/> ence.RFC.4035.xml"/>
</front> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
</reference> ence.RFC.6840.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.6895.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.6891.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.7766.xml"/>
</references>
<references>
<name>Informative References</name>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.2671.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.3597.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5001.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.7314.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.7871.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.7873.xml"/>
<reference anchor="ISC" target="https://www.isc.org/">
<front>
<title>Internet Systems Consortuim</title>
<author/>
<date/>
</front>
</reference>
<reference anchor="IANA-DNS"
target="https://www.iana.org/assignments/dns-parameters/">
<front>
<title>Domain Name System (DNS) Parameters</title>
<author><organization>IANA</organization></author>
</front>
</reference>
</references>
</references> </references>
<section numbered="false" toc="default">
<name>Acknowledgements</name>
<t>The contributions of <contact fullname="Matthew Pounsett"/> and
<contact fullname="Tim Wicinski"/> are gratefully acknowledged.</t>
</section>
</back> </back>
</rfc> </rfc>
 End of changes. 240 change blocks. 
557 lines changed or deleted 535 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/