Question
A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user's computer in some order.
(i) HTTP GET request for the index page
(ii) DNS request to resolve the web server's name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web server
Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2024 answer key
Solution
Trace the network steps from domain resolution to TCP connection establishment, fetching the base HTML page, and fetching embedded objects.
With all caches initially empty, the browser must perform the following steps in sequence:
- (ii) DNS request: Resolve the server's hostname into its IP address.
- (iv) TCP SYN: Initiate the 3-way TCP handshake to the server's IP address.
- (i) HTTP GET request for the index page: Fetch the top-level HTML document over the established TCP connection.
- (iii) HTTP GET request for an image object: After receiving and parsing the index HTML page to discover the URLs of embedded images, send HTTP GET requests for those images.
Thus the chronological order is (ii), (iv), (i), (iii).
Option (C)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2024 Computer Science and Information Technology - Set 1 (CS1)
- Question
- 16 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.