Process-to-Process Delivery TCP UDP

0
19
Process-to-Process Delivery TCP UDP

PROCESS-TO-PROCESS DELIVERY – TCP UDP

  • The TCP UDP transport layer is responsible for process-to-process delivery—the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, as we will see later.
  • The transport layer is responsible for process-to-process delivery.

Types of data deliveries – TCP UDP

Types of data deliveries

Port numbers – TCP UDP

Port numbers

IP addresses versus port numbers – TCP UDP

IP addresses versus port numbers

IANA ranges

IANA ranges

Socket address

Socket address

Multiplexing and Demultiplexing

Multiplexing and demultiplexing

The position of TCP UDP in TCP/IP suite

The position of UDP and TCP in TCP IP suite

USER DATAGRAM PROTOCOL (UDP)

  • The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. (TCP UDP) It does not add anything to the services of IP except to provide process-to-process communication instead of host-to-host communication.

Well-known ports used with UDP

Well-known ports used with UDP

User datagram format

User datagram format

UDP

  • UDP length = IP length – IP header’s length

Pseudo-header for checksum calculation

Pseudoheader for checksum calculation

TCP

  • TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level.

Well-known ports used by TCP

Well known ports used by TCP

Stream delivery

Stream delivery

Sending and receiving buffers

Sending and receiving buffers

TCP segments

TCP segments

TCP

  • The bytes of data being transferred in each connection are numbered by TCP.
  • The numbering starts with a randomly generated number.
  • The value in the sequence number field of a segment defines the number of the first data byte contained in that segment.
  • The value of the acknowledgement field in a segment defines the number of the next byte a party expects to receive.
  • The acknowledgement number is cumulative.

TCP segment format

TCP segment format

Control field

Control field

Description of flags in the control field

Description of flags in the control field

Connection establishment using three-way handshaking

Connection establishment using three-way handshaking

TCP

  • A SYN segment cannot carry data, but it consumes one sequence number.
  • A SYN + ACK segment cannot carry data but does consume one sequence number.
  • An ACK segment, if carrying no data, consumes no sequence number.

Data transfer

Data transfer

Connection termination using three-way handshaking

Connection termination using three-way handshaking

TCP

  • The FIN segment consumes one sequence number if it does not carry data.
  • The FIN + ACK segment consumes one sequence number if it does not carry data.

Half-close

Half-close

Sliding window

Sliding window

TCP

  • A sliding window is used to make transmission more efficient as well as to control the flow of data so that the destination does not become overwhelmed with data.
  • TCP sliding windows are byte-oriented.
  • The size of the window is the lesser of rwnd and cwnd.
  • The source does not have to send a full window’s worth of data.
  • The window can be opened or closed by the receiver, but should not be shrunk.
  • The destination can send an acknowledgement at any time as long as it does not result in a shrinking window.
  • The receiver can temporarily shut down the window; the sender, however, can always send a segment of 1 byte after the window is shut down.
  • ACK segments do not consume sequence numbers and are not acknowledged.
  • In modern implementations, a retransmission occurs if the retransmission timer expires or three duplicate ACK segments have arrived
  • No retransmission timer is set for an ACK segment.
  • Data may arrive out of order and be temporarily stored by the receiving TCP, but TCP guarantees that no out-of-order segment is delivered to the process.

Normal operation

Normal operation

Lost segment

Lost segment

TCP

  • The receiver TCP delivers only ordered data to the process.

Fast retransmission

Fast retransmission

TCP

Congestion Control and Quality of Service

DATA TRAFFIC

  • The main focus of congestion control and quality of service is data traffic. In congestion control, we try to avoid traffic congestion. In quality of service, we try to create an appropriate environment for the traffic.

Traffic descriptors

Traffic descriptors

Three traffic profiles

Three traffic profiles

CONGESTION

  • Congestion in a network may occur if the load on the network—the number of packets sent to the network—is greater than the capacity of the network—the number of packets a network can handle. Congestion control refers to the mechanisms and techniques to control the congestion and keep the load below the capacity.

Packet delay and throughput as functions of load

Packet delay and throughput as functions of load

CONGESTION CONTROL TCP UDP

  • Congestion control refers to techniques and mechanisms that can either prevent congestion, before it happens, or remove congestion after it has happened. In general, we can divide congestion control mechanisms into two broad categories: open-loop congestion control (prevention) and closed-loop congestion control (removal).

Congestion control categories

Congestion control categories

Backpressure method for alleviating congestion 

Backpressure method for alleviating congestion

Choke packet

Choke packet

Congestion Control in TCP

Congestion Control in TCP

Congestion avoidance, additive increase

Congestion avoidance, additive increase

Congestion Control in TCP

  • In the slow-start algorithm, the size of the congestion window increases exponentially until it reaches a threshold.
  • In the congestion avoidance algorithm, the size of the congestion window increases additively until congestion is detected.
  • An implementation reacts to congestion detection in one of the following ways:
    If detection is by time-out, a new slow start phase starts.
    If detection is by three ACKs, a new Congestion avoidance phase starts.

TCP congestion policy summary

TCP congestion policy summary

Congestion example

Congestion example

QUALITY OF SERVICE

  • Quality of service (QoS) is an internetworking issue that has been discussed more than defined. We can informally define the quality of service as something a flow seeks to attain.

Flow characteristics

Flow characteristics

Posts you may Like

LEAVE A REPLY

Please enter your comment!
Please enter your name here