IPv4 and IPv6 are the addressing schemes used to identify the sender and receiver machine(computer or other device) over the internet. Each host requires an IP address to communicate over the net.
IPv4 is the current version of providing addresses (though IPv6 is there for quite some time now). But because of the growth of internet, there is a need to provide more IP addresses then available in IPv4. The total addresses available in IPv4 are exhausting fast (The last top level (/8) block of free IPv4 addresses was assigned in February 2011 by IANA). Hence comes the newer version, IPv6.
How many unique addresses can be given in IPv6 ?
IPv6 is defined in this internet standard document, published in 1998. Both IPv4 & IPv6 are IP level protocols in TCP/IP protocol stack used for packet-switched internetworking.
IPv4 allows 32bit IP address written in the form of a.b.c.d (for example, 127.127.127.127), where a,b,c,d are one byte (8 bits) each. Hence a total of 4 bytes = 32 bits.
With 32 bits, we can have 232 unique addresses.
Hence, total number of addresses possible in IPv4 = 232 = 4,294,967,296
In IPv6, an IP address is 128 bits long, hence the total number of unique addresses possible in IPv6 = 2128 = 3.4×1038
This, scheme allows many more devices to be allocated IP addresses. For example, now, even a Fridge or an AC in your home can be allocated unique IP address and hence can act as a destination (or source) to receive (or transmit) signals over the internet (and hence can be operated from remote locations by passing control data over the internet.
IPv6 is not just about long address, it also provides many extra features not available in IPv4. But, For the Internet to make use of the advantages of IPv6 over IPv4, most hosts on the Internet, as well as the networks connecting them, will need to deploy this protocol. However, IPv6 deployment is difficult.
While deployment of IPv6 is accelerating, especially in the Asia-Pacific region and some European countries, areas such as the Americas and Africa are comparatively lagging in deployment of IPv6. IPv6 does not implement interoperability features with IPv4, and creates essentially a parallel, independent network. However you can use tunneling, which is nothing but wrapping/un-wrapping of IPv4 data in IPv6 packet format.