SCTP Padding Chunk: Padding Chunk and Parameter for the Stream Control Transmission Protocol (SCTP)
A chunk and a parameter that let SCTP packets and INIT chunks be enlarged to any size.
Tuexen, M., Stewart, R., and P. Lei, "Padding Chunk and Parameter for the Stream Control Transmission Protocol (SCTP)", RFC 4820, DOI 10.17487/RFC4820, March 2007, <https://www.rfc-editor.org/info/rfc4820>.
@misc{rfc4820,
series = {Request for Comments},
number = 4820,
howpublished = {RFC 4820},
publisher = {RFC Editor},
doi = {10.17487/RFC4820},
url = {https://www.rfc-editor.org/info/rfc4820},
author = {M. Tuexen and R. Stewart and P. Lei},
title = {{Padding Chunk and Parameter for the Stream Control Transmission Protocol (SCTP)}},
pagetotal = 6,
year = 2007,
month = mar,
} RFC text
Contents
Network Working Group M. Tuexen
Request for Comments: 4820 Muenster Univ. of Applied Sciences
Category: Standards Track R. Stewart
P. Lei
Cisco Systems, Inc.
March 2007
Padding Chunk and Parameter
for the Stream Control Transmission Protocol (SCTP)
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The IETF Trust (2007).
Abstract
This document defines a padding chunk and a padding parameter and
describes the required receiver side procedures. The padding chunk
is used to pad a Stream Control Transmission Protocol (SCTP) packet
to an arbitrary size. The padding parameter is used to pad an SCTP
INIT chunk to an arbitrary size.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Padding Chunk (PAD) . . . . . . . . . . . . . . . . . . . . . . 2
4. Padding Parameter (PAD) . . . . . . . . . . . . . . . . . . . . 3
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 4
5.1. A New Chunk Type . . . . . . . . . . . . . . . . . . . . . 4
5.2. A New Parameter Type . . . . . . . . . . . . . . . . . . . 4
6. Security Considerations . . . . . . . . . . . . . . . . . . . . 4
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 4
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 5
8.1. Normative References . . . . . . . . . . . . . . . . . . . 5
8.2. Informative References . . . . . . . . . . . . . . . . . . 5
1. Introduction
This document defines a padding chunk and a padding parameter and
describes the required receiver side procedures. The padding chunk
is used to pad an SCTP packet to an arbitrary size. The padding
parameter is used to pad an SCTP INIT chunk to an arbitrary size.
The usage of the PAD chunk for path MTU discovery is described in
PMTU [4]. The inappropriate usage of the PAD parameter or PAD chunk
can result in wasted bandwidth.
2. Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL", when they appear in this document, are to be interpreted
as described in RFC 2119 [1].
3. Padding Chunk (PAD)
This chunk is used to pad an SCTP packet. A PAD chunk can be used to
enlarge the packet by 4 to 65536 bytes in steps of 4 bytes. An SCTP
packet MAY contain multiple PAD chunks.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 0x84 | Flags=0 | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
\ Padding Data /
/ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1
Type: 1 byte (unsigned integer)
This value MUST be set to 0x84 for all PAD chunks.
Flags: 1 byte (unsigned integer)
This value SHOULD be set to zero on transmit and MUST be ignored
on receipt.
Length: 2 bytes (unsigned integer)
This value holds the length of the Padding Data plus 4.
Padding Data: n bytes (unsigned integer)
This holds the Padding Data. The Padding Data MUST be ignored by
the receiver.
The receiver of the PAD chunk MUST discard this chunk and continue
processing the rest of the chunks in the packet. Please note that
this is also the required processing behavior for any unknown chunk
having the same highest-order two bits of the type as the PAD chunk.
4. Padding Parameter (PAD)
This parameter is used to pad an INIT chunk. A PAD parameter can be
used to enlarge the INIT chunk by 4 bytes as the minimum to the
maximum size of the INIT chunk in steps of 4 bytes. An INIT chunk
MAY contain multiple PAD parameters.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Parameter Type = 0x8005 | Parameter Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ /
\ Padding Data \
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2
Parameter Type: 2 bytes (unsigned integer)
This value MUST be set to 0x8005.
Parameter Length: 2 bytes (unsigned integer)
This value holds the length of the Padding Data plus 4.
The PAD parameter MAY be included only in the INIT chunk. It MUST
NOT be included in any other chunk. The receiver of the PAD
parameter MUST silently discard this parameter and continue
processing the rest of the INIT chunk. This means that the size of
the generated COOKIE parameter in the INIT-ACK MUST NOT depend on the
existence of the PAD parameter in the INIT chunk. A receiver of a
PAD parameter MUST NOT include the PAD parameter within any State
Cookie parameter it generates.
5. IANA Considerations
This document is the reference for all registrations described in
this section. All registrations have been listed in the document
available at sctp-parameters [3]. The changes are described below.
5.1. A New Chunk Type
A chunk type for the PAD chunk has been assigned by IANA. The value
has been assigned as described in Figure 1. The following has been
added to the "CHUNK TYPES" table of sctp-parameters [3]:
CHUNK TYPES
ID Value Chunk Type Reference
-------- ---------- ---------
132(0x84) Padding Chunk (PAD) [RFC4820]
5.2. A New Parameter Type
A parameter type has been assigned for the PAD parameter by IANA.
The value has been assigned as described in Figure 2. The following
has been added to the "CHUNK PARAMETER TYPES" table in sctp-
parameters [3]:
INIT Chunk Parameter Types
Chunk Parameter Type Value
-------------------- -----
Padding 32773(0x8005)
6. Security Considerations
This document does not add any additional security considerations to
the ones given in RFC 2960 [2].
7. Acknowledgments
The authors wish to thank Matthew J. Zekauskas and Lars Eggert for
their invaluable comments.
8. References
8.1. Normative References
[1] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[2] Stewart, R., Xie, Q., Morneault, K., Sharp, C., Schwarzbauer,
H., Taylor, T., Rytina, I., Kalla, M., Zhang, L., and V. Paxson,
"Stream Control Transmission Protocol", RFC 2960, October 2000.
8.2. Informative References
[3] "IANA registry",
<http://www.iana.org/assignments/sctp-parameters>.
[4] Mathis, M. and J. Heffner, "Packetization Layer Path MTU
Discovery", RFC 4821, March 2007.
Authors' Addresses
Michael Tuexen
Muenster Univ. of Applied Sciences
Stegerwaldstr. 39
48565 Steinfurt
Germany
EMail: tuexen@fh-muenster.de
Randall R. Stewart
Cisco Systems, Inc.
4875 Forest Drive
Suite 200
Columbia, SC 29206
USA
EMail: rrs@cisco.com
Peter Lei
Cisco Systems, Inc.
955 Happfield Dr.
Arlington Heights, IL 60004
US
Phone: +1 773 695-8201
EMail: peterlei@cisco.com
Full Copyright Statement
Copyright (C) The IETF Trust (2007).
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, THE IETF TRUST 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; nor does it 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.
ISO Plain Language
On this page
§1Why Pad an SCTP Packet
This document defines a padding chunk and a padding parameter and describes the required receiver side procedures. The padding chunk is used to pad an SCTP packet to an arbitrary size. The padding parameter is used to pad an SCTP INIT chunk to an arbitrary size.
The use of the PAD chunk for path MTU discovery is described in the Packetization Layer Path MTU Discovery document, RFC 4821. The inappropriate use of the PAD parameter or the PAD chunk can result in wasted bandwidth.
Sometimes a sender needs its packet to be a particular size, and the only way to get there is to add filler. This RFC defines the filler, in two forms: one that can go in any packet, and one that can only go in the first message of a connection.
| Aspect | PAD chunk | PAD parameter |
|---|---|---|
| Where it may appear | Any SCTP packet | Only the INIT chunk |
| Type value THIS RFC | 0x84 (132) | 0x8005 (32773) |
| Size it can add THIS RFC | 4 to 65536 bytes in steps of 4 | From 4 bytes up to the maximum INIT chunk size, in steps of 4 |
| Receiver action | Discard the chunk, process the rest of the packet | Discard the parameter, process the rest of the INIT chunk |
| Effect on the reply | None | The COOKIE in the INIT-ACK must not grow |
§3The Padding Chunk
The PAD chunk pads an SCTP packet. It can enlarge a packet by 4 to 65536 bytes in steps of 4 bytes, and an SCTP packet may contain multiple PAD chunks.
The chunk has a Type field of one byte, which must be set to 0x84 for all PAD chunks. The Flags field is one byte and should be set to zero on transmit and must be ignored on receipt. The Length field is two bytes and holds the length of the padding data plus 4. The padding data itself is the remaining bytes of the chunk and must be ignored by the receiver.
The chunk header is four bytes: a type byte that says this is padding, a flags byte that is ignored, and a two-byte length counting the filler plus those four bytes. The filler bytes themselves carry no meaning.
| Field | Name | Size | Value | Description |
|---|---|---|---|---|
TYPE | Type | 1 byte | 0x84 | One byte. Set to 0x84 for all PAD chunks. |
FLAGS | Flags | 1 byte | 0 | One byte. Set to zero on transmit and ignored on receipt. |
LENGTH | Length | 2 bytes | Two bytes, holding the length of the padding data plus 4. |
§3.1What the Receiver Does
The receiver of the PAD chunk must discard this chunk and continue processing the rest of the chunks in the packet. The RFC adds that this is also the required processing behaviour for any unknown chunk having the same highest-order two bits of the type as the PAD chunk.
In other words, padding needs no rule of its own. A receiver already knows what to do with a chunk type it does not recognise, and it does the same thing with padding.
The receiver throws the padding away and reads the rest of the packet as if it had never been there. The RFC says padding is handled the same way as a chunk type the receiver does not recognise, so it needs no separate rule.
§4The Padding Parameter
The PAD parameter pads an INIT chunk, the chunk that opens an SCTP association. It can enlarge the INIT chunk by 4 bytes as the minimum up to the maximum size of the INIT chunk, in steps of 4 bytes, and an INIT chunk may contain multiple PAD parameters.
The parameter has a Parameter Type field of two bytes, which must be set to 0x8005, and a Parameter Length field of two bytes, which holds the length of the padding data plus 4.
The PAD parameter may be included only in the INIT chunk and must not be included in any other chunk. The receiver of the PAD parameter must silently discard it and continue processing the rest of the INIT chunk. This means that the size of the generated COOKIE parameter in the INIT-ACK must not depend on the existence of the PAD parameter in the INIT chunk, and a receiver of a PAD parameter must not include the PAD parameter in any State Cookie parameter it generates. The padding therefore changes the size on the wire without changing the size of the cookie the server sends back.
The INIT chunk is the first message in an SCTP connection. Padding is only allowed there, and the server must throw it away without letting it change the cookie it sends back, so the reply stays the same size whatever padding arrived.
| Field | Name | Size | Value | Description |
|---|---|---|---|---|
PARAMETER-TYPE | Parameter Type | 2 bytes | 0x8005 | Two bytes. Set to 0x8005. |
PARAMETER-LENGTH | Parameter Length | 2 bytes | Two bytes, holding the length of the padding data plus 4. |
§5IANA Registrations
A chunk type for the PAD chunk has been assigned by IANA with the value shown in the format above, and has been added to the CHUNK TYPES table of the SCTP parameters registry as 132 (0x84), Padding Chunk (PAD), with this document as the reference.
A parameter type has been assigned for the PAD parameter, and has been added to the CHUNK PARAMETER TYPES table for INIT chunk parameter types as 32773 (0x8005), Padding.
Two numbers were reserved for this: chunk type 132 and INIT parameter type 32773. They are what the sender and receiver use to recognise the padding.
§6Security Considerations
This document does not add any additional security considerations to the ones given in RFC 2960.
Padding adds no new security rules of its own; the rules for SCTP as a whole still apply.