4. IPv6 address representation
IPv4 addresses are usually represented in the familiar
dotted-decimal form, such as 65.55.58.201, where each number
represents 8 bits of the 32-bit address. By contrast, the much longer
IPv6 addresses are typically represented by dividing the 128-bit
address into 16-bit (4-byte) segments. Each segment is then converted
from binary format to a 4-bit hexadecimal number, and these numbers
are finally separated by using colons.
For example, when expressed in binary form, the following IPv6
address spans two lines of text on this page:
0010000000000001000011011011100000111111101010010000000000000000
0000000000000000000000000000000000000000110100111001110001011010
When converted into colon hexadecimal notation, however, the
address is much shorter:
2001:0DB8:3FA9:0000:0000:0000:00D3:9C5A
The preceding address can be further compressed by suppressing
leading zeros as follows:
2001:DB8:3FA9:0:0:0:D3:9C5A
Even further compression can be achieved by representing
contiguous blocks of hexadecimal zeros as double colons as
follows:
2001:DB8:3FA9::D3:9C5A
Note
Double-colon notation
To ensure unambiguous representation, only one double colon
can be used when representing an IPv6 address.
The first 64 bits of a 128-bit IPv6 address represent the IPv6
prefix for the address. An IPv6 prefix can be used to
For example, the IPv6 prefix portion of the IPv6 address
2001:DB8:3FA9::D3:9C5A used in the previous section is
2001:DB8:3FA9:0.
IPv6 prefixes are expressed using an
<address>/<prefix_length> format that is similar to the
Classless Inter-Domain Routing (CIDR) notation used on IPv4
networks. The value of <prefix_length> can vary as
follows:
For example, an IPv6 prefix of 2001:DB8:3FA9::/48 represents a
summarized route.
IPv4 addresses can be either unicast, multicast, or broadcast
addresses. IPv6 addresses by comparison can be either of the
following:
-
Unicast This type of IPv6
address identifies a single interface within a region of an IPv6
network over which the address is unique.
-
Multicast This type of IPv6
address identifies zero or more interfaces on the same host or
different hosts and is used for one-to-many communications with
delivery to multiple interfaces.
-
Anycast This type of IPv6
address identifies multiple interfaces and is used for
one-to-one-of-many communications with delivery to a single
interface.
Unicast IPv6 addresses can be further categorized as either of
the following:
-
Global unicast addresses
-
Link-local addresses
-
Unique local addresses
-
Special addresses
-
Transition addresses
The sections that follow go into greater detail about unicast
address types. Note that there are no broadcast addresses in IPv6.
Instead, multicast addresses are used when broadcast functionality
is required over a portion of an IPv6 network.
Global unicast addresses are IPv6 addresses that are globally
routable and therefore are reachable on the IPv6 Internet. Global
unicast addresses for IPv6 are the equivalent of public addresses
for IPv4.
A global unicast address is always structured as
follows:
-
The first three bits of the address are always 001 in
binary format.
-
The next 45 bits represent the global routing prefix for
the organization’s site. Taken together with the three
predefined high-order bits, they define the 48-bit site prefix,
which is used by routers on the IPv6 Internet to identify IPv6
packets that should be forwarded to the routers of the
organization’s site.
-
The next 16 bits are used to identify the subnet within
the site. Because 16 bits are available for defining subnets,
each site can have up to 216 or
65,536 subnets.
-
The final 64 bits specify the interface on the indicated
subnet within the site.
Note
Interfaces vs. nodes
IPv6 unicast addresses always indicate interfaces (not
nodes) on an IPv6 network.
Link-local addresses are IPv6 addresses that are used whenever
a node needs to communicate with a neighbor (another node on the
same link). For example, if a site has no routers, and therefore
only one subnet, all network communications between hosts can take
place using link-local addresses.
On Windows platforms, IPv6 link-local addresses are always
configured automatically on all interfaces even if no other unicast
IPv6 addresses are configured. The IPv4 equivalent to these
addresses are IPv4 link-local addresses, which are addresses in the
range 169.254.0.0/16 that are dynamically configured on interfaces
when no Dynamic Host Configuration Protocol (DHCP) server is
available. On Windows platforms, IPv4 link-local addresses are
assigned using Automatic Private IP Addressing (APIPA).
A link-local address is always structured as follows:
-
The first 64 bits are always 11111110 10000000 00000000
00000000 in binary format. This means that a link-local address
always begins with FE80 and has a prefix identifier of
FE80::/64.
-
The final 64 bits specify the interface on the local
link.
Note
Link-local addresses and routers
IPv6 routers will never forward packets addressed to
link-local addresses beyond the local link.
Unique local addresses are IPv6 addresses that are private to
an organization in the same way that private addresses—such as
10.x.x.x, 192.168.x.x, or 172.16.0.0 - 172.31.255.255—can be used on
an IPv4 network. Unique local addresses, therefore, are not routable
on the IPv6 Internet in the same way that an address like
10.20.100.55 is not routable on the IPv4 Internet.
A unique local address is always structured as follows:
-
The first 8 bits are always 11111101 in binary format.
This means that a unique local address always begins with FD and
has a prefix identifier of FD00::/8.
-
The next 40 bits represent the global identifier, which
represents a specific site within the organization. This global
identifier is randomly generated.
-
The next 16 bits are used to identify the subnet within
the site. Because 16 bits are available for defining subnets,
each site can have up to 216 or
65,536 subnets.
-
The final 64 bits specify the interface on the indicated
subnet within the site.
The following two addresses have special significance in
IPv6:
-
The address 0:0:0:0:0:0:0:0, which is commonly represented
as a double colon (::), indicates the absence of an IPv6
address. The IPv4 equivalent to this address is 0.0.0.0.
-
The loopback address 0:0:0:0:0:0:0:1, which is commonly
represented as ::1, is assigned to the loopback interface on a
node. The loopback address is used whenever a node needs to send
a packet to itself. The IPv4 equivalent to this address is
127.0.0.1.
Transition addresses are IPv6 addresses used by IPv6
transition technologies such as ISATAP, Teredo, or 6to4. Transition
addresses enable the coexistence of IPv4 and IPv6 hosts on the same
network. IPv6 transition technologies are described in more detail
later in this lesson.
Multicasting on IPv6 networks works essentially the same way
that it does on IPv4 networks. An IPv6 multicast address always
begins with 11111111 or FF and includes additional structure that
identifies the scope of the address and the multicast group to which
the interface belongs. IPv6 multicast addresses, therefore, are
always of the form FF00::/8. For comparison, IPv4 multicast
addresses are always of the form 224.0.0.0/4.
As indicated earlier in this lesson, IPv6 does not have
broadcast addresses and instead uses certain multicast addresses
whenever some form of broadcast functionality is required. Examples
of this usage include the following multicast addresses:
-
FF01::1 This address is an
all-nodes multicast address that has interface-local
scope.
-
FF02::1 This address is an
all-nodes multicast address that has link-local scope.
-
FF01::2 This address is an
all-routers multicast address that has interface-local
scope.
-
FF02::2 This address is an
all-routers multicast address that has link-local scope.
-
FF05::2 This address is an
all-routers multicast address that has site-local scope.
For example, the equivalent of IPv6 address FF02::1 on an IPv4
network is 255.255.255.255.