Domain Name System (DNS) - Study Notes
Chapter Summary
The Domain Name System (DNS) serves as the directory for the Internet, mapping human-friendly alphabetical domain names to numerical IP addresses that computers use to identify each other on a network. By acting as a distributed database, DNS eliminates the need for users to memorize complex strings of numbers, allowing seamless access to global web resources. This chapter explores IP addressing structures (IPv4 and IPv6), URL components, the hierarchical structure of the Domain Name Space, and the step-by-step mechanism of DNS resolution.
Learning Objectives
- Explain the underlying need for a domain name system to facilitate standard web browsing.
- Distinguish between IPv4 (32-bit) and IPv6 (128-bit) addressing architectures, including their notations.
- Deconstruct a Uniform Resource Locator (URL) into its primary components.
- Differentiate between absolute and relative URLs and understand when each is used.
- Identify the key components of DNS: Name Space, Name Server, Zone, and Resolver.
- Describe the iterative and recursive workflow of resolving a domain name into an IP address.
Key Concepts and Definitions
- IP Address: A unique, logical numerical identifier assigned to every computer and device operating within a network.
- IPv4 Address: A 32-bit logical address represented either in binary format or dotted-decimal format (consisting of four octets, each between 0 and 255).
- IPv6 Address: A 128-bit logical address introduced to prevent IP exhaustion, divided into eight 16-bit blocks and represented as 4-digit hexadecimal numbers separated by colons.
- URL (Uniform Resource Locator): The unique address of a file or resource on the Internet, consisting of the protocol, hostname, folder directories, and filename.
- Domain Name Space: A hierarchical naming structure shaped like an inverted tree, ranging from a null root (Level 0) down to a maximum of 128 levels.
- Label: A case-insensitive string of up to 63 characters representing a single node in the DNS hierarchy tree.
- Zone: A contiguous domain structure (including sub-domains) controlled by a single administrative server holding a zone database file.
- Resolver: A program situated on a host machine that initiates the process of translating a symbolic domain name into a target IP address.
Worked Methods
Converting Binary IPv4 to Dotted-Decimal Notation
To convert a 32-bit binary IPv4 address into dotted-decimal format, perform the following steps:
- Divide the 32 bits into four groups of 8 bits (octets). For example, the binary address:
10000000 10001111 10001001 10010000. - Convert each binary octet to its base-10 decimal value:
10000000= 27 = 12810001111= 128 + 8 + 4 + 2 + 1 = 14310001001= 128 + 8 + 1 = 13710001000= 128 + 16 = 144
- Join the four decimal numbers using dots as separators to get:
128.143.137.144.
Tracing the Path of a DNS Lookup Query
When a student enters a domain name like www.tnscert.org into their browser, the following lookup sequence occurs:
- The local computer first searches its internal cache memory. If found, the IP is retrieved instantly.
- If absent, the computer sends a query to the Resolver (typically provided by the Internet Service Provider).
- If the Resolver cannot answer from its own cache, it queries the Root Name Server.
- The Root Name Server reads the Top-Level Domain (TLD) suffix (e.g.,
.org) and redirects the Resolver to the appropriate TLD server. - The TLD server directs the Resolver to the Authoritative Name Server responsible for
tnscert.org. - The Authoritative Server fetches the IP address from its zone file and returns it to the Resolver.
- The Resolver delivers the IP address back to the browser and caches it for future use. The browser then establishes an HTTP connection with the target web server.
Common Exam Traps
- Bit Sizing Confusion: Students frequently mix up the bit allocations of IP versions. Always verify that IPv4 is specified as 32-bit and IPv6 is specified as 128-bit. Do not mix them up.
- Dotted-Decimal vs. Hexadecimal: Dotted-decimal notation is used strictly for IPv4 (separated by dots). IPv6 uses colon-separated hexadecimal notation.
- Missing Suffix in Absolute URLs: An absolute URL is complete and must contain the protocol (like
http://orhttps://) and the host domain. A relative URL is only a partial path and is relative to the current server directory. - Case Sensitivity Misconception: While web content directories and file names can be case-sensitive depending on the server OS, domain names themselves are entirely case-insensitive.
Exam Tips
- Memorize the maximum label character limit of 63 and the overall domain name limit of 253 characters.
- When asked to differentiate a Zone from a Domain, explain that a Domain represents a sub-tree in the DNS tree structure, whereas a Zone is an administrative boundary that contains contiguous domains and sub-domains managed via a single zone database file.
- Practice drawing the tree structure of the Domain Name Space, highlighting Level 0 (Root), Top-Level Domains (TLD), and second-level sub-domains.