sctp stream control transmission protocol
DESCRIPTION
SCTP Stream Control Transmission Protocol. Ramakrishna Velagapudi Sudheer kumar Adumulla Karthik Dhoopati. SCTP-Outline. Motivation Overview of SCTP Architectural View of SCTP Functional View of SCTP Features of SCTP Message Formats Comparison with other protocols Security issues - PowerPoint PPT PresentationTRANSCRIPT
SCTPSCTPStream Control Stream Control
Transmission ProtocolTransmission Protocol
Ramakrishna VelagapudiRamakrishna Velagapudi
Sudheer kumar AdumullaSudheer kumar Adumulla
Karthik DhoopatiKarthik Dhoopati
SCTP-OutlineSCTP-Outline
MotivationMotivation Overview of SCTPOverview of SCTP Architectural View of SCTPArchitectural View of SCTP Functional View of SCTPFunctional View of SCTP Features of SCTPFeatures of SCTP Message FormatsMessage Formats Comparison with other protocolsComparison with other protocols Security issuesSecurity issues Performance issuesPerformance issues Current ImplementationsCurrent Implementations ConclusionsConclusions
Network-level Network-level architecture architecture
IP reference modelIP reference model
SCTP – Motivation (contd SCTP – Motivation (contd …)…)
New applications New applications Migration from PSTN to Packet based InternetMigration from PSTN to Packet based Internet Telephony signaling messagesTelephony signaling messages
Shortcomings of existing protocolsShortcomings of existing protocols TCPTCP
““head-of-line blocking”head-of-line blocking” Byte-oriented, not message-orientedByte-oriented, not message-oriented Multi-homing support not built inMulti-homing support not built in DoS attack proneDoS attack prone
UDPUDP No ReliabilityNo Reliability Absence of congestion controlAbsence of congestion control Absence of flow controlAbsence of flow control
SCTP – Motivation (contd SCTP – Motivation (contd …)…)
Many applications need reliable message delivery – they Many applications need reliable message delivery – they
do so by delineating a TCP streamdo so by delineating a TCP stream
TCP provides both strict-ordering and reliability – many TCP provides both strict-ordering and reliability – many
applications may not need bothapplications may not need both
HTTP is one such applicationHTTP is one such application While transferring multiple embedded files we only wantWhile transferring multiple embedded files we only want
Reliable file transfer for each fileReliable file transfer for each file Partial ordering for the packets of each file but not total ordering Partial ordering for the packets of each file but not total ordering
amongst all the packetsamongst all the packets TCP provides more than this (but overhead?)TCP provides more than this (but overhead?) SCTP may help (how? – later)SCTP may help (how? – later)
SCTP-Motivation SCTP-Motivation HTTP Server HTTP Server ArchitectureArchitecture
Single File Transfer ( Both TCP and Single File Transfer ( Both TCP and SCTP are similar)SCTP are similar)
Client
Server
Childprocess
Request file
Send file
SCTP-Motivation SCTP-Motivation HTTP Server HTTP Server ArchitectureArchitecture
Multiple File Transfer (Embedded Multiple File Transfer (Embedded files)- TCPfiles)- TCP
Client
Server
Childprocess
Request file 0
Send file 0
Request file 1..N
Send file 1,2,…N
SCTP-Motivation SCTP-Motivation HTTP Server HTTP Server ArchitectureArchitecture
Multiple Files Transfer (Embedded Multiple Files Transfer (Embedded Files) SCTPFiles) SCTP
Client
Server
Childprocess
Request file 0
Send file 0 – stream 0
Request files 1..N
Send file 1 – stream 1
Send file N – stream N
What is SCTP?- Overview What is SCTP?- Overview
Originally designed to support PSTN Originally designed to support PSTN
signaling messages over IP signaling messages over IP
NetworksNetworks
It is a reliable transport protocol It is a reliable transport protocol
operating on top of a connectionless operating on top of a connectionless
packet network such as IP (same packet network such as IP (same
level as TCP)level as TCP)
SCTP – Overview (contd SCTP – Overview (contd …)…)
““SCTP is a reliable transport protocol operating on top of a SCTP is a reliable transport protocol operating on top of a connectionless packet network such as IP. …” – RFC 2960connectionless packet network such as IP. …” – RFC 2960
Has built-in support for multi-homed hosts Has built-in support for multi-homed hosts
Is message-based – conserves the message boundaries.Is message-based – conserves the message boundaries.
Classifies messages as:Classifies messages as: sequenced delivery of user messages within multiple sequenced delivery of user messages within multiple
streams streams with an option for un-ordered delivery of individual user with an option for un-ordered delivery of individual user
messagesmessages
Additional security mechanismsAdditional security mechanisms
Architectural View of Architectural View of SCTPSCTP
The basic service offered by SCTP is The basic service offered by SCTP is reliable transfer of user messages reliable transfer of user messages between peer SCTP users.between peer SCTP users.
Each end point provides a list of Each end point provides a list of transport addresses to the other end transport addresses to the other end point (i.e., multiple IP addresses in point (i.e., multiple IP addresses in combination with an SCTP port). combination with an SCTP port).
Architectural View of Architectural View of SCTPSCTP
The association spans transfers over all of the The association spans transfers over all of the possible source/destination combinations which possible source/destination combinations which may be generated from each endpoint's lists. may be generated from each endpoint's lists.
Functional View of SCTPFunctional View of SCTP
Association startup and takedown.Association startup and takedown. Sequenced delivery within streams.Sequenced delivery within streams. User data fragmentation.User data fragmentation. Acknowledgement and congestion Acknowledgement and congestion
avoidance.avoidance. Chunk bundling.Chunk bundling. Packet validation.Packet validation. Path management.Path management.
Functional View of SCTP:Functional View of SCTP:Association startup and Association startup and
takedown.takedown. An association is initiated by a request from the SCTP An association is initiated by a request from the SCTP
user.user.
A cookie mechanism is employed during the A cookie mechanism is employed during the initialization to provide protection against security initialization to provide protection against security attacks.attacks.
SCTP provides a graceful (with the SHUTDOWN SCTP provides a graceful (with the SHUTDOWN primitive) ,as well as an ungraceful close (i.e., abort). primitive) ,as well as an ungraceful close (i.e., abort).
SCTP does not support a half-open state (like TCP) SCTP does not support a half-open state (like TCP) wherein one side may continue sending data while the wherein one side may continue sending data while the other is closed.other is closed.
Functional View of SCTP:Functional View of SCTP: Sequenced delivery within Sequenced delivery within
streams streams Stream– Sequence of user messages.Stream– Sequence of user messages.
SCTP user can specify at association startup time the SCTP user can specify at association startup time the number of streams to be supported.number of streams to be supported.
SCTP assigns a stream sequence number to each message. SCTP assigns a stream sequence number to each message.
In the receiving side, it ensures that messages are In the receiving side, it ensures that messages are delivered in sequence with in a given stream.delivered in sequence with in a given stream.
While one stream may be blocked waiting for the next in-While one stream may be blocked waiting for the next in-sequence user message, delivery from other streams may sequence user message, delivery from other streams may proceed.proceed.
Functional View of SCTP: Functional View of SCTP: User data fragmentation.User data fragmentation.
SCTP can fragment user messages to SCTP can fragment user messages to
ensure that the SCTP packet passed to ensure that the SCTP packet passed to the lower layer confirms to the path the lower layer confirms to the path MTU.MTU.
On receipt, fragments are reassembled On receipt, fragments are reassembled into complete messages before being into complete messages before being passed to the SCTP user.passed to the SCTP user.
Functional View of SCTP: Functional View of SCTP: ACK and congestion ACK and congestion
avoidance.avoidance. SCTP assigns a Transmission Sequence Number SCTP assigns a Transmission Sequence Number
(TSN, independent of stream sequence number) to (TSN, independent of stream sequence number) to each user data fragment or unfragmented each user data fragment or unfragmented message.message.
The receiving end acknowledges all TSNs.The receiving end acknowledges all TSNs.
The acknowledgement and congestion avoidance The acknowledgement and congestion avoidance function is responsible for packet retransmission function is responsible for packet retransmission when timely ACK is not received.when timely ACK is not received.
Congestion avoidance procedures similar to those Congestion avoidance procedures similar to those used for TCP are used. used for TCP are used.
Functional View of SCTP: Functional View of SCTP: Chunk bundlingChunk bundling
Each chunk may contain either user Each chunk may contain either user data or SCTP control information.data or SCTP control information.
Chunk bundling function is Chunk bundling function is responsible for the assembly of the responsible for the assembly of the complete SCTP packet and its complete SCTP packet and its disassembly at the receiving end.disassembly at the receiving end.
Functional View of SCTP: Functional View of SCTP: Packet validationPacket validation
A mandatory verification tag field and a 32 A mandatory verification tag field and a 32 bit checksum field are included in the bit checksum field are included in the SCTP common header.SCTP common header.
Packets received without the expected Packets received without the expected Verification Tag value are discarded (as a Verification Tag value are discarded (as a protection against blind masquerade protection against blind masquerade attacks).attacks).
ckecksum provides protection against data ckecksum provides protection against data corruption in the network.corruption in the network.
Functional View of SCTP: Functional View of SCTP: Path management Path management
Monitors Reachability.Monitors Reachability.
Responsible for reporting the eligible set local Responsible for reporting the eligible set local transport addresses..transport addresses..
At association start-up, a primary path is defined At association start-up, a primary path is defined for each SCTP end point.for each SCTP end point.
On the receiving end, the path management is On the receiving end, the path management is responsible for verifying the existence of a valid responsible for verifying the existence of a valid SCTP association to which the inbound SCTP SCTP association to which the inbound SCTP packet belongs before passing it for further packet belongs before passing it for further processing. processing.
SCTP – Key FeaturesSCTP – Key Features
Connection set-upConnection set-up Multi-homingMulti-homing Data sendingData sending Multi-streamingMulti-streaming Connection shut-downConnection shut-down
SCTP – Connection SCTP – Connection setupsetup
(SYN) INIT
(SYN-ACK) INIT-ACK
COOKIE-ECHO
COOKIE-ACK
End-Point A End-Point Z
Hand Shake Hand Shake
TCB-Transmission control block
SCTP – Multi-homingSCTP – Multi-homing
Internet
End-Point A End-Point Z
SCTP Multi-HomingSCTP Multi-Homing
SCTP endpoints SCTP endpoints exchange the lists of exchange the lists of IP addresses used at IP addresses used at the remote endpoint. the remote endpoint. One of the listed IP One of the listed IP addresses will be addresses will be designed as the designed as the primary address. primary address.
If the primary If the primary address repeatedly address repeatedly drops chunks, drops chunks, however, all chunks however, all chunks will be transmitted to will be transmitted to an alternate address.an alternate address.
SCTP – SCTP – Data sendingData sending
Data Delivery:TCPData Delivery:TCP
Data transmission in TCP is byte-stream Data transmission in TCP is byte-stream oriented; in SCTP, it is message-oriented. oriented; in SCTP, it is message-oriented.
In TCP, data is transported as a In TCP, data is transported as a consecutive stream of bytes between two consecutive stream of bytes between two endpoints. endpoints.
The receiving application will need to do The receiving application will need to do some complex buffering and framing to some complex buffering and framing to reconstruct the messages. reconstruct the messages.
Data Delivery:SCTPData Delivery:SCTP
SCTP:SCTP: Each message is delivered as Each message is delivered as a complete read, which lifts a lot of a complete read, which lifts a lot of the work off the application layer. the work off the application layer.
Unordered DeliveryUnordered Delivery:: SCTP allows SCTP allows for data to be sent reliably but for data to be sent reliably but unordered. unordered.
SACKsSACKs
All acknowledgements in SCTP are All acknowledgements in SCTP are with SACKs. They are useful as they with SACKs. They are useful as they indicate if there are any gaps in the indicate if there are any gaps in the transmission. transmission.
TCP can only report four missing data TCP can only report four missing data packets in a SACK, SCTP allows for packets in a SACK, SCTP allows for much larger amounts to be reported. much larger amounts to be reported.
Congestion ControlCongestion Control
This is a critical element in any This is a critical element in any transport protocol. transport protocol.
It regulates the flow of data entering the It regulates the flow of data entering the network, limiting it to accommodate for network, limiting it to accommodate for occurrences of congestion. occurrences of congestion.
SCTP and TCP hold the same congestion SCTP and TCP hold the same congestion control mechanism- Additive Increase, control mechanism- Additive Increase, Multiplicative Decrease (AIMD) Multiplicative Decrease (AIMD) congestion window managementcongestion window management. .
SCTP – Multi-streamingSCTP – Multi-streaming
SCTP MultistreamingSCTP Multistreaming
What about What about multistreaming in TCP?multistreaming in TCP?
Multistreaming can be achieved in TCP, Multistreaming can be achieved in TCP, however it involves opening multiple TCP however it involves opening multiple TCP connections which each act as a stream to connections which each act as a stream to send data. send data.
Opening multiple TCP connections is TCP-Opening multiple TCP connections is TCP-unfriendly, which means that a pair of unfriendly, which means that a pair of communicating nodes will obtain a larger communicating nodes will obtain a larger proportion of the available channel proportion of the available channel bandwidth. bandwidth.
SCTP Multi-StreamingSCTP Multi-Streaming The Stream Sequence Number (SSN) The Stream Sequence Number (SSN)
SCTP – Message FormatSCTP – Message Format
SCTP – Connection closeSCTP – Connection close
SHUTDOWN
SHUTDOWN-ACK
End-Point A End-Point Z
SHUTDOWN-CMPL
No Half Closed State
Comparison between SCTP, Comparison between SCTP, TCP and UDPTCP and UDP
Feature SCTP TCP UDP
Reliable Data Transfer Yes Yes No
Multi-homed Host Support
Yes No No
Multi-Stream Support Yes No No
Security against SYN attacks
Yes No No
Unordered Data Delivery Yes No Yes
Key IssuesKey Issues
Differences between TCP and SCTP.Differences between TCP and SCTP. Security IssuesSecurity Issues Performance AnalysisPerformance Analysis ImplementationsImplementations Conclusion and referencesConclusion and references
Major Differences from Major Differences from TCPTCP
SCTP is message oriented as opposed to SCTP is message oriented as opposed to being byte stream orientedbeing byte stream oriented
SCTP has the concept of an association SCTP has the concept of an association instead of a connection instead of a connection Each association can have multiple streamsEach association can have multiple streams
SCTP separates reliable transfer of SCTP separates reliable transfer of datagrams from the delivery mechanismdatagrams from the delivery mechanism
SCTP supports multihomingSCTP supports multihoming
Security issue in TCPSecurity issue in TCP
Some TCP implementations have been Some TCP implementations have been known to be vulnerable to blind denial known to be vulnerable to blind denial of service attacks, i.e., attacks that had of service attacks, i.e., attacks that had been executed by an attacker that could been executed by an attacker that could not see most of the traffic to or from the not see most of the traffic to or from the target host. target host.
Blind connection forgery is another Blind connection forgery is another potential threat to TCP. By guessing potential threat to TCP. By guessing valid sequence numbers, an attacker valid sequence numbers, an attacker would be able to forge a connectionwould be able to forge a connection. .
Hand Shake Hand Shake
TCB-Transmission control block
Security issues in SCTPSecurity issues in SCTP To make it hard for blind attackers to inject To make it hard for blind attackers to inject
forged SCTP datagrams into existing forged SCTP datagrams into existing associations, each side of an SCTP associations, each side of an SCTP association uses a 32 bit value called association uses a 32 bit value called "Verification Tag" to ensure that a datagram "Verification Tag" to ensure that a datagram really belongs to the existing association. really belongs to the existing association.
Unlike in TCP, usage of cookie in association Unlike in TCP, usage of cookie in association establishment is made mandatory in SCTP. establishment is made mandatory in SCTP.
It is important to note that neither TCP nor It is important to note that neither TCP nor SCTP protect itself from man-in-the-middle SCTP protect itself from man-in-the-middle attacks where an established session might attacks where an established session might be hijackedbe hijacked
Security issues (cont)Security issues (cont)
Also, to prevent blind connection/session Also, to prevent blind connection/session setup forgery, both TCP implementations setup forgery, both TCP implementations supporting SYN-cookies and SCTP supporting SYN-cookies and SCTP implementations rely on a server-known, implementations rely on a server-known, secret key to protect the HMAC data. It must secret key to protect the HMAC data. It must be ensured that this key is created subject to be ensured that this key is created subject to the recommendations the recommendations
Reference:-Network working group, Siemens Reference:-Network working group, Siemens 20022002
Performance analysisPerformance analysis
This experiment was conducted on the This experiment was conducted on the Linux implementation of SCTP,LKSCTP.Linux implementation of SCTP,LKSCTP.
The DataTAG Transatlantic gigabit The DataTAG Transatlantic gigabit network extends from Geneva to network extends from Geneva to Chicago. (Approx 4000 miles)Chicago. (Approx 4000 miles)
On both sides of the link are two dual On both sides of the link are two dual processor Intel Pentium 4 machines.processor Intel Pentium 4 machines.
The link is composed of a 1 Gigabit The link is composed of a 1 Gigabit channel.channel.
Cont…Cont…
Test runs of the 2 protocols (SCTP Test runs of the 2 protocols (SCTP and then TCP) were done for a being and then TCP) were done for a being able to make a fair comparison of able to make a fair comparison of the two.the two.
http://datatag.web.cern.ch/datatag/http://datatag.web.cern.ch/datatag/WP3/sctp/tests.htmWP3/sctp/tests.htm
TCP Outperforms TCP Outperforms SCTP….SCTP….
Bandwidth for long time Bandwidth for long time intervalsintervals
Data transfers for long Data transfers for long time intervalstime intervals
Data transfers for short Data transfers for short time intervalstime intervals
Bandwidth over entire Bandwidth over entire time periodtime period
Data transfer over entire Data transfer over entire time period time period
Data AnalysisData Analysis
The TCP bandwidth drops for long time The TCP bandwidth drops for long time intervals, however still maintaining a intervals, however still maintaining a sizeable gap over SCTP sizeable gap over SCTP
It is evident from these results that TCP It is evident from these results that TCP provides a significantly higher bandwidth provides a significantly higher bandwidth than SCTP, which at times only reaches than SCTP, which at times only reaches about 5% of the TCP bandwidth. The about 5% of the TCP bandwidth. The tests show that this performance gap tests show that this performance gap exists across a range of various time exists across a range of various time intervals. intervals.
Data AnalysisData Analysis
SCTP is still a new protocol compared to TCP, SCTP is still a new protocol compared to TCP, which has been around since the early 1980s. A which has been around since the early 1980s. A great deal of work has been carried out in great deal of work has been carried out in regard to performance in TCP. The same regard to performance in TCP. The same degree of performance work has not been degree of performance work has not been undertaken in SCTP yet (although there are undertaken in SCTP yet (although there are plans to do so). plans to do so).
A substantial amount of time and effort has A substantial amount of time and effort has been devoted to work on the Linux TCP stack to been devoted to work on the Linux TCP stack to improve performance; this is not the case with improve performance; this is not the case with LKSCTP, which is primarily developed on BSD LKSCTP, which is primarily developed on BSD kernels. kernels.
Data analysis…cont.Data analysis…cont. The priority in the LKSCTP project has been The priority in the LKSCTP project has been
to make SCTP feature complete. Only to make SCTP feature complete. Only recently have they been turning their recently have they been turning their attention to performance issues. The attention to performance issues. The performance gap exists for now, but given performance gap exists for now, but given time the developers will likely be able to time the developers will likely be able to close the gap. close the gap.
The LKSCTP project holds great potential The LKSCTP project holds great potential and it is probably just a matter of time before and it is probably just a matter of time before the performance gap is closed and SCTP the performance gap is closed and SCTP becomes a real contender with TCP. becomes a real contender with TCP.
SCTP – ImplementationsSCTP – Implementations
ImplementationImplementation The M2PA protocol supports the transport The M2PA protocol supports the transport
of Signaling System Number 7 (SS7)of Signaling System Number 7 (SS7) M2UA is used for backhauling of SS7 MTP2-M2UA is used for backhauling of SS7 MTP2-
User signaling messages over IP using the User signaling messages over IP using the Stream Control Transmission Protocol Stream Control Transmission Protocol (SCTP). (SCTP).
M3UA supports the transport of any SS7 M3UA supports the transport of any SS7 MTP3-User signalling (such as ISUP and MTP3-User signalling (such as ISUP and SCCP messages) over IP, using the services SCCP messages) over IP, using the services of the Stream Control Transmission Protocol of the Stream Control Transmission Protocol (SCTP)(SCTP)
Alternative ProtocolsAlternative Protocols
Multi-homed TCP:-by Huitema. This Multi-homed TCP:-by Huitema. This protocol unifies multi homing, protocol unifies multi homing, mobility and network renumbering mobility and network renumbering supportsupport
TCP-R By Funato. This protocol TCP-R By Funato. This protocol implements mobility with TCP implements mobility with TCP options.options.
TCP migrateTCP migrate TCP Multi home optionsTCP Multi home options
Summary & ConclusionSummary & Conclusion Like TCP
• Provides connection establishment
• Ensures Reliability
• Provisions for ordered and un-ordered data
• Provides Congestion Control
In addition to TCP features
• Provides multi-homing
• Provides multi-streaming
• Has security features
•Well suited for Multimedia but cant replace TCP yet.
•Present Implementations of SCTP show promise of improvements.
SCTP – ReferencesSCTP – References Computer.org Computer.org
((http://www.computer.org/internet/v5n6/w6wire.htmhttp://www.computer.org/internet/v5n6/w6wire.htm))
IETF RFC 2960IETF RFC 2960((http://www.ietf.org/rfc/rfc2960.txthttp://www.ietf.org/rfc/rfc2960.txt))
Stream Control Transmission Protocol (SCTP): A Stream Control Transmission Protocol (SCTP): A Reference GuideReference Guide, R. Stewart and Q. Xie, Addison , R. Stewart and Q. Xie, Addison WesleyWesley
IBM.comIBM.com((http://oss.software.ibm.com/linux/presentations/lwce2002/Chats/Shttp://oss.software.ibm.com/linux/presentations/lwce2002/Chats/SCTP/SCTP-LWE.pdfCTP/SCTP-LWE.pdf))
3 questions3 questions 1. What are the major differences 1. What are the major differences
between TCP and SCTP?between TCP and SCTP? Ans:-Ans:- SCTP is message oriented as opposed to SCTP is message oriented as opposed to
being byte stream oriented.being byte stream oriented. SCTP has the concept of an association SCTP has the concept of an association
instead of a connection .Each association instead of a connection .Each association can have multiple streams.can have multiple streams.
SCTP separates reliable transfer of SCTP separates reliable transfer of Datagram from the delivery mechanism.Datagram from the delivery mechanism.
SCTP supports Multihoming.SCTP supports Multihoming.
Ques 2Ques 2
2. How does Multi streaming work in SCTP?2. How does Multi streaming work in SCTP? Ans:-Ans:- In SCTP all the streams reside in a single In SCTP all the streams reside in a single
association. For each stream in the association. For each stream in the association, the SCTP increases the Stream association, the SCTP increases the Stream Sequence Number (SSN) for the data chunk Sequence Number (SSN) for the data chunk generated by the application user .These generated by the application user .These SSN numbers are used by the receiver to SSN numbers are used by the receiver to determine the sequence of delivery. The determine the sequence of delivery. The SCTP performs in-sequence delivery per SCTP performs in-sequence delivery per stream.stream.
3. Comparison between 3. Comparison between SCTP, TCP and UDP.SCTP, TCP and UDP.
Feature SCTP TCP UDPFeature SCTP TCP UDP State required at endpoints Yes Yes NoState required at endpoints Yes Yes No Reliable DataTransfer Yes Yes NoReliable DataTransfer Yes Yes No Multi-homed Host Support Yes No NoMulti-homed Host Support Yes No No Multi-Stream Support Yes No NoMulti-Stream Support Yes No No Security against SYN attacks Yes No NoSecurity against SYN attacks Yes No No Unordered Data Delivery Yes No YesUnordered Data Delivery Yes No Yes Failure detection (Heartbeat) Yes No NoFailure detection (Heartbeat) Yes No No