GATE / CS ARCHIVE

SUBJECT COLLECTION

Computer Networks · Application Protocols

14 questions, newest first

GATE CSE has asked 14 questions on Application Protocols (Computer Networks) from 2010 to 2026, in 14 of the 46 papers; the most recent is in GATE CSE 2026 Set 1. In the last five years it carried 0.6 marks per 100-mark paper on average, against 0.5 since 2003. Since 2014 the questions have been 8 MCQ, 2 MSQ and 2 NAT. 2 groups of questions here are solved the same way; “One per method” keeps the newest of each.

Browse topics
1 mark · MSQ
Report issue

HTTP/1.1 persistence and pipelining

Application Protocols

Question 19, GATE 2026: For ordinary direct browser-to-origin HTTP/1.1, evaluate: A several same-page objects on one server can use one TCP connection; B objects on different servers can use that same direct TCP connection; C another request may be sent before the prior object finishes downloading; D several pages on one server may share a TCP connection.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, C, D

Givens and goal

For ordinary direct browser-to-origin HTTP/1.1, evaluate: A several same-page objects on one server can use one TCP connection; B objects on different servers can use that same direct TCP connection; C another request may be sent before the prior object finishes downloading; D several pages on one server may share a TCP connection.

Approach

Separate persistent connections from pipelining and from changing the remote TCP endpoint.

Step-by-step solution

1. A persistent connection can carry successive request/response exchanges with its server. Its lifetime is not limited to one embedded object, nor to one HTML page. Hence A and D are supported.
2. Pipelining permits a client to send another request before the preceding response has finished arriving. Responses still arrive in request order; pipelining is not arbitrary interleaving of response bodies. Thus C is supported.
3. A direct TCP connection has a fixed remote endpoint. It cannot become a direct connection to another server merely because the next resource belongs to the same webpage. Under the question's ordinary browser-to-origin-server interpretation, B is false.

Standards cross-check: [RFC 9112, section 9.3](https://httpwg.org/specs/rfc9112.html#persistent.connections) describes persistent connections and section 9.3.2 describes pipelining. Protocol support does not imply that every browser currently enables pipelining.

Interpretation caveat: A connection to a forward proxy can carry requests for multiple origins. Therefore the explanation rejects B for direct browser-to-server connections, not as an absolute statement about every HTTP deployment. This caveat does not change the published key.

Worked connection example: a browser can request /index.html, /style.css and /logo.png from the same origin through one persistent TCP connection. With pipelining it may send the later requests before the first response body is complete, although HTTP/1.1 preserves response order. It can later request /about.html on that still-open connection too. This explains A, C and D without assuming that pipelining provides HTTP/2-style multiplexing.

Original paper, page 15 · Answer key

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

2 marks · MSQ
Report issue

Application Protocols

Question 52, GATE 2023: A browser and all DNS servers have empty caches. Resolving a hostname requires iterative queries through three DNS tiers, each costing RTT. Fetching its small HTML reveals ten small same-server objects; all transmission/rendering times are negligible and web-server RTT is identical. Which totals are correct? A 7 RTT for nonpersistent HTTP with five parallel connections; B 5 RTT for persistent pipelining; C 9 RTT for nonpersistent/five parallel; D 6 RTT for persistent/pipelining.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: C, D

The three uncached DNS tiers require three sequential round trips. Fetching the base HTML adds one TCP-handshake RTT and one request/response RTT. With non-persistent HTTP and five parallel connections, the ten objects take two batches, each needing two RTTs, so the total is 3+2+4=9 RTTs (C). With a persistent connection and pipelining, all ten object requests share one further RTT after parsing the HTML, giving 3+2+1=6 RTTs (D). This is the stipulated negligible-transmission, classic HTTP-over-TCP model; no extra TLS handshake is included.

Teaching detail. Write a dependency timeline: DNS root, DNS next tier, DNS authoritative lookup, TCP connection for HTML, then HTML request/response. This consumes five RTTs before the browser learns the object URLs. Parallel nonpersistent transfers then require two waves of five, each with a connection RTT and a response RTT. Persistent pipelining reuses the HTML connection and places all ten requests in flight together, requiring just one further RTT. The objects cannot be requested before their references are learned; disregarding that dependency undercounts the total.

Original paper, page 55 · Answer key

1 mark · NAT
Report issue

Application Protocols

Question 35, GATE 2022: An uncached DNS resolver iteratively resolves www.gate.org.in. Under the intended separate-delegation model for each domain level, how many query-response pairs are required? Distinguish this convention from what the domain name alone guarantees.
Tap to enlarge
Answer & solution

Official answer: 4

Our answer: 4 under one delegation per named level

In the intended uncached iterative resolution, query the root, then the in server, then org.in, then gate.org.in for the www record. That is four query-response pairs. This counts the resolver’s outbound iterative exchanges, not a separate stub-to-resolver request. Four assumes a separate delegation at every shown domain level and no additional aliases; domain labels alone do not guarantee actual zone boundaries.

The logical exchange sequence is resolver→root (referral to .in), →.in (referral to org.in), →org.in (referral to gate.org.in), →gate.org.in (www address). Each request together with its response counts as one pair, not two. Real deployments can combine labels into one zone, so this is the examination hierarchy assumption.

Original paper, page 23 · Answer key

1 mark · NAT
Report issue

Application Protocols

Question 25, GATE 2020: An empty-cache browser fetches a page with text and five very small separately referenced images using nonpersistent HTTP. What is the minimum number of TCP connections needed to display it completely?
Tap to enlarge
Answer & solution

Official answer: 6

Worked explanation

First retrieve the HTML/text document. Its references reveal five image resources, each of which must then be requested because the cache starts empty. Nonpersistent HTTP closes a connection after one request/response object, so the six objects require six connections. Concurrently opening image connections may reduce elapsed time but cannot reduce the count. “Very small” changes transmission duration, not HTTP’s connection-reuse rule. Persistent HTTP would permit reuse, but the question expressly excludes it.

Derivation and answer

Nonpersistent HTTP uses a separate TCP connection for each retrieved object. There is one HTML/text object and five image objects, so six connections. This uses the standard interpretation of separate externally referenced images, not inline data embedded in the HTML.

Original paper, page 9 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Protocols for sending and retrieving email

Application Protocols

Question 16, GATE 2019: Choose the protocol pair for sending and then retrieving email, in that order: A IMAP and POP3; B SMTP and POP3; C SMTP and MIME; D IMAP and SMTP.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Method: assign each named standard its actual role, keeping the requested order.

1. SMTP, Simple Mail Transfer Protocol, handles mail submission and transfer between mail servers. It supplies the sending role.
2. POP3, Post Office Protocol version 3, lets a client retrieve messages from a mailbox server. It supplies the retrieval role, so SMTP followed by POP3 works.
3. IMAP also supports mailbox access and retrieval, but is not the sending protocol in A or D. MIME describes message content formats, encodings, and attachments; it is not a mailbox-retrieval protocol, so C fails in its second position.

Result: B, SMTP and POP3. This does not mean POP3 is the only way to read email; an SMTP/IMAP pair would also be valid if it were offered in the correct order.

Original paper, page 6 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Application Protocols

Question 25, GATE 2016: Which are stateful application-layer protocols? i:HTTP; ii:FTP; iii:TCP; iv:POP 3. A: i,ii only. B: ii,iii only. C: ii,iv only. D: iv only.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

FTP maintains control-session state and POP 3 proceeds through authorization, transaction and update states. HTTP is conventionally stateless at the protocol level despite application cookies, while TCP is stateful but belongs to the transport layer. Therefore FTP and POP 3, C.

Apply both filters in the question: stateful, and application-layer. TCP satisfies the first but fails the second because it is a transport protocol. HTTP's request semantics do not require retained server session context; a website's cookies or login sessions are application mechanisms layered on HTTP. FTP keeps connection, authentication and transfer-mode context, while POP 3 has protocol states with different permitted commands. Only ii and iv satisfy both filters.

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
Not in GATE 2027 syllabusReport issue

Application Protocols

Question 27, GATE 2015: Which pair of protocols can both use multiple TCP connections between the same client and server? A HTTP,FTP; B HTTP,TELNET; C FTP,SMTP; D HTTP,SMTP.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Traditional web clients may fetch multiple resources using parallel HTTP TCP connections. FTP separates its control conversation from data transfer, so its ordinary operation uses multiple connections. This explains A under the exam's application-session model. Merely counting arbitrary concurrent sessions is a different interpretation, since multiple independent TELNET or SMTP sessions between two hosts are also possible.

Solution: HTTP may use parallel TCP connections for a page’s resources, and FTP uses separate control and data TCP connections. Thus both HTTP and FTP, A, under the intended application-session comparison. This does not prohibit multiple simultaneous SMTP sessions or transport connections between the same pair of machines.

Original paper, page 11 · Answer key

1 mark · MCQ
Report issue

Application Protocols

Question 35, GATE 2015: Which cookie claim is NOT correct? A a cookie is executable code capable of compromising user security; B cookies arrive via HTTP headers; C a cookie has expiry date/time; D cookies can track browsing at a site.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

A cookie is stored data, not executable code, so A is false. Servers set cookies through HTTP headers and they can support tracking. Persistent cookies have expiration metadata; session cookies can instead omit an explicit expiration and expire with the session, qualifying the blanket wording of C.

A cookie is an HTTP state value stored and resent by the user agent, not a script executed as a program. It can still carry sensitive identifiers or enable tracking, so “not code” does not imply “no privacy/security risk.” Set-Cookie is an HTTP response header, and subsequent Cookie headers return applicable values. The expiry statement needs a distinction: persistent cookies have an expiry/max-age, whereas session cookies may omit that field. The intended false definition is A, but C is not universal as literally worded.

Original paper, page 37 · 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

2 marks · MCQ
Report issue

Application Protocols

Question 28, GATE 2014: A graphical browser at client Q loads an uncached static HTML page from HTTP server S. The page contains exactly one separate static embedded image, also on S. Which is correct for loading both? A At least two HTTP requests, necessarily on separate TCP connections. B At least two HTTP requests, but one TCP connection suffices. C One HTTP request suffices, and one TCP connection is necessary. D One HTTP request suffices without a TCP connection.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. Set up the reasoning. The document and separately referenced image are two resources. A browser first obtains HTML and then requests the image URL, but a persistent HTTP connection can carry multiple requests.

2. Derive the result. The HTML document and its separate image require two HTTP requests when neither is cached. HTTP persistent connections can carry both requests on one TCP connection. Thus B under the conventional separate-resource HTTP-over-TCP model.

3. Check the interpretation. Do not equate request count with connection count. The intended conventional HTTP-over-TCP setting permits connection reuse, so one connection is sufficient even though one request is not.

Original paper, page 36 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Email application protocols

Application Protocols

Question 4, GATE 2011: Match email activities to application protocols: m1 sends email from a mail client to a mail server; m2 downloads email from a mailbox server to a mail client; m3 checks email using a web browser.

(A) m1 HTTP; m2 SMTP; m3 POP
(B) m1 SMTP; m2 FTP; m3 HTTP
(C) m1 SMTP; m2 POP; m3 HTTP
(D) m1 POP; m2 SMTP; m3 IMAP
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Mail submission uses SMTP; downloading from a mailbox in the listed mapping uses POP; browser-based access uses HTTP. Therefore C. IMAP is another mail-access protocol, but it is not the correct mapping of the supplied alternatives.

Follow the direction and interface of each operation rather than treating all email traffic as one protocol. SMTP transfers outgoing messages to the mail infrastructure. POP retrieves stored mailbox messages. In webmail, the browser communicates with a web server over HTTP, even though that server may use other mail protocols behind the scenes. In B, FTP is a file-transfer protocol, not the specified mailbox retrieval protocol; A and D reverse the submission/retrieval roles.

Original paper, page 2 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Ping versus client-server applications

Application Protocols

Question 16, GATE 2010: Which is not a client–server application in the conventional networking classification?
Options: (A) Internet chat; (B) Web browsing; (C) E-mail; (D) Ping.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Ping uses ICMP echo requests and replies handled by the network protocol stack, rather than a conventional application-layer client talking to an application server. Web browsing, ordinary email and server-based Internet chat use client-server application models. Thus D is the intended classification; request–reply alone does not make a utility an application-layer client-server service.

The relevant distinction is the protocol layer and service model, not merely whether one machine sends and another responds. A web server, mail server or chat server implements an application service. Ping normally asks the remote IP/ICMP stack to generate an echo reply, without a separately running user-level application server.

Original paper, page 4