meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
courses:ct30a5002:ex5 [2014/09/02 19:44]
julaakko
courses:ct30a5002:ex5 [2014/11/18 14:00] (current)
julaakko
Line 1: Line 1:
 +====== SCTP #1 ======
  
 +This exercise is about Stream Control Transfer Protocol (SCTP).
 +
 +===== Task for week 46 =====
 +
 +
 +**1.** First, read the following three pages: ​
 +  * [[http://​www.ibm.com/​developerworks/​linux/​library/​l-sctp/​|Better networking with SCTP]] //by IBM/M. Tim Jones//
 +  * [[http://​datatag.web.cern.ch/​datatag/​WP3/​sctp/​primer.htm|SCTP Primer]] ​ //by Asim Iqbal//
 +  * [[http://​www.isoc.org/​briefings/​017/​|Why is SCTP needed given TCP and UDP are widely available?​]] //by Randall Stewart, Paul D. Amer//
 +
 +**2.** Second, think answers to following questions:
 +  - What are the major differences when comparing SCTP to UDP? How about TCP?
 +    - UDP:
 +      * SCTP provides **reliable transmission** and **flow control**
 +      * SCTP has a **connection establishment** (4-way handshake) ​
 +      * With UDP the address and port need to be forwarded to lower layers for each packet to be sent, SCTP uses this only for connection establishment ​
 +      * As UDP is packet oriented it has not got any streams, whereas SCTP **supports multiple streams between connected devices** ​
 +    - TCP:
 +      * SCTP provides **multiple streams** to use whereas in TCP one stream is available per direction ​
 +      * SCTP is **message oriented** (preserves message boundaries) and TCP is stream oriented ​
 +      * SCTP provides **multihoming** with the **association between connected devices**, TCP is more point-to-point with strict connection tied to address and port 
 +      * The handshakes are different; STCP has a **4-way which uses cookies**, whereas TCP has a 3-way handshake ​
 +      * SCTP has no support for half-open connections as in TCP
 +        * ''​shutdown()''​ command with parameters does not work
 +  - Why SCTP can be regarded as more secure as TCP?
 +    * The handshakes are different; TCP has a 3-way handshake whereas STCP has a **4-way which uses cookies** → SYN flood attacks can be prevented
 +      * Cookies can be used for **verification** and **authentication** ​
 +      * **Verification tag protects against blind masquerade attacks** and stale packets from a previous association
 +      * On other hand, usually firewalls aren't configured to block SCTP
 +  - How the SCTP benefits from Selective ACKs when compared to TCP?
 +    * The proceduce of SCTP follows the optional TCP SACK
 +      * Data is **acknowledged by chunks**, the range received is acknowledged but also are the gaps in additon to the amount of duplicate fields ​
 +      * Similarly to TCP **delayed acks are used to send SACK**
 +      * One SACK for every two received packets
 +      * **With one SACK a large number of blocks can be acknowledged**
 +        * vs. TCP 3/4
 +      * SACK packets **can be piggybacked to save bandwidth** (headers)
 +  - What benefits does the multihoming feature of SCTP give?
 +    * Interfaces (and addresses) can be **added and removed dynamically**
 +    * If one route is disconnected,​ **other available routes can be used**
 +    * Multihoming enables **more effective roaming**
 +    * The f**astest/​least congested route can be utilized** for communication
 +    * **Better error tolerance**
 +  - Explain Head-of-line blocking. Why it is a problem with TCP? How SCTP handles this or how this affects SCTP? Give an example application/​application layer protocol that could benefit from SCTP where head-of-line blocking can occur.
 +    * When one TCP segment is lost and others arrive out of order, subsequent segment(s) are held until lost one is retransmitted -> causes delay
 +    * with web servers, multiple images that are sent in pieces so they “appear” to the user at the same time
 +      * piece of first, second, third..., 2nd pieces, 3rd pieces, etc.
 +      * if the first packet is missing a segment → whole process of sending the pictures can be delayed!
 +    * TCP: one connection (solution: **multiple connections**)
 +    * SCTP: **multiple streams**, reserve certain amount of streams per association and send each piece of data using separate stream / block of streams
 +
 +
 +Some real life benefits of SCTP: [[http://​dx.doi.org/​10.1109/​CSNDSP.2012.6292659|SSH over SCTP]], [[http://​tools.ietf.org/​html/​draft-natarajan-http-over-sctp-00| Using SCTP as a Transport Layer Protocol for HTTP]]
 +      ​
 +
 +**3.** Third, only look at the [[courses:​ct30a5002:​examples#​example_code|SCTP example code]] and try to understand how it works.
 +
 +----
 +Task for next week (week 47): [[courses:​ct30a5002:​ex6|SCTP #2]]
 +----
 +[[courses:​ct30a5002:​start|CT30A5002 - Games and Networking]]