Professional Documents
Culture Documents
2 - SCTP
2 - SCTP
Code
eRAN2.2
SCTP
Issue
01
Date
2011-09-30
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Website:
http://www.huawei.com
Email:
support@huawei.com
Issue 01 (2011-09-30)
ii
eRAN2.2
SCTP
Issue 01 (2011-09-30)
First official release.
Issue 01 (2011-09-30)
iii
eRAN2.2
SCTP
Contents
Contents
About This Document......................................................................iii
1 Overview...................................................................................... 1
2 Terms........................................................................................... 2
3 SCTP Functions.............................................................................5
3.1 Association Setup and Shutdown.......................................................................................................................5
3.2 Sequenced Delivery Within Streams.................................................................................................................6
3.3 User Data Fragmentation...................................................................................................................................6
3.4 Acknowledgement and Congestion Avoidance..................................................................................................6
3.5 Chunk Bundling.................................................................................................................................................7
3.6 Packet Validation...............................................................................................................................................7
3.7 Path Management..............................................................................................................................................7
4 SCTP Primitive.............................................................................. 8
4.1 Request Primitive Sent from an SCTP User to the SCTP Protocol...................................................................8
4.2 Notification Primitive Sent from an SCTP Protocol to an SCTP User............................................................11
5 SCTP Messages...........................................................................14
5.1 Structure...........................................................................................................................................................14
5.2 SCTP Data Chunk Format...............................................................................................................................18
5.3 SCTP Endpoint Maintenance Parameters and Recommended Values.............................................................34
Issue 01 (2011-09-30)
iv
eRAN2.2
SCTP
Overview
The Stream Control Transmission Protocol (SCTP) is a new Internet Protocol (IP) transport
protocol, existing at an equivalent level with the User Datagram Protocol (UDP) and
Transmission Control Protocol (TCP), which provide transport layer functions to Signaling
System No. 7. As a connectionless transmission protocol, the UDP cannot meet the
requirements for transmission quality of Signaling System No. 7. As a transmission protocol
with connections, the TCP provides reliable transmission with a congested header, poor realtime performance, and poor multihoming. In addition, denial of service (DoS) may attack the
data during transmission. Therefore, the Internet Engineering Task Force (IETF) approves the
reliable connection-oriented packet data transmission protocol SCTP in RFC2960. Unlike the
TCP, the SCTP provides reliable signaling transmission. The design of the SCTP includes
congestion avoidance behavior, resistance to flooding and spoofing attacks, and integration of
the real-time performance and multihoming function. Therefore, the SCTP becomes one
member of the SIGTRAN series protocols.
The SCTP is regarded as a protocol applicable to the transport layer between the SCTP user
application and packet network services. During actual application, the LTE control plane
functions as SCTP upper-layer users, such as S1 Application Protocol (S1AP) and X2
Application Protocol (X2AP), and Internet Protocol (IP) networks function as the lower layer.
Issue 01 (2011-09-30)
eRAN2.2
SCTP
Terms
Transport Address
A transport address is defined by an IP address, transport layer protocol, and transport layer
port No. In the case of SCTP transportation over IP, a transport address is defined by an IP
address and an SCTP port No. The SCTP uses the SCTP port No. to identify users with the
same IP address. It has the same meaning as the TCP port No. For example, the IP address
10.105.28.92 and the SCTP port No. 1024 define a transport address, the IP address
10.105.28.93 and the SCTP port No. 1024 define a transport address, and the IP address
10.105.28.92 and the SCTP port No. 1023 define another transport address.
Host
A host is configured with one or more IP addresses, and is a typical physical entity.
SCTP endpoint
An endpoint is the basic SCTP logical concept. It transmits and receives data packets and is a
typical logical entity.
Each transport address defined by an IP address and an SCTP port No. identifies only one
endpoint. An endpoint can be defined by multiple transport addresses. One target endpoint can
be configured with different IP addresses, but with the same SCTP port No.
Association
eRAN2.2
SCTP
Stream
Stream is a special term in the SCTP protocol. The term stream is used in an SCTP association
to specify a sequence of user messages to be delivered to the upper-layer protocol. Generally,
messages in the same stream are delivered in a sequence. A stream refers to a unidirectional
logical tunnel from one endpoint to another endpoint in an SCTP association. Each
association consists of multiple unidirectional streams. The streams, identified by different
IDs, are independent from each other. Each steam can transmit data without interference from
other streams.
Each association can have multiple streams, and the number of available streams depends on the
negotiation result of the two endpoints during association setup. In addition, one stream belongs to
only one association. The number of outbound streams can be different from that of inbound
streams.
Path
A path refers to a route on which an endpoint transmits SCTP packets to the specific transport
address of the peer endpoint. If the packet data is to be transmitted to different destination
transport addresses, an independent path is not required.
Primary path
A primary path refers to a path on which the source and target addresses in an SCTP packet
are transmitted to the peer endpoint by default. If multiple target addresses function as the
target address of an endpoint, the endpoint supports multihoming. If the endpoint transmitting
SCPT packets supports multihoming, the source and target addresses must be defined so that
the following two items can be controlled: the path for responding to the returned chunk and
the interface to transmit packets.
The two SCTP endpoints of an SCTP association can be configured with multiple IP
addresses. Therefore, there are multiple paths between the two endpoints. In this case, the
SCTP association supports multiple addresses. This feature is the unique difference of the
SCTP from the TCP.
The principle for an endpoint to transmit SCTP packets is as follows: The local endpoint
transmits the SCTP packets from the transport address A to the peer endpoint through the
primary path. If the primary path is faulty, the SCTP packet is automatically switched to a
standby path. The transport address of the peer endpoint takes precedence over the transport
address of the local endpoint.
The SCTP protocol also defines heartbeat messages. If a path is in idle mode, the local SCTP
user instructs the SCTP protocol to generate a heart beat message and sends the message to
the peer endpoint through this idle path. Then, the peer endpoint must respond with a heat
beat acknowledgement message immediately. This mechanism is used to precisely measure
the round trip time (RTT). In this case, association status can be monitored in real time and
the active state of an SCTP association can be sustained.
Issue 01 (2011-09-30)
eRAN2.2
SCTP
The SCTP protocol uses the TSN mechanism to acknowledge data transmission. In an
association, each chunk sent from one endpoint to the peer endpoint is assigned a 32-bit
sequence number derived from the initial TSN in sequence.
The TSN is maintained in an association.
In the TCP protocol, the acknowledgement of data transmission and data delivery in sequence is
implemented based on the TSN. If the TSN is not consecutive, data is retransmitted based on the TCP
protocol until the TSN is consecutive. Then, data is transmitted to upper-layer users. However, this
mechanism defined in the TCP protocol cannot meet the requirements for low-rate transmission delay
specified in the Signaling System No. 7.
The SCTP protocol assigns a 16-bit SSN for each chunk transmitted from the local endpoint
in a stream in sequence. This ensures sequence transmission in the stream.
During association setup, the SSNs for all streams start from 0. If the SSN reaches 65535, the
next SSN starts from 0.
The TSN and SSN are independent from each other.
Issue 01 (2011-09-30)
eRAN2.2
SCTP
SCTP Functions
SCTP functions include association setup and shutdown, sequenced delivery within streams,
user data fragmentation, acknowledgement and congestion avoidance, chunk bundling, packet
validation, and path management.
Figure 1.1 SCTP functions
eRAN2.2
SCTP
On the transmit end, the SCTP protocol fragments user data with a large size to allow the
data to apply to the maximum transmission unit (MTU) on the path at the lower layer.
On the receive end, the SCTP combines all fragmented data to form a complete packet,
and then delivers it to SCTP users.
The SCTP protocol assigns a TSN to each data fragment or user packet without
fragmentation in sequence and then transmits the data to the lower layer.
The TSN and SSN are independent from each other. The TSN is used to ensure data
transmission reliability, and the SSN is used to ensure that messages within a stream are
transmitted in sequence.
The TSN and SSN separate reliable transmission from sequenced transmission. The
receive end acknowledges all TSNs, even if there are gaps in the sequence.
Issue 01 (2011-09-30)
eRAN2.2
SCTP
An SCTP packet consists of a common header followed by one or more chunks. Each
chunk can contain either user data or SCTP control information.
SCTP users can request bundling of more than one user messages into a single SCTP
packet based on requirements.
Issue 01 (2011-09-30)
eRAN2.2
SCTP
SCTP Primitive
The SCTP protocol receives the request primitive sent from SCTP users served by the upperlayer protocol, and then provides services for SCTP users. In addition, the SCTP protocol
informs SCTP users of notification primitive based on different events.
SCTP primitive uses the following formats:
Function
INITIALIZE
This primitive allows the SCTP protocol to initiate its internal data
structure and allocate necessary resources for setting up its operation
environment. After the SCTP protocol is initiated, the upper-layer
protocol can communicate with other endpoints without using this
primitive.
The SCTP protocol returns a local SCTP association instance name to the
upper-layer protocol.
Issue 01 (2011-09-30)
eRAN2.2
SCTP
Name
Function
ASSOCIATE
SHUTDOWN
ABORT
SEND
SET
PRIMARY
This primitive allows the upper-layer protocol to instruct the local SCTP
protocol to use the specific destination transport address as the primary
path for transmitting a packet.
The returned result indicates whether the operation succeeds. If the
specified destination transport address is not in the destination transport
address list returned earlier in an ASSOCIATE request primitive or
COMMUNCIATION UP notification primitive, an error code is
returned.
RECEIVE
This primitive reads the available user message in the SCTP queue into
the buffer specified by SCTP users.
The size of messages that have been read is returned in bytes. Other
information may be returned based on specific requirements, for
example, transmit end's address, the stream ID on which the message is
received, and whether there are more available messages for recovery.
For sequenced messages, the SSN may also be returned.
Issue 01 (2011-09-30)
eRAN2.2
SCTP
Name
Function
STATUS
Primary path
REQUEST
HERATBEAT
GET SRTT
REPORT
This primitive allows the upper-layer protocol to instruct the local SCTP
protocol to report the current SRTT measurement on the specified
destination transport address with the specific association.
The returned result is an integer containing the latest SRTT in
milliseconds.
SET
FRAILURE
THRESHOLD
This primitive allows the local SCTP protocol to customize the threshold
for detecting a reachability failure for the specified destination transport
address.
The returned result indicates whether the operation succeeds.
SET
PROTOCOL
PARAMETER
S
This primitive allows the local SCTP protocol to customize the protocol
parameters.
RECEIVE
UNSENT
MESSAGE
This primitive allows the upper-layer protocol to instruct the local SCTP
protocol to save the received failure messages in the buffer defined by
the upper-layer protocol.
Issue 01 (2011-09-30)
10
eRAN2.2
SCTP
Name
Function
RECEIVE
UNACKNOW
LEDGED
MESSAGE
This primitive allows the upper-layer protocol to instruct the local SCTP
protocol to save the received unacknowledged failure messages in the
buffer defined by the upper-layer protocol.
DESTROY
This primitive indicates the destroyed SCTP events. The SCTP event No.
is generated by the INITIALIZE primitive.
Function
DATA ARRIVE
SEND
FAILURE
NETWORK
STATUS
CHANGE
Cause code: indicates the reason of a failure, for example, large size,
message lifetime expiration.
Issue 01 (2011-09-30)
11
eRAN2.2
SCTP
Name
Function
COMMUNCIA
TION UP
The primitive allows the SCTP protocol to notify an SCTP user that the
local SCTP protocol is ready for receiving and transmitting SCTP
packets or an endpoint losing communication is restored.
The following information is to be transmitted:
COMMUNICA
TION LOST
COMMUNICA
TION ERROR
Status: indicates the type of events that occur. The status indicates a
failure or a normal termination event occurred in response to a
SHUTDOWN or ABORT request.
If the SCTP protocol receives an ERROR chunk from the peer endpoint,
the SCTP protocol uses this primitive to notify the upper-layer protocol.
The following information is to be transmitted:
RESTART
This primitive allows the SCTP protocol to notify an SCTP user when
the protocol detects that the peer endpoint is restarted.
Association IDs are transmitted.
SHUTDOWN
COMPLETE
This primitive allows the SCTP protocol to notify an SCTP user after the
protocol closes an association.
IDs of SCTP associations processed locally are transmitted.
Issue 01 (2011-09-30)
12
eRAN2.2
SCTP
SCTP Messages
5.1 Structure
Figure 1.1 shows the structure of an SCTP packet.
Figure 1.1 Structure of an SCTP packet
Issue 01 (2011-09-30)
13
eRAN2.2
SCTP
Each SCTP packet consists of a common header and several chunks, and each chunk contains
control information or user data. All chunks except INIT, INIT ACK, and SHUTDOWN
COMPLETE can be bound into an SCTP packet to meet the requirements for the MTU size.
Each of the chunks may be independent from other chunks in an SCTP packet. If a user
message cannot be transmitted in an SCTP packet, the message can be divided into several
chunks.
It specifies the SCTP port No. for an SCTP transmit endpoint. The receive end can use the
source port No., source IP address, destination port No., and destination IP address to specify
the association to which an SCTP packet belongs.
It specifies the SCTP port No. of the destination endpoint. The receive end can use this
destination port No. to demultiplex an SCTP packet to the correct receive endpoint or
application.
It is a random mark generated by the local endpoint for the association during association
setup. During association setup, the two endpoints exchange the tag. Then, the transmit end
must contain the tag of the peer endpoint in the common header for verification before data
transmission.
The SCTP protocol obtains a 32-bit verification code after using the ADLER-32 algorithm for
user data. In the data packet, the receive end performs the same calculation and uses the
verification code to check whether the user data is damaged.
Chunk Format
Each chunk is formatted with the following fields: Chunk Type, Chunk Flag, Chunk Length,
and Chunk Value.
The chunk type specifies the type of information contained in the Chunk Value field. Table
1.1 lists the major chunk types.
Table 1.1 SCTP chunk types
ID
Chunk Type
Description
DATA (payload
data)
INIT
Issue 01 (2011-09-30)
14
eRAN2.2
SCTP
ID
Chunk Type
Description
INIT ACK
SACK
HEARTBEAT
HEARTBEAT
ACK
ABORT
Aborts an association.
SHUTDOWN
SHUTDOWN
ACK
ERROR
10
COOKIE ECHO
11
COOKIE ACK
12
ECNE
13
CWR
14
SHUTDOWN
COMPLETE
15 to 62
Reserved by IETF.
63
64 to 126
Reserved by IETF.
127
128 to
190
Reserved by IETF.
191
192 to
254
Reserved by IETF.
255
Issue 01 (2011-09-30)
15
eRAN2.2
SCTP
If the receive endpoint cannot identify a chunk type, the two left-most bits of this field
indicate various operations. Table 1.2 shows the meanings for different combination of bits.
Table 1.2 Meanings for the two left-most bits
Two Left-most
Bits
Meaning
00
Stop processing an SCTP packet and discard it, and do not process
other chunks in the SCTP packet.
01
10
11
The usage of the bits depends on the chunk type. Unless otherwise specified, the bits are set to
0 on the transmit endpoint and are ignored by the receive endpoint.
The chunk length specifies the size of a chunk in the binary system, including the following
fields: Chunk Type, Chunk Flags, Chunk Length, and Chunk Value.
The Chunk Value field contains actual information to be transmitted in a chunk. The content
depends on the chunk type. The value is variable.
The total length of a chunk, including type, length, and value, must be a multiple of 4 bytes. If the length
of the chunk is not a multiple of 4 bytes, the transmit end must add 0s to the chunk and the padding is
not included in the chunk length. The receive end can add a maximum of 3 bytes, and all the added bytes
are ignored at the receive end.
Issue 01 (2011-09-30)
16
eRAN2.2
SCTP
16 bits
Parameter Type
Parameter Length
Parameter Value
It specifies the parameter type, and the value ranges from 0 to 65534. The value 65535 is
reserved for IETF-defined extension.
If the receive endpoint cannot identify a parameter type, the two left-most bits of this field
indicate various operations. Table 1.1 shows the meanings for different combination of bits.
Table 1.1 Meanings for the two left-most bits
Two Leftmost Bits
Meaning
00
Stop processing an SCTP packet and discard it, and do not process
other chunks in the SCTP packet.
01
Stop processing an SCTP packet and discard it, do not process other
chunks in the SCTP packet, and report the unrecognized parameters in
an Unrecognized Parameter Type field in the ERROR or INIT ACK
chunk.
10
11
Skip this chunk and continue processing and report the unrecognized
parameters in an Unrecognized Parameter Type field in the ERROR or
INIT ACK field.
It contains the size of the parameter in bytes, including the following fields: Parameter Type,
Parameter Length, and Parameter Value. If the Parameter Value field of a parameter is 0, its
Length field is 4. The parameter length does not include any padding bytes.
The Parameter Value field contains actual information to be transmitted in the parameter.
The total length of a parameter, including type, length, and value, must be a multiple of 4 bytes. If the
length of the parameter is not a multiple of 4 bytes, the transmit end must add 0s to the chunk and the
padding is not included in the parameter length. The receive end can add a maximum of 3 bytes, and all
the added bytes are ignored at the receive end.
Issue 01 (2011-09-30)
17
eRAN2.2
SCTP
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 = 0
Reserve
U B E
Length
TSN
Stream ID
SSN
User Data
The reserved 5 bits are all set to 0s and ignored at the receive end.
U bit (1 bit)
U bit is an unordered bit. If the U bit is set to 1, this chunk is an unordered DATA chunk and
no SSN is assigned to this DATA chunk. Therefore, the receive end must ignore the SSN.
After re-assembly (if necessary), unordered DATA chunks do not need to be reordered before
being dispatched to the SCTP users by the receive end.
If an unordered user message is fragmented, the U bit in each message fragment must be set
to 1.
B bit
B bit is a beginning fragment bit. If it is set in a fragment, the fragment is the first
fragment of a user message.
E bit
E bit is an ending fragment bit. If it is set in a fragment, the fragment is the last fragment
of a user message.
The B and E bits in an unfragmented user message must be set to 1.
If both the B and E bits are set to 0 in a fragment, the fragment is a middle fragment of a
multi-fragment user message. If a user message is fragmented into multiple chunks, the
receive end must use TSNs to reassemble the message. The TSNs for the fragments of a
fragmented user message must be sequential. Table 1.1 describes the meanings for the
values of B and E bits.
Issue 01 (2011-09-30)
18
eRAN2.2
SCTP
Meaning
10
00
11
11
Stream ID
The Stream ID field identifies the stream carrying user data. The value of this field is
generated by the transmit end transmitting INIT and INIT ACK chunks.
Issue 01 (2011-09-30)
19
eRAN2.2
SCTP
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 = 1
Length
Chunk Flags
Initiate Tag
Advertised Receiver Window Credit
Number of Outbound Streams
Initial TSN
Optional/Variable-Length Parameters
An INIT chunk contains the following fields. Unless otherwise expressly noted, each of the
following fields can be included once in an INIT chunk.
Mandatory fields: Initiate Tag, Advertised Receiver Window Credit, Number of Outbound
Streams, Number of Inbound Streams, and Initial TSN.
Variable fields: IPV4 Address, IPV6 Address, Cookie Preservative, Reserved for ECN
Capable, Host Name Address, and Supported Address Types.
Chunk Flags
The Chunk Flags field in an INIT chunk is reserved and all bits in the field are set to 0.
Fields in an INIT chunk can be processed in any order.
Issue 01 (2011-09-30)
20
eRAN2.2
SCTP
If a receive end receives an INIT chunk with the MIS field set to 0, the receive end
aborts the association.
Initial TSN
The Initial TSN field specifies the TSN to be used by the transmit end. This field can be
set to the value of the INIT Tag field.
IPv4 Address
The IPv4 Address field specifies an IPv4 address in binary coding for the transmit end.
An INIT chunk may contain multiple IPv4 addresses, IPv6 addresses, or combination of
IPv4 and IPv6 addresses.
IPv6 Address
The IPv6 Address field specifies an IPv6 address in binary coding for the transmit end.
An INIT chunk may contain multiple IPv4 addresses, IPv6 addresses, or combination of
IPv4 and IPv6 addresses. A transmit end can use the IPv4 address specified by the IPv4
Address field, instead of mapping an IPv4 address to an IPv6 address.
The value of the IPv4 Address or IPv6 Address field, combined with the source port
number in the SCTP common header, indicates a transport address supported by the
transmit end of the INIT chunk. During the lifetime of the association, the IP address can
appear in the source address field of an IP packet sent from the transmit end of the INIT
chunk, or be used as a destination address of an IP packet sent from the receive end of
the INIT chunk. If the transmit end of an INIT chunk supports multihoming, the INIT
chunk can contain more than one IP address parameter. A transmit end supporting
multihoming can access different types of networks, and therefore more than one address
type may appear in an INIT chunk, that is, an IPv4 address and an IPv6 address can
appear in the same INIT chunk.
If an INIT chunk contains at least one IP address parameter, the following addresses can
be used as destination addresses by the receive end of the INIT chunk:
If the INIT chunk does not contain any IP address parameters, the receive end of the
INIT chunk must use the source address in the received IP packet as its destination
address for the association.
Cookie Preservative
The transmit end of the INIT chunk must use this field to suggest to the receive end of
the INIT chunk for a longer life-span of the Cookie state. The transmit end adds the
Cookie Preservative field to the INIT chunk when it re-attempts to establish an
association with a peer to which its previous attempt of establishing the association fails.
The receive end can ignore the suggested cookie lift-span increase to ensure its security.
The Cookie Preservative field contains the Suggested Cookie Life-span Increment field
that has a 32-bit value. The Suggested Cookie Life-span Increment field indicates the
increment in milliseconds the transmit end expects the receive end to add to the default
cookie life-span.
Host Name
The length of the host name is variable. The Host Name field specifies a host name based
on the host name syntax in RFC1123. This document does not describe the method for
resolving the host name.
Issue 01 (2011-09-30)
21
eRAN2.2
SCTP
The host name string contains at least one null terminator and the length of the null
terminator(s) must be included in the length of the host name.
Address Type
The Address Type field specifies an address type, such as IPv4 = 5, IPv6 = 6, and
Hostname = 11.
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 = 2
Length
Chunk Flags
Initiate Tag
Advertised Receiver Window Credit
Number of Outbound Streams
Initial TSN
Optional/Variable-Length Parameters
Issue 01 (2011-09-30)
22
eRAN2.2
SCTP
receives an INIT ACK chunk with the OS field set to 0, the receive end aborts the
association and discards the TCB.
If the INIT ACK chunk does not contain any IP address parameters, the receive end of
the INIT ACK chunk must use the source address in the received IP packet as its
destination address for the association.
State Cookie
The length of the State Cookie field depends on the length of a cookie. This field value
must contain all the necessary state, field information, and message authentication code
required for the transmit end of this INIT ACK chunk to set up the association.
Issue 01 (2011-09-30)
23
eRAN2.2
SCTP
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 = 3
Length
Chunk Flags
Duplicate TSN X
Type
The Type field is set to 3.
Chunk Flags
The Chunk Flags field is set to all 0s.
Issue 01 (2011-09-30)
24
eRAN2.2
SCTP
or equal to the sum of values of Cumulative TSN Ack and Gap Ack Block End of each
Gap Ack Block, the DTAT chunk has been received correctly.
Duplicate TSN
The Duplicate TSN field specifies the number of times a TSN is received after the last
SACK chunk is sent. All duplicate TSNs received by a receive end before sending the
SACK chunk are added to the list of duplicates. The duplicate counter is reset to zero
after a SACK chunk is sent.
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 = 4
Chunk Flags
HEARTBEAT Length
Type (8 bits)
The Type field is set to 4.
HEARTBEAT Length
The HEARTBEAT Length field specifies the length of a chunk in bytes, including the
length of the chunk header and Heartbeat Information field.
HERATBEAT Information
The HEARTBEAT Information field includes Heartbeat Information, which has a
variable length and is in a half-transparent data structure. The value of the Heartbeat
Information field must be identified by the transmit end. Figure 1.2 shows the Heartbeat
Information field format.
Issue 01 (2011-09-30)
25
eRAN2.2
SCTP
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
Heartbeat Info Type=1
HB Info Length
The Sender-specific Heartbeat Info field in a HEARTBEAT chunk includes the time when the
transmit end transmits this chunk.
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 = 5
Chunk Flags
Type (8 bits)
The Type field is set to 5.
HERATBEAT Information
The Heartbeat Information field has a variable length and is in a half-transparent data
structure. This field must contain the Heartbeat information in the Heartbeat Request
message.
26
eRAN2.2
SCTP
COMPLETE chunks, can be bundled with an ABORT chunk, but the Control chunks must be
placed before the ABORT chunk in the SCTP packet. Otherwise, the receive end ignores these
control chunks.
An ABORT chunk with a format error or for an association that does not exist is discarded. If
an endpoint receives an ABORT chunk, it cannot respond to the ABORT chunk by sending an
ABORT chunk of its own.
Figure 1.1 shows the ABORT chunk format.
Figure 1.1 ABORT chunk format
0
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 = 6
Reserved
Length
Type (8 bits)
The seven left-most bits are reserved. The Chunk Flags field is set to all 0s on the
transmit end and ignored by the receive end. If the transmit end has a damaged TCB, the
T bit is set to 0. If the transmit end does not have a TCB, the T bit must be set to 1.
Length (16 bits)
The Length field specifies the size of an ABORT chunk in bytes, including the chunk
header and all the Error Cause fields.
Zero or more Error Causes
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 = 7
Chunk Flags
Length=8
Type
The Type field is set to 7.
Issue 01 (2011-09-30)
27
eRAN2.2
SCTP
Length
The Length field specifies the size of a SHUTDOWN chunk. This field is set to 8.
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 = 8
Chunk Flags
Length=4
Chunk Flags The Chunk Flags field is set to all 0s on the transmit end and ignored by the
receive end.
A SHUTDOWN ACK chunk does not contain other parameters and therefore the Length field
is set to 4.
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 =9
Chunk Flags
Length
Type (8 bits)
The Chunk Flags field is set to all 0s on the transmit end and ignored by the receive end.
Issue 01 (2011-09-30)
28
eRAN2.2
SCTP
The Length field specifies the size of an ERROR chunk in bytes, including the chunk header
and all the Error Cause fields.
Error causes
An error cause includes the cause code, cause length, and cause-specific information, as
shown in Figure 1.2.
Figure 1.2 Error cause format
0
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
Cause Code
Cause Length
Cause-specific Information
The cause-specific information depends on the cause code. The mapping between the cause
code and the cause-specific information is shown in Table 2.1.
Table 2.1 Mapping between the cause-specific information and the cause code
Cause
Code
Value
Parameter Information
Missing mandatory
parameters: Indicates that
one or more mandatory
parameters are missing in a
received INIT or INIT
ACK chunk.
Issue 01 (2011-09-30)
29
eRAN2.2
SCTP
Cause
Code
Value
Parameter Information
Cause Length = 8
4
Cause Length = 4
Unresolvable Address:
Indicates that the transmit
end cannot resolve the
specified address
parameter. For example, the
transmit end does not
support the address type.
This cause code is sent in
combination with or within
an ABORT chunk.
Invalid mandatory
parameter: Returned to the
originator of an INIT or
INIT ACK chunk when one
of the mandatory
parameters is set to an
invalid value.
Cause Length = 4
Unrecognized parameters:
Returned to the originator
of the INIT ACK chunk if
the receive end cannot
recognize one or more
Optional TLV parameters
in an INIT ACK chunk.
Issue 01 (2011-09-30)
30
eRAN2.2
SCTP
Cause
Code
Value
Parameter Information
10
Cause Length = 4
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 =10
Chunk Flags
Length
COOKIE
Type (8 bits)
The Chunk Flags field is set to all 0s on the transmit end and ignored by the receive end.
The Length field is set to the size of the chunk in bytes, including the 4 bytes of the chunk
header and the size of the cookie.
The Cookie field must contain the exact cookie received in the State Cookie field in the
previous INIT ACK chunk. An implementation must make the cookie as small as possible to
ensure interoperability.
Issue 01 (2011-09-30)
31
eRAN2.2
SCTP
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 =11
Chunk Flags
Length=4
The Chunk Flags field is set to all 0s on the transmit end and ignored by the receive end.
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 =14
Reserved
Length=4
Type (8 bits)
The seven left-most bits are reserved. The reserved bits are set to all 0s on the transmit end
and ignored at the receive end.
T bit (1 bit)
The T bit is set to 0 if the transmit end has a damaged TCB. If the transmit end has no TCB,
the T bit is set to 1.
Issue 01 (2011-09-30)
32
eRAN2.2
SCTP
Meaning
Associations
Secret Key
Specifies a secret key for the endpoint calculating the MAC. This
parameter must set to a random cryptographic quality number with a
sufficient length. For details about the selection of secret keys, see the RFC
4086.
Address List
SCTP Port
Meaning
Peer Verification
Tag
My Verification
Tag
Peer Transport
Address List
Primary Path
Overall Error
Count
Overall Error
Threshold
Issue 01 (2011-09-30)
33
eRAN2.2
SCTP
Parameter
Meaning
Peer RWND
Specifies the current calculated value for RWND of the peer endpoint.
Nest TSN
Mapping Array
ACK State
Inbound Streams
Outbound
Streams
Reasm Queue
Local Transport
Address List
Association
PMTU
For a specific association, verification tags used by the two endpoints do not change during the
association lifetime. After this association is released, an endpoint must use a new verification tag to set
up a new association with the peer endpoint.
Meaning
Error Count
Error Threshold
Indicates the error threshold for this destination. When the number of
errors reaches the value of this parameter, the association with this
destination transport address stops.
Issue 01 (2011-09-30)
34
eRAN2.2
SCTP
Parameter
Meaning
CWND
RTO
SRTT
RTTVAR
Partial bytes
acked
State
PMTU
Per Destination
Timer
Last-time
Indicates the time when the last packet is sent to this destination. This
parameter determines whether a HEARTBEAT chunk is to be sent.
General Parameters
RTO.Initial: 3 seconds
RTO.Min 1 second
RTO.Max 60 seconds
Valid.Cookie.Life: 60 seconds
Association.Max.Retrans: 10 attempts
Path.Max.Retrans: 5 attempts
Max.Init.Retransmits: 8 attempts
HB.interval: 30 seconds
Issue 01 (2011-09-30)
35
eRAN2.2
SCTP
Endpoint B
(1) INIT
(2) INIT ACK
(3) COOKIE ECHO
(4) COOKIE ACK
(5) DATA
(6) SACK
(7) DATA
(8) DATA
(9) SACK
1.
Issue 01 (2011-09-30)
36
eRAN2.2
SCTP
Initiate Tag: Put in the Verification Tags field. For example, this parameter can be set
to Tag_A, ranging from 1 to 4294967295.
OS: Indicates the maximum number of outbound streams expected by the local
endpoint.
MIS: Indicates the maximum number of inbound streams allowed by the local
endpoint.
After receiving the stream configuration from the peer endpoint, each endpoint must check information
in each stream. If the MIS of the peer is less than the OS of the local endpoint, the peer endpoint cannot
support the outbound streams expected by the local endpoint, the local endpoint must use the MIS as the
outbound streams of the local endpoint and may report any resource shortage to the upper layer. If the
upper layer cannot accept the resource shortage, it may abort the association.
After sending an INIT chunk, endpoint A starts an INIT timer and enters the COOKIE-WAIT
state.
The INIT timer is used for waiting an INIT ACK chunk from the peer endpoint. If no INIT chunk is
received before the timer expires, the local endpoint resends an INIT chunk until the number of INIT
chunks reaches the value of Max.Init.Retransmits.
2.
3.
Upon the receipt of the INIT chunk, endpoint B immediately responds with an INIT
ACK chunk. The INIT ACK chunk must contain the following parameters:
MIS
OS
After receiving the INIT ACK chunk, endpoint A stops the INIT timer, exits the
COOKIE-WAIT state, and sends a COOKIE ECHO chunk. The COOKIE ECHO chunk
includes the STATE COOKIE parameter in the INIT ACK chunk. Then, endpoint A
starts the COOKIE timer and enters the COOKIE-ECHOED state.
The COOKIE ECHO chunk can be bound in the same SCTP packet with a DATA chunk, but
the COOKIE ECHO chunk must be the first DATA chunk in the SCTP packet. The transmit
endpoint transmits other packets to the peer endpoint only after receiving a COOKIE ACK
chunk.
4.
Issue 01 (2011-09-30)
After receiving the COOKIE ECHO chunk, endpoint B checks it. Endpoint B calculates
the MAC using the MAC algorithm described in RFC2401 based on the TCB in STATE
COOKIE and the secret key, and compares the calculated MAC with the MAC carried
by the STATE COOKIE parameter. If they are different, endpoint B discards the
Huawei Proprietary and Confidential
Copyright Huawei Technologies Co.,
Ltd
37
eRAN2.2
SCTP
message. If they are the same, endpoint B compares the time stamp when the TCB is
generated with the current time to check whether the time stamp exceeds the COOKIE
life-span. If the time stamp exceeds the COOKIE life-span, the message is discarded. If
the time stamp is within the COOKIE life-span, endpoint B sets up an association with
endpoint A based on the information in a TCB. Endpoint B enters the ESTABLISHED
state and sends a COOKIE ACK chunk. Endpoint B sends the SCOMMUNCIATION UP
message to an SCTP user.
The COOKIE ACK chunk can be bound in the same SCTP packet with a DATA chunk, but
the COOKIE ACK chunk must be the first DATA chunk in the SCTP packet.
After receiving a COOKIE ACK chunk, endpoint A enters the ESTAABLISHED state from
the COOKIE-ECHOED state and stops the COOKIE timer. Endpoint A sends the
COMMUNICATION UP message to inform SCTP users of a successful association setup.
An association is set up using a four-way startup handshake, including: INIT, INIT ACK, COOKIE
ECHO, and COOKIE ACK.
5.
6.
Endpoint A sends a DATA chunk to endpoint B and starts the T3-RTS timer. The DATA
chunk must contain the following parameters:
Stream Identifier: Identifies the stream to which user data belongs. For example, 0.
Stream Sequence Number: Specifies the transmission sequence number of user data
in a stream. The value ranges from 0 to 65535.
After receiving the DATA chunk, endpoint B sends a SACK chunk. The SACK chunk
must contain the following parameters:
8.
Issue 01 (2011-09-30)
Endpoint B sends the first DATA chunk to endpoint A. The DATA chunk must contain
the following parameters:
Stream Identifier: Identifies the stream to which user data belongs. For example, 0.
Stream Sequence Number: Specifies the transmission sequence number of user data
in a stream. For example, 0.
Endpoint B sends the second DATA chunk to endpoint A. The DATA chunk must contain
the following parameters:
Stream Identifier: Identifies the stream to which user data belongs. For example, 0.
Stream Sequence Number: Specifies the transmission sequence number of user data
in a stream. For example, 1.
Huawei Proprietary and Confidential
Copyright Huawei Technologies Co.,
Ltd
38
eRAN2.2
SCTP
9.
After receiving the DATA chunk, endpoint B sends a SACK chunk. The SACK chunk
must contain the following parameters:
Endpoint B
(1) SHUTDOWN
(2) SHUTDOWN ACK
(3) SHUTDOWN COMPLETE
2.
After receiving the SHUTDOWN chunk, endpoint B enters the SHOUTDOWNRECEIVED state indicating that it does not receive new data from its SCTP users, and
check the Cumulative TSN ACK field in the SHUTDOWN chunk to verify that all
outstanding data has been acknowledged by the transmit end of the SHUTDOWN chunk.
Issue 01 (2011-09-30)
39
eRAN2.2
SCTP
After verifying that data has been sent and all outstanding data has been acknowledged,
endpoint B sends a SHUTDOWN ACK chunk and starts the T2-SHUTDOWN timer,
entering the SHUTDOWN-ACK-SENT state. If endpoint A does not receive the
SHUTDOWN ACK chunk before the T2-SHUTDOWN timer expires, endpoint B
resends a SHUTDOWN ACK chunk.
3.
Issue 01 (2011-09-30)
After receiving the SHUTDOWN ACK, endpoint A stops the T2-shutdown timer, sends a
SHUTDOWN COMPLETE chunk to endpoint B, and removes all data about the
association. After receiving the SHUTDOWN COMPLETE chunk, endpoint B checks
whether it is in the SHUTDOWN-ACK-SENT state. If endpoint B is not in the
SHUTDOWN-ACK-SENT state, it discards the SHUTDOWN COMPLETE chunk. If it
is in the SHUTDOWN-ACK-SENT state, it stops the T2-shutdown timer, removes all
data about the association, and enters the CLOSED state.
40