Reference notes.

IP addresses uniquely identify devices on a network. Understanding addressing and subnetting is fundamental to network design and troubleshooting.

IPv4 Addressing

32-bit addresses written in dotted decimal notation: 192.168.1.1

Private Address Ranges (RFC 1918)

CIDR replaced classful addressing in 1993, though RFC 1918 originally carved these private ranges from legacy classful blocks:

Legacy Classful ScopeRangeCIDRUsable Hosts
1 Class A block10.0.0.0 - 10.255.255.25510.0.0.0/816,777,214
16 contiguous Class B blocks172.16.0.0 - 172.31.255.255172.16.0.0/121,048,574
256 contiguous Class C blocks192.168.0.0 - 192.168.255.255192.168.0.0/1665,534

Special Addresses

  • 100.64.0.0/10 - Carrier-Grade NAT / Shared Address Space (RFC 6598; used by ISPs and overlay VPNs such as Tailscale)
  • 127.0.0.0/8 - Loopback (localhost)
  • 169.254.0.0/16 - Link-local (APIPA, when DHCP fails)
  • 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 - Documentation and examples (RFC 5737)
  • 224.0.0.0/4 - Multicast
  • 0.0.0.0 - Default route / “any address”
  • 255.255.255.255 - Limited broadcast

CIDR Notation

Classless Inter-Domain Routing (introduced in 1993) replaced classful addressing. The /n suffix indicates the number of network bits.

CIDRSubnet MaskUsable Hosts
/32255.255.255.2551 (host route)
/31255.255.255.2542 (point-to-point, RFC 3021)
/24255.255.255.0254
/16255.255.0.065,534
/8255.0.0.016,777,214

Quick mental maths: (subtracting the network and broadcast addresses), with two exceptions: /31 provides 2 usable hosts for point-to-point links (RFC 3021, no network/broadcast address), and /32 represents 1 host route.

Subnetting

Dividing a network into smaller segments for:

  • Security isolation
  • Reduced broadcast domains
  • Efficient IP allocation

Subnetting Example

Given 192.168.1.0/24, create 4 subnets:

  • Need 2 additional bits ( subnets)
  • New prefix: /26 (24 + 2)
  • Each subnet: 64 addresses (62 usable)
SubnetNetworkUsable RangeBroadcast
1192.168.1.0/26.1 - .62.63
2192.168.1.64/26.65 - .126.127
3192.168.1.128/26.129 - .190.191
4192.168.1.192/26.193 - .254.255

IPv6 Addressing

128-bit addresses written in hexadecimal: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Shorthand rules:

  • Leading zeros can be omitted: 2001:db8:85a3:0:0:8a2e:370:7334
  • One group of consecutive zeros can be replaced with ::: 2001:db8:85a3::8a2e:370:7334

Common IPv6 Ranges

  • ::/128 - Unspecified address (analogous to 0.0.0.0)
  • ::1/128 - Loopback
  • fe80::/10 - Link-local
  • fc00::/7 - Unique Local Addresses (ULA, like private IPv4); fd00::/8 is used for locally generated ULAs while fc00::/8 remains reserved
  • 2001:db8::/32 - Documentation and examples (RFC 3849)
  • 2000::/3 - Global unicast (public)
  • ff00::/8 - Multicast (IPv6 has no broadcast)

NAT (Network Address Translation)

Translates private IPs to public IPs at the network boundary.

  • SNAT (Source NAT) - Rewrites the source IP on outbound traffic (can be 1:1, many-to-many, or many-to-one)
  • DNAT (Destination NAT) - Rewrites the destination IP/port on inbound traffic (port forwarding)
  • PAT / NAPT (Port Address Translation / Network Address Port Translation) - Specifically many-to-one SNAT where multiple hosts share one public IP by translating source ports (also called masquerading)

NAT breaks end-to-end connectivity but conserves IPv4 addresses. IPv6 was designed to eliminate the need for NAT.

See Also

  • ARP — Resolves IPv4 addresses to MAC addresses on a local segment
  • DHCP — Distributes IPv4 addresses and IPv6 DHCPv6 configuration
  • Routing — How packets reach addresses outside the local subnet
  • VLANs — Subnetting often aligns with VLAN boundaries

References