Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14
Chapter 1

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.

IPv4IPv6
Size32-bit128-bit
FormatFour 8-bit numbers separated by periods — 191.57.126.0Eight groups of four hex digits
Range0.0.0.0 to 255.255.255.255340 undecillion addresses
Capacity~4.3 billion unique addresses (running out)Effectively unlimited
ExtrasOrganisations get assigned IP blocksBuilt-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

  1. User types a domain name.
  2. Resolver checks its cache.
  3. Root server is contacted.
  4. TLD server is contacted.
  5. IP address is returned.

Domain Naming Rules

RuleDetail
Max length255 characters for the full domain; 63 per label
Allowed charactersLetters A–Z, digits 0–9, hyphens (-)
No leading/trailing hyphenCannot begin or end with a hyphen
No spacesSpaces are not permitted anywhere
Case insensitiveEXAMPLE.com = example.com = Example.COM
Label countTypically 2–5 labels separated by periods
TrademarkTrademark 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)