Internet Protocol (IP) version 6 is the basically successor of IPv4. It was developed to deal with the issue arising due to exhaustion of IP’s of IPv4. IPv6 addresses are 128 bits in length so it has a very large number of address space which is basically 2128.
IPv6 introduces a new types of communication named “Anycast” with IPv4 has three types of communication already named unicast, multicast and broadcast. Let’s have a look to each.
Unicast – A single source sent a packet to single destination.
Multicast – A single source can sent a packet to many destination.
Anycast - A single source will send the packet to closest destination of multiple possible destination.
You need to note down that Broadcast has been removed from IPv6.
It is written in hexadecimal with help of (:) where each 8 bits are separated by (:). Below is an example of an IP address of IPv6.
2002:0bd8:4ae5:4ce5:03ca:84b5:b378:9177
Below is an example of IPv6 address:
2001::48b5:0:0:9177
There are some rules to write a hexadecimal address. The first one is leading zeroes can be ignored or discarded.
Take an example below:
3001:0ab8:0000:04ca:34b5:0000:0001:8177
If you will see there are leading zeroes at 2nd, 3rd, 4th, 6th and 7th group and we can ignore them to rewrite the IP address as below:
3001:ab8:0:4ca:34b5:0:1:8177
Now go ahead with another rule which says any group of two or more zeroes can be replaced with (::) but it can be done once. Below is an example how we can do it.
2001:0000:0000:0000:45b5:0000:0000:8177
So first we will apply first rule of leading zeroes. So it can be rewritten as:
2001:0:0:0:45b5:0:0:8177
Now we will remove zeroes with (::).
2001::45b5:0:0:8177
Or
2001:0:0:0:45b5::8177
Why we can’t replace both one (2001::45b5::8177)? It is because we will not able to find out where we need to put zeroes.
Different Types of IPv6 address
Unspecified
Loopback
Link Local
Unique Local
Global Unicast
Multicast
Unspecified Address
This is basically used when a computer boots up and has no address assigned. This is a special type of address with all binary bits set 0. You can write it as ::/128 means all zeroes. 0.0.0.0 is in IPv4 which is equivalent to it in IPv6. This IP is used by OS in absence of a valid IP address and is used before it gets an IP address via DHCP. We can’t assign the IP address manually to a device and routers can’t forward the packets.
Loopback Address
It basically identifies the logical address which is not available physically. If you sent a packets to it then it will revert back to same interface that’s why we called it loopback address. We also called it at localhost address.
It is denoted by ::1/128. In IPv4 is 127.0.0.1. The entire network of 127.0.0.0/8 is reserved for loopback address.
Link local address
IPv6 link local is special type of unicast address which is auto configured from the FE80::/10 range. It is similar to 169.254.0.0/16 range. If any device is not configured with any static IP or IP from DHCP. Then this IP is configured automatically. It can be used for communicating over the LAN but it can’t route packages to other LANs.
Unique Local Address
This is basically used for communicating inside the LAN similar to IPv4 ranges which are 10.0.0.0/8, 172.16.0.0/16, 192.168.0.0/24. It will not create any issues if leaked outside of the organization. These are the private IP addresses so can’t be routed over internet. And its range in IPv6 is FC00::/7.
Global Unicast Address
These are basically Public address which can be routed over internet like in IPv4. The range of IP address is from 2000::/3 to 3FFF::/3.
Multicast Address
Multicast address is when a source sends packets to multiple destinations simultaneously. You can consider it as one-to -many. Address is FF00::/8.
How an IPv6 looks in Subnetting?
The First 48 bits represents the Network Address. It can be assigned by the ISP.
The next 16 bits are known as Subnet bits. So total number of possible subnet will be 216.
The last 64 bits represents the host bit. So total number of possible hosts will be 264.