IP Addressing, DNS & Domain Names
IPv4 vs IPv6, the DNS hierarchy, and the rules that govern domain names.
Internet Protocol (IP)
An IP address identifies a device so data can be routed to it. There are two versions in use today.
| IPv4 | IPv6 | |
|---|---|---|
| Size | 32-bit | 128-bit |
| Format | Four 8-bit numbers separated by periods — 191.57.126.0 | Eight groups of four hex digits |
| Range | 0.0.0.0 to 255.255.255.255 | 340 undecillion addresses |
| Capacity | ~4.3 billion unique addresses (running out) | Effectively unlimited |
| Extras | Organisations get assigned IP blocks | Built-in security (IPsec), auto-configuration, supports IoT & 5G |
IPv6 adoption keeps growing: around 47% of Google traffic now travels over IPv6 (2025).
The Domain Name System (DNS)
The DNS is a hierarchical, distributed system that translates human-readable domain names (e.g. example.com) into numeric IP addresses (e.g. 192.0.2.1). It is the “phone book” of the Internet.
DNS hierarchy
- Root — represented by
.; the starting point for all DNS lookups. - Top-Level Domain (TLD) —
.com,.org,.net,.edu,.gov,.io,.ai,.app. - Second-Level Domain (SLD) —
example.com, registered by individuals or organisations. - Subdomain —
mail.example.com,blog.example.com,api.example.com.
DNS resolution in five steps
- User types a domain name.
- Resolver checks its cache.
- Root server is contacted.
- TLD server is contacted.
- IP address is returned.
Domain Naming Rules
| Rule | Detail |
|---|---|
| Max length | 255 characters for the full domain; 63 per label |
| Allowed characters | Letters A–Z, digits 0–9, hyphens (-) |
| No leading/trailing hyphen | Cannot begin or end with a hyphen |
| No spaces | Spaces are not permitted anywhere |
| Case insensitive | EXAMPLE.com = example.com = Example.COM |
| Label count | Typically 2–5 labels separated by periods |
| Trademark | Trademark owners get domain preference rights |
TLD categories
- Generic TLDs —
.com,.org,.net,.info,.biz - Sponsored TLDs —
.edu,.gov,.mil,.int,.aero - Country code (ccTLD) —
.my,.uk,.us,.jp,.de,.au - New generic TLDs —
.io,.ai,.app,.dev,.tech - Infrastructure TLD —
.arpa(internal DNS use only)