Here is another example, ABC limited have been allocated subnet 10.128.192.0/18
for several offices in the USA
Paul a network administrator once again needs to split the subnet
into smaller subnets, Paul requires 30 subnets with as many hosts
as possible on each subnet, and once again he asked you for your help.
You need to decide which formula to use.
Please note we’ve been ask for networks or subnets
so we need to use the formula 2 to the n and not the formula 2 to the n - 2.
And we need to remember to count the bits
from the left hand side to the right hand side.
So on step 2 you need to work out the number of bits required to cover the number
of hosts or in this case the number of networks that we’ve been asked for.
Paul is asked for 30 subnets so we will require 5 bits because
using the formula 2 to the n and substituting n with 5 will give you 32.
So we will actually end up having 32 subnets rather than just 30.
So we now know that we need to steal 5 bits from the host portion of the address
and allocate that to the network portion
because 5 binary bits are required to give us 32 networks.
The 3rd step is to convert the host portion of the original network into binary.
so the original network we were given was 10.128.192.0/18 or 10.128.192.0
with the mask of 255.255.192.0 now 255 tells us that the first octet is network
the 2nd 255 tells us that the 2nd octet is network
however in the third octet, the octet is not fully populated with binary 1's.
So in the 3rd octet there’s a split between network and host.
The last octet is filled with binary 0's so that entire octet is host.
Converting 192 into binary gives us 2 binary 1's followed by 6 binary 0's
0 in decimal converted to binary give us 8 binary 0's. .
So we have converted the 3rd octet where we have both network and host bits
and the last octet into binary and we have drawn a line separating the network
and the host portion of the address.
How do we know that we need to draw the line here?
because we have 18 bits in the network mask
The first octet is 8 bits, the 2nd octet is 8 bits,
8 plus 8 is 16, plus 2 gives us 18 so this line indicates
the separation between network and host.
Now the original network once again is 10.128.192.0/18 or
could be written as 255.255.192.0 in dotted decimal notation.
So once again the network portion is 10.128 the network host portion is 192
and the host portion is 0. We are going to take 5 bits from the host portion
and allocate that to the subnet, so the network portion is 10.129
and then on the 3rd octet is the first 2 bits are the network
and we count 5 bits from the left hand side to the right hand side
so 12345 and we draw a line here indicating that this 5 bits are subnet
and all bits to the right of the second line are host.
So we have now stolen 5 bits from the host portion and allocated
that to the subnet portion of the address.
So we need to work out what the new subnet mask is.
It’s equal to the number of bits in the network and subnet portion of the address.
So it’s equal to this portion of the address
plus the extra 5 bits allocated to the subnet portion.
Just to remind you once again 1 octet is 8 bits.
so the first octet is 8 bits, the 2nd octet is 8 bits
so that gives you a total of 16 bits.
We’ve got 2 bits in the 3rd octet which are part of the network plus
5 additional bits which have been allocated to subnet, so that gives us 7 bits.
so the total number of bits in the network subnet portion is equal
to 8 plus 8 plus 2 plus 5 which equals 23 bits
you could also work this backward once again, there are 32 bits in an IPv4 address
and notice in the host portion there are 8 bits in the last octet
allocated to host plus 1 bit in the 3rd octet
so 1 plus 8 equals 9, 32 less 9 gives you 23.
Either method is fine, the result is the same 23 bits have now been
allocated to network and subnet where's before only 18 bits were allocated.
So now it's possible to work out to new subnet.
Once again, to work out the subnet go through the various
binary combinations for the subnet portion of the address.
So this portion in green mark the subnet
so the first network or subnet is equal to 10.128.
a 2 binary bits which part of the original network plus 5 additional
binary bits which would now allocated to subnet.
So once again the subnet mask is /23 which can be written
in dotted decimal notation as 255.255.254.0
To work out the first subnet, fill the subnet portion of the address
with 0's and populate the host portion of the address with 0s.
please note this 2 binary 1's. the 5 green binary 0's that are part of the subnet
and the 1 red binary 0 that’s part of the host portion
all form part of the same subnet.
So 11 followed by 6 binary 0's equals 192 in decimal.
To work out the 2nd network or subnet, we go through binary combination.
The next binary combination is 4 binary 0's followed by binary 1
taking the whole octet into account that equals 194 in decimal.
Please note the host portion is always set to binary 0's.
So the last octet is once again 0.
So the second network or subnet is 10.128.194.0
Now you probably already guess what the 3rd one is gonna be
because we're going up in multiples of 2.
But if we go to the whole process again getting the next binary value
would be 3 binary 0's followed by binary 1 followed by binary 0.
And converting that whole octet back into decimal will give us 196.
So we know that we're going in multiples of 2,
so the first 1 is 192, then 194, then 196, then 198, then 200, 202, 204, etc.
all the way up to the last subnet.
To work out the last subnet, fill the subnet portion of the address with binary 1's
so we end up having 10.128 followed by 7 binary 1's,
followed by binary 0 in the 3rd octet.
7 binary 1's followed by binary 0 in an octet is equal to 254.
The last octet is once again equal to 0.
So the last subnet is 10.128.254.0 with the /23 mask
or it can be written as 10.128.254.0 with the mask of 255.255.254.0
I hope that’s helped you learn how to subnet based on a requirement
first specific number of hosts or specific number of networks.
So what have we covered?
We look at the reason for subnetting, subnetting is very important for this course
and it’s important that you have a good understanding of subnetting.
so we spent time looking at the binary method and the quick method
for determining the subnet address, broadcast address
first host address and last host address for a given IP address.
I also showed you how to create multiple subnets
based on specific host or network requirements.