An IP address, or Internet Protocol address, is a numerical identifier assigned to a network interface or endpoint for use with the Internet Protocol. IP addresses allow packets to be addressed and routed between networks, providing a fundamental addressing mechanism for Internet communication and many private networks. The two major versions are IPv4 and IPv6.
IPv4 addresses contain 32 bits and are normally written as four decimal octets, such as 192.0.2.1, while IPv6 addresses contain 128 bits and are normally written as hexadecimal groups separated by colons, such as 2001:db8::1. An IP address identifies an address at the network layer rather than necessarily identifying a particular human, physical machine or application. One computer can use multiple addresses, one address can be shared through mechanisms such as NAT, and addresses can change over time. IP addressing is therefore a technical concept that should not automatically be equated with identity.
IP addresses have network structure that allows routers to determine where packets should be forwarded. An address is interpreted together with a prefix length or subnet mask that identifies which portion represents the network prefix and which portion represents the interface or host portion. In IPv4, a subnet such as 192.0.2.0/24 contains a 24-bit network prefix and leaves 8 bits for addresses within that subnet.
IPv6 uses the same general prefix-based concept, commonly with prefixes such as /64 for ordinary LAN segments, although actual allocation and subnetting practices vary. Routers use routing tables containing network prefixes and next-hop information to determine where packets should go. Longest-prefix matching allows a more specific route to take precedence over a broader route. IP addressing and routing are therefore closely related: the address provides the destination information, while routing protocols and forwarding tables determine how packets reach the relevant network.
IP addresses can be public or private depending on the addressing architecture and context. IPv4 reserves specific ranges for private networks, including 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. These addresses are not globally routable on the public Internet and are commonly used inside homes, offices and data centres. Network Address Translation can allow many private IPv4 hosts to communicate with the public Internet through one or more public IPv4 addresses.
IPv6 generally provides a vastly larger address space and supports globally unique unicast addressing without requiring NAT as a fundamental scaling mechanism. IPv6 also has unique local addresses for private-like internal use. Other address categories include loopback, link-local, multicast and documentation ranges, each designed for specific purposes. The meaning and routability of an IP address therefore depend on both its numerical value and the address scope in which it is used.
An IP address is associated with a network interface rather than necessarily with an entire physical computer. A server with multiple network interfaces can have several addresses, and a single interface can have multiple addresses simultaneously. Virtual machines, containers and cloud services can also have their own IP addresses, while load balancers and reverse proxies can expose one public address for a large collection of backend servers.
Dynamic addressing allows an address to be assigned temporarily through mechanisms such as DHCP in IPv4 or automated configuration mechanisms in IPv6. Static addressing can be configured manually or reserved administratively. Because addresses can be reassigned, an IP address should not normally be interpreted as a permanent identifier of a device or person. Internet service providers may assign different public addresses over time, and multiple users may appear behind the same public IPv4 address because of NAT or carrier-grade NAT.
IP addresses are different from several other identifiers commonly encountered in networking. A MAC address identifies a network interface at the data-link layer within relevant local-network technologies, whereas an IP address operates at the Internet layer and is used for routing between networks. A hostname is a human-readable name that can resolve through DNS to one or more IP addresses. A URL can contain a hostname or IP address along with a scheme and resource path.
A port number identifies a transport-layer service endpoint, so a TCP connection can be described using an IP address and port combination. DNS therefore provides names, IP provides network-layer addresses, and TCP or UDP ports identify services within an endpoint. Keeping these layers separate is important because changing one does not necessarily change the others.
IP packets contain source and destination IP addresses, allowing routers and endpoints to determine where traffic originated and where it should be delivered. Routers normally forward packets based on the destination address rather than maintaining an end-to-end application identity for every connection. IPv4 includes mechanisms such as fragmentation, while IPv6 changed and simplified several aspects of packet handling and generally moves fragmentation responsibilities away from intermediate routers.
IP itself is connectionless: it does not establish a persistent session before transmitting packets. Reliable or ordered communication, when required, is supplied by higher-layer protocols such as TCP, while UDP provides a simpler datagram transport. Applications such as HTTP, DNS, email and video conferencing ultimately rely on IP or IP-based networking to move their traffic between endpoints.
IP addressing has major security implications but an IP address is not itself a security credential. Firewalls can allow or block traffic based on source and destination addresses, intrusion-detection systems can analyse address information, and access-control lists can restrict communication to particular networks. However, an address can be shared, spoofed in some circumstances, hidden behind proxies or NAT, or reassigned to another subscriber.
Geolocation databases can associate public IP addresses with approximate geographic regions, but such information is not equivalent to precise physical location and can be inaccurate. Logging an IP address can be useful for troubleshooting and security investigations, but attributing activity to a particular person requires additional evidence and context. The technical role of an IP address is addressing and routing, not proving identity.
IPv4 was developed from earlier Internet Protocol work and became the dominant addressing system of the Internet, but its 32-bit address space eventually became insufficient for the Internet's growth. IPv6 was designed as the successor, using 128-bit addresses and incorporating other architectural changes. IPv4 and IPv6 can coexist through dual-stack operation, tunnelling and translation technologies. The global Internet therefore remains a mixed environment in which devices and networks may support one or both protocols.
IP addressing has also expanded beyond traditional desktop computers to smartphones, servers, cloud workloads, embedded devices, industrial systems, vehicles and increasingly large numbers of connected devices. The essential purpose remains unchanged: provide a structured network-layer address that enables packets to be delivered across interconnected networks.