Checksum

  • error detection method for most TCPIP

  • User Datagram Protocol (UDP)

    • Connectionless and unreliable communication.
    • Faster than TCP.
    • Commonly used for transferring small amounts of data.
    • Does not guarantee delivery, correct order, or retransmission of lost data.
  • Transmission Control Protocol (TCP)

    • Connection-oriented and reliable communication.
    • Slower than UDP.
    • Commonly used for transferring large amounts of data.
    • Ensures data is delivered correctly and retransmits lost data when necessary.
  • TCP Mechanisms for Reliable Data Transmission

    • Sequence Numbers
      • Every byte of data is assigned a sequence number.
      • Allows the receiver to reorder segments and detect missing data.
    • Acknowledgements (ACKs)
      • The receiver sends an ACK containing the next expected byte number.
      • Confirms that data has been received correctly and in order.
    • Retransmission
      • The sender starts a retransmission timer for each segment sent.
      • If no ACK is received before the timer expires, the segment is resent.
      • Detects and recovers from lost segments or ACKs.
      • After receiving three duplicate ACKs, TCP can retransmit the missing segment immediately.
    • Checksum
      • Each TCP segment contains a 16-bit checksum covering its header and data.
      • Detects data corruption during transmission.
      • A corrupted segment is discarded and treated as lost.
    • Flow Control
      • The receiver advertises a window size.
      • Controls how much data the sender may transmit before receiving an ACK.
      • Prevents the receiver’s buffer from overflowing.
    • Ordered Delivery
      • The receiver temporarily stores segments that arrive out of order.
      • Segments are delivered to the application only after they are arranged in the correct sequence.