Learning IPv6 notation can be a bit daunting
at first, based not only on the use of hexadecimal numbering, but also
on the length of a full address. Using notational abbreviations, as
described in RFCs 4291, 5952, and 6052, can assist greatly, but
hands-on practice implementing IPv6 addressing and gaining familiarity
with binary, decimal, and hexadecimal conversion is key to adopting
this new protocol. This section covers addition concepts that network
administrators need to know, beyond just the IPv6 address itself.
IPv6 Address Prefix
IPv4 address notation is usually written with
a 32-bit network address followed by a forward slash (/) and a trailing
number used to delineate the network number and the associated subnet
mask. This notation tells the network administrator the range of IP
addresses available on that particular network segment. For example,
the 192.168.1.0/24 network includes a network number of 192.168.1.0
with a 24-bit subnet mask of 255.255.255.0. To understand what that
means, remember that everything goes back to binary, and each binary
digit represents 1 bit of the address. Binary addition, which you
should become familiar with if you are not already, defines that any
number added with 1 will equal 1 and any number added with 0 will equal
0. To understand IP addressing, network administrators need to fully
understand these binary addition rules. So, moving forward, the term mask
as it relates to IP networking means performing binary addition of a
network address with a predetermined bit length of all 1s. For example,
a /24 in an 32-bit IPv4 address includes 24 leading 1s and 8 trailing
0s. Table 2
shows how binary addition is used on an existing address of
192.168.1.15, with a subnet mask of 255.255.255.0, to derive the
network number.
Table 2. Binary Addition
Table 2
displays the network number that was derived from addition of the IPv4
address and the associated subnet mask. Although IPv6 has changed the
terminology some, this example still applies.
In IPv4, the address is divided into the
network number and the host number. In IPv6, the network number portion
of the address is referred to as the IPv6 prefix. The IPv6 prefix is
written in the same form as for an IPv4 network, but with an IPv6
address followed by a forward slash and a trailing number that is
simply referred to as the mask length and written as
IPv6address/prefix-length. For example, 2001:dba:1234:5678::/64
translates into a network with a mask of 64 bits, and the IP addresses
in this network will all start with the prefix of 2001:dba:1234:5678,
followed by four other groups that define the host portion of the
address. This example made use of an IPv6 notation reduction that
truncated the leading 0 in the second group of dba.
IPv6 DNS Records
Because IPv6 addresses use a completely
different number scheme, a new DNS record format was created to support
the lookup of IPv6 hosts. The IPv6 forward, or name to IPv6 address
type, is an AAAA address type. This address type is available on
Microsoft Windows DNS servers and on most other current DNS server
systems. For an organization that will leverage IPv6, network and DNS
administrators need to ensure that their DNS server system supports
this record type. The same goes for the reverse DNS record, where the
IPv6 address lookup needs to resolve to a hostname. With Microsoft DNS,
the forward lookup zone can support both the standard IPv4 record type
of A and the IPv6 record type of AAAA. The reverse DNS zone must be
created and populated manually, but even though there will need to be
separate reverse DNS zones for IPv4 and IPv6 networks, the reverse DNS
records for both are still the same PTR record type. Microsoft clients
and servers will, by default, dynamically register their forward and
reverse IPv4 addresses in DNS. With IPv6, only the forward DNS records
are registered, and if network administrators require IPv6 reverse DNS
records, these must be created manually when needed.
IPv6 Address Notation Best Practices
As stated earlier, IPv6 addresses are long,
and RFCs have been written to provide standards and best practices for
administrators to follow to simplify notation, when possible. Some of
the most common IPv6 character-reduction practices are as follows and
are all part of what is referred to as 0 compression:
• Truncate leading 0s—Whenever
possible, remove one or more leading 0s in an IPv6 address group (for
example, by changing the IPv6 address of
2001:0dba:0000:0000:0000:0110:0000:0000 to
2001:dba:0000:0000:0000:110:0000:0000)
• Compress 0 groups—When
an entire group of an IPv6 address is made up of all 0s (for example,
2001:dba:0000:0000:0000:110:0000:0000), the group can be reduced to a
single 0 (2001:dba:0:0:0:110:0:0).
• Replace consecutive zero groups with double colon—When
consecutive 0 groups are encountered, as shown in the previous example,
two or more groups can be replaced with a double colon.
• Only one set of double colons can be used in an IPv6 address.
• When there is more than one set of
zero groups in an IPv6 address, the double colon should be used to
replace the largest set. For this example, that is the last three
groups of 0s; the IPv6 address is then written as 2001:dba::110:0:0.
• When multiple consecutive groups of
0s are replaced with a double colon, administrators can subtract the
remaining number of groups from 8 to determine how many groups of 0s
were removed. In this case, 8 – 5 = 3, so the double colon has replaced
three groups of consecutive 0s.
• Do not remove trailing or 0s between other numbers—When
a group contains a 0 that is surrounded by other numbers or is the last
number in a group, it needs to remain as part of the final address. For
example, in the sixth group (originally 0110), removing the trailing 0
would change the number and therefor change the address. This might
seem obvious, but with all the available options to reduce the address,
it is important to note this rule.
So with all the options previously noted for
0 compression, the original address of
2001:0dba:0000:0000:0000:0110:0000:0000 is now reduced to
2001:dba::110:0:0, and this reduces the original 39 character address
to 17 characters (including colons).
One more important point about address
notation is that although it is not a standard, a good practice for
IPv6 notation is to use all lowercase letters.
IPv6 Addresses and Port Specification
In many documentation cases, it is necessary
to also designate the port of a service running on IPv6. IPv4 uses a
colon to designate the port (for example, 192.168.1.15:80), but with
IPv6 this would cause a lot of confusion. To designate an IPv6 and a
port address, you can enclose the address in brackets followed by the
colon and port number (for example, [2001:dba::110:0:0]:80);
2001:dba::110:0:0 port 80 is also acceptable.
Unique Local Address
As with IPv4, many organization use the
designated IPv4 private IP address ranges of 10.0.0.0/8, 172.16.0.0/16,
and 192.168.0.0/24. With IPv6, because there are enough addresses,
organizations may not need to use private addressing with NAT at the
router or perimeter firewall. Organizations may start to use globally
routable IPv6 addresses, or addresses that can be
used on the internal network and on the Internet. However, many network
administrators may opt to start IPv6 implementations using an
internal-use IPv6 address known as the unique local address (ULA). This
the IPv6 counterpart to the IPv4 private IP ranges and is detailed in
RFC 4193. The ULA prefix is fc00::/7. The addresses within this range
are intended to be used on internal site networks, and can even be used
to route between internal networks, but are not intended to be routed
globally or on the Internet.
The fc00::/7 prefix is divided further into
two /8 address prefixes, including fd00:/8, which should be used for
actual network deployments and has the eighth bit set to 1, indicating
a local network, followed by a randomly generated 40-bit string, known
as the global ID and a 16-bit subnet ID allowing network administrators
a standard for addressing devices on /64 subnets. The other network is
fc00:/8 and has the eighth bit set to 0, but that network has not yet
been clearly defined or accepted as a standard. One network range from
the fd00::/8 prefix is the fe80::/64 prefix, which is used for
link-local addresses. The link-local address is the self-generated
address assigned on every IPv6-enabled adapter. This link-local address
can be used between IPv6 devices that were not statically configured
with an address and did not receive an address from an IPv6 DHCP server
(that is, the stateless configuration IPv6 address).