IT Certification and Training Blog

Roll with the Changes: IPv6 Demystified Part I

Jun 11, 2014 8:25:00 AM / by Kelson Lawrence

By James Hanback

There might come a time in your career when the fundamental networking tasks you are now able to perform in your sleep, like subnetting an IP version 4 (IPv4) network, fall into obsolescence. Sure, you were warned. We all were. Although IPv4 addressing is far too ubiquitous to go anywhere anytime soon, and the deployment of IP version 6 (IPv6) has been slow, to say the least, more widespread deployment of IPv6 is coming. Therefore, the ability to understand and implement IPv6 addressing has become a topic contemporaneous on network certification exams, such as the Cisco Certified Network Associate (CCNA) exam, with the ability to understand and implement IPv4 addressing.

Additionally, awareness and deployment of IPv6 is growing every year, so who is to say that you won’t walk into work one day to find yourself confronted with the monumental task of migrating your company’s network away from IPv4? Yes, you read that right. There might come a day when the octet.octet.octet.octet finger memory you’ve built up over your many years as a network admin will no longer serve you, and your younger peers will automatically associate a /32 subnet not with a single-host IPv4 subnet but with the approximately 4.3 billion subnets of 264 addresses each that are created by using an IPv6 /32 prefix.

Crawled under your desk yet? No? Good. Because you still have time to learn. And now, before you’ve been tasked with the chore, is as good a time as any.

The Inevitable Contrasting of IPv6 to IPv4

Almost every in-depth guide to IPv6 starts out with a contrast of IPv6 to IPv4. Most likely, this is because you are already familiar with IPv4 from previous study or experience. It’s important to understand that the differences between the two standards are significant enough that you could, if you are not careful, allow your supreme knowledge of IPv4 addressing to trip up your IPv6 learning processes (recall the slash notation example from a couple of paragraphs up). A contrast of IPv6 to IPv4 is mainly for putting the “fresh start” idea in your head so you don’t make the mistake of assuming that everything works in IPv6 the same way it does in IPv4. So, here’s a convenient contrast table that contains some of the key differences between IPv6 and IPv4:

 

IPv4

IPv6

32-bit address space

128-bit address space

232 unique addresses

2128 unique addresses

Uses dotted-decimal notation. Example:

198.51.100.5

Uses hexadecimal notation. Example:

2001:1234:5678:90AB:CDEF:0000:0000:0001

The subnet range is represented by using dotted-decimal subnet masks or slash notation prefixes

The subnet range is represented only by using slash notation prefixes

Supports broadcast addresses

Supports anycast addresses

Uses RFC 1918 for private networks

Uses RFC 4193 for private networks

Can support but does not require the automatic configuration of link-local addresses

Requires that every IPv6 network device automatically configure a link-local address

Can be configured to use IP Security (IPSec)

Natively supports IPSec

Was first standardized in 1982

Was first standardized in 1999

Runs most of the Internet

Most of the Internet runs away from it

 

Simmer down, now. That last one was just a joke. Although, based on the table above, you can probably understand why some network administrators who have been immersed in the comfortable familiarity of IPv4 for all their careers would balk at migrating to IPv6, especially when you consider the availability of IPv4 longevity enhancing standards, such as RFC 1918, and technologies, such as Network Address Translation (NAT) and Port Address Translation (PAT).

The conceptually simple act of scaling a 32-bit address space up to a 128-bit address space is obviously not the sole difference between the two standards. Therefore, you cannot simply use math to convert your familiar IPv4 dotted-decimal notation network to a hexadecimal value and run with it. There’s so much more you need to know first, such as how to properly notate an IPv6 address.

A Hex on the Composition of IPv6 Addresses

You already know that IPv4 addresses are most often represented in dotted-decimal notation, which is to say a quartet of decimal values separated by periods. Each decimal value represents an eight-bit binary value, or octet. A quartet of octets is thus equivalent to the full 32-bit IPv4 address. Converting each octet in the quartet to its decimal value is a convenient way to represent all 32 bits of an IPv4 address in a human-readable way. However, that format does not scale well to IPv6 addresses.

IPv6 addresses are also notated as a series of smaller sets of characters. Each set of characters in an IPv6 address contains 16 bits rather than eight. Thus the best way to represent an individual set of 16 bits within an IPv6 address is with a base 16 number system, namely hexadecimal.

You remember hexadecimal, don’t you? You might have learned about it in high school—or even middle school—along with binary systems and octal systems when your math teachers suddenly decided to peel back the ground from your reality and drop you into that surreal well of blackness in which 10 no longer equals 10, but instead equals 2, or 8, or 16. Just in case you don’t recall how to convert decimal to binary to hexadecimal and back again, here’s another convenient table to aid you:

 

Decimal

Hexadecimal

Binary

0

0

0000

1

1

0001

2

2

0010

3

3

0011

4

4

0100

5

5

0101

6

6

0110

7

7

0111

8

8

1000

9

9

1001

10

A

1010

11

B

1011

12

C

1100

13

D

1101

14

E

1110

15

F

1111

 

Now that you are armed with the ability to convert numbers between systems, I can now safely inform you that an IPv6 address is typically represented by an octet of hexadecimal quartets separated by colons. For example, FF02:0000:0000:0000:0000:0000:0000:0001 is an IPv6 address in hexadecimal notation. Each character in a hexadecimal quartet, such as the F character in the FF02 quartet, represents four bits out of the 16 bits that make up a set. Therefore, the first hexadecimal character of F in the FF02 quartet represents a binary value of 1111. The second character, another hexadecimal F, represents a second binary value of 1111. The third character, a hexadecimal 0, represents a binary value of 0000. The fourth character, a hexadecimal 2, represents a binary value of 0010. Thus, the FF02 quartet of this IPv6 address is equivalent to a 16-bit value of 1111111100000010. Using the system conversion table above, you can break the FF02 quartet down visually, as shown in this third convenient table:

 

Hexadecimal Quartet Character

Binary Equivalent

F

1111

F

1111

0

0000

2

0010

 

The table above thus enables you to see each component of the 16-bit set of 1111111100000010. If you were to similarly convert each quartet in the IPv6 address of FF02:0000:0000:0000:0000:0000:0000:0001 into its binary equivalent, the full IPv6 address would break down as shown in the following fourth super-convenient table:

 

Hexadecimal Quartet

Binary Equivalent

FF02

1111111100000010

0000

0000000000000000

0000

0000000000000000

0000

0000000000000000

0000

0000000000000000

0000

0000000000000000

0000

0000000000000000

0001

0000000000000001

 

Based on the information above, you can see why it’s much easier to represent a 128-bit address in hexadecimal format. Typing out 32 hexadecimal characters is easier than typing out and keeping track of 128 binary characters. What if all those middle bits hadn’t been zeros?! Still, 32 hexadecimal characters (not counting the colon delimiters) is more than twice the maximum number of decimal characters in an IPv4 address. Also, arranging those characters in quartets separated by colons isn’t exactly cake after years and years of dotted-decimal notation finger memory. Try it. Training your fingers to strike slightly up and to the right of the period key on a QWERTY keyboard isn’t as easy as it sounds when your brain knows full well that your intention is to assign a Layer 3 address to a network interface. Fortunately, IPv6 has some built-in help to ease the burden.

The Significant Relief of IPv6 Addressing Shorthand

You can drastically shorten the hexadecimal notation that represents an IPv6 address by simply eliminating the leading zeros from each quartet. For example, the 32-character IPv6 address of FF02:0000:0000:0000:0000:0000:0000:0001 can also be represented by the 11-character IPv6 address of FF02:0:0:0:0:0:0:1; they are one and the same. Note, however, that you should only remove leading zeros, never zeros that trail a nonzero character or zeros within an octet. The IPv6 address of FF2:0:0:0:0:0:0:1 is equivalent to the IPv6 address of 0FF2:0000:0000:0000:0000:0000:0000:0001, which is completely different from the IPv6 address of FF02:0:0:0:0:0:0:1, which is equivalent to the IPv6 address of FF02:0000:0000:0000:0000:0000:0000:0001.

Want another trick? You don’t have to be satisfied with whittling the IPv6 address of FF02:0000:0000:0000:0000:0000:0000:0001 down to only the 11-character notation of FF02:0:0:0:0:0:0:1. You can take the abbreviation a step further by eliminating an entire series of zeros, even if those zeros span several quartets. That little piece of magic is brought to you by the double colon (::). For example, instead of removing only leading zeros from each quartet in the IPv6 address of FF02:0000:0000:0000:0000:0000:0000:0001, you can use the double colon to replace the entire series of zeros from the second quartet all the way through the leading zeros in the eighth quartet, like so: FF02::1. Now you have an IPv6 address that is only five characters, which is shorter than most IPv4 addresses!

There are a couple of caveats when using the double colon. First, it can be used only once within a given IPv6 address. Second, it can be used to replace only a series of consecutive zeros. For example, you can’t represent the IPv6 address of FF02:0:0:1:0:0:0:1 with the non-IPv6 address of FF02::1::1. More than one instance of the double colon in an IPv6 address creates an invalid address. Additionally, you cannot represent the IPv6 address of FF02:0:0:1:0:0:0:1 with the IPv6 address of FF02::1:1, which instead is equivalent to an IPv6 address of FF02:0:0:0:0:0:1:1. Therefore, if you want to use the double colon to compress an IPv6 address to its maximum, you should ensure that you use it to replace only the longest set of consecutive zeros in the address.

The Sweeping Conclusion of Part I

Now you know what an IPv6 address is, how it is different from an IPv4 address, and how to use hexadecimal notation to represent it. However, we’ve only scratched the surface of the knowledge you’ll need if you want to actually implement IPv6. For example, did you know that you wouldn’t assign the IPv6 address we’ve used as an example throughout this post to an individual IPv6 client’s network interface? I assure you that our example is actually an IPv6 address. It’s just not the type of IPv6 address that represents a destination to a single host.

In the second part of this series, we’ll explore the different types of IPv6 addresses you’ll need to know about in order to correctly configure an IPv6 network.


Topics: IPv6, compare IPv4 and IPv6, shorthand, IPv6 addressing, IPv6 addressing shorthand, composition, compare IPv4 to IPv6

Kelson Lawrence

Written by Kelson Lawrence

Subscribe to Email Updates

Lists by Topic

see all

Posts by Topic

see all

Recent Posts