Exercise 5.4.
Show the pseudoheader and the TCP segment with source socket <10.0.0.1,8191>, destination
socket <192.168.255.17,1539>, SN = 17,000, AN = 152, window = 1000, payload “Dante” and all other fields
set at zero, which are used for the checksum calculation, also determining the decimal value obtained.
TCP segment and associated pseudoheader thus obtained are shown in Figure E5.1a, considering that the TCP
protocol number is 6 and the number of bytes of the TCP segment is 25. The 16-bit justification operation for
calculating the checksum is shown in Figure E5.1b (since the TCP segment contains an odd number of bytes,
the byte 0 must be added at the end of the segment), resulting in a (decimal) checksum equal to 45,412.
Figure E5.1 TCP segment TCP with pseudoheader (a) and checksum calculation (b) according to Exercise 5.4.
Exercise 5.7.
Consider a TCP connection that adopts the default MSS value and MSL = 2 min. Determine the
maximum capacity C of an IP stream that supports the TCP connection, so that two bytes with the same number
can never be found in the network assuming that the IP datagrams have a header of 20 bytes.
The equation provides the maximum capacity of the TCP connection, that is
Since each TCP segment has a payload of MSS = 536 bytes and a 20-byte header, to which the 20-byte header
of the IP datagram is added, it follows that the maximum capacity C of the IP stream is
Exercise 5.9.
Consider the transfer of data between two stations, A and B, through a TCP connection with
the following hypotheses: (i) only station A receives data to be sent from its application and in particular a
first block of 4500 bytes at time t = 0 and a second block of 4000 bytes at time , where the transmission time Ts of a segment with maximum size MSS = 1500 byte is given by and is the propagation delay between the two stations; (ii) the second segment sent by station A is not received by station B; (iii) the transmission time of an acknowledgment is ; (iv) the initial numbering is = 1000 and = 500. Determine for this case the value of the time-out beyond which the fast retransmit procedure allows the lost segment to be retransmitted faster.
Determining the required time-out value requires calculating the time needed for the fast retransmit procedure
to recover the lost segment. As shown in Figure E5.2, station A, after the acknowledgment of the first segment,
receives 3 repeated ACKs with the same numbering AN, which indicates loss of segment according to
the fast retransmit procedure. Upon receipt of the third repeated acknowledgment, station A retransmits the
segment that is assumed to have been lost. The time that elapses between the end of the first transmission of
the segment and the beginning of its retransmission determines the value of the required parameter . Considering the arrival time of the second block of data, is obtained as
Figure E5.2 Recovery of lost segment with fast retransmit procedure according to Exercise 5.9.
Exercise 5.13.
Consider the algorithm for estimating the round trip time (RTT) used by the TCP protocol.
Calculate the new RTT value if the current estimate is RTT = 15 ms and 5 acknowledgments are received
which result in the measured RTT delays equal to 18, 23, 24, 32 ms. Assume the suggested values for the
weight coefficients.
The update of the RTT parameter is based on the equation , where
represents the current value and indicates the last measurement received and the parameter assumes the value of 1/8. Then the new RTT values are easily obtained as shown below
It is therefore observed that the growth mechanism with weighted moving average determines a slower
variation than the variation actually detected in the RTT parameter.
Exercise 5.16.
Two hosts are connected through a network that makes a radio link of length d = 80 km and
of constant capacity C = 80 Mbit/s available. The TCP transport protocol is used to transfer segments from
host A to host B, all with fixed size MSS = 1000 bytes, with the initial congestion window opening Cwnd = 1
MSS for the two values of the threshold = 32 MSS and = 4 MSS, starting transmission
of the first segment at time t = 0. Assuming that no errors occur during data transfer and that the length of the acknowledgment messages is negligible, evaluate the time T required to complete the transfer of a file with
27.5 kbytes from A to B for each of the two values and .
The round trip time, RTT, between the two hosts is the time it takes to receive the acknowledgment segment
in response to a request segment. The transmission time of a request segment and the propagation time are given by
Since the acknowledgments have negligible length, the RTT parameter is given by the sum of the transmission
time of the request segment and twice the propagation delay between the two hosts, that is
The evaluation of the file transfer time requires identifying the instant t after which the transmission of station
A becomes continuous, since the initial size of the congestion window determines a partial use of the available
capacity. The transfer of 27.5 kbytes of data requires sending 28 segments of fixed size MSS. In the case
of the threshold value = 32 MSS, as shown in Figure E5.3, the quantity of segments transmitted
doubles in the first three “windows” of RTT duration, in which 1 +2 + 4 = 7 segments are transmitted. The
transmission of the next block of 8 segments requires a time of 800 ms which is greater than RTT. The transmission therefore becomes continuous at time
With the start of continuous transmission, the opening Cwnd of the congestion window no longer plays a role,
as it does not reach the threshold value and therefore the region in which it operates is always slow start. The total time T required for the file transfer is given by
In the case of the threshold value = 4 MSS, the doubling of the congestion window is limited to the value Cwnd = . Therefore, as shown in Figure E5.4, after 3 “windows” of RTT duration, the congestion window increases by one MSS for each further window, as it operates in the congestion avoidance
region. Since 6.33 segments can be transmitted in an RTT time, it takes 5 “windows” of RTT duration before
a continuous transmission begins by station A, which takes place at time
Hence, since 1 + 2 + 4 + 5 + 6 = 18 segments are transferred before continuous transmission begins, the total
time required to transfer the file using 28 segments of MSS size is now given by
Figure E5.3 Exchange of TCP segments with = 32 MSS according to Exercise 5.16.
Figure E5.4 Exchange of TCP segments with = 4 MSS according to Exercise 5.16.
Exercise 5.21.
Represent the evolution of the congestion window opening for the TCP Tahoe and TCP Reno
protocols for the first 40 RTT intervals in the hypothesis that: (i) one of the segments sent at time 13 RTT is
lost and only duplicate acknowledgments are received; (ii) the network is faulty in the interval (14-15) RTT
and no segments are transmitted; (iii) the network goes out of service in the interval (23-25) RTT. The initial
values are: threshold Ssthresh = 16 MSS between the two regions, congestion window Cwnd = 1 MSS, timeout
= 2 RTT. Transmission begins at time 1 RTT.
The trend of the Cwnd parameter for the two protocols is shown in Figure E5.5. For the first 5 cycles of RTT
we operate in the slow start region with exponential increase of Cwnd, and then enter the region of congestion
avoidance characterized by linear increase. The loss of segment transmitted at time 13 RTT is detected at time
14 RTT by means of 3 ACKs duplicated with the TCP Reno protocol, at time 15 RTT by means of the expiration
of the time-out with the TCP Tahoe protocol. The new threshold value becomes Ssthresh = 12 MSS,
given that the number of transmitted segments without acknowledgment is Flightsize = 24. In the case of the
TCP Tahoe protocol, the congestion window restarts from the unit value and increases exponentially up to
the new threshold value and then increase linearly. In the case of the TCP Reno protocol, the congestion window
restarts from the value Cwnd = Ssthresh = 12 MSS and the increase continues linearly since we are in
the congestion avoidance region. Upon the occurrence of segment loss revealed by the expiration of the timeout
at time 25 RTT, the threshold assumes the new value Ssthresh = 8 MSS with the TCP Tahoe protocol and
Ssthresh = 10 MSS with the TCP Reno protocol, i.e. half of the last value of Cwnd, which indicates also the
number of segments sent with no acknowledgment. In both cases, the new opening of the congestion window
is the minimum Cwnd = 1 MSS. As the RTT increases, the opening increases exponentially in both protocols
until the respective thresholds are reached, after which the increase returns to be linear.
Figure E5.5 Congestion window opening according to Exercise 5.21.
Utilizziamo i cookie per essere sicuri che tu possa avere la migliore esperienza sul nostro sito, leggi la nostra Privacy Policy per saperne di più. Accetta
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.