E8 TP Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione
Exercises o onsider the connection in the figure A =80 kbit/s τ =0 ms R =? τ =? B o o o Host A wants to know the capacity and propagation delay of link and to this purpose sends to host B two echo messages: M length l=000 [byte], and Mlength l=500 [byte]; for each of them it measures the Round-Trip-Time (RTT) equal to 780 [ms] and 30 [ms] respectively. In the replies, B uses the same message lengths. alculate and τ assuming header legths negligible.
Solution R A B =80 kbit/s τ =0 ms =? τ =? + + + = + + + = τ τ τ τ m m RTT m m RTT
Solution A =80 Kbit/s τ =0ms R =? τ =? B 780 30 = 8000 80 000 = 80 + 0 + 8000 + τ 000 + 0 + 6000 = 0 + + τ + τ = 30 + 4000 + τ
Solution A =80 kbit/s τ =0ms R =? τ =? B τ = 80 8000 80 τ = = = 4000 8000 50 80 = + 80 3 8000 3 kbit/s = 30 ms 8000 = 8000 + 560;
Exercises o onsider the network in the figure where links are biderectional and with the same rate in both directions A τ R τ 3 o Between A and B a TP connection is active and already with a stable rate. o Assume MSS=50 [byte] and RVWND small than WND and equal to 4 segments R 3 τ 3 B
Exercises o alculate the time necessary to transfer a sequence of 04 [kbit] coming form upper layer (from transmission of first segment to reception of the last AK). Assume n Length Header IP: HIP n Length Header TP: HTP n Length Header lower layers: HLL n No error n No interfering traffic n AK length negligible o Which is the value of the window that would allow a continuous transmission on link?
Solution o 04 [kbit] are equal to 3000 [byte] and to 5 segments of 50 [byte] (MSS) o Each packet on the link has a total length of n L=MSS+ HIP + HTP + HLL
Solution a) RTT = L + L L τ + + τ + + 3 τ 3 If L 4 RTT L Ttot = (5 / 4) RTT + (4 ) = 3RTT + 3 L
Solution a) Otherwise transmission is continuous: 5 5 Ttot = 5 L + RTT
Solution 3 b) The minimum value of the window that allows continuous transmission can be calculated forcing RTT to be smaller that the transmission time of the window: RTT w L w L L L L + τ + + + + τ τ 3 = 3 5 5
Exercises 3 o onsider the connection in the figure between two hosts A and B. A has to transfer a sequence of 00 segments of maximum length using TP. alculate the time necessary assuming: n MSS=000 [bit] n Header lengths at all layers negligible n onnection is open by A and the length of control packets for connection setup is negligible n AK length neglible n SSTHRESH equal to 5 MSS
Solution 3 o T=000 [bit] / [Mb/s] = [ms] o RTT = 6. [ms] + T = 7. [ms] o Transmission is discontinuous until WT < RTT, so until W=8 MSS MSS 4 MSS 5 MSS 6 MSS 7 MSS TX continuous T transfer = 6.[ms] + 6 RTT + 75 T + 6. [ms] Set up First 5 MSS Last 75 MSS =30.6 [ms] AK last MSS
Exercises 4 o At time 0 a TP connection between host A and l host B is activated. alculate the time when transmission on link becomes continuous assuming n Header lengths negligible n Bidirectional and symmetric links n RWND = 4000 [byte] and SSTHRESH = 400 [byte] n MSS = 00 [byte] n AK size = setup control packet size = 0 [byte] n onnection open by host A o How much time does it takes to transfer a file of [kbyte] (from connection setup to reception of last AK)? (Note that: byte = 8 bit, kbyte= 000 byte = 8000 bit) A =5 Kb/s τ =5ms R =50 Kb/s τ =5ms R 3 =00 Kb/s τ 3 =5ms B
Solution 4 o o o o We have: n T =00 x 8 [bit] / 5 [kbit/s] =64 ms, T =½ T =3 ms, T 3 = ½ T = 6 ms n RTT= T + T +T 3 + (τ +τ +τ 3 )+ (Tack + Tack + Tack3) = 3.ms n T setup = (Tack + Tack + Tack3) + (τ +τ +τ 3 ) =.4 ms Link is the bottleneck and transmission is continuous when: n WT > RTT so n W > RTT/ T =3,3 The time transmission becomes continuous is n T c = T setup + 3 RTT =.4 [ms] +649.6 [ms] = 75 [ms]
Solution 4 o File to transfer is [kbyte], equal to 0 MSS. o The time necessary is: n T c = T setup + 4 RTT + 3 T =.5 [s] ongestion avoidance 4 MSS
Exercises 5 o o o A TP connection is used to transfer a file of 39.5 [kbyte] using the following parameters: n MSS=500 [byte] n RTT = 500 [ms] n timeout T = *RTT. Assume the initial conditions are: n RWND = [kbyte] n SSTHRESH = 8 [kbyte] n WND = 500 [byte] Assume also that: n There is an error at time 3 [s] (all segments are lost) n At time 4,5 [s] receiver indicates RWND = [kbyte] a) Draw the evolution over time of: n WND n SSTHRESH n RWND b) alculate the time to transfer the file.
Solution 5 We have: o # segments = 39,5 [Kbyte] / 500 [byte] = 79 MSS o RWND = [Kbyte] / 500 [byte] = 4 MSS o SSTHRESH = 8 [Kbyte] / 500 [byte] = 6 MSS o Time Out = s
Solution 5 30 5 RWND TimeOut 0 SSTHRESH 6 7 8 MSS 5 0 5 0 8 4 WND 4 4 0 3 4 5 6 7 8 9 Secondi 4 4 4 4 4 o Transfer time T=8.5s
Exercises 6 o onsider the following connection A τ R τ B o A has to transfer an application message of M bytes to B using UDP a) Assuming the maximum length of UDP segments is m bytes (data only), and denoting with HLL, HIP, HUDP header length of lower layers, IP and UDP respectively, calculate the time necessary to transfer the message
Exercises 6 A τ R τ B b) As in a) but assuming on link is active a layer protocol with ARQ mechanism of stop-and-wait type (AK length negligible)
Solution 6 A τ R τ B o # of maximum length segments: M n = m o Length of last segment: l = M M m m
Solution 6 A τ R τ B a) Transfer time: if l + h m + h n m + h + l + h l + h + τ + +τ
Solution 6 A τ R τ B a) Transfer time: if l + h m + h n m + h m + h l + h + τ + + +τ
Solution 6 A τ R τ B b) Transfer time: m + h if m + h τ + m + h m + h + τ τ + l h + + n + + τ
Solution 6 A τ R τ B b) Transfer time: n if m + h m + h l + h + τ + m + h l + h + τ + +τ
Notations and Measure units o [byte] = 8 [bit] o [kbyte] = 000 [byte] = 8000 [bit] o [Mbyte] = 8 [Mbit] o [ms] = 0-3 [s] o [µs] = 0-6 [s] o [ns] = 0-9 [s]