/0 vs /2 — Subnet Comparison

A /0 subnet is larger than a /2. Every additional bit in the prefix halves the address space — the 2-bit difference between these two means /0 has 22 = 4 times as many addresses.

/0

The entire IPv4 internet

Full reference →
Total IPs 4,294,967,296
Usable Hosts 4,294,967,294
Subnet Mask 0.0.0.0
Wildcard Mask 255.255.255.255

Typical Uses

  • Default route / route of last resort
  • Firewall "allow all" or "deny all" rule
  • BGP full routing table advertisement
Total IPs 1,073,741,824
Usable Hosts 1,073,741,822
Subnet Mask 192.0.0.0
Wildcard Mask 63.255.255.255

Key Differences

more IPs in /0 than /2
4
/2 subnets fit inside one /0
2
bits of difference in prefix length

How 4 /2 Subnets Divide a /0

Example using 10.0.0.0/0 as the parent block.

# CIDR Network First Usable Last Usable Broadcast Hosts
1 0.0.0.0/2 0.0.0.0 0.0.0.1 63.255.255.254 63.255.255.255 1,073,741,822
2 64.0.0.0/2 64.0.0.0 64.0.0.1 127.255.255.254 127.255.255.255 1,073,741,822
3 128.0.0.0/2 128.0.0.0 128.0.0.1 191.255.255.254 191.255.255.255 1,073,741,822
4 192.0.0.0/2 192.0.0.0 192.0.0.1 255.255.255.254 255.255.255.255 1,073,741,822

FAQ

What is the difference between /0 and /2?

A /0 has 4,294,967,294 usable hosts and a /2 has 1,073,741,822. The subnet masks differ: /0 uses 0.0.0.0 while /2 uses 192.0.0.0. Every additional bit in the prefix halves the number of addresses — so the 2-bit gap means /0 is exactly 4× larger.

How many /2 subnets fit in a /0?

Exactly 4 /2 subnets fit perfectly inside one /0 with no wasted space. To split a /0 into /2s, just increment the last 2 bits of the network address for each new subnet.

Which should I choose?

Choose based on how many hosts you need. Use the hosts → prefix calculator on the homepage to find the right size for your requirements.