Jump to content

IPv6 address: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Multicast address format: More information about a IPv6 multicast address
review: ce. acro def and use.
 
(841 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
An '''Internet Protocol Version 6 address''' ('''IPv6 address''') is a numerical label that is used to identify a [[network interface controller|network interface]] of a computer or other [[Node (networking)|network node]] participating in an [[IPv6]]-enabled [[computer network]].
{{short description|Label to identify a network interface of a computer or other network node}}


[[File:Ipv6 address leading zeros.svg|right|300px|thumb|Decomposition of an IPv6 address into its [[binary numeral system|binary]] form]]
IP addresses serve the purpose of uniquely identifying the individual network interface(s) of a [[Host (network)|host]], locating it on the network, and thus permitting the routing of IP [[Packet (information technology)|packets]] between hosts. For routing, IP addresses are present in fields of the [[IPv6 packet#Fixed header|packet header]] where they indicate source and destination of the packet.


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 [[Node (networking)|network node]] participating in a [[computer network]] using [[IPv6]]. [[IP address]]es are included in the [[IPv6 header|packet header]] to indicate the source and the destination of each packet. The IP address of the destination is used to make decisions about routing [[IPv6 packet|IP packets]] to other networks.
IPv6 is the successor to the [[Internet]]'s first addressing infrastructure, [[Internet Protocol version 4]] (IPv4). In contrast to IPv4, which defined an [[IP address]] as a [[32-bit]] number, IPv6 addresses have a size of 128 bits, vastly expanding the addressing capability of the [[Internet Protocol]].


IPv6 is the successor to the first addressing infrastructure of the [[Internet]], [[Internet Protocol version 4]] (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]].
[[Image:Ipv6 address leading zeros.svg|right|300px|thumb|Decomposition of an IPv6 address into its [[binary numeral system|binary]] form.]]


==Addressing methods==
==IPv6 address classes==
IPv6 addresses are classified by the primary addressing and routing methodologies common in networking: unicast addressing, anycast addressing, and multicast addressing.<ref name=rfc4291>RFC 4291, ''IP Version 6 Addressing Architecture'', R. Hinden, S. Deering (February 2006)</ref>
IPv6 addresses are classified by the primary addressing and routing methodologies common in networking: unicast addressing, anycast addressing, and multicast addressing.{{Ref RFC|4291}}
*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 of 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]] address is also used by multiple hosts, which 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.


A [[unicast]] address identifies a single network interface. The Internet Protocol delivers packets sent to a unicast address to that specific interface.
IPv6 does not implement [[broadcasting (networks)|broadcast]] addressing. Broadcast's traditional role is subsumed by multicast addressing to the ''all-nodes'' link-local multicast group <tt>ff02::1</tt>. However, the use of the all-nodes group is not recommended, and most IPv6 protocols use a dedicated link-local multicast group to avoid disturbing every interface in the network.

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]] 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]]ing. Broadcast's traditional role is subsumed by multicast addressing to the ''all-nodes'' link-local multicast group {{IPaddr|ff02::1}}. 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==
==Address formats==
An IPv6 address consists of 128 bits.<ref name=rfc4291 /> Addresses are classified into various types for applications in the major addressing and routing methodologies: unicast, multicast, and anycast networking. In each of these, various address formats are recognized by logically dividing the 128 address bits into bit groups and establishing rules for associating the values of these bit groups with special addressing features.
An IPv6 address consists of 128 bits.<ref name=rfc4291 /> 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 address format===
===Unicast and anycast address format===
<!--
Note to fellow wikipedians:
This section displays bit strings in binary format to represent parts of an address,
which should not be translated into IPv6 address notation. This because the notation
is not discussed yet, but more importantly: it does not make sense to represent a part
of an address as a whole address.
-->
[[Unicast]] and [[anycast]] addresses are typically composed of two logical parts: a 64-bit network prefix used for [[routing]], and a 64-bit interface identifier used to identify a host's network interface.
[[Unicast]] and [[anycast]] addresses are typically composed of two logical parts: a 64-bit network prefix used for [[routing]], and a 64-bit interface identifier used to identify a host's network interface.
:{| class="wikitable" style="width: 750px"
{| class="wikitable" style="width: 800px"
|+ General unicast address format (routing prefix size varies)
|+ General unicast address format (routing prefix size varies)
|-
|-
!style="width: 0%"|bits
! style="width:0;"|bits
|style="text-align: center; width: 37.5%;"| 48 (or more)
|style="text-align: center; width: 37.5%;"| 48 (or more)
|style="text-align: center; width: 12.5%;"| 16 (or less)
|style="text-align: center; width: 12.5%;"| 16 (or fewer)
|style="text-align: center; width: 50%;"| 64
|style="text-align: center; width: 50%;"| 64
|-
|-
!style="width: 0%"|field
! style="width:0;"|field
|style="text-align: center;"| ''routing prefix''
|style="text-align: center;"| ''routing prefix''
|style="text-align: center;"| ''subnet id''
|style="text-align: center;"| ''subnet ID''
|style="text-align: center;"| ''interface identifier''
|style="text-align: center;"| ''interface identifier''
|}
|}
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(entifier)'' field are available to the network administrator to define subnets within the given network. The 64-bit ''interface identifier'' is either automatically generated from the interface's [[MAC address]] using the [[#Modified EUI-64|modified EUI-64]] format, obtained from a [[DHCPv6]] server, automatically established randomly, or assigned manually.


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]] using the [[modified EUI-64]] format, but this method is now not recommended for privacy reasons.{{Ref RFC|8064}})

[[Unique local address]]es are addresses analogous to IPv4 [[private network]] addresses.
<section begin=ULA-format/><!-- This table is transcluded to other pages, like [[Unique local address]]. (see: [[Wikipedia:transclusion]]) -->
{| class="wikitable" style="width: 800px"
|+ Unique local address format
|-
! style="width:0;"|bits
|style="text-align: center; width: 5.47%; padding: 0;"| 7
|style="text-align: center; width: 0.78%; padding: 0;"| 1
|style="text-align: center; width: 30.25%;"| 40<!-- Adds up to 99%; 1 percent point smaller to align the fields in the table correctly. -->
|style="text-align: center; width: 12.5%;"| 16
|style="text-align: center; width: 50%;"| 64
|-
! style="width:0;"|field
|style="text-align: center;"| ''prefix''
|style="text-align: center; font-size: .6em; padding: 0;"| ''L''
|style="text-align: center;"| ''random''
|style="text-align: center;"| ''subnet ID''
|style="text-align: center;"| ''interface identifier''
|}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 {{IPaddr||48}} routing prefix.
<section end=ULA-format/>
A link-local address is also based on the interface identifier, but uses a different format for the network prefix.
A link-local address is also based on the interface identifier, but uses a different format for the network prefix.

:{| class="wikitable" style="width: 750px"
{| class="wikitable" style="width: 800px"
|+ Link-local address format
|+ Link-local address format
|-
|-
!style="width: 0%"|bits
! style="width:0;"|bits
|style="text-align: center; width: 7.8%;"| 10
|style="text-align: center; width: 7.8%;"| 10
|style="text-align: center; width: 42.2%;"| 54
|style="text-align: center; width: 42.2%;"| 54
|style="text-align: center; width: 50%;"| 64
|style="text-align: center; width: 50%;"| 64
|-
|-
!style="width: 0%"|field
! style="width:0;"|field
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''zeroes''
|style="text-align: center;"| ''zeroes''
|style="text-align: center;"| ''interface identifier''
|style="text-align: center;"| ''interface identifier''
|}
|}
The ''prefix'' field contains the binary value <tt>1111111010</tt> (fe80::/10). The 54 zeroes that follow make the total network prefix the same for all link-local addresses, rendering them non-routable.
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 ({{IPaddr|fe80::|64}} [[#Local addresses|link-local address prefix]]), rendering them non-routable.


===Multicast address format===
===Multicast address format===
{{details | Multicast address#IPv6 }}
{{further | Multicast address#IPv6 }}

[[Multicast]] addresses are formed according to several specific formatting rules, depending on the application.
[[Multicast]] addresses are formed according to several specific formatting rules, depending on the application.
<section begin=IPv6-multicast-address-format/><!-- This table is transcluded to other pages, like [[Multicast address]]. (see: [[Wikipedia:transclusion]]) -->
:{| class="wikitable" style="width: 750px"
{| class="wikitable" style="width: 800px"
|+ General multicast address format
|+ General multicast address format
|-
|-
!style="width: 0%"|bits
! style="width:0;"|bits
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 87.5%;"| 112
|style="text-align: center; width: 87.5%;"| 112
|-
|-
!style="width: 0%"|field
! style="width:0;"|field
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''flags''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''flg''
|style="text-align: center;"| ''scope''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''[[IPv6 address#Address scopes|sc]]''
|style="text-align: center;"| ''group ID''
|style="text-align: center;"| ''group ID''
|-
!style="width: 0%"|value
|style="text-align: center;"| <tt>11111111</tt>
|style="text-align: center;"| <tt>0RPT</tt>
|style="text-align: center;"| <tt>XXXX</tt>
|style="text-align: center;"|
|}
|}

The ''prefix'' holds the binary value <tt>11111111</tt> for any multicast address.
For all multicast addresses, the ''prefix'' field holds the binary value 11111111.
Currently, 3 of the 4 flag bits in the ''flgs'' field are defined;<ref name=rfc4291 /> the most-significant flag bit is reserved for future use.

Currently, three of the four flag bits in the ''flg'' field are defined;<ref name=rfc4291 /> the most-significant flag bit is reserved for future use.


{| class="wikitable"
{| class="wikitable"
|+Multicast address flags<ref name="IPv6Essentials">{{cite book |title=IPv6 Essentials |author=Silvia Hagen |publisher=O'Reilly |edition=Second |date=May 2006 |isbn=978-0596100582}}</ref>
|+Multicast address flags<ref name="IPv6Essentials">{{cite book |title=IPv6 Essentials |author=Silvia Hagen |publisher=O'Reilly |edition=Second |date=May 2006 |isbn=978-0-596-10058-2 |url-access=registration |url=https://archive.org/details/ipv6essentials00hage }}</ref>
|-
|-
!bit
!Flag
!flag
!0
!Meaning when 0
!1
!Meaning when 1
|-
|-
|8
|R (Rendezvous)<ref>RFC 3956</ref>
|''reserved''
|''reserved''
|''reserved''
|-
|9
|R (Rendezvous){{Ref RFC|3956}}
|Rendezvous point not embedded
|Rendezvous point not embedded
|Rendezvous point embedded
|Rendezvous point embedded
|-
|-
|10
|P (Prefix)<ref>RFC 3306</ref>
|P (Prefix){{Ref RFC|3306}}
|Without prefix information
|Without prefix information
|Address based on network prefix
|Address based on network prefix
|-
|-
|11
|T (Transient)<ref>RFC 4291</ref>
|T (Transient)<ref name=rfc4291 />
|Well-known multicast address
|Well-known multicast address
|Dynamically assigned multicast address
|Dynamically assigned multicast address
|}
|}


The 4-bit scope field is used to indicate where the address is valid and unique:
The [[IPv6 address#Address scopes|four-bit scope field]] (''sc'') is used to indicate where the address is valid and unique.
* 1 (<tt>0001</tt>) - Node
* 2 (<tt>0010</tt>) - Link
* 3 (<tt>0011</tt>) - Subnet local
* 4 (<tt>0100</tt>) - Admin local
* 5 (<tt>0101</tt>) - Site
* 8 (<tt>1000</tt>) - Organization
* E (<tt>1110</tt>) - Global


We can see special multicast addresses, like Solicited-Node:
In addition, the scope field is used to identify special multicast addresses, like [[Solicited-node multicast address|solicited node]].

:{| class="wikitable" style="width: 750px"
{| class="wikitable" style="width: 800px"
|+ [[Solicited-node multicast address|Solicited-Node multicast address]] format
|+ Solicited-node multicast address format
|-
|-
!style="width: 0%"|bits
! style="width:0;"|bits
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 61.75%;"| 79
|style="text-align: center; width: 61.75%;"| 79
|style="text-align: center; width: 7%;"| 9
|style="text-align: center; width: 7%;"| 9
|style="text-align: center; width: 18.7%;"| 24
|style="text-align: center; width: 18.7%;"| 24
|-
|-
!style="width: 0%"|field
! style="width:0;"|field
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''flags''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''flg''
|style="text-align: center;"| ''scope''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''sc''
|style="text-align: center;"| ''zeroes''
|style="text-align: center;"| ''zeroes''
|style="text-align: center;"| ''ones''
|style="text-align: center;"| ''ones''
|style="text-align: center;"| ''unicast address''
|style="text-align: center;"| ''unicast address''
|-
!style="width: 0%"|value
|style="text-align: center;"| <tt>11111111</tt>
|style="text-align: center;"| <tt>0000</tt>
|style="text-align: center;"| <tt>0010</tt>
|style="text-align: center;"| <tt>00000000...00000000</tt>
|style="text-align: center;"| <tt>111111111</tt>
|style="text-align: center;"|
|}
|}

The ''prefix'' and ''sc'' fields hold the binary values <tt>11111111</tt> and <tt>0010</tt>.
[[Solicited-node multicast address]]es 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.
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.

:{| class="wikitable" style="width: 750px"
{| class="wikitable" style="width: 800px"
|+ Unicast-prefix-based multicast address format<ref name=rfc3306>RFC 3306, ''Unicast-Prefix-based IPv6 Multicast Addresses'', B. Haberman, D. Thaler (August 2002)</ref><ref name=rfc3956>RFC 3956, ''Embedding the Rendezvous Point (RP) Address in an IPv6 Multicast Address'' P. Savola, B. Haberman (November 2004)</ref>
|+ Unicast-prefix-based multicast address format<ref name=rfc3956 /><ref name=rfc3306 />
|-
|-
!style="width: 0%"|bits
! style="width:0;"|bits
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 3.1%;"| 4
|style="text-align: center; width: 3.1%; padding: 0px;"| 4
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 6.2%;"| 8
|style="text-align: center; width: 50%;"| 64
|style="text-align: center; width: 50%;"| 64
|style="text-align: center; width: 25%;"| 32
|style="text-align: center; width: 25%;"| 32
|-
|-
!style="width: 0%"|field
! style="width:0;"|field
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''prefix''
|style="text-align: center;"| ''flgs''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''flg''
|style="text-align: center;"| ''sc''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''sc''
|style="text-align: center;"| ''res''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''res''
|style="text-align: center;"| ''riid''
|style="text-align: center; font-size: .75em; padding: 0px;"| ''riid''
|style="text-align: center;"| ''plen''
|style="text-align: center;"| ''plen''
|style="text-align: center;"| ''network prefix''
|style="text-align: center;"| ''network prefix''
|style="text-align: center;"| ''group ID''
|style="text-align: center;"| ''group ID''
|}
|}
Link-scoped multicast addresses use a comparable format.<ref name=rfc4489>RFC 4489, ''A Method for Generating Link-Scoped IPv6 Multicast Addresses'', J-S. Park, M-K. Shin; H-J. Kim (April 2006)</ref>


Link-scoped multicast addresses use a comparable format.{{Ref RFC|4489}}
==Presentation==
<section end=IPv6-multicast-address-format/>
An IPv6 address is represented as eight groups of four [[hexadecimal]] digits, each group representing 16 [[bit]]s (two [[Octet (computing)|octet]]s). The groups are separated by [[colon (punctuation)|colon]]s (<tt>:</tt>). An example of an IPv6 address is
:<tt>2001:0db8:85a3:0000:0000:8a2e:0370:7334</tt>.
The hexadecimal digits are case-insensitive when used, but should be represented in lower case.<ref name=rfc5952>RFC 5952, "A Recommendation for IPv6 Address Text Representation", S. Kawamura, M. Kawashima, (August 2010)</ref>


==Representation==
The full representation of eight 4-digit groups may be simplified by several techniques, eliminating parts of the representation.
An IPv6 address is represented as eight groups of four [[hexadecimal]] digits, each group representing 16 [[bit]]s{{efn|A 16 bit or two [[Octet (computing)|octet]] quantity is sometimes also called a [[hextet]].<ref name="Graziani2012">{{cite book |author-first=Rick |author-last=Graziani |title=IPv6 Fundamentals: A Straightforward Approach to Understanding IPv6 |year=2012 |publisher=[[Cisco Press]] |isbn=978-0-13-303347-2 |page=55 |url=https://books.google.com/books?id=FbYjJjZNA5gC&pg=PA55}}</ref><ref name="Coffeen2014">{{cite book |author-first=Tom |author-last=Coffeen |title=IPv6 Address Planning: Designing an Address Plan for the Future |year=2014 |publisher=[[O'Reilly Media]] |isbn=978-1-4919-0326-1 |page=170 |url=https://books.google.com/books?id=dZU8BQAAQBAJ&pg=PT170}}</ref>}} The groups are separated by [[colon (punctuation)|colon]]s (:). An example of an IPv6 address is:
{{block indent|1={{IPaddr|2001:0db8:85a3:0000:0000:8a2e:0370:7334}}}}


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]] (IETF) has defined a canonical format for rendering IPv6 addresses in text:{{Ref RFC|5952}}
;Leading zeroes
* 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 zeroes in a group may be omitted, but each group must contain at least one hexadecimal digit. Thus, the example address may be written as:
* Leading zeros in each 16-bit field are suppressed, but each group must retain at least one digit. For example, {{IPaddr|2001:0db8::0001:0000}} is rendered as {{IPaddr|2001:db8::1:0}};
:<tt>2001:db8:85a3:0:0:8a2e:370:7334</tt>.
* 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, {{IPaddr|2001:db8:0:0:1:0:0:1}} is rendered as {{IPaddr|2001:db8::1:0:0:1}} rather than as {{IPaddr|2001:db8:0:0:1::1}}. ''::'' is not used to represent just a single all-zero field. For example, {{IPaddr|2001:db8:0:0:0:0:2:1}} is shortened to {{IPaddr|2001:db8::2:1}}, but {{IPaddr|2001:db8:0000:1:1:1:1:1}} is rendered as {{IPaddr|2001:db8:0:1:1:1:1:1}}.


These methods can lead to very short representations for IPv6 addresses. For example, the localhost (loopback) address, {{IPaddr|0:0:0:0:0:0:0:1}}, and the IPv6 unspecified address, {{IPaddr|0:0:0:0:0:0:0:0}}, are reduced to {{IPaddr|::1}} and {{IPaddr|::}}, respectively.
;Groups of zeroes
One or more consecutive groups of zero value may be replaced with a single empty group using two consecutive colons (<tt>::</tt>).<ref name=rfc4291>RFC 4291, "IP Version 6 Addressing Architecture", R. Hinden, S. Deering, (February 2006)</ref> Substitution may only be applied once in an address, because multiple occurrences would create an ambiguous representation. If more than one such substitution could be applied, the substitution that replaces the most groups should be used; if the number of groups are equal then the leftmost substitution should be used.
With these rules, the example address is further simplified:
:<tt>2001:db8:85a3::8a2e:370:7334</tt>
The localhost (loopback) address, <tt>0:0:0:0:0:0:0:1</tt>, and the IPv6 unspecified address, <tt>0:0:0:0:0:0:0:0</tt>, are reduced to <tt>::1</tt>
and <tt>::</tt>, 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 {{IPaddr|::ffff:c000:0280}} is written as {{IPaddr|::ffff:192.0.2.128}}, thus expressing clearly the original IPv4 address that was mapped to IPv6.
;Dotted-quad notation
During the transition of the Internet from IPv4 to the IPv6 it is typical to operate in a mixed addressing environment, and for this purpose a special notation has been introduced to express IPv4-mapped and IPv4-compatible IPv6 addresses by writing the final 32 bits of an address in the familiar IPv4 [[dot-decimal notation|dotted-quad notation]]. For example, the IPv4-mapped IPv6 address <tt>::ffff:c000:280</tt> is usually written as <tt>::ffff:192.0.2.128</tt>, thus expressing clearly the original IPv4 address that was mapped to IPv6.


===Networks===
===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]]. 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''.
An IPv6 network uses an address block that is a contiguous group of IPv6 addresses of a size that is a [[power of two]]. 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]]. A network is denoted by the first address in the block (ending in all zeroes), a [[slash (punctuation)|slash]] (/), and a [[decimal]] value equal to the size in bits of the prefix. For example, the network written as <tt>2001:db8:1234::/48</tt> starts at address <tt>2001:db8:1234:0000:0000:0000:0000:0000</tt> and ends at <tt>2001:db8:1234:ffff:ffff:ffff:ffff:ffff</tt>.
Network address ranges are written in [[CIDR notation]]. A network is denoted by the first address in the block (ending in all zeroes), a [[slash (punctuation)|slash]] (/), and a [[decimal]] value equal to the size in bits of the prefix. For example, the network written as {{IPaddr|2001:db8:1234::|48}} starts at address {{IPaddr|2001:db8:1234:0000:0000:0000:0000:0000}} and ends at {{IPaddr|2001:db8:1234:ffff:ffff:ffff:ffff:ffff}}.


The routing prefix of an interface address may be directly indicated with the address by CIDR notation. For example, the configuration of an interface with address <tt>2001:db8:a::123</tt> connected to subnet <tt>2001:db8:a::/64</tt> is written as <tt>2001:db8:a::123/64</tt>.
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 {{IPaddr|2001:db8:a::123}} connected to subnet {{IPaddr|2001:db8:a::|64}} is written as {{IPaddr|2001:db8:a::123|64}}.


===Address block sizes===
===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 {{IPaddr||48}}. Such a block contains 2<sup>128 &minus; 48</sup> = 2<sup>80</sup> addresses. The smaller the length of the network prefix, the larger the block: a {{IPaddr||21}} block is 8 times larger than a {{IPaddr||24}} block.
{{main|CIDR notation}}
The size of a block of addresses is indicated simply by a slash (/) and the decimal size of the network prefix, without specifying which specific addresses are in the block. For instance, an address block with 48 bits in the prefix is indicated by <tt>/48</tt>. Such a block contains 2<sup>128 &minus; 48</sup> = 2<sup>80</sup> addresses. The smaller the size of the network prefix, the larger the block: a <tt>/21</tt> block is 8 times larger than a <tt>/24</tt> block.


===Literal IPv6 addresses in network resource identifiers===
===Literal IPv6 addresses in network resource identifiers===
Colon (<tt>:</tt>) characters in IPv6 addresses may conflict with the established syntax of resource identifiers, such as URIs and [[Uniform Resource Locator|URL]]s. The colon has traditionally been used to terminate the host path before a [[port number]].<ref name=rfc3986>RFC 3986, ''Uniform Resource Identifier (URI): Generic Syntax'', [[Tim Berners-Lee|T. Berners-Lee]], [[Roy Fielding|R. Fielding]], L. Masinter (January 2005)</ref> To alleviate this conflict, literal IPv6 addresses are enclosed in [[bracket|square bracket]]s in such resource identifiers, for example:
Colon (:) characters in IPv6 addresses may conflict with the established syntax of resource identifiers, such as [[Uniform resource identifier|URIs]] and [[Uniform Resource Locator|URL]]s. The colon is conventionally used to terminate the host path before a [[port number]].{{Ref RFC|3986}} To alleviate this conflict, literal IPv6 addresses are enclosed in [[bracket|square bracket]]s in such resource identifiers, for example:
:<tt><nowiki>http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/</nowiki></tt>
{{block indent|1=<nowiki>http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/</nowiki>}}

When the URL also contains a port number the notation is:
When the URL also contains a port number the notation is:
:<tt><nowiki>https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/</nowiki></tt>
{{block indent|1=<nowiki>https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/</nowiki>}}
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 {{slink||Address scopes}}), 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]] (which is prefix-based).

In order to resolve the ambiguity in textual addresses, a ''{{vanchor|zone index}}'' must be appended to the address. The zone index is separated from the address by a [[percent sign]] (%).{{Ref RFC|4007}} Although numeric zone indices must be universally supported, the zone index may also be an implementation-dependent string. The link-local address
{{block indent|1=fe80::1ff:fe23:4567:890a}}
could be expressed by
{{block indent|1=fe80::1ff:fe23:4567:890a%eth2{{efn|Assuming that eth2 is equivalent to zone number 3. This is usually the case, as real zone numbers start at 1 (0 being the 'default zone')}}}}
or
{{block indent|1=fe80::1ff:fe23:4567:890a%3}}
The former (using an [[Network interface controller|interface]] name) is customary on most [[Unix]]-like operating systems (e.g., [[BSD]], [[Linux]], [[macOS]]).<ref name=FreeBSD>{{man|4|inet6|FreeBSD}} "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"</ref>
The latter (using an interface number) is the only syntax on [[Microsoft Windows]], but as support for this syntax is mandatory per standard, it is also available on other operating systems.{{efn|Although Windows supports the RFC 3493 {{code|if_nametoindex()}} API for converting a name to an interface number, it does not support the customary "name after %" extension.}}

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.:<!-- This is not in FreeBSD 14 inet6(4), but not being in the documentation doesn't mean it's made up. -->
{{block indent|1=fe80:3::1ff:fe23:4567:890a}}

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.{{efn|The now-removed [[site-local address]]es of fec0::/10 also require a zone index.<ref name=FreeBSD/>}}

When used in [[uniform resource identifier]]s (URI), the use of the percent sign causes a syntax conflict, therefore it must be escaped via [[percent-encoding]],{{Ref RFC|6874}} e.g.:
{{block indent|1=http://[fe80::1ff:fe23:4567:890a<u>%25</u>eth0]/}}


===Literal IPv6 addresses in UNC path names===
===Literal IPv6 addresses in UNC path names===
In [[Microsoft Windows]] operating systems, IPv4 addresses are valid location identifiers in [[Uniform Naming Convention]] (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]] implemented a transcription algorithm to represent an IPv6 address in form of a domain name that can be used in UNC paths. For this purpose, Microsoft registered and reserved the [[second-level domain]] ''ipv6-literal.net'' on the [[Internet]]. IPv6 addresses are transcribed as a hostname or subdomain name within this name space, in the following fashion:
In [[Microsoft Windows]] operating systems, IPv4 addresses are valid location identifiers in [[Uniform Naming Convention]] (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]] 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]] ''ipv6-literal.net'' on the [[Internet]] (although they gave up the domain in January 2014<ref>{{cite web|title=ipv6-literal.net Domain History|url=http://www.who.is/domain-history/ipv6-literal.net|publisher=who.is|access-date=20 October 2014}}</ref>). IPv6 addresses are transcribed as a hostname or subdomain name within this [[namespace]], in the following fashion:
:<tt>2001:db8:85a3:8d3:1319:8a2e:370:7348</tt>
{{block indent|1=2001:db8:85a3:8d3:1319:8a2e:370:7348}}
is written as
{{block indent|1=2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net}}
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:
{{block indent|1=fe80::1ff:fe23:4567:890a%3}}
is written as
is written as
:<tt>2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net</tt>
This notation is automatically resolved 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:
<!-- DO NOT REPLACE THE DOUBLE HYPHEN -->
:<tt>fe80-<!-- double hyphen -->-1<u>s4</u>.ipv6-literal.net</tt>
<!-- DO NOT REPLACE THE DOUBLE HYPHEN -->
<!-- DO NOT REPLACE THE DOUBLE HYPHEN -->
{{block indent|1=fe80-<!-- double hyphen -->-1ff-fe23-4567-890a<u>s3</u>.ipv6-literal.net}}


==IPv6 address scopes==
==Address scopes==
Every IPv6 address, except the unspecified address (<tt>::</tt>), has a "scope",<ref name=rfc4007>RFC 4007, ''IPv6 Scoped Address Architecture'', [[Steve Deering|S.Deering]], B. Haberman, T. Jinmei, E. Nordmark, B. Zill (March 2005)</ref> which specifies in which part of the network it is valid.
Every IPv6 address, except the unspecified address ({{IPaddr|::}}), has a ''scope'',{{Ref RFC|4007}} which specifies in which part of the network it is valid.


===Unicast===
In the unicast addressing class, link-local addresses and the [[localhost|loopback address]] have ''link-local'' scope, which means they are to be used in the directly attached network (link). All other addresses, have ''global'' (or ''universal'') scope, which means they are globally routable, and can be used to connect to addresses with ''global'' scope anywhere, or addresses with ''link-local'' scope on the directly attached network.
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 address]]es) 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.
The scope of an anycast address is defined identically to that of a unicast address.


[[Unique local address]]es 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.
For multicasting, the four least-significant bits of the second address octet of a multicast address (<tt>ff0''<u>s</u>''::</tt>) identify the address <u>s</u>cope, i.e. the span over which the multicast address is propagated. Currently defined scopes<ref name=rfc4291 /> are:

:{| class="wikitable" border="1"
===Anycast===
|+ Scope values

[[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]] addresses, the four least-significant bits of the second address octet ({{IPaddr|ff0<u>s</u>::}}) identify the address <u>s</u>cope, i.e. the domain in which the multicast packet should be propagated. Predefined and reserved scopes are:
{| class="wikitable"
|+ Scope values{{Ref RFC|4291}}{{rp|2.7}}
|-
|-
! scope="col" | Value
! scope="col" | Value
! scope="col" | Scope name
! scope="col" | Scope name
! scope="col" | Notes
|-
|-
| <tt>0x0</tt> || ''reserved''
| 0x0 || ''reserved'' ||
|-
|-
| 0x1 || interface-local || Interface-local scope spans only a single interface on a node, and is useful only for loopback transmission of multicast.
| <tt>0x1</tt> || interface-local
|-
|-
| 0x2 || link-local || Link-local scope spans the same topological region as the corresponding unicast scope.
| <tt>0x2</tt> || link-local
|-
|-
| 0x3 || realm-local || Realm-local scope is defined as larger than link-local, automatically determined by network topology and must not be larger than the following scopes.{{Ref RFC|7346}}
| <tt>0x4</tt> || admin-local
|-
|-
| 0x4 || admin-local || Admin-local scope is the smallest scope that must be administratively configured, i.e., not automatically derived from physical connectivity or other, non-multicast-related configuration.
| <tt>0x5</tt> || site-local
|-
|-
| 0x5 || site-local || Site-local scope is intended to span a single site belonging to an organisation.
| <tt>0x8</tt> || organization-local
|-
|-
| 0x8 || organization-local || Organization-local scope is intended to span all sites belonging to a single organization.
| <tt>0xe</tt> || global
|-
|-
| 0xe || global || Global scope spans all reachable nodes on the Internet{{dash}}it is unbounded.
| <tt>0xf</tt> || ''reserved''
|-
| 0xf || ''reserved'' ||
|}
|}


All other scopes are unassigned and available to administrators for defining additional regions.
==IPv6 address space==

==Address space==

===General allocation===
===General allocation===
The management of IPv6 address allocation process is delegated to the [[Internet Assigned Numbers Authority]] (IANA)<ref name=rfc1881>RFC 1881, ''IPv6 Address Allocation Management'', [[Internet Architecture Board]] (December 1995)</ref> by the [[Internet Architecture Board]] and the [[Internet Engineering Steering Group]]. Its main function is the assignment of large address blocks to the [[Regional Internet Registry|regional Internet registries]] (RIRs), which have the delegated task of allocation to network service providers and other local registries. The IANA has maintained the official list of allocations of the IPv6 address space since {{date|December 1995}}.<ref>[http://www.iana.org/assignments/ipv6-address-space IPv6 address space at IANA]</ref>
The management of IPv6 address allocation process is delegated to the [[Internet Assigned Numbers Authority]] (IANA){{Ref RFC|1881}} by the [[Internet Architecture Board]] and the [[Internet Engineering Steering Group]]. Its main function is the assignment of large address blocks to the [[regional Internet registry|regional Internet registries]] (RIRs), which have the delegated task of allocation to network service providers and other local registries. The IANA has maintained the official list of allocations of the IPv6 address space since December 1995.<ref>[https://www.iana.org/assignments/ipv6-address-space IPv6 address space at IANA]. Iana.org (2010-10-29). Retrieved on 2011-09-28.</ref>


Only one eighth of the total address space is currently slated for use on the [[Internet]]. The bulk of the IPv6 address space is reserved for future use. To provide efficient [[route aggregation]], thereby reducing the size of Internet routing tables, the <tt>2000::/3</tt> address space is assigned to the RIRs in large blocks of <tt>/23</tt> up to <tt>/12</tt>.<ref>[http://www.iana.org/assignments/ipv6-unicast-address-assignments/ipv6-unicast-address-assignments.xhtml IPv6 unicast address assignments], IANA</ref>
In order to allow efficient [[route aggregation]], thereby reducing the size of the Internet routing tables, only one-eighth of the total address space ({{IPaddr|2000::|3}}) is currently allocated for use on the [[Internet]]. 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 {{IPaddr||23}} up to {{IPaddr||12}}.<ref>[https://www.iana.org/assignments/ipv6-unicast-address-assignments/ipv6-unicast-address-assignments.xhtml IPv6 unicast address assignments], IANA</ref>


The RIRs assign smaller blocks to [[Local Internet registry|Local Internet registries]] that distributes them to users. These are typically in sizes from <tt>/19</tt> to <tt>/32</tt>.<ref>[http://www.db.ripe.net/whois?form_type=simple&full_query_string=&searchtext=DE-TELEKOM-20050113&do_search=Search DE-TELEKOM-20050113]</ref><ref>{{cite web |url=https://www.arin.net/policy/nrpm.html#four22 |title=ARIN Number Resource Policy Manual: Initial allocation to ISPs}}</ref><ref>{{cite web |url=http://www.ripe.net/ripe/docs/ripe-481#minimum_allocation |title=RIPE NCC IPv6 Address Allocation and Assignment Policy: Minimum allocation}}</ref> The addresses are typically distributed in <tt>/48</tt> to <tt>/56</tt> sized blocks to the end users.<ref name=rfc6177>RFC 6177, ''IPv6 Address Assignment to End Sites'', T. Narten, G. Houston, L. Roberts, [[IETF]] Trust,(March 2011).</ref>
The RIRs assign smaller blocks to [[local Internet registries]] that distribute them to users. These are typically in sizes from {{IPaddr||19}} to {{IPaddr||32}}.<ref>[http://www.db.ripe.net/whois?form_type=simple&full_query_string=&searchtext=DE-TELEKOM-20050113&do_search=Search DE-TELEKOM-20050113]{{Dead link|date=January 2023 |bot=InternetArchiveBot |fix-attempted=yes }} db.ripe.net. Retrieved 2011-09-28.</ref><ref>{{cite web |url=https://www.arin.net/policy/nrpm.html#four22 |title=ARIN Number Resource Policy Manual: Initial allocation to ISPs}}</ref><ref>{{cite web |url=http://www.ripe.net/ripe/docs/ripe-481#minimum_allocation |title=RIPE NCC IPv6 Address Allocation and Assignment Policy: Minimum allocation}}</ref> Global unicast assignment records can be found at the various RIRs or other websites.<ref>[https://www.iana.org/assignments/ipv6-unicast-address-assignments/ipv6-unicast-address-assignments.xml for example]. Iana.org. Retrieved on 2011-09-28.</ref>


The addresses are then typically distributed in {{IPaddr||48}} to {{IPaddr||56}} sized blocks to the end users.{{Ref RFC|6177}} IPv6 addresses are assigned to organizations in much larger blocks as compared to IPv4 address assignments—the recommended allocation is a {{IPaddr||48}} block which contains 2<sup>80</sup> addresses, being 2<sup>48</sup> or about {{val|2.8|e=14}} times larger than the entire IPv4 address space of 2<sup>32</sup> addresses and about {{val|7.2|e=16}} times larger than the {{IPaddr||8}} 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 2<sup>128</sup> (exactly 340,282,366,920,938,463,463,374,607,431,768,211,456) or about {{val|3.4|e=38}} (340 [[Names of large numbers|undecillion]]) unique IPv6 addresses.
Global unicast assignment records can be found at the various RIRs or other websites.<ref>[http://www.iana.org/assignments/ipv6-unicast-address-assignments/ipv6-unicast-address-assignments.xml for example]</ref>


Each RIR can divide each of its multiple {{IPaddr||23}} blocks into 512 {{IPaddr||32}} blocks, typically one for each ISP; an ISP can divide its {{IPaddr||32}} block into {{gaps|65|536}} {{IPaddr||48}} blocks, typically one for each customer;<ref>{{cite web |title=IPv6 Addressing Plans |publisher=ARIN IPv6 Wiki |url=https://getipv6.info/display/IPv6/IPv6+Addressing+Plans |quote=All customers get one {{IPaddr||48}} unless they can show that they need more than 65k subnets. [...] If you have lots of consumer customers you may want to assign {{IPaddr||56}}s to private residence sites. |access-date=2018-07-15}}</ref> customers can create {{gaps|65|536}} {{IPaddr||64}} networks from their assigned {{IPaddr||48}} block, each having 2<sup>64</sup> (18,446,744,073,709,551,616) addresses. In contrast, the entire IPv4 address space has only 2<sup>32</sup> (exactly 4,294,967,296 or about {{val|4.3|e=9}}) addresses.
IPv6 addresses are assigned to organizations in much larger blocks as compared to IPv4 address assignments—the recommended allocation is a <tt>/48</tt> block which contains 2<sup>80</sup> addresses, being 2<sup>48</sup> or about {{val|2.8|e=14}} times larger than the entire IPv4 address space of 2<sup>32</sup> addresses and about {{val|7.2|e=16}} times larger than the <tt>/8</tt> 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 2<sup>128</sup> or about {{val|3.4|e=38}} (340 [[Orders of magnitude (numbers)#1012|trillion]] trillion trillion) unique IPv6 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]] (NAT) for the purposes of address conservation unnecessary. NAT has been increasingly used for IPv4 networks to help alleviate [[IPv4 address exhaustion]].
Each RIR can divide each of its multiple <tt>/23</tt> blocks into 512 <tt>/32</tt> blocks, typically one for each ISP; an ISP can divide its <tt>/32<tt> block into {{gaps|65|536}} <tt>/48</tt> blocks, typically one for each customer;<ref>
{{Cite web
| title = IPv6 Addressing Plans
| publisher = ARIN IPv6 Wiki
| url = http://www.getipv6.info/index.php?title=IPv6_Addressing_Plans&oldid=2998
| quote = All customers get one /48 unless they can show that they need more than 65k subnets. [...] If you have lots of consumer customers you may want to assign /56s to private residence sites.
| accessdate = 2010-08-18
}}
</ref> customers can create {{gaps|65|536}} <tt>/64<tt> networks from their assigned <tt>/48</tt> block, each having a number of addresses that is the square of the number of addresses of the entire IPv4 address space, which only supports 2<sup>32</sup> or about {{val|4.3|e=9}}</sup> addresses.

By design, only a very small fraction of the address space will actually be used. The large address space ensures that addresses are almost always available, which makes the use of [[network address translation]] (NAT) for the purposes of address conservation almost unnecessary. NAT has been increasingly used for IPv4 networks to help alleviate [[IPv4 address exhaustion]].


===Special allocation===
===Special allocation===
To allow for provider changes without renumbering, [[Provider-independent address space]] assigned directly to the end user by the RIRs – is taken from the special range <tt>2001:678::/29</tt>.
[[Provider-independent address space]] is assigned directly to the end user by the RIRs from the special range {{IPaddr|2001:678::|29}} and allows customers to make provider changes without renumbering their networks.


[[Internet Exchange Point]]s (IXPs) are assigned special addresses from the range <tt>2001:7f8::/29</tt> for communication with their connected [[ISP]]s.<ref>{{cite web|title=Address Space Managed by the RIPE NCC|url=https://www.ripe.net/ripe/docs/ripe-510|accessdate=2011-05-22}}</ref>
[[Internet exchange point]]s (IXPs) are assigned special addresses from the ranges {{IPaddr|2001:7f8::|32}}, {{IPaddr|2001:504::|30}}, and {{IPaddr|2001:7fa::|32}}<ref>{{Cite web|title=What are Bogons?|url=https://www.sixxs.net/tools/grh/bogons/|access-date=2021-11-15}}</ref> for communication with their connected [[ISP]]s.

[[Root name server]]s have been assigned addresses from the same range.
[[Root name server]]s have been assigned addresses from the range {{IPaddr|2001:7f8::|29}}.<ref>{{cite web|title=Address Space Managed by the RIPE NCC|url=https://www.ripe.net/ripe/docs/ripe-510|access-date=2011-05-22}}</ref>


===Reserved anycast addresses===
===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.<ref name=rfc4291 /> 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 lowest address within each subnet prefix (the interface identifier set to all zeroes) is reserved as the ''subnet-router'' anycast address.<ref name=rfc4291 /> 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 <tt>/64</tt> subnet prefix are reserved to be used as anycast addresses.<ref name=rfc2526>RFC 2526,''Reserved IPv6 Subnet Anycast Addresses'', D. Johnson, [[Steve Deering|S. Deering]] (March 1999)</ref> These addresses usually have the 57 first bits of the interface identifier set to <tt>1</tt>, followed by the 7-bit anycast ID. Prefixes for the network, including subnets, are required to have a length of 64 bits, in which case the [[#Modified EUI-64|universal/local bit]] must be set to <tt>0</tt> to indicate the address is not globally unique. The address with value <tt>0x7e</tt> in the 7 least-significant bits is defined as a [[mobile IPv6]] home agents anycast address. The address with value <tt>0x7f</tt> (all bits <tt>1</tt>) is reserved and may not be used. No more assignments from this range are made, so values <tt>0x00</tt> through <tt>0x7d</tt> are reserved as well.
The 128 highest addresses within each {{IPaddr||64}} subnet prefix are reserved to be used as anycast addresses.{{Ref RFC|2526}} 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==
==Special addresses==
{{see also|Reserved IP addresses#IPv6}}
There are a number of addresses with special meaning in IPv6:<ref name=rfc5156>RFC 5156, ''Special-Use IPv6 Addresses'', M. Blanchett (April 2008)</ref>
There are a number of addresses with special meaning in IPv6.{{Ref RFC|6890}} The IANA maintains a registry of these special-purpose addresses.<ref name="spar">{{Cite web |title=IANA IPv6 Special-Purpose Address Registry |url=https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml |access-date=2024-08-02 |website=www.iana.org}}</ref> They represent less than 2% of the entire address space:
; Unspecified address
<section begin=IPv6-special-address-blocks/><!-- This table is transcluded to other pages, like [[Reserved IP addresses]]. (see: [[Wikipedia:transclusion]]) -->
* <tt>::/128</tt> — The address with all zero bits is called the unspecified address (corresponding to <tt>0.0.0.0</tt> in IPv4).<br>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.<br>Applications may be listening 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.
{|class="wikitable sortable"

|+ Special address blocks
; Default Route
* <tt>::/0</tt> — The default unicast route address (corresponding to <tt>0.0.0.0</tt> with netmask <tt>0.0.0.0</tt> in IPv4).

; Local addresses
* <tt>::1/128</tt> — The [[loopback]] address is a unicast [[localhost]] address. If an application in a host sends packets to this address, the IPv6 stack will loop these packets back on the same virtual interface (corresponding to <tt>[[127.0.0.1]]</tt> in IPv4).
* <tt>fe80::/10</tt> — Addresses in the link-local prefix are only valid and unique on a single link. Within this prefix only one subnet is allocated (54 zero bits), yielding an effective format of <tt>fe80::/64</tt>. The least significant 64 bits are usually chosen as the interface hardware address constructed in [[#Modified EUI-64|modified EUI-64]] format. A [[link-local address]] is required on every IPv6-enabled interface—in other words, applications may rely on the existence of a link-local address even when there is no IPv6 routing. These addresses are comparable to the auto-configuration addresses <tt>169.254.0.0/16</tt> of IPv4.

; Unique local addresses
{{Main|Unique local address}}
* <tt>fc00::/7</tt> — Unique local addresses (ULAs) are intended for local communication. They are routable only within a set of cooperating sites (analogous to the private address ranges <tt>10/8</tt>, <tt>172.16/12</tt>, and <tt>192.168/16</tt> of IPv4).<ref name=rfc1918>RFC 1918, ''Address Allocation for Private Internets'', Y. Rekhter, B. Moskowitz, D. Karrenberg, G.J. De Groot, E. Lear (February 1996)</ref> The addresses include a 40-bit [[pseudorandom]] number in the routing prefix intended to minimize the risk of conflicts if sites merge or packets are misrouted into the Internet.

; Pre-Defined Multicast Addresses
The multicast addresses <tt>ff00::0/12</tt> are reserved<ref name=rfc4291 /> and should never be assigned to any multicast group. In order to view the complete list of well-known IPv6 multicast addresses that are registered, you should visit the [[Internet Assigned Numbers Authority]] (IANA).<ref>[http://www.iana.org/assignments/ipv6-multicast-addresses IANA Internet Protocol Version 6 Multicast Addresses]. [[Internet Assigned Numbers Authority]].</ref>

There are only 3 IPv6 multicast addresses reserved within scope 1 (interface-local):
{| class="wikitable"
! Address
! Description
|-
|-
!Address block (CIDR)
| <tt>ff01::1</tt>
!First address
| All nodes address, identify the group of all IPv6 nodes
!Last address
!Number of addresses
!Usage
!Purpose
|-
|-
| <tt>ff01::2</tt>
|::/128
|::
| All routers on the local network segment
|::
|1
|Software
|Unspecified address
|-
|-
| <tt>ff01::fb</tt>
|::1/128
|::1
| mDNSv6
|}
|::1
|1

|Host
There are a lot of IPv6 multicast addresses reserved within scope 2 (link-local):
|[[Loopback address]]—a virtual interface that loops all traffic back to itself, the ''local host''
{| class="wikitable"
! Address
! Description
|-
|-
|::ffff:0:0/96
| <tt>ff02::1</tt>
|::ffff:0.0.0.0{{wrap}}::ffff:0:0
| All Nodes Address
|::ffff:255.255.255.255{{wrap}}::ffff:ffff:ffff
|2<sup>32</sup>
|Software
|IPv4-mapped addresses
|-
|-
|::ffff:0:0:0/96
| <tt>ff02::2</tt>
|::ffff:0:0.0.0.0{{wrap}}::ffff:0:0:0
| All Routers Address
|::ffff:0:255.255.255.255{{wrap}}::ffff:0:ffff:ffff
|2<sup>32</sup>
|Software
|IPv4-translated addresses
|-
|-
| <tt>ff02::3</tt>
|64:ff9b::/96
|64:ff9b::0.0.0.0{{wrap}}64:ff9b::0:0
| Unassigned
|64:ff9b::255.255.255.255{{wrap}}64:ff9b::ffff:ffff
|2<sup>32</sup>
| The global Internet
|IPv4/IPv6 translation{{Ref RFC|6052}}
|-
|-
| <tt>ff02::4</tt>
|64:ff9b:1::/48
|64:ff9b:1::
| DVMRP Routers
|64:ff9b:1:ffff:ffff:ffff:ffff:ffff
|2<sup>80</sup>, with 2<sup>48</sup> for each IPv4
|Private internets
|IPv4/IPv6 translation{{Ref RFC|8215}}
|-
|-
| <tt>ff02::5</tt>
|100::/64
|100::
| OSPFIGP
|100::ffff:ffff:ffff:ffff
|2<sup>64</sup>
|Routing
|Discard prefix{{Ref RFC|6666}}
|-
|-
| <tt>ff02::6</tt>
|2001::/32
|2001::
| OSPFIGP Designated Routers
|2001:0:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>96</sup>
| The global Internet
|[[Teredo tunneling]]{{Ref RFC|4680}}
|-
|-
| <tt>ff02::7</tt>
|2001:20::/28
|2001:20::
| ST Routers
|2001:2f:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>100</sup>
|Software
|[[ORCHIDv2]]{{Ref RFC|7343}}
|-
|-
| <tt>ff02::8</tt>
|2001:db8::/32
|2001:db8::
| ST Hosts
|2001:db8:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>96</sup>
|Documentation
|Addresses used in documentation and example source code{{Ref RFC|3849}}
|-
|-
| <tt>ff02::9</tt>
|2002::/16
|2002::
| RIP Routers
|2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>112</sup>
| The global Internet
|The [[6to4]] addressing scheme (deprecated){{Ref RFC|7526}}
|-
|-
| <tt>ff02::a</tt>
|3fff::/20
|3fff::
| EIGRP Routers
|3fff:fff:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>108</sup>
|Documentation
|Addresses used in documentation and example source code{{Ref RFC|9637}}
|-
|-
| <tt>ff02::b</tt>
|5f00::/16
|5f00::
| Mobile-Agents
|5f00:ffff:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>112</sup>
|Routing
|IPv6 [[Segment Routing]] (SRv6)<ref name="draft-ietf-6man-sids-06">{{Cite IETF |title=SRv6 Segment Identifiers in the IPv6 Addressing Architecture | draft=draft-ietf-6man-sids-06 |last=Krishnan |first=S. |date=2024-02-15 |publisher=[[Internet Engineering Task Force|IETF]] |access-date=2024-06-13}}</ref>
|-
|-
| <tt>ff02::c</tt>
|fc00::/7
|fc00::
| SSDP
|fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>121</sup>
|Private internets
|[[Unique local address]]{{Ref RFC|4193}}
|-
|-
|fe80::/64 from fe80::/10
| <tt>ff02::d</tt>
|fe80::
| All PIM Routers
|fe80::ffff:ffff:ffff:ffff<!-- RFC 4291 section 2.5.6 states that the first (10 + 54) = 64 bits of a link-local address are fixed, so only the last 64 bits can vary -->
|2<sup>64</sup>
|Link
|[[Link-local address#IPv6|Link-local address]]
|-
|-
| <tt>ff02::e</tt>
|ff00::/8
|ff00::
| RSVP-ENCAPSULATION
|ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
|2<sup>120</sup>
| The global Internet
|[[Multicast address#IPv6|Multicast address]]
|}<section end=IPv6-special-address-blocks/>

===Unicast addresses===

====Unspecified address====
* {{IPaddr|::|128}}{{snd}}The address with all zero bits is called the ''unspecified address'' (corresponding to {{IPaddr|0.0.0.0|32}} 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 {{IPaddr|0.0.0.0|0}} in IPv4) for destination addresses (unicast, multicast and others) not specified elsewhere in a routing table.

====Local addresses====
* {{IPaddr|::1|128}}{{snd}}The [[loopback]] address is a unicast [[localhost]] address. This address corresponds to {{IPaddr|[[localhost|127.0.0.1]]|8}} in IPv4.<br/>If an application in a host sends packets to this address, the IPv6 stack loops these packets back on the same virtual interface.
* {{IPaddr|fe80::|10}}{{snd}}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 {{IPaddr|169.254.0.0|16}} of IPv4.<br/>Within this prefix only one {{IPaddr||64}} subnet is allocated (there are 54 zero bits), yielding an effective format of {{IPaddr|fe80::|64}}. 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#IPv6|link-local address]] 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====
* {{IPaddr|fc00::|7}} — [[Unique local address]]es (ULAs) are intended for local communication<ref name=rfc4193 /> (comparable to [[private network|IPv4 private addresses]] {{IPaddr|10.0.0.0|8}}, {{IPaddr|172.16.0.0|12}} and {{IPaddr|192.168.0.0|16}}).<br />They are routable only within a set of cooperating sites. The block is split into two halves. The lower half of the block ({{IPaddr|fc00::|8}}) was intended for globally allocated prefixes, but an allocation method has yet to be defined. The upper half ({{IPaddr|fd00::|8}}) is used for ''probabilistically unique'' addresses in which the {{IPaddr||8}} prefix is combined with a 40-bit locally generated [[pseudorandom]] number to obtain a {{IPaddr||48}} 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 {{IPaddr||48}} prefix.<ref name=rfc4193 />

====Transition from IPv4====
* {{IPaddr|::ffff:0:0|96}} — This prefix is used for [[IPv6 transition mechanisms]] and designated as an ''IPv4-mapped IPv6 address''.<br />With a few exceptions, this address type allows the transparent use of the [[transport layer]] protocols over IPv4 through the IPv6 networking [[application programming interface]]. In this [[dual-stack]] configuration, server applications only need to open a single listening [[network socket|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, based on the binding to an IPv6 address, or an IPv4-mapped address.
* {{IPaddr|::ffff:0:0:0|96}} — A prefix used for ''IPv4-translated addresses''. These are used by the [[IPv6 transition mechanism#Stateless IP/ICMP Translation|Stateless IP/ICMP Translation (SIIT)]] protocol.{{Ref RFC|7915}}
* {{IPaddr|64:ff9b::|96}} — The ''well-known prefix''. Addresses with this prefix are used for automatic IPv4/IPv6 translation.<ref name=rfc6052/>
* {{IPaddr|64:ff9b:1::|48}} — A prefix for locally translated IPv4/IPv6 addresses. Addresses with this prefix can be used for multiple IPv4/IPv6 translation mechanisms like [[NAT64]] and [[IPv6 transition mechanism#Stateless IP/ICMP Translation|SIIT]].<ref name=rfc8215 /> Compared to {{IPaddr|64:ff9b::|96}}, these addresses contain their translated IPv4 address in positions 48-63 and 72-87.<ref name=rfc6052/> This means that for every IPv4 address a {{IPaddr||88}} 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 [[Point-to-point (telecommunications)|P2P]] interfaces or [[Docker (software)|docker containers]].
* {{IPaddr|2002::|16}} — This prefix was used for [[6to4]] addressing (prefix from the IPv4 network, {{IPaddr|192.88.99.0|24}}, was also used).<br />The 6to4 addressing scheme is deprecated.<ref name=rfc7526/>

====Special-purpose addresses====
IANA has reserved a so-called ''Sub-TLA ID'' address block for special assignments<ref name="rfc6890" />{{Ref RFC|2928}} of {{IPaddr|2001::|23}} (split into the range of 64 network prefixes {{IPaddr|2001:0000::|29}} through {{IPaddr|2001:01f8::|29}}). Three assignments from this block are currently allocated:
* {{IPaddr|2001::|32}} — Used for [[Teredo tunneling]], an [[IPv6 transition mechanism]].
* {{IPaddr|2001:2::|48}} — Used for [[Benchmark (computing)|benchmarking]] IPv6. Corresponds with {{IPaddr|198.18.0.0|15}} used for benchmarking IPv4. Assigned to the Benchmarking Methodology Working Group (BMWG).{{Ref RFC|5180}}
* {{IPaddr|2001:20::|28}} — Overlay Routable Cryptographic Hash Identifiers (ORCHIDv2).<ref name=rfc7343/> These are non-routed IPv6 addresses used for Cryptographic Hash Identifiers.

==== {{Anchor|Documentation}} Documentation ====
* {{IPaddr|2001:db8::|32}} — This prefix is used in documentation<ref name=rfc3849/>{{efn|{{IPaddr|192.0.2.0|24}}, {{IPaddr|198.51.100.0|24}}, and {{IPaddr|203.0.113.0|24}} are used for documentation in IPv4.{{Ref RFC|5737}}}} The addresses should be used anywhere an example IPv6 address is given or model networking scenarios are described.
* {{IPaddr|3fff::|20}} — This new prefix was allocated to account for modern-day large-scale network modelling, that cannot be covered by a single {{IPaddr||32}} prefix.{{Ref RFC|9637}}

====Discard====
* {{IPaddr|100::|64}} — This prefix is used for discarding traffic.<ref name=rfc6666/>

====Deprecated and obsolete====
See {{slink||Deprecated and obsolete addresses}}

===Multicast addresses===
The multicast addresses {{IPaddr|ff0X::}}, where {{IPaddr|X}} is any hexadecimal value, are reserved<ref name=rfc4291 /> and managed by the [[Internet Assigned Numbers Authority]] (IANA).<ref>{{Cite web|title=IPv6 Multicast Address Space Registry|publisher=[[Internet Assigned Numbers Authority]]|url=https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml}}</ref>

{| class="wikitable"
|+Common IPv6 multicast addresses
! Address
! Description
! Available scopes
|-
|-
| {{IPaddr|ff0X::1}}
| <tt>ff02::f</tt>
| All nodes address, identify the group of all IPv6 nodes
| UPnP
| Available in scope 1 (interface-local) and 2 (link-local):
* {{IPaddr|ff01::1}} → All nodes in the interface-local
* {{IPaddr|ff02::1}} → All nodes in the link-local
|-
|-
| {{IPaddr|ff0X::2}}
| <tt>ff02::12</tt>
| All routers
| VRRP
| Available in scope 1 (interface-local), 2 (link-local) and 5 (site-local):
* {{IPaddr|ff01::2}} → All routers in the interface-local
* {{IPaddr|ff02::2}} → All routers in the link-local
* {{IPaddr|ff05::2}} → All routers in the site-local
|-
|-
| <tt>ff02::16</tt>
| {{IPaddr|ff02::5}}
| [[Open Shortest Path First|OSPFIGP]]
| All MLDv2-capable routers
| 2 (link-local)
|-
|-
| <tt>ff02::1a</tt>
| {{IPaddr|ff02::6}}
| [[Open Shortest Path First|OSPFIGP]] designated routers
| all-RPL-nodes
| 2 (link-local)
|-
|-
| <tt>ff02::6a</tt>
| {{IPaddr|ff02::9}}
| [[Routing Information Protocol|RIP]] routers
| All-Snoopers
| 2 (link-local)
|-
|-
| <tt>ff02::6b</tt>
| {{IPaddr|ff02::a}}
| [[Enhanced Interior Gateway Routing Protocol|EIGRP]] routers
| PTP-pdelay
| 2 (link-local)
|-
|-
| <tt>ff02::6c</tt>
| {{IPaddr|ff02::c}}
| [[WS-Discovery|Web Services Dynamic Discovery]]
| Saratoga
| 2 (link-local)
|-
|-
| <tt>ff02::6d</tt>
| {{IPaddr|ff02::d}}
| All [[Protocol Independent Multicast|PIM]] routers
| LL-MANET-Routers
| 2 (link-local)
|-
|-
| <tt>ff02::6e</tt>
| {{IPaddr|ff02::1a}}
| All [[IPv6 Routing Protocol for Low-Power and Lossy Networks|RPL]] routers
| IGRS
| 2 (link-local)
|-
|-
| {{IPaddr|ff0X::fb}}
| <tt>ff02::6f</tt>
| [[Multicast DNS|mDNSv6]]
| iADT Discovery
| Available in all scopes
|-
|-
| {{IPaddr|ff0X::101}}
| <tt>ff02::fb</tt>
| All [[Network Time Protocol|NTP]] servers
| mDNSv6
| Available in all scopes
|-
|-
| <tt>ff02::1:1</tt>
| {{IPaddr|ff02::1:1}}
| Link Name
| Link name
| 2 (link-local)
|-
|-
| <tt>ff02::1:2</tt>
| {{IPaddr|ff02::1:2}}
| All [[DHCPv6]] servers and relay agents{{Ref RFC|8415}}
| All-dhcp-agents
| 2 (link-local)
|-
|-
| <tt>ff02::1:3</tt>
| {{IPaddr|ff02::1:3}}
| Link-local Multicast Name Resolution
| Link-local multicast name resolution
| 2 (link-local)
|-
|-
| <tt>ff02::1:4</tt>
| {{IPaddr|ff05::1:3}}
| A relay agent may use this address to reach all [[DHCPv6]] servers in the site.{{Ref RFC|8415}}
| DTCP Announcement
| 5 (site-local)
|-
|-
| <tt>ff02::1:5</tt>
| {{IPaddr|ff02::1:ff00:0/104}}
| [[Solicited-node multicast address]] (see below)
| afore_vdp
| 2 (link-local)
|-
|-
| <tt>ff02::1:6</tt>
| {{IPaddr|ff02::2:ff00:0/104}}
| Node information queries
| Babel
| 2 (link-local)
|-
| <tt>FF02::1:FF00:0000/104</tt>
| [[Solicited-node multicast address]]. The least significant 24 bits of the 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]] (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.
|-
| <tt>FF02:0:0:0:0:2:FF00::/104</tt>
| Node Information Queries
|}
|}


====Solicited-node multicast address====
And a few more within scope 5 (site-local):
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]] (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.
{| class="wikitable"
! Address
! Description
|-
| <tt>ff05::1</tt>
| All Nodes Address
|-
| <tt>ff05::2</tt>
| All Routers Address
|-
| <tt>ff05::fb</tt>
| mDNSv6
|-
| <tt>ff05::101</tt>
| All Network Time Protocol (NTP) servers
|-
| <tt>ff05::1:3</tt>
| All-dhcp-servers
|}


==Stateless address autoconfiguration (SLAAC)==
; IPv4 transition
{{See also|IPv6#Stateless address autoconfiguration (SLAAC)|Link-local address#IPv6}}
{{Main|IPv6 transition mechanisms}}
On system startup, a node automatically creates a [[link-local address]] 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'''),{{Ref RFC|4862}} using a component of the [[Neighbor Discovery Protocol]]. This address is selected with the prefix {{IPaddr|fe80::|64}}.
* <tt>::ffff:0:0/96</tt> — This prefix designated an ''IPv4-mapped IPv6 address''. With a few exceptions, this address type allows the transparent use of the [[Transport Layer]] protocols over IPv4 through the IPv6 networking [[application programming interface]]. Server applications only need to open a single listening [[berkeley sockets|socket]] to handle connections from clients using IPv6 or IPv4 protocols. IPv6 clients will be 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, based on the binding to an IPv6 address, or an IPv4-mapped address. (See also [[IPv6#Transition mechanisms|Transition mechanisms]].)
* <tt>::ffff:0:0:0/96</tt> — A prefix used for ''IPv4-translated addresses'' which are used by the [[IPv6 transition mechanisms#Stateless IP/ICMP Translation (SIIT)|Stateless IP/ICMP Translation (SIIT)]] protocol.
* <tt>64:ff9b::/96</tt> — The "Well-Known" Prefix. Addresses with this prefix are used for automatic IPv4/IPv6 translation.<ref name=rfc6052>RFC 6052, "IPv6 Addressing of IPv4/IPv6 Translators", C. Bao, C. Huitema, M. Bagnulo, M. Boucadair, X. Li, (October 2010)</ref>
{{Main|6to4}}
* <tt>2002::/16</tt> — This prefix is used for 6to4 addressing. Here, an address from the IPv4 network <tt>192.88.99.0/24</tt> is also used.


In IPv4, typical ''configuration protocols'' include DHCP or PPP. Although [[DHCPv6]] exists, IPv6 hosts normally use the [[Neighbor Discovery Protocol]] to create a globally routable unicast address: the host sends router solicitation requests and an IPv6 [[router (computing)|router]] responds with a prefix assignment.{{Ref RFC|4861}}
; Special Purpose Addresses<ref name=rfc4773>RFC 4773, ''Administration of the IANA Special Purpose IPv6 Address Block'', G. Huston (December 2006)</ref>
The IANA has been allocated a so-called 'Sub-TLA ID' address block<ref name=rfc2928>RFC 2928, ''Initial IPv6 Sub-TLA ID Assignments'', R. Hinden, [[Steve Deering|S. Deering]], R. Fink, T. Hain (September 2000) The [[Internet Society]]</ref> which consists of 64 network prefixes in the range <tt>2001:0000::/29</tt> through <tt>2001:01f8::/29</tt>. Three assignments from this block have been made:
{{Main|Teredo tunneling}}
<!--The Retrolium Prefix is not notable as it is merely an organization's allocation, and not a block reserved for TECHNICAL purposes. Don't add it.-->
* <tt>2001::/32</tt> — Used for Teredo tunneling (which also falls into the category of [[IPv6 transition mechanisms]]).
* <tt>2001:2::/48</tt> — Assigned to the Benchmarking Methodology Working Group (BMWG)<ref name=rfc5180>RFC 5180, ''IPv6 Benchmarking Methodology for Network Interconnect Devices'', C. Popoviciu, A. Hamza, G. Van de Velde, D. Dugatkin (May 2008)</ref> for [[Benchmark (computing)|benchmarking]] IPv6 (corresponding to <tt>198.18.0.0/15</tt> for benchmarking IPv4).
* <tt>2001:10::/28</tt> — ORCHID (Overlay Routable Cryptographic Hash Identifiers).<ref name=rfc4843>RFC 4843 (experimental), ''An IPv6 Prefix for Overlay Routable Cryptographic Hash Identifiers (ORCHID)'', P. Nikander, J. Laganier, F. Dupont (April 2007)</ref> These are non-routed IPv6 addresses used for Cryptographic Hash Identifiers.


===Interface identifier===
; Documentation
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]] groups need to be joined for neighbor discovery. For this, the solicited-node multicast address is used, formed from the network prefix {{IPaddr|ff02::1:ff00:0|104}} and the 24 least significant bits of the address.
* <tt>2001:db8::/32</tt> — This prefix is used in documentation.<ref name=rfc3849>RFC 3849, ''IPv6 Address Prefix Reserved for Documentation'', G. Huston, A. Lord, P. Smith (July 2004)</ref> The addresses should be used anywhere an example IPv6 address is given or model networking scenarios are described (corresponding to <tt>192.0.2.0/24</tt>, <tt>198.51.100.0/24</tt>, and <tt>203.0.113.0/24</tt> in IPv4.)<ref name=rfc5737>RFC 5737, ''IPv4 Address Blocks Reserved for Documentation'', J. Arkko, M. Cotton, L. Vegoda (January 2010), ISSN: 2070-1721</ref>


A 64-bit interface identifier can be derived from the interface's 48-bit [[MAC address]], although [[IPv6_address#Stable_privacy_addresses|stable privacy addresses]] are now recommended as a default instead.{{Ref RFC|8064}} A MAC address {{MACaddr|00-0C-29-0C-47-D5}} is turned into a 64-bit [[EUI-64]] by inserting {{MACaddr|FF-FE}} in the middle: {{MACaddr|00-0C-29-<u>FF-FE</u>-0C-47-D5}}.{{efn|When this EUI-64 is used to form an IPv6 address, it is modified:<ref name=rfc4291/> the meaning of the ''Universal/Local'' bit (the 7th most significant bit of the EUI-64, starting from 1) is inverted, so that a 1 now means ''Universal''. To create an IPv6 address with the network prefix {{IPaddr|2001:db8:1:2::|64}} it yields the address {{IPaddr|2001:db8:1:2:0<u>2</u>0c:29ff:fe0c:47d5}} (with the ''Universal/Local'' bit, the second-least-significant bit of the underlined quartet, inverted to 1 in this case because the MAC address is universally unique).}}
; Deprecated and obsolete addresses
{{further|[[#Historical notes|Historical notes]]}}


==Stateless address autoconfiguration==
===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]] type 135 and 136) messages. While in the process of establishing uniqueness an address has a ''tentative'' state.
On system startup, a node automatically creates a [[link-local address]] 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),<ref name=rfc4862>RFC 4862, ''IPv6 Stateless Address Autoconfiguration'', S. Thomson, T. Narten, T. Jinmei (September 2007)</ref> using a component of the [[Neighbor Discovery Protocol]]. This address is selected with the prefix <tt>fe80::/64</tt>.


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 ({{IPaddr|::|128}}) as its source address. The node also joins the all-hosts multicast address {{IPaddr|ff02::1}}, so it can receive ''Neighbor Advertisements''.
In IPv4, typical "configuration protocols" include DHCP or PPP. Although [[DHCPv6]] exists, IPv6 hosts normally use the [[Neighbor Discovery Protocol]] to create a globally routable unicast address: the host sends router solicitation requests and an IPv6 [[router]] responds with a prefix assignment.<ref name=rfc4861>RFC 4861, ''Neighbor Discovery for IP version 6 (IPv6)'', T. Narten, E. Nordmark, W. Simpson, H. Holiman (September 2007)</ref>


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.
The lower 64 bits of these addresses are populated with a 64-bit interface identifier in [[#Modified EUI-64|modified EUI-64]] format. This identifier is usually shared by all automatically configured addresses of that interface, which has the advantage that only one [[multicast]] group needs to be joined for neighbor discovery. For this, a multicast address is used, formed from the network prefix <tt>ff02::1:ff00:0/104</tt> and the 24 least significant bits of the address.


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.
===Modified EUI-64===
A 64-bit interface identifier is most commonly derived from its 48-bit [[MAC address]]. A MAC address <tt>00:1D:BA:06:37:64</tt> is turned into a 64-bit [[EUI-64]] by inserting <tt>FF:FE</tt> in the middle: <tt>00:1D:BA:<u>FF:FE</u>:06:37:64</tt>. When this EUI-64 is used to form an IPv6 address it is modified:<ref name=rfc4291/> the meaning of the ''Universal/Local'' bit (the 7th most significant bit of the EUI-64, starting from 1) is inverted, so that a <tt>1</tt> now means ''Universal''. To create an IPv6 address with the network prefix <tt>2001:db8:1:2::/64</tt> it yields the address <tt>2001:db8:1:2:0<u>2</u>1d:baff:fe06:3764</tt> (with the underlined ''U/L'' bit inverted to a <tt>1</tt>, because the MAC address is universally unique).


===Address lifetime===
The reason for modifying the ''U/L'' bit is that when using manually assigned addresses on an interface it means you can simply assign the address <tt>2001:db8:1:2<u>::1</u>/64</tt> instead of the less appealing and counter-intuitive <tt>2001:db8:1:2:<u>0200::1</u>/64</tt>. When manually assigning link-local addresses, the need for this modification is even more apparent: you can assign the short address <tt>fc80<u>::1</u></tt> instead of the long <tt>fc80:<u>0:0:0:0200::1</u></tt>.
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''.<ref>
{{Cite news| journal=The Internet Protocol Journal| year=2006| volume=9| issue=3| pages=16–29| title=IPv6 Internals| author=Iljitsch van Beijnum |url=http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_9-3/ipv6_internals.html}}</ref> Lifetimes can be configured in [[router (computing)|router]]s 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.{{efn|In most cases, the lifetime does not expire because new Router Advertisements (RAs) refresh the timers. But if there are no more RAs, eventually the preferred lifetime elapses and the address becomes ''deprecated''.}} 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]].
===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]] type 135 and 136) messages. While in the process of establishing uniqueness an address has a ''tentative'' state.


===Temporary addresses===
The node joins the ''solicited-node'' multicast address for the tentative address (if not already done so) and sends neighbor solicitations, with the tentative address as target address and the unspecified address (<tt>::/128</tt>) as source address. The node also joins the all-hosts multicast address <tt>ff02::1</tt>, so it will be able to receive ''Neighbor Advertisements''.
The globally unique and static MAC addresses used by stateless address autoconfiguration to create interface identifiers offer an opportunity to track user equipment across time and IPv6 network prefix changes.<ref>[http://portal.acm.org/citation.cfm?id=1852723&dl=GUIDE&coll=GUIDE&CFID=103687796&CFTOKEN=17254293 The privacy implications of stateless IPv6 addressing]. Portal.acm.org (2010-04-21). Retrieved on 2011-09-28.</ref> 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{{Ref RFC|8981}} 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]] (DNS).
If a node receives a neighbor solicitation with its own tentative address as the target address, then that 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 it may be assigned and used by an interface.


Network interfaces configured for IPv6 use temporary addresses by default in [[Mac OS X Lion|OS X Lion]] and later Apple systems{{cn|date=March 2024}} as well as in [[Windows Vista]], [[Windows 2008 Server]] and later Microsoft systems.<ref>{{cite web |url=https://www.networkacademy.io/ccna/ipv6/ipv6-on-windows |title=IPv6 on Windows |access-date=2024-03-25}}</ref>
===Address lifetime===
Each IPv6 address that is bound to an interface has a fixed lifetime. Lifetimes are infinite, unless configured to shorter a period. There are two lifetimes that govern the state of an address: the ''preferred lifetime'' and the ''valid lifetime''.<ref>
{{Cite news| journal=The Internet Protocol Journal| year=2006| volume=9| issue=3| pages=16–29| title=IPv6 Internals| author=Iljitsch van Beijnum |url=http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_9-3/ipv6_internals.html}}</ref> Lifetimes can be configured in [[router]]s that provide the values used for autoconfiguration, or specified when manually configuring addresses on interfaces.


===Cryptographically generated addresses===
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]].
As a means to enhance security for [[Neighbor Discovery Protocol]] ''cryptographically generated addresses'' (CGAs) were introduced in 2005{{Ref RFC|3972}} as part of the [[Secure Neighbor Discovery]] (SEND) protocol.


Such an address is generated using two [[hash function]]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.{{efn|Comparable with the 'proof of work' field in [[Bitcoin]] mining.}} 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.
===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—across time and IPv6 network prefix changes—and so users.<ref>[http://portal.acm.org/citation.cfm?id=1852723&dl=GUIDE&coll=GUIDE&CFID=103687796&CFTOKEN=17254293 The privacy implications of stateless IPv6 addressing]</ref> 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<ref name=rfc4941>RFC 4941, ''Privacy Extensions for Stateless Address Autoconfiguration in IPv6'', T. Narten, R. Draves, S. Krishnan (September 2007)</ref> and relatively short lifetimes (hours to days), after which they are replaced with new addresses.


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.
Temporary addresses may be used as source address for originating connections, while external hosts use a public address by querying the Domain Name System.


===Stable privacy addresses===
Network interfaces configured for IPv6 in [[Windows Vista]] and [[Windows 2008 Server]] or later Microsoft systems use temporary addresses by default.
The use of the [[modified EUI-64]] format has serious implications for security and privacy concerns,{{Ref RFC|7217}} because the underlying hardware address (most typically the [[MAC address]]) 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.{{Ref RFC|7217}}


==Default address selection==
==Default address selection==
IPv6-enabled network interfaces usually have more than one IPv6 address, for example, a link-local and a global address, and permanent versus temporary addresses. IPv6 introduces the concepts of address scope and selection preference, yielding multiple choices for source and destination address selections in communication with another host.
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,<ref name=rfc3484>RFC 3484, ''Default Address Selection for Internet Protocol version 6 (IPv6)'', R. Draves, The Internet Society (February 2003)</ref> which selects the most appropriate address to use in communications with a particular destination (including the use of IPv4-mapped addresses in [[dual-stack]] implementations), is based on a user-customizable preference table that associates each routing prefix with a precedence level. The default table is as follows:<ref name=rfc3484/>
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]] implementations.{{Ref RFC|6724}} It uses a configurable preference table that associates each routing prefix with a precedence level. The default table has the following content:
:{| class="wikitable"
{| class="wikitable"
|+ Default Prefix Policy Table
|-
|-
!style="text-align: left"| Prefix
! Prefix
!| Precedence
! align="right" | Precedence
!| Label
! align="right" | Label
! align="right" | Usage
|-
|-
| ::1/128
||<tt>::1/128<br>::/0<br>2002::/16<br>::/96<br>::ffff:0:0/96</tt>
|style="text-align: right"| 50<br>40<br>30<br>20<br>10
| align="right" | 50
|style="text-align: right"| 0<br>1<br>2<br>3<br>4
| align="right" | 0
| | Localhost
|-
| ::/0
| align="right" | 40
| align="right" | 1
| | Default unicast
|-
| ::ffff:0:0/96
| align="right" | 35
| align="right" | 4
| | IPv4-mapped IPv6 address
|-
| 2002::/16
| align="right" | 30
| align="right" | 2
| | 6to4
|-
| 2001::/32
| align="right" | 5
| align="right" | 5
| | Teredo tunneling
|-
| fc00::/7
| align="right" | 3
| align="right" | 13
| | Unique local address
|-
| ::/96
| align="right" | 1
| align="right" | 3
| | IPv4-compatible addresses (deprecated)
|-
| fec0::/10
| align="right" | 1
| align="right" | 11
| | Site-local address (deprecated)
|-
| 3ffe::/16
| align="right" | 1
| align="right" | 12
| | 6bone (returned)
|}
|}
The default configuration places preference on IPv6, rather than IPv4, and on 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]] and candidate destination addresses may be queried via the [[Domain Name System]] (DNS).


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]] and candidate destination addresses may be queried via DNS.
==Link-local addresses and zone indices==
Because all link-local addresses in a host have a common prefix, normal routing procedures cannot be used to choose the outgoing interface when sending packets to a link-local destination. A special identifier, known as a ''zone index'',<ref name=rfc4007/> is needed to provide the additional routing information; in the case of link-local addresses, zone indices correspond to interface identifiers.


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.
When an address is written textually, the zone index is appended to the address, separated by a [[percent sign]] (<tt>%</tt>). The actual syntax of zone indices depends on the operating system:


==Domain Name System==
* the [[Microsoft Windows]] IPv6 stack uses numeric zone indexes, e.g., <tt>fe80::3%1</tt>. The index is determined by the interface number;
In the [[Domain Name System]], [[hostname]]s are mapped to IPv6 addresses by ''AAAA'' resource records, so-called ''quad-A'' records.{{Ref RFC|3596}} For [[Reverse DNS lookup|reverse lookup]] the IETF reserved the domain [[.arpa|ip6.arpa]], where the name space is hierarchically divided by the 1-digit [[hexadecimal]] representation of [[nibble]] units (4 bits) of the IPv6 address.
* most [[Unix]]-like systems (e.g., [[BSD]], [[Linux]], [[Mac OS X]]) use the interface name as a zone index: <tt>fe80::3%eth0</tt>.


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]] {{IPaddr|fdda:5cc1:23:4::1f}}. Its quad-A address record is
Zone index notations cause syntax conflicts when used in [[Uniform Resource Identifiers]] (URI), as the '%' character also designates [[percent-encoding]].<ref>[http://tools.ietf.org/html/draft-fenner-literal-zone-02 Formats for IPv6 Scope Zone Identifiers in Literal Address Formats]</ref>
<pre>

==IPv6 addresses in the Domain Name System==
In the [[Domain Name System]] [[hostname]]s are mapped to IPv6 addresses by ''AAAA'' resource records, so-called ''quad-A'' records. For [[Reverse DNS lookup|reverse lookup]] the IETF reserved the domain <tt>[[.arpa|ip6.arpa]]</tt>, where the name space is hierarchically divided by the 1-digit [[hexadecimal]] representation of [[nibble]] units (4 bits) of the IPv6 address. This scheme is defined in RFC 3596.

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]] <tt>fdda:5cc1:23:4::1f</tt>. Its quad-A address record is
derrick.example.com. IN AAAA fdda:5cc1:23:4::1f
derrick.example.com. IN AAAA fdda:5cc1:23:4::1f
</pre>
and its IPv6 pointer record is
and its IPv6 pointer record is
<pre>
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.
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.
</pre>
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.
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]] protocol. Queries and replies may be transmitted over IPv6 or IPv4 transports regardless of the address family of the data requested.
The DNS protocol is independent of its [[transport layer]] protocol. Queries and replies may be transmitted over IPv6 or IPv4 transports regardless of the address family of the data requested.


{| class="wikitable" style="margin: 1em auto 1em auto"
{| class="wikitable"
|+ '''AAAA record fields'''
|+AAAA record fields
|-
|-
| NAME || Domain name
| NAME || Domain name
Line 539: Line 707:
| CLASS || Internet (1)
| CLASS || Internet (1)
|-
|-
| [[Time to live|TTL]] || Time to live in seconds
| [[Time to live|TTL]] || Time to live, in seconds
|-
|-
| RDLENGTH || Length of RDATA field
| RDLENGTH || Length of RDATA field
|-
|-
| RDATA || String form of the IPV6 address<ref name=rfc4291 />
| RDATA || 128-bit IPv6 address in [[network byte order]]
|}
|}

===Transition challenges===
As of 2009, many DNS resolvers in home-networking NAT devices and routers still handle AAAA records improperly.<ref>RFC 4074 ''Common Misbehavior Against DNS Queries for IPv6 Addresses'', Y. Morishita, T. Jinmei. May 2005.</ref> Some of these simply drop 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 to trigger. This often causes a perceived slow down when connecting to IPv6 hosts.


==Historical notes==
==Historical notes==

===Deprecated and obsolete addresses===
===Deprecated and obsolete addresses===
<!-- Items sorted on deprecation date. -->
<!-- Items sorted on deprecation date. -->
* The site-local prefix <tt>fec0::/10</tt> specifies that the address is valid only within the site network of an organization. It was part of the original addressing architecture<ref name=rfc1884>RFC 1884, ''IP Version 6 Addressing Architecture'', R. Hinden, [[Steve Deering|S. Deering]] ({{date|dec 1995}})</ref> in {{date|dec 1995}}, but its use was deprecated in {{date|sep 2004}}<ref name=rfc3879>RFC 3879, ''Deprecating Site Local Addresses'', C. Huitema, B. Carpenter ({{date|sep 2004}})</ref> 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 {{date|oct 2005}}, a new specification<ref name=rfc4193>RFC 4193, ''Unique Local IPv6 Unicast Addresses'', R. Hinden, B. Haberman ({{date|oct 2005}})</ref> replaced this address type with [[unique local address]]es.
* The site-local prefix {{IPaddr|fec0::|10}} 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,{{Ref RFC|1884}} 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.{{Ref RFC|3879}} In October 2005, a new specification replaced this address type with [[unique local address]]es.{{Ref RFC|4193}}
* The address block {{IPaddr|200::|7}} was defined as an OSI NSAP-mapped prefix set in August 1996,{{Ref RFC|4147}}{{Ref RFC|1888}} but was deprecated in December 2004.{{Ref RFC|4048}}

* The 96-bit zero-value prefix {{IPaddr|::|96}}, originally known as ''IPv4-compatible addresses'', was mentioned in 1995<ref name=rfc1884 /> but never fully described. This range of addresses was used to represent [[IPv4]] 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.{{Ref RFC|4291}} 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.<!--[[User:Kvng/RTH]]-->
* The address block <tt>0200::/7</tt> was defined as an OSI NSAP-mapped prefix set in {{date|aug 1996}},<ref name=rfc4147>RFC 4147, ''Proposed Changes to the Format of the IANA IPv6 Registry'', G. Houston ({{date|aug 2005}})</ref><ref name=rfc1888>RFC 1888, ''OSI NSAPs and IPv6'', J. Bound, B. Carpenter, D. Harrington, J. Houldsworth, A. Lloyd ({{date|aug 1996}})</ref> but was deprecated in {{date|dec 2004}}.<ref name=rfc4048>RFC 4048, ''<nowiki>RFC 1888</nowiki> Is Obsolete'', B. Carpenter ({{date|apr 2005}})</ref>
* Address block {{IPaddr|3ffe::|16}} was allocated for test purposes for the [[6bone]] network in December 1998.{{Ref RFC|2471}} Prior to that, the address block {{IPaddr|5f00::|8}} was used for this purpose. Both address blocks were returned to the address pool in June 2006.{{Ref RFC|3701}}

* Due to operational problems with [[6to4]] the use of address block {{IPaddr|2002::|16}} is diminishing, since the 6to4 mechanism is deprecated since May 2015.{{Ref RFC|7526}} Although IPv4 address block {{IPaddr|192.88.99.0|24}} is deprecated, {{IPaddr|2002::|16}} is not.
* The 96-bit zero-value prefix <tt>::/96</tt>, originally known as ''IPv4-compatible addresses'', was mentioned in 1995<ref name=rfc1884 /> but first described in 1998.<ref name=rfc2471 /> This class of addresses was used to represent [[IPv4]] 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 IPv4 address that is represented. In February 2006 the [[Internet Engineering Task Force]] (IETF) has deprecated the use of IPv4-compatible addresses.<ref name=rfc4291 /> 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.
* In April 2007 the address block {{IPaddr|2001:10::|28}} was assigned for Overlay Routable Cryptographic Hash Identifiers (ORCHID).{{Ref RFC|4843}} It was intended for experimental use. In September 2014 a second version of ORCHID was specified,{{Ref RFC|7343}} and with the introduction of block {{IPaddr|2001:20::|28}} the original block was returned to [[IANA]].

* Address block <tt>3ffe::/16</tt> was allocated for test purposes for the [[6bone]] network in {{date|dec 1998}}.<ref name=rfc2471>RFC 2471, ''IPv6 Testing Address Allocation'', R. Hinden, R. Fink, [[Jon Postel|J. Postel]] ({{date|dec 1998}})</ref> Prior to that, the address block <tt>5F00::/8</tt> was used for this purpose. Both address blocks were returned to the address pool in {{date|jun 2006}}.<ref name=rfc3701>RFC 3701, ''6bone (IPv6 Testing Address Allocation) Phaseout'', R. Fink, R. Hinden ({{date|mar 2004}})</ref>


===Miscellaneous===
===Miscellaneous===
* IPv6 addresses were originally registered in the [[Domain name system]] (DNS) in the <tt>''ip6''</tt> zone under the <tt>[[.int]]</tt> top-level domain for [[Reverse DNS lookup|reverse lookups]]. In 2000 the [[Internet Architecture Board]] (IAB) reverted their intentions that <tt>[[.arpa]]</tt> be moved to <tt>.int</tt>, and decided that the <tt>.arpa</tt> top-level domain should retain its original function. That what was already registered under <tt>ip6.int</tt> should be moved to <tt>ip6.arpa</tt> instead. The IAB formalized this in {{date|aug 2001}}.<ref name=rfc3152>RFC 3152, ''Delegation of IP6.ARPA'', R. Bush ({{date|aug 2001}})</ref> The <tt>ip6.int</tt> zone was officially removed on {{date|2006-6-6}}.
* For [[reverse DNS lookup]], IPv6 addresses were originally registered in the DNS zone ''ip6.int'', because it was expected that the top-level domain [[.arpa|arpa]] would be retired. In 2000, the [[Internet Architecture Board]] (IAB) reverted this intention, and decided in 2001 that arpa should retain its original function. Domains in ip6.int were moved to ip6.arpa{{Ref RFC|3152}} 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.{{Ref RFC|6177}} Instead of assigning either a {{IPaddr||48}}, {{IPaddr||64}}, or {{IPaddr||128}} (according to [[Internet Architecture Board|IAB]]'s and [[IESG]]'s views of 2001),{{Ref RFC|3177}} Internet service providers should consider assigning smaller blocks (for example a {{IPaddr||56}}) to end users. The [[ARIN]], [[RIPE]] & [[APNIC]] regional registries' policies encourage {{IPaddr||56}} assignments where appropriate.{{Ref RFC|6177}}
* Originally, two proposals existed for translating domain names to IPv6 addresses: one using AAAA records,{{Ref RFC|1886}} the other using A6 records.{{Ref RFC|2874}} 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,<ref>[https://tools.ietf.org/html/draft-ietf-dnsext-aaaa-a6-01 Comparison of AAAA and A6 (do we really need A6?)], Jun-ichiro itojun Hagino, (July 2001)</ref>{{Ref RFC|3363}}{{Ref RFC|3364}}{{Ref RFC|6536}} the method was moved to experimental status in 2002,<ref name=rfc3363/> and finally to historic status in 2012.<ref name=rfc6536/>
* In 2009, many DNS resolvers in home-networking NAT devices and routers were found to handle AAAA records improperly.{{Ref RFC|4074}} 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 to trigger. This often causes increased latency when connecting to dual-stack IPv6/IPv4 hosts, as the client software waits for the IPv6 connection to fail before trying IPv4. {{See also|Happy Eyeballs}}


==Notes==
* In {{date|mar 2011}} the [[IETF]] refined their recommendations for allocation of address blocks to end sites.<ref name=rfc6177 /> Instead of assigning either a <tt>/48</tt>, <tt>/64</tt>, or <tt>/128</tt> (according to [[IAB]]'s and [[IESG]]'s views of 2001),<ref name=rfc3177>RFC 3177, "IAB/IESG Recommendations on IPv6 Address Allocations to Sites", [[IAB]], [[IESG]], (September 2001).</ref> ISP's are now recommended to assign smaller blocks (up to a <tt>/56</tt>) to their end users, if appropriate.
{{Notelist}}


==References==
==References==
{{Reflist|colwidth=30em}}
{{Reflist}}


==External links==
==External links==
*[http://www.iana.org/assignments/ipv6-multicast-addresses IP Version 6 multicast addresses]
*[https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml IP Version 6 multicast addresses]
* {{Cite book
* {{Cite book
|last=Beijnum, van
|last=Beijnum, van
Line 575: Line 744:
|year=2005
|year=2005
|title=Running IPv6
|title=Running IPv6
|isbn=978-1-59059-527-5
|url=http://www.apress.com/book/bookDisplay.html?bID=10026
|isbn=1-59059-527-0
}}
}}
* {{Ref RFC|1924|ref=no|quote=Represent any IPv6 address in 20 octets.}} This [[April Fools' Day Request for Comments|humorous RFC]] specifies an alternative way of representing IPv6 addresses, using a base-85 encoding.
* {{Cite web
|url=RFC 1924
|title=A Compact Representation of IPv6 Addresses
|last=Elz
|first=Robert
|date=1996-04-01
|publisher=[[IETF]]
|quote=Represent any IPv6 address in 20 octets.
}} This [[april fools' day|humorous]] RFC specifies an alternative way of representing IPv6 addresses, using a base-85 encoding.
*[http://www.netmatics.net/IPv6Calcs/IPv6AddrCalc.aspx IPv6 Address Calculator]


{{IPv6}}
{{IPv6}}
<!--- Categories --->


{{DEFAULTSORT:Ipv6 Address}}
{{DEFAULTSORT:Ipv6 Address}}
[[Category:IPv6]]
[[Category:IPv6|Address]]
[[Category:Network addressing]]
[[Category:IP addresses| IPv6 address]]

[[ar:عنوان آي بي (إصدار 6)]]
[[es:Dirección IPv6]]
[[fr:Adresse IPv6]]
[[hu:IPv6-cím]]
[[ta:இ.நெறி ப6 முகவரி]]

Latest revision as of 18:21, 30 November 2024

Decomposition of an IPv6 address into its binary form

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 using IPv6. IP addresses are included in the packet header 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, Internet Protocol version 4 (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.

Addressing methods

[edit]

IPv6 addresses are classified by the primary addressing and routing methodologies common in networking: unicast addressing, anycast addressing, and multicast addressing.[1]

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 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 addressing. Broadcast's traditional role is subsumed by multicast addressing to the all-nodes link-local multicast group ff02::1. 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

[edit]

An IPv6 address consists of 128 bits.[1] 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

[edit]

Unicast and anycast addresses are typically composed of two logical parts: a 64-bit network prefix used for routing, and a 64-bit interface identifier used to identify a host's network interface.

General unicast address format (routing prefix size varies)
bits 48 (or more) 16 (or fewer) 64
field routing prefix subnet ID interface identifier

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 using the modified EUI-64 format, but this method is now not recommended for privacy reasons.[2])

Unique local addresses are addresses analogous to IPv4 private network addresses.

Unique local address format
bits 7 1 40 16 64
field prefix L random subnet ID interface identifier

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 /48 routing prefix.

A link-local address is also based on the interface identifier, but uses a different format for the network prefix.

Link-local address format
bits 10 54 64
field prefix zeroes interface identifier

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 (fe80::/64 link-local address prefix), rendering them non-routable.

Multicast address format

[edit]

Multicast addresses are formed according to several specific formatting rules, depending on the application.

General multicast address format
bits 8 4 4 112
field prefix flg sc group ID

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;[1] the most-significant flag bit is reserved for future use.

Multicast address flags[3]
bit flag Meaning when 0 Meaning when 1
8 reserved reserved reserved
9 R (Rendezvous)[4] Rendezvous point not embedded Rendezvous point embedded
10 P (Prefix)[5] Without prefix information Address based on network prefix
11 T (Transient)[1] Well-known multicast address Dynamically assigned multicast address

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.

Solicited-node multicast address format
bits 8 4 4 79 9 24
field prefix flg sc zeroes ones unicast address

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.

Unicast-prefix-based multicast address format[4][5]
bits 8 4 4 4 4 8 64 32
field prefix flg sc res riid plen network prefix group ID

Link-scoped multicast addresses use a comparable format.[6]


Representation

[edit]

An IPv6 address is represented as eight groups of four hexadecimal digits, each group representing 16 bits[a] The groups are separated by colons (:). An example of an IPv6 address is:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

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 (IETF) has defined a canonical format for rendering IPv6 addresses in text:[9]

  • 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, 2001:0db8::0001:0000 is rendered as 2001:db8::1:0;
  • 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, 2001:db8:0:0:1:0:0:1 is rendered as 2001:db8::1:0:0:1 rather than as 2001:db8:0:0:1::1. :: is not used to represent just a single all-zero field. For example, 2001:db8:0:0:0:0:2:1 is shortened to 2001:db8::2:1, but 2001:db8:0000:1:1:1:1:1 is rendered as 2001:db8:0:1:1:1:1:1.

These methods can lead to very short representations for IPv6 addresses. For example, the localhost (loopback) address, 0:0:0:0:0:0:0:1, and the IPv6 unspecified address, 0:0:0:0:0:0:0:0, are reduced to ::1 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 ::ffff:c000:0280 is written as ::ffff:192.0.2.128, thus expressing clearly the original IPv4 address that was mapped to IPv6.

Networks

[edit]

An IPv6 network uses an address block that is a contiguous group of IPv6 addresses of a size that is a power of two. 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. A network is denoted by the first address in the block (ending in all zeroes), a slash (/), and a decimal value equal to the size in bits of the prefix. For example, the network written as 2001:db8:1234::/48 starts at address 2001:db8:1234:0000:0000:0000:0000:0000 and ends at 2001:db8:1234:ffff:ffff:ffff:ffff:ffff.

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 2001:db8:a::123 connected to subnet 2001:db8:a::/64 is written as 2001:db8:a::123/64.

Address block sizes

[edit]

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 /48. Such a block contains 2128 − 48 = 280 addresses. The smaller the length of the network prefix, the larger the block: a /21 block is 8 times larger than a /24 block.

Literal IPv6 addresses in network resource identifiers

[edit]

Colon (:) characters in IPv6 addresses may conflict with the established syntax of resource identifiers, such as URIs and URLs. The colon is conventionally used to terminate the host path before a port number.[10] To alleviate this conflict, literal IPv6 addresses are enclosed in square brackets in such resource identifiers, for example:

http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/

When the URL also contains a port number the notation is:

https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/

where the trailing 443 is the example's port number.

Scoped literal IPv6 addresses (with zone index)

[edit]

For addresses with other than global scope (as described in § Address scopes), 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 (which is prefix-based).

In order to resolve the ambiguity in textual addresses, a zone index must be appended to the address. The zone index is separated from the address by a percent sign (%).[11] Although numeric zone indices must be universally supported, the zone index may also be an implementation-dependent string. The link-local address

fe80::1ff:fe23:4567:890a

could be expressed by

fe80::1ff:fe23:4567:890a%eth2[b]

or

fe80::1ff:fe23:4567:890a%3

The former (using an interface name) is customary on most Unix-like operating systems (e.g., BSD, Linux, macOS).[12] The latter (using an interface number) is the only syntax on Microsoft Windows, but as support for this syntax is mandatory per standard, it is also available on other operating systems.[c]

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.:

fe80:3::1ff:fe23:4567:890a

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.[d]

When used in uniform resource identifiers (URI), the use of the percent sign causes a syntax conflict, therefore it must be escaped via percent-encoding,[13] e.g.:

http://[fe80::1ff:fe23:4567:890a%25eth0]/

Literal IPv6 addresses in UNC path names

[edit]

In Microsoft Windows operating systems, IPv4 addresses are valid location identifiers in Uniform Naming Convention (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 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 ipv6-literal.net on the Internet (although they gave up the domain in January 2014[14]). IPv6 addresses are transcribed as a hostname or subdomain name within this namespace, in the following fashion:

2001:db8:85a3:8d3:1319:8a2e:370:7348

is written as

2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net

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:

fe80::1ff:fe23:4567:890a%3

is written as

fe80--1ff-fe23-4567-890as3.ipv6-literal.net

Address scopes

[edit]

Every IPv6 address, except the unspecified address (::), has a scope,[11] which specifies in which part of the network it is valid.

Unicast

[edit]

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

[edit]

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

[edit]

For multicast addresses, the four least-significant bits of the second address octet (ff0s::) identify the address scope, i.e. the domain in which the multicast packet should be propagated. Predefined and reserved scopes are:

Scope values[1]: 2.7 
Value Scope name Notes
0x0 reserved
0x1 interface-local Interface-local scope spans only a single interface on a node, and is useful only for loopback transmission of multicast.
0x2 link-local Link-local scope spans the same topological region as the corresponding unicast scope.
0x3 realm-local Realm-local scope is defined as larger than link-local, automatically determined by network topology and must not be larger than the following scopes.[15]
0x4 admin-local Admin-local scope is the smallest scope that must be administratively configured, i.e., not automatically derived from physical connectivity or other, non-multicast-related configuration.
0x5 site-local Site-local scope is intended to span a single site belonging to an organisation.
0x8 organization-local Organization-local scope is intended to span all sites belonging to a single organization.
0xe global Global scope spans all reachable nodes on the Internet – it is unbounded.
0xf reserved

All other scopes are unassigned and available to administrators for defining additional regions.

Address space

[edit]

General allocation

[edit]

The management of IPv6 address allocation process is delegated to the Internet Assigned Numbers Authority (IANA)[16] by the Internet Architecture Board and the Internet Engineering Steering Group. Its main function is the assignment of large address blocks to the regional Internet registries (RIRs), which have the delegated task of allocation to network service providers and other local registries. The IANA has maintained the official list of allocations of the IPv6 address space since December 1995.[17]

In order to allow efficient route aggregation, thereby reducing the size of the Internet routing tables, only one-eighth of the total address space (2000::/3) is currently allocated for use on the Internet. 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 /23 up to /12.[18]

The RIRs assign smaller blocks to local Internet registries that distribute them to users. These are typically in sizes from /19 to /32.[19][20][21] Global unicast assignment records can be found at the various RIRs or other websites.[22]

The addresses are then typically distributed in /48 to /56 sized blocks to the end users.[23] IPv6 addresses are assigned to organizations in much larger blocks as compared to IPv4 address assignments—the recommended allocation is a /48 block which contains 280 addresses, being 248 or about 2.8×1014 times larger than the entire IPv4 address space of 232 addresses and about 7.2×1016 times larger than the /8 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 3.4×1038 (340 undecillion) unique IPv6 addresses.

Each RIR can divide each of its multiple /23 blocks into 512 /32 blocks, typically one for each ISP; an ISP can divide its /32 block into 65536 /48 blocks, typically one for each customer;[24] customers can create 65536 /64 networks from their assigned /48 block, each having 264 (18,446,744,073,709,551,616) addresses. In contrast, the entire IPv4 address space has only 232 (exactly 4,294,967,296 or about 4.3×109) 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 (NAT) for the purposes of address conservation unnecessary. NAT has been increasingly used for IPv4 networks to help alleviate IPv4 address exhaustion.

Special allocation

[edit]

Provider-independent address space is assigned directly to the end user by the RIRs from the special range 2001:678::/29 and allows customers to make provider changes without renumbering their networks.

Internet exchange points (IXPs) are assigned special addresses from the ranges 2001:7f8::/32, 2001:504::/30, and 2001:7fa::/32[25] for communication with their connected ISPs.

Root name servers have been assigned addresses from the range 2001:7f8::/29.[26]

Reserved anycast addresses

[edit]

The lowest address within each subnet prefix (the interface identifier set to all zeroes) is reserved as the subnet-router anycast address.[1] 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 /64 subnet prefix are reserved to be used as anycast addresses.[27] 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

[edit]

There are a number of addresses with special meaning in IPv6.[28] The IANA maintains a registry of these special-purpose addresses.[29] They represent less than 2% of the entire address space:

Special address blocks
Address block (CIDR) First address Last address Number of addresses Usage Purpose
::/128 :: :: 1 Software Unspecified address
::1/128 ::1 ::1 1 Host Loopback address—a virtual interface that loops all traffic back to itself, the local host
::ffff:0:0/96 ::ffff:0.0.0.0 ::ffff:0:0 ::ffff:255.255.255.255 ::ffff:ffff:ffff 232 Software IPv4-mapped addresses
::ffff:0:0:0/96 ::ffff:0:0.0.0.0 ::ffff:0:0:0 ::ffff:0:255.255.255.255 ::ffff:0:ffff:ffff 232 Software IPv4-translated addresses
64:ff9b::/96 64:ff9b::0.0.0.0 64:ff9b::0:0 64:ff9b::255.255.255.255 64:ff9b::ffff:ffff 232 The global Internet IPv4/IPv6 translation[30]
64:ff9b:1::/48 64:ff9b:1:: 64:ff9b:1:ffff:ffff:ffff:ffff:ffff 280, with 248 for each IPv4 Private internets IPv4/IPv6 translation[31]
100::/64 100:: 100::ffff:ffff:ffff:ffff 264 Routing Discard prefix[32]
2001::/32 2001:: 2001:0:ffff:ffff:ffff:ffff:ffff:ffff 296 The global Internet Teredo tunneling[33]
2001:20::/28 2001:20:: 2001:2f:ffff:ffff:ffff:ffff:ffff:ffff 2100 Software ORCHIDv2[34]
2001:db8::/32 2001:db8:: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff 296 Documentation Addresses used in documentation and example source code[35]
2002::/16 2002:: 2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff 2112 The global Internet The 6to4 addressing scheme (deprecated)[36]
3fff::/20 3fff:: 3fff:fff:ffff:ffff:ffff:ffff:ffff:ffff 2108 Documentation Addresses used in documentation and example source code[37]
5f00::/16 5f00:: 5f00:ffff:ffff:ffff:ffff:ffff:ffff:ffff 2112 Routing IPv6 Segment Routing (SRv6)[38]
fc00::/7 fc00:: fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 2121 Private internets Unique local address[39]
fe80::/64 from fe80::/10 fe80:: fe80::ffff:ffff:ffff:ffff 264 Link Link-local address
ff00::/8 ff00:: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 2120 The global Internet Multicast address

Unicast addresses

[edit]

Unspecified address

[edit]
  • ::/128 – The address with all zero bits is called the unspecified address (corresponding to 0.0.0.0/32 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 0.0.0.0/0 in IPv4) for destination addresses (unicast, multicast and others) not specified elsewhere in a routing table.

Local addresses

[edit]
  • ::1/128 – The loopback address is a unicast localhost address. This address corresponds to 127.0.0.1/8 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.
  • fe80::/10 – 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 169.254.0.0/16 of IPv4.
    Within this prefix only one /64 subnet is allocated (there are 54 zero bits), yielding an effective format of fe80::/64. 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 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

[edit]
  • fc00::/7Unique local addresses (ULAs) are intended for local communication[39] (comparable to IPv4 private addresses 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16).
    They are routable only within a set of cooperating sites. The block is split into two halves. The lower half of the block (fc00::/8) was intended for globally allocated prefixes, but an allocation method has yet to be defined. The upper half (fd00::/8) is used for probabilistically unique addresses in which the /8 prefix is combined with a 40-bit locally generated pseudorandom number to obtain a /48 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 /48 prefix.[39]

Transition from IPv4

[edit]
  • ::ffff:0:0/96 — 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 protocols over IPv4 through the IPv6 networking application programming interface. In this dual-stack 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, based on the binding to an IPv6 address, or an IPv4-mapped address.
  • ::ffff:0:0:0/96 — A prefix used for IPv4-translated addresses. These are used by the Stateless IP/ICMP Translation (SIIT) protocol.[40]
  • 64:ff9b::/96 — The well-known prefix. Addresses with this prefix are used for automatic IPv4/IPv6 translation.[30]
  • 64:ff9b:1::/48 — 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.[31] Compared to 64:ff9b::/96, these addresses contain their translated IPv4 address in positions 48-63 and 72-87.[30] This means that for every IPv4 address a /88 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.
  • 2002::/16 — This prefix was used for 6to4 addressing (prefix from the IPv4 network, 192.88.99.0/24, was also used).
    The 6to4 addressing scheme is deprecated.[36]

Special-purpose addresses

[edit]

IANA has reserved a so-called Sub-TLA ID address block for special assignments[28][41] of 2001::/23 (split into the range of 64 network prefixes 2001:0000::/29 through 2001:01f8::/29). Three assignments from this block are currently allocated:

  • 2001::/32 — Used for Teredo tunneling, an IPv6 transition mechanism.
  • 2001:2::/48 — Used for benchmarking IPv6. Corresponds with 198.18.0.0/15 used for benchmarking IPv4. Assigned to the Benchmarking Methodology Working Group (BMWG).[42]
  • 2001:20::/28 — Overlay Routable Cryptographic Hash Identifiers (ORCHIDv2).[34] These are non-routed IPv6 addresses used for Cryptographic Hash Identifiers.

Documentation

[edit]
  • 2001:db8::/32 — This prefix is used in documentation[35][e] The addresses should be used anywhere an example IPv6 address is given or model networking scenarios are described.
  • 3fff::/20 — This new prefix was allocated to account for modern-day large-scale network modelling, that cannot be covered by a single /32 prefix.[37]

Discard

[edit]
  • 100::/64 — This prefix is used for discarding traffic.[32]

Deprecated and obsolete

[edit]

See § Deprecated and obsolete addresses

Multicast addresses

[edit]

The multicast addresses ff0x::, where x is any hexadecimal value, are reserved[1] and managed by the Internet Assigned Numbers Authority (IANA).[44]

Common IPv6 multicast addresses
Address Description Available scopes
ff0x::1 All nodes address, identify the group of all IPv6 nodes Available in scope 1 (interface-local) and 2 (link-local):
  • ff01::1 → All nodes in the interface-local
  • ff02::1 → All nodes in the link-local
ff0x::2 All routers Available in scope 1 (interface-local), 2 (link-local) and 5 (site-local):
  • ff01::2 → All routers in the interface-local
  • ff02::2 → All routers in the link-local
  • ff05::2 → All routers in the site-local
ff02::5 OSPFIGP 2 (link-local)
ff02::6 OSPFIGP designated routers 2 (link-local)
ff02::9 RIP routers 2 (link-local)
ff02::a EIGRP routers 2 (link-local)
ff02::c Web Services Dynamic Discovery 2 (link-local)
ff02::d All PIM routers 2 (link-local)
ff02::1a All RPL routers 2 (link-local)
ff0x::fb mDNSv6 Available in all scopes
ff0x::101 All NTP servers Available in all scopes
ff02::1:1 Link name 2 (link-local)
ff02::1:2 All DHCPv6 servers and relay agents[45] 2 (link-local)
ff02::1:3 Link-local multicast name resolution 2 (link-local)
ff05::1:3 A relay agent may use this address to reach all DHCPv6 servers in the site.[45] 5 (site-local)
ff02::1:ff00:0/104 Solicited-node multicast address (see below) 2 (link-local)
ff02::2:ff00:0/104 Node information queries 2 (link-local)

Solicited-node multicast address

[edit]

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 (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)

[edit]

On system startup, a node automatically creates a link-local address 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),[46] using a component of the Neighbor Discovery Protocol. This address is selected with the prefix fe80::/64.

In IPv4, typical configuration protocols include DHCP or PPP. Although DHCPv6 exists, IPv6 hosts normally use the Neighbor Discovery Protocol to create a globally routable unicast address: the host sends router solicitation requests and an IPv6 router responds with a prefix assignment.[47]

Interface identifier

[edit]

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 groups need to be joined for neighbor discovery. For this, the solicited-node multicast address is used, formed from the network prefix ff02::1:ff00:0/104 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, although stable privacy addresses are now recommended as a default instead.[2] A MAC address 00-0C-29-0C-47-D5 is turned into a 64-bit EUI-64 by inserting FF-FE in the middle: 00-0C-29-FF-FE-0C-47-D5.[f]

Duplicate address detection

[edit]

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 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 (::/128) as its source address. The node also joins the all-hosts multicast address ff02::1, 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

[edit]

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.[48] 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.[g] 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.

Temporary addresses

[edit]

The globally unique and static MAC addresses used by stateless address autoconfiguration to create interface identifiers offer an opportunity to track user equipment across time and IPv6 network prefix changes.[49] 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[50] 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 (DNS).

Network interfaces configured for IPv6 use temporary addresses by default in OS X Lion and later Apple systems[citation needed] as well as in Windows Vista, Windows 2008 Server and later Microsoft systems.[51]

Cryptographically generated addresses

[edit]

As a means to enhance security for Neighbor Discovery Protocol cryptographically generated addresses (CGAs) were introduced in 2005[52] as part of the Secure Neighbor Discovery (SEND) protocol.

Such an address is generated using two hash functions 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.[h] 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

[edit]

The use of the modified EUI-64 format has serious implications for security and privacy concerns,[53] because the underlying hardware address (most typically the MAC address) 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.[53]

Default address selection

[edit]

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 implementations.[54] It uses a configurable preference table that associates each routing prefix with a precedence level. The default table has the following content:

Prefix Precedence Label Usage
::1/128 50 0 Localhost
::/0 40 1 Default unicast
::ffff:0:0/96 35 4 IPv4-mapped IPv6 address
2002::/16 30 2 6to4
2001::/32 5 5 Teredo tunneling
fc00::/7 3 13 Unique local address
::/96 1 3 IPv4-compatible addresses (deprecated)
fec0::/10 1 11 Site-local address (deprecated)
3ffe::/16 1 12 6bone (returned)

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 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

[edit]

In the Domain Name System, hostnames are mapped to IPv6 addresses by AAAA resource records, so-called quad-A records.[55] For reverse lookup the IETF reserved the domain ip6.arpa, where the name space is hierarchically divided by the 1-digit hexadecimal representation of nibble 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 fdda:5cc1:23:4::1f. 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 protocol. Queries and replies may be transmitted over IPv6 or IPv4 transports regardless of the address family of the data requested.

AAAA record fields
NAME Domain name
TYPE AAAA (28)
CLASS Internet (1)
TTL Time to live, in seconds
RDLENGTH Length of RDATA field
RDATA 128-bit IPv6 address in network byte order

Historical notes

[edit]

Deprecated and obsolete addresses

[edit]
  • The site-local prefix fec0::/10 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,[56] 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.[57] In October 2005, a new specification replaced this address type with unique local addresses.[39]
  • The address block 200::/7 was defined as an OSI NSAP-mapped prefix set in August 1996,[58][59] but was deprecated in December 2004.[60]
  • The 96-bit zero-value prefix ::/96, originally known as IPv4-compatible addresses, was mentioned in 1995[56] but never fully described. This range of addresses was used to represent IPv4 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.[1] 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 3ffe::/16 was allocated for test purposes for the 6bone network in December 1998.[61] Prior to that, the address block 5f00::/8 was used for this purpose. Both address blocks were returned to the address pool in June 2006.[62]
  • Due to operational problems with 6to4 the use of address block 2002::/16 is diminishing, since the 6to4 mechanism is deprecated since May 2015.[36] Although IPv4 address block 192.88.99.0/24 is deprecated, 2002::/16 is not.
  • In April 2007 the address block 2001:10::/28 was assigned for Overlay Routable Cryptographic Hash Identifiers (ORCHID).[63] It was intended for experimental use. In September 2014 a second version of ORCHID was specified,[34] and with the introduction of block 2001:20::/28 the original block was returned to IANA.

Miscellaneous

[edit]
  • For reverse DNS lookup, 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 (IAB) reverted this intention, and decided in 2001 that arpa should retain its original function. Domains in ip6.int were moved to ip6.arpa[64] 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.[23] Instead of assigning either a /48, /64, or /128 (according to IAB's and IESG's views of 2001),[65] Internet service providers should consider assigning smaller blocks (for example a /56) to end users. The ARIN, RIPE & APNIC regional registries' policies encourage /56 assignments where appropriate.[23]
  • Originally, two proposals existed for translating domain names to IPv6 addresses: one using AAAA records,[66] the other using A6 records.[67] 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,[68][69][70][71] the method was moved to experimental status in 2002,[69] and finally to historic status in 2012.[71]
  • In 2009, many DNS resolvers in home-networking NAT devices and routers were found to handle AAAA records improperly.[72] 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 to trigger. This often causes increased latency when connecting to dual-stack IPv6/IPv4 hosts, as the client software waits for the IPv6 connection to fail before trying IPv4.

Notes

[edit]
  1. ^ A 16 bit or two octet quantity is sometimes also called a hextet.[7][8]
  2. ^ Assuming that eth2 is equivalent to zone number 3. This is usually the case, as real zone numbers start at 1 (0 being the 'default zone')
  3. ^ Although Windows supports the RFC 3493 if_nametoindex() API for converting a name to an interface number, it does not support the customary "name after %" extension.
  4. ^ The now-removed site-local addresses of fec0::/10 also require a zone index.[12]
  5. ^ 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 are used for documentation in IPv4.[43]
  6. ^ When this EUI-64 is used to form an IPv6 address, it is modified:[1] the meaning of the Universal/Local bit (the 7th most significant bit of the EUI-64, starting from 1) is inverted, so that a 1 now means Universal. To create an IPv6 address with the network prefix 2001:db8:1:2::/64 it yields the address 2001:db8:1:2:020c:29ff:fe0c:47d5 (with the Universal/Local bit, the second-least-significant bit of the underlined quartet, inverted to 1 in this case because the MAC address is universally unique).
  7. ^ In most cases, the lifetime does not expire because new Router Advertisements (RAs) refresh the timers. But if there are no more RAs, eventually the preferred lifetime elapses and the address becomes deprecated.
  8. ^ Comparable with the 'proof of work' field in Bitcoin mining.

References

[edit]
  1. ^ a b c d e f g h i R. Hinden; S. Deering (February 2006). IP Version 6 Addressing Architecture. Network Working Group. doi:10.17487/RFC4291. RFC 4291. Draft Standard. Obsoletes RFC 3513. Updated by RFC 5952, 6052, 7136, 7346, 7371 and 8064.
  2. ^ a b F. Gont; A. Cooper; D. Thaler; W. Liu (February 2017). Recommendation on Stable IPv6 Interface Identifiers. Internet Engineering Task Force (IETF). doi:10.17487/RFC8064. RFC 8064. Proposed Standard. Updates RFC 2464, 2467, 2470, 2491, 2492, 2497, 2590, 3146, 3572, 4291, 4338, 4391, 5072 and 5121.
  3. ^ Silvia Hagen (May 2006). IPv6 Essentials (Second ed.). O'Reilly. ISBN 978-0-596-10058-2.
  4. ^ a b P. Savola; B. Haberman (November 2004). Embedding the Rendezvous Point (RP) Address in an IPv6 Multicast Address. Network Working Group. doi:10.17487/RFC3956. RFC 3956. Proposed Standard. Updated by RFC 7371. Updates RFC 3306.
  5. ^ a b B. Haberman; D. Thaler (August 2002). Unicast-Prefix-based IPv6 Multicast Addresses. Network Working Group. doi:10.17487/RFC3306. RFC 3306. Proposed Standard. Updated by RFC 3956, 4489 and 7371.
  6. ^ J-S. Park; M-K. Shin; H-J. Kim (April 2006). A Method for Generating Link-Scoped IPv6 Multicast Addresses. Network Working Group. doi:10.17487/RFC4489. RFC 4489. Proposed Standard. Updates RFC 3306.
  7. ^ Graziani, Rick (2012). IPv6 Fundamentals: A Straightforward Approach to Understanding IPv6. Cisco Press. p. 55. ISBN 978-0-13-303347-2.
  8. ^ Coffeen, Tom (2014). IPv6 Address Planning: Designing an Address Plan for the Future. O'Reilly Media. p. 170. ISBN 978-1-4919-0326-1.
  9. ^ S. Kawamura; M. Kawashima (August 2010). A Recommendation for IPv6 Address Text Representation. Internet Engineering Task Force. doi:10.17487/RFC5952. ISSN 2070-1721. RFC 5952. Proposed Standard. Updates RFC 4291.
  10. ^ T. Berners-Lee; R. Fielding; L. Masinter (January 2005). Uniform Resource Identifier (URI): Generic Syntax. Network Working Group. doi:10.17487/RFC3986. STD 66. RFC 3986. Internet Standard 66. Obsoletes RFC 2732, 2396 and 1808. Updated by RFC 6874, 7320 and 8820. Updates RFC 1738.
  11. ^ a b S. Deering; B. Haberman; T. Jinmei; E. Nordmark; B. Zill (March 2005). IPv6 Scoped Address Architecture. Network Working Group. doi:10.17487/RFC4007. RFC 4007. Proposed Standard. Updated by RFC 7346.
  12. ^ a b inet6(4) – FreeBSD Kernel Interfaces Manual "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"
  13. ^ B. Carpenter; S. Cheshire; R. Hinden (February 2013). Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers. IETF. doi:10.17487/RFC6874. ISSN 2070-1721. RFC 6874. Proposed Standard. Updates RFC 3986.
  14. ^ "ipv6-literal.net Domain History". who.is. Retrieved 20 October 2014.
  15. ^ R. Droms (August 2014). IPv6 Multicast Address Scopes. Internet Engineering Task Force. doi:10.17487/RFC7346. ISSN 2070-1721. RFC 7346. Proposed Standard. Updates RFC 4007 and 4291.
  16. ^ Internet Architecture Board; Internet Engineering Steering Group (December 1995). IPv6 Address Allocation Management. Network Working Group. doi:10.17487/RFC1881. RFC 1881. Informational.
  17. ^ IPv6 address space at IANA. Iana.org (2010-10-29). Retrieved on 2011-09-28.
  18. ^ IPv6 unicast address assignments, IANA
  19. ^ DE-TELEKOM-20050113[permanent dead link] db.ripe.net. Retrieved 2011-09-28.
  20. ^ "ARIN Number Resource Policy Manual: Initial allocation to ISPs".
  21. ^ "RIPE NCC IPv6 Address Allocation and Assignment Policy: Minimum allocation".
  22. ^ for example. Iana.org. Retrieved on 2011-09-28.
  23. ^ a b c T. Narten; G. Huston; L. Roberts (March 2011). IPv6 Address Assignment to End Sites. Internet Engineering Task Force (IETF). doi:10.17487/RFC6177. ISSN 2070-1721. BCP 157. RFC 6177. Best Current Practice. Obsoletes RFC 3177.
  24. ^ "IPv6 Addressing Plans". ARIN IPv6 Wiki. Retrieved 2018-07-15. All customers get one /48 unless they can show that they need more than 65k subnets. [...] If you have lots of consumer customers you may want to assign /56s to private residence sites.
  25. ^ "What are Bogons?". Retrieved 2021-11-15.
  26. ^ "Address Space Managed by the RIPE NCC". Retrieved 2011-05-22.
  27. ^ D. Johnson; S. Deering (March 1999). Reserved IPv6 Subnet Anycast Addresses. Network Working Group. doi:10.17487/RFC2526. RFC 2526. Proposed Standard.
  28. ^ a b M. Cotton; L. Vegoda; B. Haberman (April 2013). R. Bonica (ed.). Special-Purpose IP Address Registries. IETF. doi:10.17487/RFC6890. ISSN 2070-1721. BCP 153. RFC 6890. Best Current Practice 153. Obsoletes RFC 4773, 5156, 5735 and 5736. Updated by RFC 8190.
  29. ^ "IANA IPv6 Special-Purpose Address Registry". www.iana.org. Retrieved 2024-08-02.
  30. ^ a b c C. Bao; C. Huitema; M. Bagnulo; M. Boucadair; X. Li (October 2010). IPv6 Addressing of IPv4/IPv6 Translators. Internet Engineering Task Force (IETF). doi:10.17487/RFC6052. ISSN 2070-1721. RFC 6052. Proposed Standard. Updates RFC 4291.
  31. ^ a b T. Anderson (August 2017). Local-Use IPv4/IPv6 Translation Prefix. Internet Engineering Task Force. doi:10.17487/RFC8215. RFC 8215. Proposed Standard.
  32. ^ a b N. Hilliard; D. Freedman (August 2012). A Discard Prefix for IPv6. Internet Engineering Task Force. doi:10.17487/RFC6666. ISSN 2070-1721. RFC 6666. Informational.
  33. ^ S. Santesson (September 2006). TLS Handshake Message for Supplemental Data. Network Working Group. doi:10.17487/RFC4680. RFC 4680. Proposed Standard. Updates RFC 4346. Updated by RFC 8447 and 8996.
  34. ^ a b c J. Laganier; F. Dupont (September 2014). An IPv6 Prefix for Overlay Routable Cryptographic Hash Identifiers Version 2 (ORCHIDv2). Internet Engineering Task Force. doi:10.17487/RFC7343. ISSN 2070-1721. RFC 7343. Proposed Standard. Obsoletes RFC 4843.
  35. ^ a b G. Huston; A. Lord; P. Smith (July 2004). IPv6 Address Prefix Reserved for Documentation. Network Working Group. doi:10.17487/RFC3849. RFC 3849. Informational.
  36. ^ a b c O. Troan (May 2015). B. Carpenter (ed.). Deprecating the Anycast Prefix for 6to4 Relay Routers. Internet Engineering Task Force. doi:10.17487/RFC7526. BCP 196. RFC 7526. Best Current Practice 196. Obsoletes RFC 3068 and 6732.
  37. ^ a b G. Huston; N. Buraglio (August 2024). Expanding the IPv6 Documentation Space. Internet Engineering Task Force. doi:10.17487/RFC9637. RFC 9637. Informational. Updates RFC 3849.
  38. ^ Krishnan, S. (2024-02-15). SRv6 Segment Identifiers in the IPv6 Addressing Architecture. IETF. I-D draft-ietf-6man-sids-06. Retrieved 2024-06-13.
  39. ^ a b c d R. Hinden; B. Haberman (October 2005). Unique Local IPv6 Unicast Addresses. Network Working Group. doi:10.17487/RFC4193. RFC 4193. Proposed Standard.
  40. ^ C. Bao; X. Li; F. Baker; T. Anderson; F. Gont (June 2016). IP/ICMP Translation Algorithm. Internet Engineering Task Force. doi:10.17487/RFC7915. RFC 7915. Proposed Standard. Obsoletes RFC 6145.
  41. ^ R. Hinden; S. Deering; R. Fink; T. Hain (September 2000). Initial IPv6 Sub-TLA ID Assignments. Network Working Group. doi:10.17487/RFC2928. RFC 2928. Informational.
  42. ^ C. Popoviciu; A. Hamza; G. Van de Velde; D. Dugatkin (May 2008). IPv6 Benchmarking Methodology for Network Interconnect Devices. Network Working Group. doi:10.17487/RFC5180. RFC 5180. Informational.
  43. ^ J. Arkko; M. Cotton; L. Vegoda (January 2010). IPv4 Address Blocks Reserved for Documentation. Internet Engineering Task Force. doi:10.17487/RFC5737. ISSN 2070-1721. RFC 5737. Informational. Updates RFC 1166.
  44. ^ "IPv6 Multicast Address Space Registry". Internet Assigned Numbers Authority.
  45. ^ a b T. Mrugalski; M. Siodelski; B. Volz; A. Yourtchenko; M. Richardson; S. Jiang; T. Lemon; T. Winters (November 2018). Dynamic Host Configuration Protocol for IPv6 (DHCPv6). Internet Engineering Task Force. doi:10.17487/RFC8415. ISSN 2070-1721. RFC 8415. Proposed Standard. Obsoletes RFC 3315, 3633, 3736, 4242, 7083, 7283 and 7550.
  46. ^ S. Thomson; T. Narten; T. Jinmei (September 2007). IPv6 Stateless Address Autoconfiguration. Network Working Group. doi:10.17487/RFC4862. RFC 4862. Draft Standard. Obsoletes RFC 2462. Updated by RFC 7527.
  47. ^ T. Narten; E. Nordmark; W. Simpson; H. Holiman (September 2007). Neighbor Discovery for IP version 6 (IPv6). Network Working Group. doi:10.17487/RFC4861. RFC 4861. Draft Standard. Obsoletes RFC 2461. Updated by RFC 5942, 6980, 7048, 7527, 7559, 8028, 8319, 8425 and 9131.
  48. ^ Iljitsch van Beijnum (2006). "IPv6 Internals". The Internet Protocol Journal. Vol. 9, no. 3. pp. 16–29.
  49. ^ The privacy implications of stateless IPv6 addressing. Portal.acm.org (2010-04-21). Retrieved on 2011-09-28.
  50. ^ F. Gont; S. Krishnan; T. Narten; R. Draves (February 2021). Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6. Internet Engineering Task Force. doi:10.17487/RFC8981. ISSN 2070-1721. RFC 8981. Proposed Standard. Obsoletes RFC 4941.
  51. ^ "IPv6 on Windows". Retrieved 2024-03-25.
  52. ^ T. Aura (March 2005). Cryptographically Generated Addresses (CGA). Network Working Group. doi:10.17487/RFC3972. RFC 3972. Proposed Standard. Updated by RFC 4581 and 4982.
  53. ^ a b F. Gont (April 2014). A Method for Generating Semantically Opaque Interface Identifiers with IPv6 Stateless Address Autoconfiguration (SLAAC). Internet Engineering Task Force. doi:10.17487/RFC7217. ISSN 2070-1721. RFC 7217. Proposed Standard.
  54. ^ D. Thaler; R. Draves; A. Matsumoto; T. Chown (September 2012). D. Thaler (ed.). Default Address Selection for Internet Protocol Version 6 (IPv6). Internet Engineering Task Force. doi:10.17487/RFC6724. ISSN 2070-1721. RFC 6724. Proposed Standard. Obsoletes RFC 3484.
  55. ^ S. Thomson; C. Huitema; V. Ksinant; M. Souissi (October 2003). DNS Extensions to Support IP Version 6. Network Working Group. doi:10.17487/RFC3596. RFC 3596. Internet Standard. Obsoletes RFC 3152 and 1886.
  56. ^ a b R. Hinden; S. Deering (December 1995). IP Version 6 Addressing Architecture. Network Working Group. doi:10.17487/RFC1884. RFC 1884. Obsolete. Obsoleted by RFC 2373.
  57. ^ C. Huitema; B. Carpenter (September 2004). Deprecating Site Local Addresses. Network Working Group. doi:10.17487/RFC3879. RFC 3879. Proposed Standard.
  58. ^ G. Houston (Aug 2005). Proposed Changes to the Format of the IANA IPv6 Registry. Network Working Group. doi:10.17487/RFC4147. RFC 4147. Informational.
  59. ^ J. Bound; B. Carpenter; D. Harrington; J. Houldsworth; A. Lloyd (August 1996). OSI NSAPs and IPv6. Network Working Group. doi:10.17487/RFC1888. RFC 1888. Obsolete. Obsoleted by RFC 4048. Updated by RFC 4548.
  60. ^ B. Carpenter (Apr 2005). RFC 1888 Is Obsolete. doi:10.17487/RFC4048. RFC 4048. Informational. Updated by RFC 4548.
  61. ^ R. Hinden; R. Fink; J. Postel (December 1998). IPv6 Testing Address Allocation. Network Working Grouop. doi:10.17487/RFC2471. RFC 2471. Obsolete. Obsoleted by RFC 3701. Obsoletes RFC 1897.
  62. ^ R. Fink; R. Hinden (March 2004). 6bone (IPv6 Testing Address Allocation) Phaseout. Network Working Group. doi:10.17487/RFC3701. RFC 3701. Informational. Obsoletes RFC 2471.
  63. ^ P. Nikander; J. Laganier; F. Dupont (April 2007). An IPv6 Prefix for Overlay Routable Cryptographic Hash Identifiers (ORCHID). Network Working Group. doi:10.17487/RFC4843. RFC 4843. Obsolete. Obsoleted by RFC 7343.
  64. ^ R. Bush (August 2001). Delegation of IP6.ARPA. Network Working Group. doi:10.17487/RFC3152. BCP 49. RFC 3152. Obsolete. Obsoleted by RFC 3596. Updates RFC 1886, 2553, 2766, 2772 and 2874
  65. ^ IAB; IESG (September 2001). IAB/IESG Recommendations on IPv6 Address Allocations to Sites. Network Working Group. doi:10.17487/RFC3177. RFC 3177. Obsolete. Obsoleted by RFC 6177.
  66. ^ S. Thomson; C. Huitema (December 1995). DNS Extensions to support IP version 6. Network Working Group. doi:10.17487/RFC1886. RFC 1886. Obsolete. Obsoleted by RFC 3596. Updated by RFC 2874 and 3152.
  67. ^ M. Crawford; C. Huitema (July 2000). DNS Extensions to Support IPv6 Address Aggregation and Renumbering. Network Working Group. doi:10.17487/RFC2874. RFC 2874. Historic. Updated by RFC 3152, 3226, 3363 and 3364. Updates RFC 1886.
  68. ^ Comparison of AAAA and A6 (do we really need A6?), Jun-ichiro itojun Hagino, (July 2001)
  69. ^ a b R. Bush; A. Durand; B. Fink; O. Gudmundsson; T. Hain, eds. (August 2002). Representing Internet Protocol version 6 (IPv6) Addresses in the Domain Name System (DNS). Network Working Group. doi:10.17487/RFC3363. RFC 3363. Informational. Updates RFC 2673 and 2874.
  70. ^ R. Austein (August 2002). Tradeoffs in Domain Name System (DNS) Support for Internet Protocol version 6 (IPv6). Network Working Group. doi:10.17487/RFC3364. RFC 3364. Informational. Updates RFC 2673 and 2874.
  71. ^ a b A. Bierman; M. Bjorklund (March 2012). Network Configuration Protocol (NETCONF) Access Control Model. Internet Engineering Task Force. doi:10.17487/RFC6536. RFC 6536. Obsolete. Obsoleted by RFC 8341.
  72. ^ Y. Morishita; T. Jinmei (May 2005). Common Misbehavior Against DNS Queries for IPv6 Addresses. doi:10.17487/RFC4074. RFC 4074. Informational.
[edit]