How do IPv4 and IPv6 compare?
Both IPv4 and IPv6 addresses are used to identify a server's location and possibly identify other computers within a network. Assigned IP addresses allow those computers to find and communicate with other computers across a network.
The main difference between the IPv4 and IPv6 addresses is the number of available IP assignments each protocol can allow for or use. IPv4 provides 232, or a combination of 4,294,967,296 IP addresses and IPv6 can have approximately 3.4×1038 addresses which are a little more than 7.9×1028 times as many as IPv4! (that's a lot of math!)
A Little Background Info
In general, the total number of IPv4 IP addresses available early on in the infancy of the internet was enough to more than meet their needs. As the internet grew, so did the need for additional IP addresses. The total number of available IP's has declined at a steady pace since 1995 as noted in the image below.
Due to the rapid expansion and growth of the internet, mobile devices, and other network hardware, IP's were utilized at a much faster rate.
(The "Free /8" reference in the top of the image indicates the CIDR or subnetmask range of the IP)
How Big Is An IP Address
IPv4 addresses are 32-bit numbers broken down into four chunks, called “octets” as each chunk is eight bits of the full IP address.
While there are many IPv4 addresses, there are simply not enough to go around for everyone. Not all IPv4 addresses are in use, as some are reserved by IANA. The problem is there cannot be any new IPv4 addresses issued due to their limited availability. Even with the ability to split /8 or /16 IPs's into millions of other IPs via Network Address Translation, we are still falling short. Luckily, IPv6 was developed to replace IPv4 to address the limitations of the IPv4 address pool.
IPv6 addresses are much, much larger using 128-bit numbers. They are written in eight sections, with each section being 16 bits long.
How Many IPs Are Available Then?
Currently, there are a little over four billion IPv4 addresses in use today:
(28)4 = 4,294,967,296 ≈ 4.29 x 109
However, with all the different computers across the world, that number is simply not enough for everything in use to have an IP assigned to it without some kind of sharing.
Because IPv6 addresses are so much larger, there are many more IPv6 addresses. There are so many IPv6 addresses available that each grain of sand, or each molecule in the universe, could have its very own IP address.
( 216)8 = 340,282,366,920,938,463,463,374,607,431,768,211,456 ≈ 3.40 x 1038 or 340 billion billion billion billion.
What Is an IP Composed Of?
In standard IPv4 notation, there are four sections separated by periods (dots). Each section has a value between 0 and 255. This is the way you will most likely see and reference these numbers.
If we were to write an IPv4 address in binary (base2), you would see each of the eight individual bits that make up the four separate sections of the address. In this case, each bit is "turned on"
As the 1's and 0's are changed in each bit, they will add up to a total value based on their value in the octet. To translate that into English; let's look at the number 172 in the first octet below. Each bit in the 10101100 octets is broken down like this:
- If the 1 is "turned on, this first bit equals 128 "The 1st number = 128
- If the 1 is "turned on, this second bit equals 64 "The 2nd number = 64
- If the 1 is "turned on, this third bit equals 32 "The 3rd number = 32
- If the 1 is "turned on, this fourth bit equals 16 "The 4th number = 16
- If the 1 is "turned on, this fifth bit equals 8 "The 5th number = 8
- If the 1 is "turned on, this sixth bit equals 4 "The 6th number = 4
- If the 1 is "turned on, this seventh bit equals 2 "The 7th number = 2
- If the 1 is "turned on, this eighth bit equals 1 "The 8th number = 1
- If any of the bits in the octet are 0 (or turned off"), nothing is added.
So, how do we arrive at 172? Simple! we add up the numbers in the first octet above that are "turned on";
In this case, in the number 10101100, we add:
the 1st bit is turned on - this bit = 128
the 2nd bit is 0 so nothing is added
the 3rd bit is turned on - this bit = 32
the 4th bit is 0 so nothing is added
the 5th bit is turned on - this bit = 8
the 6th bit is turned on - this bit = 4
the 7th and 8th bits are 0 so nothing is added.
128 + 32 + 8 + 4 = ?
You guessed it, 172.
The 16 in the 2nd octet above?
Guess what that "1" in the 4th bit location is worth? Yup, 16.
Each individual IP address is broken down into its own set of 4 octets or 32 bits and translated into the 1's and 0's that are transmitted across the net. Pretty cool huh?
What about IPv6 Addresses?
In contrast, the common way of writing an IPv6 addresses uses 128 bits with 8hextets of 16 bits each separated with a colon. Each section has a value between 0 and FFFF. To write a 16-bit number you have to use both 0-9, and also A-F. This is why IPv6 addresses also have letters in them.
This numbering is called hexadecimal or base16. To write the same number in decimal notation (the more familiar base10), you would have numbers between 0 and 65535 (anyone remember how many ports a server has?)
Looking at an IPv6 address in binary would look like the example below. You can see that each section has 16 bits, instead of the eight bits used by IPv4.
The above example is not the full address, however. In a full IPv6 address, there would be six more sections for a total of eight.
Do you like learning about this as much as I do? I love it!!!
Want to try running your own server for your business or company? Give Liquidweb a call today at 1.800.580.4985 and talk with one of our Support or Solutions Team members to find out how you can get started today!
If chatting on the phone isn't your style, email us at firstname.lastname@example.org or open a chat with us. We are standing by to talk to you to see how we can meet your needs.
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.