What is IP subnetting?+
IP subnetting is the practice of dividing a single IP network block into smaller sub-networks. It allows more efficient use of IP address space, better network segmentation for security and performance, and reduced broadcast domains. Each subnet has its own network address, broadcast address, and range of assignable host addresses, defined by the subnet mask or CIDR prefix length.
What is CIDR and how is it different from classful IP addressing?+
CIDR (Classless Inter-Domain Routing, RFC 1519, 1993) replaced the rigid classful system. In classful addressing, an IP’s first bits determined its class (A=/8, B=/16, C=/24) and default mask. CIDR allows any prefix length from /0 to /32, enabling Variable Length Subnet Masking (VLSM). This eliminated wasted space: a company needing 300 hosts formerly got an entire /16 (65,534 hosts); with CIDR they get a /23 (510 hosts).
How many hosts does each CIDR prefix support?+
Usable hosts = 2^(32−prefix) − 2. Key values: /30 = 2, /29 = 6, /28 = 14, /27 = 30, /26 = 62, /25 = 126, /24 = 254, /23 = 510, /22 = 1022, /21 = 2046, /20 = 4094, /16 = 65534, /8 = 16,777,214. Exception: /31 supports 2 hosts (no subtraction per RFC 3021) for point-to-point links. /32 is a single-host route.
What are the three private IP address ranges?+
RFC 1918 defines three private (non-routable on public internet) ranges: 10.0.0.0/8 (Class A: 16.7M addresses), 172.16.0.0/12 (Class B range: 1.05M addresses, 172.16.x.x to 172.31.x.x), and 192.168.0.0/16 (Class C range: 65,536 addresses). Home routers assign 192.168.x.x addresses. Enterprise networks typically use 10.x.x.x. NAT translates these to public IPs at the network boundary.
What is a subnet mask and how does it work?+
A subnet mask is a 32-bit number with consecutive 1s (network bits) followed by 0s (host bits). Applied via bitwise AND to an IP address, it extracts the network address. Example: 192.168.1.100 AND 255.255.255.0 = 192.168.1.0 (network). The 1s mark which bits of the IP address identify the network; the 0s mark which bits can vary to address individual hosts within that network.
What is a wildcard mask and where is it used?+
A wildcard mask is the bitwise inverse of a subnet mask: 0.0.0.255 is the wildcard for 255.255.255.0. In wildcard notation, 0 = must match, 1 = don’t care. Wildcard masks are used in Cisco IOS ACLs (access-list 1 permit 10.1.0.0 0.0.255.255 = match any IP in 10.1.x.x) and in OSPF area configurations. They give more flexibility than subnet masks for specifying arbitrary bit patterns.
What is the network address and why can't I assign it to a host?+
The network address is the first address in a subnet, with all host bits set to 0 (e.g., 192.168.1.0 in a /24). It identifies the subnet itself in routing tables: a router’s routing table says “send packets for 192.168.1.0/24 out interface X.” Assigning it to a host would confuse routers, as the host’s address would be indistinguishable from the network identifier. Similarly, the broadcast address (all host bits = 1) is reserved for subnet-wide broadcasts.
How do I split a network into equal subnets?+
To divide a network into N equal subnets, borrow ⌈log&sub2;(N)⌉ bits from the host portion (increase the prefix by that many bits). Example: split 10.0.0.0/24 into 4 subnets → borrow 2 bits → /26. The 4 subnets: 10.0.0.0/26 (hosts .1–.62), 10.0.0.64/26 (hosts .65–.126), 10.0.0.128/26 (hosts .129–.190), 10.0.0.192/26 (hosts .193–.254). Each has 62 usable hosts.
What is Variable Length Subnet Masking (VLSM)?+
VLSM allows different subnets within the same network to use different prefix lengths, allocating IP space efficiently. Example: a company has 10.1.0.0/16. Department A needs 200 hosts → assign 10.1.1.0/24. Department B needs 30 hosts → assign 10.1.2.0/27. A point-to-point WAN link needs 2 hosts → assign 10.1.3.0/30. Without VLSM (classful), all subnets would have the same size, wasting most addresses.
How does NAT relate to subnetting?+
NAT (Network Address Translation) allows multiple devices using private IP addresses (RFC 1918) to share a single public IP. A home router assigns private 192.168.1.x addresses to devices, then translates them to its single public IP when forwarding traffic to the internet. NAT extended the life of IPv4 by allowing millions of private subnets to operate behind small public IP allocations. IPv6 eliminates the need for NAT by providing ~3.4 × 10^38 addresses.