What is a Subnet? IP Subnetting Explained
A subnet (short for subnetwork) is a logical subdivision of an IP network. Subnetting takes a block of IP addresses and divides it into smaller, more manageable pieces. This is fundamental to how networks are organized, how traffic is routed, and how the BGP routing table is structured.
How Subnetting Works
Every IP address has two parts: a network portion and a host portion. The prefix length (written in CIDR notation as /24, /16, etc.) defines where the boundary falls. A /24 network like 8.8.8.0/24 has 24 bits for the network and 8 bits for hosts — allowing 256 addresses (254 usable).
Subnetting means taking a larger block and splitting it. A /24 can be split into two /25s (128 addresses each), four /26s (64 each), and so on. Each split doubles the number of subnets while halving the addresses per subnet.
Common Subnet Sizes
| /32 | 1 address | Single host |
| /24 | 256 addresses | Typical small network |
| /16 | 65,536 addresses | Large organization |
| /8 | 16.7 million addresses | Legacy "Class A" block |
For IPv6, the standard subnet size is /64, giving each subnet 2^64 (18 quintillion) addresses — enough for every device imaginable.
Subnetting and BGP
In the global BGP routing table, each announced prefix is essentially a subnet that an autonomous system is advertising to the world. The routing table contains roughly one million prefixes — each one a subnet that some network has announced.
Networks can announce more specific subnets for traffic engineering. For example, an organization with a /16 might announce the whole /16 as well as individual /24s, routing different subnets through different upstream providers. You can see this by looking up IPs within the same organization and comparing their routes.
Why Subnetting Matters
- Security — subnets create boundaries for firewall rules and access control
- Performance — smaller broadcast domains reduce unnecessary traffic
- Organization — logical grouping of devices by function, location, or department
- Routing efficiency — aggregation of subnets into larger prefixes keeps the global routing table manageable
Try looking up different IPs within the same organization to see how subnetting is used in practice: