Understanding IPv6

IPv6 uses 128 bits as opposed to 32 bits of an IPv4 address and this results in a new address space of 2pow128 that is, over 4 billion of available addresses. IPv6 allows for multiple levels of subnetting. The enormous address space created by the 128 bit format give us the option of allocating more than one IPv6 address to a host, with each address serving a specific purpose. In IPv6 we find addresses that are equivalent to IPv4 types and others that are unique to IPv6.

IPv6 Syntax

The IPv6 128-bit address is divided into 16-bit chunks displayed as a 4-digit hexadecimal number. The 16-bit boundaries are separated by colons and this representation is called colon-hexadecimal.
The format of a Global unicast IPv6 addresses which is equivalent to an IPv4 public unicast address is shown in the following example:

Full Address- abcd:0067:abab:0000:0000:0101:0067:8a56
Can have leading zeros suppressed- abcd:67:abab:0:0:101:67:8a56
Can have adjacent zero blocks suppressed- abcd:67:abab::101:67:8a56 but you cannot have :: twice in the same address.

This notation is heavily used with Multicast type addresses where they usually contain long sequences of zeros. For example, the IPv6 multicast address ff05:0:0:0:0:0:0:5 can be compressed to ff05::2
IPv6 uses the same slash notation of IPv4 for identifying the host and network parts within an address. For example, 5623::cd:/64 is the subnet on which the address 5623::cd:54cd:908:1234:7b21 is located.

IPv6 Address Types

Unicast address identifies a single interface. Packets addressed to a unicast address are delivered to a single interface. See below the unicast addresses that are supported by IPv6.

Multicast address identifies multiple interfaces. Packets addresses to a multicast address are delivered to all interfaces that are identified by the address. They start with the prefix ff.

Anycast address identifies multiple interfaces. Packets addressed to an anycast address are delivered to the nearest interface identified by the address in terms of routing distance or number of hops.

Within the unicast address type we find support for Global, Link-local, Site-local and Special types of unicast addresses.

Global unicast addresses are the equivalent of IPv4 public addresses and hence, they are unique across the entire IPv6 Internet. Global unicast addresses always start with a 2 as a Format Prefix. The final 64 bits of the address represent the host. The 64 bit address is either derived from the 48-bit hardware media access control (MAC) address of the network adapter card or is assigned directly to that network adapter card. Therefore, the interface identity on the network is provided by the network adapter hardware.

Link-local IPv6 addresses are equivalent to IPv4 APIPA addresses. These are identified by a Format Prefix of fe8. A link-local address is always automatically configured even if no other unicast address is allocated. The scope of a link-local address is the local link. The region over which an IP address is unique is called the scope of the address.

Site-local IPv6 addresses are equivalent to IPv4 private addresses. Local networks that do not connect to the IPv6 Internet can use site-local addresses without conflicting with global unicast addresses. Site-local addresses are identified by a Format Prefix of fec0. Site-local addresses are typically used on the subnet of a private network to implement IPv6 connectivity over the network but you can also use global addresses to route between internal subnets and to the Internet.

Special IPv6 addresses are the unspecified and the loopback addresses. The unspecified address 0:0:0:0:0:0:0:0 or :: indicates the absence of an address as we find in IPv4. The loopback address 0:0:0:0:0:0:0:1 or ::1 identifies a loopback interface as we find in IPv4.