Skip to main content

GATE CSE 2024Computer Networks › Application Layer & Network ProtocolsVerified

GATE CSE 2024 PYQ: A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to…

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.

  1. HTTP GET request for the index page
  2. DNS request to resolve the web server's name to its IP address
  3. HTTP GET request for an image object
  4. 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?

  1. A
    (iv), (ii), (iii), (i)\text{(iv), (ii), (iii), (i)}
  2. B
    (ii), (iv), (iii), (i)\text{(ii), (iv), (iii), (i)}
  3. C
    (ii), (iv), (i), (iii)\text{(ii), (iv), (i), (iii)}
    Correct answer
  4. D
    (iv), (ii), (i), (iii)\text{(iv), (ii), (i), (iii)}

Answer

(C) (ii), (iv), (i), (iii) \text{(ii), (iv), (i), (iii)} (ii), (iv), (i), (iii)

Approach

Think about what information the browser needs at each moment before it can emit the next packet. The browser only has the host's name, not its IP address, so name resolution must come first; a TCP connection can only be opened to a known IP, so the SYN follows DNS; only after the connection is established can HTTP requests be sent; and the GET for an embedded image can only be issued after the browser has received and parsed the index page HTML.

The four packets have strict data dependencies: IP unknown -> DNS; IP known -> TCP SYN; connection open -> HTTP GET index; index HTML parsed -> HTTP GET image. This forces the sequence (ii), (iv), (i), (iii), matching option C, which all three community answers independently endorse.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.