Introduction to IPv6

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:

IPv4 address space consumption

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, a 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 addresses.

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 a RFC if you are interested:

http://www.faqs.org/rfcs/rfc1819.html

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 bit. With 128 bits this is the largest value you can create:

  • 340,282,366,920,938,463,463,374,607,431,768,211,456

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
  • 456

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 then 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 much 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 if certain packets belong to the same flow or not.
  • Migration Tools: IPv4 and IPv6 are not compatible so we need migration tools. There are multiple tunneling techniques that we can use 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:

2041:1234:140F:1122:AB91:564F:875B:131B

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.

If you are unsure how hexadecimal numbers work, take a look at my hexadecimal decimal binary lesson.

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. In the next lessons we will 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.

Forum Replies

  1. 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.

  2. Hi Towdie,

    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:

    CC0A.180E.0000

    Each hexadecimal character represents 4 binary bits:

    C = 1100
    C = 1100
    0 = 0000
    A = 1010

    Let’s put “CC” in binary behind each other:

    11001100

    EUI-64 will flip the 7th bit of this address so it will become:

    11001110

    Let’s calculate that back to hexadecim

    ... Continue reading in our forum

  3. Hi Jose,

    I’ve heard this one before but it doesn’t make much sense to me. This is from RFC 4291:

    2.5.3.  The Loopback Address
    
       The unicast address 0:0:0:0:0:0:0:1 is called the loopback address.
       It may be used by a node to send an IPv6 packet to itself.  It must
       not be assigned to any physical interface.  It is treated as having
       Link-Local scope, and may be thought of as the Link-Local unicast
       address of a virtual interface (typically called the "loopback
       interface") to an imaginary link that goes nowhere.
    
       The loopback address mu
    ... Continue reading in our forum

  4. Rene, just to be clear, they aren’t the same right?
    2001:41f0:4060:10::/64 and 2001:41f0:4060:A::/64 ?

6 more replies! Ask a question or join the discussion by visiting our Community Forum