Subnetting in IPv6

ipv6-subnetting-www.ipcisco.com

IPv6 Subnetting

We have talk about IPv4 Subnetting in another lessons. In this IPv6 Training lesson, we will focus on IPv6 Subnetting and how to use it with IPv6 Addresses.

 

Subnetting is used in IPv4 to use the address spaces effectively. But IPv6 provide too much addresses. So using Subnetting with IPv6 do not aim to use only the address space effectively. Instead, it is used for the below reasons:

 

  • To prevent unnecessary traffic,
  • To have an effective and flexible network design,
  • To provide an easy route summarization.

 

By the way, in IPv6 there is no Subnet Masks like we use with IPv4 Addresses. Instead of Subnet Masks, we will use Slash notation with IPv6 Addresses(like /x).

 


You can also check Subnetting Cheat Sheet


 

IPv6 Subnetting Bits

As you know IPv6 Addresses are 128 bits long. These 128 bits can be devided into three part and one of them is used for IPv6 Subnetting.What are these IPv6 Address parts? These parts are :

  • Network ID (48 bits)
  • Subnet ID ( 16 bits)
  • Interface ID (64 bits)

ipv6-subnetting-ipcisco.com

 

We can also divide Network ID part into two. These IPv6 Network ID parts are given below:

  • ISP Prefix (/32)
  • Customer Site Prefix (/48)

 

ipv6-subnetting-www.ipcisco.com

 

ISP Prefix is the part that is given to Local Internet Registries (LIRs). Customer Site Prefix is given to organizations. Organizations use Subnet bits to divide this prefix into different subnets.

 


 

Why We Use IPv6 /64 Prefix?

In IPv6 ,  minimum /64 prefixes are recommented to use. This is also because Auto IP Configuration requires 64 bits. With this large prefix, we will still have a lot of IPv6 Addresses available.  If you have 1 thousand devices in your network, you will still have  264 -1000 available addresses. And so, /64 addresses are also used on point-to-point links. Think about it, with IPv4, we were using /31 addresses for point-to-point links.

 


 

How can we do IPv6 Subnetting?

In IPv4, with Subnetting, Subnets and Host can be calculated and especially according to the host number, we were using Subnetting. In IPv6 ,  the important point is your Subnet numbers instead of the host numbers. There are too much hosts but the subnets you would like to have can be different according to your need.So, we will focus on dividing subnets and subnet numbers of IPv6 Addresses.

 

As we have discusses above, there are three parts in an IPv6 Address. The first 48 bits are Network bits, the 16 bits after that are Subnetting bits and the last 64 bits are Interface bits.

 

Here, our Subnetting bits that we will use on an address will be calculated according to our need. For example, if we have a /48 prefix and we need 8 subnets, we can use 3 subnetting bits  (23=8). Our slash notation will be 48+3= 51 (/51). With this IPv6 Subnetting , we can use 8 subnets with this IPv6 Prefix. Beside, we will have (213=16384) /64s for each Subnet.

 


 

Common IPv6 Subnet Prefices

You can find the common Subnet Prefixes Table below. As the table shows for example, if you have a /56 Prefix, you can have  :

  • 16 /60 Subnets
  • 256 /64 Subnets

if you have a /52 Prefix, you can have  :

  • 16 /56 Subnets
  • 256 /60 Subnets
  • 4096 /64 Subnets

 

ipv6-subnet-prefixes

 


You can also test your IPv6 Knowledge on IPv6 Questions Page.


 

To understand IPv6 Subneeting better , let’s go through some examples and try to understand IPv6 Subnetting.

 


 

IPv6 Subnetting Examples

To understand IPv6 Subneeting better , let’s go through some examples and try to understand IPv6 Subnetting.

 

IPv6 Subnetting Exampe 1

Think about that, if your company has given an IPv6 Prefix 2001:1234::/50 to you. And you would like to use this IPv6 Prefix in 4 different departments. Which IPv6 Prefix do we use for this action?

First of all, for 4 subnets, we need to borrow 2 bits (22=4). And to determine the slash notation, we will add this 2 bits to the original one. So our slash notation will be 50+2=52 (/52).

Now let’s write the first 64 bits of the IPv6 Prefix in binary format :

2001:1234::/50
0010000000000001:0001001000110100:0000000000000000:0000000000000000

The IPv6 Prefix of each IPv6 Subnet, will be like below:

2001:1234::/52
0010000000000001:0001001000110100:0000000000000000:0000000000000000

2001:1234:0:1000::/52
0010000000000001:0001001000110100:0000000000000000:0001000000000000

2001:1234:0:2000::/52
0010000000000001:0001001000110100:0000000000000000:0010000000000000

2001:1234:0:3000::/52
0010000000000001:0001001000110100:0000000000000000:0011000000000000

 


IPv6 Subnetting Exampe 2

Your company has given an IPv6 Prefix 2001:0000:0000::/48 to you. And you would like to use this IPv6 Prefix for 16 different subnets, which slash notation do we need and how many /64 will each Subent has?

First of all, for 16 subnets, we need to borrow 6 bits (24=16). And to determine the slash notation, we will add this 4 bits to the original one. So our slash notation will be 50+4=54 (/54).

Now let’s write the first 64 bits of the IPv6 Prefix in binary format :

2001::/48 = 0010000000000001:0000000000000000:0000000000000000:0000000000000000

 

Here, we will have 4 borrowed bits and this will provide 16 subnets. The remaining subnets bits will show us the number of /64 prefixes can be used in each subnet.

To calculate this , we will use the below formula:

64 – 48 network bits = 16 subnet bits

16 subnet bits – 4 borrowed bits = 12

Each Subnet will have (212=4096) /64s.

 

Our subnets will belike below:

2001::/52
2001:0:0:1000::/52
2001:0:0:2000::/52
2001:0:0:3000::/52
2001:0:0:4000::/52
2001:0:0:5000::/52
2001:0:0:6000::/52
2001:0:0:7000::/52
2001:0:0:8000::/52
2001:0:0:9000::/52
2001:0:0:a000::/52
2001:0:0:b000::/52
2001:0:0:c000::/52
2001:0:0:d000::/52
2001:0:0:e000::/52
2001:0:0:f000::/52

 

Here, we have focused on ipv6 subnetting with different examples. You can solve more examples on this lesson to be better on this ipv6 lesson.

 

Lesson tags: IPv6, ip addressing
Back to: IPv6 Course > IPv6 Addressing Overview

Leave a Reply

Your email address will not be published. Required fields are marked *