You are on page 1of 6

How to Subnet using Binary Patterns

You are given and ip address and a subnet mask. (It does not matter what as you will work it all out in binary)

200.97.125.176 ip address
255.255.255.0 subnet mask (can also be written /24 - meaning the first 24 bits of your ip address are network bits)

You will always follow these steps in any subnetting problem you come across. It always works. You will reach a point where
you will look at something and automatically apply the steps in your head and pick up where you need to in the steps. For now
it is best to work thru every step by writing it out.

Step 1 – determine what class of ip address you have.


Convert the first octet to binary (200)

11001000

Remember the chart –

Class A - all class A addresses begin with 0


Class B - all class B addresses begin with 10
Class C - all class C addresses begin with 110

Class A - 0-127
Class B - 128-191
Class C - 192-223

So looking at the binary in the first octet you have a class C address.

Step 2 – what is the default subnet mask for the class of address you have

Again go back to the chart –

Default Subnet Masks


Class A - 255.0.0.0 or /8
Class B - 255.255.0.0 or /16
Class C - 255.255.255.0 or /24
In this case you have a Class C ip address so the default subnet mask is going to be 255.255.255.0 or /24

Step 3 – Now what is it that you are being requested to do something with the ip address? What is the question that needs to be
solved? It is at this point that you will work the problem out in one of several ways, depending on what you need to do with the
address follow one of the following paths.

Regardless of what path, you first need to find out which ip address bits are network bits and which are host bits.

In the example above convert the entire ip address into binary.

11001000.01100001.01111101.10110000

Next put the subnet mask under the ip address (change the subnet mask into binary)

11001000.01100001.01111101.10110000
11111111.11111111.11111111.00000000

Apply the rules!!!!!


Rule 1 --- Where the subnet mask is all 1’s - that part of the ip address are network bits
Rule 2 --- Where the subnet mask is all 0’s - that part of the ip address are host bits

So I will place a line between the network bits and the host bits and label each side.

Network Bits Host Bits

11001000.01100001.01111101.10110000
11111111.11111111.11111111.00000000
IMPORTANT TO REMEMBER!!!!!! The network bits of the ip address will not change when you subnet from this point on.
You do not need to work or do anything with them, they remain the same!!!!!!!! You will be working with the host bits only
from this point on. It is true for a Class A, B, or C address. Always start your subnetting at this point. This will also tell you if
the ip address has already been subnetted. If it has you are subnetting a subnet (yes you can do that, it is done all the time).
You just need to be able to recognize it.

You will be answering the following questions using any given information. The given information will change so your starting
point will depend on the information you are given.

Class Address
Default Subnet Mask
Actual (new) Subnet Mask
How many host bits do you need
How many network bits do you need
With the number of host bits how many host bits do you have for each network
With the number of network bits you have how many either total networks or useable networks will you have
What is the host range

Note: useable hosts and total hosts will always be the same 2ⁿ - 2 (n is the number of host bits)
Note: total networks is 2ⁿ and useable networks is 2ⁿ - 2 (again n is the number of network bits)

You will be given and ip address or network address (this is your starting point)
With this you can provide the class address and the default subnet mask (you will always have this information)

Next if you are given a subnet mask that is not the default (you have the actual subnet mask)
Convert your ip address or network address into binary
Next draw a line between the network bits and the host bits
Label the network side and the host side
(now mark out the default network bits as those will not change – see default subnet mask for this)

It will look like this: (ip address we began with converted to binary)

11001000.01100001.01111101.10110000
11001000.01100001.01111101.10110000
11111111.11111111.11111111.00000000

This is the default so the first 3 octets are not going to be worked with. You are working with the last octet or 8 bits.

Now if you had been given a mask of /27 it would look like this:

11001000.01100001.01111101.101 10000
11111111.11111111.11111111.111 00000

The red line is the default subnet mask the blue line is the actual subnet mask.

You network bits are the bits between the red and blue line, your host bits are the ones to the right of the blue line.

In this case you would have the actual subnet mask answer (just convert the subnet mask to decimal – 255.255.255.224

You also now have the answer to how many network bits and how many host bits.
Network bits = 3
Host bits = 5

Next you determine the networks:


Taking 3 bits you have the following combinations:

000
001
010
011
100
101
110
111
Next apply the rule for the definition of a network (see above)

000 00000
001 00000
010 00000
011 00000
100 00000
101 00000
110 00000
111 00000

Next convert to decimal for the networks:

.0
.32
.64
.96
.128
.160
.192
.224

The first 3 octets for all will be 200. 97.125 the last octet will be the numbers above.
Next if they ask for useable you lose the first and last networks
If they ask any other way then all the networks are available.

You now know the networks:

The next step is to figure out the broadcasts:

Again follow the rule above: (all host bits are ones)
000 11111
001 11111
010 11111
011 11111
100 11111
101 11111
110 11111
111 11111

Convert to decimal

.31
.63
.95
.127
.159
.161
.255

Again the firs three octets remain the same. 200. 97.125

Now you know the broadcast for each network.

The host range is everything inbetween.

And you should not also be able to answer what network is the original ip address on.

You might also like