Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

Question: This project is an all-inclusive implementation experience of major topics in Computer Networks, i.e., end-to-end protocol design and implementation: including error control, and the sliding window protocol.

- The User Datagram Protocol (UDP) provides point-to-point, unreliable datagram service between a pair of hosts. It does not provide any reliability or sequencing guarantees - i.e. packets may arrive late, may not arrive at all, or arrive corrupted.

- Your project is to implement a reliable and sequenced message transport protocol on top of this unreliable UDP. Your protocol will ensure reliable, end-to-end delivery of messages in the face of packet loss and will preserve ordering of messages.

- Whereas TCP allows fully bidirectional communication, this implementation will be asymmetric. The two endpoints will be designated the "sender" and the "receiver" respectively. Data packets will only flow in the "forward" direction from the sender to the receiver, while ACKs will only flow in the "reverse" direction from the receiver back to the sender.

- (Project inspired by my project assignment at UMN and more recently by Stefan Savage, UC San Diego.)

Implementation Notes: You will implement the client and server component of a transport layer. The client reads a stream of data (from a file), breaks it into fixed-sized packets suitable for UDP transport, prepends a control header to the data, and sends each packet to the server. The server reads these packets and writes the corresponding data, in order, to a reliable stream (a file).

A high-level overview of the system: File à Sender ß -- UDP -- à Receiver à File

In general, since you are using UDP, the implementation (both at the receiver and sender) should:

• The receiver's output should be identical to the other side's input, regardless of a lossy, congested, or corrupting network layer. You will ensure reliable transport by having the recipient acknowledge packets received from the sender; the sender will detect missing acknowledgements and resend the dropped or corrupted packets.

• Handle packet drops/delays

The sender should resend a packet if the receiver does not acknowledge it within an appropriate time period. You resend packet(s) whenever a sent packet has gone unacknowledged for the timeout period. The default timeout period is 2000 msec, but you may change this with the -t command-line option.

• Handle packet reordering

Your server and client should ensure that data is written in the correct order, even if the network layer reorders packets.

• Detect and handle packet corruption using the Internet checksum algorithm

• Provide trivial flow control - based on the send window. You should support arbitrary window sizes. Allow multiple packets to be outstanding at any time. The window size may be supplied by the -w command-line option.

File formats that must transfer over can be of any type, e.g., .txt, .doc, .mov, .jpg, .exe, etc.

Testing considerations:
Because we are doing this between two processes on a single machine, latency is near 0, and no network faults can occur. As a result, you should introduce errors to test the correctness of your implementation.

The user of your program must have the ability to force packets to be lost, to be arbitrarily delayed at both processes, or arrive with checksum errors (i.e., both the sender's packet and the receiver's ACK may be lost/delayed/corrupt).

You will need to deal with: 1. multiple data packets in flight.

2. Retransmission of packets which have timed out.

User Interface: Design a simple (text-based or graphical) UI for your program. The user should be prompted for parameter values for the selected protocol simulation. For example, the user should be prompted for the following values:

1. Size of packet

2. Timeout interval

3. Size of sliding window

4. Range of sequence numbers

5. Situational Errors: none, randomly generated by percentage (drop 25% of data or control frames; corrupt 25% of data or control frames), or - optionally - user-specified (drop packets 2, 4, 5; lose ACKs 11, 12)

Program output: Your UI should provide enough information when you demo your project.

You will be required to open two windows, one for the client and one for the server.

Both windows should present enough information to demonstrate the protocol in action.

The information provided in the sender's window should include:

• Packet sequence number of packet sent.

• Packet (sequence number) that timed out

• Packet that was re-transmitted.

• All packets in the current window.

• Acks received.

• Which packets are damaged, i.e., deliberately trigger a checksum error on the receiver side.

The information provided in the receiver's window should include:

• Packets (sequence number) received.

• Damaged packet(s) (checksum error did not match)

• corresponding damaged packet from sender window).

• Packets in the current receiver window.

• Packets (duplicated) that are discarded.

• ACK packets that are sent.

The receiver must re-sequence any out of order frames received.

It is important that your console output can be slowed down to human time, and that you can explain the behavior of your software program as it reacts to dropped/corrupted packets.

Implementation Details

Packet Types and Fields

There are two kinds of packets, Data packets and Ack-only packets. You can tell the type of a packet by its length.

public class Packet {

short cksum; //16-bit 2-byte

short len; //16-bit 2-byte

intackno; //32-bit 4-byte

intseqno ; //32-bit 4-byte Data packet Only

byte data[500]; //0-500 bytes. Data packet only. Variable

}

• cksum: 2 byte IP checksum. (optional)

• len: 2 byte total length of the packet.

• For Ack packets this is 8: 2 for cksum, 2 for len, and 4 for ACK no

• For data packets, this is 12 + payload size: 2 forcksum, 2 forlen, 4 forackno, 4 forseqno, and as many bytes are there indata[]

Note: You must examine the length field, and should not assume that the UDP packet you receive is the correct length. The network might truncate or pad packets.

ackno: 4-byte cumulative acknowledgment number.

ackno is the sequence number you are waiting for, that you have not received yet - it is the equivalent of Next Frame Expected.

This says that the sender of a packet has received all packets with sequence numbers earlier thanackno, and is waiting for the packet with aseqnoofackno.

The first sequence number in any connection is 1, so if you have not received any packets yet, you should setackno to 1.

The following fields will not exist in an ACK packet:

• seqno: Each packet transmitted in a stream of data must be numbered with aseqno. The first packet in a stream has aseqno of 1. This protocol numbers packets.

• data: Contains (len - 12) bytes of payload data for the application.

To conserve packets, a sender should not send more than one unacknowledged Data frame with less than the maximum number of bytes (500)

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M92395144
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in Homework Help/Study Tips

Question 2- to 4-page paper that includes the

Question: 2- to 4-page paper that includes the following: 1. Describe two historical events that you believe contributed most to the field of addictions. • Explain the contribution of each event to the contemporary field ...

Enterprise mobile app business casewritten report approx

ENTERPRISE MOBILE APP BUSINESS CASE WRITTEN REPORT (approx. 5000 words) In this assignment, you assume the role of the enterprise's CIO. As the CIO you are impressed with the concept of the app presented to you in Assign ...

Question the american psychological association has adopted

Question: The American Psychological Association has adopted a code of ethics, the Ethical Principles of Psychologists and Code of Conduct. In addition to governing the behavior of professionals, the five general princip ...

Question assignment instructionsarticle critique select a

Question: Assignment Instructions Article Critique: Select a peer reviewed article that is focused on one of the following subject areas: 1. Port Security 2. Vulnerability of the Maritime Transportation Security (MTS) 3. ...

Discussion recognizing and avoiding plagiarismwhat is

Discussion: Recognizing and Avoiding Plagiarism What is plagiarism exactly? Is it always done on purpose? The rules related to plagiarism can be complex, and there are instances in which people who have unwittingly plagi ...

Question outline the concept of professional accountability

Question: Outline the concept of professional accountability as it pertains to nursing. Provide examples of how a nurse demonstrates professional accountability in clinical expertise, the nursing process, and evidence-ba ...

Take the criminal you invented in unit vii course project

Take the criminal you invented in Unit VII Course Project Part I, and complete the following tasks: You are a law enforcement officer that has arrived on the scene, been assigned to track down, whatever the case may be, ...

Question why do you think informed consent is necessary in

Question: Why do you think informed consent is necessary in our modern society? In your opinion, if we remove the liability (right to sue) for lack of informed consent, will that enable doctors to provide better and fast ...

Assignment - evaluation of the zoho system and how to apply

Assignment - Evaluation of the Zoho System and how to apply it. Research contain History of the Zoho System: Half a page Definition of the Zoho System: 1. (Wasel, 2003) 2. (Al-Lahidan, 2015) 3. (Al Jaber, 2016) How it wo ...

Assignment -need to give demonstration on how airtasker

Assignment - Need to give demonstration on How Airtasker secure? Please prepare 10 slides.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As