Custom TCP Protocol for Fast Reliable Transfer

an IP based file-transfer utility overcomes loss and delay

This is a Lab from Course USC EE-542: Internet and Cloud Computing.

Watch this demo video by one of my teammates on Youtube


We developed a file transfer program (like scp or ftp) that uses our custom protocol, and emulated the delay and the loss rate of the link using the delay node.

Architecture

The custom protocol is based on datagram socket between the sender and the receiver. After handshaking, the sender sends the packets along with the total file size and packet number. After first transmission completes, client checks the packets and requests for retransmission if there are missing packets. Sender will transmit the missing packets through UDP.

Multiple threads is implemented for both server and client to enhance link utilization and ensure reliability through packet counting.

Difference with commonly used TCP:

  • Only handshake at the beginning, allowing connectionless transfer
  • Ensure reliability on the application layer, not protocol itself
  • Reduced overhead and less controlled limitations(flow, congestion) compared to TCP

Test

We tested our system under various different conditions with MTU of 1500 and 9000, utilizing md5 to validate the file integrity.