An IP address is a number used by the Internet Protocol to identify a source or destination on a network. It appears in packet headers so network equipment can forward traffic toward a destination and the receiving side can see the packet's source address. Its meaning depends on the network and address scope. It is not a permanent label for a particular piece of hardware or a person.

IPv4 and IPv6 are the two versions of IP in common use. Packets in both versions carry source and destination addresses, but the address lengths and written forms differ. A device can have more than one address, and the address visible to another network can differ from the one assigned inside a home or office.

What an IP Address Identifies

Routers read a packet's destination address and use their routing information to choose where to forward it next. A router does not need a separate route for every individual address. It can use a route for an address block when the destination matches that block's prefix.

A network prefix is a sequence of bits at the beginning of an address that describes an address block. The remaining bits distinguish addresses within that block. The prefix boundary depends on how the network is configured and is written as a slash followed by a prefix length, such as /24. An individual address can also be shown without that suffix; its network cannot always be determined from the bare address alone.

An IP address is assigned to a network interface, the point where a device connects to a network. A laptop may have addresses on its Wi-Fi interface and a VPN interface at the same time. It may also have both IPv4 and IPv6 addresses. Those assignments can change when the laptop moves to another network or when the network changes its configuration.

DHCP is one way an IPv4 address can be assigned automatically. An address can also be entered in network configuration. The assignment method does not change the address's written format or make it a permanent identifier for the device.

A packet's address is only one part of communication. A transport protocol can use a port number to identify a particular service or conversation at that address. A domain name, when one is used, is a separate name that can be translated into one or more IP addresses. Neither a port nor a name changes what the IP address represents in the packet header.

IPv4 and IPv6 Notation

IPv4 addresses are 32 bits long. They are normally written as four decimal numbers separated by dots, with each number representing eight bits and ranging from 0 to 255. For example, 192.0.2.25 is a valid IPv4 form. Its address block, 192.0.2.0/24, is reserved for documentation examples.

IPv6 addresses are 128 bits long. Their written form uses hexadecimal digits, 0–9 and a–f, in groups separated by colons. Without zero-group compression, there are eight groups of one to four digits, such as 2001:db8:0:1:0:0:0:25. Each group represents 16 bits.

Leading zeros in a group can be omitted, and one consecutive run of zero groups can be shortened with ::. That makes 2001:db8:0:1::25 a shorter way to write the same example. The 2001:db8::/32 range is reserved for documentation.

The two versions are different address families. An IPv4 address is not simply a short IPv6 address, and a colon-separated IPv6 address should not be read as four decimal IPv4 octets. Networks often support both versions so a device can have addresses in each family. The version used for a particular connection depends on the addresses and paths available at both ends.

Address Scope and Delivery

An address can be meaningful only within a limited network or be usable in routing across the public internet. For IPv4, the three private address ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. A home router might assign an address from one of those ranges to a device and use network address translation when that device reaches an external service. The external service sees the source address after translation. If the internet provider also translates the traffic, that address may differ from the one on the home router's internet-facing interface.

IPv6 has its own address scopes. A link-local address is for communication on a single link and is not forwarded by routers to other links. Global unicast addresses are intended for wider routing, subject to network policy and actual route availability. IPv4 also has a loopback range, and IPv6 has ::1; these refer back to the same host rather than to a public destination.

IPv6 also has unique local addresses, intended for communication within a site or between sites with agreed routes. These addresses have a wider scope than link-local addresses, but they are not intended for routing across the public internet. Scope and public reachability are separate properties.

Public and private describe how addresses are used, not which version of IP they belong to. Even an apparently public address is not proof that an outside connection will succeed. Firewalls, routing rules, and the presence of a listening service still matter. Likewise, the address a website observes may be shared by several devices behind a router or another translation service.

Individual and Group Destinations

A unicast address identifies one interface. A multicast address targets a group of interfaces, while an anycast address is shared by several interfaces and packets are routed to one member. IPv4 also supports broadcast addresses for all hosts on a link or subnet. IPv6 uses multicast instead of broadcast, so the type of destination matters as well as the address's scope.

What an Address Does Not Identify

An IP address alone does not identify a named person, a unique computer, or an exact physical position. Addresses can be reassigned over time, shared through translation, or used by an interface that is temporarily connected. An observer usually needs additional records and context to connect network activity to a particular account or device.

It also does not prove who operates a website, whether a connection is trustworthy, or which application sent a packet. The address provides a routing destination and a source value in a particular network context. An allocation record may name the organization responsible for an address block, but it does not show who used a particular device at a given time.