2. Motivations
⢠Provide reliable transfer without sequence
maintenance.
⢠The stream-oriented nature of TCP is
often an inconvenience. SCTP provides
message based transfer.
⢠TCP is relatively vulnerable to denial-of-
service attacks, such as SYN attacks.
⢠âŚ
3. History
⢠First implementation on 1991
⢠submitted to IETF on 1998. RFC 4960 defines
the protocol. RFC 3286 provides an introduction.
(RFC2960 and RFC3309 are obsoleted).
⢠Designed for telecom signaling transfer at first,
and used on other applications
⢠supported by Cisco, Linux, HP, Solaris, Alcatel-
Lucent,âŚ
Âť refrence
4. Network layers
Upper layer applications
TCP UDP SCTP
IP
Link Layer
Physical Layer
5. Features
⢠Message-based
⢠Multi-homing
⢠Multi-stream
⢠Reliable transfer
⢠Robust and safety ( four way
handshake ,heartbeat, three way
shutdown )
20. Setting Up
Endpoint A Endpoint Z
CLOSED CLOSED
INIT
1
COOKIE-WAIT
INIT-ACK
COOKIE-ECHO *
COOKIE-ECHOED 2
* COOKIE-ACK
ESTABLISHED ESTABLISHED
* -- User data can be attached
22. Close
Endpoint A Endpoint Z
Shutdown from application
SHUTDOWN-PENDING
Transfer remaining data
SHUTDOWN
SHUTDOWN-SENT SHUTDOWN-RECEIVED
SHUTDOWN ACK
SHUTDOWN-ACK-SENT
SHUTDOWN COMPLETE
CLOSED CLOSED
27. Installation on Linux (lksctp)
⢠Check if SCTP is installed
â grep SCTP /proc/net/protocols
â checksctp
⢠Download code from
http://lksctp.sourceforge.net/
28. SCTP socket API
⢠One-to-many style and one-to-one style are supported.
⢠Please read the API standard before programming, there
are lots of different features comparing to TCP socket.
⢠One-to-many server
â socket(PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP)
â bind(sock, (struct sockaddr*)&addr, sizeof(struct sockaddr))
â setsockopt(m_fds[i].fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
â listen(sock, 2);
â sctp_recvmsg(sock, buffer, BUFFER_SIZE, NULL, 0, NULL, &flags)
â close(sock)
⢠One-to-many client
â socket(PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP))
â connect(sock, (struct sockaddr*)&addr, sizeof(struct sockaddr)
â send(sock, buffer, MSG_SIZE, 0)
â close(sock)
Âť Refer SCTP API
29. Others
⢠shortages
â http://datatag.web.cern.ch/datatag/WP3/sctp/tests.
⢠New research
â Concurrent multipath transfer
1: generate cookie by MAC, timestamp and lifespan and ⌠Donât create TCB to avoid DOS 2: compare the cookie received with the cookie send on INIT-ACK