Create and implement a protocol over connection

Assignment Help Other Subject
Reference no: EM133035151

CS 450 Introduction to Networking - University of Illinois Chicago

Assignment 1

You need to track the loss and delays and "Specifically, in homework 4, only 2 packets can be transmitted concurrently on a single wire (buffer size is 2).

Introduction
In this homework, you will implement reliable communication over an unreliable link, just like TCP.

You will be provided with code that simulates an unreliable link between sender and receiver. This link has a very constrained buffer (only two packets can be ‘in flight' at a time), and can have arbitrary delay and loss rates. Your job will be to create and implement a protocol over this connection that correctly transfers data, in a reasonable amount of time.

The homework git repository contains several tools that will help you simulate and test your solution. You should not make changes to any file other than hw4.py. All other files contain code used to either simulate the unreliable connection, or code to help you test your your solution.

Your solution - hw4.py file will be tested against stock versions of all the other files in the repo, so any changes you make will not be present at grading time.

Your solution must be contained in the send and recv functions in hw4.py. You should not change the signatures of these functions, only their bodies. These functions will be called by the grading script, with parameters controlled by the grading script. Your solution must be general, and should work for any file.

Your task is to modify the bodies of these functions so that they communicate using a protocol that ensures that the data sent by the send function can be reliably and quickly reconstructed by the recv function. You should do so through a combination of setting timeouts on socket reads (e.x. socket.timeout(float)) and developing a system through which each side can acknowledge if / when they receive a packet.

Remember that the connection is bandwidth constrained. No more than two packets can be "on the wire" at a time. If you send a third packet while there are already two packets traveling to their destination (in either direction), the third packet will be dropped, so it is important that you get your timeouts and your acknowledgments right.

Testing Your Solution
You can use the provided tester.py script when testing your solution. This script uses the receiver.py, sender.py, and server.py scripts to simulate an unreliable connection, and to test your solution.
information to better understand the network. These parameters and options can be viewed by calling python3 tester.py --help, and are also reproduced below.
usage: tester.py [-h] [-p PORT] [-l LOSS] [-d DELAY] [-b BUFFER] -f FILE [-r RECEIVE] [-s] [-v]

Utility script for testing HW4 solutions under user set conditions.

optional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT The port to simulate the lossy wire on (defaults to 9999).
-l LOSS, --loss LOSS The percentage of packets to drop.
-d DELAY, --delay DELAY
The number of seconds, as a float, to wait before forwarding a packet on.
-b BUFFER, --buffer BUFFER
The size of the buffer to simulate (defaults to 2 packets).
-f FILE, --file FILE The file to send over the wire.
-r RECEIVE, --receive RECEIVE
The path to write the received file to. If not provided, the results will be written to a temp file.
-s, --summary Print a one line summary of whether the transaction was successful, instead of a more verbose description of the result.
-v, --verbose Enable extra verbose mode.

python3 tester.py --file test_data.txt --loss .05 --delay 0.1.

Hints and Suggestions
A key part of this homework is determining how long to wait before resending a packet. You should estimate this timeout value using the EWMA technique for estimating the RTT, and use this in determining your timeout. With correctly tuned timeouts, lower RTT will result in higher throughput.
A good way of determining the timeout to use is the "estimated RTT + (deviation of RTT * 4)".
Use the included --verbose option to include very detailed information about what your code is sending over the network, and how the network is handling that data.
Use the included --receive option to see the results of your file transfer. By default, the testing script will store the results of your code to a temporary location. This option may be useful if you're not sure how or why the received file does not match the sent file.
Make sure you try your solution under many different loss ratios and latencies by changing the parameters in the tester.py script.
Keep your packets smaller than or equal to utils.MAX_PACKET (1400 bytes).
Pay attention to the end of the connection. Ensure that both sides of the connection finish without user assistance, even if packet losses occur, while guaranteeing that the entire file is transferred. Look at the FIN/FINACK/ACK sequence in TCP for ideas.

You solution will be graded by using it to transfer six different files, each under different simulated test conditions. For each test case, there is a minimum throughput requirement and a timeout for your program to exit. The timeout is set as 50% more than the corresponding required throughput.

Attachment:- Networking.rar

Reference no: EM133035151

Questions Cloud

Improve upon the implementation : Improve upon the implementation of homework 4. Please see the description of Homework 4 for the basics. Everything is the same about this assignment except for
Institutional conformance at meridian credit union : Q1. Which of the following sustainability strategy is Meridian Credit Union employing at the time of the case?
What amount should be reported as total contributed capital : Net income for 2019 was P 5,000,000. What amount should be reported as total contributed capital on December 31, 2019
How an effective manager builds a successful team : Please describe how an effective manager builds a successful team.
Create and implement a protocol over connection : Implement reliable communication over an unreliable link - create and implement a protocol over this connection that correctly transfers data, in a reasonable
Break even analysis of financial planning : What is the "break even analysis" of financial planning?
Compute the goodwill associated with the purchase of marino : On January 1, 2016, Paul Company purchased Marino by acquiring all its outstanding shares for $300,000 cash. Compute the goodwill associated with the purchase
Discuss the purpose of reflective practices : Discuss the purpose of reflective practices in early education and care services according to the EYLF
Compare and contrast boyd and simpson responses : Compare and contrast Boyd's and Simpson's responses to low-performing employees. Which do you believe is more effective, and why do you think that is?

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd