1 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. SCTP: An Overview Randall Stewart, Cisco Systems.

Slides:



Advertisements
Similar presentations
Introduction to Sockets Jan Why do we need sockets? Provides an abstraction for interprocess communication.
Advertisements

Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Camarillo / Schulzrinne / Kantola November 26th, 2001 SIP over SCTP performance analysis
Transmission Control Protocol (TCP)
Guide to TCP/IP, Third Edition
SCTP Tutorial Randall Stewart
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
UNIT 07 Process – to – Process Delivery: UDP,TCP and SCTP
Chapter 3: Transport Layer
Transport Layer3-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
UDP: User Datagram Protocol. UDP: User Datagram Protocol [RFC 768] r “bare bones”, “best effort” transport protocol r connectionless: m no handshaking.
Stream Control Transmission Protocol 網路前瞻技術實驗室 陳旻槿.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
8-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Process-to-Process Delivery:
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Transport Layer Computer Networks. 2 Where are we?
Elementary UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
UNIX Network Programming1 UNIX Network Programming 2nd Edition.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
Transport Layer and UDP Tahir Azim Ref:
University of the Western Cape Chapter 12: The Transport Layer.
Transport Layer: UDP, TCP
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
1 Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer1 Ram Dantu (compiled from various text books)
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 2 Applications and Layered Architectures Sockets.
Network Programming Eddie Aronovich mail:
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 3: Sockets.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
STREAM CONTROL TRANSMISSION PROTOCOL (SCTP)
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
CSCI 330 UNIX and Network Programming Unit XV: Transmission Control Protocol.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Teacher:Quincy Wu Presented by: Ying-Neng Hseih
Guide to TCP/IP Fourth Edition
4343 X2 – The Transport Layer Tanenbaum Ch.6.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
1 Network Communications A Brief Introduction. 2 Network Communications.
Ch. 23, 25 Q and A (NAT and UDP) Victor Norman IS333 Spring 2015.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
CSEN 404 Transport Layer I Amr El Mougy Lamia Al Badrawy.
SCTP (Stream Control Transmission Protocol) Chanmin Park ( 박 찬 민 ) CARES lab.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Ch23 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
Introduction to Networks
Chapter 3 outline 3.1 Transport-layer services
Transport Layer.
PART 5 Transport Layer Computer Networks.
Introduction to Networks
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Process-to-Process Delivery:
Advanced Computer Networks
CPEG514 Advanced Computer Networkst
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

1 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. SCTP: An Overview Randall Stewart, Cisco Systems Phill Conrad, University of Delaware

2 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Our Objectives Be able to explain what SCTP is, and what its major features are when and why you might use it (instead of TCP or UDP) where to find it, and find out more about it Be able to write code to use SCTP Sockets API quick overview emphasis Our plan: But first, lets find out: who are you, and what are your objectives?

3 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Prerequisites Basic understanding of IP, and transport protocols TCP and UDP socket programming in C under Unix Willingness to put up with an engineer attempting to teach a tutorial :-D if you aren't sure about something, ask, and we'll fill in the gaps Also, please note: Please interrupt to ask questions if you get lost. We will cover a lot of ground in a limited time so hold on to your seats :-D

4 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. These slides will be online at: Faster download here Also reachable with HTTP over SCTP! Downloads may be slow for while... be patient (hosted in Randy's barn while the Stewart family redecorates).

5 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Outline 10h00- 11h00 intro (almost finished)Randy overview of SCTP What is SCTP? What are the major features? Phill 11h15- 12h15 SCTP detailsRandy 13h15- 14h15 details of sockets APIRandy or Phill open Q and ABoth

6 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. What is SCTP? Why SCTP? SCTP is a new IETF standard transport protocol (RFC2960) Stream Control Transmission Protocol An alternative to TCP and UDP It came out of the "signaling transport" community... doing telephone switching over IP networks.. but it emerged as a general-purpose transport protocol Why? because TCP and UDP lacked some features that were needed What was so special about sigtran? small message sizes need for high availability, absolute minimum delay Why talk about SCTP in this form? Because SCTP is coming soon to a Linux kernel near you (LK-SCTP)

7 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. What was special about sigtran? Aspects of signaling transport driving SCTP design need for high availability failover between multiple redundant network interfaces need to monitor reachability status message oriented small message sizes real-time (need absolute minimum delay) upper layer timers need for tunability (Big-I internet vs. engineered networks)

8 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Why SCTP? The big picture... The transport layer... Application IP Application UDPTCP UDPTCP IP WifiEth IP WifiEth IP Transport kernel user-level Socket API

9 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Why SCTP? The big picture... TCP and UDP... The transport layer sits between IP and the application Traditionally, just two choices: TCP and UDP UDP: bare minimum just port numbers, and an optional checksum no flow control, no congestion control, no reliability or ordering TCP: a package deal flow control, congestion control, byte-stream orientation total ordering and total reliability However, there are some things you can't get with either! (see next slide...)

10 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. With SCTP you can do... Almost everything you can do with TCP and UDP (a very few minor exceptions we will note later but for instance: Can do reliable, flow controlled, congestion controlled data exchange, like TCP Can also do unordered, unreliable data exchange, like UDP) Plus the following features NOT available in UDP or TCP. (A quick list only; details follow!) –Multi-homing –Multi-streaming –Message boundaries (with reliability*) –Improved SYN-flood protection –Tunable parameters (Timeout, Retrans, etc.) –A range of reliability and order (full to partial to none) along with congestion control –and more... *UDP: msg boundaries, not reliable TCP reliable, no msg boundaries

11 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Slightly more detail about key SCTP features... (1 of 3) Multi-homing improved robustness to failures In TCP, connections made between and If a host is multi-homed, you have to choose ONE IP Addr only, at each end If that interface goes down, so does the connection With SCTP, you can list as many IP addresses per endpoint as you like If host is still reachable through ANY of those addresses, connection stays up! Multi-streaming reduced delay A.k.a. partial ordering. Eliminates Head of Line (HOL) blocking In TCP, all data must be sent in order; loss at head of line delays delivery of subsequent data In SCTP, you can send over up to 64K independent streams, each ordered independently A loss on one stream does not delay the delivery on other streams i.e. multi-streaming eliminates HOL blocking

12 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Slightly more detail about key SCTP features... (2 of 3) Message boundaries preserved easier coding TCP repacketizes data any old way it sees fit (message boundaries not preserved) SCTP preserves message boundaries Application protocols easier to write, and application code simpler. Improved SYN-flood protection more secure TCP vulnerable to SYN flood; (techniques to combat are "bags on the side") Protection against SYN floods is built-in with SCTP (Four way handshake (4WHS) vs 3WHS in TCP) Listening sockets don't set up state until a connection is validated

13 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Slightly more detail about key SCTP features... (3 of 3) Tunable parameters (Timeout, Retrans, etc.) more flexibility Tuning TCP parameters requires system admin privs, kernel changes, kernel hacking SCTP parameters can be tuned on a socket by socket basis Congestion controlled unreliable/unordered data more flexibility TCP has congestion control, but can't do unreliable/unordered delivery UDP can do unreliable/unordered delivery, but not congestion controlled SCTP is always congestion controlled, and offers a range of services from full reliability to none, and full ordering to none. With SCTP, reliable and unreliable data can be multiplexed over same connection.

14 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Features of SCTP (review) Reliable data transfer w/SACK Congestion control and avoidance PMTU discovery and message fragmentation Message boundary preservation (with bundling) Multi-homing support Multi-stream support Unordered data delivery option Security cookie against connection flood attack (SYN flood) Built-in heartbeat (reachability check) Extensibility

15 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. What you can't do with SCTP byte-stream oriented communication SCTP inserts message boundaries between each "write()" write() a length field, then a data field  result is 2 messages not a major issue, but need to be aware of when coding apps avoid congestion control UDP lets you blast away, but SCTP won't let you (you shouldn't be doing that anyway) true on-the-wire connectionless communication sockets API will let you send without doing a connection setup first (as with UDP), but connection setup still occurs on the wire connection setup required for congestion control (see above)

16 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Now a VERY brief example: daytime client/server (full socket API discussion comes later) Network applications are typically client/server daytime server open a socket and bind it to a port listen for connections while (1) { accept a connection send a string containing current date/time close the connection } daytime client create a socket open a connection to daytime server read bytes until EOF (meaning connection was closed) close connection

17 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. A TCP daytime client becomes an SCTP daytime client... TCP daytime client (many details omitted, including error checking; see Stevens et al for details (and don't omit the error checking!) int sockfd, n; char recvline[MAXLINE + 1]; /* read buffer*/ struct sockaddr_in servaddr; sockfd = socket(AF_INET, SOCK_STREAM, 0); /* create TCP socket */ /* fill in socket address structure */ servaddr.sin_family = AF_INET; servaddr.sin_port = htons(13); inet_pton(AF_INET, argv[1], &servaddr.sin_addr); /*dot dec to n.b.o.*/ connect(sockfd, (struct sockaddr *) &servaddr, sizeof(servaddr)); while ( (n = read(sockfd, recvline, MAXLINE)) > 0 ) { recvline[n]=0; /* null terminate */ fputs(recvline, stdout); } close (sockfd); sockfd = socket(AF_INET, SOCK_STREAM, IP_PROTO_SCTP); /* SCTP socket */ Note: 0 implies IP_PROTO_TCP

18 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. But... what is different? (among other things) changing IP_PROTO_TCP to IP_PROTO_SCTP means... There has to be a listening SCTP process on the other side (port number spaces independent, just like UDP vs TCP) Bits on wire flow in IP datagrams with protocol number 132 (vs. 6 (TCP)or 17 (UDP) Four-way handshake instead of three-way handshake By default, both sides will exchange the IP addresses of ALL available network interfaces (both IPv4 AND IPv6!) and will use alternate IP addresses for retransmission in case of errors. Each read() on client side will correspond to exactly one write() on the server side. With TCP, sizes of write() and read() system calls on the two sides are independent With SCTP, each write() by the sending side produces a message with a specific length. That message becomes a "data chunk" inside the packet on the wire, and is delivered as a single message If the message is too large to be put in a single packet, it will be fragmented and reassembled. Likewise, small messages may be bundled in a single pkt. If it is too large to be delivered all at once, the "partial delivery" API will be invoked (details later). But, these last two items are exceptions, not the rule.

19 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. OK, so what? What you should know at this point is... SCTP is a new transport protocol It's available now in bleeding edge Linux and BSD kernels, and will make its way into the mainstream It has some cool new features (reviewed on next slide) If you know how to do socket programming with TCP, you can just change one field, and start using SCTP quickly But... to really take advantage of the cool new features, you need to know a bit more about them, and about the socket API for SCTP. So, that's what's next...

20 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Stuff we'll talk about how to do... The stuff you need advanced socket API features to take advantage of... implicit connection establishment using multiple interfaces (multi-homing) parallel streams unordered data mixing reliable and best effort traffic timed reliability

21 SCTP Tutorial, Ottawa 7/2004 © 2004 Randall Stewart (Cisco Systems), Phill Conrad (University of Delaware). All rights reserved. Outline 10h00- 11h00 intro (almost finished)Randy overview of SCTP What is SCTP? What are the major features? Phill 11h15- 12h15 SCTP detailsRandy 13h15- 14h15 details of sockets APIRandy or Phill open Q and ABoth