1 / 59

John Rumsey Senior Systems Engineer LongReach Networks

LongReach Technical Tutorial. John Rumsey Senior Systems Engineer LongReach Networks. SCTP Stream Control Transmission Protocol. Stream Control Transmission Protocol. Next Generation Networks TCP – Transmission Control Protocol SCTP – Stream Control Transmission Protocol

len-higgins
Download Presentation

John Rumsey Senior Systems Engineer LongReach Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LongReach Technical Tutorial John Rumsey Senior Systems Engineer LongReach Networks SCTP Stream Control Transmission Protocol

  2. Stream Control Transmission Protocol • Next Generation Networks • TCP – Transmission Control Protocol • SCTP – Stream Control Transmission Protocol • User Adaptation Layers for SCTP • SCTP Packets • Establishing the Connection (Association) • Data Transmission • Closing the Connection (Association) • Multihoming Operation • Congestion Control • Security Issues

  3. PBX Signalling PBX Signalling Media Gateway Control Protocol IP Network Media Gateway Media Gateway Next Generation Networks Softswitch or Media Gateway Controller Legacy ISDN Subscriber Legacy ISDN Subscriber

  4. IP Network Media Gateway Media Gateway Next Generation Networks Softswitch or Media Gateway Controller PBX Signalling PBX Signalling Media Gateway Control Protocol Legacy ISDN Subscriber Legacy ISDN Subscriber

  5. IP Network Media Gateway Media Gateway Next Generation Networks Softswitch or Media Gateway Controller PBX Signalling PBX Signalling Media Gateway Control Protocol Legacy ISDN Subscriber Legacy ISDN Subscriber

  6. IP Network Voice Connection Media Gateway Media Gateway Next Generation Networks Softswitch or Media Gateway Controller PBX Signalling PBX Signalling Media Gateway Control Protocol Legacy ISDN Subscriber Legacy ISDN Subscriber

  7. Media Gateway How are Services are carried over IP • Voice is carried over IP using “Real Time Protocol” but how is signalling carried? ?? PBX Signalling / RTP or UDP or TCP / IP ?? Voice / RTP / IP Softswitch or Media Gateway Controller

  8. TCP - Transmission Control Protocol • Good Points • Provides Reliable, In-Sequence delivery of data packets • Supports Congestion Control and Avoidance Features • Bad Points • TCP transports a byte stream which must be delivered in order • Doesn’t Support Multistreaming • Vulnerable to Denial of Service Attacks • Doesn’t support Multihoming or Path Monitoring

  9. Media Gateway Stream Control Transmission Protocol • SCTP has been specifically designed to provide reliable, error free transport of message oriented applications over IP PBX Signalling Steam Control Transmission Protocol Softswitch or Media Gateway Controller • Supports the good aspects of TCP and fixes the bad aspects of TCP

  10. Media Gateway Stream Control Transmission Protocol • SCTP provides the backhauling of signalling messages between a Signalling Gateway and a Media Gateway Controller, over an IP network Signalling Gateway SCTP Softswitch or Media Gateway Controller

  11. Media Gateway Stream Control Transmission Protocol • Supports multiple signalling streams over a single SCTP connection (association) Signalling Gateway SCTP Softswitch or Media Gateway Controller

  12. User Adaptation Layer xUA / Media Gateway Stream Control Transmission Protocol Signalling Gateway SCTP Softswitch or Media Gateway Controller

  13. User Adaptation Layers for SCTP • IUA/SCTP • The transport of ISDN Q.921 user messages over IP • DUA/SCTP • The transport of DASS/DPNSS messages over IP • V5UA/SCTP • The transport of V5.2 messages over IP • MTP2/SCTP • The transport of Signalling System 7 Message Transfer Part 2 (SS7 MTP2) user signalling messages over IP • MTP3/SCTP • The transport of any SS7 MTP3 - User signalling (e.g., ISUP and SCCP messages) over IP • SUA/SCTP • The transport of any Signalling Connection Control Part - User signalling over IP

  14. Why Use SCTP? • SCTP is a reliable transport protocol • Specifically designed for transport of message oriented applications • Acknowledged error free transfer of messages • Detection of data corruption, loss of data and duplication of data • Selective retransmission to correct lost or corrupted data • Heartbeat actively monitors connectivity of session • Resistance to Denial of Service attacks • Supports several streams within a connection (or association)

  15. SCTP Node A SCTP Node B SCTP User Application SCTP User Application Same layer as TCP and UDP applications SCTP Transport Service SCTP Transport Service Same layer as TCP and UDP IP Network Transport IP Network Service IP Network Service SCTP Stream

  16. An SCTP packet forms the payload of an IP packet Chunk N Chunk 1 SCTP Header Source Port Destination Port Verification Tag Flags Flags Type Type Value Value Checksum Length Length N 2 1 1 N 2 1 1 4 4 2 2 • An SCTP packet consists of a 12 byte common header and one or more “Chunks” SCTP Packets

  17. SCTP Header • Source Port & Destination Port • Uses same port concept as TCP and UDP • Verification Tag • Exchanged between endpoints at startup • 2 per Association • To Validate the sender • Checksum • Protected by 32 bit checksum (CRC32 algorithm) SCTP Header Source Port Destination Port Verification Tag Checksum 4 4 2 2

  18. Chunk N Chunk 1 Flags Flags Type Type Value Value Length Length N 2 1 1 N 2 1 1 Chunks SCTP Header Source Port Destination Port Verification Tag Checksum 4 4 2 2

  19. Chunks • Type • Used to distinguish data chunks and different types of control chunks • Flags • Usage depends on Chunk type • Length • Required because chunks have a variable length • Value • Payload field Chunk Flags Type Value Length N 2 1 1

  20. 0 Payload Data 1 Initiation 2 Initiation Acknowledgement 3 Selective Acknowledgement 4 Heartbeat Request 5 Heartbeat Acknowledgement 6 Abort 7 Shutdown 8 Shutdown Acknowledgement 9 Operation Error 10 State Cookie 11 Cookie Acknowledgement 12 Reserved for Explicit Congestion Notification Echo 13 Reserved for Congestion Window Reduced 14 Shutdown Complete 15-62 Reserved by IETF 63 IETF-defined Chunk Extensions 64-126 Reserved by IETF 127 IETF-defined Chunk Extensions 128-190 Reserved by IETF 191 IETF-defined Chunk Extensions 192-254 Reserved by IETF 255 IETF-defined Chunk Extensions Chunk Types Chunk Flags Type Value Length N 2 1 1

  21. SCTP Endpoint A SCTP Endpoint B INIT chunk CLOSED STATE CLOSED STATE COOKIE-WAIT INIT-ACK chunk (contains COOKIE) COOKIE-ECHO chunk COOKIE-ECHOED COOKIE-ACK chunk ESTABLISHED ESTABLISHED DATA chunk(s) Establishing the Association

  22. SCTP Endpoint A SCTP Endpoint B INIT chunk CLOSED STATE CLOSED STATE COOKIE-WAIT Establishing the Association • Endpoint A sends an “Initiation chunk” and enters the COOKIE WAIT state

  23. Type = 1 Chunk Flags Chunk Length Initiate Tag Advertised Receiver Window Credit (a_rwnd) Number of Outbound Streams Number of Inbound Streams Initial Transmission Sequence Number (TSN) Optional/Variable-Length Parameters IPv4 Address Parameter (Optional Parameter) Type = 5 Length = 8 IPv4 Address Initiation (INIT) Chunk

  24. SCTP Endpoint A SCTP Endpoint B INIT chunk CLOSED STATE CLOSED STATE COOKIE-WAIT INIT-ACK chunk Establishing the Association • Endpoint B receives the INIT Chunk and analyses the data • From the data it generates a secure hash using a secret key • The values are then put into a COOKIE, along with the derived message authentication code (MAC) • The COOKIE is sent to the sender of the INIT Chunk in an INIT ACK Chunk • Endpoint B remains in the CLOSED STATE

  25. Type = 2 Chunk Flags Chunk Length Initiate Tag Advertised Receiver Window Credit (a_rwnd) Number of Outbound Streams Number of Inbound Streams Initial Transmission Sequence Number (TSN) Optional/Variable-Length Parameters State Cookie Parameter (Mandatory Parameter) Type = 7 Parameter Length Parameter Value Initiation Acknowledgement (INIT ACK) Chunk

  26. SCTP Endpoint A SCTP Endpoint B INIT chunk CLOSED STATE CLOSED STATE COOKIE-WAIT INIT-ACK chunk (contains COOKIE) COOKIE-ECHO chunk COOKIE-ECHOED Establishing the Association • Endpoint A takes the COOKIE from the INIT-ACK chunk, places it in a COOKIE ECHO chunk and returns it to Endpoint B • Endpoint A enters the COOKIE-ECHOED STATE

  27. Type = 10 Length Chunk Flags Cookie Cookie Echo (COOKIE ECHO) Chunk

  28. SCTP Endpoint A SCTP Endpoint B INIT chunk CLOSED STATE CLOSED STATE COOKIE-WAIT INIT-ACK chunk (contains COOKIE) COOKIE-ECHO chunk COOKIE-ECHOED Establishing the Association • Endpoint B unpacks the data contained in the COOKIE and uses the Message Authentication Code (MAC) to verify whether it was the originator of this COOKIE • If the MAC computes OK, the data values contained in the COOKIE are used to initialise the SCTP instance

  29. SCTP Endpoint A SCTP Endpoint B INIT chunk CLOSED STATE CLOSED STATE COOKIE-WAIT INIT-ACK chunk (contains COOKIE) COOKIE-ECHO chunk COOKIE-ECHOED COOKIE-ACK chunk ESTABLISHED ESTABLISHED Establishing the Association

  30. Type = 11 Length = 4 Chunk Flags Cookie Acknowledgement (COOKIE ACK) Chunk

  31. SCTP Endpoint A SCTP Endpoint B DATA chunk(s) Data Transmission ESTABLISHED STATE ESTABLISHED STATE

  32. Type = 0 Reserv. Length U B E Transmission Sequence Number (TSN) Stream Identifier S Stream Sequence Number N Payload Protocol Identifier User Data (seq. n of Stream S) Payload Data Chunk

  33. SCTP Endpoint A SCTP Endpoint B SACK chunk Data Transmission ESTABLISHED STATE DATA chunk ESTABLISHED STATE • The Selective Acknowledgement Chunk is used to acknowledge received Data Chunks, and to inform of gaps in the sequence of Data Chunks

  34. Type = 3 Chunk Flags Chunk Length Cumulative Transmission Sequence Number (TSN) Ack Advertised Receiver Window Credit (a_rwnd) Number of Gap Ack Blocks = N Number of Duplicate TSNs = X Gap Ack Block #1 Start Gap Ack Block #1 End Gap Ack Block #N Start Gap Ack Block #N End Duplicate Transmission Sequence Number (TSN) 1 Duplicate Transmission Sequence Number (TSN) N Selective Acknowledgement (SACK) Chunk

  35. SCTP Endpoint A SCTP Endpoint B DATA chunk TSN=100 DATA chunk TSN=101 DATA chunk TSN=102 DATA chunk TSN=103 DATA chunk TSN=104 DATA chunk TSN=105 DATA chunk TSN=106 DATA chunk TSN=107 DATA chunk TSN=108 SACK chunk Cumulative TSN=108 Acknowledging DATA Chunks

  36. DATA chunk TSN=109 DATA chunk TSN=110 DATA chunk TSN=111 DATA chunk TSN=112 DATA chunk TSN=113 DATA chunk TSN=114 X DATA chunk TSN=115 X DATA chunk TSN=116 DATA chunk TSN=117 DATA chunk TSN=118 DATA chunk TSN=119 DATA chunk TSN=120 DATA chunk TSN=121 DATA chunk TSN=122 DATA chunk TSN=123 X DATA chunk TSN=124 DATA chunk TSN=125 DATA chunk TSN=126 SACK chunk Cumulative TSN=113 Gap Ack Block #1 Start = +3 End = +9 Gap Ack Block #2 Start = +11 End = +13 Acknowledging DATA Chunks

  37. Terminating the Association • Graceful Termination of an Association • All outstanding data will be acknowledged before shutdown • Aborting the Association • Shutdown immediately on receiving the ABORT chunk • Special Cases • Restart of an Endpoint where it uses a new tag value • Both endpoint send an INIT chunk at about the same time • Excessive delay of Cookie chunks

  38. SCTP Endpoint A SCTP Endpoint B SACK chunk SHUTDOWN PENDING STATE DATA chunk(s) Graceful Termination of the Association ESTABLISHED STATE ESTABLISHED STATE • The initiator of the shutdown enters SHUTDOWN PENDING state and waits for all outstanding data to be acknowledged • It will not accept any new data from it’s upper layers but will retransmit data to Endpoint B if necessary

  39. SCTP Endpoint A SCTP Endpoint B SACK chunk SHUTDOWN PENDING STATE SHUTDOWN chunk SHUTDOWN RECEIVED STATE SHUTDOWN SENT STATE Payload Data chunk(s) Graceful Termination of the Association ESTABLISHED STATE ESTABLISHED STATE • Endpoint A sends a SHUTDOWN chunk to Endpoint B and enters the SHUTDOWN SENT state • On receipt of the SHUTDOWN chunk, Endpoint B enters the SHUTDOWN RECEIVED state

  40. Type = 7 Length = 8 Chunk Flags Cumulative Transmission Sequence Number (TSN) Ack Shutdown Association (SHUTDOWN) Chunk

  41. SCTP Endpoint A SCTP Endpoint B SACK chunk SACK chunk SHUTDOWN chunk SHUTDOWN SENT STATE Payload Data chunk(s) Graceful Termination of the Association ESTABLISHED STATE ESTABLISHED STATE SHUTDOWN PENDING STATE SHUTDOWN RECEIVED STATE • Endpoint B waits for all outstanding data to be acknowledged • It will not accept any new data from it’s upper layers but will retransmit data to Endpoint A if necessary

  42. SCTP Endpoint A SCTP Endpoint B SACK chunk SACK chunk SHUTDOWN chunk SHUTDOWN SENT STATE SHUTDOWN ACK chunk SHUTDOWN ACK SENT STATE Payload Data chunk(s) Graceful Termination of the Association ESTABLISHED STATE ESTABLISHED STATE SHUTDOWN PENDING STATE SHUTDOWN RECEIVED STATE • Endpoint B sends a SHUTDOWN ACK chunk to Endpoint A and enters the SHUTDOWN ACK SENT state

  43. Type = 8 Length = 4 Chunk Flags Shutdown Acknowledgement (SHUTDOWN ACK) Chunk

  44. SCTP Endpoint A SCTP Endpoint B SACK chunk SACK chunk SHUTDOWN chunk SHUTDOWN SENT STATE SHUTDOWN COMPLETE chunk SHUTDOWN ACK chunk SHUTDOWN ACK SENT STATE CLOSED STATE CLOSED STATE Payload Data chunk(s) Graceful Termination of the Association ESTABLISHED STATE ESTABLISHED STATE SHUTDOWN PENDING STATE SHUTDOWN RECEIVED STATE

  45. Type = 14 Length = 4 T Reserved Shutdown Complete (SHUTDOWN COMPLETE) Chunk

  46. Type = 6 Reserved Length T Zero or more Error Causes Type = 9 Length Chunk Flags One or more Error Causes Cause Code Cause Length Cause Specific Information Abort Association (ABORT) Chunk Operation Error (ERROR) Chunk Error Cause

  47. Error Causes • Invalid Stream Identifier • Missing Mandatory Parameter • Stale Cookie Error • Out of Resource • Unresolvable Address • Unrecognised Chunk Type • Invalid Mandatory Parameter • Unrecognised Parameters • No User Data • Cookie Received While Shutting Down

  48. 1 IP address B1 IP address A1 SCTP Endpoint A SCTP Endpoint B 2 IP address A2 IP address B2 Multihoming Operation Both the INIT and INIT ACK chunks contain lists of IP addresses, which are exchanged during INITIATION of association The Source IP Address in the INIT chunk is used as the destination address for the INIT ACK response INIT INIT ACK

  49. 1 IP address B1 IP address A1 DATA DATA DATA DATA DATA DATA SCTP Endpoint A SCTP Endpoint B 2 IP address A2 IP address B2 Multihoming Operation • Endpoints will monitor data timeouts and the number of retransmissions to determine the suitability of the path SACK

  50. 1 IP address B1 IP address A1 DATA SCTP Endpoint A SCTP Endpoint B 2 IP address A2 IP address B2 DATA Multihoming Operation • Retransmitted Data chunks will be sent over both paths if the status of one path is suspect SACK

More Related