Quick Answer

An IP address is the fundamental routing token of the Internet Protocol. Classless Inter-Domain Routing (CIDR, RFC 4632) replaced rigid legacy address classes with variable-length prefix masks, enabling flexible subnetting and route aggregation in global BGP routing tables.

  • CIDR notation (/prefix) dictates how many leading bits represent the network prefix.
  • IPv6 standardizes local LAN segments on /64 prefixes, providing 18.4 quintillion host addresses.
  • BGP Anycast routes millions of clients to the closest edge server using the same IP.

Complete IPv4 CIDR Subnetting Reference Table

Calculations for netmasks, wildcard masks, total addresses, and usable host counts from /16 to /32.

RFC 4632 CIDR Calculation & Allocation Matrix
CIDR PrefixSubnet MaskTotal AddressesUsable HostsCommon Usage
/16255.255.0.065,53665,534Large enterprise campus / Cloud VPC
/20255.255.240.04,0964,094Regional data center allocation
/24255.255.255.0256254Standard local office LAN / Minimum BGP route
/26255.255.255.1926462Departmental subnet isolation
/28255.255.255.2401614Small server DMZ or public IP block
/30255.255.255.25242Point-to-point leased line WAN link
/32255.255.255.25511Single host loopback / Firewall route rule

Subnetting & Host Allocation Decision Tree


                 [ Subnet Calculation Objective ]
                                 |
                 +---------------+---------------+
                 |                               |
       [ IPv4 Subnetting ]               [ IPv6 Subnetting ]
                 |                               |
     2^(32 - CIDR) - 2 Hosts            Standard /64 LAN Prefix
                 |                               |
      +----------+----------+           18 Quintillion Host IDs
      |                     |                    |
[ /24: 254 Hosts ]   [ /30: 2 Hosts ]   SLAAC Autoconfiguration
Standard Office LAN  Point-to-Point WAN  Zero Broadcast Overhead

Frequently Asked Questions

How do you calculate usable host addresses in a CIDR subnet?

The total number of IP addresses in an IPv4 subnet is 2^(32 - prefix length). For standard local networks, 2 addresses are reserved: the network address (all host bits 0) and the broadcast address (all host bits 1). Therefore, usable hosts = 2^(32 - prefix) - 2. For example, a /24 subnet has 2^(32 - 24) - 2 = 256 - 2 = 254 usable host addresses.

What is BGP Anycast and why is it used by modern CDNs?

BGP Anycast assigns the exact same IP address (e.g. 1.1.1.1 or 8.8.8.8) to hundreds of distributed data centers across the globe. Border Gateway Protocol (BGP) routing automatically directs each user packet to the topologically nearest data center, minimizing physical fiber latency and naturally distributing massive DDoS floods across global capacity.

Why did IPv6 completely remove the broadcast address?

In IPv4, broadcast packets (such as ARP requests to 255.255.255.255) force every single network interface on the local switch to wake up and process the frame, wasting CPU cycles and battery. IPv6 replaced broadcast with targeted multicast groups (e.g. Solicited-Node Multicast with Neighbor Discovery Protocol RFC 4861), ensuring only interested devices inspect the packet.

36 Published Guides

IP Lookup & Network Registry Archive

In-depth tutorials covering address parsing, Regional Internet Registries, BGP prefix mappings, and high-volume client caching strategies.

Reading IP Records

(12 articles)
IPv4 and IPv6 Formatsinformational

How to Read an IPv4 Address: Octets, Classes, and Structure

IPv4 and IPv6 Formatsinformational

Understanding IPv6 Format: Hexadecimal Blocks and Shorthand Rules

IPv4 and IPv6 Formatsinformational

Identifying Public vs Private IP Ranges: Complete RFC Reference

IPv4 and IPv6 Formatsinformational

IPv4 to IPv6 Mapping: Dual-Stack Representations Explained

IPv4 and IPv6 Formatsinformational

Subnet Mask and Prefix Length Guide: From /8 to /32 Explained

IPv4 and IPv6 Formatsinformational

Decoding Special Purpose IP Addresses: Loopback, Multicast, and APIPA

Geolocation and Subnetsinformational

How IP Geolocation Databases Map Coordinates to Subnets

Geolocation and Subnetsinformational

Why Your IP Address Shows the Wrong City: Technical Explanation

Geolocation and Subnetsinformational

Understanding CIDR Blocks and Subnet Allocation in IP Lookups

Geolocation and Subnetscommercial

Comparing MaxMind, IPinfo, and DB-IP: Database Differences

Geolocation and Subnetsinformational

How Mobile Carriers (CGNAT) Allocate Dynamic Regional Subnets

Geolocation and Subnetsinformational

Identifying Datacenter vs Residential Subnets in Lookup Records

Network Registration

(12 articles)
WHOIS and RIR Registriesinformational

How to Read ARIN, RIPE, and APNIC WHOIS Records Accurately

WHOIS and RIR Registriesinformational

The Regional Internet Registry (RIR) Allocation Hierarchy Explained

WHOIS and RIR Registriesinformational

Understanding inetnum vs NetRange in Regional IP Registrations

WHOIS and RIR Registriesinformational

How to Check Historical IP Assignment and Ownership Transfers

WHOIS and RIR Registriesinformational

Finding Valid Abuse Points of Contact in WHOIS Databases

WHOIS and RIR Registriesinformational

WHOIS Privacy and GDPR Redactions: What Network Admins Still See

ASN and BGP Routinginformational

What Is an Autonomous System Number (ASN) and How BGP Uses It

ASN and BGP Routinginformational

How to Lookup ASN Announced Prefixes and Upstream Peering

ASN and BGP Routinginformational

Understanding BGP AS-Path and Route Propagation Across Continents

ASN and BGP Routinginformational

How Tier-1 Carriers Peer and Exchange Global Internet Traffic

ASN and BGP Routinginformational

Diagnosing BGP Hijacking and Route Leaks: Detection Guide

ASN and BGP Routinginformational

RPKI Validation: How Route Origin Authorization Prevents Spoofs

Reliable Lookups

(12 articles)
Edge Lookup Best Practicesinformational

Why Client-Side IP Lookups Require Dual-Stack Probing

Edge Lookup Best Practicesinformational

Bypassing Transparent HTTP Caches During Public IP Lookups

Edge Lookup Best Practicesinformational

Browser DNS and Socket Cache Impact on Real-Time IP Diagnostics

Edge Lookup Best Practicesinformational

Detecting Transparent ISP Proxies and Middleboxes with IP Tests

Edge Lookup Best Practicesinformational

How Anycast CDNs Alter Perceived Exit IPs and Client Origin

Edge Lookup Best Practicescommercial

Best Lightweight IP Lookup Tools Compared: Speed, Privacy, and Accuracy

API Automation and Rate Limitsinformational

Building a Reliable IP Lookup API Client in Node.js and Python

API Automation and Rate Limitsinformational

Handling IP API Rate Limits: Exponential Backoff and Fallbacks

API Automation and Rate Limitscommercial

Local GeoIP Database vs Live Cloud API: Cost and Latency Tradeoffs

API Automation and Rate Limitsinformational

Securing Self-Hosted IP Lookup Endpoints Against Scraper Abuse

API Automation and Rate Limitsinformational

Parsing ASN, City, and Network Org JSON Responses Reliably

API Automation and Rate Limitsinformational

Caching Strategies for High-Volume IP Lookups: Redis and TTLs

12 Published Guides

IP Geolocation & Routing Intelligence Archive

In-depth tutorials exploring accuracy radiuses, capital city routing biases, Anycast CDN proximity detection, and RFC 8805 correction protocols.

Data & Technical Sources

  • IETF RFC 4632 — Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan
  • IETF RFC 4861 — Neighbor Discovery for IP version 6 (IPv6)
  • IETF RFC 4786 — Operation of Anycast Services