Transport Protocols

Filter Course


Transport Protocols

Published by: Zaya

Published date: 22 Jun 2021

Transport Protocols Photo

Transport Protocols

  • TCP
  • UDP
  • SCTP

TCP

TCP stands for Transmission Control Protocol. It provides full transport layer services to applications. It is a connection-oriented protocol means the connection established between both ends of the transmission. For creating the connection, TCP generates a virtual circuit between sender and receiver for the duration of a transmission.

Features Of TCP protocol

Stream data transfer:

TCP protocol transfers the data in the form of continuous stream of bytes. TCP group the bytes in the form of TCP segments and then passed them to the IP layer for transmission to the destination. TCP itself segments the data and forward it to the IP.

Reliability:

TCP assigns a sequence number to each byte transmitted and expects a positive acknowledgement from the receiving TCP. If ACK is not received within a timeout interval, then the data is retransmitted to the destination. The receiving TCP uses the sequence number to reassemble the segments if they arrive out of order or to eliminate the duplicate segments.

Flow Control:

When receiving TCP sends an acknowledgement back to the sender indicating the number the bytes it can receive without overflowing its internal buffer. The number of bytes is sent an ACK in the form of the highest sequence number that it can receive without any problem. This mechanism is also referred to as a window mechanism.

Multiplexing:

Multiplexing is a process of accepting the data from different applications and forwarding it to the different applications on different computers. At the receiving end, the data is forwarded to the correct application. This process is known as demultiplexing. TCP transmits the packet to the correct application by using the logical channels known as ports.

Logical Connections:

The combination of sockets, sequence numbers, and window sizes, is called a logical connection. Each connection is identified by the pair of sockets used by sending and receiving processes.

Full Duplex:

TCP provides Full Duplex service, i.e., the data flow in both directions at the same time.

TCP Segment Format

 

TCP Segment Format

Source port address: It is used to define the address of the application program in a source computer. It is a 16-bit field.

Destination port address:  It is used to define the address of the application program in a destination computer. It is a 16-bit field.

Sequence number: A stream of data is divided into two or more TCP segments. The 32-bit sequence number field represents the position of the data in an original data stream.

Acknowledgement number: A 32-field acknowledgement number acknowledge the data from other communicating devices. If the ACK field is set to 1, then it specifies the sequence number that the receiver is expecting to receive.

Header Length (HLEN): It specifies the size of the TCP header in 32-bit words. The minimum size of the header is 5 words, and the maximum size of the header is 15 words. Therefore, the maximum size of the TCP header is 60 bytes, and the minimum size of the TCP header is 20 bytes.

Reserved: It is a six-bit field that is reserved for future use.

Control bits: Each bit of a control field functions individually and independently. A control bit defines the use of a segment or serves as a validity check for other fields.

Flags in the control field

URG: The URG field indicates that the data in a segment is urgent.

ACK: When the ACK field is set, then it validates the acknowledgement number.

PSH: The PSH field is used to inform the sender that higher throughput is needed so if possible, data must be pushed with higher throughput.

RST: The reset bit is used to reset the TCP connection when there is any confusion occurs in the sequence numbers.

SYN: The SYN field is used to synchronize the sequence numbers in three types of segments: connection request, connection confirmation ( with the ACK bit set ), and confirmation acknowledgement.

FIN: The FIN field is used to inform the receiving TCP module that the sender has finished sending data.

UDP

UDP stands for User Datagram Protocol. UDP is a simple protocol and it provides non-sequenced transport functionality.

UDP is a connectionless protocol. This type of protocol is used when reliability and security are less important than speed and size.

UDP is an end-to-end transport-level protocol that adds transport-level addresses, checksum error control, and length information to the data from the upper layer.

The packet produced by the UDP protocol is known as a user datagram.

User Datagram Format

The user datagram has a 16-byte header which is shown below:

UDP

Source port address: It defines the address of the application process that has delivered a message. The source port address is 16 bits address.

Destination port address: It defines the address of the application process that will receive the message. The destination port address is a 16-bit address.

Total length: It defines the total length of the user datagram in bytes. It is a 16-bit field.

Checksum: The checksum is a 16-bit field that is used in error detection.

Disadvantages of UDP protocol

  • UDP provides basic functions needed for the end-to-end delivery of a transmission.
  • It does not provide any sequencing or reordering functions and does not specify the damaged packet when reporting an error.
  • UDP can discover that an error has occurred, but it does not specify which packet has been lost as it does not contain an ID or sequencing number of a particular data segment.

Stream Control Transmission Protocol (SCTP)

Stream Control Transmission Protocol (SCTP) is a reliable, message-oriented transport layer protocol. SCTP has mixed features of TCP and UDP. SCTP maintains the message boundaries and detects the lost data, duplicate data as well as
out-of-order data.

SCTP provides Congestion control as well as Flow control. SCTP is specially designed for internet applications.

SCTP Services

  1. Process-to-Process communication: SCTP uses all important ports of TCP.
  2. Multi-Stream Facility: SCTP provides a multi-stream service to each connection, called an association. If one stream gets blocked, then the other stream can deliver the data.
  3. Full-Duplex Communication: SCTP provides full-duplex service ( the data can flow in both directions at the same time).
  4. Connection-Oriented Service: The SCTP is a connection-oriented protocol, just like TCP with the only difference that, it is called association in SCTP. If User1 wants to send and receive a message from the user2, the steps are :
    Step1: The two SCTPs establish a connection with each other.
    Step2: Once the connection is established, the data gets exchanged in both directions.
    Step3: Finally, the association is terminated.
  5. Reliability: SCTP uses an acknowledgement mechanism to check the arrival of data.

Features of SCTP

  1. Transmission Sequence Number (TSN)
    The unit of data in SCTP is a data chunk. Data transfer in SCTP is controlled by numbering the data chunks. In SCTP, TSN is used to assign the numbers to different data chunks.
  2. Stream Identifier (SI)
    The SI is a 16-bit number and starts with 0. In SI, there are several streams in each association and it is needed to identify
    them. Each data chunk needs to carry the SI in the header so that it is properly placed in its stream on arrival.
  3. Packets
    In SCTP, the data is carried out in the form of data chunks and control information is carried as control chunks. Data
    chunks and control chunks are packed together in the packet.
  4. Multihoming
    Multihoming allows both ends (sender and receiver) to define multiple IP addresses for communication. But, only one of
    these can be defined as the primary address and the remaining can be used as alternative addresses.