Sunday, 6 August 2017

The IPv6 Unicast Addresses

We already learn about IPv4 unicast addresses. A unicast address is the most common form of an IP address and is assigned to one network interface.  An IPv6 unicast address uniquely identifies an interface on an IPv6-enabled device. This address used for one to one communication in a network. A packet sent to a unicast address is received by the interface that is assigned that address. Just like 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 unicast IPv6 address 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 whole Internet. Global unicast addresses can be configured statically or assigned dynamically.


Currently, Internet Assigned Numbers Authority (IANA) has assigned only 2000::/3 addresses to the global pool. Only 2001::/16 are 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 address 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 is 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 indicate the interface ID, which is the part of the IPv6 address that must be unique within a subnet.


IPv6 Link-local Addresses


Link-local addresses are used to communicate with other devices on the same local link. Link local address starting with FE (hexadecimal). With IPv6, the term link refers to a subnet. Link-local addresses cannot be routed to the public network and limited to the local network. The link-local addresses are auto configured similarly to IPv4 link-local (169.254.0.0/16) addresses. In IPv4 network, link-local addresses are assign because of some problem on the network but in IPv6 network, link-local addresses are configurable and can be used for communication within the local network.The address must be unique within the local link.These addresses never are routed over a public network.


IPv6 Link Local addresses are identified among IPv6 addresses by reserving the left most 64 bits as FE80 (hexadecimal). Binary of FE80 is 1111 1110 1000 0000, So first 16 bits are reserved for the prefix. The network of link-local is FE80 : : /64. IPv6 Link Local addresses are used by 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 were done!


IPv6 Unique Local Addresses


The IPv6 unique local addresses have some similarities to IPv4 private addresses, but there are major differences. The Unique local addresses are used for local addressing 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 been 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 that are mapped one-to-one to 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. Unique local addresses can be used 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".  Unspecified address is used by an Operating System before an IPv6 address is configured on it. 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.

No comments:

Post a Comment