draft-ietf-tsvwg-udp-guidelines-01.txt | draft-ietf-tsvwg-udp-guidelines-02.txt | |||
---|---|---|---|---|
Transport Area Working Group L. Eggert | Transport Area Working Group L. Eggert | |||
Internet-Draft Nokia | Internet-Draft Nokia | |||
Intended status: Best Current G. Fairhurst | Intended status: Best Current G. Fairhurst | |||
Practice University of Aberdeen | Practice University of Aberdeen | |||
Expires: December 13, 2007 June 11, 2007 | Expires: January 10, 2008 July 9, 2007 | |||
UDP Usage Guidelines for Application Designers | UDP Usage Guidelines for Application Designers | |||
draft-ietf-tsvwg-udp-guidelines-01 | draft-ietf-tsvwg-udp-guidelines-02 | |||
Status of this Memo | Status of this Memo | |||
By submitting this Internet-Draft, each author represents that any | By submitting this Internet-Draft, each author represents that any | |||
applicable patent or other IPR claims of which he or she is aware | applicable patent or other IPR claims of which he or she is aware | |||
have been or will be disclosed, and any of which he or she becomes | have been or will be disclosed, and any of which he or she becomes | |||
aware will be disclosed, in accordance with Section 6 of BCP 79. | aware will be disclosed, in accordance with Section 6 of BCP 79. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
skipping to change at page 1, line 35 | skipping to change at page 1, line 35 | |||
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." | |||
The list of current Internet-Drafts can be accessed at | The list of current Internet-Drafts can be accessed at | |||
http://www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
This Internet-Draft will expire on December 13, 2007. | This Internet-Draft will expire on January 10, 2008. | |||
Copyright Notice | Copyright Notice | |||
Copyright (C) The IETF Trust (2007). | Copyright (C) The IETF Trust (2007). | |||
Abstract | Abstract | |||
The User Datagram Protocol (UDP) provides a minimal, message-passing | The User Datagram Protocol (UDP) provides a minimal, message-passing | |||
transport that has no inherent congestion control mechanisms. | transport that has no inherent congestion control mechanisms. | |||
Because congestion control is critical to the stable operation of the | Because congestion control is critical to the stable operation of the | |||
Internet, applications and upper-layer protocols that choose to use | Internet, applications and upper-layer protocols that choose to use | |||
UDP as an Internet transport must employ mechanisms to prevent | UDP as an Internet transport must employ mechanisms to prevent | |||
congestion collapse and establish some degree of fairness with | congestion collapse and establish some degree of fairness with | |||
concurrent traffic. This document provides guidelines on the use of | concurrent traffic. This document provides guidelines on the use of | |||
UDP for the designers of such applications and upper-layer protocols | UDP for the designers of such applications and upper-layer protocols | |||
that cover congestion-control and other topics, including message | that cover congestion-control and other topics, including message | |||
sizes and reliability. | sizes, reliability, checksums and middlebox traversal. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
3. UDP Usage Guidelines . . . . . . . . . . . . . . . . . . . . . 4 | 3. UDP Usage Guidelines . . . . . . . . . . . . . . . . . . . . . 4 | |||
3.1. Congestion Control Guidelines . . . . . . . . . . . . . . 5 | 3.1. Congestion Control Guidelines . . . . . . . . . . . . . . 5 | |||
3.2. Message Size Guidelines . . . . . . . . . . . . . . . . . 7 | 3.2. Message Size Guidelines . . . . . . . . . . . . . . . . . 7 | |||
3.3. Reliability Guidelines . . . . . . . . . . . . . . . . . . 7 | 3.3. Reliability Guidelines . . . . . . . . . . . . . . . . . . 8 | |||
3.4. Checksum Guidelines . . . . . . . . . . . . . . . . . . . 8 | 3.4. Checksum Guidelines . . . . . . . . . . . . . . . . . . . 8 | |||
3.5. Middlebox Traversal Guidelines . . . . . . . . . . . . . . 9 | 3.5. Middlebox Traversal Guidelines . . . . . . . . . . . . . . 10 | |||
4. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | 4. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | |||
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | |||
6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 11 | 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
7.1. Normative References . . . . . . . . . . . . . . . . . . . 11 | 7.1. Normative References . . . . . . . . . . . . . . . . . . . 11 | |||
7.2. Informative References . . . . . . . . . . . . . . . . . . 12 | 7.2. Informative References . . . . . . . . . . . . . . . . . . 12 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 14 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
Intellectual Property and Copyright Statements . . . . . . . . . . 15 | Intellectual Property and Copyright Statements . . . . . . . . . . 15 | |||
1. Introduction | 1. Introduction | |||
The User Datagram Protocol (UDP) [RFC0768] provides a minimal, | The User Datagram Protocol (UDP) [RFC0768] provides a minimal, | |||
unreliable, message-passing transport to applications and upper-layer | unreliable, best-effort, message-passing transport to applications | |||
protocols (both simply called "applications" in the remainder of this | and upper-layer protocols (both simply called "applications" in the | |||
document). Compared to other transport protocols, UDP and its UDP- | remainder of this document). Compared to other transport protocols, | |||
Lite variant [RFC3828] are unique in that they do not establish end- | UDP and its UDP-Lite variant [RFC3828] are unique in that they do not | |||
to-end connections between communicating end systems. UDP | establish end-to-end connections between communicating end systems. | |||
communication consequently does not incur connection establishment | UDP communication consequently does not incur connection | |||
and teardown overheads and there is no associated end system state. | establishment and teardown overheads and there is no associated end | |||
Because of these characteristics, UDP can offer a very efficient | system state. Because of these characteristics, UDP can offer a very | |||
communication transport to some applications. | efficient communication transport to some applications. | |||
A second unique characteristic of UDP is that it provides no inherent | A second unique characteristic of UDP is that it provides no inherent | |||
congestion control mechanisms. [RFC2914] describes the best current | congestion control mechanisms. [RFC2914] describes the best current | |||
practice for congestion control in the Internet. It identifies two | practice for congestion control in the Internet. It identifies two | |||
major reasons why congestion control mechanisms are critical for the | major reasons why congestion control mechanisms are critical for the | |||
stable operation of the Internet: | stable operation of the Internet: | |||
1. The prevention of congestion collapse, i.e., a state where an | 1. The prevention of congestion collapse, i.e., a state where an | |||
increase in network load results in a decrease in useful work | increase in network load results in a decrease in useful work | |||
done by the network. | done by the network. | |||
skipping to change at page 3, line 50 | skipping to change at page 3, line 50 | |||
application that generates five 1500-byte UDP packets in one second | application that generates five 1500-byte UDP packets in one second | |||
can already exceed the capacity of a 56 Kb/s path. For applications | can already exceed the capacity of a 56 Kb/s path. For applications | |||
that can operate at higher, potentially unbounded data rates, | that can operate at higher, potentially unbounded data rates, | |||
congestion control becomes vital to prevent congestion collapse and | congestion control becomes vital to prevent congestion collapse and | |||
establish some degree of fairness. Section 3 describes a number of | establish some degree of fairness. Section 3 describes a number of | |||
simple guidelines for the designers of such applications. | simple guidelines for the designers of such applications. | |||
A UDP message is carried in a single IP packet and is hence limited | A UDP message is carried in a single IP packet and is hence limited | |||
to a maximum payload of 65,487 bytes. The transmission of large IP | to a maximum payload of 65,487 bytes. The transmission of large IP | |||
packets frequently requires IP fragmentation, which decreases | packets frequently requires IP fragmentation, which decreases | |||
communication reliability and efficiency and should be avoided | communication reliability and efficiency and should be avoided. One | |||
[I-D.heffner-frag-harmful]. Some of the guidelines in Section 3 | reason for this decrease in reliability is because many NATs and | |||
firewalls do not forward IP fragments; other reasons are documented | ||||
in [I-D.heffner-frag-harmful]. Some of the guidelines in Section 3 | ||||
describe how applications should determine appropriate message sizes. | describe how applications should determine appropriate message sizes. | |||
This document provides guidelines to designers of applications that | This document provides guidelines to designers of applications that | |||
use UDP for unicast transmission. A special class of applications | use UDP for unicast transmission. A special class of applications | |||
uses UDP for IP multicast transmissions. Congestion control, flow | uses UDP for IP multicast transmissions. Congestion control, flow | |||
control or reliability for multicast transmissions is more difficult | control or reliability for multicast transmissions is more difficult | |||
to establish than for unicast transmissions, because a single sender | to establish than for unicast transmissions, because a single sender | |||
may transmit to multiple receivers across potentially very | may transmit to multiple receivers across potentially very | |||
heterogeneous paths at the same time. Designing multicast | heterogeneous paths at the same time. Designing multicast | |||
applications requires expertise that goes beyond the simple | applications requires expertise that goes beyond the simple | |||
skipping to change at page 4, line 45 | skipping to change at page 4, line 47 | |||
If used correctly, congestion-controlled transport protocols are not | If used correctly, congestion-controlled transport protocols are not | |||
as "heavyweight" as often claimed. For example, TCP with SYN cookies | as "heavyweight" as often claimed. For example, TCP with SYN cookies | |||
[I-D.ietf-tcpm-syn-flood], which are available on many platforms, | [I-D.ietf-tcpm-syn-flood], which are available on many platforms, | |||
does not require a server to maintain per-connection state until the | does not require a server to maintain per-connection state until the | |||
connection is established. TCP also requires the end that closes a | connection is established. TCP also requires the end that closes a | |||
connection to maintain the TIME-WAIT state that prevents delayed | connection to maintain the TIME-WAIT state that prevents delayed | |||
segments from one connection instance to interfere with a later one. | segments from one connection instance to interfere with a later one. | |||
Applications that are aware of this behavior can shift maintenance of | Applications that are aware of this behavior can shift maintenance of | |||
the TIME-WAIT state to conserve resources. Finally, TCP's built-in | the TIME-WAIT state to conserve resources. Finally, TCP's built-in | |||
capacity-probing and PMTU awareness results in efficient data | capacity-probing and awareness of the maximum transmission unit | |||
transmission that quickly compensates for the initial connection | supported by the path (PMTU) results in efficient data transmission | |||
setup delay, for transfers that exchange more than a few packets. | that quickly compensates for the initial connection setup delay, for | |||
transfers that exchange more than a few packets. | ||||
3.1. Congestion Control Guidelines | 3.1. Congestion Control Guidelines | |||
If an application or upper-layer protocol chooses not to use a | If an application or upper-layer protocol chooses not to use a | |||
congestion-controlled transport protocol, it SHOULD control the rate | congestion-controlled transport protocol, it SHOULD control the rate | |||
at which it sends UDP messages to a destination host. It is | at which it sends UDP messages to a destination host. It is | |||
important to stress that an application SHOULD perform congestion | important to stress that an application SHOULD perform congestion | |||
control over all UDP traffic it sends to a destination, independent | control over all UDP traffic it sends to a destination, independent | |||
of how it generates this traffic. For example, an application that | of how it generates this traffic. For example, an application that | |||
forks multiple worker processes or otherwise uses multiple sockets to | forks multiple worker processes or otherwise uses multiple sockets to | |||
skipping to change at page 5, line 28 | skipping to change at page 5, line 29 | |||
It is important to note that congestion control should not be viewed | It is important to note that congestion control should not be viewed | |||
as an add-on to a finished application. Many of the mechanisms | as an add-on to a finished application. Many of the mechanisms | |||
discussed in the guidelines below require application support to | discussed in the guidelines below require application support to | |||
operate correctly. Application designers need to consider congestion | operate correctly. Application designers need to consider congestion | |||
control throughout the design of their application, similar to how | control throughout the design of their application, similar to how | |||
they consider security aspects throughout the design process. | they consider security aspects throughout the design process. | |||
3.1.1. Bulk Transfer Applications | 3.1.1. Bulk Transfer Applications | |||
Applications that perform bulk transmission of data to a peer over | Applications that perform bulk transmission of data to a peer over | |||
UDP SHOULD consider implementing TCP-Friendly Rate Control (TFRC) | UDP SHOULD implement TCP-Friendly Rate Control (TFRC) [RFC3448], | |||
[RFC3448], window-based, TCP-like congestion control, or otherwise | window-based, TCP-like congestion control, or otherwise ensure that | |||
ensure that the application complies with the congestion control | the application complies with the congestion control principles. | |||
principles. | ||||
TFRC has been designed to provide both congestion control and | TFRC has been designed to provide both congestion control and | |||
fairness in a way that is compatible with the IETF's other transport | fairness in a way that is compatible with the IETF's other transport | |||
protocols. TFRC is currently being updated | protocols. TFRC is currently being updated | |||
[I-D.ietf-dccp-rfc3448bis], and application designers SHOULD always | [I-D.ietf-dccp-rfc3448bis], and application designers SHOULD always | |||
evaluate whether the latest published specification fits their needs. | evaluate whether the latest published specification fits their needs. | |||
If an application implements TFRC, it need not follow the remaining | If an application implements TFRC, it need not follow the remaining | |||
guidelines in Section 3.1, but SHOULD still follow the guidelines on | guidelines in Section 3.1, because TFRC already addresses them, but | |||
message sizes in Section 3.2 and reliability in Section 3.2. | SHOULD still follow the remaining guidelines in the subsequent | |||
subsections of Section 3. | ||||
Bulk transfer applications that choose not to implement TFRC or TCP- | Bulk transfer applications that choose not to implement TFRC or TCP- | |||
like windowing SHOULD implement a congestion control scheme that | like windowing SHOULD implement a congestion control scheme that | |||
results in bandwidth use that competes fairly with TCP within an | results in bandwidth use that competes fairly with TCP within an | |||
order of magnitude. [RFC3551] suggests that applications SHOULD | order of magnitude. [RFC3551] suggests that applications SHOULD | |||
monitor the packet loss rate to ensure that it is within acceptable | monitor the packet loss rate to ensure that it is within acceptable | |||
parameters. Packet loss is considered acceptable if a TCP flow | parameters. Packet loss is considered acceptable if a TCP flow | |||
across the same network path under the same network conditions would | across the same network path under the same network conditions would | |||
achieve an average throughput, measured on a reasonable timescale, | achieve an average throughput, measured on a reasonable timescale, | |||
that is not less than that of the UDP flow. The comparison to TCP | that is not less than that of the UDP flow. The comparison to TCP | |||
skipping to change at page 6, line 15 | skipping to change at page 6, line 17 | |||
Finally, some bulk transfer applications chose not to implement any | Finally, some bulk transfer applications chose not to implement any | |||
congestion control mechanism and instead rely on transmitting across | congestion control mechanism and instead rely on transmitting across | |||
reserved path capacity. This might be an acceptable choice for a | reserved path capacity. This might be an acceptable choice for a | |||
subset of restricted networking environments, but is by no means a | subset of restricted networking environments, but is by no means a | |||
safe practice for operation in the Internet. When the UDP traffic of | safe practice for operation in the Internet. When the UDP traffic of | |||
such applications leaks out on unprovisioned paths, results are | such applications leaks out on unprovisioned paths, results are | |||
detrimental. | detrimental. | |||
3.1.2. Low Data-Volume Applications | 3.1.2. Low Data-Volume Applications | |||
When applications that exchange only a small number of messages with | ||||
a destination at any time implement TFRC or one of the other | ||||
congestion control schemes in Section 3.1.1, the network sees little | ||||
benefit, because those mechanisms perform congestion control in a way | ||||
that is only effective for longer transmissions. | ||||
Applications that exchange only a small number of messages with a | Applications that exchange only a small number of messages with a | |||
destination at any time may not benefit from implementing TFRC or one | destination at any time applications SHOULD still control their | |||
of the other congestion control schemes in Section 3.1.1. Such | transmission behavior by not sending more than one UDP message per | |||
applications SHOULD still control their transmission behavior by not | round-trip time (RTT) to a destination. Similar to the | |||
sending more than one UDP message per round-trip time (RTT) to a | recommendation in [RFC1536], an application SHOULD maintain an | |||
destination. Similar to the recommendation in [RFC1536], an | estimate of the RTT for any destination it communicates with. | |||
application SHOULD maintain an estimate of the RTT for any | Applications SHOULD implement the algorithm specified in [RFC2988] to | |||
destination it communicates with. Applications SHOULD implement the | compute a smoothed RTT (SRTT) estimate. A lost response from the | |||
algorithm specified in [RFC2988] to compute a smoothed RTT (SRTT) | peer SHOULD be treated as a very large RTT sample, instead of being | |||
estimate. A lost response from the peer SHOULD be treated as a very | ignored, in order to cause a sufficiently large (exponential) back- | |||
large RTT sample, instead of being ignored, in order to cause a | off. When implementing this scheme, applications need to choose a | |||
sufficiently large (exponential) back-off. When implementing this | sensible initial value for the RTT. This value SHOULD generally be | |||
scheme, applications need to choose a sensible initial value for the | as conservative as possible for the given application. TCP uses an | |||
RTT. This value SHOULD generally be as conservative as possible for | initial value of 3 seconds [RFC2988], which is also RECOMMENDED as an | |||
the given application. TCP uses an initial value of 3 seconds | initial value for UDP applications. SIP [RFC3261] and GIST | |||
[RFC2988], which is also RECOMMENDED as an initial value for UDP | [I-D.ietf-nsis-ntlp] use an initial value of 500 ms, and initial | |||
applications. SIP [RFC3261] and GIST [I-D.ietf-nsis-ntlp] use an | timeouts that are shorter than this are likely problematic in many | |||
initial value of 500 ms, and initial timeouts that are shorter than | cases. It is also important to note that the initial timeout is not | |||
this are likely problematic in many cases. It is also important to | the maximum possible timeout - the RECOMMENDED algorithm in [RFC2988] | |||
note that the initial timeout is not the maximum possible timeout - | yields timeout values after a series of losses that are much longer | |||
the RECOMMENDED algorithm in [RFC2988] yields timeout values after a | than the initial value. | |||
series of losses that are much longer than the initial value. | ||||
Some applications cannot maintain a reliable RTT estimate for a | Some applications cannot maintain a reliable RTT estimate for a | |||
destination. The first case is applications that exchange too few | destination. The first case is applications that exchange too few | |||
messages with a peer to establish a statistically accurate RTT | messages with a peer to establish a statistically accurate RTT | |||
estimate. Such applications MAY use a fixed transmission interval | estimate. Such applications MAY use a fixed transmission interval | |||
that is exponentially backed-off during loss. TCP uses an initial | that is exponentially backed-off during loss. TCP uses an initial | |||
value of 3 seconds [RFC2988], which is also RECOMMENDED as an initial | value of 3 seconds [RFC2988], which is also RECOMMENDED as an initial | |||
value for UDP applications. SIP [RFC3261] and GIST | value for UDP applications. SIP [RFC3261] and GIST | |||
[I-D.ietf-nsis-ntlp] use an interval of 500 ms, and shorter values | [I-D.ietf-nsis-ntlp] use an interval of 500 ms, and shorter values | |||
are likely problematic in many cases. As in the previous case, note | are likely problematic in many cases. As in the previous case, note | |||
skipping to change at page 7, line 32 | skipping to change at page 7, line 40 | |||
Because IP fragmentation lowers the efficiency and reliability of | Because IP fragmentation lowers the efficiency and reliability of | |||
Internet communication [I-D.heffner-frag-harmful], an application | Internet communication [I-D.heffner-frag-harmful], an application | |||
SHOULD NOT send UDP messages that result in IP packets that exceed | SHOULD NOT send UDP messages that result in IP packets that exceed | |||
the MTU of the path to the destination. Consequently, an application | the MTU of the path to the destination. Consequently, an application | |||
SHOULD either use the path MTU information provided by the IP layer | SHOULD either use the path MTU information provided by the IP layer | |||
or implement path MTU discovery itself [RFC1191][RFC1981][RFC4821] to | or implement path MTU discovery itself [RFC1191][RFC1981][RFC4821] to | |||
determine whether the path to a destination will support its desired | determine whether the path to a destination will support its desired | |||
message size without fragmentation. | message size without fragmentation. | |||
Applications that choose not to do so SHOULD NOT send UDP messages | Applications that choose not adapt the packet size SHOULD NOT send | |||
that exceed the minimum PMTU. The minimum PMTU depends on the IP | UDP messages that exceed the minimum PMTU. The minimum PMTU depends | |||
version used for transmission, and is the lesser of 576 bytes and the | on the IP version used for transmission, and is the lesser of 576 | |||
first-hop MTU for IPv4 [RFC1122] and 1280 bytes for IPv6 [RFC2460]. | bytes and the first-hop MTU for IPv4 [RFC1122] and 1280 bytes for | |||
To determine an appropriate UDP payload size, applications must | IPv6 [RFC2460]. To determine an appropriate UDP payload size, | |||
subtract IP header and option lengths as well as the length of the | applications must subtract IP header and option lengths as well as | |||
UDP header from the PMTU size. Transmission of minimum-sized | the length of the UDP header from the PMTU size. Transmission of | |||
messages is inefficient over paths that support a larger PMTU, which | minimum-sized messages is inefficient over paths that support a | |||
is a second reason to implement PMTU discovery. | larger PMTU, which is a second reason to implement PMTU discovery. | |||
Applications that do not send messages that exceed the minimum PMTU | Applications that do not send messages that exceed the minimum PMTU | |||
of IPv4 or IPv6 need not implement any of the above mechanisms. | of IPv4 or IPv6 need not implement any of the above mechanisms. | |||
3.3. Reliability Guidelines | 3.3. Reliability Guidelines | |||
Application designers are generally aware that UDP does not provide | Application designers are generally aware that UDP does not provide | |||
any reliability. Often, this is a main reason to consider UDP as a | any reliability. Often, this is a main reason to consider UDP as a | |||
transport. Applications that do require reliable message delivery | transport. Applications that do require reliable message delivery | |||
SHOULD implement an appropriate mechanism themselves. | SHOULD implement an appropriate mechanism themselves. | |||
UDP also does not protect against message duplication, i.e., an | UDP also does not protect against message duplication, i.e., an | |||
application may receive multiple copies of the same message. | application may receive multiple copies of the same message. | |||
Application designers SHOULD consider whether their application | Application designers SHOULD consider whether their application | |||
handles message duplication gracefully, and may need to implement | handles message duplication gracefully, and may need to implement | |||
mechanisms to detect duplicates. Even if message reception triggers | mechanisms to detect duplicates. Even if message reception triggers | |||
idempotent operations, applications may want to suppress duplicate | idempotent operations, applications may want to suppress duplicate | |||
messages to reduce load. | messages to reduce load. | |||
Finally, UDP messages may be reordered in the network and arrive at | Finally, UDP messages may be reordered in the network and arrive at | |||
the receiver in an order different from the send order. Applications | the receiver in an order different from the transmission order. | |||
that require ordered delivery SHOULD reestablish message ordering | Applications that require ordered delivery SHOULD reestablish message | |||
themselves. | ordering themselves. | |||
3.4. Checksum Guidelines | 3.4. Checksum Guidelines | |||
The UDP header includes a 16-bit ones' complement checksum that | The UDP header includes an optional, 16-bit ones' complement checksum | |||
provides an integrity check. The UDP checksum provides assurance | that provides an integrity check. The UDP checksum provides | |||
that the payload was not corrupted in transit. It also verifies that | assurance that the payload was not corrupted in transit. It also | |||
the datagram was delivered to the intended end point, because it | verifies that the datagram was delivered to the intended end point, | |||
covers the IP addresses, port numbers and protocol number, and it | because it covers the IP addresses, port numbers and protocol number, | |||
verifies that the datagram is not truncated or padded, because it | and it verifies that the datagram is not truncated or padded, because | |||
covers the size field. It therefore protects an application against | it covers the size field. It therefore protects an application | |||
receiving corrupted payload data in place of, or in addition to, the | against receiving corrupted payload data in place of, or in addition | |||
data that was sent. | to, the data that was sent. | |||
Applications SHOULD enable UDP checksums, although [RFC0793] permits | Applications SHOULD enable UDP checksums, although [RFC0793] permits | |||
the option to disable their use. Applications that choose to disable | the option to disable their use. Applications that choose to disable | |||
UDP checksums when transmitting over IPv4 therefore MUST NOT make | UDP checksums when transmitting over IPv4 therefore MUST NOT make | |||
assumptions regarding the correctness of received data and MUST | assumptions regarding the correctness of received data and MUST | |||
behave correctly when a packet is received that was originally sent | behave correctly when a packet is received that was originally sent | |||
to a different end point or is otherwise corrupted. The use of the | to a different end point or is otherwise corrupted. The use of the | |||
UDP checksum is MANDATORY when applications transmit UDP over IPv6 | UDP checksum is MANDATORY when applications transmit UDP over IPv6 | |||
[RFC2460] and applications consequently MUST NOT disable their use. | [RFC2460] and applications consequently MUST NOT disable their use. | |||
(The IPv6 header does not have a separate checksum field to protect | (The IPv6 header does not have a separate checksum field to protect | |||
the IP addressing information.) | the IP addressing information.) | |||
The UDP checksum provides relatively weak protection from a coding | The UDP checksum provides relatively weak protection from a coding | |||
point of view [RFC3819] and, where appropriate, applications | point of view [RFC3819] and, where data integrity is important, | |||
developers SHOULD provide additional checks, e.g., through a CRC | application developers SHOULD provide additional checks, e.g., | |||
included with the data to verify the integrity of an entire object/ | through a CRC included with the data to verify the integrity of an | |||
file sent over UDP service. | entire object/file sent over UDP service. | |||
3.4.1. UDP-Lite | 3.4.1. UDP-Lite | |||
A special class of applications derive benefit from having partially | A special class of applications derive benefit from having partially | |||
damaged payloads delivered rather than discarded when using paths | damaged payloads delivered rather than discarded when using paths | |||
that include error-prone links. Such applications can tolerate | that include error-prone links. Such applications can tolerate | |||
payload corruption and MAY choose to use the Lightweight User | payload corruption and MAY choose to use the Lightweight User | |||
Datagram Protocol (UDP-Lite) [RFC3828] variant of UDP instead of | Datagram Protocol (UDP-Lite) [RFC3828] variant of UDP instead of | |||
basic UDP. Applications that choose to use UDP-Lite instead of UDP | basic UDP. Applications that choose to use UDP-Lite instead of UDP | |||
MUST still follow the congestion control and other guidelines | MUST still follow the congestion control and other guidelines | |||
skipping to change at page 9, line 51 | skipping to change at page 10, line 9 | |||
and/or encryption are used, this can result in UDP-Lite packets being | and/or encryption are used, this can result in UDP-Lite packets being | |||
treated the same as UDP packets, i.e., result in packet loss. Use of | treated the same as UDP packets, i.e., result in packet loss. Use of | |||
IP fragmentation can also prevent special treatment for UDP-Lite | IP fragmentation can also prevent special treatment for UDP-Lite | |||
packets, and is another reason why applications SHOULD avoid IP | packets, and is another reason why applications SHOULD avoid IP | |||
fragmentation Section 3.2. | fragmentation Section 3.2. | |||
3.5. Middlebox Traversal Guidelines | 3.5. Middlebox Traversal Guidelines | |||
Network address translators (NATs) and firewalls are examples of | Network address translators (NATs) and firewalls are examples of | |||
intermediary devices ("middleboxes") that can exist along an end-to- | intermediary devices ("middleboxes") that can exist along an end-to- | |||
end path. A middlebox typically perform a function that requires it | end path. A middlebox typically performs a function that requires it | |||
to maintain per-flow state. For connection-oriented protocols, such | to maintain per-flow state. For connection-oriented protocols, such | |||
as TCP, middleboxes snoop and parse the connection-management traffic | as TCP, middleboxes snoop and parse the connection-management traffic | |||
and create and destroy per-flow state accordingly. For a | and create and destroy per-flow state accordingly. For a | |||
connectionless protocol such as UDP, this approach is not possible. | connectionless protocol such as UDP, this approach is not possible. | |||
Consequently, middleboxes may create per-flow state when they see a | Consequently, middleboxes may create per-flow state when they see a | |||
packet that indicates a new flow, and destroy the state after some | packet that indicates a new flow, and destroy the state after some | |||
period of time during which no packets belonging to the same flow | period of time during which no packets belonging to the same flow | |||
have arrived. | have arrived. | |||
Depending on the specific function that the middlebox performs, this | Depending on the specific function that the middlebox performs, this | |||
skipping to change at page 10, line 44 | skipping to change at page 10, line 50 | |||
communication failures and implement mechanisms to re-establish their | communication failures and implement mechanisms to re-establish their | |||
UDP sessions. | UDP sessions. | |||
Applications MAY in addition send periodic keep-alive messages to | Applications MAY in addition send periodic keep-alive messages to | |||
attempt to refresh middlebox state. Unfortunately, no common timeout | attempt to refresh middlebox state. Unfortunately, no common timeout | |||
has been specified for per-flow UDP state for arbitrary middleboxes. | has been specified for per-flow UDP state for arbitrary middleboxes. | |||
For NATs, [RFC4787] requires a state timeout of 2 minutes or longer, | For NATs, [RFC4787] requires a state timeout of 2 minutes or longer, | |||
and it is likely that other types of middleboxes use timeouts of | and it is likely that other types of middleboxes use timeouts of | |||
similar timescales. Consequently, if applications choose to send | similar timescales. Consequently, if applications choose to send | |||
periodic keep-alives, they SHOULD NOT send them more frequently than | periodic keep-alives, they SHOULD NOT send them more frequently than | |||
once every two minutes. | once every two minutes. (Not that some deployed middleboxes use a | |||
shorter timeout value than 2 minutes, violating [RFC4787].) | ||||
It is important to note that sending keep-alives is not a substitute | It is important to note that sending keep-alives is not a substitute | |||
for implementing a robust connection handling. Like all UDP | for implementing a robust connection handling. Like all UDP | |||
messages, keep-alives can be delayed or dropped, causing middlebox | messages, keep-alives can be delayed or dropped, causing middlebox | |||
state to time out. In addition, the congestion control guidelines in | state to time out. In addition, the congestion control guidelines in | |||
Section 3.1 cover all UDP transmissions by an application, including | Section 3.1 cover all UDP transmissions by an application, including | |||
the transmission of middlebox keep-alives. Congestion control may | the transmission of middlebox keep-alives. Congestion control may | |||
thus lead to delays or temporary suspension of keep-alive | thus lead to delays or temporary suspension of keep-alive | |||
transmission. | transmission. | |||
4. Security Considerations | 4. Security Considerations | |||
skipping to change at page 11, line 21 | skipping to change at page 11, line 27 | |||
guidelines to designers of UDP-based applications to congestion- | guidelines to designers of UDP-based applications to congestion- | |||
control their transmissions. As such, it does not raise any | control their transmissions. As such, it does not raise any | |||
additional security concerns. | additional security concerns. | |||
5. IANA Considerations | 5. IANA Considerations | |||
This document raises no IANA considerations. | This document raises no IANA considerations. | |||
6. Acknowledgments | 6. Acknowledgments | |||
Thanks to Mark Allman, Sally Floyd, Joerg Ott, Colin Perkins, Pasi | Thanks to Mark Allman, Sally Floyd, Philip Matthews, Joerg Ott, Colin | |||
Sarolahti and Magnus Westerlund for their comments on this document. | Perkins, Pasi Sarolahti and Magnus Westerlund for their comments on | |||
this document. | ||||
The middlebox traversal guidelines in Section 3.5 incorporate ideas | The middlebox traversal guidelines in Section 3.5 incorporate ideas | |||
from Section 5 of [I-D.ford-behave-app] by Bryan Ford, Pyda Srisuresh | from Section 5 of [I-D.ford-behave-app] by Bryan Ford, Pyda Srisuresh | |||
and Dan Kegel. | and Dan Kegel. | |||
7. References | 7. References | |||
7.1. Normative References | 7.1. Normative References | |||
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, | [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, | |||
skipping to change at page 12, line 39 | skipping to change at page 12, line 47 | |||
[RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU | [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU | |||
Discovery", RFC 4821, March 2007. | Discovery", RFC 4821, March 2007. | |||
7.2. Informative References | 7.2. Informative References | |||
[I-D.floyd-dccp-ccid4] | [I-D.floyd-dccp-ccid4] | |||
Floyd, S. and E. Kohler, "Profile for Datagram Congestion | Floyd, S. and E. Kohler, "Profile for Datagram Congestion | |||
Control Protocol (DCCP) Congestion ID 4: TCP-Friendly | Control Protocol (DCCP) Congestion ID 4: TCP-Friendly | |||
Rate Control for Small Packets (TFRC-SP)", | Rate Control for Small Packets (TFRC-SP)", | |||
draft-floyd-dccp-ccid4-00 (work in progress), | draft-floyd-dccp-ccid4-01 (work in progress), July 2007. | |||
November 2006. | ||||
[I-D.ford-behave-app] | [I-D.ford-behave-app] | |||
Ford, B., "Application Design Guidelines for Traversal | Ford, B., "Application Design Guidelines for Traversal | |||
through Network Address Translators", | through Network Address Translators", | |||
draft-ford-behave-app-05 (work in progress), March 2007. | draft-ford-behave-app-05 (work in progress), March 2007. | |||
[I-D.heffner-frag-harmful] | [I-D.heffner-frag-harmful] | |||
Heffner, J., "IPv4 Reassembly Errors at High Data Rates", | Heffner, J., "IPv4 Reassembly Errors at High Data Rates", | |||
draft-heffner-frag-harmful-05 (work in progress), | draft-heffner-frag-harmful-05 (work in progress), | |||
May 2007. | May 2007. | |||
skipping to change at page 13, line 17 | skipping to change at page 13, line 22 | |||
Specification", draft-ietf-dccp-rfc3448bis-01 (work in | Specification", draft-ietf-dccp-rfc3448bis-01 (work in | |||
progress), March 2007. | progress), March 2007. | |||
[I-D.ietf-nsis-ntlp] | [I-D.ietf-nsis-ntlp] | |||
Schulzrinne, H. and R. Hancock, "GIST: General Internet | Schulzrinne, H. and R. Hancock, "GIST: General Internet | |||
Signalling Transport", draft-ietf-nsis-ntlp-13 (work in | Signalling Transport", draft-ietf-nsis-ntlp-13 (work in | |||
progress), April 2007. | progress), April 2007. | |||
[I-D.ietf-tcpm-syn-flood] | [I-D.ietf-tcpm-syn-flood] | |||
Eddy, W., "TCP SYN Flooding Attacks and Common | Eddy, W., "TCP SYN Flooding Attacks and Common | |||
Mitigations", draft-ietf-tcpm-syn-flood-04 (work in | Mitigations", draft-ietf-tcpm-syn-flood-05 (work in | |||
progress), May 2007. | progress), May 2007. | |||
[RFC1122] Braden, R., "Requirements for Internet Hosts - | [RFC1122] Braden, R., "Requirements for Internet Hosts - | |||
Communication Layers", STD 3, RFC 1122, October 1989. | Communication Layers", STD 3, RFC 1122, October 1989. | |||
[RFC1536] Kumar, A., Postel, J., Neuman, C., Danzig, P., and S. | [RFC1536] Kumar, A., Postel, J., Neuman, C., Danzig, P., and S. | |||
Miller, "Common DNS Implementation Errors and Suggested | Miller, "Common DNS Implementation Errors and Suggested | |||
Fixes", RFC 1536, October 1993. | Fixes", RFC 1536, October 1993. | |||
[RFC2309] Braden, B., Clark, D., Crowcroft, J., Davie, B., Deering, | [RFC2309] Braden, B., Clark, D., Crowcroft, J., Davie, B., Deering, | |||
End of changes. 22 change blocks. | ||||
80 lines changed or deleted | 88 lines changed or added | |||
This html diff was produced by rfcdiff 1.33. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |