draft-ietf-dnsop-no-response-issue-03.txt   draft-ietf-dnsop-no-response-issue-04.txt 
Network Working Group M. Andrews Network Working Group M. Andrews
Internet-Draft ISC Internet-Draft ISC
Intended status: Best Current Practice April 6, 2016 Intended status: Best Current Practice August 26, 2016
Expires: October 8, 2016 Expires: February 27, 2017
A Common Operational Problem in DNS Servers - Failure To Respond. A Common Operational Problem in DNS Servers - Failure To Respond.
draft-ietf-dnsop-no-response-issue-03 draft-ietf-dnsop-no-response-issue-04
Abstract Abstract
The DNS is a query / response protocol. Failure to respond or to The DNS is a query / response protocol. Failure to respond or to
respond correctly to queries causes both immediate operational respond correctly to queries causes both immediate operational
problems and long term problems with protocol development. problems and long term problems with protocol development.
This document identifies a number of common kinds of queries to which This document identifies a number of common kinds of queries to which
some servers either fail to respond or else respond incorrectly. some servers either fail to respond or else respond incorrectly.
This document also suggests procedures for TLD and other similar zone This document also suggests procedures for TLD and other similar zone
skipping to change at page 1, line 40 skipping to change at page 1, line 40
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 8, 2016. This Internet-Draft will expire on February 27, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Common queries kinds that result in non responses. . . . . . 3 2. Common queries kinds that result in non responses. . . . . . 4
2.1. EDNS Queries - Version Independent . . . . . . . . . . . 3 2.1. Basic DNS Queries . . . . . . . . . . . . . . . . . . . . 4
2.2. EDNS Queries - Version Specific . . . . . . . . . . . . . 4 2.1.1. Unknown / Unsupported Type Queries . . . . . . . . . 4
2.3. EDNS Options . . . . . . . . . . . . . . . . . . . . . . 4 2.1.2. DNS Flags . . . . . . . . . . . . . . . . . . . . . . 4
2.4. EDNS Flags . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.3. Unknown DNS opcodes . . . . . . . . . . . . . . . . . 4
2.5. DNS Flags . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.4. TCP Queries . . . . . . . . . . . . . . . . . . . . . 5
2.6. Unknown / Unsupported Type Queries . . . . . . . . . . . 5 2.2. EDNS Queries . . . . . . . . . . . . . . . . . . . . . . 5
2.7. Unknown DNS opcodes . . . . . . . . . . . . . . . . . . . 5 2.2.1. EDNS Queries - Version Independent . . . . . . . . . 5
2.8. TCP Queries . . . . . . . . . . . . . . . . . . . . . . . 5 2.2.2. EDNS Queries - Version Specific . . . . . . . . . . . 5
3. Remediating . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2.3. EDNS Options . . . . . . . . . . . . . . . . . . . . 6
4. Firewalls and Load Balancers . . . . . . . . . . . . . . . . 7 2.2.4. EDNS Flags . . . . . . . . . . . . . . . . . . . . . 6
5. Scrubbing Services . . . . . . . . . . . . . . . . . . . . . 8 3. Remediating . . . . . . . . . . . . . . . . . . . . . . . . . 6
6. Whole Answer Caches . . . . . . . . . . . . . . . . . . . . . 9 4. Firewalls and Load Balancers . . . . . . . . . . . . . . . . 8
7. Response Code Selection . . . . . . . . . . . . . . . . . . . 9 5. Scrubbing Services . . . . . . . . . . . . . . . . . . . . . 9
8. Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6. Whole Answer Caches . . . . . . . . . . . . . . . . . . . . . 10
8.1. Testing - Basic DNS . . . . . . . . . . . . . . . . . . . 10 7. Response Code Selection . . . . . . . . . . . . . . . . . . . 10
8.2. Testing - Extended DNS . . . . . . . . . . . . . . . . . 12 8. Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
9. Security Considerations . . . . . . . . . . . . . . . . . . . 15 8.1. Testing - Basic DNS . . . . . . . . . . . . . . . . . . . 11
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 8.1.1. Is The Server Configured For The Zone? . . . . . . . 11
11. Normative References . . . . . . . . . . . . . . . . . . . . 16 8.1.2. Testing Unknown Types? . . . . . . . . . . . . . . . 12
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 17 8.1.3. Testing Header Bits . . . . . . . . . . . . . . . . . 12
8.1.4. Testing Unknown Opcodes . . . . . . . . . . . . . . . 13
8.1.5. Testing TCP . . . . . . . . . . . . . . . . . . . . . 13
8.2. Testing - Extended DNS . . . . . . . . . . . . . . . . . 13
8.2.1. Testing Minimal EDNS . . . . . . . . . . . . . . . . 14
8.2.2. Testing EDNS Version Negotiation . . . . . . . . . . 14
8.2.3. Testing Unknown EDNS Options . . . . . . . . . . . . 14
8.2.4. Testing Unknown EDNS Flags . . . . . . . . . . . . . 15
8.2.5. Testing EDNS Version Negotiation With Unknown EDNS
Flags . . . . . . . . . . . . . . . . . . . . . . . . 15
8.2.6. Testing EDNS Version Negotiation With Unknown EDNS
Options . . . . . . . . . . . . . . . . . . . . . . . 16
8.2.7. Testing DNSSEC Queries . . . . . . . . . . . . . . . 16
8.2.8. Testing EDNS Version Negotiation With DNSSEC . . . . 16
8.2.9. Testing With Multiple Defined EDNS Options . . . . . 17
8.2.10. When EDNS Is Not Supported . . . . . . . . . . . . . 17
9. Security Considerations . . . . . . . . . . . . . . . . . . . 17
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 18
11.1. Normative References . . . . . . . . . . . . . . . . . . 18
11.2. Informative References . . . . . . . . . . . . . . . . . 19
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 19
1. Introduction 1. Introduction
The DNS [RFC1034], [RFC1035] is a query / response protocol. Failure The DNS [RFC1034], [RFC1035] is a query / response protocol. Failure
to respond to queries or to respond incorrectly causes both immediate to respond to queries or to respond incorrectly causes both immediate
operational problems and long term problems with protocol operational problems and long term problems with protocol
development. development.
Failure to respond to a query is indistinguishable from a packet loss Failure to respond to a query is indistinguishable from a packet loss
without doing a analysis of query response patterns and results in without doing a analysis of query response patterns and results in
skipping to change at page 3, line 33 skipping to change at page 4, line 6
they are not [RFC1034]. If this was being done regularly, the they are not [RFC1034]. If this was being done regularly, the
instances of broken delegations would be much lower. instances of broken delegations would be much lower.
When a nameserver is under attack it may wish to drop packets. A When a nameserver is under attack it may wish to drop packets. A
common attack is to use a nameserver as a amplifier by sending common attack is to use a nameserver as a amplifier by sending
spoofed packets. This is done because response packets are bigger spoofed packets. This is done because response packets are bigger
than the queries and big amplification factors are available than the queries and big amplification factors are available
especially if EDNS is supported. Limiting the rate of responses is especially if EDNS is supported. Limiting the rate of responses is
reasonable when this is occurring and the client should retry. This reasonable when this is occurring and the client should retry. This
however only works if legitimate clients are not being forced to however only works if legitimate clients are not being forced to
guess whether EDNS queries are accept or not. While there is still a guess whether EDNS queries are accepted or not. While there is still
pool of servers that don't respond to EDNS requests, clients have no a pool of servers that don't respond to EDNS requests, clients have
way to know if the lack of response is due to packet loss, EDNS no way to know if the lack of response is due to packet loss, EDNS
packets not being supported or rate limiting due to the server being packets not being supported or rate limiting due to the server being
under attack. Mis-classifications of server characteristics are under attack. Mis-classifications of server characteristics are
unavoidable when rate limiting is done. unavoidable when rate limiting is done.
2. Common queries kinds that result in non responses. 2. Common queries kinds that result in non responses.
There are three common query kinds that result in non responses There are number common query kinds that result in non responses
today. These are EDNS queries, queries for unknown (unallocated) or today. These are EDNS queries with and without extensions, queries
unsupported types, and filtering of TCP queries. for unknown (unallocated) or unsupported types, and filtering of TCP
queries.
2.1. EDNS Queries - Version Independent 2.1. Basic DNS Queries
2.1.1. Unknown / Unsupported Type Queries
Identifying servers that fail to respond to unknown or unsupported
types can be done by making an initial DNS query for an A record,
making a number of queries for an unallocated type, then making a
query for an A record again. IANA maintains a registry of allocated
types.
If the server responds to the first and last queries but fails to
respond to the queries for the unallocated type, it is probably
faulty. The test should be repeated a number of times to eliminate
the likelihood of a false positive due to packet loss.
2.1.2. DNS Flags
Some servers fail to respond to DNS queries with various DNS flags
set, regardless of whether they are defined or still reserved. At
the time of writing there are servers that fail to respond to queries
with the AD bit set to 1 and servers that fail to respond to queries
with the last reserved flag bit set.
2.1.3. Unknown DNS opcodes
The use of previously undefined opcodes is to be expected. Since the
DNS was first defined two new opcodes have been added, UPDATE and
NOTIFY.
NOTIMP is the expected rcode to an unknown / unimplemented opcode.
Note: while new opcodes will most probably use the current layout
structure for the rest of the message there is no requirement than
anything other than the DNS header match.
2.1.4. TCP Queries
All DNS servers are supposed to respond to queries over TCP
[RFC7766]. Firewalls that drop TCP connection attempts rather that
resetting the connect attempt or send a ICMP/ICMPv6 administratively
prohibited message introduce excessive delays to the resolution
process.
Whether a server accepts TCP connections can be tested by first
checking that it responds to UDP queries to confirm that it is up and
operating, then attempting the same query over TCP. An additional
query should be made over UDP if the TCP connection attempt fails to
confirm that the server under test is still operating.
2.2. EDNS Queries
2.2.1. EDNS Queries - Version Independent
Identifying servers that fail to respond to EDNS queries can be done Identifying servers that fail to respond to EDNS queries can be done
by first identifying that the server responds to regular DNS queries, by first identifying that the server responds to regular DNS queries,
followed by a series of otherwise identical queries using EDNS, then followed by a series of otherwise identical queries using EDNS, then
making the original query again. A series of EDNS queries is needed making the original query again. A series of EDNS queries is needed
as at least one DNS implementation responds to the first EDNS query as at least one DNS implementation responds to the first EDNS query
with FORMERR but fails to respond to subsequent queries from the same with FORMERR but fails to respond to subsequent queries from the same
address for a period until a regular DNS query is made. The EDNS address for a period until a regular DNS query is made. The EDNS
query should specify a UDP buffer size of 512 bytes to avoid false query should specify a UDP buffer size of 512 bytes to avoid false
classification of not supporting EDNS due to response packet size. classification of not supporting EDNS due to response packet size.
If the server responds to the first and last queries but fails to If the server responds to the first and last queries but fails to
respond to most or all of the EDNS queries, it is probably faulty. respond to most or all of the EDNS queries, it is probably faulty.
The test should be repeated a number of times to eliminate the The test should be repeated a number of times to eliminate the
likelihood of a false positive due to packet loss. likelihood of a false positive due to packet loss.
Firewalls may also block larger EDNS responses but there is no easy Firewalls may also block larger EDNS responses but there is no easy
way to check authoritative servers to see if the firewall is way to check authoritative servers to see if the firewall is
misconfigured. misconfigured.
2.2. EDNS Queries - Version Specific 2.2.2. EDNS Queries - Version Specific
Some servers respond correctly to EDNS version 0 queries but fail to Some servers respond correctly to EDNS version 0 queries but fail to
respond to EDNS queries with version numbers that are higher than respond to EDNS queries with version numbers that are higher than
zero. Servers should respond with BADVERS to EDNS queries with zero. Servers should respond with BADVERS to EDNS queries with
version numbers that they do not support. version numbers that they do not support.
Some servers respond correctly to EDNS version 0 queries but fail to Some servers respond correctly to EDNS version 0 queries but fail to
set QR=1 when responding to EDNS versions they do not support. Such set QR=1 when responding to EDNS versions they do not support. Such
answers are discarded or treated as requests. answers are discarded or treated as requests.
2.3. EDNS Options 2.2.3. EDNS Options
Some servers fail to respond to EDNS queries with EDNS options set. Some servers fail to respond to EDNS queries with EDNS options set.
Unknown EDNS options are supposed to be ignored by the server Unknown EDNS options are supposed to be ignored by the server
[RFC6891]. [RFC6891].
2.4. EDNS Flags 2.2.4. EDNS Flags
Some servers fail to respond to EDNS queries with EDNS flags set. Some servers fail to respond to EDNS queries with EDNS flags set.
Server should ignore EDNS flags they do not understand and should not Server should ignore EDNS flags they do not understand and should not
add them to the response [RFC6891]. add them to the response [RFC6891].
2.5. DNS Flags
Some servers fail to respond to DNS queries with various DNS flags
set, regardless of whether they are defined or still reserved. At
the time of writing there are servers that fail to respond to queries
with the AD bit set to 1 and servers that fail to respond to queries
with the last reserved flag bit set.
2.6. Unknown / Unsupported Type Queries
Identifying servers that fail to respond to unknown or unsupported
types can be done by making an initial DNS query for an A record,
making a number of queries for an unallocated type, then making a
query for an A record again. IANA maintains a registry of allocated
types.
If the server responds to the first and last queries but fails to
respond to the queries for the unallocated type, it is probably
faulty. The test should be repeated a number of times to eliminate
the likelihood of a false positive due to packet loss.
2.7. Unknown DNS opcodes
The use of previously undefined opcodes is to be expected. Since the
DNS was first defined two new opcodes have been added, UPDATE and
NOTIFY.
NOTIMP is the expected rcode to an unknown / unimplemented opcode.
Note: while new opcodes will most probably use the current layout
structure for the rest of the message there is no requirement than
anything other than the DNS header match.
2.8. TCP Queries
All DNS servers are supposed to respond to queries over TCP
[RFC5966]. Firewalls that drop TCP connection attempts rather that
resetting the connect attempt or send a ICMP/ICMPv6 administratively
prohibited message introduce excessive delays to the resolution
process.
Whether a server accepts TCP connections can be tested by first
checking that it responds to UDP queries to confirm that it is up and
operating, then attempting the same query over TCP. An additional
query should be made over UDP if the TCP connection attempt fails to
confirm that the server under test is still operating.
3. Remediating 3. Remediating
While the first step in remediating this problem is to get the While the first step in remediating this problem is to get the
offending nameserver code corrected, there is a very long tail offending nameserver code corrected, there is a very long tail
problem with DNS servers in that it can often take over a decade problem with DNS servers in that it can often take over a decade
between the code being corrected and a nameserver being upgraded with between the code being corrected and a nameserver being upgraded with
corrected code. With that in mind it is requested that TLD, and corrected code. With that in mind it is requested that TLD, and
other similar zone operators, take steps to identify and inform their other similar zone operators, take steps to identify and inform their
customers, directly or indirectly through registrars, that they are customers, directly or indirectly through registrars, that they are
running such servers and that the customers need to correct the running such servers and that the customers need to correct the
skipping to change at page 8, line 9 skipping to change at page 8, line 36
from outside of any firewall so that the system as a whole is tested. from outside of any firewall so that the system as a whole is tested.
Firewalls and load balancers should not drop DNS packets that they Firewalls and load balancers should not drop DNS packets that they
don't understand. They should either pass through the packets or don't understand. They should either pass through the packets or
generate an appropriate error response. generate an appropriate error response.
Requests for unknown query types is normal client behaviour and Requests for unknown query types is normal client behaviour and
should not be construed as an attack. Nameservers have always been should not be construed as an attack. Nameservers have always been
expected to be able to handle such queries. expected to be able to handle such queries.
Requests for unknown query classes is normal client behaviour and
should not be construed as an attack. Nameservers have always been
expected to be able to handle such queries.
Requests with unknown opcodes is normal client behaviour and should
not be construed as an attack. Nameservers have always been expected
to be able to handle such queries.
Requests with unassigned flags set (DNS or EDNS) is expected client Requests with unassigned flags set (DNS or EDNS) is expected client
behaviour and should not be construed as an attack. The behaviour behaviour and should not be construed as an attack. The behaviour
for unassigned is to ignore them in the request and to not set them for unassigned is to ignore them in the request and to not set them
in the response. All dropping DNS / EDNS packets with unassigned in the response. All dropping DNS / EDNS packets with unassigned
flags does is make it harder to deploy extensions that make use of flags does is make it harder to deploy extensions that make use of
them due to the need to reconfigure / update firewalls. them due to the need to reconfigure / update firewalls.
Requests with unknown EDNS options is expected client behaviour and Requests with unknown EDNS options is expected client behaviour and
should not be construed as an attack. The correct behaviour for should not be construed as an attack. The correct behaviour for
unknown EDNS options is to ignore there presence when constructing a unknown EDNS options is to ignore there presence when constructing a
skipping to change at page 8, line 32 skipping to change at page 9, line 18
should not be construed as an attack. The correct behaviour for should not be construed as an attack. The correct behaviour for
unknown EDNS versions is to return BADVERS along with the highest unknown EDNS versions is to return BADVERS along with the highest
EDNS version the server supports. All dropping EDNS packets does is EDNS version the server supports. All dropping EDNS packets does is
break EDNS version negotiation. break EDNS version negotiation.
Firewalls should not assume that there will only be a single response Firewalls should not assume that there will only be a single response
message to a requests. There have been proposals to use EDNS to message to a requests. There have been proposals to use EDNS to
signal that multiple DNS messages be returned rather than a single signal that multiple DNS messages be returned rather than a single
UDP message that is fragmented at the IP layer. UDP message that is fragmented at the IP layer.
With the above said, there will be times when a nameserver mishandles
messages with a particular flag, EDNS option, EDNS version field,
opcode, type or class field or combination there of to the point
where the integrity of the nameserver is compromised. Firewalls
should have the ability to selectively reject messages with an
appropriately constructed response based on all these fields while
awaiting a fix from the nameserver vendor.
DNS and EDNS in particular is designed to allow clients to be able to
use new features against older servers without having to ask a
thousand questions to determine what the server supports which takes
time clients do not have. Indiscriminate blocking of messages breaks
that design.
5. Scrubbing Services 5. Scrubbing Services
Scrubbing services, like firewalls, can affect the externally visible Scrubbing services, like firewalls, can affect the externally visible
behaviour of a nameserver. If a operator uses a scrubbing service, behaviour of a nameserver. If a operator uses a scrubbing service,
they should check that legitimate queries are not being blocked. they should check that legitimate queries are not being blocked.
Scrubbing services, unlike firewalls, are also turned on and off in Scrubbing services, unlike firewalls, are also turned on and off in
response to denial of service attacks. One needs to take care when response to denial of service attacks. One needs to take care when
choosing a scrubbing service and ask questions like: choosing a scrubbing service and ask questions like:
skipping to change at page 10, line 22 skipping to change at page 11, line 22
expected error codes. That said a minimal EDNS server implementation expected error codes. That said a minimal EDNS server implementation
just requires parsing the OPT records and responding with an empty just requires parsing the OPT records and responding with an empty
OPT record. There is no need to interpret any EDNS options present OPT record. There is no need to interpret any EDNS options present
in the request as unsupported options are expected to be ignored in the request as unsupported options are expected to be ignored
[RFC6891]. [RFC6891].
8. Testing 8. Testing
Testing is divided into two sections. Basic DNS which all servers Testing is divided into two sections. Basic DNS which all servers
should meet and Extended DNS which should be met by all servers that should meet and Extended DNS which should be met by all servers that
support EDNS. If a server does not support EDNS it should still support EDNS (a server is deemed to support EDNS if it gives a valid
respond to all the tests. EDNS response to any EDNS query). If a server does not support EDNS
it should still respond to all the tests.
It is advisable to run all of the tests below in parallel so as to It is advisable to run all of the tests below in parallel so as to
minimise the delays due to multiple timeouts when the servers do not minimise the delays due to multiple timeouts when the servers do not
respond. respond. There are 16 queries directed to each nameserver assuming
no packet loss testing different aspects of Basic DNS and EDNS.
The tests below use dig from BIND 9.11.0 which is still in The tests below use dig from BIND 9.11.0 which is still in
development. development.
8.1. Testing - Basic DNS 8.1. Testing - Basic DNS
This first set of tests cover basic DNS server behaviour and all This first set of tests cover basic DNS server behaviour and all
servers should pass these tests. servers should pass these tests.
8.1.1. Is The Server Configured For The Zone?
Verify the server is configured for the zone: Verify the server is configured for the zone:
dig +noedns +noad +norec soa $zone @$server dig +noedns +noad +norec soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: SOA record expect: SOA record
expect: flag: aa to be present expect: flag: aa to be present
Check that TCP queries work:
dig +noedns +noad +norec +tcp soa $zone @$server
expect: status: NOERROR
expect: SOA record
expect: flag: aa to be present
The requirement that TCP be supported is defined in [RFC5966]. 8.1.2. Testing Unknown Types?
Check that queries for an unknown type work: Check that queries for an unknown type work:
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
That new types are to be expected is specified in Section 3.6, That new types are to be expected is specified in Section 3.6,
[RFC1035]. Servers that don't support a new type are expected to [RFC1035]. Servers that don't support a new type are expected to
reject a zone that contains a unsupported type as per Section 5.2, reject a zone that contains a unsupported type as per Section 5.2,
[RFC1035]. This means that a server that does load a zone can answer [RFC1035]. This means that a server that does load a zone can answer
questions for unknown types with NOERROR or NXDOMAIN as per questions for unknown types with NOERROR or NXDOMAIN as per
Section 4.3.2, [RFC1034]. [RFC6895] later reserved distinct ranges Section 4.3.2, [RFC1034]. [RFC6895] later reserved distinct ranges
for meta and data types which allows servers to be definitive about for meta and data types which allows servers to be definitive about
whether a query should be answerable from zone content or not. whether a query should be answerable from zone content or not.
8.1.3. Testing Header Bits
8.1.3.1. Testing CD=1 Queries
Check that queries with CD=1 work: Check that queries with CD=1 work:
dig +noedns +noad +norec +cd soa $zone @$server dig +noedns +noad +norec +cd soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: SOA record to be present expect: SOA record to be present
expect: flag: aa to be present expect: flag: aa to be present
CD use in queries is defined in [RFC4035]. CD use in queries is defined in [RFC4035].
8.1.3.2. Testing AD=1 Queries
Check that queries with AD=1 work: Check that queries with AD=1 work:
dig +noedns +norec +ad soa $zone @$server dig +noedns +norec +ad soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: SOA record to be present expect: SOA record to be present
expect: flag: aa to be present expect: flag: aa to be present
AD use in queries is defined in [RFC6840]. AD use in queries is defined in [RFC6840].
8.1.3.3. Testing Reserved Bit
Check that queries with the last unassigned DNS header flag work and Check that queries with the last unassigned DNS header flag work and
that the flag bit is not copied to the response: that the flag bit is not copied to the response:
dig +noedns +noad +norec +zflag soa $zone @$server dig +noedns +noad +norec +zflag soa $zone @$server
expect: status: NOERROR expect: status: NOERROR
expect: SOA record to be present expect: SOA record to be present
expect: MBZ to not be in the response expect: MBZ to not be in the response
expect: flag: aa to be present expect: flag: aa to be present
MBZ (Must Be Zero) presence indicates the flag bit has been MBZ (Must Be Zero) presence indicates the flag bit has been
incorrectly copied. See Section 4.1.1, [RFC1035] "Z Reserved for incorrectly copied. See Section 4.1.1, [RFC1035] "Z Reserved for
future use. Must be zero in all queries and responses." future use. Must be zero in all queries and responses."
8.1.4. Testing Unknown Opcodes
Check that new opcodes are handled: Check that new opcodes are handled:
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: SOA record to not be present expect: SOA record to not be present
expect: flag: aa to NOT be present expect: flag: aa to NOT be present
As unknown opcodes have no definition, including packet format other As unknown opcodes have no definition, including packet format other
than there must be a DNS header present, there is only one possible than there must be a DNS header present, there is only one possible
rcode that make sense to return to a request with a unknown opcode rcode that make sense to return to a request with a unknown opcode
and that is NOTIMP. and that is NOTIMP.
8.1.5. Testing TCP
Check that TCP queries work:
dig +noedns +noad +norec +tcp soa $zone @$server
expect: status: NOERROR
expect: SOA record
expect: flag: aa to be present
The requirement that TCP be supported is defined in [RFC7766].
8.2. Testing - Extended DNS 8.2. Testing - Extended DNS
The next set of test cover various aspects of EDNS behaviour. If any The next set of test cover various aspects of EDNS behaviour. If any
of these tests succeed, then all of them should succeed. There are of these tests succeed, then all of them should succeed. There are
servers that support EDNS but fail to handle plain EDNS queries servers that support EDNS but fail to handle plain EDNS queries
correctly so a plain EDNS query is not a good indicator of lack of correctly so a plain EDNS query is not a good indicator of lack of
EDNS support. EDNS support.
8.2.1. Testing Minimal EDNS
Check that plain EDNS queries work: Check that plain EDNS queries work:
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: SOA record to be present expect: SOA record to be present
expect: OPT record to be present expect: OPT record 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
+nocookie disables sending a EDNS COOKIE option in which is on by +nocookie disables sending a EDNS COOKIE option in which is on by
default. default.
8.2.2. Testing EDNS Version Negotiation
Check that EDNS version 1 queries work (EDNS supported): Check that EDNS version 1 queries work (EDNS supported):
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: SOA record to not be present expect: SOA record to not be present
expect: OPT record to be present expect: OPT record 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
Only EDNS Version 0 is currently defined so the response should Only EDNS Version 0 is currently defined so the response should
always be a 0 version. This will change when EDNS version 1 is always be a 0 version. This will change when EDNS version 1 is
defined. BADVERS is the expected rcode if EDNS is supported as per defined. BADVERS is the expected rcode if EDNS is supported as per
Section 6.1.3, [RFC6891]. Section 6.1.3, [RFC6891].
8.2.3. Testing Unknown EDNS Options
Check that EDNS queries with an unknown option work (EDNS supported): Check that EDNS queries with an unknown option work (EDNS supported):
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: SOA record to be present expect: SOA record to be present
expect: OPT record to be present expect: OPT record to be present
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
Unknown EDNS options are supposed to be ignored, Section 6.1.2, Unknown EDNS options are supposed to be ignored, Section 6.1.2,
[RFC6891]. [RFC6891].
8.2.4. Testing Unknown EDNS Flags
Check that EDNS queries with unknown flags work (EDNS supported): Check that EDNS queries with unknown flags work (EDNS supported):
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: SOA record to be present expect: SOA record to be present
expect: OPT record to be present expect: OPT record to be present
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
MBZ (Must Be Zero) presence indicates the flag bit has been MBZ (Must Be Zero) presence indicates the flag bit has been
incorrectly copied as per Section 6.1.4, [RFC6891]. incorrectly copied as per Section 6.1.4, [RFC6891].
8.2.5. Testing EDNS Version Negotiation With Unknown EDNS Flags
Check that EDNS version 1 queries with unknown flags work (EDNS Check that EDNS version 1 queries with unknown flags work (EDNS
supported): supported):
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: OPT record to be present expect: OPT record to be present
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
+noednsneg disables EDNS version negotiation in DiG; MBZ (Must Be +noednsneg disables EDNS version negotiation in DiG; MBZ (Must Be
Zero) presence indicates the flag bit has been incorrectly copied. Zero) presence indicates the flag bit has been incorrectly copied.
8.2.6. Testing EDNS Version Negotiation With Unknown EDNS Options
Check that EDNS version 1 queries with unknown options work (EDNS Check that EDNS version 1 queries with unknown options work (EDNS
supported): supported):
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: OPT record to be present expect: OPT record to be present
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
+noednsneg disables EDNS version negotiation in DiG. +noednsneg disables EDNS version negotiation in DiG.
8.2.7. Testing DNSSEC Queries
Check that a DNSSEC queries work (EDNS supported): Check that a DNSSEC queries work (EDNS supported):
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: SOA record to be present expect: SOA record to be present
expect: OPT record to be present expect: OPT record to be present
expect: DO=1 to be present if a RRSIG is in the response expect: DO=1 to be present if a 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
DO=1 should be present if RRSIGs are returned as they indicate that DO=1 should be present if RRSIGs are returned as they indicate that
the server supports DNSSEC. Servers that support DNSSEC are supposed the server supports DNSSEC. Servers that support DNSSEC are supposed
to copy the DO bit from the request to the response as per [RFC3225]. to copy the DO bit from the request to the response as per [RFC3225].
8.2.8. Testing EDNS Version Negotiation With DNSSEC
Check that EDNS version 1 DNSSEC queries work (EDNS supported): Check that EDNS version 1 DNSSEC queries work (EDNS supported):
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: OPT record to be present expect: OPT record to be present
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
+noednsneg disables EDNS version negotiation in DiG. +noednsneg disables EDNS version negotiation in DiG.
8.2.9. Testing With Multiple Defined EDNS Options
Check that EDNS queries with multiple defined EDNS options work: Check that EDNS queries with multiple defined EDNS options work:
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: SOA record to be present expect: SOA record to be present
expect: OPT record to be present expect: OPT record 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
8.2.10. When EDNS Is Not Supported
If EDNS is not supported by the nameserver, we expect a response to If EDNS is not supported by the nameserver, we expect a response to
all the above queries. That response may be a FORMERR or NOTIMP all the above queries. That response may be a FORMERR or NOTIMP
error response or the OPT record may just be ignored. error response or the OPT record may just be ignored.
Some nameservers only return a EDNS response when a particular EDNS Some nameservers only return a EDNS response when a particular EDNS
option or flag (e.g. DO=1) is present in the request. This option or flag (e.g. DO=1) is present in the request. This
behaviour is not compliant behaviour and may hide other incorrect behaviour is not compliant behaviour and may hide other incorrect
behaviour from the above tests. Re-testing with the triggering behaviour from the above tests. Re-testing with the triggering
option / flag present will expose this misbehaviour. option / flag present will expose this misbehaviour.
skipping to change at page 16, line 4 skipping to change at page 18, line 7
Testing protocol compliance can potentially result in false reports Testing protocol compliance can potentially result in false reports
of attempts to break services from Intrusion Detection Services and of attempts to break services from Intrusion Detection Services and
firewalls. None of the tests listed above should break nominally firewalls. None of the tests listed above should break nominally
EDNS compliant servers. None of the tests above should break non EDNS compliant servers. None of the tests above should break non
EDNS servers. All the tests above are well formed, though not EDNS servers. All the tests above are well formed, though not
necessarily common, DNS queries. necessarily common, DNS queries.
Relaxing firewall settings to ensure EDNS compliance could Relaxing firewall settings to ensure EDNS compliance could
potentially expose a critical implementation flaw in the nameserver. potentially expose a critical implementation flaw in the nameserver.
Nameservers should be tested for conformance before relaxing firewall Nameservers should be tested for conformance before relaxing firewall
settings. settings.
When removing delegations for non-compliant servers there can be a When removing delegations for non-compliant servers there can be a
knock on effect on other zones that require these zones to be knock on effect on other zones that require these zones to be
operational for the nameservers addresses to be resolved. operational for the nameservers addresses to be resolved.
10. IANA Considerations 10. IANA Considerations
IANA / ICANN needs to consider what tests, if any, from above that it There are no actions for IANA.
should add to the zone maintenance procedures for zones under its
control including pre-delegation checks. Otherwise this document has
no actions for IANA.
11. Normative References 11. References
[RFC1033] Lottor, M., "Domain Administrators Operations Guide", 11.1. Normative References
RFC 1033, DOI 10.17487/RFC1033, November 1987,
<http://www.rfc-editor.org/info/rfc1033>.
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities", [RFC1034] Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987,
<http://www.rfc-editor.org/info/rfc1034>. <http://www.rfc-editor.org/info/rfc1034>.
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
November 1987, <http://www.rfc-editor.org/info/rfc1035>. November 1987, <http://www.rfc-editor.org/info/rfc1035>.
[RFC3225] Conrad, D., "Indicating Resolver Support of DNSSEC", [RFC3225] Conrad, D., "Indicating Resolver Support of DNSSEC",
RFC 3225, DOI 10.17487/RFC3225, December 2001, RFC 3225, DOI 10.17487/RFC3225, December 2001,
<http://www.rfc-editor.org/info/rfc3225>. <http://www.rfc-editor.org/info/rfc3225>.
[RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Protocol Modifications for the DNS Security Rose, "Protocol Modifications for the DNS Security
Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005,
<http://www.rfc-editor.org/info/rfc4035>. <http://www.rfc-editor.org/info/rfc4035>.
[RFC5966] Bellis, R., "DNS Transport over TCP - Implementation
Requirements", RFC 5966, DOI 10.17487/RFC5966, August
2010, <http://www.rfc-editor.org/info/rfc5966>.
[RFC6840] Weiler, S., Ed. and D. Blacka, Ed., "Clarifications and [RFC6840] Weiler, S., Ed. and D. Blacka, Ed., "Clarifications and
Implementation Notes for DNS Security (DNSSEC)", RFC 6840, Implementation Notes for DNS Security (DNSSEC)", RFC 6840,
DOI 10.17487/RFC6840, February 2013, DOI 10.17487/RFC6840, February 2013,
<http://www.rfc-editor.org/info/rfc6840>. <http://www.rfc-editor.org/info/rfc6840>.
[RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms
for DNS (EDNS(0))", STD 75, RFC 6891, for DNS (EDNS(0))", STD 75, RFC 6891,
DOI 10.17487/RFC6891, April 2013, DOI 10.17487/RFC6891, April 2013,
<http://www.rfc-editor.org/info/rfc6891>. <http://www.rfc-editor.org/info/rfc6891>.
[RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA
Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895,
April 2013, <http://www.rfc-editor.org/info/rfc6895>. April 2013, <http://www.rfc-editor.org/info/rfc6895>.
[RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and
D. Wessels, "DNS Transport over TCP - Implementation
Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016,
<http://www.rfc-editor.org/info/rfc7766>.
11.2. Informative References
[RFC1033] Lottor, M., "Domain Administrators Operations Guide",
RFC 1033, DOI 10.17487/RFC1033, November 1987,
<http://www.rfc-editor.org/info/rfc1033>.
Author's Address Author's Address
M. Andrews M. Andrews
Internet Systems Consortium Internet Systems Consortium
950 Charter Street 950 Charter Street
Redwood City, CA 94063 Redwood City, CA 94063
US US
Email: marka@isc.org Email: marka@isc.org
 End of changes. 39 change blocks. 
107 lines changed or deleted 193 lines changed or added

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