SCTP-based Approaches
Chapter 3 Comparing the MTP-based
3.2 Connection Setup
In our MTP-based SS7 implementation, a signaling data link is a bidirectional transmission path for signaling, which consists of standard E1 64 Kb/s channels connected to the SS7 card. A signaling point is typically equipped with multiple SS7 network interfaces (i.e., E1 interfaces) to an adjacent signaling point so that more than one signaling link can be used to carry the SS7 messages with enhanced availability. In this approach, MTP2 provides reliable transfer within a signaling link, and uses FISUs (see Figure 3.1.1 (a)) as a keep-alive signal to detect if the signaling link is available fo carrying messages. MTP3 provides functions and procedures related to message routing and network management. MTP3 defines a link set that consists of the signaling links connected to the same adjacent signaling point. In addition to the concept of link set, MTP3 also defines a route as a collection of the link sets used to reach a particular destination. A link
r
set can belong to more than one route. MTP3 uses the routing label of MSU (see Figure 3.1.1 (c)) to determine how to route the messages. The routing label of MSU consists of OPC, DPC and SLS. If the DPC of the received MSU is the local signaling point, then the message is processed by MTP3. If the DPC identifies another signaling point, MTP3 selects an appropriate route according to the information stored in its routing tables to tran
ined by the SLS field of MSU. If the MTP-user messages are transferred in the same value for the messages. If the
delivery service, the messages may be ay be assigned to a default SLS such as 0000 to allow load e message delivery. MTP3 will route the MTP-user messages through the
of these signaling links. If a signaling link t becomes congested, the messages can be
alternatively rerouted by the MTP3 network management.
sfer message. The selection of the particular signaling link is determ
sequence, the SLS field should be coded with MTP-user messages do not need in-sequence assigned to any SLS or m
sharing of th
appropriate signaling link based on the loads fails in that path or a signaling poin
Each signaling point in an MTP-based SS7 network configures the signaling links, the ends DATA chunks through link sets, the routes and the routing tables in advance. MTP3 does not need to c
additional connection setup, and the MTP3-user (i.e., SCCP) can use MTP-TRAN service provided by MTP3 to transfer messages to the destination.
In the SCTP-based SS7 network, M3UA/SCTP/IP provide the same MTP functions to th M3UA-user (i.e., SCCP or ISUP). In this approach, Internet Protocol provides functions for packet routing in the IP network. SCTP provides reliable transfer with two features that are particularly desirable for SS7 signaling; namely, multi-streaming and
multi-homing. An SCTP stream is a unidirectional logical channel established from one SCTP endpoint to another SCTP endpoint, and can be considered a signaling link in th MTP-based approach. The SCTP stream is identified by the Stream ID field in the D chunk (see Figure 1.2.3). The Stream Sequence Number (SSN) field in the DATA chunk is used to preserve the data order within a stream. Each stream independently deliveries messages so that the Head of the Line blocking problem in TCP can be avoided. Wh one stream is blocked and is waiting for the next in-sequence message, message
deliveries of other streams are not affected. The M3UA may use the SLS value to select the SCTP stream. The messages that need to be transferred in sequence are assigned t the same SLS value. SCTP also supports multi-homed endpoint that has more than addresses. The IP addresses are typically assigned to different network interfaces of th endpoint. The multi-homed SCTP endpoint specifies available IP addresses during th SCTP association establishment (to be elaborated later), and selects a primary path (i.
primary destination address). To ensure reachability, an endpoint sends the HEARTBEA chunk to its peer endpoint to probe a particular destination address (i.e. IP address) defined in the present association. This mechanism is equivalent to the keep-al (i.e., FISU) in the MTP-SS7 based network. Each endpoint s
the primary path for normal transmission. Retransmitted DATA chunks use an alternate path. Continued failures of the primary path result in the decision to transmit all chunks to the alternate destination until the primary destination becomes available again. Note that, SCTP does not support load sharing of the multi-homed endpoint by simultaneously
sing the multiple paths. M3UA provides the MTP3 functions to the M3UA-user (i.e.,
d
,
o
r IT, u
SCCP). M3UA also provides management of SCTP associations and address mapping from SS7 point codes to IP addresses. Because the MTP3 routing is based on OPC, DPC, and SLS, these parameters are used to determine the IP addresses of SCTP endpoints an specific stream of the association between the endpoints.
In an IP-based SS7 network, the routing tables of IP are configured in advance. However to support multi-streaming and multi-homing features, SCTP needs to use a four-way handshake procedure to exchange information and allocate resources to establish connection (i.e., SCTP association) between the peer multi-streaming (multi-homing) endpoints. The M3UA-user (i.e., SCCP) invokes MTP-TRANSFER service of M3UA t transfer messages after the SCTP association is established.
The SCTP association is established by a 4-way handshake procedure. A finite state machine for association establishment is implemented in each of the endpoints. The events that drive the finite state machine include the primitives invoked by the SCTP-use (i.e. ASSOCIATE and ABORT in Figure 3.2.1), reception of the SCTP chunks (i.e., IN INIT ACK, COOKIE ECHO, COOKIE ACK, and ABORT in Figure 3.2.1), and expiry of the timers. The chunk described in Section 1.2 is the basic structure to carry information in the SCTP packet. Figure 3.2.1 illustrates a simplified state transition diagram for association establishment where the error conditions and timeout events are omitted. The omitted details can be found in [14].
CLOSED
COOKIE-ECHOED COOKIE-WAIT
(from any state)
INIT ACK is rece valid COOKIE ECHO
COOKIE ACK is received ---send COOKIE ECHO ESTABLISHED
---send INIT
ABORT is received ABORT is invoked
ion Control Block
Figure 3.2.1: State Transition Diagram for SCTP Association Establishment
TCB: Transmiss
Suppose that SCTP endpoint A attempts to set up an association with SCTP endpoint Z.
The SCTP association establishment process consists of the following steps (shown in Figure 3.2.2).
(1) INIT (2) INIT ACK (3) COOKIE ECHO
(4) COOKIE ACK
(DATA)
Endpoint A Endpoint Z
Figure 3.2.2: SCTP Association Establishment by Four-way Handshake Step 1: Initially, the finite state machines of both endpoints are in the CLOSED state. The
SCTP-user in endpoint A invokes the ASSOCIATE primitive to initiate an SCTP association. A Transmission Control Block (TCB) is created to contain all statuses and operational information for the endpoint to maintain and manage this
association. Then endpoint A sends an INIT chunk to endpoint Z. In the INIT chunk, endpoint A specifies the number of the streams that it can support in this association. More than one IP address can be included in this INIT chunk if
the COOKIE-WAIT state.
pport in this association, and multiple IP addresses are included if endpoint Z is multi-homed. This chunk also includes a State Cookie [14] that is generated by endpoint Z to contain all information necessary to establish the association. The State Cookie is private and only useful to the generator (i.e., endpoint Z) for TCB creation later. The action of sending the INIT ACK chunk does not enable endpoint Z to allocate any resources or keep any states for this endpoint A is multi-homed. After sending the SCTP packet, endpoint A moves to
Step 2: Upon receipt of the INIT chunk, endpoint Z shall respond immediately with an INIT ACK chunk. In this chunk, endpoint Z specifies the number of the streams that it can su
new association. Endpoint Z remains in the CLOSED state. In this way, denial of service attacks (such as SYN attacks presented in TCP) can be avoided.
Step 3: Upon receipt of the INIT ACK chunk, endpoint A sends the COOKIE ECHO chunk that includes the same State Cookie received in the INIT ACK chunk. The received State Cookie is private and only useful to the sender of the INIT ACK chunk (i.e., endpoint Z). Endpoint A does not use this State Cookie and must not modify this State Cookie. At the end of this step, endpoint A moves to the COOKIE-ECHOED state.
Step 4
nt Z, .
3.3 Da
In the MTP-based approach, MTP2 provides reliable in-sequence transfer for a signaling
namely whenev elabora
transfer ntly
in two t,
negativ indicat
: Upon receipt of the COOKIE ECHO chunk, endpoint Z authenticates the State Cookie from the received COOKIE ECHO chunk to insure that the State Cookie was previously generated by endpoint Z. If the authentication succeeds, endpoint Z uses this State Cookie to create a TCB for this association. Endpoint Z replies with a COOKIE ACK chunk, and its finite state machine moves to the
ESTABLISHED state. Upon receipt of the COOKIE ACK chunk from endpoi endpoint A moves to the ESTABLISHED state, and the association is established
ta Transmission/Ack
link directly connecting two signaling points. There are two error correction methods;
, basic error correction and Preventive Cyclic Retransmission (PCR). PCR is used er satellite transmission is required for signaling links, which will not be
ted in this thesis. Basic error correction method ensures correct and in-sequence of MSU (see Figure 3.1.1 (c)) over the signaling link, and operates independe transmission directions. Basic error correction utilizes positive acknowledgmen
e acknowledgment and retransmission of MSU. Several sequence numbers and ion bits are included in these messages. Forward Sequence Number (FSN) and
Forwar
associa BIB) of
n
ceives an MSU, it will first check if the FSN of the received MSU exceeds the FSN of 1 to ensure in-sequence delivery. Secondly, signaling
hose
d d Indicator Bit (FIB) of MSUs (see Figure 3.1.1 (c)) in one direction are
ted with Backward Sequence Number (BSN) and Backward Indicator Bit ( SUs (see Figure 3.1.1) in the other direction. FSN is the sequence of an MSU. FIB is a
field of MSU to indicate retransmission start. If an MSU has an FIB value t from the previous MSU, it represents the first retransmitted MSU. It makes no ce whether the FIB value is 0 or 1. BSN is used to acknowledge the last correctly d MSU. BIB is an one-bit field of SU with the following usage.
the BIB value of an SU is e
acknowledges the MSU whose FSN is equal to the BSN of the SU.
an SU has a BIB value different from the previous SU, it represents a negative knowledgment that results in retransmission of the corresponding MSUs.
B, it makes no difference whether the BIB value is 0 or 1. Note that under normal on, the FIB included in the transmitted MSU is equal to the BIB value o
d SU to indicate that the sender has received the last SU sent by the receiver.
e that signaling point A sends MSUs to signaling point Z. When signaling point Z re
the last correctly received MSU by
point Z will check the FIB of the received MSU. If the FIB of the received MSU is equal to the BIB of the last sent SU, the MSU is forwarded to the MTP3. If the received MSU is not in the FSN sequence, and the FIB of the received MSU is equal to the BIB of the last sent SU, signaling point Z sends a negative acknowledgement (i.e., the SU w BIB value differs from the BIB value of the last SU) to signaling point A to request retransmission. Upon receipt of the negative acknowledgment from signaling point Z, signaling point A checks the BIB of the received SU. If the BIB of the received SU is not equal to the FIB of the last MSU, all un-received MSUs are transmitted in sequence starting with the MSU whose FSN exceeds the FSN of the most recently acknowledge
MSU by 1. Signaling point A can send new MSUs only when the last un-receive has been transmitted. At the beginning of a retransmission, the FIB value of the first retransmitted MSU is inverted, which equals to the BIB value of the last received SU (i.e the negative acknowledgement). The new FIB value is maintained in subsequently transmitted MSU until a new retransmission is started. Thus, under normal operations, the FIB included in the transmitted MSU is equal to the BIB value of the received SU.
d MSU
.,
poin U(FIB=0,
poin
nt
1,
nd Figure 3.3.1 shows an example of basic error correction for MSUs sent from signaling
t A to signaling point Z. Assuming that before the transmission of MS
FSN=14), the BIB value of the last received SU in signaling point A is 0, and signaling t Z has received MSUs with FSNs up to 13. In this scenario, signaling point A sends MSU(FIB=0, FSN=14), and signaling point Z positively acknowledges MSUs with FSNs up to 14 by SU(BIB=0, BSN=14). Signaling point A continues to send MSU(FIB=0, FSN=15) and MSU(FIB=0, FSN=16). Signaling point Z receives MSU(FIB=0, FSN=15) with error and discards MSU(FIB=0, FSN=15). Later,
MSU(FIB=0, FSN=16) is arrived. MSU(FIB=0, FSN=16) will fail the “sequence test”
since the FSN of MSU(FIB=0, FSN=16) does not exceed the FSN of the last received MSU (i.e., MSU(FIB=0, FSN=14)) by 1. Signaling point Z discards MSU(FIB=0, FSN=16) and negatively acknowledges MSUs with FSNs up to 14 by SU(BIB=1, BSN=14). Note that the BIB of SU(BIB=1, BSN=14) is not equal to the BIB of the previous SU (i.e., SU(BIB=0, BSN=14)). Upon receipt of the negative acknowledgme SU(BIB=1, BSN=14), signaling point A immediately starts retransmission of
MSU(FIB=1, FSN=15) and MSU(FIB=1, FSN=16). Note that the FIB of MSU(FIB=
FSN=15) is not equal to the FIB of the previous MSU (i.e., MSU(FIB=0, FSN=16)) which indicates starting of retransmission. Upon receipt of MSU(FIB=1, FSN=15) a MSU(FIB=1, FSN=16) correctly, signaling point Z positive acknowledges MSUs with
FSNs up to 16 by SU(BIB=1, BSN=16).
Signaling Point A Signaling Point Z
MSU (FIB=0, FSN=14)
SU (BIB=0, BSN=14)
MSU (FIB=0, FSN=15)
MSU (FIB=0, FSN=16)
Error
SU (BIB=1, BSN=16) SU (BIB=1, BSN=14)
Discard
MSU (FIB=1, FSN=15)
MSU (FIB=1, FSN=16)
Figure 3.3.1: An Example of Basic Error Correction
For the IP-based SS7 network, an SCTP stream can be considered as a one-way signaling link in the MTP-based SS7 network. Like MTP, SCTP also provides reliable in-sequence transfer within a stream over the IP-based SS7 network. As described in Section 1.2, an SCTP packet (see Figure 1.2.1) is composed of an SCTP common header and one or more SCTP chunks which contain control or data information. The SCTP-user (i.e., M3UA) message passed to the SCTP layer for transmission will be carried in the DAT chunk (see Figure 1.2.3). The in-sequence delivery service utilizes Stream ID (see Figure 1.2.3 (2)) and Stream Sequence Number (SSN; see Figure 1.2.3 (3)) in the DAT
The SCTP layer forwards the received messages (i.e., the DATA chunks) associated with the specific Stream ID to the SCTP-user (i.e., M3UA) in the SSN order. SSN is
associated with a particular stream. Unlike MTP2, the DATA chunks that are not received A
A chunk.
in the SSN sequence are stored in the receive buffer allocated by the SCTP layer. The ceive buffer stores all received DATA chunks that have not yet been forwarded to the SCTP-user (e.g., if the DATA chunks are not received in the SSN sequence or the SCTP-user is busy). The DATA chunk in the receive buffer is released until it has been forwarded to the SCTP-user. The SCTP uses Selective Acknowledgement [14] to ensure reliable transfer. In this approach, each DATA chunk is assigned a sequence number TSN (see Figure 1.2.3 (1)) that is used to acknowledge the received DATA chunks and to detect duplicate deliveries. TSN is used within an association that may contain more than one stream for either ordered delivery service or unordered delivery service, and is independent of any SSN assigned at the stream level. Note that SSN cannot be used for the purpose of TSN because SSN is only associated with a particular stream. The receiver uses the Selective Acknowledgement (SACK) chunk to acknowledge the received DATA chunks, to inform the sender of the gaps found in a received TSN sequence, and to
provide the available receive buf ts
ACK
TSNs received by the endpoint. Each Gap Ack Block re
fer size of the receiver. (A “gap” represen
not-yet-received messages of consecutive TSNs.) The sender may retransmit the DATA chunks based on the SACK chunk sent from the receiver.
Figure 3.3.2 illustrates the SACK chunk format, which includes Type, Chunk Length, Cumulative TSN Ack, Advertised Receiver Window Credit (a_rwnd), Number of Gap Ack Blocks, Number of Duplicate TSNs and the optional fields (i.e., Gap Ack Block and Duplicate TSN). Cumulative TSN Ack (Figure 3.3.2 (1)) contains the TSN of the last in-sequence DATA chunk received before a gap. A_rwnd (Figure 3.3.2 (2)) indicates the available receive buffer size for the sender of this SACK chunk. Number of Gap Ack Blocks (Figure 3.3.2 (3)) indicates the number of Gap Ack Blocks included in this S chunk. Number of Duplicate TSNs (Figure 3.3.2 (4)) indicates the number of duplicate
Chunk Length (1) Cumulative TSN Ack
(7) Duplicate TSN 1 . . .
(4) Number of Duplicate TSNs=X (3) Number of Gap Ack Blocks=N
0 . . . 15 16 . . . 31
Type = 3 Reserved
TSN: Transmission Sequence Number (2) Advertised Receiver Window Credit (a_rwnd)
(6)Gap Ack Block End #1 (5) Gap Ack Block Start #1
Gap Ack Block End #N Gap Ack Block Start #N
. . .
Duplicate TSN X
Figure 3.3.2: SACK Chunk Format
contains Gap Ack Block Start offset (Figure 3.3.2 (5)) and Gap Ack Block End offset (Figure 3.3.2 (6)) that indicate the range of TSNs been received. In order to calculate the actual TSNs, these offsets (i.e., Gap Ack Block Start and Gap Ack Block End) are added to the Cumulative TSN Ack (Figure 3.3.2 (1)). Duplicate TSN (Figure 3.3.2 (7)) indicates that the chunk of the TSN has been received more than once. Further usage of Duplicate TSN has not yet been defined in the SCTP specification.
Figure 3.3.3 shows an example of the SACK chunk. Consider a scenario where endpoint A sends 11 DATA chunks to endpoint Z in an SCTP stream. The size of each DATA chunk is 200 bytes. Each SCTP packet contains one DATA chunk, and the receive buffer size of endpoint Z is 5600 bytes. Suppose that endpoint Z has received the DATA chunks with TSNs 1-4, 7 and 8. Since endpoint Z has not received DATA chunks with TSNs 5 and 6, the DATA chunks with TSNs 7 and 8 cannot be forwarded to the SCTP-user and are stored in the receive buffer. At this point, the available receive buffer size becomes 5200 bytes. When the SCTP packet containing the DATA chunk with TSN 11 is received, endpoint Z detects that the DATA chunks with TSNs 5, 6, 9 and 10 has not been received,
and the DATA chunk with TSN 11 is stored in the receive buffer. At this point, the available receive buffer size becomes 5000 bytes. After processing the SCTP packet containing the DATA chunk with TSN 11, endpoint Z immediately sends a SACK chunk to endpoint A as the acknowledgement. The format of the SACK chunk is illustrated in Figure 3.3.3. Upon receipt of the SACK chunk from endpoint Z, endpoint A will retransmit the DATA chunks with TSNs 5, 6, 9, and 10.
Chunk Length = 24 Cumulative TSN Ack = 4
Number of Duplicate TSNs = 0 Number of Gap Ack Blocks = 2
0 . . . 15 16 . . . 31
Type = 3 Reserved
a_rwnd = 5000
Gap Ack Block End #1 = 4 Gap Ack Block Start #1 = 3
Gap Ack Block End #2 = 7 Gap Ack Block Start #2 = 7
Figure 3.3.3: An Example of the SACK Chunk