- 2074 Asoj · 6+2 marks
Recursive/iterative query and DNS records
Short answer
Recursive query: local DNS server fully resolves the name, querying other servers itself. Iterative query: server returns referrals; the requester queries each referred server. DNS records include A (IPv4), AAAA (IPv6), NS (authoritative server), CNAME (alias), MX (mail server), PTR (reverse lookup), SOA (zone authority), and TXT (text). Root servers only accept iterative queries to reduce load.
What is recursive and iterative query? Explain with suitable diagram. Discuss the DNS records.
DNS translates domain names to IP addresses. A client's request for a name can be resolved in two ways.
Recursive query
The client asks its local DNS server and the server takes the complete responsibility of finding the answer. If it does not know the answer, it queries other servers itself and finally returns either the final answer or an error. The client sends one query and gets one reply.
Iterative query
The queried server returns the best answer it has: either the address, or a referral to another server that is closer to the answer. The querier then asks that next server itself. So the burden is on the requester.
Recursive (client -> local), iterative (local -> others)
Host Local DNS Root TLD(.com) Auth(abc.com)
|--1 www.abc.com->|
| |--2 query------->|
| |<--3 refer .com--|
| |--4 query------------>|
| |<--5 refer abc.com----|
| |--6 query------------------>|
| |<--7 IP 1.2.3.4-------------|
|<--8 IP 1.2.3.4--|
| Point | Recursive | Iterative |
|---|---|---|
| Work done by | Queried server | Querying client/server |
| Reply | Final answer or error | Answer or referral |
| Load on root servers | High (so root servers do not accept recursive queries) | Low |
DNS resource records
A record format is (Name, Value, Type, Class, TTL).
| Type | Meaning | Example |
|---|---|---|
| A | Host name to IPv4 address | www.abc.com -> 1.2.3.4 |
| AAAA | Host name to IPv6 address | www.abc.com -> 2001:db8::1 |
| NS | Authoritative name server of a domain | abc.com -> ns1.abc.com |
| CNAME | Alias to canonical name | ftp.abc.com -> www.abc.com |
| MX | Mail server of a domain (with priority) | abc.com -> mail.abc.com |
| PTR | IP address to name (reverse lookup) | 4.3.2.1.in-addr.arpa -> www.abc.com |
| SOA | Start of authority: zone serial, refresh, admin | - |
| TXT | Free text (SPF, verification) | - |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Recursion; iterative vs recursive choice · Data Structure and Algorithm, chapter 5
- ER diagram: product and components · Database Management System, chapter 2