Learn IPv6 basics to be prepared for tomorrow

laptop unplugged

A recent news on the Internet says ARIN (American Registry for Internet Numbers) is on the verge of exhausting IPv4 blocks. You’ve probably heard a thousand times that IPv4 addresses are running out, but you’ve probably thought “Hey, it will be a long time from now, let’s wait” and procrastinated. That’s not good, learn IPv6 before it’s too late!

Note: In the whole article I’ll assume you have a strong knowledge of IPv4.

Good old IPv4

Before we dive in all the theoretical stuff of IPv6 let’s talk a bit about its predecessor: IPv4. The Internet Protocol was invented to achieve Internetworking capabilities: enable two computers to speak is called networking, enabling two networks to speak is Internetworking. And yes, that’s why today the most known net is called Internet. Internet Protocol was thought in an era where computers weren’t that popular and using 32bit to represent an address seemed enough for growth. However we all know how it went and where we are today. So before it was too late NAT/CIDR were created to provide a buffer for the exponential growth that was happening. The result is that today almost the whole Internet uses NAT/PAT. However everyone knew it was only a buffer, and it wouldn’t have been enough for the long term. That’s when IPv6 was conceived.

IPv4 vs IPv6

Now that you know why and what let’s take a look at the most important differences.

  • IPv6 uses 128bit whereas IPv4 uses 32bit.
  • IPv6 uses : instead of . for block division.
  • IPv6 uses hexadecimal notation whereas IPv4 uses decimal notation.
  • IPv6  addresses can be abbreviated.
  • IPv6 subnet mask is called prefix and highly resembles CIDR notation.
  • IPv6 uses NDP (Neighbor Discovery Protocol) instead of ARP.
  • IPv4 private addresses are called Unique Local in IPv6.
  • Each machine can automatically generate its IPv6.

There are however many more points, and these are the most important, feel free to expand your knowledge after reading this introductory article.

Dissecting an IPv6 address

2001:0db8:CCCC:DDDD:EEEE:0000:0000:FFFF/64

So, this is a valid IPv6 address. As you can see it is expressed in hexadecimal notation. Each block is divided by a colon :. The /64 is the prefix (much like CIDR). Getting the network address from the address is the same as IPv4. The first 64 (in this case) followed by 0 are the network address: 2001:0db8:CCCC:DDDD:0000:0000:0000:0000 . Now, you notice how bad to the eye writing the whole address can be, that’s why abbreviation was invented. There are two rules to follow in order to abbreviate and create a valid (non-ambiguous).

  1. Remove any leading zero in each block. If there are four zeros, leave one zero in their place.
  2. Replace one or more contiguous block of zeros with ::. This can be done once only to avoid ambiguity.

Let’s apply this to the first address: after the first step the address becomes AAAA:BB:CCCC:DDDD:EEEE:0:0:FFFF. After the second step the address will become: AAAA:BB:CCCC:DDDD:EEEE::FFFF. This might not seem too useful, but let’s try another address: FD00:0000:0000:0000:0000:0000:0000:0000 becomes only FD00::.

Reserved addresses

As in IPv4, IPv6 has a set of reserved addresses, they aren’t however as many as IPv4. As a matter of fact only three important sets of addresses are reserved:

  • Addresses starting with FD are ULA (Unique Local addresses): private.
  • Addresses starting with FE80 are link-local addresses.
  • Addresses starting with FF are Mulitcast.

These are the most important blocks reserved, there is also a number of reserved addresses:

  • ::/128 the unspecified address.
  • ::/0 default route.
  • ::1/128 loopback.

These two lists aren’t complete, and for more information I suggest you to look at Wikipedia’s page.

And that’s practically everything you need to know in order to understand more advanced topics of IPv6.

Image courtesy of photosteve101.

Image courtesy of mark | marksei

The following two tabs change content below.
The IT guy with a little boredom look in his eyes, fond of computers since forever he now works as a freelancer in the IT and shares his experiences through this blog.

You may also like...