DNS and HTTP
GATE CS90 min read
Application-layer protocols
Definition. An application-layer protocol defines message syntax, meaning, and exchange rules used by network applications. It typically runs over a transport protocol and relies on lower layers for addressing and delivery. Application protocols may be text-based or binary. Example. HTTP specifies request and response messages for web resources. Exam point. DNS and HTTP are application protocols even though they use transport and network services.
Client-server and peer-to-peer models
Definition. In client-server architecture, servers provide services at known endpoints and clients initiate requests. Peer-to-peer systems allow nodes to both request and provide resources. Real applications can combine both patterns. Example. A browser acts as HTTP client; a web server listens for requests. Exam point. A server process can handle many concurrent clients through distinct transport connections.
DNS purpose and hierarchy
Definition. The Domain Name System maps names to records such as IP addresses and supports a distributed hierarchical namespace. Resolvers query root, top-level-domain, and authoritative servers as needed. Caching reduces repeated query traffic and latency.
Example. A lookup for www.example.test may descend from root to the .test zone and then to its authoritative server.
Exam point. A DNS resolver is not necessarily the authoritative source for a name.
DNS hierarchy and zones
Definition. The DNS name tree is divided into zones, each administered by an authority. A zone may contain records for a domain and delegate subdomains to other name servers. Root and top-level domains guide referrals rather than storing every host record.
Example. The example.test zone can delegate lab.example.test to a separate authoritative service.
Exam point. A domain and a zone are related but not identical concepts.
DNS record types
Definition. DNS resource records associate a name and type with data and a TTL. A records map names to IPv4 addresses; AAAA records map to IPv6; NS records identify name servers; CNAME records alias names; MX records identify mail exchangers. Record semantics depend on type.
Example. web.example.test A 192.0.2.5 maps a hostname to an IPv4 address.
Exam point. A CNAME target name is not itself an IP address record.
| Type | Common meaning |
|---|---|
| A | IPv4 address |
| AAAA | IPv6 address |
| NS | authoritative name server |
| CNAME | canonical-name alias |
| MX | mail exchanger and preference |
| PTR | reverse mapping name |
| TXT | text data used for many policies |
Recursive and iterative DNS queries
Definition. In a recursive query, the contacted server is asked to return a final answer or failure, often by doing work on the client’s behalf. In an iterative query, a server can return a referral to another server, and the resolver continues. Stub resolvers commonly ask a recursive resolver to do iterative work. Example. A local resolver asks a root server iteratively, receives a TLD referral, then asks the TLD server. Exam point. Recursive describes the service requested; iterative describes referral-based progression.
DNS caching and TTL
Definition. A DNS response may be cached for its TTL, reducing query load and lookup latency. A cached answer can remain stale until expiration or invalidation. TTL is a maximum cache duration supplied with the record, not a guarantee that the answer remains correct for the full interval. Example. A 300-second TTL lets a resolver reuse the answer for up to five minutes under normal caching behavior. Exam point. A low TTL improves update responsiveness but increases query traffic.
DNS lookup trace
Definition. A stub resolver sends a query to a recursive resolver. If the answer is uncached, the recursive resolver follows referrals, obtains the requested record, caches relevant data, and returns an answer. DNS commonly uses UDP for ordinary queries, but TCP is also used in cases such as large responses and zone transfer.
Example. Find the A record for store.example.test from an empty cache.
Exam point. Root servers usually return referrals; they do not recursively search the entire namespace for every client.
You have read the free 28% of this note
Sign in with Google to keep reading. It is free, takes one tap, and you also get:
- 6 practice questions from this note
- Every note in full, plus the PDF library
- Official past papers as timed tests, with explanations
- An AI tutor for doubts, in Hindi or English
- Your progress, mistakes and study plan saved on every device