Domain Name System (DNS) - Formula Sheet
Domain Name System (DNS) Reference Formulas
Although computer networking is primarily conceptual, calculating address allocations and understanding DNS constraints relies on several basic rules and equations.
IP Address Space Sizing
The address space represents the total number of unique digital addresses that can be generated using a given protocol. Sizing is governed by the following mathematical relation:
Formula: Total Addresses = 2n
Where n represents the total number of bits utilized by the networking protocol.
IPv4 Address Space Calculation
IPv4 protocols utilize a 32-bit structure to uniquely identify hosts on a network.
Formula: Total IPv4 Addresses = 232
Result: 4,294,967,296 unique logical addresses (approximately 4.3 billion addresses).
IPv6 Address Space Calculation
IPv6 protocols utilize a 128-bit structure to solve the address depletion issue of IPv4.
Formula: Total IPv6 Addresses = 2128
Result: Approximately 3.4 × 1038 unique logical addresses (a virtually inexhaustible supply).
DNS Node Label Constraints
Each node in the hierarchical tree-like structure of the Domain Name Space has an assigned name called a label. These are constrained by specific rules:
- Length Constraint: 1 ≤ Label Length ≤ 63 characters.
- Character Set: Consists only of alphanumeric characters (a-z, A-Z, 0-9) and hyphens.
- Hyphen Position: A hyphen cannot be used as the first character of any domain label.
- Special Symbols: Special characters (such as !, $, &, or underscores) are strictly prohibited.
Full Domain Name Length Constraints
A complete fully qualified domain name (FQDN) consists of a sequence of labels separated by dots, read from the leaf node up to the root.
Formula: Total Domain Name Length ≤ 253 characters.
Domain Name Space Levels
The naming hierarchy of DNS is organized as an inverted tree beginning with a root node on top.
Level Range: Level 0 to Level 127
Where Level 0 represents the root node (NULL string), and the maximum depth of the tree is 128 levels.