A subnet is a logical subdivision of an IP network. Subnetting divides a large network into smaller segments that improve performance, security, and traffic management. Each subnet has its own network address, broadcast address, and usable host range.
CIDR notation combines an IP address with its prefix length — for example, 192.168.1.0/24. The number after the slash indicates network bits. The remaining bits define host addresses within that subnet.
A subnet mask identifies the network and host portions of an IP address. The wildcard mask is the inverse and is used in access control lists and routing configurations.
IPv4 uses 32-bit addresses (~4.3 billion). IPv6 uses 128-bit addresses providing effectively unlimited address space. IPv6 is written in hexadecimal groups separated by colons. Subnetting concepts apply to both protocols.