Test2: Solutions Silvia Giordano ICA, EPFL t2-1
EX1: GBN &Delay Consider the Go-Back-N protocol with a sender S, whose window size is 6. Assume that the medium does not reorder messages and that S has an infinite number of packets to send, which tries to send as soon as possible. The round-trip time (RTT) is the time it takes for a packet to travel from sender to receiver and then back to the sender, from the first bit to the last. Answer the following questions: t2-2
RTT Ex1: GBN & Delay 1) Given the roundtriptime RTT and the transmission time of one packet d trans (the transmission time of one ACK is also d trans ), express the propagation delay d prop in terms of RTT and d trans RTT is the time it takes for a packet to travel from sender S to receiver and then back to S, from the first bit to the last. Considering that the transmission time of one ACK is also d trans, we have d prop = (RTT - 2d trans )/2 S d trans pkt R ACK d tprop t2-3
Ex1: GBN & Delay 2) Suppose that at time t, the next in-order message propagating back (i.e. sent by the receiver R) to S has an ACK field of k. What is the last packet received by R and what is the last packet sent by S at time t? The next in-order message propagating back to S has an ACK field of k. Thus, packet with sequence number k is still in the window. It is the first in the best case (all packets before k have been successfully acknowledged), and it is the last in the worst case (the ACKs for all packets before k are not yet arrived). Given that the window has size 6 the highest sequence number of a packet in the window is k+5. Therefore, the last packet sent by S at time t is a packet with sequence number [k, k+5] t2-4
Ex1: GBN & Delay 3) What are all the possible sets of sequence numbers inside the sender s window at time t? The window can contain an in order sequence of 6 packets with sequence number starting with y, y [k, k+5] S ACKk-6 pkt(k-5) pkt(k-4) pkt(k-3) pkt(k-2) pkt(k-1) pkt(k) ACKk pkt(k+1) R S ACKk-1 pkt(k+4) ACKk pkt(k+5) R t2-5
Ex1: GBN & Delay 4) Suppose that at time t 2, the sender receives a message with an ACK field of x, and that all acknowledgements for packets with sequence numbers [0, x-1] have been successfully received. When can S send the packet with sequence number x+4 at earliest? t2-6
Ex1: GBN & Delay In the best case, all packets [x+1, x+5] have been already sent. Thus, the packet with sequence number x+4 has been already sent. The answer depends on the value of the RTT: if RTT < 6 d prop or RTT > 6 d prop Thus: t min(t 2-2 d prop,t 2 - RTT+ 4 d prop ) S pkt(x) R S ACKx pkt(x) R RTT t 2 pkt(x+1) ACKx pkt(x+2) pkt(x+3) pkt(x+4) pkt(x+5) RTT pkt(x+1) pkt(x+2) pkt(x+3) pkt(x+4) pkt(x+5) t 2 t2-7
Ex1: GBN & Delay 5) When can S send the packet with sequence number x+6 at earliest? Again, the answer depends on the value of the RTT: if RTT < 6 d prop or RTT > 6 d prop Thus: min(t 2 + 2 d prop,t 2 + RTT+ d prop ) t2-8
EX2: Slowstart Consider a network with RTT of 100 msec. 1) What is the highest transmission rate (in Mbps) at which the TCP sender could keep the pipe full, assuming no segments are dropped? (Hint: the advertised window field in the TCP header is 16 bits.) We seek T transmission rate such that: 0.1 sec x T Mbps (2 16-1) bytes x 8 bits/byte Thus : T Mbps [(2 16-1) x 8] / (0.1 x 10 6 ) = 5.243 Mbps t2-9
EX2: Slowstart 2) Consider the TCP Reno protocol with slow start on the sender side, with initial threshold equal to 20 packets. At time t 0 =0 the sender sends out the first segment; say: S1. How many RTTs will it take before it sends out the tenth segment (S10) for the first time? RTT sent out segments 0 S1 1 S2,S3 2 S4,S5,S6,S7 Therefore, it will take 3 RTTs 3 S8, S9, S10,.. t2-10
EX2: Slowstart 3) In the previous case: How many RTTs will it take before it sends out the tenth segment (S10) for the first time, assuming segment S6 and S9 are each dropped once? RTT sent out segments 0 S1 1 S2,S3 2 S4, S5, [S6], S7 3 S6 4 S8, [S9] 5 S9 6 S10, S11 ([x] means that segment x is dropped) Thus, it will take 6 RTTs t2-11
EX2: Slowstart 4) What it would be the answer to points 2) and 3) if TCP Tahoe were used, with initial threshold equal to 20 packets? RTT sent out segments 0 S1 1 S2,S3 2 S4,S5,S6,S7 3 S8, S9, S10,.. Therefore, it will still take 3 RTTs t2-12
EX2: Slowstart RTT sent out segments 0 S1 1 S2,S3 2 S4, S5, [S6], S7 3 S6, S8 4 S8, [S9], S10 5 S9, S11 Therefore, it will take 4 RTTs t2-13
EX3: IP and LANs Consider the network N in the diagram1. This is part of the autonomous system myas. MyAS has the 2 classes C of addresses 128.111.110.0 and 128.111.111.0. LAN 2 LAN 1 G H K A D B R1 R2 E LAN 3 C F t2-14
EX3: IP and LANs 1) Give the CIDR of myas. Define the subnetting and assign IP addresses to all of the nodes (hosts/routers) in N. CIDR of N: 128.111.111.0/23. 3 LANs with different subnetting: LAN1=(A, B, C, R1) and LAN2=(R2, G, H, K), and LAN3=(R2, D, E, F) There is also an additional subnet for the connection between R1 and R2 t2-15
EX3: IP and LANs For example: 128.111.110.130 LAN 1 128.111.110.0/25 A 128.111.110.2 B 128.111.110.3 R1 LAN 2 128.111.110.128/25 G H K 128.111.110.131 128.111.110.129 128.111.110.1 128.111.111.1 R2 128.111.111.3 128.111.110.132 128.111.111.2 E D LAN 3 128.111.111.0/25 C 128.111.110.4 128.111.111.4 F t2-16
EX3: IP and LANs 2) Define the routing table at nodes A and K. Table at A: Table at K: Dest. Network Next router # hops 128.111.110.0-1 128.111.110.128 128.111.110.1 2 128.111.111.0 128.111.110.1 2 Dest. Network Next router # hops 128.111.110.128-1 128.111.110.0 128.111.110.129 2 128.111.111.0 128.111.110.129 2 t2-17
EX3: IP and LANs 3) If A sends a broadcast message, which interfaces receive it, and which is the format of the IP segment and the format of the MAC datagram at one of these interfaces? B,C, R1 on LAN1. The format is: source MAC A IP A destination FF:FF:FF:FF:FF:FF IPbroadcast-on-LAN1 t2-18
EX3: IP and LANs 4) Suppose R2 is a bridge. How the addresses of LAN2 and LAN3 would change? LAN2 and LAN3 become the same LAN with the same subnet (for example: 128.111.111.0). All hosts on the new LAN will have the same network and subnetwork prefix. R2, as bridge, will have no more IP address and R1 will have an address on the new LAN (for example: 128.111.111.1). t2-19
EX3: IP and LANs 5) In the last case, if D sends a broadcast message now, which interfaces receive it? E, F, G, H, K, R1 on the new LAN. The format is: source MAC D IP D destination FF:FF:FF:FF:FF:FF IPbroadcast-on-new-LAN t2-20