Content

  1. UDP v.s. TCP
  2. User Datagram Protocol (UDP)
    1. UDP Header
    2. Internet checksum

UDP v.s. TCP

  • UDP
    • No guarantee on data delivery
    • No guarantee on arrival order of segments
    • Optional error checking
  • TCP
    • Reliable data transfer
      • In order & correct data transfer
      • Error checking, acknowledgement, sequencing, retransmission
    • Flow control
      • Not overflowing buffer for receiving side
    • Congestion control
      • Not sending excessive data and overflow buffer for packet switches
    • Connection management
  • Services not provided
    • Delay guarantees
    • Bandwidth guarantees

User Datagram Protocol (UDP)

  • Minimal transport layer services provided
  • Multiplexing & demultiplexing
    • Allow process-to-process delivery (different from raw IP host-to-host)
    • (destnation IP, destination port) for demultiplexing, not caring about source
  • Connectionless
    • No connection setup needed
    • Less overhead managing the logical communication channel
    • Not able to precompute optimized data routes
  • Independent data segment handled
    • Need to provide sender/receiver's address in the header of each segment
  • Small UDP header
  • No flow/congestion control

UDP Header

  • length includes header
    • 8 bytes ≤ length ≤ 216

Internet checksum

  • Sending side
    1. View the message of k-bit strings as a sequence of 16-bit strings, add with one's complement addition -> X
      • i.e. carryout added to least significant bit
    2. Take one's complement -> checksum ~X
    3. Append to original message -> M + ~X = M'
  • Receiving side
    1. Add the message with one's complement addition -> M' = M + ~X = X + ~X = all 1s
    2. Take one's complement -> 0

results matching ""

    No results matching ""