top of page

1.8 Configure and verify IPv6 addressing and prefix Part 1

What is IPv6?

IPv6 started development in 1998 within the IETF with a look to counter the known concern of IPv4 exhaustion. More and more Service Providers and organisations have made the change to IPv6 as the number of available IPv4 address have declined, and ultimately, run out. IPv5 was a group of protocols never intended for public use. This experimental group of policies was called the Internet Stream Protocol. In order to avoid confusion with this older protocol the IETF named the new IP protocol IPv6.

 

In IPv6, there are a total of 128 bits, as compared to IPv4's 32 bit address scheme. This larger address size allows for a much larger address pool as every added bit doubles the available networks. IPv6 goes even further to increase the available address by using hexadecimal (0-f). See below for the total number of available IP addresses under IPv4 and IPv6:

IPv6 is represented differently to IPv4 due to the number of bits and the use of hexadecimal. The 128 bit address is broken up into 8 16-bit fields, separated by a colon such as 2001:ff56:1fad:0051:42db:2054:db31:0025. This may look like a random string of numbers so lets break it down. The below table shows the hexadecimal to binary values. With binary in IPv6 there are only 4 bits per hexadecimal (8, 4, 2, 1).

​

IPv6 Conversion Chart

You'll notice that once we reach a hexadecimal value of more than 9 we can't use double digits. So instead we replace it with a letter like this:

 

10 = a

11 = b

12 = c

13 = d

14 = e

15 = f

​

Let's take what we now know from the table above and apply it to the IPv6 address 2001:ff56:1fad:0051:42db:2054:db31:0025.

Clearly the IPv6 address is a lot longer and more complicated to remember than IPv6, however there are ways to shorten the total length and simplify the address to make it easier to read. We'll explore these techniques in the next section below. 

​

Abbreviating IPv6 addresses :: & leading zeroes

Remembering or even using a full IPv6 address is difficult as there are 32 values to remember as compared to IPv4's maximum of 12. There are two key ways to shorten the length of the IPv6 address and it all lies in the 0s.

​

Step One - Replacing hexadecimal fields with all zeroes with ::

We are given an IPv6 address of 2001:db00:f438:0000:0000:0000:63ef:2a04. With IPv6, we can remove fields containing all zeroes and replacing them with "::" to denote the missing fields. So 2001:db00:f438:0000:0000:0000:63ef:2a04 becomes 2001:db00:f438::63ef:2a04. We know that there are a total of 8 fields, so we can easily work out how many 0000 fields are needed to fully populate the address. Let's see some examples below.

Did you notice on the last example that we are unable to remove the last two fields of 0000. This is because if there are multiple concurrent 0000 fields, we only compress the left-most string. If we are given an IPv6 of 2001:db63:0000:0000:ffed:0000:0000:0000, even though the last 3 fields are all 0s, we only compress the left-most fields. In this example the IPv6 address shortened would be 2001:db63::ffed:0000:0000:0000.

​

Step Two - Removing leading zeroes from hexadecimal fields

The second way we can shorten the IPv6 address length is to remove any leading 0s from each hexadecimal field. For example, if you have a field of :002d:, it would be represented as :2d:. Again we work from left to right, so we can't remove any 0s from say :2200:. Lets look at some examples (we'll also combine step one):

As you can see we can shorten IPv6 addresses right down. Going forwards we will be using the abbreviated IPv6 address scheme. See some broken down examples below:

IPv6 Prefixing

As with IPv4, we need to know which portion of the IPv6 address is the network prefix, and which is the host identifier. IPv6 does away with the subnet mask from IPv4 and simply appends the number of bits used for the network prefix, known as the prefix length. The most common prefix length you'll see on a network is a /64. The IPv6 address contains 128 bits, so that means that for a /64 address the first 64 bits are used for the network prefix, and the remaining 64 bits are used for the interface identifier. Typically, organisations are given a /48 IPv6 address. This allows the organisation to create over 65000 /64 IPv6 subnets. To calculate the network prefix we change all of the interface identifier bits to 0.

 

Because of the size of each IPv6 subnet we do not need to work out the number of hosts and networks that can be created. For the CCNA we only need to be able to identify the network prefix from a given IPv6 address. Let's work through some examples:

 

Example 1 - Multiple of 16

We have been given a /64 network address 2001:ff56:1fad:51:42db:2054:db31:25 and we need to identify the network prefix. This is the most common prefix size and can be easily identified as the prefix and interface portions are exactly half. See below:

Example 2 - Not a multiple of 16 but a multiple of 4

In this example we will use the same IPv6 address as above, but the prefix has been moved to a /40. This time the prefix sits in the middle of the hexadecimal field as it isn't a multiple of 16. However because /40 is a multiple of 4 then the prefix doesn't sit within one of the binary strings that make up the hexadecimal value. See below:

Did you see that the third hexadecimal field has changed from :1fad: to :1f00:? This is because again like example 1 the network prefix is the address with all interface identifiers set to 0. If we changed it to :1f: then this would denote that we have removed the leading bits, giving us the wrong network prefix :001f:.

 

Example 3 - Neither multiple of 16 or 4

Here we have been given a /90 address. Because 90 isn't a multiple of 16 or 4 this means the network prefix ends in the middle of the binary value, so in order to work out the prefix we would need to set all the bits after the 90th bit to 0.

So looking at the above, the 90th bit falls within the binary string that creates hexadecimal value 5 (0101) highlighted in orange. We need to change the bits to 0 after the 90th bit, so the new binary string will be 0100. Therefore, we have changed the hexadecimal value from 5 to 4. The new network prefix field will be 2040.

 

IPv6 Header

IPv6 uses a different header to IPv4 and simplifies the total overhead allowing for more efficient routing of packets. As with IPv4, the header allows the router to poll and correctly process each packet dependant on the field values set. IPv6 headers are 320 bits in length. See below:

IPv6 enabled routers do not fragment packets unlike IPv4. Hosts are expected to limit the packet size to the path MTU (Maximum Transmissible Unit) using Path MTU Discovery. If a packet arrives at the router and the payload size is too big, the packet is usually dropped.

Configure and Verify IPv6 addressing on Cisco Equipment

 

Please see lab 3 here.

bottom of page