iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

3.2 IPv4 / IPv6 Addressing

IPv4 has 4.3 billion addresses; IPv6 has 3.4 x 10^38. The book covers subnetting, NAT, CIDR, and the operational reality of dual-stack networks.

3.2 Network Addressing - IPv4 and IPv6

IPv4 vs IPv6

PropertyIPv4IPv6
Address size32 bits128 bits
Space~4.3 billion3.4 x 10^38
NotationFour dotted decimalsEight hex groups
NATCommonNot needed
Auto-configDHCPSLAAC + DHCPv6
Private ranges10/8, 172.16/12, 192.168/16ULA (fc00::/7)

CIDR notation - prefix to host count

PrefixUsable hosts (approx)Typical use
/302Point-to-point links
/2814Small DMZ
/24254Office floor / small VLAN
/221,022Branch
/1665,534Site
/816.7 millionEnterprise (private)

Worked example - planning a /28 for a branch

AddressUse
192.168.10.0Network
192.168.10.1Default gateway
192.168.10.2-1413 usable hosts
192.168.10.15Broadcast

Plenty for a small branch; insufficient if you add a guest VLAN.

Common pitfalls

PitfallConsequence
Allocating too smallRun out two years in
Overlapping private rangesVPNs break between sites
IPv6 firewall left openHosts exposed globally
Mentor’s tip: IPv4 + NAT + CIDR is the legacy daily reality; IPv6 + SLAAC is the future. Dual-stack everything. Plan address space for 3-5 years of growth and document the renumber path before you need it.

Discussion

Loading…