meta data for this page
This is an old revision of the document!
These pages will contain notes about the third assignment and correct answers for questions.
- What are the major differences when comparing SCTP to UDP? How about TCP?
- 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
- 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
- SCTP has no support for half-open connections as in TCP
- Explain 3 benefits that SCTP offers when compared to existing transport layer protocols.
- 4-way handshake
- Multi streaming
- Message framing
- Graceful shutdown
- Configurable data receiving (unordered data is possible)
- What are the differences between SCTP one-to-one and one-to-many styles? Why there are 2 “different” styles?
- One-to-one is strict between connected devices as TCP connection.
- One socket is peeled of from the listening socket (as with
accept()in TCP) for each new connection using one-to-one.
- The closing of the peeled sockets are done in different way as in one-to-many.
- One-to-many provides full benefits of SCTP: multihoming, graceful shutdown, piggybacking of data in handshake messages, automatic initiation of handshake with first send and association events from SCTP kernel.
- The purpose of the one-to-one style is to provide backwards compatibility for existing applications using TCP. However, with one-to-one style packet boundaries are preserved.
- Explain the difference between a connection (TCP) and an association (SCTP).
- Connection is strict between address + port pairs
- Connection is between two addresses of peers, with association multiple addresses on peers can be utilized
- Different handshakes (3-way vs. 4-way)
- What benefits does the multihoming feature of SCTP give? Give at least 3 examples.
- Interfaces (and addresses) can be added and removed dynamically
- Multihoming provides that if one path is disconnected other available one can be used
- Multihoming enables more effective roaming
- The fastest/least congested route can be utilized for communication
Use the protocol to its provided full extent
When working with SCTP the notifications are made to ease the programmers job by giving more detailed information about the associations (connections). On multi interfaced system the information might be more useful but on transmission errors and lost pathways they still provide valuable information about the state of e.g. current clients on the server - which are probably lost and which have lots of errors.
E.g. in case of transmission errors the
SCTP_SEND_FAILED type notification provides
sctp_send_failed struct which contains the undelivered message in
ssf_data -field that can be used to buffer the unsent message or try to resend the message. Useful if a large amount of data (e.g. a large file) is sent and the receiver is missing a small portion of the file data because of errors in the transmission pathways - it takes less bandwidth to send this missing data instead of transmitting the whole file again.
Remember that the notifications are always originating from association 0 (SCTP kernel) and the 0 association id will not be given to any peer!
When using work of others (copying)
In this assignment a demonstration code was provided and it was ok to directly copy it. However, remember that when copying others code it is classified as plagiarism if the source is not stated anywhere, or the code is copied against its license. Generally it is not recommended to directly copy others work (nor it is allowed on this course!) but if you do (e.g. a company has some code base for most generic stuff) GO THROUGH THE CODE AND THINK WHAT IT DOES BEFORE COPYING IT INTO YOUR CODE! Only a few noticed that the incrementing the stream number in
sctp_sendmsg was not necessary, just be more careful in the future.