Welcome to the ITFreeTraining video on IPv6 subnetting. A subnet is a logical division
of a network. In IPv4, subnetting decisions often had to be made due to a limit on address
space. With IPv6 the address space is far from limited, so let’s have a look at how
this effects subnetting in IPv6.
The main reason for subnetting in IPv4 was to effectively utilize the small address space
as best as possible. IPv6 has a significantly larger address space and thus 16 bits can
be dedicated just for subnetting. This means that subnet masks are no longer required.
With IPv4 a subnet mask was required to divide the address into network and host parts.
Well I must say, these bullet points are kind of boring so let’s look at an example instead.
Let’s consider that an ISP has just given you an IPv6 address ready for subnetting.
Notice the slash 48, 48 bits have been allocated by the ISP, this leaves 80 bits. If the address
is broken down, the first 48 bits have been allocated, the next 16 bits are the subnet
ID and the last 64 bits is the interface ID.
The interface ID is configured by the node or via a service like DHCP. So for the purposes
of subnetting, I don’t need to worry about it. So, how would the administrator go about
creating some subnets?
The simplest first subnet that can be created is to set the 16 bit subnet ID to zero. For
the next subnet, simply make this value 1. For the next subnet, make the value 2 and
the next subnet make the value 3.
This is a very simple example, however for small networks the administrator does not
need to make it any more complicated than this. If you are familiar with IPv4 subnetting,
you will notice that the subnet mask is not required, making the process a lot simpler.
So, I think you can handle it, let’s look at a more complex example, but not too complex.
So far, we have learnt that IPv6 has 16 bits dedicated to subnetting. This allows the administrator
to divide their network up into logical subnet networks. To start with, I will allocate 4
bits of the subnet to a country.
4 bits gives 16 values, so allocating this many bits allows the network to support 16
different countries. Notice that when 4 bits have been chosen, the following happens. The
first value of the subnet in the IP address ranges from 0 to f in hexadecimal.
Next I will allocate a further 4 bits to different states. This means each of the 16 countries
can support 16 states. Looking at the address, the second value will also range from 0 to f.
Next I will allocate 4 bits to different offices. You probably guessed by now, the 3rd value
will range from 0 to f giving 16 values. Lastly I will allocate the last 4 bits to different
departments. Like before the last value will range from 0 to f.
So this network will support 16 countries, which can have 16 states which can have 16
offices and each office can have 16 departments. The point to understand here is that if you
align the subnets with 4 bit boundaries, then subnetting is very easy. I could have also
used 8 bits. For example, 8 bits gives 256 values so this could give 256 countries. A
further 8 bits could be used to give 256 networks for these 256 countries. Something to think
about to make your network simpler to work with. But, unfortunately, your organization
may not work off 4 bit boundaries so let’s look at a harder example.
In this example, once again the ISP has given us the same IP Address. This time, the 16
bit subnet ID will be divided up into 5 bits for the country, 6 bits for the state, 3 bits
for the offices and 2 bits for networks in those offices. Unfortunately, the subnet ID
has not been divided up into 4 bit boundaries so now some math is involved to work out the
network. Rather than look at the math in this video, I will instead use an online subnetting
tool. I will leave the math’s to an upcoming video.
To do this, I will open Internet Explorer and go to the site GestioIP. This site contains
an IPv6 subnet calculator. If you have trouble finding this site, I have left a link for
it in the references part of the video and also for the next web site I will use later
in this video. From the web site, I will select the link
in the middle of the page “Subnet calculator online”. Once the page is loaded, I will
select the option for IPv6 subnetting and then enter the IP Address given to me by the
ISP.
Next I will set the prefix length to 48. Now that the IP address has a prefix length, the
next step is to press calculate. Once the page has loaded, if I scroll down, this will
show details about the current IP Address. So far none of the 16 bits have been allocated
to any subnets.
At the bottom, I can select how many networks the subnet will have. I require 5 bits. 5
to the power of 2 is 32 subnets which is not shown. To show this option I will need to
select the more option.
I will then select the option “32 networks” from the list. Once selected, notice at the
top, a network has been created with a prefix length of 53. So essentially 5 bits have been
used to create these subnets.
The next step is to allocate 6 bits for the subnet to be used with the state. To do this,
I will select the option “64 networks” which is 2 to the power of 6.
The next network is for the offices, which requires 3 bits, so 2 to power of 3 is 8 so
I will select the option “8 networks”. Lastly, there are 2 bits required for networks
at each office, so I select the option for 4 networks.
All the 16 bits from the subnet ID have now been allocated, so next I will select the
option for “Create Plan”.
This IPv6 calculator allows each level of networking to be named. For the first level
I will enter in “Country” and press send. For the next level, I will enter in “State”
and press send. The next level I will enter in “Office” and press send. Lastly, the
calculator will ask for the number of networks for the last level. For this, I will enter
in 4, which is the maximum number, and press send.
Once the calculator has run, a breakdown of the subnets will be shown. At the top, notice
level 1 for country. Essentially it is saying bits 48 to 53 will determine which country
the address is.
Below this is the level 2 address for state. Since all the subnet ID values are zero, the
address is the same as the previous one, however the prefix length has changed to 59. Essentially
meaning that bits 53 to 59 are dedicated to the state the address is for.
Following this is the office part of the IP address, which is using bits 59 to 62 in the
IP address. The last part is a bit more interesting, because the 2 bits used have been expanded
to 4 subnets. The interesting thing to look at is that you can see part of the address
going up from 0 to 3.
This subnet calculator is good for getting a quick break down of the network, but does
not give much detail about the different subnets. To get some more detail, I will open the web
page SubnetOnline.
Once the page has opened, I will select the menu “Subnet Calculators” and then select
the option “IPv6 Subnet Calculator”.
Like before, I will enter in the IP Address given to me by the ISP and then set the prefix
length to 48. This subnet calculator is a little different than the other calculator
in that you need to enter in the number of subnets that you want. From this information,
the calculator will work out the number of bits required.
In this case, I will enter in the value of 17 and press add level. 32 would be the maximum
number of allocable subnets, however 17 is the lowest number I can enter that will use
5 bits. I entered in this value because the calculator will expand all the subnets entered
in. If the total number of subnets is too high, the process will fail.
Next, I will enter in the value 33 and press add level. This is the lowest number that
will use 6 bits. You can see that if you are not sure how many bits you will need, you
can enter in some values and it will tell you how many bits are required.
For the next level I will enter in 5 which will use another 3 bits of the subnet ID.
And for the last level, I will enter in 4 which will use 2 bits.
Now that all of the 16 bits of the subnet ID have been allocated, I will press the button
“Calculate Subnets”. The process should not take too long to complete. It all depends
on how many subnets were entered.
Once complete, at the top, notice that original IP Address with the network prefix of 48.
If I expand this, this will give the first level of subnets.
You can see the first subnet. The subnet part of the IP Address is all zeros. Notice that
the next subnet ID starts with 800. Following this, the next subnet starts with 1000. Notice
that each subnet increases by 800 each time. Remember that the address is in hexadecimal,
if you are not familiar with hexadecimal you should at least see a pattern repeating itself.
In this example, these addresses would be allocated to different countries. I now expand
the second level of addresses. This would be the addresses that would be used to allocate
to each state in that country.
Notice that the addresses are going up by 20 each time. Since it is hexadecimal, notice
that the sequence will go a0, c0, e0 before going back to zero. The amount that it goes
up this time is very small compared with before.
If I now expand the next level, this will give the subnets for the office. If I expand
the last network, this will give the subnets for use for networks in each office.
Notice in the last level, the subnets go up by one each time. This is to be expected since
all the subnet bits have been used.
If I expand another subnet, notice that sequence continues. Each subnet increases by 1. If
I expand the next subnet, notice the sequence continues again and starts using the hexadecimal
alphabet characters which continues on into the next subnet and the next subnet.
So you can see, working out the subnets is a matter of working out the value that needs
to be added to the previous subnet. The online calculator takes all the hard work out of
the process.
In the next video I will look at the maths required to manually working out subnets in
IPv6. I hope to see you in that video. Until then, I would like to thank you for watching
this video.