< draft-ietf-dnsop-avoid-fragmentation-01.txt   draft-ietf-dnsop-avoid-fragmentation-02.txt >
Network Working Group K. Fujiwara Network Working Group K. Fujiwara
Internet-Draft JPRS Internet-Draft JPRS
Intended status: Best Current Practice P. Vixie Intended status: Best Current Practice P. Vixie
Expires: January 29, 2021 Farsight Expires: March 19, 2021 Farsight
July 28, 2020 September 15, 2020
Fragmentation Avoidance in DNS Fragmentation Avoidance in DNS
draft-ietf-dnsop-avoid-fragmentation-01 draft-ietf-dnsop-avoid-fragmentation-02
Abstract Abstract
EDNS0 enables a DNS server to send large responses using UDP and is EDNS0 enables a DNS server to send large responses using UDP and is
widely deployed. Path MTU discovery remains widely undeployed due to widely deployed. Path MTU discovery remains widely undeployed due to
security issues, and IP fragmentation has exposed weaknesses in security issues, and IP fragmentation has exposed weaknesses in
application protocols. Currently, DNS is known to be the largest application protocols. Currently, DNS is known to be the largest
user of IP fragmentation. It is possible to avoid IP fragmentation user of IP fragmentation. It is possible to avoid IP fragmentation
in DNS by limiting response size where possible, and signaling the in DNS by limiting response size where possible, and signaling the
need to upgrade from UDP to TCP transport where necessary. This need to upgrade from UDP to TCP transport where necessary. This
skipping to change at page 1, line 38 skipping to change at page 1, line 38
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 https://datatracker.ietf.org/drafts/current/. Drafts is at https://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 January 29, 2021. This Internet-Draft will expire on March 19, 2021.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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 . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Proposal to avoid IP fragmentation in DNS . . . . . . . . . . 3 3. Proposal to avoid IP fragmentation in DNS . . . . . . . . . . 4
3.1. Recommendations for UDP requestors . . . . . . . . . . . 4
3.2. Recommendations for UDP responders . . . . . . . . . . . 4
4. Maximum DNS/UDP payload size . . . . . . . . . . . . . . . . 5 4. Maximum DNS/UDP payload size . . . . . . . . . . . . . . . . 5
5. Incremental deployment . . . . . . . . . . . . . . . . . . . 5 5. Incremental deployment . . . . . . . . . . . . . . . . . . . 6
6. Request to zone operators and DNS server operators . . . . . 6 6. Request to zone operators and DNS server operators . . . . . 6
7. Considerations . . . . . . . . . . . . . . . . . . . . . . . 6 7. Considerations . . . . . . . . . . . . . . . . . . . . . . . 6
7.1. Protocol compliance . . . . . . . . . . . . . . . . . . . 6 7.1. Protocol compliance . . . . . . . . . . . . . . . . . . . 6
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
9. Security Considerations . . . . . . . . . . . . . . . . . . . 7 9. Security Considerations . . . . . . . . . . . . . . . . . . . 7
10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
11.1. Normative References . . . . . . . . . . . . . . . . . . 7 11.1. Normative References . . . . . . . . . . . . . . . . . . 7
11.2. Informative References . . . . . . . . . . . . . . . . . 8 11.2. Informative References . . . . . . . . . . . . . . . . . 8
Appendix A. How to retrieve path MTU value to a destination from Appendix A. How to retrieve path MTU value to a destination from
applications . . . . . . . . . . . . . . . . . . . . 9 applications . . . . . . . . . . . . . . . . . . . . 9
Appendix B. Minimal-responses . . . . . . . . . . . . . . . . . 9 Appendix B. Minimal-responses . . . . . . . . . . . . . . . . . 9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
skipping to change at page 3, line 20 skipping to change at page 3, line 22
A DNS message receiver cannot trust fragmented UDP datagrams A DNS message receiver cannot trust fragmented UDP datagrams
primarily due to the small amount of entropy provided by UDP port primarily due to the small amount of entropy provided by UDP port
numbers and DNS message identifiers, each of which being only 16 bits numbers and DNS message identifiers, each of which being only 16 bits
in size, and both likely being in the first fragment of a packet, if in size, and both likely being in the first fragment of a packet, if
fragmentation occurs. By comparison, TCP protocol stack controls fragmentation occurs. By comparison, TCP protocol stack controls
packet size and avoid IP fragmentation under ICMP NEEDFRAG attacks. packet size and avoid IP fragmentation under ICMP NEEDFRAG attacks.
In TCP, fragmentation should be avoided for performance reasons, In TCP, fragmentation should be avoided for performance reasons,
whereas for UDP, fragmentation should be avoided for resiliency and whereas for UDP, fragmentation should be avoided for resiliency and
authenticity reasons. authenticity reasons.
[I-D.ietf-intarea-frag-fragile] summarized that IP fragmentation [RFC8900] summarized that IP fragmentation introduces fragility to
introduces fragility to Internet communication. The transport of DNS Internet communication. The transport of DNS messages over UDP
messages over UDP should take account of the observations stated in should take account of the observations stated in that document.
that document.
TCP avoids fragmentation using its Maximum Segment Size (MSS)
parameter, but each transmitted segment is header-size aware such
that the size of the IP and TCP headers is known, as well as the far
end's MSS parameter and the interface or path MTU, so that the
segment size can be chosen so as to keep the each IP datagram below a
target size. This takes advantage of the elasticity of TCP's
packetizing process as to how much queued data will fit into the next
segment. In contrast, DNS over UDP has little datagram size
elasticity and lacks insight into IP header and option size, and so
must make more conservative estimates about available UDP payload
space.
This document proposes to avoid IP fragmentation in DNS/UDP. This document proposes to avoid IP fragmentation in DNS/UDP.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
skipping to change at page 3, line 38 skipping to change at page 4, line 4
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
"Requestor" refers to the side that sends a request. "Responder" "Requestor" refers to the side that sends a request. "Responder"
refers to an authoritative, recursive resolver or other DNS component refers to an authoritative, recursive resolver or other DNS component
that responds to questions. (Quoted from EDNS0 [RFC6891]) that responds to questions. (Quoted from EDNS0 [RFC6891])
"Path MTU" is the minimum link MTU of all the links in a path between "Path MTU" is the minimum link MTU of all the links in a path between
a source node and a destination node. (Quoted from [RFC8201]) a source node and a destination node. (Quoted from [RFC8201])
"Path MTU discovery" is defined by [RFC1191], [RFC8201] and
[RFC8899].
Many of the specialized terms used in this document are defined in Many of the specialized terms used in this document are defined in
DNS Terminology [RFC8499]. DNS Terminology [RFC8499].
3. Proposal to avoid IP fragmentation in DNS 3. Proposal to avoid IP fragmentation in DNS
TCP avoids fragmentation using its Maximum Segment Size (MSS) The methods to avoid IP fragmentation in DNS are described below:
parameter, but each transmitted segment is header-size aware such
that the size of the IP and TCP headers is known, as well as the far
end's MSS parameter and the interface or path MTU, so that the
segment size can be chosen so as to keep the each IP datagram below a
target size. This takes advantage of the elasticity of TCP's
packetizing process as to how much queued data will fit into the next
segment. In contrast, DNS over UDP has little datagram size
elasticity and lacks insight into IP header and option size, and so
must make more conservative estimates about available UDP payload
space.
The minimum MTU for an IPv4 interface is 68 octets, and all receivers 3.1. Recommendations for UDP requestors
must be able to receive and reassemble datagrams at least 576 octets
in size (see Section 2.1, NOTE 1 of [I-D.ietf-intarea-frag-fragile]).
The minimum MTU for an IPv6 interface is 1280 octets (see Section 5
of [RFC8200]). These are theoretic limits and no modern networks
implement them. In practice, the smallest MTU witnessed in the
operational DNS community is 1500 octets, the Ethernet maximum
payload size. While many non-Ethernet networks exist such as Packet
on SONET (PoS), Fiber Distributed Data Exchange (FDDI), and Ethernet
Jumbo Frame, there is currently no reliable way of discovering such
links in an IP transmission path. Absent some kind of path MTU
discovery result or a static configuration by the server or system
operator, a conservative estimate must be chosen, even if it is less
efficient than the path MTU would have been had that been
discoverable.
The methods to avoid IP fragmentation in DNS are described below: o UDP requestors SHOULD send DNS responses with IP_DONTFRAG /
IPV6_DONTFRAG [RFC3542] options.
o UDP requestors and responders SHOULD send DNS responses with o UDP requestors MAY probe to discover the real MTU value per
IP_DONTFRAG / IPV6_DONTFRAG [RFC3542] options, which will yield destination. If the path MTU discovery failed or is impossible,
either a silent timeout, or a network (ICMP) error, if the path use the default path MTU described in Section 4.
MTU is exceeded. Upon a timeout, UDP requestors may retry using
TCP or UDP, per local policy.
o The estimated maximum DNS/UDP payload size SHOULD be the o UDP reqoestors SHOULD use the requestor's payload size to limit
discovered or estimated path MTU minus the estimated header space. the path MTU value minus the IP header length and UDP header
Path MTU discovery [RFC1191], [RFC8201] and length. Of course, as in the conventional case, a specified value
[I-D.ietf-tsvwg-datagram-plpmtud] may discover real path MTU value (1220 or 1232) as the requestor's payload size may be used.
to destinations. One method to retrieve path MTU value is
described in Appendix A. When discovered path MTU information is
not available, a message sender SHOULD use the default maximum
DNS/UDP payload size described in following section.
o The maximum buffer size offered by an EDNS0 initiator SHOULD be no o UDP requestors MAY drop fragmented DNS/UDP responses without IP
larger than the estimated maximum DNS/UDP payload size. If the reassembly to avoid cache poisoning attacks.
desired response cannot be reasonably expected to fit into a
buffer of that size, the initiator should use TCP instead of UDP.
o Responders SHOULD compose UDP responses that result in IP packets o DNS responses may be dropped by IP fragmentation. Upon a timeout,
that do not exceed the path MTU to the requestor. Thus, if the UDP requestors may retry using TCP or UDP, per local policy.
requestor offers a buffer size larger than responder's discovered
or estimated maximum DNS/UDP payload size, then the responder will
behave as though the requestor had specified a buffer size equal
to the responder's estimated maximum DNS/UDP payload size.
o Fragmented DNS/UDP messages may be dropped without IP reassembly. 3.2. Recommendations for UDP responders
An ICMP error should be sent in this case, with rate limiting to
prevent this logic from becoming a DDoS amplification vector. If
rate limiting is not possible, then no ICMP error should be sent.
(This is a countermeasure against DNS spoofing attacks using IP
fragmentation.)
The cause and effect of the TC bit is unchanged from EDNS0 [RFC6891]. o UDP responders SHOULD send DNS responses with IP_DONTFRAG /
IPV6_DONTFRAG [RFC3542] options.
o UDP responders MAY probe to discover the real MTU value per
destination. If the path MTU discovery failed or is impossible,
use the default path MTU described in Section 4.
o UDP responders SHOULD compose UDP responses that result in IP
packets that do not exceed the path MTU to the requestor. Of
course, as in the conventional case, a specified value (1220 or
1232) as the DNS packet size limit may be used.
The cause and effect of the TC bit is unchanged from EDNS0
[RFC6891].
4. Maximum DNS/UDP payload size 4. Maximum DNS/UDP payload size
Default path MTU value for IPv6 is XXXX. Default path MTU value for
IPv4 is XXXX.
Discussions under here will be deleted when the discussion is over.
There are many discussions for default path MTU values.
o The minimum MTU for an IPv6 interface is 1280 octets (see
Section 5 of [RFC8200]). Then, we can use it as default path MTU
value for IPv6.
o Most of the Internet and especially the inner core has an MTU of o Most of the Internet and especially the inner core has an MTU of
at least 1500 octets. An operator of a full resolver would be at least 1500 octets. An operator of a full resolver would be
well advised to measure their path MTU to several authority name well advised to measure their path MTU to several authority name
servers and to a random sample of their expected stub resolver servers and to a random sample of their expected stub resolver
client networks, to find the upper boundary on IP/UDP packet size client networks, to find the upper boundary on IP/UDP packet size
in the average case. This limit should not be exceeded by most in the average case. This limit should not be exceeded by most
messages received or transmitted by a full resolver, or else messages received or transmitted by a full resolver, or else
fallback to TCP will occur too often. An operator of fallback to TCP will occur too often. An operator of
authoritative servers would also be well advised to measure their authoritative servers would also be well advised to measure their
path MTU to several full-service resolvers. The Linux tool path MTU to several full-service resolvers. The Linux tool
skipping to change at page 5, line 46 skipping to change at page 5, line 48
o [RFC4035] defines that "A security-aware name server MUST support o [RFC4035] defines that "A security-aware name server MUST support
the EDNS0 message size extension, MUST support a message size of the EDNS0 message size extension, MUST support a message size of
at least 1220 octets". Then, the smallest number of the maximum at least 1220 octets". Then, the smallest number of the maximum
DNS/UDP payload size is 1220. DNS/UDP payload size is 1220.
o DNS flag day 2020 proposed 1232 as an EDNS buffer size. o DNS flag day 2020 proposed 1232 as an EDNS buffer size.
[DNSFlagDay2020] By the above reasoning, this proposal is either [DNSFlagDay2020] By the above reasoning, this proposal is either
too small or too large. too small or too large.
It is considered that these arguments are diverted from IPv6
values because most IPv4 links have path MTU values larger than or
equal to the minimum MTU value of IPv6.
5. Incremental deployment 5. Incremental deployment
The proposed method supports incremental deployment. The proposed method supports incremental deployment.
When a full-service resolver implements the proposed method, its stub When a full-service resolver implements the proposed method, its stub
resolvers (clients) and the authority server network will no longer resolvers (clients) and the authority server network will no longer
observe IP fragmentation or reassembly from that server, and will observe IP fragmentation or reassembly from that server, and will
fall back to TCP when necessary. fall back to TCP when necessary.
When an authoritative server implements the proposed method, its full When an authoritative server implements the proposed method, its full
skipping to change at page 7, line 10 skipping to change at page 7, line 14
8. IANA Considerations 8. IANA Considerations
This document has no IANA actions. This document has no IANA actions.
9. Security Considerations 9. Security Considerations
10. Acknowledgments 10. Acknowledgments
The author would like to specifically thank Paul Wouters, Mukund The author would like to specifically thank Paul Wouters, Mukund
Sivaraman for extensive review and comments. Sivaraman and Tony Finch for extensive review and comments.
11. References 11. References
11.1. Normative References 11.1. Normative References
[I-D.ietf-intarea-frag-fragile]
Bonica, R., Baker, F., Huston, G., Hinden, R., Troan, O.,
and F. Gont, "IP Fragmentation Considered Fragile", draft-
ietf-intarea-frag-fragile-17 (work in progress), September
2019.
[I-D.ietf-tsvwg-datagram-plpmtud]
Fairhurst, G., Jones, T., Tuexen, M., Ruengeler, I., and
T. Voelker, "Packetization Layer Path MTU Discovery for
Datagram Transports", draft-ietf-tsvwg-datagram-plpmtud-22
(work in progress), June 2020.
[RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191,
DOI 10.17487/RFC1191, November 1990, DOI 10.17487/RFC1191, November 1990,
<https://www.rfc-editor.org/info/rfc1191>. <https://www.rfc-editor.org/info/rfc1191>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC3542] Stevens, W., Thomas, M., Nordmark, E., and T. Jinmei, [RFC3542] Stevens, W., Thomas, M., Nordmark, E., and T. Jinmei,
skipping to change at page 8, line 36 skipping to change at page 8, line 27
[RFC8201] McCann, J., Deering, S., Mogul, J., and R. Hinden, Ed., [RFC8201] McCann, J., Deering, S., Mogul, J., and R. Hinden, Ed.,
"Path MTU Discovery for IP version 6", STD 87, RFC 8201, "Path MTU Discovery for IP version 6", STD 87, RFC 8201,
DOI 10.17487/RFC8201, July 2017, DOI 10.17487/RFC8201, July 2017,
<https://www.rfc-editor.org/info/rfc8201>. <https://www.rfc-editor.org/info/rfc8201>.
[RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS [RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS
Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499,
January 2019, <https://www.rfc-editor.org/info/rfc8499>. January 2019, <https://www.rfc-editor.org/info/rfc8499>.
[RFC8899] Fairhurst, G., Jones, T., Tuexen, M., Ruengeler, I., and
T. Voelker, "Packetization Layer Path MTU Discovery for
Datagram Transports", RFC 8899, DOI 10.17487/RFC8899,
September 2020, <https://www.rfc-editor.org/info/rfc8899>.
[RFC8900] Bonica, R., Baker, F., Huston, G., Hinden, B., Troan, O.,
and F. Gont, "IP Fragmentation Considered Fragile",
BCP 230, RFC 8900, DOI 10.17487/RFC8900, September 2020,
<https://www.rfc-editor.org/info/rfc8900>.
11.2. Informative References 11.2. Informative References
[Brandt2018] [Brandt2018]
Brandt, M., Dai, T., Klein, A., Shulman, H., and M. Brandt, M., Dai, T., Klein, A., Shulman, H., and M.
Waidner, "Domain Validation++ For MitM-Resilient PKI", Waidner, "Domain Validation++ For MitM-Resilient PKI",
Proceedings of the 2018 ACM SIGSAC Conference on Computer Proceedings of the 2018 ACM SIGSAC Conference on Computer
and Communications Security , 2018. and Communications Security , 2018.
[DNSFlagDay2020] [DNSFlagDay2020]
"DNS flag day 2020", n.d., <https://dnsflagday.net/2020/>. "DNS flag day 2020", n.d., <https://dnsflagday.net/2020/>.
 End of changes. 23 change blocks. 
82 lines changed or deleted 82 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/