Advanced Computer Networks Project 2: File Transfer Application



Similar documents
Computer Networks. Chapter 5 Transport Protocols

CS 557- Project 1 A P2P File Sharing Network

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Solving complex performance problems in TCP/IP and SNA environments.

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

TCP in Wireless Mobile Networks

This sequence diagram was generated with EventStudio System Designer (

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

Transport Layer Protocols

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

TFTP TRIVIAL FILE TRANSFER PROTOCOL OVERVIEW OF TFTP, A VERY SIMPLE FILE TRANSFER PROTOCOL FOR SIMPLE AND CONSTRAINED DEVICES

Implementing and testing tftp

Project 3, Fall 2001 Stateful Functionality in IP Layer Out: Thursday, November 1, 2001 Due: Tuesday, December 4, 2001

The Problem with TCP. Overcoming TCP s Drawbacks

A Transport Protocol for Multimedia Wireless Sensor Networks

Forming a P2P System In order to form a P2P system, the 'central-server' should be created by the following command.

Chapter 5. Transport layer protocols

[Prof. Rupesh G Vaishnav] Page 1

First Midterm for ECE374 03/24/11 Solution!!

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

First Midterm for ECE374 03/09/12 Solution!!

Measuring the performance of a Wired network

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Computer Networks Practicum 2015

Mobile Computing/ Mobile Networks

Sample Network Analysis Report

Applications. Network Application Performance Analysis. Laboratory. Objective. Overview

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Improved Digital Media Delivery with Telestream HyperLaunch

How To Design A Layered Network In A Computer Network

15-441: Computer Networks Project 1: Internet Relay Chat (IRC) Server

Mathematical Modelling of Computer Networks: Part II. Module 1: Network Coding

Access Control: Firewalls (1)

Behavior Analysis of TCP Traffic in Mobile Ad Hoc Network using Reactive Routing Protocols

Mike Canney Principal Network Analyst getpackets.com

Data Link Layer. Flow Control. Flow Control

Ethernet. Ethernet. Network Devices

Improving Effective WAN Throughput for Large Data Flows By Peter Sevcik and Rebecca Wetzel November 2008

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

(Refer Slide Time: 02:17)

Announcements. Lab 2 now on web site

TCP in Wireless Networks

Frequently Asked Questions

File Transfer And Access (FTP, TFTP, NFS) Chapter 25 By: Sang Oh Spencer Kam Atsuya Takagi

TCP for Wireless Networks

1 An application in BPC: a Web-Server

Final for ECE374 05/06/13 Solution!!

TFTP Usage and Design. Diskless Workstation Booting 1. TFTP Usage and Design (cont.) CSCE 515: Computer Network Programming TFTP + Errors

First Midterm for ECE374 02/25/15 Solution!!

IP - The Internet Protocol

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

A Resilient Transport Layer for Messaging Systems

Data Networks Summer 2007 Homework #3

Low-rate TCP-targeted Denial of Service Attack Defense

Command Manual - Network Protocol Quidway S3000 Series Ethernet Switches. Table of Contents

Per-Flow Queuing Allot's Approach to Bandwidth Management

Visualizations and Correlations in Troubleshooting

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

EWeb: Highly Scalable Client Transparent Fault Tolerant System for Cloud based Web Applications

Title: DEVELOPING TCP/IP AND UDP TRAFFIC MONITORING TOOL. RAFIQ BIN CHE MAT ( )

High-Speed TCP Performance Characterization under Various Operating Systems

Emerald. Network Collector Version 4.0. Emerald Management Suite IEA Software, Inc.

Question: 3 When using Application Intelligence, Server Time may be defined as.

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

TCP/IP Support Enhancements

A Survey: High Speed TCP Variants in Wireless Networks

MOBILITY AND MOBILE NETWORK OPTIMIZATION

It is the thinnest layer in the OSI model. At the time the model was formulated, it was not clear that a session layer was needed.

Pig Laboratory. Additional documentation for the laboratory. Exercises and Rules. Tstat Data

From Centralization to Distribution: A Comparison of File Sharing Protocols

CS 416: Opera-ng Systems Design

A Passive Method for Estimating End-to-End TCP Packet Loss

point to point and point to multi point calls over IP

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

TCP Session Management (SesM) Protocol Specification

How To Analyze The Security On An Ipa Wireless Sensor Network

TCP Adaptation for MPI on Long-and-Fat Networks

Mike Canney. Application Performance Analysis

Effect of Packet-Size over Network Performance

Stop And Wait. ACK received; transmit frame 2 CS 455 3

An Introduction to Syslog. Rainer Gerhards Adiscon

The Fundamentals of Intrusion Prevention System Testing

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

D1.2 Network Load Balancing

Digital Audio and Video Data

Amateur Radio Satellite File Transfer Protocol (ARSFTP)

Congestions and Control Mechanisms n Wired and Wireless Networks

CMPE 150 Winter 2009

Introduction to Basics of Communication Protocol

Distributed File Systems

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

CS268 Exam Solutions. 1) End-to-End (20 pts)

2 TCP-like Design. Answer

Transcription:

1 Overview Advanced Computer Networks Project 2: File Transfer Application Assigned: April 25, 2014 Due: May 30, 2014 In this assignment, you will implement a file transfer application. The application will run on top of UDP, and you will need to implement a reliable and congestion control protocol (similar to TCP) for the application. The application client will be able to download a set of files from a server, which is directly connected to the client s host. Your task is to finish the transferring task as soon as possible. 2 Project Outline During the course of this project, you will do the following: Implement a file transfer application and minimize the transferring time. Implement a congestion control mechanism to ensure fair and efficient network utilization 3 Project specification 3.1 Scenario This project is loosely based on a traditional file transfer application, the client knows which server has the file, and sends a request to that server for the given file. In this project, since you can only use UDP as the underlying transfer protocol, you should implement the reliability and congestion control for your application, i.e., you have to design a retransmission mechanism to make sure the file downloaded is exactly the same as the copy in the server. Besides when congestion arise, your application should be aware of this and take necessary measure to mitigate the situation. The scenario of which your application works is a simple one-link-network, Figure 1, i.e., two machine connected to each other with only one link. Considering this is the only scenario that is required, you can optimize your application in whatever ways you want. The only constraint is USING UDP as your transfer layer. I

Figure 1 : the one-link-network scenario for evaluation 3.2 Programming Guidelines Your application must be written in the C programming language, no C++ or STL is allowed. You need to use UDP for all the communication for control and data transfer. Your code must compile and run correctly on linux machines. Refer to slides from past recitations on designing modular code, editing makefiles, using subversion, and debugging. As with project1, your implementation should be single-threaded. For network programming, you are not allowed to use any custom socket classes, only the standard libsocket and csapp libraries. These guidelines are similar to project1, except that you may freely use any code from your project1 (even if you switched partners). However, all code you do not freshly write for this assignment should be clearly documented in the README. 3.3 Project Tasks There several tasks to evaluate your application s performance: 3.3.1 Task 1 100% Reliability & Sliding Windows The first task is to implement a 100% reliable protocol for file transfer (ie: DATA packets) between two peers with a simple flow-control protocol. Non-Data traffic does not need to be transmitted reliably or with flow-control. To achieve reliability and ordered delivery, you need to use sliding windows on both sides (sender, receiver) of the connection. In this case, the sender is the node that already has the file, while the receiver is the node that sends the request to begin downloading the file. To start the the project, use a fixed-size window of 8 packets. The sender and receiver should ignore packets that fall out of the window. II

Figure 2: Sliding Window Figure 2 shows the sliding windows for both side. The sender slides the window forward when it gets an ACK for a higher packet number. The receiver slides the window forward when the application reads more packets bytes from the buffer to increment the LastPacketRead There is a sequence number associated with each packet and the following constraints are valid for sender and receiver (hint your peers will likely want to keep state very similar to that shown here): Sending side LastPacketAcked LastPacketSent LastPacketSent LastPacketAvailable LastPacketAvailable LastPacketAcked WindowSize packet between LastPacketAcked and LastPacketAvailablemust be buffered you can either implement this by buffering the packets or by being able to regenerate them from the datafile. Receiving side LastPacketRead < NextPacketExpected NextPacketExpected LastPacketRcvd + 1 LastPacketRcvd NextPacketExpected WindowSize bytes between NextPacketExpected and LastPacketRcvd must be buffered. As above, you could implement this by actually buffering the data, or by writing the data in its correct order to the data file. When the sender sends a data packet it starts a timer for it. It then waits for a fixed amount of time to get the acknowledgment for the packet. Whenever the receiver gets a packet it sends an acknowledgment for NextPacketExpected. That is, upon receiving a packet with sequence number = 8, the reply would be ACK 8, but only if all packets with sequence numbers less than 8 have already been received. These are called cumulative III

acknowledgements. The sender has two ways to know if the packets it sent did not reach the receiver: either a time-out occurred, or the sender received duplicate ACKs. If the sender sent a packet and did not receive an acknowledgment for it before the timer for the packet expired, it resends the packet. If the sender sent a packet and received duplicate acknowledgments, it knows that the next expected packet (at least) was lost. To avoid confusion from re-ordering, a sender counts a packet lost only after 3 duplicate ACKs in a row. When you send a request to that sever host, set a timer to retransmit the request after some period of time (less than 5 seconds). You should have reasonable mechanisms to recognized when successive timeouts of DATA or request traffic indicates that a hosts has likely crashed. 3.3.2 Task 2 Optimizations: Extra Credit / Competition Section For this section, we would measure how well you can optimize the speed of file transferring. We will have different sets of files for transferring mission, your application should be intelligent enough to handle all given cases. In order to achieve high throughput, you may design some heuristic method to reduce the cost of acknowledging and retransmitting. Also, the window size also plays a crucial in affecting the transferring speed. Below is the typical types of file sets to be transferred: A single huge file, e.g., a movie file, which is usually several GB in size; A mass of tiny files, e.g., log files, which are usually one or two KB in size; A combination of large files and tiny files. 4 Grading This information is subject to change, but will give you a high-level view of how points will be allocated when grading this assignment. Notice that many of the points are for basic file transmission functionality and simple congestion control. Make sure these work well before moving to more advanced functionality or worrying about corner-cases. Basic file transferring [50 points]: The client should be able to set up connection with the server with explicit message, and transfer the specific set of files correctly. This section requires reliability to handle packet loss. Robustness [20 points]: Your implementation should be robust to crashing peers, and should attempt to restore automatically from the break point. Efficiency [up to 40 points]: You should implement heuristics and protocol techniques that will help your peers transfer files faster. We will measure the IV

average download speed for multiple cases. 5 Hand-in As in project 1, code submission for the final deadline will be done through your subversion repositories. You will receive an email with your Team#, Person#, and associated password soon after the assignment is posted. You can check out your subversion repository with the following command where you must change your Team# to Team1 for instance, and your P# to the correct number such as P1 : The grader will check directories in your repository for grading, which can be created with an svn copy : Checkpoint X YOUR REPOSITORY/tags/checkpointX Final Handin YOUR REPOSITORY/tags/final Contest Handin (optional) YOUR REPOSITORY/tags/contest Extra Credit (optional) YOUR REPOSITORY/tags/extracredit V