Project3 - Congestion Control Outline • Overview • Project Specification and Tasks • Tools and Time Table Overview • BitTorrent-like file transfer application • Reliability and congestion control protocol similar to TCP • UDP based and C programming • Allow regroup up to 3 members Project Specification • Intro to BitTorrent file transfer protocol • Congestion control mechanism to ensure fair and efficient network utilization. • Smart optimizations to get the best possible transfer time (extra credit). Intro to BitTorrent Hash( )= = .torrent • • • • • A fixed-size chunk of 512Kbytes in pro3 Verification by rehashing Flooding, no tracker server Single master-file, different ownership BT = TCP, Project3 = UDP Terminology master-data-file 1e 34 b4 27 master-chunk-file 1e 34 haschunk-file GET b4 Peer A hasb4 27 chunk-file Peer A Peer B GET 34 Peer B Node.map File Transfer • • • • Requesting peer send “WHOHAS <list>” Responding peer send “IHAVE <list>” Decide, and send “GET <chunk-hash>” Responding peer send multiple “DATA” Packet Format Packet Header Packet Type Code WHOHAS 0 IHAVE 1 Seq Num GET 2 Ack Num DATA 3 ACK 4 DENIED 5 Magic Version Header Len Type Packet Len Payload = hash list or data SPLIT PACKET LONGER THAN 1500 BYTES! Provided Files hupsim.pl – Emulates network topology using topo.map sha.[ch] - The SHA-1 hash generator input buffer.[ch]+bt parse.[ch] - Handle user input debug.[ch] - helpful utilities for debugging output peer.c - A skeleton peer file nodes.map+topo.map - the hidden network topology Project Tasks • 100% Reliability & Sliding Window • Congestion control • *Intelligent Peer Selection and Caching 100% Reliability & Sliding window SENDER Last Available Last ACKed Last Sent • Cumulative ACK • Duplicate ACK RECEIVER Last Received Next Expected Congestion control • Slow start : ACK received => window++ • Congestion Avoidance : Window size = 1 after a loss (Simple Version) • Fast Retransmit : Retransmit after 3 duplicate ACK • Fast Recovery : No need to implement (But you may need it in Task3) Tools • Spiffy: Simulating Networks with Loss & Congestion sendto() => spiffy_sendto() • Gnuplot and etc TimeTable Date Event Description 5/23 Project3 released START EARLY 5/27 CheckPoint1 (NO Hand in) WHOHAS flooding and IHAVE response 6/3 CheckPoint2 (Hand in) Simple Chunk Download with stop-and-wait 6/8 CheckPoint3 (NO Hand in) Sliding window flow-control with reliability 6/15 CheckPoint4(Hand in) Simple Congestion Avoidance, with cwnd = 1 after any loss 6/19 Early bird deadline Required functionality (+10 bonus points) 6/26 Deadline No penalty Thanks Good Luck & START EARLY!
© Copyright 2026 Paperzz