GATE | GATE-CS-2004 | Question 90

Consider three IP networks A, B and C. Host HA in network A sends messages each containing 180 bytes of application data to a host HC in network C. The TCP layer prefixes a 20 byte header to the message. This passes through an intermediate net­work B. The maximum packet size, including 20 byte IP header, in each network is
A : 1000 bytes
B : 100 bytes
C : 1000 bytes
The network A and B are connected through a 1 Mbps link, while B and C are connected by a 512 Kbps link (bps = bits per second).
GATECS2004Q56

Assuming that the packets are correctly delivered, how many bytes, including headers, are delivered to the IP layer at the destination for one application message, in the best case ? Consider only data packets.
(A) 200
(B) 220
(C) 240
(D) 260


Answer: (D)

Explanation: Network B receives 220 bytes of data (180 bytes of application layer data + 20 bytes of TCP header + 20 bytes of IP header) from network A. As maximum packet size of network B is 100 bytes (data of 80 bytes + 20 bytes IP header), for network B, out of 220 Bytes, 200 bytes would be of data or payload (180 bytes of application layer data + 20 bytes of TCP header) and 20 bytes of IP header. Network B now removes the 20 bytes header. Out of 200 bytes of data, it uses 80 bytes of data. Thus 1st packet leaving B would be of 100 bytes (Data: 80 bytes, IP header: 20 bytes). Now we have 120 bytes of data remaining. Thus the 2nd packet leaving B would be of 100 bytes (Data: 80 bytes, IP header: 20 bytes). Now we have 40 bytes of data remaining. Thus the 3rd packet leaving B would be of 60 bytes (Data: 40 bytes, IP header: 20 bytes).

Hence, total of 100 + 100 + 60 bytes = 260 bytes would be received by the destination.

Thanks to Sohil Ladhani for providing this explanation.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.