IPv 6
IPv 6
IPV6 Outline:............................................................................................................................................2
IPv6 address Format...............................................................................................................................4
Address Shortening................................................................................................................................4
Examples...............................................................................................................................................5
IPv6 address types..................................................................................................................................6
Unicast Address...................................................................................................................................6
Multicast...............................................................................................................................................8
Anycast..................................................................................................................................................8
IPv6 Unicast addresses...........................................................................................................................9
IPv6 EUI addresses................................................................................................................................10
IPv6 Aggregatable Global Unicast address.....................................................................................12
IPv6 Link Local addresses....................................................................................................................16
IPv6 Site Local addresses....................................................................................................................16
IPv4 compatible addresses.................................................................................................................17
Unspecified and Loopback addresses..............................................................................................18
Summary.................................................................................................................................................18
IPv6 Multicast addresses.....................................................................................................................19
Stateless Autoconfiguration...............................................................................................................20
Stateful DHCP (DHCP v6)....................................................................................................................22
IPv6 Cheat Sheet:..................................................................................................................................24
Representation of IPv6 Addresses................................................................................................25
Rule 1: Omit Leading 0s...............................................................................................................27
Rule 2: Omit All-0s Hextets........................................................................................................28
Combining Rule 1 and Rule 2.....................................................................................................30
IPV6 Outline:
So, the procrastination for the conversion’s to IP version 6 is now finally over. We have to
make sure we know how IP version 6 works and functions because we're going to come
across it a lot more in the coming months and years.
So, what we're going to cover is firstly looking at the need for IP version 6. And I
think I've covered that already. We have run out of IP version 4 addresses and we are
now forced to convert or migrate to IP version 6.
I am gonna explain the format of an IP version 6 address. an IP version 6 addresses
128 bits in length. So, a lot larger than the 32-bit IP version 4 address that we used
to working with.
We gonna look at the methods of assigning an IP version 6 address.
We gonna look at routing protocols.
We're going to look at implementation strategies.
And I'd like to show you in the configuration. So, in other words I'll get a little
network running using IP version 6 with RIPng.
The thing that seems to scare people most, is the format of an IP version 6 address.
The great thing about IP version 6. you can take a lot of your knowledge of IP
version 4 and just apply it in an IP version 6 environment. Routing protocols like
OSPF, RIP, EIGRP and so forth are available in IP version 6.
The version and the syntax text might be slightly different, but a lot of the concepts
remain the same. We still have TCP and UDP and a lot of the other protocols. So, you
don't have to learn everything from scratch which is a great benefit.
In IP version 4, an address consists of four octets which equals 32 bits in binary.
So, this is what an IP version 4 address would look like in binary or in Dotted decimal
notation. This is the number of IP addresses available in IP version 4
Now in IP version 6, the address is 16 octets in length which equates to 128 bits. This
is an IP version 6 address written in binary. And as you can see it's a lot lot longer.
IP version 6 addresses are typically written in hexadecimal. So, this is the hex
representation of this binary IPv6 address.
There are 3.4 times ten to the thirty-eight (3.4*10^38) IP addresses available. The
pool is a much much larger. The industry is learning from the mistakes of the past.
And in this case they're making the pool very large so that we don't run into the
same issue in a few years’ time where we run out of IP version 6 addresses.
It's a dangerous thing to say this but this should be enough addresses for future
Internet growth requirements. But just to put this in perspective there are enough IP
version 6 addresses that we could allocate the entire equivalent IPv4 Internet address
space to every individual on Earth. That's how big this address space is.
When comparing the OSI model of IP version 4 to IP version 6. you'll notice that all
the layers except for Layer 3 have remained the same or only had slight
modifications. So, the application, presentation, session and transport will function in
IP version 6 in the same way as they function in IP version 4.
The Network layer is where the changes have been made. For instance, IPv4 consists
of only 32-bits but an IPv6 address consist of 128 bits.
The data link and physical layer also remain the same. So, from networking point of
view this is great news. Because you can take all your knowledge and experience of
IPv4 protocol and apply it in an IPv6 environment, it’s not like another routed
protocol where you have to learn an entire new protocol stack.
Protocol like TCP and UDP still remains at layer 4 and reside on top of IPv6 just like
they do in IPv4
IPv6 address Format
Address Shortening
There are some rules that you need to remember,
1. leading zeros are optional within the 16-bit hexadecimal field (leading zeros
in each field can be removed: see in example)
2. and successive fields of zeros can be represented as :: (Successive all zero
field can be shortened to “::”)
but only once per address.
So as an example, you could take this address
(2001:0000:130f:0000:0000:09d0:876a:123B) and rewrite it as the following
(2001:0:130f::09d0:876a:123B).
notice these two octets could be written as a Zero and notice these four
octets here. So, the eight zeros in hexadecimal can be represented as “::”
(2001:0000:130f:0000:0000:09d0:876a:123B)
=(2001:0:130f::09d0:876a:123B).
However, you cannot put “::” twice with in an IP address because the
system would have no way of working out how many zeros are
represented by these colons (2001::130f::09d0:876a:123B)
Is these four zeros and those eight zeros.
Or is, these eight zeros and there's four zeros.
So, you can only put colon colon”::” once in an address.
Examples
Unicast Address
Now the different types of addresses in IP version 6, some of which you'll recognize
already.
The first one is a Unicast address
which has an address allocated to single interface for example
There are several types of unicast addresses and I'll go through all of these in
more detail in upcoming slides.
But first we have a Global unicast address.
There is no need for NAT in IP version 6. That comes as a big shock
to a lot of people. Remember that was introduced to try and
conserve IP version 4 addresses, here we have plenty of addresses.
So, there's no need for NAT
a lot of people say that that's a security vulnerability. But
remember that NAT or network address translation was not
developed for security, originally. that's a byproduct of NAT.
Here we have Globally unique unicast addresses. The address on
your interface on your PC at home will be unique globally. There is
no need for your IP address to be NATed to an external or public
address. There are enough public if you like. Global Unicast
addresses available for all devices in the world.
There are also Reserved unicast address we won't worry too much
about them.
We also have link local unicast addresses and I only refer to a
particular physical link.
Router's do not forward link local addresses.
Link local addresses will allow two hosts to communicate with each
other without IP addresses being assigned to those devices.
So, two users could connect that PCs back to back using for
instance a crossover cable and they'll have immediate IP
connectivity without the need for manual configuration of
addresses, or for the DHCP server.
Many IPv6 routing protocols also use Link local addresses to
communicate with each other. Link local addresses are also used
for link communication, such as automatic address configuration,
neighbor discovery and router discovery.
I'll show you a link local address looks like in a moment.
We also have Site Local unicast addresses,
which are similar in concept to RFC 1918 private addresses.
These are addresses assigned to an entire site within an
organization. So, site local address would only be valid within
the site network of an organization,
site local addresses were part of the original addressing
architecture from 1995. Please note that site local unicast
addresses have been deprecated since September 2004.
And you can read more about this in RFC 3879, where they talk
about deprecating site local addresses.
It's important to note that the development of IPv6 has
been ongoing for a number of years and certain terms that
you come across such a site local addresses, will have
changed or been updated or in this case deprecated.
So, they no longer use because of the confusion and
ambiguity of the term site.
They have not been replaced with what are called unique local addresses.
There is also some special purpose unicast addresses such as
Unspecified
whichever it is shown you it's just colon colon”::” and is used to
refer to the host itself and is used when a device does not know its
own IP address.
This will be typically used in the source field of a datagram that is
sent by a device that seeks to have its IP address configured.
So, colon colon”::” means unspecified.
I've already demonstrated loopback.
That would be colon Colon one (::1) which is very similar to 1.27.
0.0.1 for example.
Now IP version 4 compatible addresses have also been deprecated.
It would allow for the representation of an IP version 4 address
with an IP version 6.
The most significant 96 bits of the address would be set to zero
while the last 32 bits are the IP version 4 address that is
represented. This was deprecated in 2006.
The reason I still mention these addresses is that, you may come
across them an IP version 6 literature.
Just be aware like a lot of things and life changes have taken place
and certain technologies and addresses have been dropped or
deprecated.
So be aware the first type address in IP version 6 is unicast.
Multicast
Anycast
the third type is Anycast
Now this does exist in IP version 4 as well.
This is known as one to nearest. Unicast addresses are used but the same address is
configured on two or more devices.
The idea here is that routers will decide on the closest device to reach the
destination.
If you are going to Amazon.com for example, you wouldn't care if that server was
hosted in California or in New York. You just want to purchase a book for
example from Amazon.
If you on the West Coast of the US. you would be closer to a server in California
than you would be to a server in New York.
So, with Anycast. two servers: one in New York, one in San Francisco for example are
configured with the same IP address.
If you are on the West Coast of the US and you are going to Amazon.com for
example you'd be routed to the server in San Francisco, because it's physically
closer to you than the server in New York.
By the same token if you're on the east coast you'd be routed to the server in
New York.
It allows for load balancing and content delivery services. As I've mentioned it
already exists an IP version 4.
So, they are three address types in IP version 6. So, we have broadcasts which are so
common in IP version 4.
broadcast addresses no longer exist. Broadcasts can cause lots of issues on
networks and broadcasting has been replaced with multicasting in an IP version 6
environment. We no longer send broadcasts.
if we want to contact multiple devices. We send a multicast instead of a
broadcast.
So again, please note that this address is written in hexadecimal because IP version 6
addresses are written in hexadecimal.
These two hexadecimal values (00) equate to 8 binary bits.
The second step consists of setting the seventh bit (000000X0) of the 64-bit address,
(X) this bit identifies, the 48 but MAC addresses uniqueness or lack thereof.
An ethernet address has two significances. It's either globally managed or locally
managed.
globally managed means that you use the Vendor MAC address
locally managed means that you rewrite the MAC address with your own value. In
other words, you change the MAC address to a locally significant value.
So that's (X) seventh bit or U/L is set to either 1 (X = 1) which means the address is
unique or set to 0 (X = 0) meaning the address is not unique.
Now in this example let's assume that we're using a vendor MAC address.
So, in other words this (X) bit get set to 1, if you have a binary value of six zeros
followed by one followed by zero (000000X0) Converting that back to
hexadecimal will give you a value of 02.
So just to reiterate you have a hexadecimal value of 00 that's converted into
binary, the seventh binary bit is either set to 1 or 0 depending whether it's
globally unique or not globally unique. That is then converted back to
hexadecimal (02).
So once again our IPv6 aggregatable global unicast address is 128 bits in length, half
of the address is the network prefix which is 64 bits and half of the addresses the
interface identifier which is 64 bits.
the network prefix is broken up into two major parts.
You have the global routing prefix which is used for the Public topology. In other
words, the Internet.
and the subnet ID which is used for the site topology. In other words, the subnet
portion of the address would be used to create subnets within an enterprise, or
within an organization or within a site. It's 16 bits in length that means that a
service provider will give you a /48 subnet for every site or organization that you
manage.
That gives you 16 bits for subnets which allows you to create 65536
subnets within your organization from one subnet given to you by the
service provider.
You would continue using a 64 mask on every link ,no matter whether
it's a point to point link or an Ethernet subnet.
the service provider network consists of a /48 network. your internal
networks consist of /64 subnets.
So once again the ISP will allocate /48 subnet, you will allocate a /64
subnet to each interface.
Once again no need to do complicated subnetting, all your subnets are /64 from
the /48 that you were allocated by your service provider.
Remember there is no NAT, all internal addresses within your organization are
using these IPv6 aggregatable global unicast addresses, which are the equivalent
of public IP addresses within IP version 4.
The IP version 6 address is actually broken up into more fields. I wouldn't worry too
much about this, but I just want to show you the actual format for this aggregatable
global unicast address.
You firstly have the interface identifier, which is 64 bits in length. I've explained
that that identifies the equivalent of the host portion in an IP version 4 address.
The next part is the SLA ID or Site Level Aggregation Identifier. This is like your
subnet identifier which represents subnets within an organization. its 16 bits in
length. giving you over 65000 subnets to use within a site or an organization.
Then you have the NLA ID which is the Next Level Aggregation Identifier. And
this will be used by your ISPs.
There are 8 Reserved bits which are not currently used.
and then you have the TLA ID which is the Top-Level Aggregation Identifier. used
by various regional Internet registries around the world. The Internet registries
will then assign TLA IDs to large ISP, specifically transit providers and exchanges.
And then lastly we have the Format Prefix which is set to 001.
once again this portion of the address is the public typology and we are not particularly
concerned with that in this course.
within enterprises or sites, we would have the subnet ID, which is used for site typology.
And then once again the interface ID which is used as the host portion of an IPv6
address.
The advantage of this IPv6 address layout is aggregation. It allows for aggregation or
summarization of addresses within the global Internet.
Just be aware as well that every IPv6 interface contains at least one loopback address
which is ::1/128.
optionally interfaces might include multiple unique local and global addresses. This
is an important concept,
In IPv4 on a Cisco router. You can only allocate a single IP address as the primary
IP address on that interface.
All subsequent IP addresses are configured a secondary IP addresses.
However, in IP version 6, you can configure multiple primary IP addresses on an
interface. That's quite a major change from IP version 4.
I'll show you in a moment when you enable IPv6 on a Cisco routers interface,
multiple IP addresses are automatically allocated to that interface.
And once again the whole reason for this address layout is aggregation and
summarization.
a /32 subnet Sis allocated to an ISP. So, in this example 2001:123::/32 is allocated
let's say for instance to this ISP.
->the service provider can then allocate a /48 subnet to an organization or
enterprise.
So, in this example let's assume that 2001:1234:1::/48 is allocated to customer A.
That customer can then subnet the /48 to /64 subnets and allocate those subnets
to every interface within the organization.
So, notice here 2001:1234:1 which is a /48 subnet. The Enterprise was allocated is
subnetted again to :2::/64 (2001:1234:1:2::/64) .In other words /64 subnet is
allocated to this interface (left side router).
And then notice over here. 3 (2001:1234:1:3::/64) is allocated to this interface or
link (right router),
just to help you once again with these addresses.
Remember these (2001::/16) values are in hexadecimal, a single value in hex
equates to four binary bits.
So, we have one two three four hexadecimal values here, four hex values times
four 16 binary bits. So, this (2001::/16) is actually a 16-bit address. Hence /16.
by the same token here, remember this(2001:) is 16 and this (1234) is 16, so the
values between the colons are 16-bit values. so, 16+16 gives you 32, so hence
/32 (2001:1234::/32).
Once again here we have another valley between Colon's. so, it's 16 (2001), 16
(123)and 16 (1) or (0001) {16}
remember leading zeros can be dropped in an address.
So that gives you 48 bits. Hence /48
and lastly (2001:1234:1:3::/64) this address, there is 1, 2, 3, 4, values between colons,
leading zeroes have been dropped.
So that's four times sixteen giving you slash 64.
I hope that helps you decipher the address a little easier.
Please note on this subnets we have not displayed the host portion of the
address.
IPv6 Link Local addresses
IP version 6 link local addresses are unicast addresses but restricted to the local link.
Hence, the name Link Local.
They are still 128 bits in length, the interface identifies automatically configured with
the EUI address. Note however that the most significant 10 bits of the address, start
with FE80 in hexadecimal or seven binary ones, followed by binary zero, followed by
binary one, followed by binary zero (1111 1110 10) in binary.
Routing protocols use link local addresses to advertise routes to one another and in
IP version 6, a node having a global unicast address on a local link will use the link
local address of its default IPv6 router rather than the global unicast address.
This is good because if the network is renumbered, the default router can still be
used using the linked local address. link local addresses won't change when you
renumber your global unicast addresses.
Site local addresses. Also, another type of unicast address but have a limited scope
to a site. Site local addresses are not enabled by default on nodes, unlike link local
addresses which are automatically enabled. In other words, you have to configure
site local addresses.
The address starts with FEC0 with the most significant 10 bits set in binary to 7
binary ones followed by binary zero followed by two binary ones (1111 1110 11). So,
the most significant 10 bits of a site local address always start with this value.
Site local addresses are the IP version 6 equivalent of RFC 1918 addresses. These
however have been deprecated and should no longer be used. But the idea was that
you could have many many subnets within your organization. As you would now
have 54 bits for subnetting, which is far greater than the 16 bits that you get with
global unicast addresses.
As I've already mentioned unspecified addresses is where the address is set to Zeros
(0:0:0:0:0:0:0:0).
and it's used as a placeholder when no address is available. So, during an
initial DHCP request or duplicate address detection.
Loopback addresses are set to zeros and Lastly a 1 (0:0:0:0:0:0:0:1).
This is equivalent to 127.0.0.1 an IP version 4 and as used by the host to identify
itself. I've already demonstrated this and can be used to check that the IPv6
protocol stack is functioning properly.
Summary
So, in summary, IPv6 Unicast addresses can be broken up into six types.
The first type is Unspecified. So ::/128.
Then Loopback ::1/128.
and then we have Aggregatable Global unicast addresses, and here are some
examples of ranges. These Remember are globally unique. There's no need for
NAT, because you have global reachability that address is unique globally.
Then we have Linked Local addresses, which address is used only on the local
link. used for example by routing protocols, starts with FE80 in hexadecimal.
Site Local addresses are similar in concept to RFC 1918 private addresses. They
start with FEC0.
IPv4 compatible addresses. The most significant 96 bits are set to zero and this
allowed us to create automatic tunneling of IPv6 of the IPv4.
Both Site Local and IPv4 Compatible addresses have been deprecated.
when a host initially boots up. The node will need its IP address as soon as possible
and normally in the early stages of the boot process, it could wait for a long period
of time for the next router advertisement to get the information it needs to
configure its interfaces. and thus, a node will send a router solicitation message to
routers on the network asking them to reply immediately with a router
advertisement. so that the node can immediately Autoconfigure its IP address.
So, the host will send a solicitation to all routers using the all routers multicast
address FF02::2. The host uses ICMP version 6 type 133. Again, I wouldn't try and
remember all of these ICMP types. just understand the process.
The host uses its link local address as the source of the router solicitation request.
So, uses FE80 followed by its EUI address as the source, and the message goes to
destination of FF02::2 all routers on the local link.
Router will reply to that message using ICMP version 6 type 134.
The Router will use its linked local address of FE80 and EUI as the source, and the
destination will go to FF02::1 In other words all notes on the link.
Autoconfiguration has the advantage in that enables plug and play configuration of
IPv6 devices. You just configure an IP address on the router and by default route
advertisements are enabled.
PCs and other devices can be plugged into the network and they will automatically
learn the prefix assigned to them and default gateway without the administrator
configuring a DHCP server, or manually configuring IP addresses.
Hosts are automatically configured with the prefix received and then they combine
that with a link layer address. In other words, the EUI address, to configure a local
IPv6 address to allow them to communicate with the network.
->Now in this example we have both a router and a DHCP server. Now the process
for acquiring configuration data for a DHCP version 6 Cline is very similar to IP
version 4.
However initially, the client will first detect the presence of routers on the linked by
using neighbor discovery messages. If at least one router is found as in this
diagram ,the client will examine the router advertisements to determine if DHCP
version 6 should be used.
If there are advertisements and able to use of DHP version 6 on the link or if there's
no Router, the client then starts a DHCP solicit phase to find a DHCP server.
So, in this example the DHCP version 6 can be used. So, the host will send a DHCP
solicit message to DHCP version 6 agents. In other words, the DHCP servers using
multicast address FF02::1:2.
once again just remember anything starting with FF02 is a multicast address. We do
not have broadcasts in IP version 6. So, in the place of broadcasts we're using
specific multicast addresses.
The hosts will use a source address of FE80. In other words, a link local address.
Now both DHCP servers and DHCP relays will listen for DHCP solicit messages on the
multicast address. So DHCP forwarding is very similar in IP version 6 as its in IP
version 4.
now if DHCP cannot be used, the host reverts to stateless configuration as per the
previous examples I've shown you.
IPv6 Cheat Sheet:
Representation of IPv6 Addresses
IPv6 addresses are 128 bits in length and written as a string of hexadecimal digits. Every 4 bits can be represented by
a single hexadecimal digit, for a total of 32 hexadecimal values (0 16 [00002] through f16 [11112]). You will see later in
this section how to possibly reduce the number of digits required to represent an IPv6 address. The alphanumeric
characters used in hexadecimal are not case sensitive; therefore, uppercase and lowercase characters are equivalent.
Although IPv6 address can be written in lowercase or uppercase, RFC 5952, A Recommendation for IPv6 Address Text
Representation, recommends that IPv6 addresses be represented in lowercase.
NOTE
If you are new to the hexadecimal number system, see Chapter 2, “IPv6 Primer,” for information on this number
system.
As described in RFC 4291, the preferred form is x:x:x:x:x:x:x:x. Each x is a 16-bit section that can be represented using
up to four hexadecimal digits, with the sections separated by colons. The result is eight 16-bit sections, or hextets, for
a total of 128 bits in the address, as shown in Figure 4-1. Figure 4-1 also shows an example of IPv6 addresses on a
Windows host and a Mac OS host. These addresses and the format of these addresses will be explained in this
chapter.
The longest representation of the preferred form includes a total of 32 hexadecimal values. Colons separate the
groups of 4-bit hexadecimal digits.
The unofficial term for a section of four hexadecimal values is a hextet, similar to the term octet used in IPv4
addressing. An IPv6 address consists of eight hextets separated by colons. As Figure 4-1 illustrates, each hextet, with
its four hexadecimal digits, is equivalent to 16 bits. For clarity, the term hextet is used throughout this book when
referring to individual 16-bit segments. The following list shows several examples of IPv6 addresses using the longest
representation of the preferred form:
0000:0000:0000:0000:0000:0000:0000:0000
0000:0000:0000:0000:0000:0000:0000:0001
ff02:0000:0000:0000:0000:0000:0000:0001
fe80:0000:0000:0000:a299:9bff:fe18:50d1
2001:0db8:1111:000a:00b0:0000:9000:0200
2001:0db8:0000:0000:abcd:0000:0000:1234
2001:0db8:cafe:0001:0000:0000:0000:0100
2001:0db8:cafe:0001:0000:0000:0000:0200
At first glance, these addresses can look overwhelming. Don’t worry, though. Later in this chapter, you will learn a
technique that helps in reading and using IPv6 addresses. RFC 2373 and RFC 5952 provide two helpful rules for
reducing the notation involved in the preferred format, which will be discussed next.
Preferred 0000:0000:0000:0000:0000:0000:0000:0000
0: 0: 0: 0: 0: 0: 0: 0
Leading 0s omitted or
0:0:0:0:0:0:0:0
Preferred 0000:0000:0000:0000:0000:0000:0000:0001
0: 0: 0: 0: 0: 0: 0: 1
Leading 0s omitted or
0:0:0:0:0:0:0:1
Preferred ff02:0000:0000:0000:0000:0000:0000:0001
ff02: 0: 0: 0: 0: 0: 0: 1
Leading 0s omitted or
ff02:0:0:0:0:0:0:1
Preferred fe80: 0000: 0000: 0000:a299:9bff:fe18:50d1
fe80: 0 : 0: 0:a299:9bff:fe18:50d1
Leading 0s omitted or
fe80:0:0:0:a299:9bff:fe18:50d1
2001: db8: 1111: a: b0: 0:9000: 200
Leading 0s omitted or
2001:db8:1111:a:b0:0:9000:200
2001: db8: 0: 0:abcd: 0: 0:1234
Leading 0s omitted or
2001:db8:0:0:abcd:0:0:1234
* In this table, the 0s to be omitted are in bold. Spaces are retained so you can better visualize where the 0s were
removed.
It is important to remember that only leading 0s can be removed; if you deleted trailing 0s the address would be
incorrect. To ensure that there is only one correct interpretation of an address, only leading 0s can be omitted, as
shown in the following example:
0s omitted:
2001:db8:100:a:0:bc:abcd:d0b
2001:db80:1000:a000:0000:bc00:abcd:d0b0
2001:0db8:0100:000a:0000:00bc:abcd:0d0b
Preferred 0000:0000:0000:0000:0000:0000:0000:0000
Preferred 0000:0000:0000:0000:0000:0000:0000:0001
Preferred ff02:0000:0000:0000:0000:0000:0000:0001
Preferred fe80:0000:0000:0000:a299:9bff:fe18:50d1
Preferred 2001:0db8:0000:0000:abcd:0000:0000:1234
Preferred 2001:0db8:aaaa:0001:0000:0000:0000:0100
Preferred 2001:0db8:aaaa:0001:0000:0000:0000:0200
* In this table, the 0s in bold in the preferred address are replaced by the double colon.
Only a single contiguous string of all-0s segments can be represented with a double colon; otherwise, the address
would be ambiguous, as shown in this example:
2001::abcd::1234
2001:0000:0000:0000:0000:abcd:0000:1234
2001:0000:0000:0000:abcd:0000:0000:1234
2001:0000:0000:abcd:0000:0000:0000:1234
2001:0000:abcd:0000:0000:0000:0000:1234
As you can see, if two double colons are used, there are multiple possible interpretations, and you don’t know which
address is the correct one.
What happens if you have an address with more than one contiguous string of all-0s hextets—for example,
2001:0db8:0000:0000:abcd:0000:0000:1234? In that case, where should you use the single double colon (::)?
NOTE
Most operating systems, including Cisco IOS and Microsoft Windows, accept the placement of a single double colon
(::) in any valid location.
Combining Rule 1 and Rule 2
You can combine the two rules just discussed to reduce an address even further. Table 4-3 illustrates how this works,
showing the preferred address, application of rule 1, and application of rule 2. Again, spaces are left so you can better
visualize where the 0s have been removed.
Preferred 0000:0000:0000:0000:0000:0000:0000:0000
Preferred 0000:0000:0000:0000:0000:0000:0000:0001
Preferred ff02:0000:0000:0000:0000:0000:0000:0001
Preferred fe80:0000:0000:0000:a299:9bff:fe18:50d1
Preferred 2001:0db8:1111:000a:00b0:0000:9000:0200
Preferred 2001:0db8:0000:0000:abcd:0000:0000:1234
Preferred 2001:0db8:aaaa:0001:0000:0000:0000:0100
Preferred 2001:0db8:aaaa:0001:0000:0000:0000:0200
0000:0000:0000:0000:0000:0000:0000:0000 ::
0000:0000:0000:0000:0000:0000:0000:0001 ::1
ff02:0000:0000:0000:0000:0000:0000:0001 ff02::1
fe80:0000:0000:0000:a299:9bff:fe18:50d1 fe80::a299:9bff:fe18:50d1
2001:0db8:1111:000a:00b0:0000:0000:0200 2001:db8:1111:a:b0::200
2001:0db8:0000:0000:abcd:0000:0000:1234 2001:db8::abcd:0:0:1234
2001:0db8:aaaa:0001:0000:0000:0000:0100 2001:db8:aaaa:1::100
2001:0db8:aaaa:0001:0000:0000:0000:0200 2001:db8:aaaa:1::200
Even after applying the two rules to compress the format, an IPv6 address can still look unwieldy. Don’t worry!
Chapter 5, “Global Unicast Address,” shows a technique that I call the 3–1–4 rule. Using that rule makes IPv6 global
unicast addresses (GUAs) easier to read than an IPv4 address and helps you recognize the parts of a GUA address.