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]
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:
| Feature | Description |
|---|---|
| File Transfer | Allows users to access, retrieve, and manage files on a remote computer (e.g., FTP) |
| Mail Services | Provides the basis for email forwarding and storage facilities (e.g., SMTP, POP3) |
| Directory Services | Provides database source access for global information about various services |
| Network Virtual Terminal | Allows a user to log on to a remote host and work as if connected locally |
| User Interface | Responsible for node-to-node communication and controls user-interface specifications |
| Access to Network Resources | Enables browsers, messengers, Skype, and other applications to communicate over the network |
| Protocol Support | Supports 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:
-
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.
-
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. -
Dynamic IP Management: IP addresses of servers can change. DNS allows the domain name to remain constant even if the underlying IP address changes.
-
Load Distribution: DNS can map one domain name to multiple IP addresses, enabling load balancing across servers.
-
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:
- Client sends query to Local DNS Resolver: "What is the IP of www.example.com?"
- Local Resolver queries Root DNS Server
- Root DNS refers to TLD (
.com) DNS Server - TLD DNS refers to Authoritative DNS Server
- Authoritative DNS returns the IP address
- 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:
- Client asks Local Resolver: "What is the IP of www.example.com?"
- Local Resolver asks Root DNS: Root says "I don't know, but ask the TLD server at 192.5.6.30"
- Local Resolver asks TLD DNS: TLD says "I don't know, but ask the Authoritative server at 205.251.196.1"
- Local Resolver asks Authoritative DNS: Returns "IP = 93.184.216.34"
- 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
| Feature | Recursive Query | Iterative (Non-Recursive) Query |
|---|---|---|
| Who does the work? | DNS Resolver does all the work | Resolver follows referrals step by step |
| Response to client | Final IP address (complete answer) | Referral or final answer at each step |
| Load on resolver | High | Distributed |
| Number of client requests | One | One (but resolver makes multiple) |
| Typical use | Client to Local Resolver | Local Resolver to other DNS servers |
| Error handling | Returns error if not found | Returns "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.