Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📡 Communication Networks – Assignment 3

This repository implements Transport Layer Protocols in C as part of an academic assignment for a university course in Computer Networks.

✅ The core highlight of this project is found in Part B, where I designed and implemented a fully functional Reliable UDP (RUDP) protocol from scratch — including handshake, retransmission logic, timeouts, sequencing, and integrity validation.

📌 This project is featured in my CV as a demonstration of my ability to implement low-level networking systems in C.


🚀 Project Highlights

  • TCP Sender/Receiver with Reno & Cubic congestion control
  • Custom Reliable UDP (RUDP) protocol with:
    • Handshake mechanism (SYN/ACK)
    • Packet acknowledgment (ACK)
    • Timeout + retransmissions
    • Custom header and checksum verification
  • 📊 Performance analysis across various packet loss scenarios
  • 🛠️ Written in pure C for Ubuntu 22.04 (no WSL)

🧱 RUDP Packet Header (Actual Implementation)

Field Size Description
length_data 4 bytes Number of bytes in the payload
sequence_number 4 bytes Sequence number of the packet
checksum 4 bytes 16-bit checksum (RFC1071-style, stored as int)
flags 4 bytes Packet type: SYN, ACK, DATA, FIN, etc.
data ≤65000B The actual file content being transmitted

Total header size: 16 bytes (without data).


🧪 Usage Instructions

TCP

Receiver:

./TCP_Receiver -p <PORT> -algo <reno|cubic>

Sender:

./TCP_Sender -ip <RECEIVER_IP> -p <PORT> -algo <reno|cubic>

RUDP

Receiver:

./RUDP_Receiver -p <PORT>

Sender:

./RUDP_Sender -ip <RECEIVER_IP> -p <PORT>

📊 Experimentation Setup

  • Tests performed on 0%, 2%, 5%, and 10% simulated packet loss (tc netem)
  • 5× repetitions for each scenario and protocol
  • Measured: Transfer time and bandwidth (MB/s)
  • All output logged and analyzed

📁 Project Structure

.
├── TCP_Sender.c / TCP_Receiver.c      # TCP file transfer
├── RUDP_Sender.c / RUDP_Receiver.c    # RUDP file transfer
├── RUDP_API.c / RUDP_API.h            # Custom protocol logic
├── Makefile                           # For building the project
└── README.md                          # You're here!

👨‍💻 Author

Noam Cohen

🔗 LinkedIn Profile


🛑 License

This repository is submitted as part of an academic project and is not to be reused without permission.

About

A network project implementing TCP communication with Reno and Cubic congestion control algorithms. Additionally, the project includes a Reliable UDP (RUDP) implementation. The project demonstrates protocol behavior and performance under different network conditions.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages