Вы находитесь на странице: 1из 37

SCTP Overview

diameter \di-am-t-r\ - Any straight line segment


that passes through the center of the circle and
whose endpoints are on the circle.

iam

er
et

s
diu
Ra

Lesson Objectives
During this lesson, we will:

Define IP-based links used for Diameter

Examine Stream Control Transmission Protocol (SCTP)

Describe the different SCTP messages

Show how SCTP maintains link integrity.

Overview
Diameter
Application

Diameter
Application

Diameter
Application

Diameter
Application

Diameter
Application

Diameter
Application

Diameter Base
Protocol

Transmission
Control Protocol
(TCP)

Stream Control
Transmission
Protocol (SCTP)

Internet Protocol (IP)

Diameter
Client

Diameter
Server

IP Links
Diameter
Client

Relay
Agent

AF
PCEF

HSS

Redirect
Agent

Diameter
Server

Proxy
Agent

MME

PCRF

Translation
Agent

Using Internet Protocol (IP)

Internet
Process

IP is a routing protocol
IP messages are called packets or datagrams
It is connectionless
It cannot correlate messages
There is no open, close, error correction, flow control

Internet
Process
Internet
Process

Internet
Process

IP Version 4 Packet Structure


1
2
3
01234567890123456789012345678901
Version

Length

Type of Service
Flags

Identification
Time To Live

Total Length
Fragment Offset
Header Checksum

Protocol
Source Address
Destination Address

Data

1 0 0 0 0 1 0 0 - Sigtran

User (e.g. Diameter Message)

IP Version 6 Packet Structure


1
2
3
01234567890123456789012345678901
Version

Traffic Class
Payload Length

Flow Label
Next Header
Source Address

Destination Address

Hop Limit

Sigtran Protocol Architecture


Stream Control Transmission Protocol (SCTP) Overview

Diameter Applications

Diameter Base

Common Signaling Transport (SCTP)

Standard Internet Protocol (IP)

New Transport Protocol


Equivalent to TCP and UDP
Defined in RFC 4960

Stream Control Transmission Protocol


Services

Upper Users (Upper Layer Protocol)

Adaptation Protocol (XUA, XPA)

Common Signaling Transport (SCTP)

Standard Internet Protocol (IP)

Acknowledged, error-free, non-duplicated transfer


Data fragmentation
Sequenced delivery of messages within multiple streams
Bundling of data
Network level fault tolerance

SCTP Architectural Overview


SCTP User
Application

SCTP
Transport
Service

IP
Network
Service

SCTP User
Application

Same Layer as TCP and UDP


Key Differences:
multi-streaming & multi-homing

One or more
IP address
appearances

One or more
IP address
appearances

Network Transport

SCTP
Transport
Service

IP
Network
Service

SCTP Advantages
Multistreaming

SCTP User
Application

SCTP
Transport
Service

SCTP User
Application

Stream 0
Stream 1

IP
Network
Service

SCTP
Transport
Service

IP
Network
Service

Network Transport

SCTP Advantages
Multihoming

SCTP User
Application

SCTP User
Application
IP address A
Port Z

IP address C
Port Z

SCTP
Transport
Service

IP
Network
Service

SCTP
Transport
Service
IP address B
Port Z

IP address D
Port Z

Network Transport

IP
Network
Service

Stream Control Transmission Protocol


Functions

Upper Users (Upper Layer Protocol)

Adaptation Protocol (XUA, XPA)

Common Signaling Transport (SCTP)

Standard Internet Protocol (IP)

Association startup & teardown


Sequenced delivery within streams
User data fragmentation
Acknowledgement & congestion avoidance
Chunk Bundling
Path management
Packet validation

SCTP
Key Terms

Upper Layer
User
SCTP
IP
Transport

Chunk a unit of information within an SCTP


packet
Message data submitted by the Upper Layer
Protocol (ULP)
SCTP Association a protocol relationship
between two SCTP endpoints
SCTP Endpoint the logical sender or receiver of
SCTP packets
SCTP Packet a unit of data delivery
Stream a unidirectional logical channel

SCTP Packets
IP Packet Structure (see IP Packet Structure Page)
Data

1
2
3
01234567890123456789012345678901
SCTP Common Header
Chunk Number 1
Chunk Number 2

Chunk Number n

SCTP Common Header Format


SCTP Common Header
Chunk Number 1
Chunk Number 2
Data

Chunk Number n
SCTP Packet Structure

IP Packet Structure

1
2
3
01234567890123456789012345678901
Source Port Number

Destination Port Number


Verification Tag
Checksum

SCTP Chunks
SCTP Common Header
Chunk Number 1
Chunk Number 2
Data

Chunk Number n
SCTP Packet Structure

IP Packet Structure

1
2
3
01234567890123456789012345678901
Source Port Number

Destination Port Number


Verification Tag
Checksum

Chunk Type

Chunk Flags

Chunk Length

Chunk Value

SCTP Chunks Payload Data (DATA)


SCTP Common Header
Chunk Number 1
Chunk Number 2
Data

Chunk Number n
SCTP Packet Structure

IP Packet Structure

1
2
3
01234567890123456789012345678901
Source Port Number

Destination Port Number


Verification Tag
Checksum

Chunk Type = 0

Reserved U B E

Chunk Length

Transmission Sequence Number (TSN)


Stream Identifier S

Stream Sequence Number n

Payload Protocol Identifier


User Data Diameter Messages

SCTP Other Chunk Types


Control Chunks

1
2
3
01234567890123456789012345678901
Source Port Number

Destination Port Number


Verification Tag
Checksum

Chunk Type

Chunk Flags
or Reserved

Chunk Length

Mandatory, Optional or
Variable parameters,
depending on the Chunk
Type

1
2
3
4
5
6
7

Initiation (INIT)
Initiation Acknowledgement INIT ACK)
Selective Acknowledgement (SACK)
Heartbeat Request (HEARTBEAT)
Heartbeat Acknowledgement (HEARTBEAT ACK)
Abort (ABORT)
Shutdown (SHUTDOWN)

8
9
10
11
12
13
14

User Acknowledgement
Data
Shutdown
(SHUTDOWN ACK)
Operation Error (ERROR)
State Cookie (COOKIE ECHO)
Cookie Acknowledgement (COOKIE ACK)
Reserved (ECNE)
Reserved (CWR)
Shutdown Complete (SHUTDOWN COMPLETE)

SCTP States
User
Adaptation

User
Adaptation

SCTP

SCTP

IP Transport

IP Transport

Idle
Associating
Established

SCTP
Establishing an Association Client Side

ASSOCIATE
Primitive

X
X

Start init timer

Enter COOKIEWAIT state

Stop init timer

Start cookie timer

Enter COOKIE-ECHOED state

Stop cookie timer

10

Enter ESTABLISHED state

Upper Layer
User

Upper Layer
User

SCTP

SCTP

IP
Transport

IP
Transport
2
INIT Chunk
Sent

6
COOKIE-ECHO
Chunk Sent

4
INIT-ACK
Chunk Received

8
COOKIE-ACK
Chunk Received

SCTP
Establishing an Association Server Side
Upper Layer
User

Upper Layer
User

SCTP

SCTP

IP
Transport

INIT Chunk
Received

1
INIT-ACK
Chunk Sent w/
COOKIE

4
5
COOKIE-ECHO
Chunk w COOKIE
Received

COOKIE-ACK
Chunk Sent

IP
Transport

Generates Values

Places computed
Values in COOKIE

Check Values

Enter ESTABLISHED state

SCTP Protocol Address Discovery


Upper Layer User

SCTP

IP Transport

Use address information from IP (address)


and SCTP Header (ports)
Resolve Host Name parameter to IP address
& port number
Use a combination of the two

SCTP User Data Transfer


Overview

Upper Layer User

SCTP

IP Transport

Data transmission only in ESTABLISHED,


SHUTDOWN-PENDING & SHUTDOWNRECEIVED states
DATA chunks only received in ESTABLISHED,
SHUTDOWN-PENDING & SHUTDOWN-SENT
states.
All others are discarded
Endpoint can fragment messages
Multiple DATA & control chunks may be
bundled into a single SCTP packet
Control chunks must come before DATA
chunks

Upper Layer User

SCTP

IP Transport

Transmission of Data
General Rules

Upper Layer User

SCTP

IP Transport

Upper Layer User


Receiver must have sufficient buffer space
(rwnd)
Sender must not transmit if it has cwnd or
more data outstanding
Retransmitted DATA before new DATA
Sender SHOULD limit the number of DATA
packets sent

SCTP

IP Transport

SCTP
Flow Control
Sending Side

Receiving Side

Upper Layer User

Upper Layer User

SCTP

DATA chunks
SACK chunks

IP Transport
When should I expect
acknowledgement?

SCTP

IP Transport
Acknowledged DATA
How much buffer space I
have left

Reception of Data
General Rules

Upper Layer User

SCTP

IP Transport

Upper Layer User


Endpoint must acknowledge DATA chunks
Acknowledgement should be within 200 ms
Acknowledgement normally uses SACK
chunks

SCTP

IP Transport

SCTP
Sending the Selective Acknowledgement (SACK)
Sending Side

Receiving Side

Upper Layer User

Upper Layer User

SCTP

IP Transport
Wait for transmission timer to expire;
then
Retransmit missing DATA chunks;
or
If I receive 4 SACK chunks with same DATA chunk missing;
then
Retransmit using FAST Retransmit mechanism.

DATA chunks
SACK chunks

SCTP

IP Transport
Acknowledge received DATA chunks
Inform peer of any gaps
Uses parameters

SCTP SACK Example


Sending Side

Receiving Side

Upper Layer User

Upper Layer User

SCTP

DATA chunks

SCTP

SACK chunks

TSN 17

TSN 15
TSN 14

IP Transport

IP Transport

Cumulative TSN ACK = 12


a_rwnd = 4660
Num of Block = 2

Num of Dup = 0

Block # 1 Start = 2

Block # 1 End = 3

Block # 2 Start = 5

Block # 2 End = 5

TSN 12
TSN 11
TSN 10

SCTP
Monitoring

Include current time


Include destination address

Sending Side

Receiving Side

Upper Layer User

Upper Layer User

SCTP

IP Transport

HEARTBEAT chunks
HEARTBEAT ACK chunks

SCTP

IP Transport

Include copy of received HEARTBEAT information

SCTP
Aborting an Association

Include Verification Tag


Dont include DATA chunks
May indicate the reason

Sending Side

Receiving Side

Upper Layer User

Upper Layer User

SCTP

ABORT chunk

IP Transport

SCTP

IP Transport

Validate the chunk


Remove the association
Inform upper layer user
Do not reply

SCTP
Terminating an Association

SHUTDOWN
Primitive

Upper Layer
User

Upper Layer
User

SCTP

SCTP

IP
Transport

IP
Transport

Stop accepting data


from user
Wait for data to be
acknowledged
Start timer
Stop timer
Remove all data belonging
to association
Enter CLOSED state

SHUTDOWN Chunk
Sent

SHUTDOWN-ACK
Chunk SENT

Wait for data to be


acknowledged
Start timer

Stop timer
May remove all data
belonging to
association
Enter CLOSED state

SHUTDOWN-COMPLETE
Chunk Sent

SCTP
Sending Errors
Sending Side

Receiving Side

Upper Layer User

Upper Layer User

Operation Error chunk

SCTP

IP Transport

SCTP

IP Transport

Invalid Stream Identifier


Missing mandatory Parameter
Stale Cookie Error
Out of Resource
Unresolvable Address
Unrecognized Chunk Type
Invalid Mandatory Parameter
Unrecognized Parameters
No User Data
Cookie Received While Shutting Down

SCTP & IP Notifications


Upper Layer
User

Upper Layer
User

MTP3 or
User

MTP3 or
User

UA or
Peer

Association established
Association terminated

SCTP
IP

UA or
Peer

SCTP
Local IP address inactive
Local IP address active

IP

SCTP Measurements
Upper Layer
User
MTP3 or
User
UA or
Peer

SCTP
IP

SCTP packets sent & received


SCTP octets sent & received
SCTP chunks sent & received
SCTP control chunks sent & received
SCTP ordered data chunks sent & received
SCTP association T1 expiration
SCTP association T2 expiration
SCTP association retransmitted chunks
SCTP gap acknowledgements received
SCTP association active establishments
SCTP association passive establishments
SCTP association shutdowns

Upper Layer
User

MTP3 or
User
UA or
Peer

SCTP
IP

Lesson Summary
In this lesson, we have:

Defined IP-based links used for Diameter

Examined Stream Control Transmission Protocol (SCTP)

Described the Different SCTP messages

Shown how SCTP maintains link integrity.

SCTP Overview

diameter \di-am-t-r\ - Any straight line segment


that passes through the center of the circle and
whose endpoints are on the circle.

iam

er
et

s
diu
Ra

Вам также может понравиться