2081 2

CSC263 ยท 2081 ยท 10 marks

What are the features of the application layer? Why is DNS required? Explain about recursive, non-recursive, and iterative DNS queries.

What are the features of the application layer? Why is DNS required? Explain about recursive, non-recursive, and iterative DNS queries.[10]

Computer NetworksChapter 6: Application LayerDNS and the Query Types

Quick answer

The Application Layer is Layer 7 of the OSI model (also called the Desktop Layer). It is implemented by network applications that produce data to be transferred over the network. It serves as a window for application services to access the network and display received information to the user.

Application Layer: Features, DNS, and Query Types


1. Features of the Application Layer

Key Features / Functions:

FeatureDescription
File TransferAllows users to access, retrieve, and manage files on a remote computer (e.g., FTP)
Mail ServicesProvides the basis for email forwarding and storage facilities (e.g., SMTP, POP3)
Directory ServicesProvides database source access for global information about various services
Network Virtual TerminalAllows a user to log on to a remote host and work as if connected locally
User InterfaceResponsible for node-to-node communication and controls user-interface specifications
Access to Network ResourcesEnables browsers, messengers, Skype, and other applications to communicate over the network
Protocol SupportSupports protocols such as HTTP, HTTPS, SSH, DNS, FTP, SMTP, etc.

2. Why is DNS Required?

DNS (Domain Name System) is a hierarchical, distributed naming system used on the Internet.

The Core Problem:

  • Computers communicate using IP addresses (e.g., 142.250.190.46)
  • Humans find it easy to remember domain names (e.g., www.google.com)
  • There is a need for a system that translates domain names into IP addresses automatically

Reasons DNS is Required:

  1. Human Readability: It is nearly impossible for users to memorize numeric IP addresses for every website. DNS maps easy-to-remember names to IP addresses.

  2. Scalability: The Internet has billions of devices. A single centralized host file (like the old HOSTS.TXT) cannot scale. DNS uses a distributed hierarchical database to handle this.

  3. Dynamic IP Management: IP addresses of servers can change. DNS allows the domain name to remain constant even if the underlying IP address changes.

  4. Load Distribution: DNS can map one domain name to multiple IP addresses, enabling load balancing across servers.

  5. Service Location: DNS supports different record types (MX, CNAME, etc.) to locate mail servers, aliases, and other services.

In short: DNS acts as the "phone book" of the Internet, making it usable and accessible for humans.


3. Types of DNS Queries

When a client needs to resolve a domain name, the DNS system uses three types of queries:


3.1 Recursive DNS Query

Client --> Local DNS Resolver --> Root DNS --> TLD DNS --> Authoritative DNS
         <--(final answer)------<-----------<-----------<------------------
  • In a recursive query, the client asks the DNS resolver to do all the work and return the final answer.
  • The DNS resolver (usually the ISP's DNS server) takes full responsibility for resolving the query.
  • It contacts other DNS servers on behalf of the client and returns the complete resolved IP address or an error.
  • The client only makes one request and waits for the complete answer.

Steps:

  1. Client sends query to Local DNS Resolver: "What is the IP of www.example.com?"
  2. Local Resolver queries Root DNS Server
  3. Root DNS refers to TLD (.com) DNS Server
  4. TLD DNS refers to Authoritative DNS Server
  5. Authoritative DNS returns the IP address
  6. Local Resolver returns the final IP back to the client

Advantage: Simple for the client
Disadvantage: Heavy load on the DNS resolver


3.2 Non-Recursive (Iterative) DNS Query

Note: In many textbooks, "non-recursive" and "iterative" are used interchangeably. They describe the same process where the resolver is directed step-by-step.

Client --> Local DNS Resolver
           |
           +--> Root DNS Server  --> "Ask TLD Server at X.X.X.X"
           |
           +--> TLD DNS Server   --> "Ask Authoritative Server at Y.Y.Y.Y"
           |
           +--> Authoritative DNS Server --> "IP is Z.Z.Z.Z"
           |
Client <-- Final Answer
  • In an iterative (non-recursive) query, the DNS server does not do the full resolution itself.
  • Instead, it returns the best answer it currently has -- which may be a referral (address of another DNS server that might know the answer).
  • The resolver itself is responsible for following up with each referred server.
  • The process continues until the authoritative answer is found.

Steps:

  1. Client asks Local Resolver: "What is the IP of www.example.com?"
  2. Local Resolver asks Root DNS: Root says "I don't know, but ask the TLD server at 192.5.6.30"
  3. Local Resolver asks TLD DNS: TLD says "I don't know, but ask the Authoritative server at 205.251.196.1"
  4. Local Resolver asks Authoritative DNS: Returns "IP = 93.184.216.34"
  5. Local Resolver returns the IP to the client

Advantage: Distributes the load across multiple DNS servers
Disadvantage: More round trips required


3.3 Summary Comparison Table

FeatureRecursive QueryIterative (Non-Recursive) Query
Who does the work?DNS Resolver does all the workResolver follows referrals step by step
Response to clientFinal IP address (complete answer)Referral or final answer at each step
Load on resolverHighDistributed
Number of client requestsOneOne (but resolver makes multiple)
Typical useClient to Local ResolverLocal Resolver to other DNS servers
Error handlingReturns error if not foundReturns "not found" at each step

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.