IP Addressing
IPv4 structure and subnetting basics
- IPv4 is 32-bit (e.g.,
192.168.1.10).
- A subnet splits bits into network + host using CIDR (e.g.,
/24).
- Hosts in the same subnet can communicate directly (via L2); otherwise they use a router/default gateway.
IPv6 overview
- IPv6 is 128-bit (e.g.,
2001:db8::1), designed for huge address space.
- Common features: simplified header, no NAT requirement in principle, SLAAC, better multicast.
Public vs private IPs
- Public IP: globally routable on the Internet.
- Private IP: not Internet-routable; typically RFC1918 ranges in IPv4:
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
- Private networks reach the Internet via NAT/proxies.
Static vs dynamic IPs
- Static: stable assignment (manual/reserved); good for servers, allowlists.
- Dynamic: assigned by DHCP/ISP; may change; common for clients.
CIDR notation (/24, /16, etc.)
- CIDR
/N means N network bits.
- Example:
/24 has 8 host bits → 256 addresses (minus reserved/broadcast in many IPv4 contexts).
- CIDR enables route aggregation (smaller routing tables) and flexible subnet sizing.