An IP address is the numeric identifier of a network interface that the Internet Protocol uses to deliver packets between hosts. In Internet addressing, it serves two functions at once: it identifies the interface and it indicates its location in the routing hierarchy, so routers can forward a packet toward its destination one hop at a time.
Two versions are in use. IPv4 addresses are 32 bits long, giving about 4.3 billion possible values, while IPv6 addresses are 128 bits long, a space large enough to give every subnet its own vast range. Most networks today run both in parallel, an arrangement known as dual stack.
How an IP address is structured
Every IP address splits into a network prefix and a host part. The prefix identifies the network that routers must reach, and the host part identifies the interface inside that network. The boundary is expressed in CIDR notation as a slash and a prefix length, so 192.0.2.10/24 means the first 24 bits name the network and the last 8 bits the host.
IPv4 addresses are written in dotted decimal, four octets from 0 to 255 such as 198.51.100.7. IPv6 addresses are written as eight groups of four hexadecimal digits separated by colons; leading zeros may be dropped and one run of zero groups may be replaced by ::, so 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1.
| Property | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Notation | Dotted decimal, 203.0.113.5 | Hexadecimal groups, 2001:db8::5 |
| Typical subnet size | /24 with 254 usable hosts | /64 for every LAN |
| Header checksum | Yes | No, left to other layers |
| Address configuration | Static or DHCP | SLAAC, DHCPv6 or static |
| Broadcast | Supported | Replaced by multicast |
Types of IP addresses by scope and delivery
Not every address is reachable from everywhere. Scope decides where an address is valid, and the delivery model decides how many receivers get a packet. Both are encoded in reserved ranges, so a router knows from the address alone how to treat it.
| Category | IPv4 range | IPv6 range | Meaning |
|---|---|---|---|
| Public unicast | Most of the space | 2000::/3 | Globally routable, unique |
| Private | 10/8, 172.16/12, 192.168/16 | fc00::/7 (unique local) | Used inside organizations only |
| Loopback | 127.0.0.0/8 | ::1 | Traffic stays inside the host |
| Link-local | 169.254.0.0/16 | fe80::/10 | Valid on one network segment |
| Multicast | 224.0.0.0/4 | ff00::/8 | Delivered to a group of receivers |
| Shared address space | 100.64.0.0/10 | Not applicable | Carrier-grade NAT inside ISPs |
Most addresses are unicast, meaning one sender and one receiver. Anycast reuses one unicast address at many locations, and routing delivers each packet to the nearest instance, which is how large DNS and CDN services spread load. Multicast sends one stream to every member of a group.
How addresses are assigned and allocated
IP addresses are distributed through a hierarchy of registries. IANA holds the global pool and hands large blocks to the five regional internet registries, which allocate smaller blocks to internet service providers, hosting companies and large organizations. Those holders in turn assign addresses to customers and devices.
On an individual network, a host obtains its address in one of three ways. A static address is configured by hand and suits servers and routers. DHCP leases an address from a pool for a limited time, often hours to days. In IPv6, stateless address autoconfiguration lets a host build its own address from the router-advertised /64 prefix, frequently with randomized privacy addresses that change over time.
Because the IPv4 pool is exhausted at the regional level, new IPv4 space is now obtained mainly through transfer markets and waiting lists, while IPv6 space remains readily available.
Public and private addresses and NAT
Most homes and offices use private IPv4 addresses internally and share one public address toward the internet. A router performing network address translation rewrites outgoing packets so they appear to come from its public address, keeping a table of port mappings to send replies back to the right device.
NAT has conserved IPv4 space for decades, but it breaks end-to-end reachability: devices behind it cannot easily accept incoming connections without port forwarding. When a provider adds a second NAT layer, called CGNAT, even the customer router lacks a public address. IPv6 avoids this by giving every device a globally unique address, with a firewall instead of translation providing protection.
| Situation | Recommended approach | Reason |
|---|---|---|
| Public web server | Static public IPv4 and IPv6 | Stable DNS records and reachability |
| Office workstations | Private IPv4 via DHCP plus IPv6 SLAAC | Simple management, future-ready |
| Home network behind CGNAT | Use IPv6 or a tunnel for inbound access | No public IPv4 is available |
| Internal lab | Private or unique local ranges | Avoids conflicts with real networks |
Common misconceptions and pitfalls
An IP address identifies an interface, not a person or a device. A laptop with Wi-Fi and Ethernet has at least two, a server may hold dozens, and many users can share one public address behind NAT. Treating an address as a reliable personal identifier leads to wrong conclusions in logging, licensing and investigations.
- Geolocation is approximate: databases map ranges to regions, often accurate only to a country or city.
- Addresses change: dynamic leases and IPv6 privacy addresses rotate, so long-term tracking by address is unreliable.
- Overlapping private ranges cause conflicts when two networks using
192.168.1.0/24are joined by a VPN. - Hardcoding addresses in applications makes migrations painful; DNS names are the better reference.
Another frequent error is ignoring IPv6 in firewall rules. A host protected only by IPv4 filters may be fully exposed over IPv6 if both stacks are active.
In everyday language
An IP address works like a postal address for network traffic. Every connected device needs one so data can find its way there. When you open a website, your device sends a request to the site’s address. The reply comes back to your address.
Older addresses are short, like 192.0.2.10, and the world has run out of new ones. Newer IPv6 addresses are much longer, so there are enough for every device. Many homes share one public address, and the router sorts out which device gets which reply.
Seen in the real world
A small accounting firm wants staff to reach a file server in the office while working from home. The server has the private address 192.168.10.20, which is not reachable from the internet. The administrator checks the router and finds that its outside address is in 100.64.0.0/10, meaning the provider uses carrier-grade NAT and no port forwarding is possible.
The firm asks the provider for a static public IPv4 address, which costs a small monthly fee, and configures a VPN on the router. The provider also offers a /56 IPv6 prefix, so the administrator enables IPv6 and adds firewall rules for both protocols.
Staff now connect through the VPN to the router’s public address and reach the server by its private address. The remote access works reliably, and the firm has an IPv6-ready network for future services.