Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 33

Contents

Overview........................................................................................................................................................................... 1
Subnetting Part 1:........................................................................................................................................................ 2
Binary Method:.......................................................................................................................................................... 3
Rules:.......................................................................................................................................................................... 4
Example of Part 1 Binary Method............................................................................................................... 4
Example - 1:....................................................................................................................................................... 4
Example - 2:....................................................................................................................................................... 6
Example - 3:..................................................................................................................................................... 10
Quick Method:......................................................................................................................................................... 14
Example of Part 1 Quick Method.............................................................................................................. 15
Example - 1:..................................................................................................................................................... 15
Subnetting Part 2:...................................................................................................................................................... 21
Rules:............................................................................................................................................................................ 24
Example of Part 2:................................................................................................................................................. 25
Example - 1........................................................................................................................................................... 25
Example - 2........................................................................................................................................................... 30

Overview
In this section we gonna look at IP subnetting. I’d like to teach you multiple methods for
subnetting. Subnetting is one of those subject that a lot of Network Engineers struggle with.
But in this section I hope I'll be able to simplify for you and give you various methods.
So that any subnetting questions that you might encounter can be completed quickly and
easily.
There are 2 main parts in this section:
 In the 1st part I'm gonna show you two methods to quickly and easily answer
questions like,
 what subnet is this host on ? or
 what is a last host in this subnet?
 So, I’m gonna teach you the binary method and then
 I’m gonna teach you what I call the quick method.
I suggest that you look at both and then choose one and get good at that
specific method. I think binary is very important to understand. But as the quick
method name indicates it’s very quick and easy to answer subnetting questions
using the quick method.

 In the 2nd part I’d like to show you how to create multiple subnets when given a
specific network or subnet, so you will be able to answer questions like,
 subnet this network into at least 10 subnets or
 subnet this network into subnets each having 10 hosts on them.

Subnetting Part 1:

 So, in part 1 you'll be given an IP address and then


 you gonna need to learn how to work out the subnet address,
 1st host address,
 last host address and
 the broadcast address and
 we'll gonna use 2 methods: the binary method and the quick method, and as I
mentioned I suggest that you choose one of the two methods, look at both, decide
which one you prefer and then learn and get good at that specific method.
 So, here's the typical example:
You’ve been given a host with an address of 192.168.10.18 for the /24 mask and
you’ll need to be able to answer the following questions:
 what IP address with router 1 be configured with, this router being router 1, if it
is to use the first IP address in the same subnet as PC 1? Which is the PC here?
 The second question could be: What broadcast address is used by PC 1?
 or thirdly what IP address would router 1 be configured with if it is to use the last
IP address in the same subnet as PC1?
 So, the first question was, what IP address will the router use if it is configured with
the first IP address and the third one? Is of what IP address would it be configured
with if it were configured with the last IP address in the subnet?
 And fourthly, a question could be what subnet is PC 1 part of?
So, you should within 30 to 60 seconds be able to answer those question and I’m gonna
show you how to do that now.

Binary Method:

So, the first method is to use binary to work out the answers. I personally prefer binary
because it's used all over the place in networking. And I want you get your head around
how binary works. It will save you a lot of time in the long run.
Please refer to the binary section of this course if you are not sure about the basics of
binary. we are going to assume knowledge of binary now. we're just gonna use binary to
work out the answer to those questions.

Rules:
 In the binary method, you need to remember 4 rules;

Network Address:
 To work out the network with subnet address, you fill the host portion of the
address with binary 0's. So, you work out which part is network and which part is
host and you fill the host portion with binary 0's.

Broadcast Address:
 To work out the broadcast address, you fill the host portion of the address with
binary 1's.

First Host:
 To work out the first host in the subnet, you fill the host portion of the address
with binary 0's except for the very last bit which is set to a binary 1. And

Last Host:
 To work out the last host in the subnet, you fill the host portion of the address
with binary 1's except for the last bit which is set to binary 0.
If you remember those 4 rules, you will be able to work out the answer to any of those
questions very quickly.

Example of Part 1 Binary Method

Example - 1:
So, let’s start the basic example. We have a PC with an IP address 192.168.1.18/24 or it could
be written as 192.168.1.18 with the mask of 255.255.255.0. As you learnt in the IP addressing
section, these 2 are equivalent subnet mask. It's very similar to saying tomato or tomato or
router or router, it means the same thing it's just a different way of displaying the subnet
mask.
Now hopefully you remember that 24 means 24 bits in the subnet mask. in other word 8
bits in the first octet, 8 bits in the second octet and the 8 bits in the third octet. That means
the first 3 octets are network.
Network Address:
 So, 192.168.1 is the network portion of the address and this last octet is the host
portion and that’s how I’ve written it here.
 The first 3 octets are displayed in black, representing the network portion and the
last octet is shown in red which represents the host portion of the address.
There’s no point converting the network portion into binary. So, I’ve just left as it is, so the
subnet is equal to 192.168.1. and if you remember back to our rules to get the subnet, you
fill the host portion of the address with binary 0's
So, this is the single octet, so 8 binary 0's need to fill that host portion. If you convert 8
binary 0's back into decimal you'll get the value 0.
So, the subnet is 192.168.1.0 for this specific IP address.
First Host Address:
 To get the first host in the subnet, you fill the host portion of the address with binary
0's except for the last bit which make binary 1. So, an octet once again is 8 bits, so
there are 7 binary 0's followed by single binary 1, Converting that back to decimal
you get 1,
So, the first host in this subnet is 192.168.1.1
Last Host Address:
 To work out the last host, fill the host portion of the address with binary 1's except
for the last bit you set to binary 0. That's 7 binary 1's followed by binary 0, if you
convert that back to decimal you'll get the value 254.
So, the very last host in this subnet is 192.168.1.254
Broadcast Address:
 To get the broadcast address, fill the host portion of the address with binary 1's, so
single octet fills with binary 1's is equal to 255 in decimal.
So, there you have it. We can work out the subnet, the first host, the last host and the
broadcast address very quickly and easily using the binary method.
So, if you were asked to configure the 1st IP address in the same subnet as PC 1 on the
routers interface, you would know that you need to configure the IP address 192.168.1.1/24
or 192.168.1.1 255.255.255.0
You could be expected to type the commands onto the router to configure it with the
relevant IP address, later in this course you'll learn the commands to do that. But for now,
realize that you might need to work out first, last, broadcast and subnet addresses When
giving a specific IP address.
This is our first example using the binary method I’d like to show you more complicated
example now.

Example - 2:

So, in this example you've been given an IP address 172.16.35.123/20 or in other words
255.255.240.0. This is a little bit more complicated because the mask does not fall on the
octet boundary, in other words, it's not a simple /8 or /16 or /24 subnet.
The network and host portion lie somewhere in the third octet. So just to reiterate, /20
means that 20-bits of the 32-bit IP address which are used for networks or subnet portion
and the remaining 12 bits are used as the host portion of the address. So somewhere in the
third octet, the network host portion changes.
Step 1

So, once again our IP address is 172.16.35.123/20. Now the first octet is 8 bits in size , the
second octet is 8 bits in size. So, adding those together you get 16 bits. The third octet is 8
bits in size, so adding those 3 together gives you 24 bits.
So, /20 in the subnet mask means that the split between subnet and host occurs somewhere
in the third octet. So, once again the first octet is 8 bits, second octet is 8 bits thus 20 bits
puts the split somewhere in the third octet.

Step 2

So, what you need to do is convert the third and fourth octet into binary because they both
have host bits. There’s no need to convert the first 2 octets into binary because no host bits
are found in the first 2 octets.
So, 00100011 is the binary equivalent of decimal 35, 0 followed by 4 binary 1's followed by
0 followed by 2 binary 1's is the binary equivalent of decimal a 123. So, all we’ve done is
convert 35 and 123 into their binary equivalents. Please see the binary section of this course
if you are not sure how to convert decimal into binary and back again.
20 bits of subnet mask put us in this position because we have 8 bits plus 8 bits in the first 2
octets which give us a total of 16 binary bits plus 1 is 17 plus 1 is 18 plus 1 is 19 plus 1 is 20.
So, we can draw a line at this point to split the network and host portion
 To the left of this line, the binary bits indicate network or subnet,
 To the right of this line the binary bits indicates host.
So, there are split between network and host portions in this address at this line.

Step 3

Network Address:
So, to work out the answers you need to remember the 4 rules.
 The first rule states that, to work out the network or subnet address, you need to fill
the host portion of the address with binary 0's.
So, to the right of the line we need to fill this entire portion of the address with binary 0's.
So, once again 20 bits of subnet mask put us in this position, and we fill everything to the
right with binary 0's. So, we end up having 172.16 the first 4 bits of the third octet remain
the same and all remaining bits are set to binary 0.
When you convert that back to decimal, please note firstly that these 4 bits in red plus the
following 4 bits in green are part of the third octet. So, 0010 followed by 0000 when
converted from binary to decimal gives us a value of 32.
So, the network address is 172.16.32.0

First Host Address:


The fourth octet is filled with 0's. So, converting an octet filled with binary 0's to decimal
give us a value of 0. So, the subnet address is 172.16.32.0
 Now to work out the first host address, fill the host portion of the address with
binary 0's except for the last bit which is set to binary 1. So here you go.
The first host is equal to 172.16.0010 remember, we don’t touch this portion of the address,
we only change the host portion of the address,
 So, we fill the host portion with binary 0's except for the last bit which we set to
binary 1. Once again the third octet consist of 4 binary bits which are part of the
network or subnet and 4 binary bits which a part of the host portion. Those 4 red
binary bits together with those 4 green binary bits give us a decimal value of 32.
 The last octet is 7 binary 0's followed by single binary 1 which is equal to decimal 1,
So, the first host address is 172.16.32.1

Last Host Address:


To work out the last host address, fill the host portion of the address with binary 1's except
for the last bit which is set to binary 0.
So, the last host is equal to 172.16.0010 followed 4 binary 1's, in the third octet, followed by
7 binary 1's in the fourth octet and then lastly a binary 0.
So, the third octet consist of this 4 red bits and this 4 green bits. So, if you convert 0010
followed by four 1's into decimal, you'll get the decimal equivalent which is 47, 7 binary 1's
followed by binary 0, gives you the equivalent decimal value of 254.
So, the last host in this subnet is 172.16.47.254

Broadcast Address:
To work out the broadcast address, fill the host portion of the address with binary 1's. So,
the broadcast address is equal to 172.16.0010. Once again, the network and subnet portion
are left as is. And then you fill the host portion with binary 1's.
So, the third octet is equal to 0010 and four binary 1's which once again gives you the
decimal equivalent of 47. 8 binary 1's in octet gives you the decimal value 255.
So, the broadcast address would be 172.16.47.255

So, in summary, an address of 172.16.35.123 with the subnet mask of /20 resides on
 subnet 172.16.32.0 and
 has a broadcast address of 172.16.47.255
 The first host in the same subnet is 172.16.32.1 and
 The last host in the same subnet is 172.16.47.254
This was a slightly more complicated example, but I’m hoping that by now you have learned
the process to work out subnet first host, last host and broadcast address when given an IP
address and its subnet mask.

Example - 3:
Step 1:
Here’s one more example using the binary method and after this I’m gonna show you the
quick method.

If a PC had an address of 172.16.129.1/17 or 172.16.129.1 255.255.128.0. you would once


again need to work out where the subnet and host portions are split.
In this example /17 means that 17 bits of the 32 bits IP address are used for network or
subnet and the remaining 15 bits are used as the host portion of the address.
So, 172.16.129.1/17 means that the split takes place in the 3rd octet. The reason why once
again is the first octet is 8 bits in size, the second octet is 8 bits in size so that gives us 16
bits, 17 bits in the network or subnet means that the split between subnet and host is in the
3rd octet.

Step 2:

So, once again you need to convert the 3rd and 4th octet into binary. There’s no need to
convert the 1st 2 octet as they are part of the network or subnet portion of the address. You
only need to convert the host portion of the address into binary.
So, in binary 1 followed by 6 binary 0's followed by 1 equals 129 in decimal, 7 0's followed
by binary 1 is the binary equivalent of 1 in decimal.
Once again refer to the binary section of this course if you're not sure how to convert
decimal into binary and vice versa.

So, once again 172.16.1 is the network or subnet portion of the address and the remaining
bits of the host portion of the address.
Step 3:

Network Address:
So, to work out the network or subnet portion of the address, you need to fill the host
portion of an address with binary 0's.
So, this green portion of the address needs to be filled with 0's and that will give us the
subnet which is 172.16.1, that binary 1 is part of the network address followed by 7 0's,
followed by 8 0's.
So, in the 3rd octet we have 1 binary 1 followed by 7 binary 0's which give us the equivalent
decimal value of 128. The 4th octet is filled with binary 0's which will give us the equivalent
decimal value of 0.
So, the subnet that this host 172.16.129.1 resides on is 172.16.128.0

First Host Address:


To work out the first host in the same subnet, you need to fill the host portion with binary
0's except for the last bit which is set to binary 1.
and that would give you 172.16.128.1
Last Host Address:
To work out the last host, you fill the host portion of the address with binary 1sexcept for
the last bit which is set to binary 0
So, that would give you 172.16.255.254

Now just to make sure that you understand this, notice the 3rd octet is filled with binary 1's,
there is a single red binary 1 followed by 7 green binary 1's. That however is the single
octet, so there are 8 binary 1's which gives you a value of 255.
The 4th octet is filled with 7 binary 1's, followed by binary 0 which gives you a decimal
equivalent of 254.

Broadcast Address:
To work out the broadcast address, fill the host portion of the address with binary 1's, so
that would give you 172.16. 8 binary 1's in the 3rd octet which is 255 and 8 binary 1's on the
4th octet which is 255.
So, the broadcast address is 172.16.255.255

So, in summary, host 172.16.129.1 is on


 Subnet 172.16.128.0
 The first host in the subnet is 172.16.128.1,
 The last host in the subnet is 172.16.255.254 and
 The broadcast address is 172.16.255.255
I hope those 3 examples have helped you learn the binary method to work out the subnet,
1st host, last host and broadcast address when presented with an IP address of a host and
its subnet mask

Quick Method:
Now that we’ve seen the binary method, let me show you the quick method which allows
you very quickly to work out the answer to question like;
 what subnet is this host on,
 what is the broadcast address,
 what is the first host and
 last host in the same subnets as this specific host.

This method is reliant in you remembering tables and methods rather than relying on
binary.
So, the first table to remember is the following; the values at the top of this table like 128,
64 and so forth are the decimal equivalents for the binary values
 such as 1 followed by 7 binary 0's is equal to 128,
 3 binary 0's followed by binary 1 followed by 4 binary 0's is equal to 16.
You should be quite comfortable to write out this table from memory before attempting
any subnetting question.
So, remember it's 128, 64, 32, 16, 8, 4, 2 and 1. In the IP addressing section of this course I
explained those values in a lot of detail and explain how you get to those specific values.
So, I’m not gonna cover it again here.
To work out the values in the second line of this table, just take 256 less the top value which
will give you the second value.
 So, 256 minus 128 gives you 128
 256 minus 64 gives you 192 and so forth and so on,
 as an example, 256 minus 32 gives you 224,
 256 minus 1 gives you 255
So, you only need to remember the top values and then it’s very simple to work out the
values in the second line. A lot of people just memorize the entire table for speed and
efficiency, but once again write this table out before attempting any binary question.

Example of Part 1 Quick Method


Example - 1:

So, if you were given a host address of 172.16.35.123/20 or the decimal equivalent
255.255.240.0.
The first thing you need to work out is, why is the subnet mask is not equal to 255 and
secondly make a note of that octet, in other words that the network and host portion both
reside within that octet, with the subnet mask is not equal to 255

Step 1:

So, in this example, once again we have an address 172.16.35.123 and the subnet mask is
255.255.240.0,
So, in the 3rd octet the subnet mask is not equal to 255 but is equal to a value of 240. That
means that in this octet there is a split between the subnet and the host portions.
So, the 1st two octets are network or subnet the last octet is host but in the third octet there
is a split between subnet and host.
Step 2:

Step 2 is to subtract that subnet mask value that is now 255 from 256. So, 256 less 240
would give you 16,
what 16 tells us is that networks are incrementing in values of 16,
 So, the first network would be 0,
 second one 16,
 third one 32,
 fourth one is 48 and so forth and so on.
The 16 lets us now the increment of the networks.
Now the table I showed you in step 1 will allow you very quickly and easily to work this out,
so in the third octet we have a value of 240, So, 256 less 240 gives you 16.

So, remember in the 3rd octet the subnet mask was 240, 256 less 240 gives us 16. Notice in
the IP address the 3rd octet value is 35. So, part of 35 is network and part of 35 is host.
Step 3:

So, in step 3 we worked out where 35 fits in the range of networks worked out in step 2.
Now in step 2 we worked out that 256 less 240 is 16
So, our networks are in multiples of 16. So just start at 0 and go until you pass the value in
the question. So as an example,
 the first network would be 0 in the 3rd octet,
 the 2nd network would be 16 on the 3rd octet
 the 3rd one would be 32 and
 the 4th one would be 48.
So, 35 sits somewhere between 32 and 48 and

Step 4:

Thus, we know that 172.16.35.123 is on network 172.16.32.0


The way you work that out is to
 leave the network portion of the address the same. In other words, this blue portion
the first 2 octets remain the same,
 the subnet or host octet that lies between 32 and 48 as per our calculation in step 3
gets rounded down to the nearest value. So, 35 is between 32 and 48, and rounding
35 down we get 32. So, the 3rd octet is equivalent to 32.
 Lastly the host portion of the address is just set to 0.
So, you now know that 172.16.35.123 is on network 172.16 because the blue portion or
network portion remains the same 35 is rounded down to 32 because the subnet host
portion lies between 32 and 48 and the host portion is just set to 0,
 in other words, 172.16.32.0
It's as simple as that to work out the subnet that our hosts reside on.

Step 5:

So, just to summarize, we know that the subnets host are resides on its 172.16.32.0. We also
have work out that the next subnet in the range is 172.16.48.0. It’s important that you work
out both the subnet that the host resides on as well as the next subnet,
now just to help you with the analogy. In the real world we have an odometer in a car or
motor bike something like this picture, it will roll over from a 9 to 0. When travelling if the
right most value is 9 and you drive another kilometer or mile that will change to 0, and the
0 to the left of it, will move to 1.
 So, in a standard odometer if you had a value of, let say 7 0's and a 1 because you
got a brand-new vehicle. So that’s the distance that you've travel, let say 1 mile and
you drive another mile, the odometer will show that you have driven 7 0's 2 miles
(00000002),
 if you have driven 9 miles and you drove 1 extra mile that would display as six 0's
followed by 1 followed by 0 (00000010), in other words 10 miles,
 if you have driven 999 miles and drove in extra mile that would display as 4 0's
followed by 1 followed by 3 0's (00001000), in other words a thousand miles.
Not that you would ever do this but let say you reverse the odometer. So, you had a
thousand miles and you took 1 mile away that would give you 5 0's followed by 3
9's(00000999) in other words 999 miles.
Now as analogy we have a binary odometer.
 If you had an IP address of 10.1.1.254 and you added 1 to it the value will become
10.1.1.255 that should be very simple to understand.
 However, if you had 10.1.1.255 and added 1 to that you now get 10.1.2.0 in the
similar manner to a standard odometer in a car.
 10.1.2.0 + 1 would equate to 10.1.2.1 or if we went in reverse 10.1.2.0 – 1 would give
you 10.1.1.1.255
In a standard odometer the values can go from 0 to 9, in a binary odometer the values can
go to 0 to 255 and then I have to click over in the next octet.
Thus, if the last octet is equal to 255 and you add 1, notice the 3rd octet clicks over from 1
to 2 and the last octet clicks over to 0. So, use this analogy to help you work out the first
host, the last host and the broadcast address.

Step 6:

->So, the broadcast address is equal to the next network that we work out less 1. So, the
next network that we work out was 172.16.48.0 and if we subtract 1 from that we'll get
172.16.47.255. Just remember how the binary odometer works each octet can go from 0.255
and then it has to click over or in this example click back.
So, the broadcast address for host 172.16.35.123 is 172.16.47.255, we work this out by
leaving the network portion the same in other words the first 2 octets in blue and then the
subnet in the host portion is set to 1 less than the next network which in this case is 48.0

Step 7:
 To work out the first host in the same subnet, take your subnet and add 1 to it. So,
the subnet that we've worked out is 172.16.32.0 and if you add 1 to that . you get
172.16.32.1,
 The last host is equal to the broadcast address less 1. So, 172.16.47.255 which is our
broadcast address less 1 is equal to 172.16.47.254.
And that’s it we’ve work out the answers to the question. Now initially that might seem like
a lot of work, but you should be able to start doing examples within 30 to 60 seconds using
this method, thus, the quick method.
 So, to summarize this example 172.16.32.0 is the subnet for host 172.16.35.123 with the
subnet mask of 255.255.240.0. The broadcast is 172.16.47.255 and the first host is
172.16.32.1 and the last host is 172.16.47.254

Subnetting Part 2:

In the second part of this section we're gonna look at


 how to subdivide a network or subnet when given
 a specific number of host that would be required on a subnet or
 a specific number of subnets that are required.
So, the two scenarios when ask for specific number of host on the subnets
 you would have to subdivide a specific network or subnet that you were given into
multiple subnets that can support that number of host, or
 you may be required to subdivide a subnet into multiple subnets.
Why would this be required in the real world?. Well you might be the administrator of a
remote side and the head office has allocated US specific subnet, let say 192.168.1.0/24.
Now that is only 1 subnet, what happens if you require multiple subnets? well, you could
ask the head office to give you more subnets, but then may tell you that you don’t require
multiple subnet and that you are to subdivide that subnet into more subnets.
Now if your sites only had 2 physical segments, with let say the first segment having 3 hosts
on it and the second segment having 2 hosts on it. It’s very unlikely that the head office is
gonna allocate you 2 separates subnets, because this subnet 192.168.1.0 can support 254
hosts.
And you only have a requirement for 3 hosts on 1 segment and 2 hosts on another
segment, so you may be required to subdivide the subnet that you have been given so that
you can support this infrastructure.

Another reason to subnet is that the original classful networks like a class A network
supports 16,777,214 host per network of 10.0.0.0/8 and you had all of your host on that one
subnet, the network would die, the amount of broadcast and traffic sent on this segment
will just destroy the network. It’s not practically possible to have so many hosts on the
subnet.
A lot of network engineers will put a maximum of 254 hosts on a subnet. In other words,
they would subnet down to a class C subnet. Class B network supports 16,382 host per
subnet and once again that's far too many hosts on a subnet or network. That segment will
not operate properly with so many hosts within that subnet.
So once again we will more than likely subnet down to at least 254 hosts on the subnet,
On a point to point 1 link only 2 host addresses are required. So, it makes sense to subnet
down even further or subdivide a network down even further until you only have 2 hosts on
that subnet.
 The formula to work out how many host are supported on a subnet is 2 to n minus 2
(2^n -2) where n is number of binary bits in the host portion.
 So as an example of class A address is 32 bits in size where 8 bits is the network
portion and 24 bits is the host portion.
 So, 2 ^24 equals 16 million addresses, you subtract 2, one for the Network and one
for the Broadcast. So, 16777214 host would be support in theory on a class a
Network, in reality that would never work. It thus important that you understand
subnetting and understand this section for the real world as well as for study
purposes.

Now that we’ve explain the Why for subnetting, let’s look at the how.
I believe the best way to do the Subnetting is to use the binary method with some of the
extra shortcuts that I’m gonna show you in following slides. The binary method ensures that
you can subnet any scenario thrown at you and extra shortcuts make it quicker and easier to
do the subnetting.
 It’s important to understand that subnetting involves stealing or taking bits away
from the host portion of address and then allocating those stolen bits if you like to
the network portion of a new address.
 So, we are taking bits away from the host portion and allocating those bits to the
network portion to allow us to create multiple or new subnet out of a single subnet.
Rules:

Part 4
There are 2 important rules that you need to remember
 when asked for the number of hosts use the formula, host equals 2 to the n – 2
(2^n -2). I’ve already demonstrated that formula in the previous slide but it’s
important to remember that when looking for hosts, use this formula 2 to the n - 2,
and note please that you count the host bits from right to left
 so, we'll gonna be stealing bits from the host portion allocating those bits to the
network portion but to work out the number of hosts that can be supported on
the subnet you count the number of bits from the right-hand side to the left-
hand side,
 When asked to work out the subnets for a specific number of networks or subnets,
use the formula 2 to the n (2^n) and
 you count the network bits from the left-hand side to the right-hand side.

1. A lot of people get really confused by this. Please remember the formula for host is 2
to the n – 2 (2^n -2). The reason why we deduct 2 is that an address needs to be
allocated for the subnet and another address has to be allocated for the broadcast
address. So, you lost 2 addresses or remaining addresses can be used as addresses
applied to hosts.
2. When working out the number of networks, you do not subtract 2 you are working
out networks or subnets rather than host addresses So, you do not deduct 2 from
the formula.
3. Also remember when as for host, you count from the right to the left
4. when ask for network, you count from the left to the right.
If you don’t follow this procedure your answers will be wrong.
->Now this is another shortcut table that I would write down before starting my exam to
save on time. In the real world we obviously have calculators to help us but in the exam
there are no calculators, so you’ve got a work it out in your head.
In tables like this will save you a lot of time and effort
 2 to the power of 1 equals 2,
 2 to the power of 2 equals 4,
 2 to the power of 3 equals 8,
 2 to the power of 4 equals 16
 2 to the power of 5 equals 32 and so forth and so on
 until we get to 2 to the power of 10 which equals 1024.
Now you might not able to work this out quite comfortably, but for a sanity check I would
suggest that you write it down before starting your exam.

Example of Part 2:
Example - 1

Ok here's an example, let say ABC limited has been allocated the subnet of 10.1.1.0/24 for a
small office in London. Paul the network administrator needs to split this subnet into
smaller subnets where each subnets support 14 host or machines. He asked you to help him
because he is not quite sure how to do subnetting. So that will be an example of a scenario
that we need to solve.

Step 1:
The first thing you need to decide is which formula you will gonna use: 2 the power of n
(2^n) or 2 to the power of n – 2 (2^n – 2),
now because the question is asking for the number of hosts or machines in this example. we
use the formula 2 to the n - 2 and we also remember to count from the right-hand side to
the left-hand side.
Step 2:

So, in step 2 we need to work out how many bits are required to cover the number of host.
In this example or networks in other example, so we have been asked to support 14 host or
14 machines as seen here in the question.

To work out the number of bits that are required you can refer back to this table so 2 to the
power of 4 equals 16. Now remember, we are using the formula 2 to the n – 2 (2 ^ n – 2)
because we have been asked for hosts, so 2 to the power of 4 - 2 equals 16 - 2 which gives
us a result of 14
So, 4 binary bits will allow us to support 14 hosts per subnet. So, we now know that we
need to steal 4 bits from the host portion of the address and allocate that for the network
portion to create multiple subnets each which support 14 hosts.
Step 3:
So, in step 3 what you need to do is convert the host portion of the original network into
binary.
We were given network 10.1.1.0/24 or it could be written as 10.1.1.0 with the mask of
255.255.255.0, now the first 3 octets is network and the last octet is host base on that
subnet mask, please refer to the IP addressing section of this course if you’re not sure how
to determine which part of the address is network and which part is host. So, we are only
gonna convert the host portion of the address into binary.
For speed and efficiency purposes there is no need to convert the network portion of the
address into binary. So, our address will look as follows: 10.1.1.8 binary 0's

So, the host portion is 8 bits and we only need 4 bits in the host portion to support 14
hosts. So, counting from the right-hand side we count 4 binary bits which takes us to this
point, and we can draw a line down to differentiate between the subnet portion and the
host portion,
please note a line can also be drawn to the right of the network portion, this was the
original subnet that we were given so we cannot manipulate this portion. We can only
manipulate the host portion and allocate part of the host portion to the subnet and part of
the host portion to the new host portion.
 So, we are only giving 4 bits to the host portion and the remaining 4 bits have been
stolen and allocated to the subnet portion.
Think "S" in subnet equals "S" in stolen. So, 4 bits have been allocated to the subnet
portion.
Step 5:

The next step is to work out the new subnet mask. To work out the subnet mask you count
the number of bits that are network or subnet ignoring the host bits.
 So, from the left-hand side we gonna count the number of bits in the network
portion of the address and the number of bits in the subnet portion of the address.
Please note, these spaces are only there for clarity and not normally there as part of an
address.

->Now remember an octet is 8 bits. So, the first octet 10 is 8 bits, the second octet which is
1 is 8 bits in length, the 3rd octet which is also 1 is also 8 bits in length and the number of
bits that we've allocated to subnet is 4.
 So, we have 8 in the first octet, plus 8 in the second octet plus 8 in the third octet,
plus the 4 bits allocated to subnet in the fourth octet which gives you a total of 28
bits. So, the subnet mask is 28 bits in length.
 Now you could also do this backwards, the number of bits allocated to the host
portion is 4 bits, copy address, and so an IPv4 address is 32 bits in length less 4 bits
gives you 28 bits for the network portion or subnet portion.
Step 6:
So, the last step now is to work out the various subnets. Please remember that the network
portion is 10.1.1, the subnet portion is 4 bits in length and the host portion is 4 bits in
length. And we’ve drawn a line after the network portion and the line after the host portion.
The subnet mask is 28 bits in length which we've worked out from the previous step. So, the
first network is equal to 10.1.1 and we fill the subnet portion with 0's and the host portion is
always filled with 0's.
 So, the first network is 10.1.1.0/28 or if you convert that back to dotted decimal
notation 10.1.1.0 with the mask of 255.255.255.240.
Now to work out that various subnets you go through the various binary combination for
the subnet portion of the address, so as you've seen in the first network we set the subnet
portion to all 0's.
 To get the second network we set the subnet portion to all 0's except for the last bit
which we set to 1. So, the second network or subnet is 10.1.1. and if you convert this
octet back in to decimal notation it's 16,
 so 10.1.1.16/28, just to remind you this is a single octet even though there are
lines drawn here the green and the red portion are part of the same octet. So,
we’ve got 3 binary 0's followed by binary 1 followed by 4 binary 0's. And if you
convert that binary value into decimal value it's 16.
 So, the 2nd network is 10.1.1.16/28 or it can be written as follows in dotted
decimal notation. 10.1.1.16 255.255.255.240
 The third network, to work out the third network, you once again just go to the
various binary combination. So, the next combination would be 0010 which equates
to 32.
 Now I won't bother doing more than said the first two or three, because you will
notice the sequence here, it goes from 0 to 16 to 32 So, we are going in multiple
of 16, so the next one would be 48 and you’d be able to continue all the way to
the last subnet.
 So, I will do the first 3 or 4 and then the last 1. For the last 1 you’ll fill the subnet
portion with binary 1s. so that equals to 10.1.1.240/28 or 10.1.1.240
255.255.255.240 and that’s how you work out all the subnets from the original
question.
So how many host are supported in the subnet?
 We'll use the formula 2 to the n - 2, and there are 4 binary bits. So, 2 to the power of
4 equals 16 minus 2 equals 14 and we’ve already seen that. So, 14 hosts are
supported on every subnet.
How many subnets have we created?
 We originally had 1 subnet, but we’ve now broken it up into multiple subnets the
number of bits in the subnet portion is 4 and the formula to work out the number of
networks or subnet is 2 to the power of n. so, 2 to the power of 4 equals 16.
We have taken 1 subnet supporting 254 hosts and change that into 16 subnets each
supporting 14 hosts.

Example - 2

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.
Step 1:
You need to decide which formula to use. Please note we’ve been asked 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.
Step 2:

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.
Step 3:

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.
Step 4:

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.
Step 5:

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 marked as 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 allocate 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 portions 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.

You might also like