FTP, DNS & Telnet MCQs: 12 Solved Questions with Explanations

Solve 12 application-layer MCQs on DNS lookups, FTP connections and Telnet. Each answer explains the tested concept and rejects the distractors.

KnowledgeGate Team

Exam prep & CS education

Updated 26 Jul 20269 min read

FTP, DNS and Telnet MCQs look like lists of protocol names and ports, but the real problem is keeping three models separate. DNS follows a hierarchy, FTP separates control from data, and Telnet gives remote terminal access without modern transport security. GATE, IBPS, MPPSC and Beltron papers keep returning to the same four asks: which component starts a lookup, which order the servers answer in, which connection carries the file, and which line a Telnet password is set on. The wider syllabus sits under GATE Computer Science preparation, while solved Application Layer MCQs covers the HTTP, SMTP and POP3 half of the same layer. Choose an option before reading its explanation.

1. FTP, DNS and Telnet: one concept map for all three protocols

Protocol

Main job

Transport detail tested here

Common trap

DNS

Maps names and addresses

Ordinary queries commonly use UDP 53, but DNS supports TCP

Saying DNS always uses UDP

FTP

Transfers files

TCP control and separate data connections

Treating active-mode port 20 as universal

Telnet

Provides remote terminal access

TCP port 23

Calling the session encrypted

Do not confuse application function with transport behaviour. HTTP is treated as stateless at the application layer, while FTP and POP3 retain session state. TCP is stateful but belongs to the transport layer.

Read api.study.example.com. right to left: root ., TLD com, second-level domain example, delegated subdomain study, then host api. Reverse DNS instead reverses IPv4 octets under in-addr.arpa.

2. DNS roles and hierarchy: Questions 1-3

Question 1: MPPSC 2025

DNS is designed as a client-server application. A host, that needs to map an address to a name or a name to an address, calls a DNS client known as

A. Resolver

B. Query

C. Pointer

D. Root server

Answer: A. Resolver

The resolver is the host-side client component that starts the lookup. A query is the message the resolver sends, not the client itself. A pointer, usually a PTR record, helps with reverse name mapping. A root server belongs to the distributed DNS server hierarchy and directs lookups towards the appropriate top-level domain. It is not the client running on the requesting host.

Question 2: Beltron Programmer 2025

Which component of the DNS name space represents the highest level of hierarchy?

A. Second-level domain (e.g., "example" in "example.com")

B. Subdomain (e.g., "mail" in "mail.example.com")

C. Root domain (".")

D. Top-level domain (TLD, e.g., ".com")

Answer: C. Root domain (".")

In api.study.example.com., the final dot represents the root and therefore the highest level. The TLD com is one level below it. The second-level label example sits below com, while study, like mail in the option, is a lower delegated subdomain. The hierarchy is easiest to see when the normally omitted final root dot is written explicitly.

Question 3: IBPS 2025

Which sequence does a DNS resolver follow to translate a domain name into its corresponding IP address?

A. Root server -> TLD server -> authoritative server -> returns IP address

B. TLD server -> root server -> authoritative server -> returns IP address

C. Authoritative server -> TLD server -> root server -> returns IP address

D. TLD server -> authoritative server -> root server -> returns IP address

E. None of the above

Answer: A. Root server -> TLD server -> authoritative server -> returns IP address

With nothing useful in cache, the resolver first asks a root server where to find the relevant TLD. The TLD server then refers it to the domain's authoritative server, which returns the requested address record. The other sequences reverse or scramble that hierarchy. Caching can shorten an actual lookup, but it does not change the root, TLD and authoritative order represented here.

3. DNS reverse lookup, request order and transport: Questions 4-6

Question 4: GATE 2005

Assume that "host1.mydomain.dom" has an IP address of 145.128.16.8. Which of the following options would be most appropriate as a subsequence of steps in performing the reverse lookup of 145.128.16.8? In the following options "NS" is an abbreviation of "nameserver".

A. Query a NS for the root domain and then NS for the "dom" domains

B. Directly query a NS for "dom" and then a NS for "mydomain.dom" domains

C. Query a NS for in-addr.arpa and then a NS for 128.145.in-addr.arpa domains

D. Directly query a NS for 145.in-addr.arpa and then a NS for 128.145.in-addr.arpa domains

Answer: C. Query a NS for in-addr.arpa and then a NS for 128.145.in-addr.arpa domains

Reverse the octets: 145.128.16.8 becomes 8.16.128.145, so the complete name is 8.16.128.145.in-addr.arpa. Forward zones dom and mydomain.dom cannot supply this PTR path. Option C starts at in-addr.arpa and later reaches 128.145.in-addr.arpa. The question asks for a subsequence, so omitted intermediate delegations do not invalidate it.

Reverse lookup of 145.128.16.8: the octets reverse into the PTR name 8.16.128.145.in-addr.arpa, with its delegation path below.

Question 5: GATE 2016

Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.

A. HTTP GET request, DNS query, TCP SYN

B. DNS query, HTTP GET request, TCP SYN

C. DNS query, TCP SYN, HTTP GET request

D. TCP SYN, DNS query, HTTP GET request

Answer: C. DNS query, TCP SYN, HTTP GET request

The restarted host first resolves the server name with DNS, then starts a TCP connection with SYN, and only then sends HTTP GET over that connection. A cached address could remove the visible DNS step, but “just been restarted” is the question's no-useful-cache cue. The other options violate these dependencies.

Question 6: GATE 2007

Which one of the following uses UDP as the transport protocol?

A. HTTP

B. Telnet

C. DNS

D. SMTP

Answer: C. DNS

Ordinary DNS queries use UDP port 53, which makes C correct. DNS switches to TCP for zone transfers and for answers too large for one UDP datagram, so it is not UDP-only. HTTP, Telnet and SMTP normally use TCP's reliable byte stream. If application and transport layers still blur together, practise the solved TCP and UDP MCQs.

4. FTP control, data and transfer modes: Questions 7-8

Trace one active-mode FTP session. The client 192.0.2.10 opens the control connection TCP 49152 -> 198.51.100.20:21. After the client advertises data port 50000, the server opens 198.51.100.20:20 -> 192.0.2.10:50000 for the data connection. Passive mode instead negotiates a server-side data port and has the client initiate that connection.

Question 7: Beltron Programmer 2025

Which of the following statements best reflects how File Transfer Protocol (FTP) functions at the Application Layer in a network system?

A. FTP is mainly utilized for streaming audio and video between devices.

B. FTP establishes separate connections for commands and data to facilitate file transfer.

C. FTP secures files during transmission using UDP and built-in encryption.

D. FTP is primarily used to send emails with file attachments.

Answer: B. FTP establishes separate connections for commands and data to facilitate file transfer.

The trace has a long-lived TCP control channel to port 21 and a separate TCP data channel. FTP is neither the streaming nor email protocol described. It does not use UDP, and basic FTP has no built-in encryption. Server port 20 applies to the active-mode data connection shown, not every FTP mode.

FTP active mode: a persistent control connection from client port 49152 to server port 21 carrying USER, PASS, PORT and RETR, a separate data connection from server port 20 to client port 50000 for one file, and a footnote that passive mode has the client initiate the negotiated data connection.

Question 8: IBPS 2024

Which FTP transfer mode reduces data size during transmission to improve bandwidth efficiency?

A. Stream Mode

B. Compression Mode

C. Encapsulation Mode

D. Multiplexing Mode

E. Fragmentation Mode

Answer: B. Compression Mode

FTP's three transfer modes are stream, block and compressed, and only compressed mode shrinks what goes on the wire. It applies run-length encoding, so a repeated run like AAAAABBBCC travels as the counts (5,A)(3,B)(2,C), three runs instead of ten separate bytes. How much that saves depends entirely on how repetitive the file is, which is why compressed mode helps with logs and sparse data and does almost nothing for an already-compressed archive. Encapsulation, multiplexing and fragmentation are not FTP transfer modes at all.

5. FTP command recognition and protocol state: Questions 9-10

Question 9: GATE 2005

Consider the three commands : PROMPT, HEAD and RCPT. Which of the following options indicate a correct association of these commands with protocols where these are used?

A. HTTP, SMTP, FTP

B. FTP, HTTP, SMTP

C. HTTP, FTP, SMTP

D. SMTP, HTTP, FTP

Answer: B. FTP, HTTP, SMTP

Match each token. PROMPT is commonly an FTP client command that toggles interactive prompting for multiple transfers, not an FTP wire command. HEAD is an HTTP request method. RCPT, usually RCPT TO, identifies an SMTP recipient. Every other option mismatches at least one command.

Question 10: GATE 2016

Which of the following is/are example(s) of stateful application layer protocols? (i) HTTP (ii) FTP (iii) TCP (iv) POP3

A. (i) and (ii) only

B. (ii) and (iii) only

C. (ii) and (iv) only

D. (iv) only

Answer: C. (ii) and (iv) only

HTTP is treated as stateless. FTP keeps authentication, working-directory and transfer context. TCP is stateful but belongs to transport, so it fails the application-layer condition. POP3 has a stateful mailbox session. Only FTP and POP3 satisfy both conditions.

6. Telnet purpose and remote-line configuration: Questions 11-12

Telnet is the classic answer for remote terminal access, but it carries the whole session, including the password, as clear text. SSH is the encrypted replacement, so any option that pairs Telnet with security is wrong.

Question 11

Which protocol is used to login remotely and which secure alternative has replaced Telnet for remote login?

A. FTP, HTTPS

B. Telnet, SSH

C. SMTP, SNMP

D. Bootp, RARP

Answer: B. Telnet, SSH

Telnet is the protocol that opens the interactive remote login, and SSH is its encrypted replacement, so option B is the only pair that fits both halves of the question. FTP moves files and HTTPS secures web traffic, and neither gives you a shell on the remote host. SMTP and SNMP handle mail delivery and network management, while Bootp and RARP only help a host learn its own address at start-up. Telnet still answers the plain remote-login question, never the secure one.

Question 12: Accenture 2023

Which of the following commands will allow you to set your Telnet password on a Cisco router?

A. line telnet 0 4

B. line aux 0 4

C. line vty 0 4

D. line con 0

Answer: C. line vty 0 4

VTY lines are remote virtual terminals, so line vty 0 4 is the selector that opens those lines for password configuration. line con 0 selects the console, line aux 0 4 concerns auxiliary access, and line telnet 0 4 is not a selector any Cisco IOS release accepts. On a live router you would configure SSH on those same VTY lines rather than a Telnet password.

7. Answer strip, trap log and next practice step

Answer strip: 1-A, 2-C, 3-A, 4-C, 5-C, 6-C, 7-B, 8-B, 9-B, 10-C, 11-B, 12-C.

Score yourself out of 12:

  • 10-12: Review only the reasoning behind your misses.

  • 7-9: Redraw the DNS and FTP diagrams, then retry after one day.

  • 0-6: Rebuild the concept table before taking another timed set.

Log every miss under one of five traps: client versus message or record, forward versus reverse DNS, application versus transport, FTP control versus data, or Telnet function versus security. Write one correction, then retry without the key.

For connected concept learning, continue with GATE Guidance by Sanchit Sir. When you are ready to practise under timed conditions, use the GATE Test Series, review each error, and return to the relevant concept before the next set.