Your SlideShare is downloading. ×
0
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
SCTP introduction
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

SCTP introduction

846

Published on

It is a introduction of SCTP for software developer.

It is a introduction of SCTP for software developer.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
846
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
51
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • 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
  • Transcript

    • 1. SCTP introduction Richard Xiong 2013/2/8
    • 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 applicationsTCP 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 )
    • 6. Multi-homing SW HUB 1 1 10.0.0.1 Alternate Path 10.0.0.3End-point A End-point Z 10.0.0.65 10.0.0.68 SW HUB 2 2 Primary path
    • 7. Multi-stream Strm1 Strm2 Strm3 End-point SSN 1 SSN 1 SSN 1 End-point A ZStrm1 Strm2 Strm3SSN 2 SSN 2 SSN 2Strm1 Strm2 Strm3SSN 3 SSN 3 SSN 3 SSN: Stream Sequence Number
    • 8. Multi-stream End-point End-point A Z Strm2 Strm3 Strm1 Strm2 Strm3 SSN 2 SSN 2 SSN 1 SSN 1 SSN 1Strm1SSN 2Strm1 Strm2 Strm3SSN 3 SSN 3 SSN 3
    • 9. Multi-stream End-point End-point A Z Strm2 Strm3 SSN 2 SSN 2 Strm1 Strm2 Strm3Strm1 SSN 1 SSN 1 SSN 1SSN 2Strm1 Strm2 Strm3SSN 3 SSN 3 SSN 3
    • 10. Multi-stream End-point End-point A Z Strm2 Strm3 Strm2 Strm1 SSN 2 SSN 2 SSN 3 SSN 2 Strm1 Strm2 Strm3 SSN 1 SSN 1 SSN 1Strm1 Strm3SSN 3 SSN 3
    • 11. Multi-stream End-point End-point A Z Strm2 Strm3 SSN 2 SSN 2 Strm2 Strm1 Strm1 Strm2 Strm3 SSN 3 SSN 2 SSN 1 SSN 1 SSN 1Strm1 Strm3SSN 3 SSN 3
    • 12. Multi-stream End-point End-point A Z Strm2 Strm1 Strm1 Strm2 Strm3 SSN 3 SSN 2 SSN 1 SSN 1 SSN 1 Strm2 Strm3Strm1 Strm3 SSN 2 SSN 2SSN 3 SSN 3
    • 13. Multi-streamEnd-point End-point A Z Strm3 Strm1 SSN 3 SSN 3 Strm2 Strm1 Strm1 Strm2 Strm3 SSN 3 SSN 2 SSN 1 SSN 1 SSN 1 Strm2 Strm3 SSN 2 SSN 2
    • 14. Multi-streamEnd-point End-point A Z Strm2 Strm1 Strm1 Strm2 Strm3 SSN 3 SSN 2 SSN 1 SSN 1 SSN 1 Strm2 Strm3 SSN 2 SSN 2 Strm1 Strm3 SSN 3 SSN 3
    • 15. Multi-streamEnd-point End-point A Z Strm1 Strm2 Strm3Strm2 Strm1 SSN 1 SSN 1 SSN 1SSN 3 SSN 2 Strm2 Strm3 SSN 2 SSN 2 Strm1 Strm3 SSN 3 SSN 3
    • 16. Multi-stream Strm2 Strm1End-point SSN 3 SSN 2 End-point A Z Strm1 Strm2 Strm3 SSN 1 SSN 1 SSN 1 Strm2 Strm3 SSN 2 SSN 2 Strm1 Strm3 SSN 3 SSN 3
    • 17. Multi-streamEnd-point End-point A Z Strm1 Strm2 Strm3 SSN 1 SSN 1 SSN 1 Strm1 Strm2 Strm3 SSN 2 SSN 2 SSN 2 Strm1 Strm2 Strm3 SSN 3 SSN 3 SSN 3
    • 18. Status of Association CLOSED COOKIE_WAIT COOKIE_ECHOED SHUTDOWN- ACK-SENT SHUTDOWN- RECIEVED ESTABLISHEDSHUTDOWN- SENT SHUTDOWN- PENDING
    • 19. SCTP messages• Data -- SACK• INIT -- INIT ACK -- COOKIE ECHO -- COOKIE ACK• Heartbeat -- Heartbeat ACK• Shutdown – Shutdown ACK -- SHUTDOWN COMPLETE• Abort
    • 20. Setting Up Endpoint A Endpoint Z CLOSED CLOSED INIT 1 COOKIE-WAIT INIT-ACK COOKIE-ECHO *COOKIE-ECHOED 2 * COOKIE-ACKESTABLISHED ESTABLISHED * -- User data can be attached
    • 21. Transfer data
    • 22. Close Endpoint A Endpoint ZShutdown from applicationSHUTDOWN-PENDING Transfer remaining data SHUTDOWN SHUTDOWN-SENT SHUTDOWN-RECEIVED SHUTDOWN ACK SHUTDOWN-ACK-SENT SHUTDOWN COMPLETE CLOSED CLOSED
    • 23. Packet Structure Refer to wikipedia
    • 24. Chunk structure--DATA chunk
    • 25. Chunk structure--SACK chunk
    • 26. Fault management• Primary/alternate Path detection• Resend mechanism• Congestion control (RFC2581)
    • 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
    • 30. Reference• http://en.wikipedia.org/wiki/Stream_Control_Transmission_Pro• RFC4960• RFC 2581• http://www.youtube.com/watch?v=dIPwN-z6lVA• http://www.sctp.org/• http://www.sourceforge.net/projects/lksctp• http://linux.die.net/man/7/sctp• http://www.ibm.com/developerworks/library/l-sctp/• http://www.linuxjournal.com/article/9784
    • 31. Q&A

    ×