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

/321 addressSingle host
/24256 addressesTypical small network
/1665,536 addressesLarge organization
/816.7 million addressesLegacy "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

Try looking up different IPs within the same organization to see how subnetting is used in practice:

See BGP routing data in real time

Open Looking Glass
More Articles
What is BGP? The Internet's Routing Protocol Explained
What is an Autonomous System (AS)?
What is a BGP Looking Glass?
How to Look Up an IP Address's BGP Route
Understanding BGP AS Paths
What is RPKI? Securing BGP Routing
What is DNS? The Internet's Phone Book
What is an IP Address?
IPv4 vs IPv6: What's the Difference?
What is a Network Prefix (CIDR)?
What is an Internet Exchange Point (IXP)?
What is Peering? How Networks Interconnect
How Does Traceroute Work?
What is a CDN? Content Delivery Networks Explained
What is DNS over HTTPS (DoH)?
What is a BGP Hijack?
What are TLDs? Top-Level Domains Explained
What is Anycast? One IP, Many Servers