GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER NETWORKS

Order DNS, TCP and HTTP dependencies

3 questions solved the same way, newest first. Back to Computer Networks

How these are solved

For an uncached fresh HTTP-over-TCP request, resolve DNS before TCP SYN/connection establishment, then request the HTML before dependent images or response. Lists differ, so this is a method pattern rather than exact repeat.

1 mark · MCQ
Report issue

Order the first packets of web browsing

Application Protocols

Question 16, GATE 2024: A browser fetches an index page and its embedded images from one server over one TCP connection. DNS and browser caches start empty. Put these outgoing packets in chronological order: (i) GET index, (ii) DNS request, (iii) GET image, (iv) TCP SYN. A iv,ii,iii,i; B ii,iv,iii,i; C ii,iv,i,iii; D iv,ii,i,iii.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Approach: Identify what information or connection each operation needs before it can happen.
1. The browser begins with the server's name but, because the DNS cache is empty, must resolve that name to an IP address. The DNS request (ii) comes first.
2. Once the address is known, TCP connection establishment begins with the SYN packet (iv). HTTP requests use the established connection.
3. The browser requests the top-level index document (i). It must receive and parse that document to discover the embedded image references in this model.
4. It can then request an image object (iii), reusing the one TCP connection.
Answer: C, ii → iv → i → iii. DNS replies and the rest of the TCP handshake occur between these events, but are not among the four packets the question asks us to order.

Original paper, page 11 · Answer key

1 mark · MCQ
Report issue

Application Protocols

Question 25, GATE 2016: A just-restarted host’s browser requests a remote webpage. Choose the order among the listed packets: A HTTP GET,DNS query,TCP SYN; B DNS query,HTTP GET,TCP SYN; C DNS query,TCP SYN,HTTP GET; D TCP SYN,DNS query,HTTP GET.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

In the conventional uncached HTTP-over-TCP scenario, resolve the server name by DNS, initiate the TCP connection with SYN, then send HTTP GET after connection establishment. This order is C. Other bootstrap traffic such as DHCP/ARP and modern alternative transports are outside the listed sequence.

DNS provides the destination IP address required before the TCP SYN can be directed to that server. TCP’s handshake establishes the byte stream carrying the HTTP request. The question asks relative order of three named messages, not a complete packet trace: SYN-ACK, ACK and link-layer address resolution may occur between them.

Original paper, page 32 · Answer key

1 mark · MCQ
Report issue

Application Protocols

Question 25, GATE 2014: Order these actions for a conventional fresh browser/server interaction: 1 send an HTTP webpage request; 2 establish TCP; 3 server sends the webpage using HTTP; 4 resolve the domain via DNS. A: 4,2,1,3. B: 1,2,3,4. C: 4,1,2,3. D: 2,4,1,3.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

1. Method and setup. The browser first needs a destination IP address, then a transport connection, before it can send the application request. The server’s response depends on receiving that request. This is the dependency order for the listed HTTP-over-TCP setup, not a claim about cached or connection-reusing requests or HTTP/3.

2. Work through the result and its assumptions. For a fresh conventional HTTP-over-TCP fetch, resolve the server using DNS, establish TCP, send the HTTP request, then receive the HTTP response: 4, 2, 1, 3, A. Cached DNS or an existing connection can skip steps, but do not change their dependency order when all listed steps occur.

Original paper, page 13 · Answer key