You are on page 1of 4

COMP311 – Fall 2010 Ghulam Murtaza

Homework Number 3
(Due Wednesday, Dec 8, 2010 before Class)

Question 1: [20 pts] Consider two hosts A and B that have data to be exchanged using
TCP. In this problem, we will assume that the propagation delay between the two hosts is
one time slot equal to the transmission of a packet (assumed of constant size), and the
hosts never have urgent data to be transmitted. No data in a packet can be used prior to
the complete reception of that packet. The maximum data field in a packet is 200 bytes.
Assume that Host A has a buffer to receive data from the other host of size 800 bytes,
and Host B has a buffer to receive data from Host A of size 400 bytes. Further assume
that the time to transfer the data to the higher layer once a packet is received is
negligible. No errors ever occur in transmission. Hosts use maximum size packets whenever
possible. Host A has 900 bytes to send to Host B, and Host B has 1300 bytes to send to
Host A. Consider that Host A initiates the opening of a connection, which is accepted by
Host B. Host A starts with sequence number equal to 428 and declares a TCP window
size equal to 800, and Host B wants to start with sequence number 374 and declares a
TCP window size equal to 400. Both window sizes remain unchanged for the entire
duration of the session. If a station is blocked because of the window declaration, it does
not send an empty data unit just to acknowledge received data. The table on the next page
shows only the relevant parts of the TCP header. Fill in the fields showing the sequence of
TCP data units exchanged in opening the connection, in the data transfer phase, and in
closing the connection. Consider that a host closes its side of the connection as soon as it
finishes the transmission of its data, and following the close, it continuously acknowledges
data received from the other side. If a field is not used, leave it blank.

1
HOST A HOST B

SEQ# ACK# WINDOW SYN FIN ACK ACK FIN SYN WINDOW ACK# SEQ#

2
Question 2: [20 pts] Consider two stations A and B directly connected over an unreliable
physical channel. Our goal is to provide a reliable channel at the data link layer
between these two stations. Time is slotted with the slot size taken to be the unit of
time. The 1-way propagation delay is d slots, where d is assumed to be an integer. All
frames are of equal size, and the transmission time of a frame is exactly one slot. We
are interested in the transmission of frames from A to B. We assume that the processing
delay at station B is negligible, and that acknowledgments for frames transmitted by A are
sent from B at the earliest possible time. Since the frames are of equal size, and d is an
integer, we can consider the time axis to be slotted with the slot size equal to a frame
transmission time, and the two stations A and B to be synchronized.

(a) Assume an environment where no transmission errors can occur in either direction. Find
the minimum values for the sending window size Ws , the receive window size Wr, and the
sequence range (starting at 0) which achieve maximum efficiency.
For the rest of the question, consider an environment where noise occurs in bursts on
an infrequent basis; however each noise occurrence causes a certain number of consecutive
packets k ≥ 1 to be received in error. In this problem, we assume that errors occur in
packet transmissions from A to B only, and thus acknowledgment packets from B are always
received by A correctly. We consider the use of the Go-Back-N (GBN) mechanism and the
selective repeat (SR) mechanism for error recovery, and we are interested in the efficiency of
these mechanisms in the environment described. We further assume that:

i) The time-out at the sender is very large, and should not be counted on for recovery; i.e.,
the only way to detect frames received in error is by receiving a frame out-of-order.

ii) The time that separates noise occurrences is large compared to the time it takes to
recover from errors.

(b) Consider the case where the GBN mechanism is used. Give as a function of k the
minimum values of Ws and Wr that minimize the number of wasted slots (i.e., idle slots,
erroneous transmissions, a n d retransmissions), as compared to the ideal case of part (a)
where no errors occur.

(c) Consider the case where only the SR mechanism is used. Give as a function of k the
minimum values of Ws and Wr that minimize the number of wasted slots (i.e., idle slots,
erroneous transmissions, and retransmissions).

(d) Which of the two mechanisms gives the best performance (i.e., minimum number of
wasted slots) as a function of k (assuming their respective optimal window sizes are used)

3
Additional Questions from Chapter-3:
Problems 1, 2, 3, 11, 12, 13, 15, 16, 18, 20, 25, 27, 29, 30, 32, 33

You might also like