In this video from ITFreeTraining I will be looking more into how to subnet. In previous
videos I covered the basics of subnetting, in this video I will look at subnetting in
more detail, so let’s get started.
To start with, I will look at the following IP Address. Given this address, the administrator
has been asked to break it up into 5 different networks. To do this, I will look at my Power
of 2 table. The next step is to work out how many bits are required to provide 5 networks.
Looking at the power of 2 table, this would be 2 to the power 3. This gives 8 networks
in total. Unfortunately 2 to the power of 2 only gives 4 networks so the next option
is 2 to the power of 3. This does mean that there will be 3 more networks than required,
however it also does give some room to expand if required.
Before I look at how to perform these steps manually, I will first look at how to perform
these steps using an online subnet calculator. Online calculators take a lot of the work
out of the subnetting process, however if you are planning to attempt a certification
exam, in particular the Cisco exams, it is a good idea to have an understanding of how
to do the process manually since you won’t have access to the online IP calculator during
the exam.
First of all, I will open the start menu and then select “Internet Explorer”. Once
open I will go to the web page with the online calculator on it. I have placed the link for
the web site in the description of the video if you have trouble finding it.
There are many online IP calculators which have more options than this one. This one
is quite simple in contrast, however as we will see in a moment, it has one great feature
that many others do not have.
To use the tool, I will scroll down and enter in the address from the example. The next
option is the number of bits in the subnet mask. For this I will leave it on the default
of 24 which was the subnet mask given in the example.
The next option is “move to”. This is the feature I was talking about before and
you don’t see it too often. In the example 5 new networks were required. According to
the powers of 2 table, this will require 3 bits and thus will create 8 networks. More
than required, but 2 bits will not be enough. This means that I will need to enter in a
value of 24 plus 3 which is 27.
Now that the values have been entered in, I will press the calculate button. The subnets
will now be calculated. At the top is a breakdown of the original address. This gives a lot
of useful information. In particular, notice at the bottom the original network had 254
hosts per network. If I now scroll down, the 8 subnets are shown.
You can see at the top a breakdown of the first subnet. The breakdown contains a lot
of information in regards to the subnet. For example, shown here is the network address.
You can see that it is using 27 bits for the subnet mask.
Below this, notice that the broadcast address is shown. Notice also on the right hand side
the binary for the IP Address. All the bits in the host ID part are all 1’s. Communication
with this IP address will send data to all devices on that subnet. Keep in mind that
for security reasons routers generally by default will not route broadcasts between
networks.
Notice the last line of the breakdown for this subnet gives the number of hosts that
can be used on that subnet. This was 254 when there was 1 network, now that it has been
subnetted into 8 parts it is down to 30 hosts per subnet.
On the far right in the binary data, notice the binary data highlighted simply increases
in value from 0 to 7 giving a total of 8 subnets when you count from 0. When the subnets line
up with 8 bits, the math is easy, it is just a matter of working out the decimal value.
In this case, the last octet in the IP Address has 3 bits for the network and 5 bits for
the hosts. This makes the math a little more complicated.
If I scroll down to the bottom, notice the number of subnets and hosts are listed. The
hosts has dropped from 254 to 240. This is because hosts are lost due to them being required
for broadcasts and network addresses.
This should give you the basic idea of how subnetting works when you use an online IP
calculator. I will now have a look at how you would do the process manually.
To demonstrate how to subnet manually, I will use the same example as before. However, this
time I will divide the network in 4 separate networks.
To start with, I will need to work out how many bits I will need to use in order to create
4 networks. To do this, I will look at the power of 2 table. Since I require 4 networks,
I will need 2 bits since 2 to the power of 2 gives us 4. This is good because there is
no wasted subnets. I will now have a look at how the address can be broken down into
subnets.
To do this, take the address you want to breakdown into subnets and change it to binary. Once
in binary it is easy to break the address down into different sections. The first 24
bits of the original address have already been allocated. So the first 24 bits will
be the network ID.
After this, 2 bits have been allocated to the subnet ID since 4 networks are required.
The last 6 bits of the address will be allocated to hosts.
Most of the network ID has been allocated already. For this reason, when the 4 new networks
are worked out, they will have the same bits from the original address as shown. So essentially
the first 24 bits are copy and paste from the original address.
The next part that I will work out is the subnet ID. For the first network this will
be zero in binary which is zero zero. For the rest of the networks it is just a matter
of adding 1 each time. So the next network will be 1 which is zero one in binary. The
next network will be 2 which is one zero in binary.
Adding one again will give us the last network which is 2 in decimal and one one in binary.
You can see that the process is quite simple to work out the subnet ID. The last part is
the host ID. This can range from all bits zero to all bits one.
All the hard work is done. I will now have a closer look at each network.
First of all, I will look at the first subnet. To calculate the network ID for the first
subnet, I will copy and paste the binary values for the first 24 bits. Since this is the first
subnet, the subnet ID will be zero. The last 6 bits of the address will be all zero’s.
The network ID always will have the host ID part of the address all zeros.
Now that the address has been worked out in binary, it is a matter of converting this
to 4 decimal Octet’s. This is the network ID. It can’t be assigned to a host. Generally
this would be used in routing tables or network diagrams.
Next I will look at the broadcast address. Like before, copy and paste the first 24 bits.
In fact all the addresses that I will look at start the same so I will copy and paste
them in one go.
Next is the subnet ID. Since all the addresses I am looking at are in the same subnet this
will not change, so I will also copy and paste this. The last part of the address is the
broadcast address. The broadcast address always has the host id as all one’s.
The broadcast address has been worked out in binary, it is now a matter to convert it
to Octets. Each subnet will have a network and a broadcast address that are not useable
for hosts. I will now look at the 1st host address that is useable.
To work out addresses, simply set the host id to 1. Once this has been worked out, change
this binary value to Octet’s. The next step is to work out the last IP Address that is
useable by hosts. This will be all the bits on except for the first bit. Remember that
all bits on would be the broadcast address.
Like before, the binary value is changed to a 4 decimal octet. There you have it, the
main addresses for the first subnet. So let’s have a look at the second subnet. Since the
first 24 bits are the same, I will copy and paste the 24 bits from the previous network.
Now there is the subnet ID. Since the last subnet was zero, the next subnet ID will be
one. All addresses in the second subnet will have the same subnet ID so I will copy and
paste this to all addresses.
Next, like before, for the network ID I will set the host ID to all zero’s. The next
step is to work out the broadcast ID. To do this I will set the host ID to all ones. The
next step is to work out the first usable IP Address on this network, this will be done
by setting the host ID to 1. Lastly the last useable IP address is worked out by setting
all the hosts ID bits to one except for the first one. You can see that even having to
configure it in binary, if you break the addresses down in bits the process is quite easy.
I will now have a look at the 3rd subnet. Like before, I will copy and paste the first
24 bits. For the subnet ID I will use the value 2 which is one zero in binary for all
the different addresses. To work out the network ID, I will set all the host ID bits to zero.
For the broadcast address, I will set all the host ID bits to 1. For the 1st address
I will set the host ID to 1. For the last address I will set the host ID to all the
bits on except for the first one.
You should get the idea of the process now so I won’t worry about going through the
4th subnet. You can see in the 4th subnet the subnet ID will be 3 which is one one in
binary.
In this video I have looked at the process of subnetting using an online calculator and
manually. It is important to understand the fundamentals of subnetting to help you troubleshoot
problems.
That’s it for subnetting. I hope you have enjoyed this video from ITFreeTraining and
I hope to see you in other videos from us. Until next time, thanks for watching.