RFC 3828

The Lightweight User Datagram Protocol (UDP-Lite)

πŸ“… published July 2004, from ietf

RFC 3828: The Lightweight User Datagram Protocol (UDP-Lite) πŸŽ€

okay bestie, here's the whole vibe check on this one πŸ’–

  • RFC number: 3828 πŸ¦‹
  • Title: The Lightweight User Datagram Protocol (UDP-Lite)
  • Stream: Network Working Group
  • Category: Standards Track ✨
  • Date: July 2004 πŸ“…
  • Authors: L-A. Larzon (Lulea University of Technology), M. Degermark (Lulea University of Technology), S. Pink (The University of Arizona), L-E. Jonsson, Ed. (Ericsson), and G. Fairhurst, Ed. (University of Aberdeen) πŸ‘‘
  • Obsoletes / Updates: the header doesn't list anything this one obsoletes or updates πŸ™ˆ

Status of this Memo πŸ“œ

this one is a Standards Track spec for the whole Internet community, and it's basically asking everyone to talk about it and suggest fixes 🫢 for where the protocol's standardization state is at, check the current "Internet Official Protocol Standards" (STD 1) list. distribution is unlimited, so share it with everyone πŸ’…

Copyright (C) The Internet Society (2004). 🌸

Abstract 🧚

okay so this doc is about UDP-Lite, which is basically UDP's cool cousin πŸ’œ it works like UDP (RFC 768) but it also gets along with apps on messy networks where getting a slightly damaged payload is better than having it thrown away 😭 if you don't turn that feature on, UDP-Lite is semantically identical to UDP, so no drama πŸŽ€

Table of Contents πŸ“š

1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
2.  Terminology. . . . . . . . . . . . . . . . . . . . . . . . . .  3
3.  Protocol Description . . . . . . . . . . . . . . . . . . . . .  3
    3.1.  Fields . . . . . . . . . . . . . . . . . . . . . . . . .  4
    3.2.  Pseudo Header. . . . . . . . . . . . . . . . . . . . . .  5
    3.3.  Application Interface. . . . . . . . . . . . . . . . . .  5
    3.4.  IP Interface . . . . . . . . . . . . . . . . . . . . . .  6
    3.5.  Jumbograms . . . . . . . . . . . . . . . . . . . . . . .  6
4.  Lower Layer Considerations . . . . . . . . . . . . . . . . . .  6
5.  Compatibility with UDP . . . . . . . . . . . . . . . . . . . .  7
6.  Security Considerations. . . . . . . . . . . . . . . . . . . .  8
7.  IANA Considerations. . . . . . . . . . . . . . . . . . . . . .  8
8.  References . . . . . . . . . . . . . . . . . . . . . . . . . .  9
    8.1.  Normative References . . . . . . . . . . . . . . . . . .  9
    8.2.  Informative References . . . . . . . . . . . . . . . . .  9
9.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10
10. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 11
11. Full Copyright Statement . . . . . . . . . . . . . . . . . . . 12

1. Introduction πŸ’–

okay so this doc describes a brand new transport protocol called UDP-Lite (also known as UDPLite) ✨ it's built on three observations, and bestie, they're iconic πŸ‘‘

First, there's a whole class of apps that actually want damaged data delivered instead of tossed by the network πŸ™ˆ a bunch of voice and video codecs are in this group, like the AMR speech codec [RFC-3267], the Internet Low Bit Rate Codec [ILBRC], error resilient H.263+ [ITU-H.263], H.264 [ITU-H.264; H.264], and MPEG-4 [ISO-14496] video codecs πŸŽ€ these codecs might be designed to handle errors in the payload way better than losing whole packets πŸ’…

Second, every link that carries IP should use a strong link layer integrity check (e.g., CRC-32 [RFC-3819]), and this MUST be used by default for IP traffic πŸ”₯ when the underlying link supports it, certain traffic (like UDP-Lite) can get a different link behavior that lets partially damaged IP packets get forwarded when they're requested [RFC-3819] πŸ¦‹ a few radio technologies (e.g., [3GPP]) support this behavior when cost and delay are low enough ✨ and if error-prone links know which part of a packet is error sensitive, the physical link can protect those bytes more, lowering the chance they get corrupted (e.g., with unequal Forward Error Correction) 🫢

Third, the intermediate layers (IP and the transport protocols) should not stop error-tolerant apps from running well on links like these 🌈 IP isn't the problem here, because the IP header has no checksum covering the IP payload 🧚 the transport protocol that's most suited for these apps is UDP, since it doesn't add overhead for retransmitting bad packets, in-order delivery, or error correction πŸ’œ in IPv4 [RFC-791], the UDP checksum covers either the whole packet or nothing at all 😭 in IPv6 [RFC-2460], the UDP checksum is mandatory and must not be disabled πŸ’€ IPv6 has no header checksum, so it was seen as necessary to always protect the IP addressing info by making the UDP checksum mandatory πŸ”’

So we need a transport protocol that fits the link and app properties described above [LDP99] πŸŽ€ the transport layer's error detection must be able to protect vital info like headers, but also be able to optionally ignore errors that the app is better at handling πŸ’… the set of octets the checksum verifies is best specified by the sending app πŸ‘‘

UDP-Lite gives you a checksum with optional partial coverage πŸ¦‹ when you use this option, a packet gets split into a sensitive part (covered by the checksum) and an insensitive part (not covered by it) ✨ errors in the insensitive part won't get the packet discarded by the transport layer at the receiving end host 🫢 when the checksum covers the entire packet, which should be the default, UDP-Lite is semantically identical to UDP 🌸 so compared to UDP, the partial checksum gives apps that want to treat their payload as partly insensitive to bit errors some extra flexibility 🌈

2. Terminology πŸ“–

the key words in this doc are the BCP 14 ones, and they get interpreted the way [RFC-2119] says:

"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"

3. Protocol Description 🧚

the UDP-Lite header is shown in figure 1 πŸ’– it's different from UDP in one main way: the Length field got swapped out for a Checksum Coverage field πŸ¦‹ that's doable because info about the UDP packet length can come from the IP module, the same way it does for TCP [RFC-793] ✨

       0              15 16             31
      +--------+--------+--------+--------+
      |     Source      |   Destination   |
      |      Port       |      Port       |
      +--------+--------+--------+--------+
      |    Checksum     |                 |
      |    Coverage     |    Checksum     |
      +--------+--------+--------+--------+
      |                                   |
      :              Payload              :
      |                                   |
      +-----------------------------------+

      Figure 1: UDP-Lite Header Format

3.1. Fields πŸŽ€

the Source Port and Destination Port fields work exactly like they do in the UDP spec [RFC-768] πŸ’… UDP-Lite also uses the same port number values that IANA assigned for UDP πŸ‘‘

Checksum Coverage is the number of octets, counting from the first octet of the UDP-Lite header, that the checksum covers 🫢 the UDP-Lite header MUST always be covered by the checksum 😭 even with that rule, Checksum Coverage is written in octets from the start of the UDP-Lite header, same as UDP does it 🌸 a Checksum Coverage of zero means the whole UDP-Lite packet is covered by the checksum πŸ¦‹ so the Checksum Coverage field MUST be either 0 or at least 8 πŸ”₯ a UDP-Lite packet with a Checksum Coverage of 1 to 7 MUST be discarded by the receiver πŸ’€ no matter what the Checksum Coverage is, the computed Checksum field MUST include a pseudo-header based on the IP header (more on that below) 🧚 UDP-Lite packets with a Checksum Coverage bigger than the IP length MUST also be discarded πŸ™ˆ

the Checksum field is the 16-bit one's complement of the one's complement sum of a few things: a pseudo-header of info from the IP header, the number of octets set by Checksum Coverage (starting at the first octet of the UDP-Lite header), and a zero octet virtually padded onto the end if needed to make a multiple of two octets [RFC-1071] πŸ’œ before computing, the checksum field MUST be set to zero ✨ if the computed checksum comes out as 0, it gets transmitted as all ones (the equivalent in one's complement arithmetic) 🌈

since the transmitted checksum MUST NOT be all zeroes, an app that wants no protection on its packet payload should use a Checksum Coverage value of 8 πŸ’… this is different from UDP over IPv4, because the smallest UDP-Lite checksum always covers the UDP-Lite protocol header, and that header includes the Checksum Coverage field πŸŽ€

3.2. Pseudo Header 🧚

UDP and UDP-Lite both use the same conceptually prefixed pseudo header from the IP layer for the checksum πŸ’– this pseudo header is different for IPv4 and IPv6 πŸ¦‹ the UDP-Lite pseudo header differs from the UDP one in exactly one way: the Length field value in the pseudo header isn't taken from the UDP-Lite header, but from info the IP module provides ✨ this is done the same way as for TCP [RFC-793], which means the Length field in the pseudo header includes the UDP-Lite header and every octet after it in the IP payload πŸ‘‘

3.3. Application Interface πŸ’…

an application interface should allow the same operations as UDP does 🫢 on top of that, it should give the sending app a way to pass the Checksum Coverage value to the UDP-Lite module 🌸 there should also be a way to pass the Checksum Coverage value to the receiving app, or at least let the receiving app block delivery of packets whose coverage is less than a value the app provides πŸ”₯

it is RECOMMENDED that the default behavior of UDP-Lite mimic UDP, meaning the Checksum Coverage field matches the length of the UDP-Lite packet and the entire packet gets verified πŸ’œ apps that want to treat their payload as partly insensitive to bit errors (e.g., error tolerant codecs using RTP [RFC-3550]) should do that with an explicit system call on the sender side πŸ¦‹ apps that want to receive payloads that were only partly covered by a checksum should tell the receiving system with an explicit system call too 🧚

the links on an Internet path can vary a lot, so it's hard to make assumptions about the level or patterns of errors that might show up in the corruption-insensitive part of the UDP-Lite payload 😭 apps using UDP-Lite should not make any assumptions about the correctness of received data beyond the position indicated by the Checksum Coverage field πŸ™ˆ and if needed, they should add their own appropriate validity checks πŸ’–

3.4. IP Interface πŸŽ€

okay so, UDP-Lite is kinda like UDP's cooler sibling and it needs the IP module to hand it a pseudo header 🧚. The UDP-Lite pseudo header carries the IP addresses and protocol fields from the IP header, plus the length of the IP payload, which comes from the Length field in the IP header. (The UDPLite module is the name for the UDP-Lite protocol module, just so you know.) πŸ’…

The sender IP module MUST NOT pad the IP payload with extra octets πŸ™…β€β™€οΈ. Why? Because the length of the UDP-Lite payload the receiver gets depends on the length of the IP payload, so padding would mess up the whole vibe. not me making sure nobody sneaks in extra bytes 😭


3.5. Jumbograms πŸ‹

the Checksum Coverage field is 16 bits, so it can represent a value of up to 65535 octets πŸ”’. That means arbitrary checksum coverage works for IP packets, unless they're Jumbograms. For Jumbograms, the checksum can either cover the entire payload (when the Checksum Coverage field is zero), or else at most the initial 65535 octets of the UDP-Lite packet. big packets get a little special treatment, and I'm here for it 🌊✨


4. Lower Layer Considerations 🧱

since UDP-Lite can hand packets with damaged payloads to an application that wants them, frames carrying UDP-Lite packets don't need to be thrown away by lower layer protocols when the errors are only in the insensitive part 🫢. For a link that supports partial error detection, the Checksum Coverage field in the UDP-Lite header MAY be used as a hint of where errors don't need to be detected πŸ¦‹.

Lower layers MUST use a strong error detection mechanism [RFC-3819] to detect at least errors that occur in the sensitive part of the packet, and MUST discard damaged packets πŸ’€. The sensitive part is everything between the first octet of the IP header and the last octet identified by the Checksum Coverage field. so the sensitive part gets treated in exactly the same way as a UDP packet would. literally no difference, iykyk πŸ”₯

Link layers that don't support partial error detection suitable for UDP-Lite, as described above, MUST detect errors in the entire UDP-Lite packet, and MUST discard damaged packets [RFC-3819] ✨. So the whole UDP-Lite packet gets treated exactly like a UDP packet. no shortcuts, no cap 🧒.

It should be noted that UDP-Lite would only make a difference to an application if partial error detection, based on the partial checksum feature of UDP-Lite, is also implemented by link layers, as discussed above πŸ‘‘. And partial error detection at the link layer would only make a difference when it's implemented over error-prone links 🌈. so the link layer is kinda the gatekeeper here, periodt πŸ’…


5. Compatibility with UDP 🫧

UDP and UDP-Lite have similar syntax and semantics, so the two are basically besties πŸ₯°. Applications designed for UDP can use UDP-Lite instead, and by default they'll get the same full packet coverage ✨. The similarities also make UDP-Lite easier to implement, since only minor changes are needed to an existing UDP implementation. easy glow-up πŸ’–

UDP-Lite was given its own IP protocol identifier, 136 (UDPLite), so a receiver can tell whether UDP or UDP-Lite is in use πŸ¦‹. A destination end host that doesn't know about UDP-Lite will, in general, send back an ICMP "Protocol Unreachable" or an ICMPv6 "Payload Type Unknown" error message (depending on the IP protocol type) πŸ™ˆ. This simple method of spotting UDP-Lite unaware systems is the main benefit of having separate protocol identifiers. it's giving simple and effective πŸŽ€

The rest of this section explains why UDP-Lite got a separate IP protocol identifier instead of sharing one with UDP 🧚.

There are no known interoperability problems between UDP and UDP-Lite if they were to share the protocol identifier with UDP. Specifically, there's no case where a potentially problematic packet gets delivered to an unsuspecting application: a UDP-Lite payload with partial checksum coverage can't be delivered to UDP applications, and UDP packets that only partially fill the IP payload can't be delivered to applications using UDP-Lite πŸ™Œ.

However, if the protocol identifier were shared between UDP and UDP-Lite, and a UDP-Lite implementation sent a UDP-Lite packet using a partial checksum to a UDP implementation, the UDP implementation would silently discard the packet 😱. That's because a mismatching pseudo header would make the UDP checksum fail. Neither the sending nor the receiving application would be notified. ghosted, no notification, not it πŸ’€. Potential solutions to this could have been:

  1. explicit application in-band signaling (while not using the partial checksum coverage option) to enable the sender to learn whether the receiver is UDP-Lite enabled or not, or
  2. use of out-of-band signaling such as H.323, SIP, or RTCP to convey whether the receiver is UDP-Lite enabled.

Since UDP-Lite has its own IP protocol identifier, there's no need to worry about a UDP-Lite packet being delivered to an unsuspecting UDP port πŸŽ‰. problem solved, bestie πŸ‘‘


6. Security Considerations πŸ”

ok this part is serious, so pay attention πŸ™ˆ. The security impact of UDP-Lite is related to how it interacts with authentication and encryption mechanisms. When the partial checksum option of UDP-Lite is enabled, the insensitive portion of a packet may change in transit ⚠️. That goes against the whole idea behind most authentication mechanisms, which succeed only if the packet hasn't changed in transit. So unless authentication mechanisms that operate only on the sensitive part of packets get developed and used, authentication will always fail for UDP-Lite packets where the insensitive part has been damaged 😭.

The IPsec integrity check (Encapsulation Security Protocol, ESP [RFC-2406], or Authentication Header, AH [RFC-2402]) is applied (at least) to the entire IP packet payload. So corruption of any bit in the protected area will make the IP receiver discard the UDP-Lite packet πŸ”’.

When IPsec is used with ESP payload encryption, a link can't determine the specific transport protocol of a packet being forwarded by inspecting the IP packet payload πŸ•΅οΈβ€β™€οΈ. In this case, the link MUST provide a standard integrity check covering the entire IP packet and payload. UDP-Lite provides no benefit in this case πŸ’”.

Encryption (for example, at the transport or application levels) may be used 🧁. If a few bits of an encrypted packet are damaged, the decryption transform will typically spread errors so the packet becomes too damaged to be useful. Lots of encryption transforms today act this way πŸŒ€. There exist encryption transforms, and stream ciphers, that don't cause error propagation. Also, note that omitting an integrity check can, under certain circumstances, compromise confidentiality [Bellovin98]. Proper use of stream ciphers poses its own challenges [BB01]. In particular, an attacker can cause predictable changes to the ultimate plaintext, even without being able to decrypt the ciphertext 😱✨.


7. IANA Considerations πŸ“‹

A new IP protocol number, 136, has been assigned for UDP-Lite. The name associated with this protocol number is "UDPLite". This makes sure things stay compatible across a wide range of platforms, since on some platforms the "-" character may not be part of a protocol entity name πŸ¦‹.


8. References πŸ“š

8.1. Normative References πŸ’œ

[RFC-768]    Postel, J., "User Datagram Protocol", STD 6, RFC 768,
             August 1980.

[RFC-791]    Postel, J., "Internet Protocol", STD 5, RFC 791,
             September 1981.

[RFC-793]    Postel, J., "Transmission Control Protocol", STD 7, RFC
             793, September 1981.

[RFC-1071]   Braden, R., Borman, D. and C. Partridge, "Computing the
             Internet Checksum", RFC 1071, September 1988.

[RFC-2119]   Bradner, S., "Key words for use in RFCs to Indicate
             Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC-2460]   Deering, S. and R. Hinden, "Internet Protocol, Version 6
             (IPv6) Specification", RFC 2460, December 1998.

8.2. Informative References 🌸

[Bellovin98] Bellovin, S.M., "Cryptography and the Internet", in
             Proceedings of CRYPTO '98, August 1988.

[BB01]       Bellovin, S. and M. Blaze, "Cryptographic Modes of
             Operation for the Internet", Second NIST Workshop on
             Modes of Operation, August 2001.

[3GPP]       "Technical Specification Group Services and System
             Aspects; Quality of Service (QoS) concept and
             architecture", TS 23.107 V5.9.0, Technical Specification
             3rd  Generation Partnership Project, June 2003.

[H.264]      Hannuksela, M.M., Stockhammer, T., Westerlund, M. and D.
             Singer, "RTP payload Format for H.264 Video", Internet
             Draft, Work in Progress, March 2003.

[ILBRC]      S.V. Andersen, et. al., "Internet Low Bit Rate Codec",
             Work in Progress, March 2003.

[ISO-14496]  ISO/IEC International Standard 1446 (MPEG-4),
             "Information Technology Coding of Audio-Visual Objects",
             January 2000.

[ITU-H.263]  "Video Coding for Low Bit Rate Communication," ITU-T
             Recommendation H.263, January 1998.

[ITU-H.264]  "Draft ITU-T Recommendation and Final Draft
             International Standard of Joint Video Specification",
             ITU-T Recommendation H.264, May 2003.

[RFC-3819]   Karn, Ed., P., Bormann, C., Fairhurst, G., Grossman, D.,
             Ludwig, R., Mahdavi, J., Montenegro, G., Touch, J. and
             L. Wood, "Advice for Internet Subnetwork Designers", BCP
             89, RFC 3819, July 2004.

[RFC-3550]   Schulzrinne, H., Casner, S., Frederick, R. and V.
             Jacobson, "RTP: A Transport Protocol for Real-Time
             Applications", RFC 3550, July 2003.

[RFC-2402]   Kent, S. and R. Atkinson, "IP Authentication Header",
             RFC 2402, November 1998.

[RFC-2406]   Kent, S. and R. Atkinson, "IP Encapsulating Security
             Payload (ESP)", RFC 2406, November 1998.

[RFC-3267]   Sjoberg, J., Westerlund, M., Lakeaniemi, A. and Q. Xie,
             "Real-Time Transport Protocol (RTP) Payload Format and
             File Storage Format for the Adaptive Multi-Rate (AMR)
             and Adaptive Multi-Rate Wideband (AMR-WB) Audio Codecs",
             RFC 3267, June 2002.

[LDP99]      Larzon, L-A., Degermark, M. and S. Pink, "UDP Lite for
             Real-Time Multimedia Applications", Proceedings of the
             IEEE International Conference of Communications (ICC),
             1999.

9. Acknowledgements 🫢

Thanks to Ghyslain Pelletier for significant technical and editorial comments πŸ™Œ. Thanks also to Steven Bellovin, Elisabetta Carrara, and Mats Naslund for reviewing the security considerations chapter, and to Peter Eriksson for a language review, which improved the clarity of this document πŸ’–.


10. Authors' Addresses πŸ–‹οΈ

Lars-Ake Larzon
Department of CS & EE
Lulea University of Technology
S-971 87 Lulea, Sweden

EMail: lln@csee.ltu.se


Mikael Degermark
Department of Computer Science
The University of Arizona
P.O. Box 210077
Tucson, AZ 85721-0077, USA

EMail: micke@cs.arizona.edu


Stephen Pink
The University of Arizona
P.O. Box 210077
Tucson, AZ 85721-0077, USA

EMail: steve@cs.arizona.edu


Lars-Erik Jonsson
Ericsson AB
Box 920
S-971 28 Lulea, Sweden

EMail: lars-erik.jonsson@ericsson.com


Godred Fairhurst
Department of Engineering
University of Aberdeen
Aberdeen, AB24 3UE, UK

EMail: gorry@erg.abdn.ac.uk

okay bestie, this is the legal bit 🫢 but it's still super important so let's get it right. the Internet Society owns the copyright here (it's 2004), and the document is under the rights, licenses and restrictions in BCP 78. except for what BCP 78 says, the authors keep all their rights πŸ’…

the whole document is handed over "AS IS", and the contributor, whichever organization they represent or sponsor (if any), the Internet Society, and the Internet Engineering Task Force all say NO to warranties πŸ™…β€β™€οΈ that's express or implied. that includes no promise that using the info won't infringe anybody's rights, and no implied warranties of merchantability or fitness for a particular purpose. it's giving disclaimer energy πŸ’€

Intellectual Property

okay so the IETF doesn't take a side on whether any IPR (intellectual property rights) or other rights might apply to building or using the tech in this doc. it also doesn't say whether licenses are available, and it hasn't gone looking for any rights itself πŸ¦‹ if you want the procedures for rights in RFC documents, check BCP 78 and BCP 79 ✨

copies of IPR disclosures sent to the IETF Secretariat, plus any promised licenses, or the results of trying to get a general license or permission for implementers or users, can be found in the IETF on-line IPR repository at http://www.ietf.org/ipr 🌸

and if you know about any copyrights, patents, patent applications, or other proprietary rights that might cover tech you'd need to implement this standard, the IETF wants to hear about it πŸ“£ send that to the IETF at ietf-ipr@ietf.org πŸ’œ

Acknowledgement

last but not least, the RFC Editor function is funded by the Internet Society right now πŸŽ€ thank you, ISOC 🫢

πŸ“¦ where this page comes from