What Is an IP Address? IPv4, IPv6, Public, Private

An IP address is a number that gives each device on an IP network a unique address. IPv4 uses 32 bits and IPv6 uses 128 bits. It points to a connection, not to a person.

Published:

Updated:

What Is an IP Address? IPv4, IPv6, Public, Private

An IP address is a number that gives each device on an IP network a unique address. IPv4 uses 32 bits and IPv6 uses 128 bits. It points to a connection, not to a person.

The short answer

  • Definition: a number used to address each device on an IP network uniquely. “IP” stands for Internet Protocol (MDN).
  • IPv4: four octets, 32 bits (RFC 791). Example: 13.1.68.3.
  • IPv6: 128 bits (RFC 8200). Example: 2001:DB8:0:0:8:800:200C:417A.
  • Private IPv4 ranges: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, 192.168.0.0 to 192.168.255.255 (RFC 1918).
  • Identity: a weak identifier of hosts and users (RFC 6269). Never treat it as proof of who someone is.

Facts come from IETF RFCs and the Mozilla MDN glossary, all read on 21 October 2026.

What does an IP address do?

RFC 791 separates three ideas. A name says what we seek, an address says where it is, and a route says how to get there. The Internet Protocol deals mainly with addresses; other protocols map names to addresses.

In IPv6, RFC 8200 defines a Source Address, the 128-bit address of the packet’s originator. It also defines a Destination Address, the 128-bit address of the intended recipient. The destination may not be the final recipient if a Routing header is present.

How do IPv4 and IPv6 differ?

Feature IPv4 IPv6
Address length 32 bits (RFC 791) 128 bits (RFC 8200)
Written form Four 8-bit pieces written in decimal, for example 13.1.68.3 Eight 16-bit pieces, each one to four hexadecimal digits, separated by colons
Example 13.1.68.3 2001:DB8:0:0:8:800:200C:417A

IPv6 addresses get long, so RFC 4291 lets you shorten them. Drop leading zeros in a field. Replace one or more consecutive groups of zeros with “::”, but only once per address. The example above becomes 2001:DB8::8:800:200C:417A. Two special cases: ::1 is the loopback address and :: is the unspecified address.

MDN calls IPv4 the fourth version of the Internet protocol and the first widely deployed, formalized in 1981. IPv6 is gradually replacing it because of IPv4’s security problems and the limits of its address field. Until IPv6 is deployed more broadly, “IP address” usually still means a 32-bit IPv4 address.

What is the difference between public and private addresses?

RFC 1918 describes two kinds of hosts in an organization’s network.

  • Private hosts use the three reserved blocks listed above. They talk to hosts inside the enterprise but have no IP connectivity to hosts outside it. They still reach outside services through mediating gateways.
  • Public hosts use globally unique addresses assigned by an Internet registry.
  • Routing: private addresses have no global meaning, so routing information about them should not cross links between enterprises.

In practice: an address inside one of the three private blocks is private. Other networks cannot reach it directly.

Does your address stay the same?

It depends on how it is allocated. RFC 2131 (DHCP) names three ways.

  1. Automatic allocation: the server assigns a permanent address to a client.
  2. Dynamic allocation: the address is assigned for a limited period. It is the only mechanism that allows automatic reuse of an address.
  3. Manual allocation: the network administrator assigns the address, and DHCP only delivers it.

A lease is the period over which an address is allocated. A client can ask for an infinite lease, but a server may still grant a finite one so it can later detect that the client has been retired. The RFC does not use “static” or “dynamic IP address” as consumer labels, so do not map them onto products.

What does an IP address reveal, and what does it not?

  • Historically, a public IPv4 address plus a timestamp usually identified a subscriber. Where addresses are shared (NAT or carrier-grade NAT), it no longer does (RFC 6269).
  • Several connections from one address do not prove a single host. A returning address does not guarantee the same machine.
  • An abuse report naming only an IP address cannot identify the responsible subscriber.
  • IP-based geolocation is a heuristic at best. A user behind a carrier-grade NAT appears to be where the NAT is.

What should you do with this?

  • Read an address by its punctuation: dots and four numbers mean IPv4; colons and hex digits mean IPv6.
  • Check the three private blocks before you assume an address is reachable from the Internet.
  • Do not blame a person from an IP address alone, and do not rely on its location.

Questions and answers about IP addresses

Is “IP address” the same as “IPv4 address”?

Often in everyday use. MDN says the term usually still means a 32-bit IPv4 address until IPv6 is deployed more broadly.

Can a device with a private address reach the Internet?

Not directly. RFC 1918 says private hosts have no IP connectivity to hosts outside the enterprise. They reach external services through mediating gateways.

Does an IP address identify one person?

No. RFC 6269 calls it a weak identifier, and shared addresses make it weaker.

Can an address change?

Yes under dynamic allocation. RFC 2131 says the address is assigned for a limited period, called a lease.

How do I shorten an IPv6 address?

Drop leading zeros in each field, then replace one run of zero groups with “::”. Use “::” only once, as RFC 4291 requires.

Sources

Facts read on 21 October 2026.

All sections All articles

Latest articles