Transport Layer Functions and Protocols

Transport Layer

The transport layer performs two main functions:

  1. Expands the delivery system between two processes at the network layer to encompass two processes at the application layer running on end systems.
  2. Controls the transmission rate of entities to avoid or recover from congestion within the network.

The protocols of this layer oversee the process flow of data between processes. The application layer programs interact with each other without any obligation to attend to the lower layers.

Facility Address

  • Shipping and answer: No temporary port / known port number.
  • Connectionless service: Example: Letter (receipt not known).
  • Services with connection: Example: Phone (you know who received the message).
  • Reliable service = ACK.
  • UDP Datagram = 8 Bytes (voice).
  • TCP = 16 bytes (data).
  • Fragmentation: Process where the message is divided into several smaller segments.

The encapsulation that occurs in the transport layer divides and encapsulates a message header.

Addressing is done by the network layer; the client may be using several applications (HTTP, SMTP, TELNET).

Flow control at the transport layer is between the end systems. Similar to error control, correction is made with retransmission.

Congestion occurs in both the link layer or network and transport layers, but its effect is felt at the transport layer by offering services to the application layer. Quality of Service (QoS) is used, and can be implemented in other layers, but the difference is in the network layer.

  • Link Layer: Node-to-node.
  • Network Layer: Host-to-host.
  • Transport Layer: Process-to-process.

Client-Server Paradigm: Localhost / local process / remote host / remote procedure.

In the transport layer, the addressing scheme is named PORT.

  • Known Ports: Controlled by IANA.
  • Registered Ports: Commercial enterprises can register these.
  • Dynamic Ports: Can be used by any process.

Communication between end processes uses two identifiers: IP address and port, which together are called a SOCKET.

The IP header contains the source and destination IP addresses, and the TCP or UDP header contains the source and destination ports.

The transport layer does not deliver data directly to a process, but to an intermediate socket. There may be more than one socket at the destination. This is known as multiplexing and demultiplexing.

UDP (connectionless): Packets are sent without needing to establish a connection or offering confirmation. UDP also supports multicast and broadcast. It is commonly used by DNS, SNMP, and ECHO.

UDP Checksum: Used to determine whether bits in the segment have changed.

TCP (connection-oriented): Establishes a connection before data is sent, requests acknowledgment, and terminates the connection afterward. It also uses port numbers as addresses.

End-to-End Principle: When placed at the lowest level, functions can be redundant or of little value compared to the cost of providing them at a higher level.

Establishing a connection works with ACK packets (accepting the connection and transmission). It occurs in four steps, but steps 2 and 3 can be combined, so it is often described as a three-way handshake.

Closing Connection: Both the receiver and transmitter can terminate the connection. When one ends, the other can continue, so there are four asynchronous channels.

Buffers

  • Reception Buffer: Two entries (empty awaiting bytes generated from the network) and entries awaiting verification by the receiver process.
  • Transmission Buffer: Three entries (empty, possible to be satisfied; waiting for ACKs; and an area waiting for bytes to be sent).

Speed control between transmitter and receiver processes.

Full duplex: Receive and transmit buffers in both directions.

FIFO Buffer.

  • LISTEN: The true state of a TCP connection; it occurs when a host is expecting a request to initiate a connection.
  • SYN-SENT: This state indicates that the host sent a SYN to initiate the connection and is waiting for the appropriate SYN-ACK response.
  • SYN-RCVD: This state indicates that the host sent the SYN-ACK response after receiving the SYN.
  • ESTABLISHED: This state indicates that the connection was established. The host that initiated the connection enters this state after receiving the SYN-ACK, and the host responding enters it after receiving the ACK.

Congestion Control

  • RTT (Round Trip Time): Time to travel back and forth on the connection.
  • RcWindow (Receiver Window).
  • MSS (Maximum Segment Size): Limits the amount of data; values are exchanged in the SYN packet (connection request) that opens the TCP connection.
  • Constant Bit Rate (CBR).
  • Variable Bit Rate (VBR).
  • Burst of data.