Transport Layer

Dr. Alexios Louridas

  • Guarantee Message Delivery

  • Deliver order of messages

  • Support arbitrarily message sizes

  • Support multiple application processes

  • Synchronisation between hosts

Transport Layer Responsibilities

  • Message dropping

  • Message reordering

  • Duplicate messages

  • Message sizes

  • Delays

Challenges

UDP - User Datagram Protocol

UDP Segments may be lost or delivered out of order.

 

No Handshaking required. Each UDP segment is independent from each other.

 

 

Reliability transferred in application layer.

 

TCP- Transport Control Protocol

Biderectional data flow and maximum segment size (MSS)

 

Handshaking required. Establish connection before data can be send.

 

 

Flow control and reliable.

 

TCP - 3 way Handshake

  1. Establishing a connection: Before data can be transmitted, a connection must be established between the two devices. This process is known as the TCP handshake.
  2. Data transfer: Once the connection is established, data can be transmitted between the two devices. The data is divided into packets, and each packet is assigned a sequence number. The packets are sent from the client to the server, and the server acknowledges receipt of each packet.
  3. Error checking: TCP includes error checking to ensure that the data is transmitted correctly. When a packet is received, the receiver device checks its sequence number and compares it to the expected sequence number. If the sequence number is incorrect or a packet is missing, the receiver requests that the missing or damaged packet be retransmitted.
  4. Connection termination: When the data transfer is complete, the connection is terminated.

 

Flow control in TCP is achieved through a technique called "sliding window."

  • Sender transmits a specified number of bytes to the receiver before receiving an acknowledgment.
  • The sender can adjust the size of the window.

 

The sender maintains a buffer of data that it wants to transmit. As the data is transmitted, the sender adjusts the size of the window based on the number of bytes that have been acknowledged by the receiver. If the receiver cannot handle the data, it will reduce the size of the window, causing the sender to slow down its transmission rate.

Flow Control

Congestion Control

Slow start: TCP uses a slow start mechanism to gradually increase the amount of data sent over the network. 

Congestion avoidance: TCP uses a congestion avoidance mechanism to detect and respond to congestion on the network. This mechanism is based on the detection of packet loss and the adjustment of the sender's transmission rate.

Congestion window: TCP uses a dynamic congestion window to limit the amount of data that can be sent over the network at any given time. 

Fast retransmit and recovery: TCP uses a fast retransmit and recovery mechanism to quickly retransmit lost packets and recover from packet loss. Reduces duplicates.

Explicit congestion notification (ECN): TCP uses ECN to provide early notification of network congestion. ECN allows routers to mark packets with a congestion indication, which the receiver can use to adjust the sender's transmission rate.

  • Checksums

  • Acknowledgments

  • Retransmission

  • Flow control

  • Congestion control

Error Control

  • Reliable
  • Connection-Oriented
  • Flow Control
  • Congestion Control
  • Big Overhead
  • Slower
  • File Transfers, email, web browsing, error free communications

TCP

  • Reliable only on certain situations
  • Very Small Overhead
  • Fast
  • No Congestion of Flow Control
  • Video Streaming, Online Gaming, VoIP

UDP

Conclusion

Minimal

By Alexios Louridas

Minimal

  • 40