Computer networks: Which protocol commonly uses both TCP and UDP in different scenarios within the same suite?

Difficulty: Easy

Correct Answer: DNS

Explanation:


Introduction / Context:
Transport layer selection impacts reliability and overhead. Some application protocols are designed to operate over both TCP and UDP depending on the operation. Knowing which protocol flexibly uses both is essential for firewall rules, troubleshooting, and performance tuning.



Given Data / Assumptions:

  • Domain Name System (DNS) resolves names to IP addresses and supports multiple operation types.
  • TCP provides connection-oriented, reliable delivery; UDP is connectionless and lightweight.
  • Other listed protocols (FTP, SMTP, Telnet) are classically TCP-only.


Concept / Approach:
DNS typically uses UDP port 53 for standard queries and responses because messages are small and frequent. It uses TCP port 53 for zone transfers (AXFR/IXFR) and when responses exceed the UDP size limit or when DNSSEC data necessitates larger payloads. Thus, DNS is the canonical example of a protocol using both transports.



Step-by-Step Solution:

Identify typical DNS query path: client sends UDP/53 to a resolver; resolver replies via UDP/53.Consider large responses or truncation bit set: client retries using TCP/53.Zone transfers between authoritative servers: use TCP/53 by design.


Verification / Alternative check:
Packet captures of dig +tcp and zone transfers show TCP/53 connections; standard dig defaults show UDP/53. Documentation for DNS RFCs also specifies both transports.



Why Other Options Are Wrong:

  • FTP: control on TCP/21 and data on TCP (active/passive), but not UDP.
  • SMTP: TCP/25 (or 465/587), no UDP operation.
  • Telnet: TCP/23 only.
  • SNMP (extra option) mainly uses UDP/161; TCP is uncommon and not part of basic operations.


Common Pitfalls:
Blocking UDP/53 at firewalls and breaking resolution; assuming TCP is only for zone transfers—large EDNS0 responses can also switch to TCP.



Final Answer:
DNS

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion