Skip to main content
networking

Subnet

A subnet is a logical division of an IP network defined by a subnet mask (e.g., /24 = 255.255.255.0). Hosts within a subnet communicate directly via ARP without routing. Hosts in different subnets must send traffic through a router. Subnetting reduces broadcast domains and enables hierarchical IP allocation.

Definition

A subnet (subnetwork) divides an IP address space into smaller networks. The subnet mask determines which bits of an IP address identify the network vs. the host. In 192.168.1.0/24, the first 24 bits are the network (192.168.1) and the last 8 bits are host identifiers (0-255, with .0 reserved as network address and .255 as broadcast). Subnetting serves three purposes: reducing broadcast domain size (fewer devices receiving each broadcast), enabling security boundaries (firewall rules between subnets), and efficient IP allocation (giving a department /25 instead of wasting a /24). VLSM (Variable Length Subnet Masking) allows different subnets to have different sizes – a point-to-point link needs only /30 (2 hosts) while a server farm might use /23 (510 hosts). CIDR notation (/16, /24, /28) replaced classful addressing.

Examples

  • ipcalc 192.168.1.0/24 shows network, broadcast, and host range
  • ip route add 10.0.0.0/8 via 192.168.1.1 routes subnet via gateway
  • 192.168.1.0/28 provides 14 usable host addresses (.1 through .14)

Related Protocols

Related Terms