Understanding IP Addresses: IPv4 & IPv6
Understanding IP Addresses: IPv4 & IPv6
IP address
An Internet Protocol address (IP address) is a numerical label such as [Link] that is assigned
to a device connected to a computer network that uses the Internet Protocol for communication.[1][2]
IP addresses serve two main functions: network interface identification, and location addressing.
Internet Protocol version 4 (IPv4) was the first standalone specification for the IP address, and has
been in use since 1983.[2] IPv4 addresses are defined as a 32-bit number, which became too small to
provide enough addresses as the internet grew, leading to IPv4 address exhaustion over the 2010s. Its
designated successor, IPv6, uses 128 bits for the IP address, giving it a larger address space.[3][4][5]
Although IPv6 deployment has been ongoing since the mid-2000s, both IPv4 and IPv6 are still used
side-by-side as of 2025.
IP addresses are usually displayed in a human-readable notation, but systems may use them in
various different computer number formats. CIDR notation can also be used to designate how much
of the address should be treated as a routing prefix. For example, [Link]/24 indicates that 24
significant bits of the address are the prefix, with the remaining 8 bits used for host addressing. This is
equivalent to the historically used subnet mask (in this case, [Link]).
The IP address space is managed globally by the Internet Assigned Numbers Authority (IANA) and
the five regional Internet registries (RIRs). IANA assigns blocks of IP addresses to the RIRs, which are
responsible for distributing them to local Internet registries in their region such as internet service
providers (ISPs) and large institutions. Some addresses are reserved for private networks and are not
globally unique.
Within a network, the network administrator assigns an IP address to each device. Such assignments
may be on a static (fixed or permanent) or dynamic basis, depending on network practices and
software features. Some jurisdictions consider IP addresses to be personal data.
Function
An IP address serves two principal functions: it identifies the host, or more specifically, its network
interface, and it provides the location of the host in the network, and thus, the capability of
establishing a path to that host. Its role has been characterized as follows: "A name indicates what we
seek. An address indicates where it is. A route indicates how to get there."[2] The header of each IP
packet contains the IP address of the sending host and that of the destination host.
[Link] 1/13
12/22/25, 5:11 PM IP address - Wikipedia
IP versions
Two versions of the Internet Protocol are in common use on the Internet today. The original version
of the Internet Protocol that was first deployed in 1983 in the ARPANET, the predecessor of the
Internet, is Internet Protocol version 4 (IPv4).
By the early 1990s, the rapid exhaustion of IPv4 address space available for assignment to Internet
service providers and end-user organizations prompted the Internet Engineering Task Force (IETF) to
explore new technologies to expand addressing capability on the Internet. The result was a redesign of
the Internet Protocol which became eventually known as Internet Protocol Version 6 (IPv6) in
1995.[3][4][5] IPv6 technology was in various testing stages until the mid-2000s when commercial
production deployment commenced.
Today, these two versions of the Internet Protocol are in simultaneous use. Among other technical
changes, each version defines the format of addresses differently. Because of the historical prevalence
of IPv4, the generic term IP address typically still refers to the addresses defined by IPv4. The gap in
version sequence between IPv4 and IPv6 resulted from the assignment of version 5 to the
experimental Internet Stream Protocol in 1979 which, however, was never referred to as IPv5.
Versions 1 to 9 were defined, but only 4 and 6 ever gained widespread use. Transmission Control
Protocol (the protocol suite later referred to as TCP/IP) versions 1[6] and 2[7] were published in 1974
and 1977. Version 3[8] was defined in 1978, and version 3.1 is the first version in which TCP is
separated from IP.[9][10] Version 6 is a synthesis of several suggested versions, version 6 Simple
Internet Protocol, version 7 TP/IX: The Next Internet, version 8 P. Internet Protocol, and version 9
TCP and UDP with Bigger Addresses (TUBA).[11][12]
Subnetworks
IP networks may be divided into subnetworks in both IPv4 and IPv6. For this purpose, an IP address
is recognized as consisting of two parts: the network prefix in the high-order bits and the remaining
bits called the rest field, host identifier, or interface identifier (IPv6), used for host numbering within
a network.[1] The subnet mask or CIDR notation determines how the IP address is divided into
network and host parts.
The term subnet mask is only used within IPv4. Both IP versions however use the CIDR concept and
notation. In this, the IP address is followed by a slash and the number (in decimal) of bits used for the
network part, also called the routing prefix. For example, an IPv4 address and its subnet mask may be
[Link] and [Link], respectively. The CIDR notation for the same IP address and subnet is
[Link]/24, because the first 24 bits of the IP address indicate the network and subnet.
[Link] 2/13
12/22/25, 5:11 PM IP address - Wikipedia
IPv4 addresses
An IPv4 address has a size of 32 bits, which limits the
address space to 4 294 967 296 (232) addresses. Of this
number, some addresses are reserved for special
purposes such as private networks (≈18 million
addresses) and multicast addressing (≈270 million
addresses). Decomposition of an IPv4 address from dot-
decimal notation to its binary value
IPv4 addresses are usually represented in dot-decimal
notation, consisting of four decimal numbers, each
ranging from 0 to 255, separated by dots, e.g., [Link]. Each part represents a group of 8 bits (an
octet) of the address.[13] In some cases of technical writing, IPv4 addresses may be presented in
various hexadecimal, octal, or binary representations.
Subnetting history
In the early stages of development of the Internet Protocol, the network number was always the
highest order octet (most significant eight bits). Because this method allowed for only 256 networks, it
soon proved inadequate as additional networks developed that were independent of the existing
networks already designated by a network number. In 1981, the addressing specification was revised
with the introduction of classful network architecture.[2]
Classful network design allowed for a larger number of individual network assignments and fine-
grained subnetwork design. The first three bits of the most significant octet of an IP address were
defined as the class of the address. Three classes (A, B, and C) were defined for universal unicast
addressing. Depending on the class derived, the network identification was based on octet boundary
segments of the entire address. Each class used successively additional octets in the network
identifier, thus reducing the possible number of hosts in the higher order classes (B and C). The
following table gives an overview of this now-obsolete system.
2 097 152
C 110 24 8 256 (28) [Link] [Link]
(221)
Classful network design served its purpose in the startup stage of the Internet, but it lacked scalability
in the face of the rapid expansion of networking in the 1990s. The class system of the address space
was replaced with Classless Inter-Domain Routing (CIDR) in 1993. CIDR is based on variable-length
subnet masking (VLSM) to allow allocation and routing based on arbitrary-length prefixes. Today,
[Link] 3/13
12/22/25, 5:11 PM IP address - Wikipedia
remnants of classful network concepts function only in a limited scope as the default configuration
parameters of some network software and hardware components (e.g. netmask), and in the technical
jargon used in network administrators' discussions.
Private addresses
Early network design, when global end-to-end connectivity was envisioned for communications with
all Internet hosts, intended that IP addresses be globally unique. However, it was found that this was
not always necessary as private networks developed and public address space needed to be conserved.
Computers not connected to the Internet, such as factory machines that communicate only with each
other via TCP/IP, need not have globally unique IP addresses. Today, such private networks are
widely used and typically connect to the Internet with network address translation (NAT), when
needed.
Three non-overlapping ranges of IPv4 addresses for private networks are reserved.[14] These
addresses are not routed on the Internet and thus their use need not be coordinated with an IP
address registry. Any user may use any of the reserved blocks. Typically, a network administrator will
divide a block into subnets; for example, many home routers automatically use a default address
range of [Link] through [Link] ([Link]/24).
IPv6 addresses
In IPv6, the address size was increased from 32 bits in IPv4 to 128 bits, thus providing up to 2128
(approximately 3.403 × 1038) addresses. This is deemed sufficient for the foreseeable future.
The intent of the new design was not to provide just a sufficient quantity of addresses, but also
redesign routing in the Internet by allowing more efficient aggregation of subnetwork routing
prefixes. This resulted in slower growth of routing tables in routers. The smallest possible individual
allocation is a subnet for 264 hosts, which is the square of the size of the entire IPv4 Internet. At these
levels, actual address utilization ratios will be small on any IPv6 network segment. The new design
also provides the opportunity to separate the addressing infrastructure of a network segment, i.e. the
local administration of the segment's available space, from the addressing prefix used to route traffic
[Link] 4/13
12/22/25, 5:11 PM IP address - Wikipedia
All modern desktop and enterprise server operating systems include native support for IPv6, but it is
not yet widely deployed in other devices, such as residential networking routers, voice over IP (VoIP)
and multimedia equipment, and some networking hardware.
Private addresses
Just as IPv4 reserves addresses for private networks, blocks of addresses are set aside in IPv6. In
IPv6, these are referred to as unique local addresses (ULAs). The routing prefix fc00::/7 is reserved
for this block,[15] which is divided into two /8 blocks with different implied policies. The addresses
include a 40-bit pseudorandom number that minimizes the risk of address collisions if sites merge or
packets are misrouted.
Early practices used a different block for this purpose (fec0:: ), dubbed site-local addresses.[16]
However, the definition of what constituted a site remained unclear and the poorly defined addressing
policy created ambiguities for routing. This address type was abandoned and must not be used in new
systems.[17]
Addresses starting with fe80::, called link-local addresses, are assigned to interfaces for
communication on the attached link. The addresses are automatically generated by the operating
system for each network interface. This provides instant and automatic communication between all
IPv6 hosts on a link. This feature is used in the lower layers of IPv6 network administration, such as
for the Neighbor Discovery Protocol.
Private and link-local address prefixes may not be routed on the public Internet.
IP address assignment
IP addresses are assigned to a host either dynamically as they join the network, or persistently by
configuration of the host hardware or software. Persistent configuration is also known as using a
static IP address. In contrast, when a computer's IP address is assigned each time it restarts, this is
known as using a dynamic IP address.
[Link] 5/13
12/22/25, 5:11 PM IP address - Wikipedia
Dynamic IP addresses are assigned by network using Dynamic Host Configuration Protocol
(DHCP).[18] DHCP is the most frequently used technology for assigning addresses. It avoids the
administrative burden of assigning specific static addresses to each device on a network. It also allows
devices to share the limited address space on a network if only some of them are online at a particular
time. Typically, dynamic IP configuration is enabled by default in modern desktop operating systems.
The address assigned with DHCP is associated with a lease and usually has an expiration period. If the
lease is not renewed by the host before expiry, the address may be assigned to another device. Some
DHCP implementations attempt to reassign the same IP address to a host, based on its MAC address,
each time it joins the network. A network administrator may configure DHCP by allocating specific IP
addresses based on MAC address.
DHCP is not the only technology used to assign IP addresses dynamically. Bootstrap Protocol is a
similar protocol and predecessor to DHCP. Dialup and some broadband networks use dynamic
address features of the Point-to-Point Protocol.
Computers and equipment used for the network infrastructure, such as routers and mail servers, are
typically configured with static addressing.
In the absence or failure of static or dynamic address configurations, an operating system may assign
a link-local address to a host using stateless address autoconfiguration.
Address autoconfiguration
Address block [Link]/16 is defined for the special use of link-local addressing for IPv4
networks.[20] In IPv6, every interface, whether using static or dynamic addresses, also receives a link-
local address automatically in the block fe80::/10.[20] These addresses are only valid on the link, such
as a local network segment or point-to-point connection, to which a host is connected. These
addresses are not routable and, like private addresses, cannot be the source or destination of packets
traversing the Internet.
When the link-local IPv4 address block was reserved, no standards existed for mechanisms of address
autoconfiguration. Filling the void, Microsoft developed a protocol called Automatic Private IP
Addressing (APIPA), whose first public implementation appeared in Windows 98.[21] APIPA has been
[Link] 6/13
12/22/25, 5:11 PM IP address - Wikipedia
deployed on millions of machines and became a de facto standard in the industry. In May 2005, the
IETF defined a formal standard for it.[22]
Addressing conflicts
An IP address conflict occurs when two devices on the same local physical or wireless network claim
to have the same IP address. A second assignment of an address generally stops the IP functionality of
one or both of the devices. Many modern operating systems notify the administrator of IP address
conflicts.[23][24] When IP addresses are assigned by multiple people and systems with differing
methods, any of them may be at fault.[25][26][27][28][29] If one of the devices involved in the conflict is
the default gateway access beyond the LAN for all devices on the LAN, all devices may be impaired.
Routing
IP addresses are classified into several classes of operational characteristics: unicast, multicast,
anycast and broadcast addressing.
Unicast addressing
The most common concept of an IP address is in unicast addressing, available in both IPv4 and IPv6.
It normally refers to a single sender or a single receiver, and can be used for both sending and
receiving. Usually, a unicast address is associated with a single device or host, but a device or host
may have more than one unicast address. Sending the same data to multiple unicast addresses
requires the sender to send all the data many times over, once for each recipient.
Broadcast addressing
Broadcasting is an addressing technique available in IPv4 to address data to all possible destinations
on a network in one transmission operation as an all-hosts broadcast. All receivers capture the
network packet. The address [Link] is used for network broadcast. In addition, a more
limited directed broadcast uses the all-ones host address with the network prefix. For example, the
destination address used for directed broadcast to devices on the network [Link]/24 is
[Link] .[30]
IPv6 does not implement broadcast addressing and replaces it with multicast to the specially defined
all-nodes multicast address.
Multicast addressing
A multicast address is associated with a group of interested receivers. In IPv4, addresses [Link]
through [Link] (the former Class D addresses) are designated as multicast addresses.[31]
IPv6 uses the address block with the prefix ff00::/8 for multicast. In either case, the sender sends a
single datagram from its unicast address to the multicast group address and the intermediary routers
take care of making copies and sending them to all interested receivers (those that have joined the
corresponding multicast group).
[Link] 7/13
12/22/25, 5:11 PM IP address - Wikipedia
Anycast addressing
Like broadcast and multicast, anycast is a one-to-many routing topology. However, the data stream is
not transmitted to all receivers, just the one which the router decides is closest in the network.
Anycast addressing is a built-in feature of IPv6.[32][33] In IPv4, anycast addressing is implemented
with Border Gateway Protocol using the shortest-path metric to choose destinations. Anycast methods
are useful for global load balancing and are commonly used in distributed DNS systems.
Geolocation
A host may use geolocation to deduce the geographic position of its communicating peer.[34][35] This
is typically done by retrieving geolocation info about the IP address of the other node from a
database.[36]
Public address
A public IP address is a globally routable unicast IP address, meaning that the address is not an
address reserved for use in private networks, such as those reserved by RFC 1918 ([Link]
[Link]/rfc/rfc1918), or the various IPv6 address formats of local scope or site-local scope, for
example for link-local addressing. Public IP addresses may be used for communication between hosts
on the global Internet. In a home situation, a public IP address is the IP address assigned to the
home's network by the ISP. In this case, it is also locally visible by logging into the router
configuration.[37]
Most public IP addresses change relatively often. Any type of IP address that changes is called a
dynamic IP address. In home networks, the ISP usually assigns a dynamic IP. If an ISP gave a home
network an unchanging address, it is more likely to be abused by customers who host websites from
home, or by hackers who can try the same IP address over and over until they breach a network.[37]
Address translation
Multiple client devices can appear to share an IP address, either because they are part of a shared web
hosting service environment or because an IPv4 network address translator (NAT) or proxy server
acts as an intermediary agent on behalf of the client, in which case the real originating IP address is
masked from the server receiving a request. A common practice is to have a NAT mask many devices
in a private network. Only the public interface(s) of the NAT needs to have an Internet-routable
address.[38]
The NAT device maps different IP addresses on the private network to different TCP or UDP port
numbers on the public network. In residential networks, NAT functions are usually implemented in a
residential gateway. In this scenario, the computers connected to the router have private IP addresses
and the router has a public address on its external interface to communicate on the Internet. The
internal computers appear to share one public IP address.
[Link] 8/13
12/22/25, 5:11 PM IP address - Wikipedia
Law
In March 2024, the Supreme Court of Canada decided that IP addresses were protected private
information under the Canadian Charter of Rights and Freedoms, with police searches requiring a
warrant in order to obtain them.[39] IP addresses are considered personal data by the European
Commission and are protected by the General Data Protection Regulation.[40] In the USA, the
California Consumer Privacy Act only protects IP addresses that link to any particular consumer or
household; otherwise it is not private data and is not protected under American law.[41]
Diagnostic tools
Computer operating systems provide various diagnostic tools to examine network interfaces and
address configuration. Microsoft Windows provides the command-line interface tools ipconfig[42] and
netsh and users of Unix-like systems may use ifconfig, netstat, route, lanstat, fstat, and iproute2
utilities to accomplish the task.[43]
See also
Hostname
Internet portal
IP address blocking
IP address spoofing Computer
programming portal
IP aliasing
IP multicast
List of assigned /8 IPv4 address blocks
Reverse DNS lookup
Virtual IP address
WHOIS
References
1. J. Postel, ed. (January 1980). INTERNET PROTOCOL - DARPA INTERNET PROGRAM
PROTOCOL SPECIFICATION ([Link] IETF. doi:10.17487/RFC0760
([Link] RFC 760 ([Link]
IEN 128. Obsolete. Obsoleted by RFC 791 ([Link] Replaces IEN
123, 111, 80, 54, 44, 41, 28 and 26. Updated by RFC 777 ([Link]
2. J. Postel, ed. (September 1981). INTERNET PROTOCOL - DARPA INTERNET PROGRAM
PROTOCOL SPECIFICATION ([Link] IETF. doi:10.17487/RFC0791
([Link] STD 5. RFC 791 ([Link]
91). IEN 128, 123, 111, 80, 54, 44, 41, 28, 26. Internet Standard 5. Obsoletes RFC 760 ([Link]
[Link]/rfc/rfc760). Updated by RFC 1349 ([Link] 2474 (htt
ps://[Link]/rfc/rfc2474) and 6864 ([Link]
[Link] 9/13
12/22/25, 5:11 PM IP address - Wikipedia
3. S. Deering; R. Hinden (December 1995). Internet Protocol, Version 6 (IPv6) Specification (https://
[Link]/rfc/rfc1883). Network Working Group. doi:10.17487/RFC1883 ([Link]
0.17487%2FRFC1883). RFC 1883 ([Link] Obsolete.
Obsoleted by RFC 2460 ([Link]
4. S. Deering; R. Hinden (December 1998). Internet Protocol, Version 6 (IPv6) Specification (https://
[Link]/rfc/rfc2460). Network Working Group. doi:10.17487/RFC2460 ([Link]
0.17487%2FRFC2460). RFC 2460 ([Link] Obsolete.
Obsoleted by RFC 8200 ([Link] Obsoletes RFC 1883 ([Link]
[Link]/rfc/rfc1883). Updated by RFC 5095 ([Link] 5722 (h
ttps://[Link]/rfc/rfc5722), 5871 ([Link] 6437 ([Link]
[Link]/rfc/rfc6437), 6564 ([Link] 6935 ([Link]
[Link]/rfc/rfc6935), 6946 ([Link] 7045 ([Link]
c/rfc7045) and 7112 ([Link]
5. S. Deering; R. Hinden (July 2017). Internet Protocol, Version 6 (IPv6) Specification ([Link]
[Link]/rfc/rfc8200). Internet Engineering Task Force. doi:10.17487/RFC8200 ([Link]
0.17487%2FRFC8200). STD 86. RFC 8200 ([Link] Internet
Standard 86. Obsoletes RFC 2460 ([Link]
6. V. Cerf; Y. Dalal; C. Sunshine (December 1974). SPECIFICATION OF INTERNET
TRANSMISSION CONTROL PROGRAM ([Link] Network Working
Group. doi:10.17487/RFC0675 ([Link] RFC 675 ([Link]
[Link]/doc/html/rfc675). Obsolete. Obsoleted by RFC 7805 ([Link]
05). NIC 2. INWG 72.
7. Cerf, Vinton (March 1977). "IEN 5: Specification of Internet Transmission Control Program
(Version 2)" ([Link] (PDF). Internet Engineering Task
Force. Retrieved 18 September 2025.
8. Cerf, Vinton; Postel, Jonathon (January 1978). "IEN 21: Specification of Internetwork
Transmission Control Program (TCP) Version 3" ([Link]
pdf) (PDF). Internet Engineering Task Force. Retrieved 18 September 2025.
9. Cerf, Vint (14 February 1978). "IEN 26: A Proposed New Internet Header Format" ([Link]
[Link]/ietf-ftp/rfc/ien/scanned/[Link]) (PDF). Internet Engineering Task Force. Retrieved
18 September 2025.
10. Cerf, Vint (14 February 1978). "IEN 27: A Proposal for TCP Version 3.1 Header Format" ([Link]
[Link]/ietf-ftp/rfc/ien/scanned/[Link]) (PDF). Internet Engineering Task Force. Retrieved
18 September 2025.
11. Ross Callon (June 1992). TCP and UDP with Bigger Addresses (TUBA), A Simple Proposal for
Internet Addressing and Routing ([Link] Network Working Group.
doi:10.17487/RFC1347 ([Link] RFC 1347 ([Link]
[Link]/doc/html/rfc1347). Historic.
12. DeLong, Owen. "Why does IP have versions? Why do I care?" ([Link]
es/default/files/presentations/Why%20IP%20Versions%20and%20Why%20do%20I%[Link])
(PDF). Scale15x. Retrieved 24 January 2020.
13. "IPv4 and IPv6 address formats" ([Link]
ality-ipv4-ipv6-address-formats). IBM. "An IPv4 address has the following format: x . x . x . x
where x is called an octet and must be a decimal value between 0 and 255. Octets are separated
by periods. An IPv4 address must contain three periods and four octets. The following examples
are valid IPv4 addresses:
[Link]
01 . 102 . 103 . 104"
[Link] 10/13
12/22/25, 5:11 PM IP address - Wikipedia
[Link] 11/13
12/22/25, 5:11 PM IP address - Wikipedia
[Link] 12/13
12/22/25, 5:11 PM IP address - Wikipedia
39. Zimonjic, Peter. "Police now need a warrant to get a person's IP address, Supreme Court rules" (h
ttps://[Link]/news/politics/supreme-court-privacy-ipaddress-1.7130727). CBC News.
Retrieved 9 March 2024.
40. "What is personal data?" ([Link]
personal-data_en). European Commission. Retrieved 9 March 2024.
41. [Link]
42. "ipconfig" ([Link]
config). Microsoft Docs. 16 October 2017. Retrieved 25 August 2020.
43. "Interface Configuration for IP". Linux Network Administrators Guide ([Link]
book/linag2/book/[Link]). June 2000. Retrieved 12 March 2024.
[Link] 13/13