The IPv6 Unicast Addresses

We already learn about IPv4 unicast addresses. A unicast address is the most common form of an IP address. We can  assign unicast address to one network interface only.  An IPv6 unicast address uniquely identifies an interface on an IPv6-enabled device. This address also used for one to one communication in a network. A packet sent to a unicast address received the interface which has assigned that address. Similarly, to IPv4, a source IPv6 address must be a unicast address. The destination IPv6 address can be both a unicast or a multicast address.

IPv6 unicast have five different types: global unicast addresses (GUA), link-local addresses, site-local addresses, unique local IPv6 unicast addresses, and special addresses. The most common are global unicast and link-local unicast addresses. The figure below illustrates IPv6 Unicast addresses:-

Unicast addresses

IPv6 Global Unicast Addresses

A global unicast address is comparable to a public IPv4 address. These addresses are worldwide unique and routable across the Internet. We can configure global unicast addresses statically or also assigned dynamically. 

Currently, Internet Assigned Numbers Authority (IANA) has assigned only 2000::/3 addresses to the global pool. Only 2001::/16 has assigned to various Internet address registries.A global IPv6 address consists of two parts:

Subnet ID – 64 bits long. Contains the site prefix (obtained from a Regional Internet Registry) and the subnet ID (subnets within the site)
interface ID – 64 bits long. typically composed of a part of the MAC address of the interface. The figure below illustrates the parts of the global IPv6 address.

Unicast addresses

The first three bits are set to 001. Therefore, the prefix of a global IPv6 address is 2000::/3 because 0010000000000000 is 2000 in hexadecimal.

The next 45 bits are the global routing prefix. This is the part that has assigned to organizations. The next 16 bits are for the subnet ID, which a network administrator can use for hierarchical addressing in their network. The last 64 bits show the interface ID; which is the part of the IPv6 address that must be unique within a subnet.

IPv6 Link-local Addresses

On the same local link, the link-local addresses used to communicate with other devices. Link local address starting with FE (hexadecimal). With IPv6, the term link refers to a subnet. We cannot route link-local address to the public network.

We can dynamically configure the link-local addresses similarly to IPv4 link-local ( addresses. In IPv4 network, link-local addresses assign because of some problem on the network but in IPv6 network, link-local addresses are configurable and we can use it for communication within the local network.The address must be unique within the local link.These addresses never are routed over a public network.

We can identified IPv6 Link Local addresses with the left most 64 bits as FE80 (hexadecimal). So, the first 16 bits reserved for the prefix, the binary of FE80 is 1111 1110 1000 0000.

The network of link-local is FE80 : : /64.  We can use IPv6 Link Local addresses on devices for communicating with other nodes on the same link. The scope of an IPv6 Link Local address is the local link. The figure below illustrates the link-local address bits distribution.

Unicast addresses

This link-local IPv6 is derived from the NIC’s mac address. A mac address is 48 bits, an IPv6 address is 128 bits. Here’s the conversion process step by step:

  • Get the mac address of the PC or device for example 45:70:fa:b5:f8:75
  • Insert ff:fe in the middle: 45:70:fa:ff:fe:b5:f8:75
  • Reorder to IPv6 notation 4570:faff:feb5:f875
  • Now it’s 4 hextet, convert the first octet from hexadecimal to binary: 45-> 01000101
  • Flip the 7th bit: 01010010 ->01010000 
  • convert octet back to hexadecimal: 01010000 ->50
  • Change first octet with newly calculated one: 5070:faff:feb5:f875
  • Insert the link-local prefix at the beginning : fe80::5074:f2ff:feb1:a87f
  • You have done!

IPv6 Unique Local Addresses

The IPv6 unique local addresses have some similarities to IPv4 private addresses, but there are major differences. The The usage of unique local addresses is inside of a site or between a limited number of sites. These addresses must not be routable in the global IPv6 and must not be translated to a global IPv6 address. The of unique local addresses are FC00::/7 to FDFF::/7. The address block is further divided into two /8 groups (fc00::/8 and fd00::/8).

The group fc00::/8 has not defined yet. The group fd00::/8 is defined for /48 prefixes, formed by setting the 40 least-significant bits of the prefix to a randomly generated bit string. This results in the format fdxx:xxxx:xxxx:: for a prefix in this range offers a suggestion for generating the random identifier to obtain a minimum-quality result if the user does not have access to a good source of random numbers.

With IPv4, NAT (Network Address Translation) uses a pool of public addresses mapped one-to-one with the private addresses, using the port number together. PAT (Port Address Translation) uses a single public address and maps multiple private addresses to it using different port numbers. This is done for the reason that of the limited availability of IPv4 address space. Many sites use the private nature of RFC 1918 addresses to secure or hide their network from possible security risks. However, this was never the deliberate use of these technologies. We can use unique local addresses for devices that will never need or have access from another network.

IPv6 Loopback Address

The loopback addresses both in IPv4 and IPv6 is an address which represents the same interface of a computer. Whenever we communicate to a loopback address the TCP/IP protocol stack will loop the packets back on the same interface, without even leaving the interface. The loopback addresses are typically for testing of network applications without having network configurations.

The IPv6 address reserved for loopback use is 0000:0000:0000:0000:0000:0000:0000:0001/128. The simplified and short form of this IP address is ::1/128.

IPv6 Unspecified Addresses

Unspecified address in IPv6 is the IPv6 address with all binary bits set to “0”.  

The operating systems used unspecified address before IPv6 address configuration. The IPv4 and IPv6 routers will not forward packets with the unspecified address. The unspecified IP address in IPv6 is 0000:0000:0000:0000:0000:0000:0000:0000/0. The simplified and short form of this address is ::/0.