Notes on data communication and network-SCTP

Source: Internet
Author: User

SCTP (stream control transmission protocol) is a new reliable packet-oriented transport layer control protocol. It has both UDP and TCP features. It is a reliable packet-oriented protocol that stores the boundary of the message and detects lost data, duplicate data, and time series data. It also includes congestion control and traffic control. 1. SCTP Service 1. 1. each connection between the multi-stream TCP client and the TCP server contains a single stream. The problem with this method is that any loss of the stream will block other data transmission, however, it is acceptable for text transmission, but it cannot be accepted when real-time data (audio and video) is transmitted. SCTP provides multistream service in each connection, which is called Association in SCTP. If one of Multiple Streams is blocked. Other streams can still pass their data.. Multi-interface SCTP Association supports multihoming service. You can define multiple IP addresses for each association between the sending host and receiving host. In this fault tolerance method, when a channel fails, data can be transmitted without a terminal using another interface. 1. 3. connection-oriented service (SCTP) is A connection-oriented protocol. In SCTP, A connection is called Association. When the process of Site A sends or receives data to the process of Site B, the steps are as follows: 1. connection SCTP establish connection with each other. 2. Both parties exchange data. 3. Terminate the connection.. Reliable service SCTP is a reliable transmission protocol. It uses a validation mechanism to check whether data is securely and reliably delivered. 2. SCTP features 2. 1. The DATA unit for transmitting the serial number SCTP is DATA chunk ). SCTP uses the transmission sequence number (TSN) to number data blocks. The role of TSN is similar to the serial number in TCP. The TSN is 32-bit long and the initial value can be 0 ~ A random number between 2 ^ 32-1. the header of each data block must have a corresponding TSN. 2.2 The stream identifier has only one stream at a time in TCP connections. In SCTP, multiple streams can be associated at a time. Therefore, the stream identifier (SI) must be used for identification. The header of each large data block must have SI. In this way, when they reach the target end, it can be correctly put into its stream, where SI is a 16-digit number starting from 0. 2.3 stream serial number when a large data block reaches the target SCTP, it is passed to the appropriate stream and arranged according to the original sequence. In addition to SI, SCTP also uses stream sequence number (SSN) to define each data block in each stream. 2.4 The SCTP group is as follows: SCTP group and TCP segment are different: 1. Control Information in TCP is in the header, while in SCTP, control information is in the control block. 2. Data in a TCP segment is processed as an entity, and a SCTP group can carry multiple data blocks, each of which may belong to different streams. 3. The options can be part of the TCP segment, but the SCTP group does not have any options. The options in SCTP are processed by defining new large bytes. 4. The mandatory part of the TCP header is 20 bytes. The SCTP header is only 12 bytes, And the SCTP header is short because a. SCTP serial number (TSN) belongs to each data block, so it is located in the header of the data block. B. the confirmation number and window size are part of each control block. C. The length of the SCTP header is fixed to 12 bytes. Therefore, the header length is not required. The length of the header generated with the option does not exist. D. There is no emergency pointer in SCTP. 5. the TCP validation is 16 bits, and the SCTP is 32 bits. 6. Confirm that tags are associated identifiers in SCTP. But it does not exist in TCP. The IP address and port address in TCP define a connection. In SCTP, multiple interfaces are implemented using different IP addresses. Each association requires a unique validation label. 7. the header of the TCP End has a serial number, which defines the first byte number in the data section. The SCTP group can contain multiple data blocks. Each data block is defined using TSN, SI, and SSN. 8. Some TCP segments carry control information (SYN and FIN), which occupies a serial number. In SCTP, the control blocks are not applicable to TSN, SI, and SSN. These three identifiers only belong to large data blocks, rather than large data blocks. Next we assume that process A sends 11 packets to process B with three streams. The first four packets use the first stream, and the second three packets use the second stream, the last four packets use the third stream. 3. SCTP association 3. 1. association establishment requires four handshakes ). Normally, the procedure is as follows: 1. The client sends the first group, which is an INIT chunk ). 2. the server sends the second group, which is a large init ack block. (Init ack chunk). 3. The client sends the third group, which contains a cookie echo chunk ). This is a very simple bulk, and it does not change the response to the cookie sent by the server. 4. the server sends 4th groups, which contain large blocks of cookie ack that are identified by cookie echo. (Cookie ack ). SCTP can prevent tcp syn flood attacks. When the sender's IP address is confirmed, this policy delays resource allocation and only receives 3rd groups: if the sending method of the first group is one attacker, the server will never accept the 3rd groups. The cookie is lost, but no resources are allocated.. DATA Transmission: the client sends four DATA blocks and receives two DATA blocks from the server. 1. The client sends the first group, which carries two DATA blocks whose TSN is 7105 and 7106 respectively. 2. The client sends the second group, which carries two DATA blocks of TSN 7107 and 7108, respectively. 3. The third group is from the server, which contains the SACK block required to confirm the DATA block of the received client. In contrast to TCP, SCTP only receives the last TSN in order for confirmation. Instead of what is expected next. The third group also contains the first DATA block from the server whose TSN is 121. 4. the server sends another group that contains the last DATA block with the TSN of 122. However, because the last DATA block received from the client has been confirmed, the group does not contain the SACK block. 5. The client finally sends a group, which contains an SACK block. The SACK block is used to receive confirmation from the last two data blocks of the server. 3. 3. the connection between the client and the server can be closed. However, unlike TCP, SCTP does not allow semi-shutdown. If one end is closed, the other end must stop sending new data. If there is data in the end request queue, you can send the data and disable Association. 4. Traffic Control SCTP uses a window mechanism similar to TCP for traffic control. 5. Error Control SCTP uses a validation and retransmission mechanism similar to TCP for error control.. Confirm that in SCTP, a large SACK block is used to report the status of the receiver buffer to the sender.. Same as TCP, SCTP uses two policies to control the loss or discarding of large blocks: Use the resend timer and send the four SACK messages to the same loss of large blocks. 6. Congestion Control SCTP uses the same policies as TCP for congestion control. Congestion Control will be described later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.