Computer Networks - Chapter 3 - Transport Layer
Computer Networks - Chapter 3 - Transport Layer
Computer Networks - Chapter 3 - Transport Layer
of CSE, UIU
CHAPTER 3
Transport Layer
Knowledge Test # 1
Q.1 What is basic difference between Transport and Network layer? Illustrate with the “household
analogy” example in the text book.
Q.2 What are the two protocols supported by the transport layer?
Q.3 Why multiplexing and demultiplexing is used? How socket and port numbers are used to
implement multiplexing and demultiplexing?
Q.4 What are the reasons for UDP been faster than TCP? What are the fields in the UDP segment?
Exercise 1: Suppose 3 hosts are connected as shown in the figure. Host A sends packets to
host C through host B. However, they use different protocols for reliable communication (Go-Back-
N vs. Selective Repeat). Notice that B is a regular host running both as a receiver (to receive
packets from A) and sender (to forward A’s packets to C).
Draw side-by-side the timing diagram for AB and BC transmission up to the time when the first
eight packets from A show up on C. Assume that the 2nd and 4th packets arrive in error to host B on
their first transmission, and the 3rd packet arrives in error to host C on its first transmission.
Knowledge Test # 2
Q.1 What is meant by the reliable channel (Transport layer) and unreliable channel (Network layer)
in Figure 3.8 in the textbook?
Q.2 Give examples of non-pipelined and pipelined reliable protocols? What is the basic difference
among them?
Q.4 Suppose 3 hosts are connected as shown in the figure. Host A sends packets to host C through
host B. However, they use different protocols for reliable communication (Go-Back-N vs. Selective
Repeat). Notice that B is a regular host running both as a receiver (to receive packets from A) and
sender (to forward A’s packets to C).
GBN, N = 4 SR, N = 3
Draw side-by-side the timing diagram for AB and BC transmission up to the time when the first
eight packets from A show up on C. Assume that the 3rd and 5th packets arrive in error to host B on
their first transmission, and the 4th packet arrives in error to host C on its first transmission.
Exercise 2: The sender buffer SendBase is 328. The last TCP sequence number sent was 950
in a segment with 500 bytes of data. A segment is received with TCP acknowledgement number
350 and window 3000. MSS is 512. Until another ACK is received:
a. What is the new value of SendBase?
b. What is the last byte (number) that can be sent with certainty that the receiver's buffer will
not overflow?
c. What is the next byte (number) that will be sent?
Exercise 3: Suppose A sends two TCP segments back-to-back to B. The first segment has
sequence number 300, with 150 bytes of data; the second has sequence number 550, with 100
bytes of data.
a) Draw the scenario in a diagram.
b) Suppose that the first segment is lost, but the second segment arrives at B. What will be the
acknowledgment number that B sends to A?
c) Suppose the two segments sent by A arrive in order at B. The first acknowledgement is lost
and the second acknowledgement arrives after the first timeout interval, what will be the sequence
number of the segment that A retransmits to B? What will be the acknowledgement number from
B after receiving the retransmitted segment?
Exercise 4: Two hosts want to communicate using TCP and issue the packets in the following
diagram to establish the connection. Give the packet sequence numbers that should be inserted in
the diagram at the positions indicated by the letters ’x’, ’y’ and ’z’.
Host A Host B
SYN (seq=1234)
SYN (seq=5678, ACK= x)
Exercise 5:
Assume TCP Reno (meaning Fast Retransmit and Fast Recovery) is the protocol experiencing the behavior
shown above. Assume that the TCP flow has been operating for some time, meaning that the number of RTTs
shown is with respect to when you started observing the flow’s behavior.
a) Identify the time periods when TCP slow start is operating.
b) Identify the time periods when TCP congestion avoidance is operating (AIMD).
c) After the 14th RTT, is the segment loss detected by a triple duplicate ACK or by a timeout?
d) What is the initial value of ssthreshold, before the first congestion avoidance interval?
e) What is the value of ssthreshold at the 15th RTT?
f) What is the value of ssthreshold at the 22nd RTT?
g) Assuming a packet loss is detected after the 25th RTT by the receipt of a triple duplicate ACK, what will
be the values of the congesion-window size and of ssthreshold?
Knowledge Test # 3
Q.1 Consider the TCP segment structure in Figure 3.29 in the textbook. Why the following fields are
used: Source and destination port numbers, sequence and acknowledge numbers, and receive
window.
Q.5 What is the difference between flow control and congestion control in TCP?
Q.6 What are the 3 (three) primitive congestion control approaches in TCP? Illustrate with proper
diagrams.