IP Addresses Explained: IPv4, IPv6, and Network Identification

An IP address is a numerical label that identifies a network interface and helps direct data across computer networks. Every time a phone loads a website, a laptop sends an email, or a smart television streams a video, Internet Protocol (IP) addresses help the data reach the correct destination.

Two versions of IP are in widespread use: IPv4 and IPv6. IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses, providing a vastly larger pool of possible addresses. Although both serve the same fundamental purpose, they differ in how addresses are written, how much address space they provide, and how networks use them.

Understanding IP addresses also means distinguishing between a device’s address on a local network and the public address through which that network communicates with the wider internet. These addresses help networks identify where data should go, but they do not automatically reveal a person’s name, exact location, or identity.

What an IP address does

Internet Protocol is a set of rules that allows devices to send data across interconnected networks. An IP address provides the addressing information needed to move that data toward its destination.

When a device requests a web page, the information travels in small units called packets. Each IP packet carries a source address and a destination address, along with other information needed to handle the packet. Routers examine the destination address and use their routing tables to decide where to forward the packet next.

A router does not ordinarily need to know the identity of the person using a device or the full route the packet will take. It needs enough information to select an appropriate next step toward the destination. The packet may pass through multiple routers and networks before arriving.

The source address identifies where the packet is coming from at the IP layer, while the destination address identifies where it is intended to go. Responses generally travel back toward the source, although the return path may differ from the original route.

An IP address is not the same as a website’s domain name. A domain name, such as example.com, is a human-readable name. The Domain Name System (DNS) translates domain names into IP addresses so that software can connect to the appropriate network destination. A single domain can resolve to multiple addresses, and one IP address can serve many domain names.

Nor is an IP address necessarily a permanent identifier for a physical device. Addresses can change, be shared through network translation, or be assigned to different devices at different times. An address identifies a network endpoint within the relevant networking context, not necessarily a unique machine or person.

How IPv4 addresses work

IPv4, short for Internet Protocol version 4, is the older of the two major IP versions in use today. It remains widely deployed because of its long history, extensive infrastructure, and continued compatibility with existing networks and services.

An IPv4 address consists of 32 bits. A bit is a binary digit that can have a value of either zero or one. With 32 bits, IPv4 provides 2322^{32}232, or 4,294,967,296, possible bit patterns.

IPv4 addresses are usually written as four decimal numbers separated by periods. Each number represents eight bits, a group known as an octet, and ranges from 0 to 255.

For example:

192.168.1.25

In binary, the address contains four eight-bit groups. Each group is converted into a decimal number to make the address easier for people to read and use.

The four numbers are not four independent identifiers. Together, they form one 32-bit address whose interpretation depends partly on the network’s addressing and routing configuration.

Network and host portions

An IP address is interpreted in relation to a network prefix. The prefix identifies the portion of the address associated with a particular network, while the remaining bits can identify individual addresses within that network.

For example, the notation 192.168.1.25/24 indicates that the first 24 bits belong to the network prefix. The remaining eight bits are available for addresses within that IPv4 subnet, subject to the subnet’s addressing rules.

The /24 is called a prefix length. It tells networking equipment how many leading bits to treat as the network portion. In traditional dotted-decimal subnet notation, a /24 corresponds to the subnet mask 255.255.255.0.

A subnet is a logically defined part of an IP network. Dividing a network into subnets helps administrators organize devices, manage address allocation, control traffic, and apply security policies.

The network and host portions are not always divided at the same boundary. A /16, /24, or /27 prefix allocates different numbers of bits to the network and the addresses within it. Modern IP networking uses Classless Inter-Domain Routing (CIDR) notation, which expresses prefix lengths directly rather than relying on the older fixed address classes.

For ordinary IPv4 subnets, some address patterns have special meanings. In a typical /24 subnet, the address with all host bits set to zero identifies the subnet, while the address with all host bits set to one is its directed broadcast address. These conventional rules have exceptions in specialized configurations, and not every IPv4 network uses a /24 subnet.

Why IPv6 was introduced

IPv4’s 32-bit address space was not large enough to provide a unique public address for every device and network that might connect to the expanding internet. Address conservation measures, including private addressing and Network Address Translation, helped extend IPv4’s usefulness, but they did not eliminate the underlying limitation.

IPv6 was developed to provide a much larger address space and support the continued growth of internet-connected networks. It uses 128-bit addresses, creating 21282^{128}2128 possible bit patterns. That is approximately 3.4×10383.4 \times 10^{38}3.4×1038 addresses, an enormous increase over IPv4.

An IPv6 address is written as eight groups of hexadecimal digits separated by colons. Each group represents 16 bits, or four hexadecimal digits.

For example:

2001:0db8:0000:0000:0000:0000:0000:0001

Hexadecimal uses 16 symbols: the digits 0 through 9 and the letters A through F. Because each hexadecimal digit represents four bits, hexadecimal notation makes a 128-bit address considerably easier to write than its full binary form.

IPv6 addresses can also be shortened using two rules. Leading zeros in an individual group may be omitted, and one consecutive sequence of all-zero groups may be replaced by a double colon. Applying these rules to the example produces:

2001:db8::1

The double colon can appear only once in an address because using it more than once would make the number of omitted groups ambiguous.

IPv6 is more than an expansion of address length. Its protocol design also changes aspects of packet handling, address configuration, and network communication. For example, IPv6 routers do not fragment packets in transit; when necessary, the sending host can perform fragmentation. IPv6 also uses Neighbor Discovery, based on ICMPv6, to help devices discover nearby routers and determine link-layer addresses.

These design differences do not make IPv6 a guarantee of faster or more secure communication. Performance depends on the network path, equipment, service configuration, and other factors. Security likewise depends on how systems and networks are configured and maintained.

IPv4 and IPv6 compared

IPv4 and IPv6 provide the same broad service: addressing and forwarding packets across networks. Their differences affect how addresses are represented, allocated, and processed.

FeatureIPv4IPv6
Address length32 bits128 bits
Address notationFour decimal octets separated by periodsEight hexadecimal groups separated by colons
Total possible bit patternsAbout 4.29 billionAbout 3.4×10383.4 \times 10^{38}3.4×1038
Broadcast addressingSupports broadcast within applicable IPv4 networksDoes not use broadcast; uses multicast for group delivery
Address configurationManual configuration or automatic methods such as DHCPManual configuration, SLAAC, DHCPv6, or combinations of these
Address resolution on a local linkARP is commonly usedNeighbor Discovery using ICMPv6
Packet headerVariable length, with optional fieldsFixed base header, with optional information carried in extension headers

IPv6 does not make IPv4 addresses longer or automatically convert every existing IPv4 address into a globally reachable IPv6 address. They are distinct protocol versions with different address formats and packet headers.

As a result, IPv4-only and IPv6-only systems cannot ordinarily communicate directly at the IP layer. Networks often support both versions simultaneously, a configuration called dual stack. Other techniques, including translation and tunneling, can help connect environments that use different IP versions.

The transition to IPv6 is therefore gradual rather than a single replacement event. Many internet services, home networks, mobile networks, and enterprise systems continue to use IPv4, IPv6, or both, depending on their infrastructure and connectivity requirements.

Public and private IP addresses

One of the most useful distinctions in everyday networking is the difference between public and private IP addresses.

A public IP address is globally routable within the relevant IP system, subject to routing policies and other network controls. It allows an internet-connected endpoint or network gateway to communicate with destinations outside its local network.

A private IP address is used within a private network and is not intended to be routed across the public internet. Private addresses let organizations and households number their internal devices without requiring a unique public IPv4 address for every device.

The familiar IPv4 private address ranges are:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

An address such as 192.168.1.25 is therefore commonly used by a device on a home or office network. The same private address can exist independently on thousands of unrelated networks because it does not have to be globally unique.

Private IPv4 addressing is often paired with Network Address Translation (NAT). A home router can translate the private addresses of devices on the local network into a public IPv4 address for internet traffic. It keeps track of the connections so that returning packets can be directed to the appropriate internal device.

This arrangement allows multiple devices to share one public IPv4 address. A related technique, Port Address Translation, uses transport-layer port numbers to distinguish many simultaneous connections that share an address.

NAT is not itself a firewall, although home routers often combine address translation with firewall rules. The two mechanisms have different purposes: NAT changes address information, while a firewall decides which traffic should be allowed or blocked.

IPv6 has a different approach to private and local addressing. Unique local addresses are intended for private use and use the prefix fc00::/7, while link-local addresses, which commonly begin with fe80::, are used for communication on a local network link. IPv6 networks can also assign globally routable addresses to individual devices without requiring the same form of address sharing commonly used with IPv4.

A globally routable IPv6 address does not automatically make a device accessible from anywhere. Firewalls, routing policies, and application settings still determine whether incoming connections are permitted.

How devices receive IP addresses

Devices need IP addresses that fit the networks they use. Depending on the network, an address may be configured manually, assigned automatically, or generated by the device using information supplied by the network.

On many home and office networks, a router or another local server assigns IPv4 addresses using the Dynamic Host Configuration Protocol (DHCP). When a device joins the network, it can request configuration information, including an IP address, a subnet mask or prefix, a default gateway, and DNS server addresses.

A default gateway is the router a device uses to send traffic to destinations outside its local subnet. Without an appropriate route or gateway, a device may be able to communicate with nearby devices but unable to reach other networks.

DHCP commonly leases an address for a limited period. The device can renew the lease and often receives the same address again, but that is not guaranteed. A network administrator can also configure a reservation so that a particular device is consistently offered a particular address.

IPv6 supports multiple address-configuration methods. With Stateless Address Autoconfiguration (SLAAC), a device can use information advertised by a local router to configure an IPv6 address. DHCPv6 can provide additional or alternative configuration, depending on the network. These methods can coexist.

A single device may have several IP addresses at once. It might have an IPv4 address and one or more IPv6 addresses, as well as different addresses for different network interfaces. A laptop connected to both Wi-Fi and Ethernet, for instance, can have separate network configurations for each connection.

Addresses can also change when a device moves between networks, reconnects after a period offline, or receives new configuration information. Consequently, an IP address is not a reliable permanent label for a physical device.

How routers use IP addresses to deliver data

IP addresses are useful because routers can interpret them according to network prefixes and routing information. A router maintains a routing table containing information about reachable networks and the next steps for forwarding traffic toward them.

When a router receives a packet, it examines the destination IP address and searches for the most specific matching route in its routing table. This is known as longest-prefix matching. The router forwards the packet to the next hop indicated by the selected route, or handles it according to an applicable local or default route.

The process repeats across the network until the packet reaches its destination network or encounters a failure or policy that prevents delivery. The router usually does not need a complete map of every router between the source and destination.

IP routing also depends on local network delivery. On a typical Ethernet or Wi-Fi network, devices use link-layer addresses to deliver frames to nearby interfaces. IPv4 commonly uses the Address Resolution Protocol (ARP) to discover the link-layer address associated with an on-link IPv4 address. IPv6 uses Neighbor Discovery for related functions.

An IP address and a link-layer address serve different purposes. IP addresses support communication across networks, while link-layer addresses are used to deliver frames on a particular local link. A router typically removes the incoming link-layer framing and creates new framing for the next link, while forwarding the IP packet toward its destination.

IP itself provides best-effort delivery. It does not guarantee that every packet will arrive, arrive only once, or arrive in the original order. Protocols such as Transmission Control Protocol (TCP) add mechanisms for reliable, ordered delivery when applications require them. Other transport protocols, including User Datagram Protocol (UDP), provide a different set of services.

What an IP address can reveal about a user

An IP address can provide clues about the network through which a device communicates, but its ability to identify a person is limited.

Public IP address information can sometimes indicate the internet service provider or organization responsible for an address block. Geolocation databases may estimate a broad geographic area, such as a city or region. These estimates can be inaccurate, especially when traffic passes through centralized infrastructure, mobile networks, corporate gateways, or virtual private network (VPN) services.

An IP address does not inherently contain a person’s name, home address, or precise physical coordinates. It is not a built-in GPS locator. The geographic information associated with an address comes from external records and estimation methods, not from the address’s numerical format alone.

The relationship between an IP address and a person can also be indirect. A household may share one public IPv4 address through a router. A mobile carrier may use shared addressing for many subscribers. A business network may send traffic from thousands of devices through a smaller number of public addresses. VPNs and proxy services can make a connection appear to originate from the intermediary’s network rather than the user’s own.

Even when an address is known, connecting it to a particular subscriber or connection generally requires additional records. For example, an internet service provider may maintain assignment logs showing which customer used an address at a particular time. Where many customers share one public address, the time and relevant port information may also be necessary to distinguish a connection.

This is why an IP address should be treated as network information, not conclusive proof of an individual’s identity or location. It can still be useful in security investigations, abuse prevention, network troubleshooting, and access control, but its meaning depends on the surrounding evidence and network configuration.

How IP addresses relate to network security

IP addresses play a practical role in protecting networks because firewalls and other security systems can use them to allow, restrict, or monitor traffic. An organization might permit connections from a known range of office addresses or block traffic associated with a source of repeated abuse.

However, an address alone is a weak basis for determining whether a user or device is trustworthy. Addresses can be reassigned, shared, hidden behind intermediaries, or changed. An attacker can also send traffic through a compromised system or a service that obscures the original source.

Source IP addresses may be spoofed in some circumstances, particularly when protocols or network paths do not provide effective source validation. Spoofing is not equally practical for every type of connection: protocols that require a completed two-way exchange can make successful impersonation more difficult than one-way traffic attacks. Network operators use filtering and other controls to reduce spoofing and related abuse.

IPv6 does not automatically provide stronger privacy or security than IPv4. Its larger address space can make exhaustive address scanning more difficult in some networks, but it does not eliminate reconnaissance, compromised devices, weak authentication, or software vulnerabilities. IPv6 networks require appropriate firewall policies and operational oversight just as IPv4 networks do.

IPv6 also supports temporary addresses that some devices use to reduce the extent to which a stable interface identifier can be used to track activity across connections. Privacy depends on how addresses are configured and how applications, services, and other identifiers are used. Cookies, account logins, device fingerprints, and other signals can still link activity even when an IP address changes.

Sound network security therefore relies on multiple layers: correctly configured routing and firewalls, secure applications, strong authentication, timely software updates, and monitoring appropriate to the environment. IP addressing provides an important foundation for network communication and traffic control, but it cannot establish trust by itself.

Why IPv4 and IPv6 will continue to coexist

IPv4 remains deeply embedded in internet infrastructure, while IPv6 provides the address space needed to support continued network growth. Replacing every IPv4 system at once would require changes to devices, software, routers, service providers, and countless network configurations.

Dual-stack operation lets a device or network use both protocols when the destination and available connectivity support them. A service may have both IPv4 and IPv6 addresses, allowing clients to connect using a compatible option. Other deployment methods translate traffic between protocol versions or carry one protocol through a network built around the other.

The two protocols are not interchangeable at the packet level, and support for one does not guarantee support for the other. A network can have working IPv4 connectivity but no usable IPv6 route, or the reverse. Applications and operating systems often select among available options automatically, so users may not notice which protocol carries a particular connection.

The central distinction is straightforward: IPv4 and IPv6 are different systems for assigning addresses and routing packets, while both enable devices to communicate across networks. Understanding their address formats, network prefixes, public and private uses, and limitations makes it easier to see how the internet identifies destinations—and why an IP address is essential for communication without being a complete identifier of the person behind it.

Looking For Something Else?