We have already learned about IPv4 address classes, classless and classful addressing scheme special purpose IP addresses. We have also learnt about the unicasting, multicasting and broadcasting in IPv4 address. Similarly, IPv6 addresses also contain different types for example unicast address, multicast address and anycast addresses. In this article, I am going to give you a brief look at the different type of IPv6 addresses.
A unicast address is the most common type of an IPv6 address that we can assign only to one network interface. An IPv6 unicast address individually identifies an interface on an IPv6-enabled device. This unicast address also used for one to one communication between different devices in the network. A packet sent to a unicast address received the interface which has assigned that type of address. The source IPv6 address must be a unicast address however 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 address types:-
IPv6 Global Unicast Addresses
A global unicast address is just like to the public IPv4 address. The addresses should be unique worldwide and can only assign once. It is the routable address across the Internet like public IPv4 address. We can configure global unicast addresses dynamically or statically. Currently, the Internet Assigned Numbers Authority (IANA) has assigned only 2000::/3 addresses to the global pool. The only assigned IPv6 pool is 2001::/16 to various Internet address registries. A global IPv6 address consists of two parts:
Subnet ID – The subnet ID is 64 bits long. It contains the site prefix which can be assigned from a Regional Internet Registry and the subnet ID.
Interface ID – Interface ID is also 64 bits long. It is typically composed of a part of the MAC address of the interface. The figure below illustrates the different parts of the global IPv6 unicast address.
The first three bits are set to 001 because the prefix of a global IPv6 address is 2000::/3 So 0010000000000000 is 2000 in hexadecimal. The next 45 bits are the global routing prefix. This is the part that has assigned to different organizations. The next 16 bits are for the subnet ID, which a network administrator can use for hierarchical addressing. 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
The link-local addresses are used to communicate with other devices in the same network. The Link-local address starts with hexadecimal character “FE”. In the IPv6 network, 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 (169.254.0.0/16) addresses.
In IPv4 network, link-local address assigns 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 link-local address must be unique within the local network. We cannot router the link-local address to internet or public network.
We can identify the IPv6 Link-Local address with the leftmost 64 bits as hexadecimal digits FE80. 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. The figure below illustrates the link-local address bits distribution.
The link-local IPv6 is derived from the NIC’s MAC address. A MAC address is 48 bits address, an IPv6 address is 128 bits. The steps for converting MAC address to an IPv6 is the following: step by step:
- Get and write down the MAC address of the PC or device for example BC:85:56:60:ED:75
- Insert ff:life in the middle: BC:85:56:FF:FE:60:ED:75
- Reorder to IPv6 notation BC85:56FF:FE60:ED75
- Now it’s 4 hextet, convert the first two digits of hexadecimal to binary: BC> 10111100
- Flip the 7th bit: 10111100->10111110
- convert it back to hexadecimal: 10111110 ->BE
- Change the first octet with newly calculated one: BE85:56FF:FE60: ED75
- Insert the link-local prefix at the beginning : FE80::BE85:56FF:FE60:ED75
- You have done!
IPv6 Unique Local Addresses
The IPv6 unique local addresses have limited similarities to private addresses IPv4 addresses, with some major differences. It is not allocated by an address registry and also not routed outside to their local domain and network. Unique local addresses are used inside the 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 unique local address range is from 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 and 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. The resultant format is like fdxx:xxxx:xxxx::
With the IPv4 addressing scheme, we required NAT (Network Address Translation) and also PAT (Port Address Translation). This is done for the reason that of the limited availability of IPv4 addresses 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 purposeful 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
Just like in IPv4, the loopback addresses 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 is 0000:0000:0000:0000:0000:0000:0000:0001/128. The simplified and short form of IPv6 loopback address is::1/128.
IPv6 Unspecified Addresses
IPv6 Unspecified address is the 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.
Embedded IPv4 Address
The IPv6 address for hosts and routers to tunnel IPv6 packets dynamically under IPv4 routing infrastructure. IPv6 nodes assigned special IPv6 unicast addresses that carry an IPv4 address in the low-order 32 bits. This type of address is called an Embedded IPv4 Address or IPv4-compatible IPv6 address. For example, if the route is 22.214.171.124, So the embedded IPv4 address may be like::126.96.36.199.
IPv6 multicast address working similar to IPv4 multicast addresses. The IPv6 enabled devices can join and listen for multicast traffic on an IPv6 multicast address. The multicast address is composed of an 8-bit address, 4-bit flag, 4-bit scope, and 112-bit group ID fields. An IPv6 multicast address can identify multiple network interfaces. In IPv6 multicasting, IPv6 datagram packets addressed to an IPv6 multicast address are delivered to all interfaces that are identified by the address. The IPv6 multicast address as:-
|Leading 0s omitted||ff00:0:0:0:0:0:0:0/8|
An IPv6 anycast address is any IPv6 unicast address. We can assign this address to multiple network devices. Like a multicast address, anycast address identifies multiple interfaces, however, while multicast packets accepted by multiple machines, anycast packets delivered to the nearest device having that address. The nearest is determined by the routing protocol. An anycast address must be assigned to a router, not to a host and cannot be used as a source address.
Note – Broadcast addresses are no longer exist in IPv6 addressing scheme. However, there is an IPv6 all-nodes multicast address that essentially gives the same result.