You are hired as a consultant by the Faulty Networks Corporation to fix a proble
ID: 3757961 • Letter: Y
Question
You are hired as a consultant by the Faulty Networks Corporation to fix a
problem that they are having with a proprietary transport layer protocol, FNC-TP. FNC-TP
uses a Go-Back-4 ARQ scheme. The sequence number field and the acknowledgement field
of the FNC-TP header are each two bits in length. Draw a diagram (similar to Figure 3.22 in
Kurose and Ross) that demonstrates that FNC-TP may not always work properly.
After fixing the problem with FNC-TP, you are asked to implement TCP. You
are considering two options for the receive function.
(i) Bytes will be received only in order. If the receiver requests byte k, then it will only
accept a segment with sequence number k.
(ii) Bytes can be received out of order. If the receiver requests byte k, then it will accept any
segment with a sequence number that is greater than or equal to k (but will not accept
bytes greater than k + WIN -1, where WIN is the window size advertised by the receiver).
Answer the following questions.
a. Will scheme (i) work for TCP?
b. Will scheme (ii) work for TCP?
c. Regardless of whether or not the two schemes will work properly, what are the relative
advantages and disadvantages of scheme (i) versus scheme (ii)?
Explanation / Answer
Flow Control
Consider a situation in which the sender transmits frames faster than the receiver can accept them. If the sender keeps pumping out frames at high rate, at some point the receiver will be completely swamped and will start losing some frames. This problem may be solved by introducing flow control. Most flow control protocols contain a feedback mechanism to inform the sender when it should transmit the next frame.
Mechanisms For Flow Control:
In this simple example, there is a 4-byte sliding window. Moving from left to right, the window "slides" as bytes in the stream are sent and acknowledged.
Most sliding window protocols also employ ARQ ( Automatic Repeat reQuest ) mechanism. In ARQ, the sender waits for a positive acknowledgement before proceeding to the next frame. If no acknowledgement is received within a certain time interval it retransmits the frame. ARQ is of two types :
w-1 + 1 < Sequence Number Space
i.e., w < Sequence Number Space
Maximum Window Size = Sequence Number Space - 1
Maximum Window Size = Sequence Number Space / 2
a) Here we have a window size of N=3. Suppose the receiver has received packet k-1, and has ACKed that and all other preceeding packets. If all of these ACK's have been received by sender, then sender's window is [k, k+N-1]. Suppose next that none of the ACKs have been received at the sender. In this second case, the sender's window contains k-1 and the N packets up to and including k-1. The sender's window is thus [k-N,k-1]. By these arguments, the senders window is of size 3 and begins somewhere in the range [k-N,k].
b) If the receiver is waiting for packet k, then it has received (and ACKed) packet k-1 and the N-1 packets before that. If none of those N ACKs have been yet received by the sender, then ACK messages with values of [k-N,k-1] may still be propagating back.
Because the sender has sent packets [k-N, k-1], it must be the case that the sender has already received an ACK for k-N-1. Once the receiver has sent an ACK for k-N-1 it will never send an ACK that is less that k-N-1. Thus the range of in-flight ACK values can range from k-N-1 to k-1.
please enlarge the figure when opening
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.