# Subnetting Tutorial – Subnetting Made Easy

Calculate how many networks and hosts-per-subnet

In our example, you may raise a question: “when we borrow 8 bits, how many sub-networks and how many hosts per sub-network do it create?”

Note: From now, we will call sub-networks “subnets”. This term is very popular so you should be familiar with it.

**How many new subnets?**

Because we can change any bit in the second octet to create a new subnet, each bit can be “0” or “1” so with this subnet mask (255.255.0.0) we can create 2^{8} more subnets. From here we can deduce the formula to calculate the newly created subnets. Suppose n is the number of bits we borrow:

The number of newly created subnets = 2^{n} |

In our example, we borrow 8 bits so we will have 2^{n} = 2^{8} = 256 subnets!

**How many hosts per subnet?**

The number of hosts per subnet is depended on the Host part, which is indicated by the “0” part of the subnet mask. So suppose k is the number of bits “0” in the subnet mask. The formula to calculate the number of hosts is 2^{k}. But notice that with each subnet, there are two addresses we can’t assign for hosts because they are used for network address & broadcast address. Thus we must subtract the result to 2. Therefore the formula should be:

The number of hosts per subnet = 2^{k} – 2 |

In our example, the number of bit “0” in the subnet mask 255.255.0.0 (in binary form) is 16 so we will have 2^{k} – 2 = 2^{16} – 2 = 65534 hosts-per-subnet!

Some other examples

Well, practice makes perfect so we should have some more exercises to be familiar with them. But remember that this is only the beginning in your journey to become a subnetting guru :)

Exercise 1

Your company has just been assigned the network 4.0.0.0. How many subnets and hosts-per-subnet you can create with a subnet mask of 255.255.255.0?

(Please try to solve by yourself before reading the solution ^^)

Solution

First of all you have to specify which class this network belongs to. According to Table 1, it belongs to class A (simply, class A ranges from 1 to 126) and its default subnet mask is 255.0.0.0. Therefore if we use a subnet mask of 255.255.255.0, it means we borrowed 16 bits (to convert from 0 to 1).

255.0.0.0 = 1111 1111.0000 0000.0000 0000.0000 0000

255.255.255.0 = 1111 1111.1111 1111.1111 1111.0000 0000

Now use our above formulas to find the answers:

The number of newly created subnets = 2^{16} = 65536 (with 16 is the borrowed bits)

The number of hosts per subnet = 2^{8} – 2 = 254 (with 8 is the bit “0”s left in the 255.255.255.0 subnet mask)

Exercise 2

Your company has just been assigned the network 130.0.0.0. How many subnets and hosts-per-subnet you can create with a subnet mask of 255.255.128.0?

(Please try to solve by yourself before reading the solution ^^)

Solution

130.0.0.0 belongs to class B with the default subnet mask of 255.255.0.0. But is the subnet mask of 255.255.128.0 strange? Ok, let’s write all subnet masks in binary:

255.255.128.0 = 1111 1111.1111 1111.1000 0000.0000 0000

This is a valid subnet because all bit “1”s and “0”s are successive. Comparing to the default subnet mask, we borrowed only 1 bit:

255.255.0.0 = 1111 1111.1111 1111.0000 0000.0000 0000

Therefore:

The number of newly created subnets = 2^{1} = 2 (with 1 is the borrowed bits)

The number of hosts per subnet = 2^{15} – 2 = 32766 (with 15 is the bit “0”s left in the 255.255.128.0 subnet mask)

Exercise 3

Your company has just been assigned the network 198.23.16.0/28. How many subnets and hosts-per-subnet you can create with a subnet mask of 255.255.255.252?

(Please try to solve by yourself before reading the solution ^^)

Solution

In this exercise, your company was given a “subnetted” network from the beginning and it is not using the default subnet mask. So we will compare two subnet masks above:

/28 = 1111 1111.1111 1111.1111 1111.1111 0000 (=255.255.255.240)

255.255.255.252 = 1111 1111.1111 1111.1111 1111.1111 1100 (= /30)

In this case we borrowed 2 bits. Therefore:

The number of newly created subnets = 2^{2} = 4 (with 2 is the borrowed bits)

The number of hosts per subnet = 2^{2} – 2 = 2 (with 2 is the bit “0”s left in the 255.255.255.252 subnet mask)

In this exercise I want to go a bit deeper into the subnets created. We learned there are 4 created subnets but what are they? To find out, we should write all things in binary:

Because two subnet masks (/28 & /30) only affect the 4th octet so we don’t care about the first three octets. In the 4th octet we are allowed to change 2 bits (in the green box) of the IP address to create a new subnet. So there are 4 values we can use: 00, 01, 10 & 11. After changing, we convert them back to decimal numbers. We get 4 subnets:

+ First subnet: 198.23.16.0/30 (the 4th octet is 00000000)

+ Second subnet: 198.23.16.4/30 (the 4th octet is 00000100)

+ Third subnet: 198.23.16.8/30 (the 4th octet is 00001000)

+ Fourth subnet: 198.23.16.12/30 (the 4th octet is 00001100)

So how about hosts per subnet? Please notice that all these 4 subnets are successive. So we can deduce the range of these subnets:

+ First subnet: ranges from 198.23.16.0 to 198.23.16.3

+ Second subnet: ranges from 198.23.16.4 to 198.23.16.7

+ Third subnet: ranges from 198.23.16.8 to 198.23.16.11

+ Fourth subnet: ranges from 198.23.16.12 to 198.23.16.15

Let’s analyze the first subnet which ranges from 198.23.16.0 to 198.23.16.3. Notice that all networks (and subnets) have a network address and a broadcast address. In this case, the network address is 198.23.16.0 and the broadcast address is 198.23.16.3 and they are not assignable or usable for hosts. This is the reason why we have to subtract 2 in the formula “The number of hosts per subnet = 2^{k} – 2″. After eliminating these 2 addresses we have 2 addresses left (which are 198.23.16.1 & 198.23.16.2) as calculated above.

In the next part we will learn how to calculate subnet quickly. This is also a “must” requirement for CCNA so you have to grasp it.

thank you very much

thnx for all

There are 500 hosts in a local-network which has no external connection. Due to some administrative requirements the network should be configured to run in five different groups. Such that in each group there will be 100 hosts. However, host should be able to communicate with all the other hosts in its group, but should not be able to communicate with the hosts in other groups. That is to say, each host should perceive the network as if only its group members (199 member hosts) are sharing the network. The network infrastructure is star-type (with switches), fixed (can not be altered). Logical design of the network is shown in the figure below.

There are 500 hosts in a local-network which has no external connection. Due to some administrative requirements the network should be configured to run in five different groups. Such that in each group there will be 100 hosts. However, host should be able to communicate with all the other hosts in its group, but should not be able to communicate with the hosts in other groups. That is to say, each host should perceive the network as if only its group members (99 member hosts) are sharing the network. The network infrastructure is star-type (with switches), fixed (can not be altered). Logical design of the network is shown in the figure below.

2. There are 500 hosts in a local-network which has no external connection. Due to some administrative requirements the network should be configured to run in five different groups. Such that in each group there will be 100 hosts. However, host should be able to communicate with all the other hosts in its group, but should not be able to communicate with the hosts in other groups. That is to say, each host should perceive the network as if only its group members (99 member hosts) are sharing the network. The network infrastructure is star-type (with switches), fixed (can not be altered). Logical design of the network is shown in the figure below.

Propose a network-layer solution for the problem stated above andclearly explain the solution.

OK

I’d like to get the latest dumps to use as a guide for study. If anyone has recently taken exam, please let me know what sims they are using also. Please send me the latest dumps. Thank You {email not allowed}

Please send latest CCNA dumps for study guide and what sims are recent. oahu4me at yahoo.com

Hi guys, if possible can you please send me CCNA 200-125 dumps, email: siya.nxuseka at gmail.com

Please send me the latest dumps off CCNA. email sofi.moomin20 at gmail.com

nice

Instead of asking for CCNA dumps, try studying the literature.

nicely described …… new to CCNA and as usual subnetting is kinda tough for new students like me,but this websites helps me alot.

Need help#

Suppose You have a big company of 63 hosts per network. You are the System Administrator of your company. You have to plan the addressing scheme. Your are given IP 172.72.157.253 And your Dept. (Engtneering) uses Subnet N 399.

Q. What will be the Subnet bit?

ohhhh

thank you!!

I think exercise 3 is wrong it should be total subnet of 64 cos 6 bits was borrowed not 2 bits as you have mentioned. Just my opinion kindly review. thanks

Exercise 3

Your company has just been assigned the network 198.23.16.0/28. How many subnets and hosts-per-subnet you can create with a subnet mask of 255.255.255.252?

Hi guys, if possible can you please send me CCNA 200-125 dumps, email: talgatkk at gmail.com

I DONOT SEE THIS”Special Note (25th-Aug-2017): We have just added some new questions to the specific topics under “CCNA 200-125” category at the right-side menu so please study all of them. These questions cover about 95% to 97% the questions in the exam.” CAN SOMEONE SEND THESE QUESTIONS TO SRSH89I AT GMAIL DOT COM.

@sri: For example: new questions 4,5,6 at http://www.9tut.com/snmp-questions

You just need to learn all the questions at the right-side menu under “CCNA 200-125”.

hi, can you please send me CCNA 200-125 dumps

{email not allowed}

hi, can you please send me CCNA 200-125 dumps

aurasilva13 at hotmail.com

thank you

Good day all, please kindly send me CCNA latest dumps

this is my email: {email not allowed}. Thanks

exercise 3 it should be total subnet of 64 and 6 bits was borrowed not 2 bits my friend

THANKS iam very grateful

Hi, can anyone send latest dumps of CCNA 200-125 & 210-260.

mushaffalanka at gmail com

thanks

i need more explanation regarding subnetting