
An Internet Protocol version 6 address (IPv6 address) is a numeric label that is used to identify and locate a network interface of a computer or a
network node participating in a
computer network
A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
using
IPv6
Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
.
IP address
An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
es are included in the
packet header
In information technology, header is supplemental data placed at the beginning of a block of data being stored or transmitted. In data transmission, the data following the header is sometimes called the '' payload'' or '' body''.
It is vital that ...
to indicate the source and the destination of each packet. The IP address of the destination is used to make decisions about routing
IP packets to other networks.
IPv6 is the successor to the first addressing infrastructure of the
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
,
Internet Protocol version 4
Internet Protocol version 4 (IPv4) is the first version of the Internet Protocol (IP) as a standalone specification. It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks ...
(IPv4). In contrast to IPv4, which defined an IP address as a 32-bit value, IPv6 addresses have a size of 128 bits. Therefore, in comparison, IPv6 has a vastly enlarged
address space
In computing, an address space defines a range of discrete addresses, each of which may correspond to a network host, peripheral device, disk sector, a memory cell or other logical or physical entity.
For software programs to save and retrieve ...
.
Addressing methods
IPv6 addresses are classified by the primary addressing and routing methodologies common in networking: unicast addressing, anycast addressing, and multicast addressing.
A
unicast address identifies a single network interface. The Internet Protocol delivers packets sent to a unicast address to that specific interface.
An
anycast address is assigned to a group of interfaces, usually belonging to different nodes. A packet sent to an anycast address is delivered to just one of the member interfaces, typically the nearest host, according to the routing protocol's definition of distance. Anycast addresses cannot be identified easily, they have the same format as unicast addresses, and differ only by their presence in the network at multiple points. Almost any unicast address can be employed as an anycast address.
A
multicast
In computer networking, multicast is a type of group communication where data transmission is addressed to a group of destination computers simultaneously. Multicast can be one-to-many or many-to-many distribution. Multicast differs from ph ...
address is also used by multiple hosts that acquire the multicast address destination by participating in the multicast distribution protocol among the network routers. A packet that is sent to a
multicast address is delivered to all interfaces that have joined the corresponding multicast group. IPv6 does not implement
broadcast address
A broadcast address is a network address used to transmit to all devices connected to a multiple-access communications network. A message sent to a broadcast address may be received by all network-attached hosts.
In contrast, a multicast addr ...
ing. Broadcast's traditional role is subsumed by multicast addressing to the ''all-nodes'' link-local multicast group . However, the use of the all-nodes group is not recommended, and most IPv6 protocols use protocol-specific link-local multicast groups to avoid disturbing every interface on a given network.
Address formats
An IPv6 address consists of 128 bits.
For each of the major addressing and routing methodologies, various address formats are recognized by dividing the 128 address bits into bit groups and using established rules for associating the values of these bit groups with special addressing features.
Unicast and anycast address format
Unicast and
anycast addresses are typically composed of two logical parts: a 64-bit network prefix used for
routing
Routing is the process of selecting a path for traffic in a Network theory, network or between or across multiple networks. Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the public switched ...
, and a 64-bit interface identifier used to identify a host's network interface.
The ''network prefix'' (the ''routing prefix'' combined with the ''subnet ID'') is contained in the most significant 64 bits of the address. The size of the routing prefix may vary; a larger prefix size means a smaller subnet ID size. The bits of the ''subnet ID'' field are available to the network administrator to define subnets within the given network. The 64-bit ''interface identifier'' is automatically established randomly, obtained from a
DHCPv6 server, or assigned manually. (Historically, it was automatically generated from the interface's
MAC address
A MAC address (short for medium access control address or media access control address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use i ...
using the
modified EUI-64 format, but this method is now not recommended for privacy reasons.)
Unique local addresses are addresses analogous to IPv4
private network
In Internet networking, a private network is a computer network that uses a private address space of IP addresses. These addresses are commonly used for local area networks (LANs) in residential, office, and enterprise environments. Both the IPv ...
addresses.
The ''prefix'' field contains the binary value 1111110. The ''L'' bit is one for locally assigned addresses; the address range with ''L'' set to zero is currently not defined. The ''random'' field is chosen randomly once, at the inception of the routing prefix.
A link-local address is also based on the interface identifier, but uses a different format for the network prefix.
The ''prefix'' field contains the binary value 1111111010. The 54 zeroes that follow make the total network prefix the same for all link-local addresses ( link-local address prefix), rendering them non-routable.
Multicast address format
Multicast
In computer networking, multicast is a type of group communication where data transmission is addressed to a group of destination computers simultaneously. Multicast can be one-to-many or many-to-many distribution. Multicast differs from ph ...
addresses are formed according to several specific formatting rules, depending on the application.
For all multicast addresses, the ''prefix'' field holds the binary value 11111111.
Currently, three of the four flag bits in the ''flg'' field are defined; the most-significant flag bit is reserved for future use.
The four-bit scope field (''sc'') is used to indicate where the address is valid and unique.
In addition, the scope field is used to identify special multicast addresses, like solicited node.
The ''sc(ope)'' field holds the binary value 0010 (link-local). Solicited-node multicast addresses are computed as a function of a node's unicast or anycast addresses. A solicited-node multicast address is created by copying the last 24 bits of a unicast or anycast address to the last 24 bits of the multicast address.
Link-scoped multicast addresses use a comparable format.
Representation
An IPv6 address is represented as eight groups of four hexadecimal
Hexadecimal (also known as base-16 or simply hex) is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbo ...
digits, each group representing 16 bits The groups are separated by colons (:). An example of an IPv6 address is:
The standards provide flexibility in the representation of IPv6 addresses. The full representation of eight four-digit groups may be simplified by several techniques, eliminating parts of the representation. In general, representations are shortened as much as possible. However, this practice complicates several common operations, namely searching for a specific address or an address pattern in text documents or streams, and comparing addresses to determine equivalence. For mitigation of these complications, the Internet Engineering Task Force
The Internet Engineering Task Force (IETF) is a standards organization for the Internet standard, Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster ...
(IETF) has defined a canonical format for rendering IPv6 addresses in text:
* The hexadecimal digits are always compared in case-insensitive manner, but IETF recommendations suggest the use of only lower case letters. For example, ''2001:db8::1'' is preferred over ''2001:DB8::1'';
* Leading zeros in each 16-bit field are suppressed, but each group must retain at least one digit. For example, is rendered as ;
* The longest sequence of consecutive all-zero fields is replaced with two colons (''::''). If the address contains multiple runs of all-zero fields of the same size, to prevent ambiguities, it is the leftmost that is compressed. For example, is rendered as rather than as . ''::'' is not used to represent just a single all-zero field. For example, is shortened to , but is rendered as .
These methods can lead to very short representations for IPv6 addresses. For example, the localhost (loopback) address, , and the IPv6 unspecified address, , are reduced to and , respectively.
During the transition of the Internet from IPv4 to IPv6, it is typical to operate in a mixed addressing environment. For such use cases, a special notation has been introduced, which expresses IPv4-mapped and IPv4-compatible IPv6 addresses by writing the least-significant 32 bits of an address in the familiar IPv4 dot-decimal notation, whereas the 96 most-significant bits are written in IPv6 format. For example, the IPv4-mapped IPv6 address is written as , thus expressing clearly the original IPv4 address that was mapped to IPv6.
Networks
An IPv6 network uses an address block that is a contiguous group of IPv6 addresses of a size that is a power of two
A power of two is a number of the form where is an integer, that is, the result of exponentiation with number 2, two as the Base (exponentiation), base and integer as the exponent. In the fast-growing hierarchy, is exactly equal to f_1^ ...
. The leading set of bits of the addresses are identical for all hosts in a given network, and are called the network's address or routing ''prefix''.
Network address ranges are written in CIDR notation
Classless Inter-Domain Routing (CIDR ) is a method for allocating IP addresses for IP routing. The Internet Engineering Task Force introduced CIDR in 1993 to replace the previous classful network addressing architecture on the Internet. Its goal ...
. A network is denoted by the first address in the block (ending in all zeroes), a slash (/), and a decimal
The decimal numeral system (also called the base-ten positional numeral system and denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers (''decimal fractions'') of th ...
value equal to the size in bits of the prefix. For example, the network written as starts at address and ends at .
The routing prefix of an interface address may be directly indicated with the address using CIDR notation. For example, the configuration of an interface with address connected to subnet is written as .
Address block sizes
The size of a block of addresses is specified by writing a slash (/) followed by a number in decimal whose value is the length of the network prefix in bits. For example, an address block with 48 bits in the prefix is indicated by . Such a block contains 2128 − 48 = 280 addresses. The smaller the length of the network prefix, the larger the block: a block is 8 times larger than a block.
Literal IPv6 addresses in network resource identifiers
Colon (:) characters in IPv6 addresses may conflict with the established syntax of resource identifiers, such as URIs and URL
A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
s. The colon is conventionally used to terminate the host path before a port number
In computer networking, a port is a communication endpoint. At the software level within an operating system, a port is a logical construct that identifies a specific process or a type of network service. A port is uniquely identified by a numbe ...
. To alleviate this conflict, literal IPv6 addresses are enclosed in square brackets in such resource identifiers, for example:
When the URL also contains a port number the notation is:
where the trailing 443 is the example's port number.
Scoped literal IPv6 addresses (with zone index)
For addresses with other than global scope (as described in ), and in particular for link-local addresses, the choice of the network interface for sending a packet may depend on which zone the address belongs to. The same address may be valid in different zones, and in use by a different host in each of those zones. Even if a single address is not in use in different zones, the address prefixes for addresses in those zones may still be identical, which makes the operating system unable to select an outgoing interface based on the information in the routing table
In computer networking, a routing table, or routing information base (RIB), is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases, metrics (distances) associated wi ...
(which is prefix-based).
In order to resolve the ambiguity in textual addresses, a ' must be appended to the address. The zone index is separated from the address by a percent sign
The percent sign (sometimes per cent sign in British English) is the symbol used to indicate a percentage, a number or ratio as a fraction (mathematics), fraction of 100. Related signs include the permille (per thousand) sign and the Basis p ...
(%). Although numeric zone indices must be universally supported, the zone index may also be an implementation-dependent string. The link-local address
could be expressed by
or
The former (using an interface name) is customary on most Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
-like operating systems (e.g., BSD
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
, Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
).[ "The KAME implementation supports an extended numeric IPv6 address notation for link-local addresses, like "fe80::1%de0" ..draft-ietf-ipngwg-scopedaddr-format-02.txt"]
The latter (using an interface number) is the only syntax on Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, but as support for this syntax is mandatory per standard, it is also available on other operating systems.
BSD-based operating systems (including macOS) also support an alternative, non-standard syntax, where a numeric zone index is encoded in the second 16-bit word of the address. E.g.:
In all operating systems mentioned above, the zone index for link-local addresses actually refers to an interface, not to a zone. As multiple interfaces may belong to the same zone (e.g. when connected to the same network), in practice two addresses with different zone identifiers may actually be equivalent, and refer to the same host on the same link.
When used in uniform resource identifier
A Uniform Resource Identifier (URI), formerly Universal Resource Identifier, is a unique sequence of characters that identifies an abstract or physical resource, such as resources on a webpage, mail address, phone number, books, real-world obje ...
s (URI), the use of the percent sign causes a syntax conflict, therefore it must be escaped via percent-encoding
URL encoding, officially known as percent-encoding, is a method to binary-to-text encoding, encode arbitrary data in a uniform resource identifier (URI) using only the ASCII, US-ASCII characters legal within a URI. Although it is known as ''URL en ...
, e.g.:
Literal IPv6 addresses in UNC path names
In Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
operating systems, IPv4 addresses are valid location identifiers in Uniform Naming Convention
A path (or filepath, file path, pathname, or similar) is a text string that uniquely specifies an item in a hierarchical file system. Generally, a path is composed of directory names, special directory specifiers and optionally a filename, sep ...
(UNC) path names. However, the colon is an illegal character in a UNC path name. Thus, the use of IPv6 addresses is also illegal in UNC names. For this reason, Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
implemented a transcription algorithm to represent an IPv6 address in the form of a domain name that can be used in UNC paths. For this purpose, Microsoft registered and reserved the second-level domain
In the Domain Name System (DNS) hierarchy, a second-level domain (SLD or 2LD) is a domain that is directly below a top-level domain (TLD). For example, in , is the second-level domain of the TLD.
Second-level domains commonly refer to the organ ...
''ipv6-literal.net'' on the Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
(although they gave up the domain in January 2014). IPv6 addresses are transcribed as a hostname or subdomain name within this namespace
In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified.
Namespaces ...
, in the following fashion:
is written as
This notation is automatically resolved locally by Microsoft software, without any queries to DNS name servers.
If the IPv6 address contains a zone index, it is appended to the address portion after an 's' character:
is written as
Address scopes
Every IPv6 address, except the unspecified address (), has a ''scope'', which specifies in which part of the network it is valid.
Unicast
For unicast addresses, two scopes are defined: link-local and global.
Link-local addresses and the loopback address have ''link-local'' scope, which means they can only be used on a single directly attached network. All other addresses (including unique local addresses) have ''global'' (or ''universal'') scope, which means they are potentially globally routable and can be used to connect to addresses with ''global'' scope anywhere, or to addresses with ''link-local'' scope on the directly attached network.
Unique local addresses have global scope, but they are not globally administered. As a result, only other hosts in the same administrative domain (e.g., an organization), or within a cooperating administrative domain are able to reach such addresses, if properly routed. As their scope is global, these addresses are valid as a source address when communicating with any other global-scope address, even though it may be impossible to route packets from the destination back to the source.
Anycast
Anycast addresses are syntactically identical to and indistinguishable from unicast addresses. Their only difference is administrative. Scopes for anycast addresses are therefore the same as for unicast addresses.
Multicast
For multicast
In computer networking, multicast is a type of group communication where data transmission is addressed to a group of destination computers simultaneously. Multicast can be one-to-many or many-to-many distribution. Multicast differs from ph ...
addresses, the four least-significant bits of the second address octet () identify the address scope, i.e. the domain in which the multicast packet should be propagated. Predefined and reserved scopes are:
All other scopes are unassigned and available to administrators for defining additional regions.
Address space
General allocation
The management of IPv6 address allocation process is delegated to the Internet Assigned Numbers Authority
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, Autonomous system (Internet), autonomous system number allocation, DNS root zone, root zone management in the Domain Name Syste ...
(IANA) by the Internet Architecture Board
The Internet Architecture Board (IAB) is a committee of the Internet Engineering Task Force (IETF) and an advisory body of the Internet Society (ISOC). Its responsibilities include architectural oversight of IETF activities, Internet Standards ...
and the Internet Engineering Steering Group
The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and ...
. Its main function is the assignment of large address blocks to the regional Internet registries
A regional Internet registry (RIR) is an organization that manages the allocation and registration of Internet number resources within a region of the world. Internet number resources include IP addresses and autonomous system (Internet), autonom ...
(RIRs), which have the delegated task of allocation to network service
In computer networking, a network service is an application running at the network layer and above, that provides data storage, manipulation, presentation, communication or other capability which is often implemented using a client–server or pe ...
providers and other local registries. The IANA has maintained the official list of allocations of the IPv6 address space since December 1995.
In order to allow efficient route aggregation, thereby reducing the size of the Internet routing tables, only one-eighth of the total address space () is currently allocated for use on the Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
. The rest of the IPv6 address space is reserved for future use or for special purposes. The address space is assigned to the RIRs in blocks of up to .
The RIRs assign smaller blocks to local Internet registries that distribute them to users. These are typically in sizes from to . Global unicast assignment records can be found at the various RIRs or other websites.
The addresses are then typically distributed in to sized blocks to the end users. IPv6 addresses are assigned to organizations in much larger blocks as compared to IPv4 address assignments—the recommended allocation is a block which contains 280 addresses, being 248 or about times larger than the entire IPv4 address space of 232 addresses and about times larger than the blocks of IPv4 addresses, which are the largest allocations of IPv4 addresses. The total pool, however, is sufficient for the foreseeable future, because there are 2128 (exactly 340,282,366,920,938,463,463,374,607,431,768,211,456; or about , or 340 undecillion) unique IPv6 addresses.
Each RIR can divide each of its multiple blocks into 512 blocks, typically one for each ISP; an ISP can divide its block into blocks, typically one for each customer; customers can create networks from their assigned block, each having 264 (exactly 18,446,744,073,709,551,616; or about ) addresses. In contrast, the entire IPv4 address space has only 232 (exactly 4,294,967,296; or about ) addresses.
By design, only a small fraction of the address space will be used actively. The large address space ensures that addresses are almost always available, which makes the use of network address translation
Network address translation (NAT) is a method of mapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic Router (computing), routing device. The te ...
(NAT) for the purposes of address conservation unnecessary. NAT has been increasingly used for IPv4 networks to help alleviate IPv4 address exhaustion
IPv4 address exhaustion is the depletion of the pool of unallocated IPv4 addresses. Because the original Internet architecture had fewer than 4.3 1000000000 (number), billion addresses available, depletion has been anticipated since the late 19 ...
.
Special allocation
Provider-independent address space is assigned directly to the end user by the RIRs from the special range and allows customers to make provider changes without renumbering their networks.
Internet exchange point
Internet exchange points (IXes or IXPs) are common grounds of Internet Protocol, IP networking, allowing participant Internet service provider, Internet service providers (ISPs) to exchange data destined for their respective networks. IXPs are ...
s (IXPs) are assigned special addresses from the ranges , , and for communication with their connected ISPs.
Root name server
A root name server is a name server for the root zone of the Domain Name System (DNS) of the Internet. It directly answers requests for records in the root zone and answers other requests by returning a list of the authoritative name servers for ...
s have been assigned addresses from the range .
Reserved anycast addresses
The lowest address within each subnet prefix (the interface identifier set to all zeroes) is reserved as the ''subnet-router'' anycast address. Applications may use this address when talking to any one of the available routers, as packets sent to this address are delivered to just one router.
The 128 highest addresses within each subnet prefix are reserved to be used as anycast addresses. These addresses usually have the first 57 bits of the interface identifier set to 1, followed by the 7-bit anycast ID. Prefixes for the network can be of any length for routing purposes, but subnets are required to have a length of 64 bits. The address with value 0x7e in the 7 least-significant bits is defined as a mobile IPv6 home agents anycast address. The address with value 0x7f (all bits 1) is reserved and may not be used. No more assignments from this range have been made, so all the remaining values, 0x00 through 0x7d, are reserved as well.
Special addresses
There are a number of addresses with special meaning in IPv6. The IANA maintains a registry of these special-purpose addresses. They represent less than 2% of the entire address space:
Unicast addresses
Unspecified address
* The address with all zero bits is called the ''unspecified address'' (corresponding to in IPv4). This address must never be assigned to an interface and is to be used only in software before the application has learned its host's source address appropriate for a pending connection. Routers must not forward packets with the unspecified address.
Applications may listen on one or more specific interfaces for incoming connections, which are shown in listings of active internet connections by a specific IP address (and a port number, separated by a colon). When the unspecified address is shown it means that an application is listening for incoming connections on all available interfaces.
In routing table configuration, the unspecified address may be used to represent the default route address (corresponding to in IPv4) for destination addresses (unicast, multicast and others) not specified elsewhere in a routing table.
Local addresses
* The loopback address is a unicast localhost
In computer networking, localhost is a hostname that refers to the current computer used to access it. The name ''localhost'' is reserved for loopback purposes.
It is used to access the network services that are running on the host via t ...
address. This address corresponds to in IPv4.
If an application in a host sends packets to this address, the IPv6 stack loops these packets back on the same virtual interface.
* Addresses in the link-local prefix are only valid and unique on the local subnet. This address range is comparable to the auto-configuration addresses of IPv4.
Within this prefix only one subnet is allocated (there are 54 zero bits), yielding an effective format of . The least significant 64 bits were previously chosen as the interface hardware address constructed in modified EUI-64 format, but are now pseudo-random values for privacy. A link-local address
In computer networking, a link-local address is a network address that is valid only for communications on a ''local link'', i.e. within a subnetwork that a host is connected to. Link-local addresses are typically assigned automatically through ...
is required on every IPv6-enabled interface and applications may rely on the existence of a link-local address even when there is no IPv6 routing.
Unique local addresses
* — Unique local addresses (ULAs) are intended for local communication (comparable to IPv4 private addresses , and ).
They are routable only within a set of cooperating sites. The block is split into two halves. The lower half of the block () was intended for globally allocated prefixes, but an allocation method has yet to be defined. The upper half () is used for ''probabilistically unique'' addresses in which the prefix is combined with a 40-bit locally generated pseudorandom
A pseudorandom sequence of numbers is one that appears to be statistically random, despite having been produced by a completely deterministic and repeatable process. Pseudorandom number generators are often used in computer programming, as tradi ...
number to obtain a private prefix. The procedure for selecting a 40-bit number results in only a negligible chance that two sites that wish to merge or communicate encounter address collisions, but can use the same prefix.
Transition from IPv4
* — This prefix is used for IPv6 transition mechanisms and designated as an ''IPv4-mapped IPv6 address''.
With a few exceptions, this address type allows the transparent use of the transport layer
In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end c ...
protocols over IPv4 through the IPv6 networking application programming interface
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
. In this dual-stack
Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IP ...
configuration, server applications only need to open a single listening socket to handle connections from clients using IPv6 or IPv4 protocols. IPv6 clients are handled natively by default, and IPv4 clients appear as IPv6 clients at their IPv4-mapped IPv6 address. Transmission is handled similarly; established sockets may be used to transmit IPv4 or IPv6 datagram
A datagram is a basic transfer unit associated with a packet-switched network. Datagrams are typically structured in header and payload sections. Datagrams provide a connectionless communication service across a packet-switched network. The de ...
, based on the binding to an IPv6 address, or an IPv4-mapped address.
* — A prefix used for ''IPv4-translated addresses''. These are used by the Stateless IP/ICMP Translation (SIIT) protocol.
* — The ''well-known prefix''. Addresses with this prefix are used for automatic IPv4/IPv6 translation.[
* — A prefix for locally translated IPv4/IPv6 addresses. Addresses with this prefix can be used for multiple IPv4/IPv6 translation mechanisms like NAT64 and SIIT.] Compared to , these addresses contain their translated IPv4 address in positions 48-63 and 72-87.[ This means that for every IPv4 address a IPv6 prefix is assigned to the device. This enables similar use cases as 6to4, where a single public IPv4 address gets translated into a prefix. This way, only one level of NAT is required and the devices do not need to do NAT66 internally if they need additional addresses, e.g. for P2P interfaces or docker containers.
* — This prefix was used for 6to4 addressing (prefix from the IPv4 network, , was also used).]
The 6to4 addressing scheme is deprecated.[
]
Special-purpose addresses
IANA has reserved a so-called ''Sub-TLA ID'' address block for special assignments of (split into the range of 64 network prefixes through ). Three assignments from this block are currently allocated:
* — Used for Teredo tunneling, an IPv6 transition mechanism
An IPv6 transition mechanism is a technology that facilitates the transitioning of the Internet from the Internet Protocol version 4 (IPv4) infrastructure in use since 1983 to the successor addressing and routing system of Internet Protocol Ver ...
.
* — Used for benchmarking
Benchmarking is the practice of comparing business processes and performance metrics to industry bests and best practices from other companies. Dimensions typically measured are Project management triangle, quality, time and cost.
Benchmarking is ...
IPv6. Corresponds with used for benchmarking IPv4. Assigned to the Benchmarking Methodology Working Group (BMWG).
* — Overlay Routable Cryptographic Hash Identifiers (ORCHIDv2).[ These are non-routed IPv6 addresses used for ]cryptographic hash
A cryptographic hash function (CHF) is a hash algorithm (a map of an arbitrary binary string to a binary string with a fixed size of n bits) that has special properties desirable for a cryptographic application:
* the probability of a particu ...
es.
Documentation
* — This prefix is used in documentation,[ anywhere an example IPv6 address is given or model networking scenarios are described.
* — This documentation prefix was allocated in 2024 to account for modern-day large-scale network modelling, that cannot be covered by a single prefix.
]
Discard
* — This prefix is used for discarding traffic.[
]
Deprecated and obsolete
See
Multicast addresses
The multicast addresses , where is any hexadecimal value, are reserved and managed by the Internet Assigned Numbers Authority
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, Autonomous system (Internet), autonomous system number allocation, DNS root zone, root zone management in the Domain Name Syste ...
(IANA).
Solicited-node multicast address
The least significant 24 bits of the solicited-node multicast address group ID are filled with the least significant 24 bits of the interface's unicast or anycast address. These addresses allow link-layer address resolution via Neighbor Discovery Protocol
The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the internet layer of the Internet model, and is responsible for ...
(NDP) on the link without disturbing all nodes on the local network. A host is required to join a solicited-node multicast group for each of its configured unicast or anycast addresses.
Stateless address autoconfiguration (SLAAC)
On system startup, a node automatically creates a link-local address
In computer networking, a link-local address is a network address that is valid only for communications on a ''local link'', i.e. within a subnetwork that a host is connected to. Link-local addresses are typically assigned automatically through ...
on each IPv6-enabled interface, even if globally routable addresses are manually configured or obtained through ''configuration protocols'' (see below). It does so independently and without any prior configuration by stateless address autoconfiguration (SLAAC), using a component of the Neighbor Discovery Protocol
The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the internet layer of the Internet model, and is responsible for ...
. This address is selected with the prefix .
In IPv4, typical ''configuration protocols'' include DHCP or PPP. Although DHCPv6 exists, IPv6 hosts normally use the Neighbor Discovery Protocol
The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the internet layer of the Internet model, and is responsible for ...
to create a globally routable unicast address: the host sends router solicitation requests and an IPv6 router responds with a prefix assignment.
Interface identifier
The lower 64 bits of these addresses are populated with a 64-bit interface identifier. This should be a pseudo-random number for privacy reasons. Also for privacy reasons, the interface identifier is different for each automatically configured address of that interface. This has the disadvantage that multiple multicast
In computer networking, multicast is a type of group communication where data transmission is addressed to a group of destination computers simultaneously. Multicast can be one-to-many or many-to-many distribution. Multicast differs from ph ...
groups need to be joined for neighbor discovery. For this, the solicited-node multicast address is used, formed from the network prefix and the 24 least significant bits of the address.
A 64-bit interface identifier can be derived from the interface's 48-bit MAC address
A MAC address (short for medium access control address or media access control address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use i ...
, although stable privacy addresses are now recommended as a default instead. A MAC address is turned into a 64-bit EUI-64 by inserting in the middle: .
Duplicate address detection
The assignment of a unicast IPv6 address to an interface involves an internal test for the uniqueness of that address using ''Neighbor Solicitation'' and ''Neighbor Advertisement'' (ICMPv6
Internet Control Message Protocol version 6 (ICMPv6) is the implementation of the Internet Control Message Protocol (ICMP) for Internet Protocol version 6 (IPv6). ICMPv6 is an integral part of IPv6 and performs error reporting and diagnostic fu ...
type 135 and 136) messages. While in the process of establishing uniqueness an address has a ''tentative'' state.
The node joins the ''solicited-node'' multicast address for the tentative address and sends neighbor solicitations, with the tentative address as the target address and the unspecified address () as its source address. The node also joins the all-hosts multicast address , so it can receive ''Neighbor Advertisements''.
If a node receives a neighbor solicitation with its own tentative address as the target address, then it knows its address is not unique. The same is true if the node receives a neighbor advertisement with the tentative address as the source of the advertisement. Only after having successfully established that an address is unique may it be assigned and used by an interface.
When an anycast address is assigned to an interface (e.g. a subnet-router anycast address), due to the inherent non-uniqueness of this type of address, duplicate address detection is not performed.
Address lifetime
Each IPv6 address that is bound to an interface has a defined lifetime. Lifetimes are infinite, unless configured to a shorter period. There are two lifetimes that govern the state of an address: the ''preferred lifetime'' and the ''valid lifetime''. Lifetimes can be configured in routers that provide the values used for autoconfiguration, or specified when manually configuring addresses on interfaces.
When an address is assigned to an interface it gets the status ''preferred'', which it holds during its preferred-lifetime. After that lifetime expires the status becomes ''deprecated'' and no new connections should be made using this address. The address becomes ''invalid'' after its valid-lifetime also expires; the address is removed from the interface and may be assigned somewhere else on the Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
.
Temporary addresses
The globally unique and static MAC addresses used by stateless address autoconfiguration to create interface identifiers offer an opportunity to track user equipment In the Universal Mobile Telecommunications System (UMTS) and 3GPP Long Term Evolution (LTE), user equipment (UE) is any device used directly by an end-user to communicate. It can be a hand-held telephone, a laptop computer equipped with a mobile b ...
across time and IPv6 network prefix changes. To reduce the prospect of a user identity being permanently tied to an IPv6 address portion, a node may create temporary addresses with interface identifiers based on time-varying random bit strings and relatively short lifetimes (hours to days), after which they are replaced with new addresses.
Temporary addresses may be used as source addresses for originating connections, while external hosts use a public address by querying the Domain Name System
The Domain Name System (DNS) is a hierarchical and distributed name service that provides a naming system for computers, services, and other resources on the Internet or other Internet Protocol (IP) networks. It associates various information ...
(DNS).
Network interfaces configured for IPv6 use temporary addresses by default in OS X Lion and later Apple systems as well as in Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
, Windows 2008 Server and later Microsoft systems.
Cryptographically generated addresses
As a means to enhance security for Neighbor Discovery Protocol
The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the internet layer of the Internet model, and is responsible for ...
''cryptographically generated addresses'' (CGAs) were introduced in 2005 as part of the Secure Neighbor Discovery (SEND) protocol.
Such an address is generated using two hash function
A hash function is any Function (mathematics), function that can be used to map data (computing), data of arbitrary size to fixed-size values, though there are some hash functions that support variable-length output. The values returned by a ...
s that take several inputs. The first uses a public key and a random modifier; the latter being incremented repeatedly until a specific amount of zero bits of the resulting hash is acquired. The second hash function takes the network prefix and the previous hash value. The least significant 64 bits of the second hash result is appended to the 64-bit network prefix to form a 128-bit address.
The hash functions can also be used to verify if a specific IPv6 address satisfies the requirement of being a valid CGA. This way, communication can be set up between trusted addresses exclusively.
Stable privacy addresses
The use of the modified EUI-64 format has serious implications for security and privacy concerns, because the underlying hardware address (most typically the MAC address
A MAC address (short for medium access control address or media access control address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use i ...
) is exposed beyond the local network, permitting the tracking of user activities and correlation of user accounts to other information. It also permits vendor-specific attack strategies and reduces the size of the address space for searching for attack targets.
Stable privacy addresses were introduced to remedy these shortcomings. They are stable within a specific network but change when moving to another, to improve privacy. They are chosen deterministically, but randomly, in the entire address space of the network.
Generation of a stable privacy address is based on a hash function that uses several stable parameters. It is implementation specific, but it is recommended to include at least the network prefix, the name of the network interface, a duplicate address counter, and a secret key. The resulting hash value is used to construct the final address: Typically the 64 least significant bits are concatenated to the 64-bit network prefix, to yield a 128-bit address. If the network prefix is smaller than 64 bits, more bits of the hash are used. If the resulting address does not conflict with existing or reserved addresses, it is assigned to the interface. Conflicts are resolved by adjusting the duplicate address counter.
Default address selection
IPv6-enabled network interfaces usually have more than one IPv6 address, for example, a link-local and a global address. They may also have temporary addresses that change after a certain lifetime has expired. IPv6 introduces the concepts of address scope and selection preference, yielding multiple choices for source and destination addresses in communication with another host.
The preference selection algorithm selects the most appropriate address to use in communications with a particular destination, including the use of IPv4-mapped addresses in dual-stack
Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IP ...
implementations. It uses a configurable preference table that associates each routing prefix with a precedence level. The default table has the following content:
The default configuration places preference on IPv6 usage, and selects destination addresses within the smallest possible scope, so that link-local communication is preferred over globally routed paths when otherwise equally suitable. The prefix policy table is similar to a routing table, with the precedence value serving as the role of a link cost, where higher preference is expressed as a larger value. Source addresses are preferred to have the same label value as the destination address. Addresses are matched to prefixes based on the longest-matching most-significant bit sequence. Candidate source addresses are obtained from the operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
and candidate destination addresses may be queried via DNS.
To minimize the time to establish a connection when multiple addresses are available for communication, the Happy Eyeballs algorithm was devised. It queries DNS for IPv6 and IPv4 addresses of the target host, sorts candidate addresses using the default address selection table, and tries to establish connections in parallel. The first established connection aborts current and future attempts to connect to other addresses.
Domain Name System
In the Domain Name System
The Domain Name System (DNS) is a hierarchical and distributed name service that provides a naming system for computers, services, and other resources on the Internet or other Internet Protocol (IP) networks. It associates various information ...
, hostnames are mapped to IPv6 addresses by ''AAAA'' resource records, so-called ''quad-A'' records. For reverse lookup the IETF reserved the domain ip6.arpa, where the name space is hierarchically divided by the 1-digit hexadecimal
Hexadecimal (also known as base-16 or simply hex) is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbo ...
representation of nibble
In computing, a nibble, or spelled nybble to match byte, is a unit of information that is an aggregation of four- bits; half of a byte/ octet. The unit is alternatively called nyble, nybl, half-byte or tetrade. In networking or telecommuni ...
units (4 bits) of the IPv6 address.
As in IPv4, each host is represented in the DNS by two DNS records: an address record and a reverse mapping pointer record. For example, a host computer named ''derrick'' in zone ''example.com'' has the unique local address . Its quad-A address record is
derrick.example.com. IN AAAA fdda:5cc1:23:4::1f
and its IPv6 pointer record is
f.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.3.2.0.0.1.c.c.5.a.d.d.f.ip6.arpa. IN PTR derrick.example.com.
This pointer record may be defined in a number of zones, depending on the chain of delegation of authority in the zone d.f.ip6.arpa.
The DNS protocol is independent of its transport layer
In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end c ...
protocol. Queries and replies may be transmitted over IPv6 or IPv4 transports regardless of the address family of the data requested.
Historical notes
Deprecated and obsolete addresses
* The site-local prefix specifies that the address is valid only within the site network of an organization. It was part of the original addressing architecture in December 1995, but its use was deprecated in September 2004 because the definition of the term ''site'' was ambiguous, which led to confusing routing rules. New networks must not support this special type of address. In October 2005, a new specification replaced this address type with unique local addresses.
* The address block was defined as an OSI NSAP-mapped prefix set in August 1996, but was deprecated in December 2004.
* The 96-bit zero-value prefix , originally known as ''IPv4-compatible addresses'', was mentioned in 1995 but never fully described. This range of addresses was used to represent IPv4
Internet Protocol version 4 (IPv4) is the first version of the Internet Protocol (IP) as a standalone specification. It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. ...
addresses within an IPv6 transition technology. Such an IPv6 address has its first (most significant) 96 bits set to zero, while its last 32 bits are the represented IPv4 address. In February 2006, the IETF deprecated the use of IPv4-compatible addresses. The only remaining use of this address format is to represent an IPv4 address in a table or database with fixed size members that must also be able to store an IPv6 address.
* Address block was allocated for test purposes for the 6bone network in December 1998. Prior to that, the address block was used for this purpose. Both address blocks were returned to the address pool in June 2006.
* Due to operational problems with 6to4 the use of address block is diminishing, since the 6to4 mechanism is deprecated since May 2015. Although IPv4 address block is deprecated, is not.
* In April 2007 the address block was assigned for Overlay Routable Cryptographic Hash Identifiers (ORCHID). It was intended for experimental use. In September 2014 a second version of ORCHID was specified, and with the introduction of block the original block was returned to IANA
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Internet P ...
.
Miscellaneous
* For reverse DNS lookup
In computer networks, a reverse DNS lookup or reverse DNS resolution (rDNS) is the querying technique of the Domain Name System (DNS) to determine the domain name associated with an IP address – the reverse of the usual "forward" DNS lookup o ...
, IPv6 addresses were originally registered in the DNS zone ''ip6.int'', because it was expected that the top-level domain arpa would be retired. In 2000, the Internet Architecture Board
The Internet Architecture Board (IAB) is a committee of the Internet Engineering Task Force (IETF) and an advisory body of the Internet Society (ISOC). Its responsibilities include architectural oversight of IETF activities, Internet Standards ...
(IAB) reverted this intention and decided in 2001 that arpa should retain its original function. Domains in ip6.int were moved to ip6.arpa and zone ip6.int was officially removed on 6 June 2006.
* In March 2011, the IETF refined the recommendations for allocation of address blocks to end sites. Instead of assigning either a , , or (according to IAB's and IESG's views of 2001), Internet service providers should consider assigning smaller blocks (for example a ) to end users. The ARIN Arin may refer to:
__NOTOC__ Geography
* Arin, Armenia, a town in Armenia
* Arin River, a tributary of the Someşul Mare River in Romania
* Ujjain, an Indian city used as the center of ancient and medieval world maps, which was corrupted in Latin ...
, RIPE and APNIC regional registries' policies encourage assignments where appropriate.
* Originally, two proposals existed for translating domain names to IPv6 addresses: one using AAAA records, the other using A6 records. AAAA records, the method that prevailed, are comparable to A records for IPv4, providing a simple mapping from hostname to IPv6 address. The method using A6 records used a hierarchical scheme, in which the mapping of subsequent groups of address bits was specified by additional A6 records, providing the possibility to renumber all hosts in a network by changing a single A6 record. As the perceived benefits of the A6 format were not deemed to outweigh the perceived costs,Comparison of AAAA and A6 (do we really need A6?)
Jun-ichiro itojun Hagino, (July 2001) the method was moved to experimental status in 2002,[ and finally to historic status in 2012.][
* In 2009, many DNS resolvers in home-networking NAT devices and routers were found to handle AAAA records improperly. Some of these simply dropped DNS requests for such records, instead of properly returning the appropriate negative DNS response. Because the request is dropped, the host sending the request has to wait for a timeout causing increased latency when connecting to dual-stack IPv6/IPv4 hosts, as the client software waits for the timeout for the IPv6 connection to fail before trying IPv4. Happy Eyeballs provides a solution to this problem.
]
Notes
References
Further reading
*
{{DEFAULTSORT:Ipv6 Address
Address
An address is a collection of information, presented in a mostly fixed format, used to give the location of a building, apartment, or other structure or a plot of land, generally using border, political boundaries and street names as references, ...
IPv6 address