Introduction to IPv6 for the CCNA

This lesson is an introduction to IPv6 for the CCNA. This is Part 1 of 3 of IPv6 study notes for the CCNA exam. The lesson begins with a review of the hexadecimal number system to help us understand the structure of an IPv6 address. We then discuss why we need IPv6. We then explore the basics of IPv6, specifically, the characteristics of an IPv6 address, how to abbreviate it, and how to expand an abbreviated IPv6 address. Finally, we learn how to do some basic IPv6 router configurations – how to enable IPv6 routing on routers, and how to configure an IPv6 address on the router interface.

In Part 2, Configuring IPv6 addresses using EUI-64, we go deeper in IPv6 configuration and learn how to use EUI to configure an IPv6 address on a router interface. In Part 3, IPv6 static route configuration, we learn how to configure IPv6 static routing: default, network, host, and floating static by applying the static routing concepts we learned in IPv4 to IPv6.

IPv6 is mentioned in two sections in the CCNA exam topics list. Section 1.0, Network Fundamentals, subsection 1.8 says you must be able to “Configure and verify IPv6 addressing and prefix”. Subsection 1.9 says you must be able to “Describe IPv6 address types”: 1.9.a Unicast (global, unique local, and link local), 1.9.b Anycast, 1.9.c Multicast, and 1.9.d Modified EUI 64. Section 3.0, IP Connectivity, subsection 3.3 says you must be able to “Configure and verify IPv4 and IPv6 static routing”: 3.3.a Default route, 3.3.b Network route, 3.3.c Host route, and 3.3.d Floating static. This lesson and the next two lessons cover these requirements. This post constitutes Issue 25 of my CCNA 200-301 study notes.

  • Hexadecimal review
  • Binary to hex practice 1
  • Binary to hex practice 2
  • Binary to hex practice 3
  • Hex to binary practice 1
  • Hex to binary practice 2
  • Hex to binary practice 3
  • Why IPv6?
  • Introduction to IPv6 for the CCNA
  • IPv6 address abbreviation (compression)
  • Expanding abbreviated IPv6 addresses
  • Identifying the IPv6 prefix (global unicast addresses)
  • Configuring IPv6 addresses
  • Command review
  • Key learnings
  • Practice quiz questions
  • Key references

You may also be interested in CCNA 200-301 study notes.

Hexadecimal review

We need to understand hexadecimal because both IPv6 addresses and MAC addresses are written in hexadecimal.

The three numbering systems you need to know for the CCNA are:

1) Binary aka base 2. 0b can be used as a prefix before a binary number to indicate that this is a binary number. For example, look at this number: 10. That could be decimal 10. It could be a binary number equal to decimal 2. It could be a hexadecimal number equal to 16 in decimal. By using the prefix 0b, as in 0b10, we can make it clear that this is a binary number.

Base 2 is another name for binary because there are only two available digits in binary, 0 and 1. All numbers are represented using just these two digits.

2) Decimal / base 10 / 0d. The prefix 0d indicates a decimal. As the name base 10 suggests, there are 10 available digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. 

Recall, 10 in decimal means 1 value of 10 and zero values of 1:

107106105104103102101100
1000000100000100001000100101
10

3) Hexadecimal / base 16 / 0x. The 16 digits available in hexadecimal are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

Here’s a chart comparing the three number systems, from 0 up to decimal 15.

binary-decimal-hexadecimal
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Notice the binary numbers up to the equivalent of 7 in decimal have leading 0s at the front. This is meant to emphasize that each hexadecimal digit contains 4 bits of information.

Memorize the decimal to hexadecimal conversions. Remember that 10 is A, 11 is B, 12 is C, 13 is D, 14 is E, and 15 is F. 

If you can 1) convert between decimal and hexadecimal up to 15, and 2) convert between decimal and binary, you’ll have no problem converting either decimal or binary to hexadecimal. 

If you need a refresher for converting between number systems, feel free to revisit these two lessons:

CCNA math: understand and practice conversion between decimal and binary, and between hexadecimal and decimal.

IPv4 addressing for the CCNA: learn about the decimal and hexadecimal number systems, and practice conversion between binary and decimal.

Let’s walk through some conversions – binary to hex, and hex to binary.

Binary to hex practice 1

0b11011011 is equal to what in hexadecimal? Remember, each hexadecimal digit contains 4 bits. So,

>first split the binary number into 4-bit groups:

0b1101 and 0b1011

>next, convert each of those 4-bit groups to decimal:

0d13 and 0d11 

>next, convert those decimal numbers to hexadecimal:

0xD and 0xB

>next, put those hexadecimal digits together:

0b11011011 = 0xDB

You can use an online calculator to check your answer.

Binary to hex practice 2

binary-hexadecimal-practice
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Binary to hex practice 3

Binary-hex-practice
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Hex to binary practice 1 

Converting from hexadecimal to binary is basically the reverse process. Convert to decimal, then to binary. 

0xEC = 0b?

>First, split up the hexadecimal digits:

0xE + 0xC

>Next, convert them to decimal:

0d14 + 0d12

>Next, convert each decimal number to binary:

14-8=6

6-4=2

2-2=0

And,

12-8=4

4-4=0

0b1110 + 0b1100

2726252423222120
1286432168421
1110
1100

0xEC = 0b11101100

Hex to binary practice 2

hexadecimal-binary-practice
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Hex to binary practice 3

Hex-binary-practice
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Why IPv6?

*An IPv4 address is 32 bits long, so there are (only) 232 or 4,294,967,296 IPv4 addresses available for use worldwide. 

*The assignment of IPv4 addresses is controlled by IANA, the Internet Assigned Numbers Authority. IANA distributes IPv4 address space to various RIRs, Regional Internet Registries, which then assign them to companies that need them. For example, an Internet service provider would ask its local RIR to assign it IP addresses which can then be used by its customers. 

*IPv6 offers many improvements over IPv4, but there is one main reason for the switch to IPv6: the world has run out of IPv4 addresses. This fact is known as the IPv4 address exhaustion problem.

*Several techniques have been used to preserve IP space, to address the IPv4 address exhaustion problem. VLSM (variable-length subnet masks), private IPv4 addresses, and NAT (Network Address Translation) are techniques that allow IPv4 address space to be preserved. 

Those techniques have helped preserve the IPv4 address space, but they are short-term solutions. The long-term solution is to transition to IPv6.

*IPv6 brings multiple improvements over IPv4, including:

  • Larger address space: IPv6 uses 128-bit addresses (16 bytes), which is much larger than the 32-bit addresses (4 bytes) used by IPv4. This means that there are a virtually unlimited number of IPv6 addresses available, which is important as the number of devices connected to the Internet continues to grow.
  • Improved routing: IPv6 uses a more efficient routing protocol than IPv4. This means that packets can be routed more quickly and efficiently, which can improve performance.
  • Built-in security: IPv6 includes built-in security features that are not present in IPv4. This includes IPsec, which provides encryption and authentication for IPv6 packets.
  • Simplified header format: The header format for IPv6 is simpler than the header format for IPv4. This makes it easier for routers to process IPv6 packets, which can improve performance.
  • Support for mobility: IPv6 supports mobility, which means that devices can move between networks without losing their IP address. This is important for devices such as laptops and smartphones, which are often used in mobile environments.

Overall, IPv6 is a more efficient, secure, and scalable protocol than IPv4. As the number of devices connected to the internet continues to grow, IPv6 will become increasingly important.

Here are some additional benefits of IPv6:

  • Better support for multicast: IPv6 has better support for multicast than IPv4. This means that it can be used to send messages to a group of devices, which can be useful for applications such as streaming video and gaming.
  • Improved Quality of Service (QoS): IPv6 has improved QoS support than IPv4. This means that it can be used to prioritize certain types of traffic, such as voice and video traffic.
  • Elimination of NAT: IPv6 eliminates the need for NAT, which can improve security and performance.

Introduction to IPv6 for the CCNA

*The Internet Stream Protocol (ST) was developed in the late 1970s and early 1980s as an experimental protocol. ST uses the version number 5 in the version field of the Internet Protocol header. However, it was never known as IPv5 and was never introduced for public use.

The version number 5 was used by ST because it was the next available number after IPv4 (version 4). However, the Internet Engineering Task Force (IETF) decided to use the version number 6 for IPv6, the successor to IPv4, rather than 5, to avoid any confusion between the two protocols. IPv6 uses a value of 6 in the version field of the header.

*An IPv6 address is 128 bits. That’s 4 times the number of bits in an IPv4 address, which is 32 bits. But 4 times the number of bits does not equate to 4 times the number of IP addresses.

*Every additional bit doubles the number of possible addresses. 32 bits allows for about 4 billion addresses. 33 bits would allow about 8 billion, 34 bits would allow about 16 billion, etc.

*In IPv6:

There are 340,282,366,920,938,463,463,374,607,431,768,211,456 IPv6 addresses.

340 undecillion, 282 decillion, 366 nonillion, 920 octillion, 938 septillion, 463 sextillion, 463 quintillion, 374 quadrillion, 607 trillion, 431 billion, 768 million, 211 thousand and 456 IPv6 addresses.

You don’t have to memorize this number!

Here’s an example of an IPv6 address in binary and in dotted decimal.

IPv6-address-example
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

However, IPv6 addresses are not written in dotted decimal, they are written in hexadecimal. 

Here’s that same address written in hexadecimal. 

IPv6-address-example
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

An IPv6 address is 128 bits. Each hexadecimal digit contains 4 bits of information. 128 bits divided by 4 is 32. An IPv6 address is written as 32 hexadecimal characters, divided into 8 groups of 4 (8 quartets), using colons. Each quartet is 16 bits.

For example, 

2001: 0db8: 85a3: 0000: 0000: 8a2e: 0370: 7334

IPv6 addresses use the slash notation to indicate the prefix length, even when configuring the address in the Cisco IOS CLI. 

The /64, for example, means the first half of the address would be the network portion, and the second half would be the host portion. 

IPv6 address abbreviation (compression)

A side note, you will notice the 2001:db8 range is used a lot in our examples. That’s because this range of IPv6 addresses has been reserved for examples and documentation.

There are a couple of methods to shorten IPv6 addresses.

>First, leading 0s can be removed. Leading 0s are any 0s at the beginning of any of the IPv6 address quartets.

Look at this IPv6 address. These are the leading 0s in this address (in red boxes). We can simply remove them. Then the address can be written as shown.

IPv6-address-abbreviation
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

The 0s are still part of the address, but there’s no need to write them, and it looks simpler like this.

>Second, consecutive quartets of all 0s can be replaced with a double colon. For example in the address below, there are four consecutive quartets of all 0s. We can shorten the address as shown, replacing those quartets with a double colon. 

IPv6-address-abbreviation
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

We are able to shorten the IPv6 address like this because we know an IPv6 address is 8 quartets in length. We can only see four quartets now, so we know the double colon means that there are four quartets of all 0s. 

>We can combine both methods, removing leading 0s and using the double colon. 

Now this address looks much easier to handle. 

IPv6-address-abbreviation
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

But there’s a limitation.

Consecutive quartets of 0s can only be abbreviated once in an IPv6 address. Consider the following IPv6 address and how we might try to shorten it.

IPv6-address-abbreviation
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

We know there should be 8 quartets in total, so there are five quartets of all 0s. But how many quartets of 0s does the double colon on the left side represent, and how many quartets of 0s does the double colon on the right side represent? 

It’s up the creek. This is why we can only abbreviate the all-0 quartets once in an address.

Here are a few questions to practice shortening IPv6 addresses. 

practice-shortening-IPv6
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Expanding abbreviated IPv6 addresses

You should also be able to take a shortened IPv6 address and expand it into a full IPv6 address. Let’s look at an example.

First, put leading 0s where needed. Next, replace any double colons with all-0 quartets.

expand-IPv6-addresses
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Here are a few practice questions for expanding shortened IPv6 addresses. Each of these addresses is a different type of address. IPv4 has different kinds of addresses like multicast addresses, loopback addresses, etc., and so does IPv6. IPv6 address types are discussed in IPv6 Part 2.

practice-expand-IPv6-addresses
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Identifying the IPv6 prefix (global unicast addresses)

Let’s see how to find the IPv6 prefix, the network address, from a particular host address. As we saw in the lesson CCNA Subnetting Exercises, for IPv4 we change all the host bits to 0s to get the prefix, the network address.

Let’s try it out for IPv6. 

Typically, an enterprise requesting IPv6 addresses from their ISP will receive a /48 block. Also, typically IPv6 subnets use a /64 prefix length. This means that an enterprise has 16 network bits to use to make subnets. The remaining 64 bits can be used for hosts. Let’s look at an example.

Here’s an IPv6 address. Note that this example is for the IPv6 global unicast address type. As noted, there are multiple IPv6 address types. Global unicast addresses are the regular IPv6 addresses that hosts can use over the Internet, e.g., they are not private addresses or multicast addresses.

>The part of the IPv6 address in blue is the /48 block assigned by the ISP. It’s called the global routing prefix

IPv6-prefix-global-unicast-address
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

>The next 16 bits are called the subnet identifier. Because the enterprise received a /48 block from the ISP, but IPv6 addresses usually use a /64 prefix length, these 16 bits are free to use to make different subnets. 

Together the global routing prefix and the subnet identifier make the network portion of the address, the IPv6 network prefix. 

>Then the last 64 bits are the host bits. This provides for a very large number of hosts per subnet, likely more than a company would ever need.

Finding the prefix of an IPv6 address with a /64 prefix length is easy. Simply make the second half of the address all 0s. 

IPv6-prefix-global-unicast-address
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Even if the prefix length is not /64, if the prefix length is a multiple of 4 it is easy to find the prefix length. Let’s see how to find the prefix of this IPv6 address. 56 is a multiple of 4.

IPv6-prefix-global-unicast-address
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

The first quartet is the first 16 bits of the address. The second quartet brings it to 32 bits. The third to 48 bits. In the fourth quartet, the 2 contains the next 4 bits, so 52. And the 1 next to the 2 contains another 4 bits, so 56 bits. 

So the first 14 characters (56 bits) are the network portion of the address, the prefix. Everything after is the host portion, so we can change them all to 0 to find the prefix. After removing leading 0s and using the double colon, the IP address can be written as shown.

When the prefix length is a multiple of 4, find where the network portion ends, and change all digits after it to 0.

But with an IPv6 address like the following, with a /93 prefix length, we need to go through a couple of more steps.

2001:0DB8:8B00:0001:FB89:017B:0020:0011/93

93 is not a multiple of 4. That means that the network portion ends in the middle of one of the hexadecimal digits. Let’s find which one. Remember that each hexadecimal character is 4 bits.

16 bits, 32 bits, 48 bits, 64 bits, 80 bits, 84, 88, and the 7 brings us up to 92 bits. So the network portion includes all of these characters, plus the first bit of the B.

IPv6-prefix-global-unicast-address
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

To properly write out the network prefix, we need to look into the binary. Hexadecimal B is equal to decimal 11. Decimal 11 is written as 1011 in binary. Only the 1, the first bit of this 1011 binary number, is part of the network portion of the address, so let’s change all of the other bits, the host bits, to 0.

Now we have 0b1000. Change that back to decimal, which is 8. It’s also written as 8 in hexadecimal. So, when we write out the network prefix, we have to change the B to an 8.

Here are some practice questions. Find the prefix of each of these IPv6 addresses. 

prefix-IPv6-address
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

Configuring IPv6 addresses

Let’s learn how to enable IPv6 unicast routing on the router, and how to configure an IPv6 address on the router interface. 

R1 has three interfaces, each connected to a different subnet. 2001:db8:0:0::/64 on the G0/0 interface, 2001:db8:0:1::/64 on G0/1, and 2001:db8:0:2::/64 on G0/2.

Configuring-IPv6-address
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

In this example, the company was assigned a /48 address block, and is using the last quartet of the prefix (the subnet identifier) to make different subnets.

Here’s the configuration. 

>First, use the global configuration command IPV6 UNICAST-ROUTING to enable IPv6 unicast routing on the router. This means that the device will be able to forward IPv6 unicast packets to other devices on the network. The command must be configured before any other IPv6 routing commands can be used.

Once the ipv6 unicast-routing command has been configured, the device will create an IPv6 routing table. This table will contain information about the routes to other IPv6 devices on the network. The device will use this table to forward IPv6 unicast packets to their destinations.

ipv6-unicast-routing
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

>Second, let’s configure the G0/0 interface. We enter interface configuration mode for the GigabitEthernet 0/0 interface using the command R1(config)#interface g0/0. 

Next, the following commands can be used to configure the interface:

ipv6 address ipv6-address/prefix-length

no shutdown 

Let’s configure the address 2001:db8:0:0::1/64 on R1’s G0/0 interface.

ipv6-unicast-routing
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

You will notice, a lot of IPv6 commands are the same as or very similar to IPv4 commands. Instead of “IP” the IPv6 command uses “IPV6”. For example, instead of IP ROUTE it’s IPV6 ROUTE.

>We did the same thing on G0/1. And we did the same thing on G0/2, except this time the entire address was typed out. You can use the whole address, the shortened address, or even a partially shortened address, the router will understand what you mean.

Let’s confirm the configurations. 

>We used the command SHOW IPV6 INTERFACE BRIEF. Again, same as the IPv4 command, you just have to use IPv6. There are a few things to point out here. 

show-ipv6-interface-brief
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

>First, notice that the shortened version of the IP address is displayed, meaning not all 32 hexadecimal characters of the IPv6 addresses are displayed. The address on the G0/0 interface is even more shortened than the shortened address we used. 

>Next, notice that each of these interfaces has two IPv6 addresses, even though we only configured one.

show-ipv6-interface-brief
Image courtesy of Jeremy’s IT Lab (Free CCNA | IPv6 Part 1 | Day 31)

The IPv6 addresses we did not explicitly configure are called link-local addresses. Link-local IPv6 addresses are automatically configured on a router interface when you configure an IPv6 address on the router interface, when IPv6 is enabled on the interface. Link-local addresses are covered in IPv6 Part 2.

IPv4 has link-local addresses as well, although they are not automatically enabled on IPv4 interfaces.

Command review

>Configuring IPv6 addresses:

R(config)#ipv6 unicast-routing 
→to enable IPv6 unicast routing on the router (to allow the device to forward IPv6 unicast packets to other devices on the network)

To configure an IPv6 address on the router interface:

R(config)#interface interface

R(config-if)#ipv6 address ipv6-address/prefix-length

R(config-if)#no shutdown

R#show ipv6 interface brief
→to confirm the configurations

For example, to configure the address 2001:db8:0:0::1/64 on R1’s G0/0 interface:

R1(config)#interface g0/0

R1(config-if)#ipv6 address 2001:db8:0:0::1/64

R1(config-if)#no shutdown

Free CCNA | Configuring IPv6 (Part 1) | Day 31 Lab – Notes

Key learnings

*How to convert between hexadecimal and binary.

*IPv6 benefits and improvements over IPv4.

*How to write and abbreviate an IPv6 address.

*How to identify the IPv6 prefix (global unicast addresses).

*How to enable IPv6 unicast routing on the router.

*How to configure an IPv6 address on the router interface.

Practice quiz questions

Quiz question 1

Which of the following are valid IPv6 addresses? Select three.

A. 2000:AB78:20:1BF:ED89::1

B. FE80:0000:0000:0000:0002:0000:0000:FBE8

C. AE89:2100:1AC:00G0::20F

D. 2001:DB8:8B00:1000:2:BC0:D07:99:1

E. 2001:0DB8::1000

F. 2001::0002::0099

The valid IPv6 addresses are A, B, and E. 

You can find two more practice questions for this lesson (plus a bonus one) in Jeremy’s video lesson IPv6 Part 1, cited below.

Key references

Note: The resources cited below (in the “Key references” section of this document) are the main source of knowledge for these study notes/this lesson, unless stated otherwise.

Free CCNA | IPv6 Part 1 | Day 31 | CCNA 200-301 Complete Course

Free CCNA | Configuring IPv6 (Part 1) | Day 31 Lab | CCNA 200-301 Complete Course

Related content

CCNA 200-301 study notes

Compliance frameworks and industry standards

Configuring IPv6 addresses using EUI-64

How data flow through the Internet

How to break into information security

How to get CCNA certification

IPv6 static route configuration

IT career paths – everything you need to know

Job roles in IT and cybersecurity

The GRC approach to managing cybersecurity

The penetration testing process

The Security Operations Center (SOC) career path

Back to DTI Courses

Text copying is disabled!