What Is IPv4?
IPv4 (Internet Protocol version 4) is the 32-bit network layer protocol defined in RFC 791 (September 1981) that assigns a unique numerical address to every device on an IP network. Written in dotted-decimal notation — four octets ranging from 0 to 255, separated by periods — an IPv4 address identifies both the host device and the network it belongs to, enabling routers to forward data packets between them. IPv4 supports approximately 4.29 billion unique addresses (2³²). IANA confirmed global address pool exhaustion on 3 February 2011, driving the widespread adoption of NAT and the transition to IPv6.
How IPv4 Addressing Works
IPv4 defines an address as a 32-bit binary number, which allows for exactly 2³² —
4,294,967,296 — unique combinations. To make these addresses human-readable, the 32 bits
are divided into four groups of 8 bits each, called octets. Each octet is expressed as a
decimal number between 0 and 255, and the four octets are separated by periods. This
format — dotted-decimal notation — produces addresses such as 93.184.216.34
or 203.0.113.45.
Every IPv4 address serves two functions simultaneously. The network portion identifies
which network a device belongs to; the host portion identifies the specific device within
that network. The boundary between the two is determined by a subnet mask — a second 32-bit
number applied through a bitwise AND operation. A subnet mask of 255.255.255.0 (written as
/24 in CIDR notation) places the network identifier in the first 24 bits and
reserves the remaining 8 bits for host identification, supporting up to 254 usable host
addresses on that segment (256 minus the network address and broadcast address).
IPv4 is a connectionless, best-effort delivery protocol as defined in RFC 791. It does not guarantee that packets will arrive, arrive in order, or arrive without duplication. Reliability, ordering, and flow control are handled by higher-layer protocols — most commonly TCP, which operates above IPv4 in the TCP/IP stack. This separation allows IPv4 to remain lightweight and fast, responsible only for addressing and routing.
Network and Host Portions
Routers use the network portion of a destination address to select a forwarding path. When a packet arrives, the router performs a longest-prefix match against its routing table — a list of known network prefixes paired with next-hop addresses or outbound interfaces. The packet is forwarded one hop closer to the destination network; the final-hop router then uses the host portion to deliver it to the specific device. This routing mechanism has remained fundamentally unchanged since RFC 791 was published in 1981.
CIDR Notation and the End of Classful Addressing
IPv4 originally allocated addresses using a classful system in which the first octet
determined a fixed block size — Class A, B, or C. This was inefficient: an organization
needing 1,000 hosts would receive a Class B block of 65,536 addresses, leaving 64,536
unused. In 1993, RFC 1519 introduced Classless Inter-Domain Routing (CIDR), which allows
any prefix length to be defined using slash notation (e.g., /22 or
/27). CIDR enables precise address allocation, reduces routing table size
through prefix aggregation, and extended IPv4's useful life by years. The complete class
system reference is in the table below.
IPv4 Exhaustion and NAT
With 4.29 billion addresses and a rapidly growing internet, exhaustion was mathematically certain. IANA exhausted its central pool of unallocated IPv4 blocks on 3 February 2011, distributing the last five blocks equally among the five Regional Internet Registries (RIRs): ARIN (Americas), RIPE NCC (Europe, Middle East, and Central Asia), APNIC (Asia-Pacific), LACNIC (Latin America and Caribbean), and AFRINIC (Africa). Regional pools then depleted sequentially — APNIC in April 2011, RIPE NCC in September 2012, LACNIC in June 2014, and ARIN in September 2015.
Network Address Translation (NAT), standardized in RFC 3022, became the primary mechanism that extended IPv4 beyond its theoretical capacity. A NAT-enabled router assigns private IPv4 addresses to devices on a local network, then rewrites packet headers so all outbound traffic appears to originate from a single public IPv4 address. This allows hundreds of devices to share one public address, at the cost of stateful complexity: NAT devices must track every active connection, and peer-to-peer protocols that assume end-to-end addressability require workarounds such as STUN or TURN. IPv6 was designed to eliminate NAT entirely by providing an address space large enough that every device receives a globally unique, publicly routable address.
For a detailed breakdown of private address ranges and how NAT interacts with RFC 1918 blocks, see Public IP vs Private IP.
IPv4 vs IPv6
IPv4 and IPv6 coexist on most modern networks through dual-stack deployment, where a device
or server holds addresses under both protocols and traffic flows over whichever the endpoint
supports. IPv6, standardized in RFC 2460 (1998) and updated by RFC 8200 (2017), uses 128-bit
addresses expressed in eight colon-separated groups of hexadecimal digits — for example,
2001:0db8:85a3::8a2e:0370:7334. Its 340 undecillion-address space (2¹²⁸)
eliminates the need for NAT. For a complete explanation of IPv6 address types, compression
rules, and dual-stack deployment, see What Is IPv6?.
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Notation | Dotted-decimal — e.g. 192.0.2.1 | Colon-hexadecimal — e.g. 2001:db8::1 |
| Total addresses | ~4.29 billion (2³²) | 340 undecillion (2¹²⁸) |
| NAT required | Yes — address exhaustion forced NAT | No — every device gets a public address |
| Defining RFC | RFC 791 (September 1981) | RFC 8200 (July 2017) |
IPv4 Address Class Reference
The five IPv4 address classes are identified by the leading bits of the first octet, as defined in RFC 791 (Classes A–C) and RFC 1112 (Classes D–E). Classes A, B, and C serve unicast addressing. Class D is reserved for IP multicast. Class E is reserved for IETF experimental use and is not routed on the public internet. The 127.0.0.0/8 block (loopback, per RFC 1122) is excluded from Class A's usable host space.
| Class | First Octet | RFC | Default Subnet Mask | Usable Hosts per Network |
|---|---|---|---|---|
| A | 1–126 | RFC 791 | /8 — 255.0.0.0 | 16,777,214 |
| B | 128–191 | RFC 791 | /16 — 255.255.0.0 | 65,534 |
| C | 192–223 | RFC 791 | /24 — 255.255.255.0 | 254 |
| D | 224–239 | RFC 1112 | Multicast — no subnet mask | Group addressing only |
| E | 240–255 | RFC 1112 | Reserved — not publicly routed | IETF experimental use |
How to Find Your IPv4 Address
Find your private (local) or public IPv4 address using built-in platform commands — no additional software required.
Run the platform command for your OS
On iOS or Android, use network settings
Check your public IPv4 at WhatIsMyIPNow
Frequently Asked Questions
What does IPv4 stand for?
What is the difference between IPv4 and IPv6?
When did IPv4 addresses run out?
How do I find my IPv4 address?
ipconfig — your private IPv4 appears under your
active adapter. On macOS or Linux, run ifconfig or ip addr in Terminal and
look for "inet". On mobile, check Settings → Wi-Fi → your network name → IP address. Your public
IPv4 — the address visible to the internet — is shown at the top of whatismyipnow.com automatically.