The GATE Grind

GATE 2024 CS (CS1) – Question 16

Computer Networks · Application Layer: DNS and HTTP · 1 mark · Multiple choice

A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage. The webpage consists of a top-level index page with multiple embedded image objects. Assume all caches are 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 is the CORRECT chronological order?

  1. (iv), (ii), (iii), (i)
  2. (ii), (iv), (iii), (i)
  3. (ii), (iv), (i), (iii)
  4. (iv), (ii), (i), (iii)

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) (ii), (iv), (i), (iii)

Explanation

DNS resolves the IP first, then TCP SYN opens the connection, then GET for the index page, and only after parsing it are image GETs sent. Order: ii, iv, i, iii.