In this lesson, I’ll give you an introduction to IPv6 and you will learn the differences between IPv4 and IPv6. Let’s start with a nice picture:
This picture is old already but it shows you the reason why we need IPv6…we are running out of IPv4 addresses!
So what happened to IPv4? What went wrong? We have 32 bits which gives us 4,294,467,295 IP addresses. Remember our Class A, B, and C ranges? When the Internet started, you would get a Class A, B, or C network. Class C gives you a block of 256 IP addresses, class B is 65.535 IP addresses, and a class A even 16,777,216 IP addresses. Large companies like Apple, Microsoft, IBM, and such got one or more Class A networks. Did they really need > 16 million IP addresses? Many IP addresses were just wasted.
We started using VLSM (Variable Length Subnet Mask), so we could use any subnet mask we like and create smaller subnets, we longer had to use the class A, B, or C networks. We also started using NAT and PAT so we can have many private IP addresses behind a single public IP address.
Nevertheless, the Internet has grown in a way nobody expected 20 years ago. Despite all our cool tricks like VLSM and NAT/PAT we really need more IP addresses, and that’s why we need IPv6.
What happened to IPv5? Good question…IP version 5 was used for an experimental project called “Internet Stream Protocol”. It’s defined in an RFC if you are interested.
IPv6 has 128-bit addresses and has a much larger address space than 32-bit IPv4 which offered us a bit more than 4 billion addresses. Keep in mind every additional bit doubles the number of IP addresses…so we go from 4 billion to 8 billion, 16,32,64, etc. Keep doubling until you reach 128 bits. With 128 bits, this is the largest value you can create:
Can we even pronounce this? Let’s try this:
- 340- undecillion
- 282- decillion
- 366- nonillion
- 920- octillion
- 938- septillion
- 463- sextillion
- 463- quintillion
- 374- quadrillion
- 607- trillion
- 431- billion
- 768- million
- 211- thousand
That’s mind-boggling… This gives us enough IP addresses for networks on earth, the moon, mars, and the rest of the universe. To put this in perspective, let’s put the entire IPv6 and IPv4 address space next to each other:
- IPv6: 340282366920938463463374607431768211456
- IPv4: 4294467295
Some other nice numbers: the entire IPv6 address space is 4294467295 times the size of the complete IPv4 address space. Or, if you like percentages, the entire IPv4 address space is only 0.000000000000000000000000001.26% of the entire IPv6 address space.
The main reason to start using IPv6 is that we need more addresses, but it also offers some new features:
- No Broadcast traffic: that’s right, we don’t use broadcasts anymore. We use multicast instead. This means some protocols like ARP are replaced with other solutions.
- Stateless Autoconfiguration: this is like a “mini DHCP server.” Routers running IPv6 are able to advertise the IPv6 prefix and gateway address to hosts so that they can automatically configure themselves and get access outside of their own network.
- Address Renumbering: renumbering static IPv4 addresses on your network is a pain. If you use stateless autoconfiguration for IPv6, you can easily swap the current prefix with another one.
- Mobility: IPv6 has built-in support for mobile devices. Hosts will be able to move from one network to another and keep their current IPv6 address.
- No NAT / PAT: we have so many IPv6 addresses that we don’t need NAT or PAT anymore. Every device in your network can have a public IPv6 address.
- IPsec: IPv6 has native support for IPsec, you don’t have to use it, but it’s built-in the protocol.
- Improved header: the IPv6 header is simpler and doesn’t require checksums. It also has a flow label that is used to quickly see whether certain packets belong to the same flow.
- Migration Tools: IPv4 and IPv6 are incompatible, so we need migration tools. We can use multiple tunneling techniques to transport IPv6 over IPv4 networks (or the other way around). Running IPv4 and IPv6 simultaneously is called “dual stack.”
What does an IPv6 address look like? We use a different format than IPv4:
X:X:X:X:X:X:X:X where X is a 16-bit hexadecimal field
We don’t use decimal numbers like for IPv4. We are using hexadecimal now. Here’s an example of an actual IPv6 address:
Now imagine you have to call one of your users or colleagues and ask him or her to ping this IPv6 address when you are trying to troubleshoot something…sounds like fun, right?
To make things a bit more convenient, it’s possible to shorten IPv6 addresses, which I discuss in this lesson. Running a local DNS server is also a good idea. Remembering hostnames is easier than these IPv6 addresses.
That’s all I have for now. I hope this introduction has given you an idea of why we need IPv6, what the address looks like, and some of the new features. The next lessons cover everything, including addressing, routing protocols, tunneling, and more.
That’s all for now! You should now have an idea of how IPv6 works. In future lessons, I will show you how to configure routing for IPv6 and some other things. If you have any questions, just leave a comment.
Probably little mistake on last picture.
On picture above is mac adress starting with CC0A and on the last picture is IPv6 address with CE0A.
Anyway, thanks for great lesson.
In reality the router does one more thing when creating the IPv6 address using EUI-64. The MAC address is chopped in two pieces but it will also “flip” the 7th bit. When it’s a 0 it will make it a 1 and the other way around. Here’s an example for the MAC address I used in this tutorial:
Each hexadecimal character represents 4 binary bits:
C = 1100
C = 1100
0 = 0000
A = 1010
Let’s put “CC” in binary behind each other:
EUI-64 will flip the 7th bit of this address so it will become:
Let’s calculate that back to hexadecim... Continue reading in our forum
If you want an example for EUI-64, I created a lesson that explains it in detail:
Hello, Nice job at the introduction, I never new what anything past a trillion was called =). I’m sure i’ll have questions as I read through the following IPv6 lessons though.
Thanks Chris! It’s difficult to imagine how large the IPv6 address space is
If you have any questions, just let me know…