hw3_sols_spring2023

.pdf

School

University of California, Berkeley *

*We aren’t endorsed by this school

Course

4119

Subject

Computer Science

Date

Apr 26, 2024

Type

pdf

Pages

11

Uploaded by dkpromotional on coursehero.com

© Gil Zussman, Columbia University - Do not upload to external sites 1 CSEE W4119 Computer Networks Homework #3 - Solution Prof. Gil Zussman 1. (16 points)
© Gil Zussman, Columbia University - Do not upload to external sites 2 2. (16 points) Consider the rdt3.0 protocol. Draw a diagram showing that if the network connection between the sender and receiver can reorder messages (that is, that two messages propagating in the medium between the sender and receiver can be reordered), then the alternating-bit protocol will not work correctly (make sure you clearly identify the sender on the left and the receiver on the right, with the time axis running down the page, showing message (M) and acknowledgment (A) message exchange. Make sure you indicate the sequence number associated with any data or acknowledgment segment. T.O. and M0 is retransmitted. 3. (16 points) Consider a scenario in which Host A wants to simultaneously send packets to Hosts B and C. A is connected to B and C via a broadcast channel – a packet sent by A is carried by the channel to both B and C. Suppose that the broadcast channel connecting A, B, and C can independently lose and corrupt packets (and so, for example, a packet sent from A might be correctly received by B, but not by C). Design a stop-and-wait-like error-control protocol for reliably transferring packets from A to B and C, such that A will not get new data from the upper layer until it knows that both B and C have correctly received the current packet. Give FSM descriptions of A and C. (Hint: The FSM for B should be essentially the same for C.) Also, give a description of the packet format(s) used. This problem is a variation on the simple stop-and-wait protocol ( rdt3.0 ). Because the channel may lose messages and because the sender may resend a message that one of the receivers has already received (either because of a premature timeout or because the other receiver has yet to receive the data correctly), sequence numbers are needed. As in rdt3.0 , a 1- bit sequence number will suffice here. In addition, for detecting packet corruption, a checksum field is needed. M0 M0 M0 M1 M1 A0 A0 A1 A1 old version of M0 accepted!
© Gil Zussman, Columbia University - Do not upload to external sites 3 The FSMs of sender A and receiver B (= receiver C) are shown below. In this problem, the sender state indicates whether the sender has received an ACK from B (only), from C (only) or from neither C nor B. The receiver state indicates which sequence number the receiver is waiting for. To get full credits, it needs to provide a description of the packet format. For example, Source Addr. Destination Addr. Sequence # (0 or 1) ACK (0 or 1) Checksum Data
© Gil Zussman, Columbia University - Do not upload to external sites 4 4. (16 points) Consider the GBN and SR protocols. Suppose the sequence number space is of size k . What is the largest allowable sender window that will avoid the occurrence of problems such as that in the following figures for each of these protocols? In order to avoid the scenarios above, we want to avoid having the leading edge of the receiver's window (i.e., the one with the “highest” sequence number) wrap around in the sequence number space and overlap with the trailing edge (the one with the "lowest" sequence number in the sender's window). That is, the sequence number space must be large enough to fit the entire receiver window and the entire sender window without this overlap condition. So - we need to determine how large a range of sequence numbers can be covered at any given time by the receiver and sender windows. Suppose that the lowest-sequence number that the receiver is waiting for is packet seq . # base . For the SR protocol, its window is [base,base+N-1] and it has received (and ACKed) packet seq. # base-1 and the N-1 packets before that, where N is the size of the window. The receiver is not sure that the N ACKs have been received by the sender. If none of those N ACKs have been yet received by the sender, then ACK messages with values of [base-N,base-1] may still be
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help