10.14 The ABCs of IPv6 Addressing
Before we cover the next two topics,
which include how domain names map to IPv6 addresses and vice versa,
we'd better describe the representation and structure of IPv6
addresses. As you probably know, IPv6 addresses are 128 bits long.
The preferred representation of an IPv6 address is eight groups of as
many as four hexadecimal digits, separated by colons; for example:
0123:4567:89ab:cdef:0123:4567:89ab:cdef
The first group of hex digits (0123, in this example) represents the
most significant (or highest order) four bits of the address.
Groups of digits that begin with one or more zeros don't need
to be padded to four places, so you can also write the previous
address as:
123:4567:89ab:cdef:123:4567:89ab:cdef
Each group must contain at least one digit, though, unless
you're using the :: notation. The :: notation allows you to
compress sequential groups of zeros. This comes in handy when
you're specifying just an IPv6 prefix. For example:
dead:beef::
specifies the first 32 bits of an IPv6 address as
dead:beef and the remaining 96 as zeros.
You can also use :: at the beginning of an IPv6 address to specify a
suffix. For example, the IPv6 loopback address is commonly written
as:
::1
or 127 zeros followed by a single one. You can even use :: in the
middle of an address as a shorthand for contiguous groups of zeros:
dead:beef::1
You can use the :: shorthand only once in an address, since more than
one could be ambiguous.
IPv6 prefixes are specified in a format similar to IPv4's CIDR
notation. As many bits of the prefix as are significant are expressed
in the standard IPv6 notation, followed by a slash and a decimal
count of exactly how many significant bits there are. So the
following three prefix specifications are equivalent (though
obviously not equivalently terse):
dead:beef:0000:00f1:0000:0000:0000:0000/64
dead:beef::00f1:0:0:0:0/64
dead:beef:0:f1::/64
IP Version 4 addresses are hierarchical,
mirroring the nature of IPv4 networks: individual networks connect to
Internet service providers, which in turn connect to other ISPs or to
the core of the Internet. Each provider assigns a few bits of the
overall 32-bit IP address: providers closer to the core of the
Internet assign bits earlier in the address, and finally the
administrator of the network assigns the remaining bits.
IPv6 was designed to accommodate a much larger Internet, so IPv6
addresses have even more levels of hierarchy. Each level corresponds
to one of the levels of networks in an IPv6-based internet.
At the core of an IPv6 internet, there are Top-Level
Aggregators , or TLAs. TLAs are networks that
connect directly to the
backbone of the internet and provide
connectivity to Next-Level
Aggregators , or NLAs. NLA networks connect
site networks to an IPv6 internet. The whole arrangement is depicted
in Figure 10-5.
As with IPv4 networks, each of these organizations assigns certain
bits of an IPv6 address. To help you picture the addressing hierarchy
within IPv6, here's a diagram of the most common structure of
an IPv6 address, as described in RFC 2374:
| 3| 13 | 8 | 24 | 16 | 64 bits |
+--+-----+---+--------+--------+--------------------------------+
|FP| TLA |RES| NLA | SLA | Interface ID |
| | ID | | ID | ID | |
+--+-----+---+--------+--------+--------------------------------+
FP is the
Format Prefix, the first three bits of the
address, which determine the format of the rest of the address. The
Format Prefix for this particular format, called (take a breath) the
IPv6 Aggregatable Global Unicast Address Format,
is 001. The next 13 bits identify the Top-Level Aggregator, followed
by three reserved bits (set to zero), then 24 bits specifying the
Next-Level Aggregator. The remaining bits are used by the site: the
Site-Level Aggregator ID, or SLA
ID,is basically like the subnet bits
in an IPv4 address, and the Interface ID
uniquely identifies a particular interface on the
site's network.
In this address format, each ID is assigned by the entity at the next
level up in the hierarchy. For example, a single, top-level address
registry assigns TLA IDs to the Top-Level Aggregators. TLAs, in turn,
assign NLA IDs to their NLA customers, who assign SLA IDs to their
customers. NLA IDs need only be unique within a TLA ID, just as SLA
IDs need only be unique within a particular NLA ID.
|