IP version 4 (IPv4) has been a core part of the TCP/IP protocol suite and has served well during tremendous growth of the Internet. IPv4, mostly called just IP, defines addressing and routing for most corporate networks that use TCP/IP as well as the public Internet. Though IPv4 has been a long-time companion, it has its shortcomings that created the need for a protocol that could replace IPv4. That protocol is Internet Protocol version 6 or IPv6 for short. IPv6 defines the same general functions that are defined by IPv4. However, there are differences in detail that we will explore in this chapter.

IP version 6 (IPv6) serves as the protocol that will eventually replace IP version 4 (IPv4). The most obvious reason for migrating TCP/IP networks from IPv4 to IPv6 is growth. IPv4 uses a 32-bit address, which allows for a little over four billion addresses. It may seem like a pretty large number of addresses but the immense growth of networks and the Internet has almost exhausted our stock of available IPv4 addresses for new deployments. IPv6 uses 128-bit addresses and increases the number of available addresses to 2^128, a number so large that we don’t have a word for it.

The change from IPv4 to IPv6 is not just about one protocol being replaced by another; it impacts many other protocols as well. In this super-sized chapter, we start by introducing IPv6 addressing and routing, also discussing troubleshooting of the same. We then cover OSPFv3 (Open Shortest Path First Version 3) and EIGRPv6 (Enhanced Interior Gateway Routing Protocol for IPv6), in detail. 

The IPv6 Protocols

The core IPv6 protocol, defined in RFC 2460, describes the concept of a packet, addessing for those packets, and the role of hosts and routers. The end objective of IPv6 like IPv4 is to enable devices forward packets sourced by hosts through multiple routers so that they arrive at the correct destination. However, because IPv6 affects several other functions in a network as well beyond addressing and packet forwarding, many more RFCs must define other details. For example, some RFCs describe how to migrate from IPv4 to IPv6, while some other RFCs define newer versions of familiar IPv4 protocols for IPv6:

  • OSPF Version 3: The older version 2 of OSPF works for IPv4 but not for IPv6. So, a newer version known as OSPF version 3 (OSPFv3) was created to support IPv6.
  • EIGRP for IPv6: EIGRP for IPv4 runs over IPv4 as the transport protocol, communicates only with IPv4 peers, and advertises only IPv4 routes. EIGRP for IPv6 follows the same model but it can propagate IPv6 prefixes to route IPv6 packets. 
  • ICMP Version 6: Internet Control Message Protocol (ICMP) worked well with IPv4 to provide feedback to senders on packet forwarding especially when packets could not be forwarded by a router. ICMP was changed into what is known as ICMP version 6 (ICMPv6) to support IPv6. 
  • Neighbor Discovery Protocol: Address Resolution Protocol (ARP) is used to discover the MAC addresses of hosts whose IPv4 addresses are known. IPv6 replaces ARP with the more general Neighbor Discovery Protocol (NDP).

IPv6 is a layer 3 routing protocol and defines a header that holds both the source and destination address fields, just like IPv4. The IPv6 header is not similar to the IPv4 header and the differences are more than just bigger source and destination addresses. The IPv6 header is bigger in size compared with the IPv4 header, though it is otherwise simpler for the sake of reducing the computational overhead on routers that process IPv6 packets. The following diagram displays the IPv6 header:

Figure 14-1 IPv6 Header Format 

14-1

IPv6 Addressing

There are three types of IP version 6 (IPv6) addresses:

  • Unicast: A unicast address identifies a single interface and a packet sent to a unicast address is delivered to the one interface identified by that address.
  • Anycast: An anycast address is for a set of interfaces typically on different nodes. A packet sent to an anycast address is delivered to only one of the interfaces identified by that address. The nearest interface, according to the routing protocol metric, gets the packet delivered to it. 
  • Multicast: A multicast address identifies a set of interfaces typically on different nodes just like an anycast address. However, a packet sent to a multicast address is delivered to all interfaces identified by that address.

If you are wondering what happened to broadcast addresses, they don’t exist in the IPv6 world. Multicast addresses also function in place of broadcast addresses.

Key Concept IPv6 broadcast addresses are a special case of multicast addresses.

Just like IPv4, IPv6 addresses of all types are assigned to interfaces, not nodes. The IPv6 unicast address of any of a node’s interfaces can be used as an identifier for that node.

A single interface may have multiple IPv6 addresses of any type (unicast, anycast, and multicast) and scope. 

Representation of IPv6 Addresses and Prefixes

An IP version 6 address is a 128-bit value written as xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx where each x is a hexadecimal digit. There are 8 groups of 4 hexadecimal digits in the above representation, with each digit representing four binary digits (bits). It is not necessary to write the leading zeros in an individual group of four hex digits.

An example of an IPv6 address is:

2001:0DB8:0000:0000:0006:0600:300D:527B 

The same IPv6 address can also be written as:

     2001:DB8:0:0:6:600:300D:527B

There must be at least one digit in every group of four digits. That is the reason, the groups with all four zeros in the mentioned address are replaced with a single zero.

In order to make writing IPv6 addresses with long strings of zero bits easier, a method is available to compress zeros. The special symbol :: can be used to represent one or more adjacent groups of 16 bits of zeros. The symbol :: can appear only once in an address though. The :: can also include leading zeros after the last group of 16 zero bits, or before the first group of 16 zero bits. For example, the same address we mentioned can be squeezed further as:

2001:DB8::6:600:300D:527B

Note that the :: in above representation replaces two groups of 16 zero bits, as well as three leading zeros in the group after those two groups of 16 zero bits.

The table below first shows the full representation of a few IPv6 addresses, and then shows the short representation making use of the :: according to rules we described.

Table 13-1 IPv6 Addresses Representation

Full Representation Short Representation
2001:0DB8:0000:85A4:0000:08B3:0370:7348 2001:DB8:0:85A4::8B3:370:7348
FF01:0000:0000:0000:0000:0000:0000:0212 FF01::212
0000:0000:0000:0000:0000:0000:0000:0001 ::1
0000:0000:0000:0000:0000:0000:0000:0000 ::

 
IPv4 divides its address space into three classes: A, B, and C. IPv6 does not have a concept of classful networks like IPv4. IPv6 subnets or prefixes can be of arbitrary length without any classful boundaries. An IPv6 address prefix is represented by:

IPv6 address / Length of prefix

For example, the following are four different but valid representations of the 64-bit prefix 20010DB80000ABCD:

2001:0DB8:0000:BCD0:0000:0000:0000:0000/64

2001:0DB8::ABCD:0:0:0:0/64

2001:0DB8:0:BCD0::/64

The last of the above three formats is most commonly used to represent IPv6 prefixes. A node can have an address like 2001:0DB8:0:BCD0:123:4567:89AB:CDEF for the IPv6 prefix 2001:0DB8:0:BCD0::/64.

IPv6 provides two similar options for unicast addressing: 

Global Unicast

IPv6 global unicast addresses are similar to public IPv4 addresses. These addresses are allocated by the Internet Assigned Numbers Authority (IANA) to the Regional Internet Registries (RIRs). RIRs have the task of allocation to services providers and other local registries. IANA maintains an official list of the current state IPv6 address allocation at http://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml

So, each company is assigned a unique IPv6 address block called a global routing prefix – a set of addresses that only one company can use. The company subnets its assigned IPv6 address block using addresses only from the block. As a result, IPv6 global unicast addresses are unique across the globe.

Key Concept IPv6 global unicast addresses and globally unique, and are analogous to IPv4 public address.

The term global routing prefix refers to the idea that routers can have one route that covers all the addresses inside an address block, without the need to have individual routes for smaller portions of that block. All IPv6 addresses in a company should begin with the global routing prefix assigned to it. IPv6 has plenty of space to allow all companies to have a global routing prefix with plenty of addresses, thanks to its 128-bit address size.

Global unicast addresses make up the majority of IPv6 address space.  

Unique Local

IPv6 unique local addresses are similar to private IPv4 addresses. These addresses can be used by companies that do not plan to connect to the Internet, and companies that plan to use IPv6 Network Address Translation (NAT).

These addresses are readily available, and you can simply read documentation and start assigning IPv6 addresses without worrying about registration with IANA or another authority. Multiple companies can possibly end up using the exact same IPv6 unique local addresses, and it works just fine just like private IPv4 addresses.

Key Concept IPv6 unique local addresses are only locally significant and don’t have to be globally unique, just like IPv4 private addresses.

Address Range of Global Unicast Addresses

Global unicast addresses make up the majority of the IPv6 address space. Originally, Internet Assigned Numbers Authority (IANA) reserved all IPv6 addresses that begin with hex 2 or 3 as global unicast addresses. This address range can be written concisely as 2000::/3. Later, the global unicast address range was made wider by a series of RFCs. The present state of affairs is that all IPv6 addresses not otherwise allocated for other purposes are included in the global unicast address space.

Because the number of addresses that sit within the global unicast address space is astonishingly large, IANA does not assign prefixes from all over the address range.

The type of an IPv6 address can be identified by the initial bits of the address, as explained in below table.

Table 13-2 IPv6 Address Type Identification

Address Type Binary Prefix IPv6 Notation
Unspecified 000…0 (128 bits) ::/128
Loopback 000…1 (128 bits) ::1/128
Multicast 1111 1111 FF00::/8
Link-Local Unicast 1111 1110 10 FE80::/10
Global Unicast (everything else) (everything else)

 
Anycast addresses are taken from the global unicast address space, and are not otherwise distinguishable from unicast addresses.

The Unspecified Address

The address 0:0:0:0:0:0:0:0 is called the unspecified address and indicates the absence of an address. It serves as a place holder and must never actually be assigned to a node. As an example of its use, the Source Address field of an IPv6 packet sent by an initializing host before it has learned its own address carries the unspecified address. 

The Loopback Address

The unicast address 0:0:0:0:0:0:0:1 is known as the loopback address, and can be used by an IPv6 host to send a packet to it. The loopback address may be considered the IPv6 equivalent of the IPv4 loopback address 127.0.0.1. The address is reserved for the special purpose of addressing self and must not be actually assigned to an interface. You can think of the loopback interface as a virtual interface to an imaginary link that goes nowhere. The loopback address is treated as having a link-local scope and an IPv6 packet with a destination address of loopback must never be sent outside of a single node. 

Global Unicast Address Format

The general format of global unicast address is shown in Figure 13-2.

Figure 13-2 Global Unicast Address Format 

Global Unicast Address Format

Link-Local IPv6 Unicast Address Format

The format of link-local addresses that are for use on a single link is given in Figure 13-3.

Figure 13-3 Link-Local Address Format

14-3

 Link-local addresses are supposed to be used for addressing of a single link for purposes such as automatic address configuration and neighbor discovery. Routers do not forward packets with link-local source or destination addresses to other links, thus respecting and enforcing link-local scope of these addresses.

Site-local addresses were originally designed to be used for addressing inside a site without the need for a global routing prefix. They are now deprecated.