You are on page 1of 9

IPv6

IPv6

by
B Pavan Kumar

Created by B Pavan Kumar 1


IPv6

IPv6
Necessity of IPv6

Given that an IP address is 32 bits in length, there are 232 actual IP addresses, which is
4.3 billion addresses. Not all of these are usable, however: only 3.7 billion of these are
actually usable. Many addresses are reserved, such as the research (239254), broadcast
(255), multicast (224239), private (10, 172.16, and 192.168), and loopback addresses
(127). And, of course, many of the usable addresses are already assigned, leaving about
1.3 billion addresses for new growth.

Unlike 32-bit IPv4 addresses, IPv6 uses a 128-bit address. This allows for 3.4 1038
addresses, which is enough for many IP addresses for each person on Earth, and probably
multiple planets.

IPv6 Addressing Format

Whereas IPv4 addresses use a dotted-decimal format, where each byte ranges from 0 to
255, IPv6 addresses use eight sets of four hexadecimal addresses (16 bits in each set),
separated by a colon (:), like this: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx (x would be a
hexadecimal value). This notation is commonly called string notation.

Here are some important items concerning IPv6 addresses:

Hexadecimal values can be displayed in either lower- or upper-case for the


numbers AF.
A leading zero in a set of numbers can be omitted; for example, you could either
enter 0012 or 12 in one of the eight fieldsboth are correct.
If you have successive fields of zeroes in an IPv6 address, you can represent them
as two colons (::). For example, 0:0:0:0:0:0:0:5 could be represented as ::5; and
ABC:567:0:0:8888:9999:1111:0 could be represented as
ABC:567::8888:9999:1111:0. However, you can only do this once in the address:
ABC::567::891::00 would be invalid since :: appears more than once in the
address. The reason for this limitation is that if you had two or more repetitions,
you wouldnt know how many sets of zeroes were being omitted from each part.
An unspecified address is represented as ::, since it contains all zeroes.

Types of IPv6 Addresses

Recall from Chapter 7 that many types of IPv4 addresses exist: unicast, broadcast,
multicast, research, private, and so on. IPv6 also has different types of addresses.
Following are the three main types:

Anycast Very different from an IPv4 broadcastone-to-the-nearest interface,


where many interfaces can share the same address
Multicast Similar to a multicast in IPv4one to a group of devices

Created by B Pavan Kumar 2


IPv6

Unicast Represents a single interface

Anycast

One of the problems with addressing in IPv4 was the use of broadcasts, which every
device had to process on a segment (even when the broadcast wasnt ultimately destined
to a device). IPv4 relied heavily on broadcasts to discover devices on a segment, such as
ARP, and to acquire addressing, such as Dynamic Host Control Protocol (DHCP). In
IPv6, broadcasts no longer exist: theyve been replaced with anycast and multicast
addresses.

An anycast address identifies one or more interfaces. Notice that I dont use the term
device, since a device can have more than one interface. Sometimes people use the term
node to designate an interface on a device. Basically, an anycast is a hybrid of a unicast
and multicast address. With a unicast, one packet is sent to one destination; with a
multicast, one packet is sent to all members of the multicast group; and with an anycast, a
packet is sent to any one member of a group of devices that are configured with the
anycast address. By default, packets sent to an anycast address are forwarded to the closet
interface (node), which is based on the routing process employed to get the packet to the
destination. Given this process, anycast addresses are commonly referred to as one-to-
the-nearest address. And, interestingly enough, anycast addresses are allocated from the
global pool of unicast addresses in IPv6, making a unicast and anycast address
indistinguishable from each other when you look at them in a packet. And since multiple
devices can be configured with the same anycast address, they are commonly used in
situations where load balancing traffic, such as web content, to two different destinations
is needed.

Multicast

Multicasts in IPv6 serve a function similar to their counterpart in IPv4: they represent a
group of interfaces interested in seeing the same traffic.

Unicast

IPv6 unicast addresses are assigned to each node (interface), and their uses are discussed
in RFC 4291. The five types of unicast addresses are listed in Table 24-1. Interestingly
enough, multiple addresses of any type can be assigned to a devices interface: unicast,
multicast, and anycast.

Private Addresses

As mentioned in Table 1-1, private addresses are used for devices that dont need to
access a public network. There are two kinds of private addresses:

Site-local FEC:: through FFF::


Link-local FE8:: through FEB::

Created by B Pavan Kumar 3


IPv6

Table 1-1 IEEE Ethernet Components

Site-local addresses are similar to the RFC 1918 addresses and represent a particular site
or company. These addresses can be used within a company without having to waste any
public IP addressesnot that this is a concern, given the large number of addresses
available in IPv6. However, by using private addresses, you can easily control who is
allowed to leave your network and get returning traffic back by setting up address
translation policies for IPv6.

Link-local addresses are a new concept in IPv6. These kinds of addresses have a smaller
scope as to how far they can travel: just the local link (the data link layer link). Routers
will process packets destined to a link-local address, but they will not forward them to
other links. Their most common use is for a device to acquire unicast site-local or global
unicast addressing information, discovering the default gateway, and discovering other
layer 2 neighbors on the segment. When a device is using link-local addresses, it must
specify an outbound interface, since every interface is connected to a link.

Global Address

With the exception of the multicast address space of FF00::/8, unicast and anycast
addresses make up the rest. However, IANA has currently assigned only 2000::/3
addresses to the global pool, which is about 1/6th of the available IPv6 addresses. Of
these addresses, only 2001::/16 are assigned to various Internet address registries. Global
unicast addresses are made up of two components, shown in Figure 24-2: subnet ID (64
bits) and an interface ID (64 bits).

Created by B Pavan Kumar 4


IPv6

The last half of the IPv6 address, the interface ID, represents a particular interface within
the site. One requirement with addresses from 2000::/3 through E000::/3 is that the
interface ID must have a 64-bit value in it to be considered valid. Therefore, addresses
that have 0s for the last 64 bits are considered invalid IPv6 unicast addresses. For
example, 2004:1234:5678:90AB:: is invalid, since the interface ID (the last 64 bitsthat
is, the last four sets of numbers) are binary zeroes.

The interface ID is typically composed of a part of the MAC address of the interface.
When this is done, the interface ID is commonly called an extended unique identifier 64
(EUI-64). Figure 24-3 shows an example of the frame with a EUI-64 format. The OUI
part of the LAN NICs MAC address is mapped into the first 24 bits of the interface ID.
The seventh bit in the highest order byte is set to 1, indicating that the interface ID is
unique across the site, or 0, indicating that it is unique within the local scope only. The
OUI mapping is followed by the 16-bit value of FFFE. The last 24 bits of the MAC
address are then mapped into the last part of the interface ID.

Created by B Pavan Kumar 5


IPv6

Address Assignment

You can use four methods to assign an interface an IPv6 address: two are done statically
and two dynamically. The following three sections discuss these four options.

Static Address Assignment

One option you have is to statically assign a unicast address to a devices interface using
either of these two approaches:

Specify all 128-bits manually


Use EUI-64

You can manually specify the entire 128-bit address, or you can specify the subnet ID
and have the device use the EUI-64 method to create the interface ID part of the address.
If youre manually entering the entire address, remember that sets of fields that have 0s in
them can be abbreviated with ::. The EUI-64 method is the more common approach by
most network administrators.

DHCPv6

DHCPv6 is an update of the DHCP protocol in IPv4 and works similarly to the previous
version with a few differences. Before the client can begin, it must first detect a router on
the link via a neighbor discovery process. If the client detects a router, the client
examines the router advertisement messages to determine whether DHCPv6 has been set
up. If the router specifies that DHCPv6 is supported, or no router advertisement messages
are seen, the client will begin to find a DHCPv6 server by generating a DHCP solicit
message. This message is sent to the ALL-DHCP-Agents multicast address, using the
link-local scope to ensure the message isnt forwarded, by default, beyond the local link.
An agent is either a DHCPv6 server or a relay, such as a router.

Stateless Autoconfiguration

Stateless autoconfiguration is an extension of DHCPv6. Like DHCPv6, clients can still


acquire their addressing dynamically; however, with stateless autoconfiguration, no
server is necessary to assign IPv6 addressing information to the clients. Instead, the client
uses information in router advertisement messages to configure an IPv6 address for the
interface. This is accomplished by taking the first 64 bits in the router advertisement
source address (the prefix of the routers address) and using the EUI-64 process to create
the 64-bit interface ID. Stateless autoconfiguration was designed primarily for cell
phones, PDAs, and home network and appliance equipment to assign addresses
automatically without having to manage a DHCP server infrastructure.

Implementation Strategies

One nice feature of moving your network to IPv6 is that you dont have to do it all in

Created by B Pavan Kumar 6


IPv6

one step. Various migration strategies support both IPv4 and IPv6 as you migrate from
the former to the latter.

Table 1-2 IPv4 to IPv6 Transition Options

Most common used transition methods are dual stacking and manual tunneling

Dual Stacking

In dual stacking, a device runs both protocol stacks: IPv4 and IPv6. Of all the transition
methods, this is the most common one. Dual stacking can be accomplished on the same
interface or different interfaces of the device. The below Figure shows an example of
dual stacking on a router, where NetworkA has a mixture of devices configured for the
two different protocols, and the router configured in a dual stack mode. Older IPv4-only
applications can still work while

Created by B Pavan Kumar 7


IPv6

they are migrated to IPv6 by supporting newer APIs to handle IPv6 addresses and DNS
lookups with IPv6 addresses.

IPv6 Tunneling

IPv6 tunneling allows you to tunnel IPv6 packets by carrying them as payloads in an
IPv4 packet, as shown in below Figure. Tunneling allows you to connect IPv6 networks
together across an intermediate IPv4 network. When tunneling IPv6 packets in an IPv4
payload, the IPv4 protocol field contains a value of 41, indicating that IPv6 tunneling is
occurring. The two routers performing the tunneling must be configured using dual
stacking, since they need to communicate with both IPv6 and IPv4 devices on different
segments. If you are configuring the tunnel manually, youll need to configure both the
IPv4 and IPv6 addresses statically. Youll also need to ensure that routing is performing
normally to tunnel the IPv6 packets across the IPv4 network, as well as allowing the two
IPv6 networks, as shown in Figure 24-4, to see each others routes.

IPv6 Configuration

Enabling IPv6 and Assigning Addresses

To use IPv6 on your router, you must, at a minimum, enable the protocol and assign
IPv6 addresses to your interfaces, like this:

Created by B Pavan Kumar 8


IPv6

The ipv6 unicast-routing command globally enables IPv6 and must be the first IPv6
command executed on the router. The ipv6 address command assigns the prefix, the
length, and the use of EUI-64 to assign the interface ID. Optionally, you can omit the eui-
64 parameter and configure the entire IPv6 address. You can use the show ipv6 interface
command to verify an interfaces configuration. Heres an example configuration, with
its verification:

To set up a static DNS resolution table on the router, use the ipv6 host command; you
can also specify a DNS server with the ip name-server command:

The ip name-server command can be used to assign both IPv4 and IPv6 DNS servers.

Created by B Pavan Kumar 9