RFC 3695
Compact Forward Error Correction (FEC) Schemes
Compact Forward Error Correction (FEC) Schemes π
Okay bestie, this is RFC 3695 π¦ and it's giving "experimental and iconic." It was written by M. Luby from Digital Fountain and L. Vicisano from Cisco, and it's dated February 2004. It's in the Experimental category, and it doesn't list anything it obsoletes or updates β¨.
Status of This Memo
So this memo defines an Experimental Protocol for the Internet community π§. It is not an Internet standard of any kind. They're asking for discussion and suggestions for improvement, and distribution of this memo is unlimited π.
Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved.
Abstract
Okay so this document introduces some Forward Error Correction (FEC) schemes that supplement the FEC schemes described in RFC 3452. The big wins are that they're built for reliable bulk delivery of large objects using a more compact FEC Payload ID π. They can also sequentially deliver blocks of an object of indeterminate length. So they support different delivery models with less packet header overhead, which is so efficient π.
This document also describes the Fully-Specified FEC scheme for FEC Encoding ID 0 π . This scheme requires no FEC coding. It's mainly here so different implementations of protocol instantiations that use the FEC building block can do simple interoperability testing.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Packet Header Fields . . . . . . . . . . . . . . . . . . . . . 3
2.1. FEC Payload ID for FEC Encoding IDs 0 and 130. . . . . . 4
2.2. Compact No-Code FEC scheme . . . . . . . . . . . . . . . 5
2.3. Compact FEC scheme . . . . . . . . . . . . . . . . . . . 5
3. Compact No-Code FEC scheme . . . . . . . . . . . . . . . . . . 6
3.1. Source Block Logistics . . . . . . . . . . . . . . . . . 7
3.2. Sending and Receiving a Source Block . . . . . . . . . . 8
4. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1. Reliable Bulk Data Delivery. . . . . . . . . . . . . . . 9
4.2. Block-Stream Delivery. . . . . . . . . . . . . . . . . . 10
5. Security Considerations. . . . . . . . . . . . . . . . . . . . 10
6. IANA Considerations. . . . . . . . . . . . . . . . . . . . . . 10
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.1. Normative References . . . . . . . . . . . . . . . . . . 11
7.2. Informative References . . . . . . . . . . . . . . . . . 12
8. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 12
9. Full Copyright Statement . . . . . . . . . . . . . . . . . . . 13
1. Introduction πΈ
Okay so this document describes two new Forward Error Correction (FEC) schemes, corresponding to FEC Encoding IDs 0 and 130. They supplement the FEC schemes for FEC Encoding IDs 128 and 129 described in the FEC Building Block [4].
These new schemes are especially useful when an object is split into equal-length source blocks π§. In that case, the source block length that all the blocks share can be communicated out-of-band. That saves the extra overhead of carrying the source block length inside the FEC Payload ID of every packet. The new schemes are like the FEC schemes with FEC Encoding ID 128 from RFC 3452 [4], except the FEC Payload ID is half as long. That's why they're called Compact FEC schemes π.
The main focus of FEC Encoding IDs 128 and 129 is reliably delivering bulk objects of known length. The schemes in this document are built for both reliable delivery of bulk objects of known length and for delivering a stream of source blocks for an object of indeterminate length β¨. In the block-stream model, reliability can range from acknowledged reliable delivery of each block all the way to unacknowledged enhanced-reliability delivery of time-sensitive blocks. It depends on the properties of the protocol instantiation the FEC scheme is used in. Acknowledged reliable block-stream delivery is kind of like the byte-stream delivery TCP offers, except the unit of delivery is a block of data instead of a byte π¦. And in the spirit of a building block (see RFC 3048 [6]), these FEC schemes can be used to provide reliability for other service models too.
The two new FEC Encoding IDs, 0 and 130, are described in Section 2, and they supplement Section 5 of the FEC building block [4]. Section 3 describes the Fully-Specified FEC scheme for FEC Encoding ID 0. That scheme requires no FEC coding and is specified mainly so simple interoperability testing can happen between different implementations of protocol instantiations that use the FEC building block π«Ά.
This document inherits the context, language, declarations and restrictions of the FEC building block [4]. It also uses the terminology of the companion document [7], which describes using FEC codes in reliable IP multicast transport and introduces some commonly used FEC codes π.
Building blocks are defined in RFC 3048 [6]. This document is a product of the IETF RMT WG and follows the general guidelines in RFC 3269 [3] π .
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [2]. These are the BCP 14 key words, so they're serious business π.
Statement of Intent
This memo contains part of the definitions needed to fully specify a Reliable Multicast Transport (RMT) protocol, following RFC 2357 [5] β¨. As per RFC 2357, using any reliable multicast protocol on the Internet requires an adequate congestion control scheme π¦.
While they wait for that scheme to be available, or for an existing scheme to be proven adequate, the RMT working group publishes this Request for Comments in the "Experimental" category π§.
It is the RMT intent to re-submit this specification as an IETF Proposed Standard as soon as the above condition is met π.
2. Packet Header Fields π
This section specifies FEC Encoding IDs 0 and 130, the associated FEC Payload ID formats, and the specific information in the corresponding FEC Object Transmission Information. The FEC scheme for FEC Encoding ID 0 is Fully-Specified, whereas the FEC schemes for FEC Encoding ID 130 are Under-Specified π.
FEC Encoding IDs 0 and 130 have the same FEC Payload ID format, which is covered in the next subsection. Their FEC Object Transmission Information is different, and it's covered in the two subsections after that π.
2.1. FEC Payload ID for FEC Encoding IDs 0 and 130 π¦
The FEC Payload ID for FEC Encoding IDs 0 and 130 is made of a Source Block Number and an Encoding Symbol ID, structured like this:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Block Number | Encoding Symbol ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The 16-bit Source Block Number tells you which source block of the object the encoding symbol in the packet payload was generated from π₯. There are two possible modes. In the unique SBN mode, every source block in the object gets its own Source Block Number. In the non-unique SBN mode, the same Source Block Number can be used for more than one source block in the object π. Which mode an object uses is outside the scope of this document, but it MUST be communicated to receivers, either explicitly or implicitly, out-of-band π.
If the unique SBN mode is used, then successive Source Block Numbers go with consecutive source blocks of the object, starting with Source Block Number 0 for the first source block πΈ. In this case, there are at most 2^16 source blocks in the object.
If the non-unique SBN mode is used, then the mapping from source blocks to Source Block Numbers MUST be communicated to receivers out-of-band. How that happens is outside the scope of this document π§. The mapping could be implicit, for example determined by the transmission order of the source blocks. In non-unique SBN mode, packets for two different source blocks that map to the same Source Block Number SHOULD NOT be sent within an interval of time shorter than the transport time of a source block β³. The transport time of a source block includes the time the sender spends processing the source block at the transport layer, the network transit time for packets, and the time a receiver spends processing the source block at the transport layer. This way, the receiver can clearly tell which packets belong to which source block π.
The 16-bit Encoding Symbol ID identifies which specific encoding symbol generated from the source block is carried in the packet payload. The exact details of how Encoding Symbol IDs correspond to the encoding symbols in the packet payload for FEC Encoding ID 0 are specified in Section 3 β¨. For FEC Encoding ID 130, the exact details of that correspondence depend on the particular encoding algorithm, which is identified by the FEC Encoding ID and the FEC Instance ID π.
2.2. Compact No-Code FEC scheme π
okay so this subsection reserves FEC Encoding ID 0 for the Compact No-Code FEC scheme π It's described here and in Section 3. It's a Fully-Specified FEC scheme, and it's mainly meant for simple interop testing between implementations of protocol instantiations that use the FEC building block π§ The best part is that no FEC encoding or decoding is needed to implement it, so it's super easy to check that protocols using different proprietary FEC schemes in production can still talk to each other during their first implementations β¨
The FEC Payload ID format for FEC Encoding ID 0 is described in Subsection 2.1. The FEC Object Transmission Information has this specific info π
- The FEC Encoding ID 0.
- For each source block of the object, the length in bytes of the encoding symbol carried in the packet payload. This length MUST be the same for all packets sent for the same source block, but MAY be different for different source blocks in the same object π
- For each source block of the object, the length of the source block in bytes. Usually every source block in the object is the same length, so you only need to share one length for all of them, but that's not a requirement πΈ For convenience, the source block length MAY be a multiple of the length of the encoding symbol carried in one packet payload.
How this out-of-band info gets communicated is outside the scope of this document π¦
Other info, like the object length and the number of source blocks for an object of known length, may be needed by a receiver to support some delivery models, e.g., reliable bulk data delivery π«Ά
2.3. Compact FEC scheme π
this subsection reserves FEC Encoding ID 130 for the Compact FEC scheme described right here π It's an Under-Specified FEC scheme. It's kinda similar in spirit to the Compact No-Code scheme, except a non-trivial FEC encoding (which is Under-Specified) can be used to make the encoding symbol(s) that go in each packet's payload, and a matching FEC decoder can be used to rebuild the source block from the received packets π₯
The FEC Payload ID format for FEC Encoding ID 0 is described in Subsection 2.1. The FEC Object Transmission Information has this specific info β¨
- The FEC Encoding ID 130.
- The FEC Instance ID associated with the FEC Encoding ID 130 to be used.
- For each source block of the object, the aggregate length of the encoding symbol(s) carried in one packet payload. This length MUST be the same for all packets sent for the same source block, but MAY be different for different source blocks in the same object π
- For each source block of the object, the length of the source block in bytes. Usually every source block in the object is the same length, so you only need to share one length for all of them, but that's not a requirement π§ For convenience, the source block length MAY be a multiple of the aggregate length of the encoding symbol(s) carried in one packet payload.
How this out-of-band info gets communicated is outside the scope of this document π
Other info, like the object length and the number of source blocks for an object of known length, may be needed by a receiver to support some delivery models, e.g., reliable bulk data delivery π
3. Compact No-Code FEC scheme π
in this section we dig into the Fully-Specified FEC scheme for FEC Encoding ID 0 π§ The main reason these FEC schemes exist is to make simple interop testing possible between different implementations of the same protocol instantiation that uses the FEC building block. Iconic, right? π
The Compact No-Code FEC scheme doesn't need any FEC encoding or decoding. Instead, each encoding symbol is just a run of consecutive bytes from a source block of the object π¦ The FEC Payload ID has two fields, the 16-bit Source Block Number and the 16-bit Encoding Symbol ID, as described in Subsection 2.1. These field lengths were picked to match the corresponding fields in the FEC Payload ID for FEC Encoding ID 130. Because of that, testing interop for the FEC scheme with FEC Encoding ID 0 is a first basic step toward testing interop for the FEC scheme with FEC Encoding ID 130 β¨
Subsection 2.1 explains how source blocks of an object map to Source Block Numbers. The next two subsections go through how the Compact No-Code FEC scheme works for each source block of an object. These aren't meant to suggest a specific implementation. They just show the general algorithm using a simple, non-optimized implementation π
3.1. Source Block Logistics πΈ
Let X > 0 be the length of a source block in bytes. The value of X is part of the FEC Object Transmission Information, and how that info reaches a receiver is outside the scope of this document π«Ά
Let L > 0 be the length of the encoding symbol in the payload of each packet. There are a few possible ways to tell the receiver the encoding symbol length L, and how that happens is outside the scope of this document π As an example, a sender could fix the packet payload length to L so the encoding symbol of length L fits in the packet, and then a receiver could infer L from the length of the received packet payload. It is REQUIRED that L be the same for all packets sent for the same source block, but it MAY be different for different source blocks within the same object π₯
For a given source block X bytes long with Source Block Number I, let N = X/L rounded up to the nearest integer. The encoding symbol in a packet's payload is a consecutive chunk of the source block. The source block is logically split into N encoding symbols, each L bytes long, and their Encoding Symbol IDs run from 0 through N-1, starting at the beginning of the source block and heading to the end π§ So the encoding symbol with Encoding Symbol ID Y holds bytes L*Y through L*(Y+1)-1 of the source block, where the bytes are numbered from 0 through X-1. If X/L isn't a whole number, the last encoding symbol (Encoding Symbol ID N-1) holds bytes L*(N-1) through the last byte X-1 of the source block, and the leftover L*N - X bytes of that encoding symbol can be padded out with zeroes π
Here's a quick example. Say the source block length is X = 20,400 and the encoding symbol length is L = 1,000. The encoding symbol with Encoding Symbol ID 10 holds bytes 10,000 through 10,999 of the source block. The encoding symbol with Encoding Symbol ID 20 holds bytes 20,000 through the last byte 20,399 of the source block, and the remaining 600 bytes of that encoding symbol can be padded with zeroes β¨
There are no rules beyond the ones above for how a sender generates the encoding symbols it sends from a source block. However, it is recommended that implementers check out the companion document [7] for general advice π
The next subsection recommends a procedure for sending and receiving source blocks π
3.2. Sending and Receiving a Source Block π¦
The following carousel procedure is RECOMMENDED for a sender to generate packets containing FEC Payload IDs and matching encoding symbols for a source block with Source Block Number I π
Set the length in bytes of an encoding symbol to a fixed value L that's reasonable for a packet payload (for example, make sure the total packet size doesn't go over the MTU), and that's smaller than the source block length X, e.g., L = 1,000 for X >= 1,000. Initialize Y to a value randomly picked from the interval [0..N-1]. Then repeat the following for each packet of the source block to be sent π
- If
Y < N-1, generate the encoding symbol made of theLbytes of the source block numberedL*YthroughL*(Y+1)-1. - If
Y = N-1, generate the encoding symbol made of the lastX - L*(N-1)bytes of the source block, numberedL*(N-1)throughX-1, followed byL*N - Xpadding bytes of zeroes. - Set the Source Block Length to
X, set the Source Block Number toI, set the Encoding Symbol ID toY, and place the FEC Payload ID and the encoding symbol into the packet to send. - To get ready for the next packet: if
Y < N-1, incrementYby one; otherwise, ifY = N-1, resetYto zero.
The following procedure is RECOMMENDED for a receiver to recover the source block from packets it receives for that source block, sent by a sender using the carousel procedure above π The receiver can tell which source block a received packet came from by the Source Block Number in the FEC Payload ID. When the receiver gets the first FEC Payload ID for a source block, it uses the source block length it got out-of-band as part of the FEC Object Transmission Information to work out the length X in bytes of the source block, and it allocates space for the X bytes the source block needs. It also works out the length L of the encoding symbol in the packet payload by subtracting the packet header length from the total length of the received packet (and it checks that this length is the same in every later packet from the same source block) β¨ After calculating N = X/L rounded up to the nearest integer, the receiver allocates a boolean array RECEIVED[0..N-1] with all N entries set to false to track which encoding symbols it has received π«Ά
The receiver keeps receiving packets for the source block as long as at least one entry in RECEIVED is still false, or until the application decides to give up on this source block and move on to other ones π For each received packet for the source block (including the first one), here's how to help recover the source block. Let Y be the Encoding Symbol ID in the FEC Payload ID of the packet. If Y < N-1, the receiver copies the L bytes of the encoding symbol into bytes numbered L*Y through L*(Y+1)-1 of the space reserved for the source block. If Y = N-1, the receiver copies the first X - L*(N-1) bytes of the encoding symbol into bytes numbered L*(N-1) through X-1 of the reserved space. In either case, the receiver sets RECEIVED[Y] = true π At any point in time, the receiver has successfully recovered bytes L*Y through L*(Y+1)-1 of the source block for every Y in the interval [0..N-1] where RECEIVED[Y] is true. And if all N entries of RECEIVED are true, the receiver has recovered the entire source block π
4. Usage Examples πΈ
the following subsections walk through some usage examples for FEC Encoding IDs 0 and 130 π¦
4.1. Reliable Bulk Data Delivery π
okay so one really fun way to use any FEC scheme in this doc is reliable bulk data delivery π. In this model, one or more potentially big objects get delivered reliably to potentially lots of receivers using multicast. For this one, the unique SBN mode is usually the move π
. With it, the max length of an object is at most the number of possible source blocks times the max length of a source block. If the total length of encoding symbols in a packet payload is L bytes, then the max source block length is the number of distinct Encoding Symbol IDs times L, which is 2^16 * L for FEC Encoding IDs 0 and 130. So if L = 1 KB, a source block can be up to around 65 MB π. In practice though, the source block is usually shorter than that, so it's generally a fraction of 65 MB. Since there are 2^16 distinct Source Block Numbers, an object in this example can be more than a terabyte π.
The non-unique SBN mode can also be used for reliable delivery of large objects β¨. In that case, the object could be arbitrarily large, depending on the out-of-band mapping between source blocks and Source Block Numbers π§.
4.2. Block-Stream Delivery π¦
Another delivery model supported by FEC Encoding ID 0 or 130 is block-stream delivery of an object πΈ. Here, the source blocks of a potentially indeterminate length object get reliably delivered in sequence to one or multiple receivers. So the object can be split into source blocks on-the-fly at the sender as the data arrives, and every packet for one source block goes out before any packet for the next one. All the source blocks could be the same length, and that length could be shared out-of-band with a receiver before it joins the session π«Ά. For this model, it is not required that the Source Block Numbers for all source blocks are unique. Still, a suggested usage is to use all 2^16 Source Block Numbers for consecutive source blocks of the object, which means the time between reuses of a Source Block Number is the time it takes to send the packets for 2^16 source blocks β.
This model can reliably deliver an object to one or multiple receivers, using either an ACK or NACK based acknowledgement scheme for each source block π₯. Another example: the sender could send a fixed number of packets for each source block with no acknowledgements from receivers, like in a live streaming without feedback application πΊ.
5. Security Considerations π
The security considerations for this document are the same as they are for RFC 3452 [4]. Please go read those, they matter a lot π.
6. IANA Considerations π
Values of FEC Encoding IDs and FEC Instance IDs are subject to IANA registration. For general guidelines on IANA considerations as they apply to this document, see RFC 3452 [4]. This document assigns the Fully-Specified FEC Encoding ID 0 under the ietf:rmt:fec:encoding name-space to "Compact No-Code". The FEC Payload ID format and corresponding FEC Object Transmission Information associated with FEC Encoding ID 0 is described in Subsections 2.1 and 2.2, and the corresponding FEC scheme is described in Section 3 π.
This document assigns the Under-Specified FEC Encoding ID 130 under the ietf:rmt:fec:encoding name-space to "Compact FEC". The FEC Payload ID format and corresponding FEC Object Transmission Information associated with FEC Encoding ID 130 are described in Subsections 2.1 and 2.3 π§.
As FEC Encoding ID 130 is Under-Specified, a new "FEC Instance ID" sub-name-space must be established, in accordance to RFC 3452. So this document also establishes a new "FEC Instance ID" registry named:
ietf:rmt:fec:encoding:instance:130
and scoped by:
ietf:rmt:fec:encoding = 130 (Compact FEC)
As per RFC 3452, the values that can be assigned within ietf:rmt:fec:encoding:instance:130 are non-negative numeric indices. Assignment requests are granted on a "First Come First Served" basis. RFC 3452 specifies additional criteria that MUST be met for the assignment within the generic ietf:rmt:fec:encoding:instance name-space π¨. These criteria also apply to ietf:rmt:fec:encoding:instance:130 π.
7. References π
7.1. Normative References
[1] Bradner, S., "The Internet Standards Process -- Revision 3", BCP
9, RFC 2026, October 1996.
[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[3] Kermode, R. and L. Vicisano, "Author Guidelines for Reliable
Multicast Transport (RMT) Building Blocks and Protocol
Instantiation Documents", RFC 3269, April 2002.
[4] Luby, M., Vicisano, L., Gemmell, J., Rizzo, L., Handley, M. and
J. Crowcroft, "Forward Error Correction (FEC) Building Block",
RFC 3452, December 2002.
[5] Mankin, A., Romanow, A., Bradner, S. and V. Paxson, "IETF
Criteria for Evaluating Reliable Multicast Transport and
Application Protocols", RFC 2357, June 1998.
[6] Whetten, B., Vicisano, L., Kermode, R., Handley, M., Floyd, S.
and M. Luby, "Reliable Multicast Transport Building Blocks for
One-to-Many Bulk-Data Transfer", RFC 3048, January 2001.
7.2. Informative References
[7] Luby, M., Vicisano, L., Gemmell, J., Rizzo, L., Handley, M. and
J. Crowcroft, "The Use of Forward Error Correction (FEC) in
Reliable Multicast", RFC 3453, December 2002.
8. Authors' Addresses π
Michael Luby
Digital Fountain, Inc.
39141 Civic Center Drive
Suite 300
Fremont, CA 94538
EMail: luby@digitalfountain.com
Lorenzo Vicisano
cisco Systems, Inc.
170 West Tasman Dr.,
San Jose, CA, USA, 95134
EMail: lorenzo@cisco.com
9. Full Copyright Statement Β©οΈ
Copyright (C) The Internet Society (2004). This document is subject to the rights, licenses and restrictions contained in BCP 78 and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property π¦
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document, or the extent to which any license under such rights might or might not be available. It also doesn't represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat, and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification, can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
Acknowledgement π
Funding for the RFC Editor function is currently provided by the Internet Society. β¨
π¦ where this page comes from
- ietf: rfc3695 2004-02
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms