i

CCNA

Create Subnets

How to Create subnets ?

Different method to create subnets. In our example we will subnet a class C Address 192.168.0.0 that, by default, has 24 subnet bits and has 8 host bits.

Question arise while creating subnet,

1. First How many subnets do we need?

Power of x use as 2x= number of subnets. Here x is the number of 1s in our subnet mask. Where 1 subnet bit, we can have power of 21 or 2 subnets. Having 2 bits, 22 or 4 subnets, with 3 bits, 23 or 8 subnets so on.

2. Next need to find that How many hosts per subnet do we need?

2y – 2 = The number of hosts per subnet. y is number of 0s in the subnet mask.

Subnetting example as calculated

Now First understand the subnetting concept. Suppose we need to subnet of class C address 192.168.0.0/24. We require two subnets with 50 hosts per subnet. Here is calculation:

Since we need only two subnets, we need 21 power subnet bits. In our case, means we will borrow one bit from the host part. Calculation as follow:-

First have a class C address 192.168.0.0 with the subnet mask of 24. Now let’s convert them to binary:

192.168.0.0 = 11000000.10101000.00000000.00000000
255.255.255.0 = 11111111 .11111111 . 11111111 .00000000

Now need to take covert a single zero from the host part of the subnet mask. Now our new subnet mask:

255.255.255.128 = 11111111.11111111.11111111.10000000

Remember, the the subnet mask represent the network.

2. As we require 50 hosts per subnet. As we took one bit from the host part, and left with seven bits for the hosts. Now is it enough for 50 hosts? Now the Formula to calculate the number of hosts is 2y – 2, as we know with y representing the number of Host bits. Since 27 – 2 that is 126, we have more than enough bits for our hosts.

3. Now Our network will look like as:

192.168.0.0/25 – First Subnet has the subnet number of IP 192.168.0.0. The range of IP addresses in this subnet is 192.168.0.0 to 192.168.0.127. Now 192.168.0.128/25 – The second subnet has subnet number of 192.168.0.128. The range of IP addresses in this subnet is 192.168.0.128 to 192.168.0.255.

CIDR stands for Classless inter-domain routing

CIDR - Classless inter-domain routing is method of public IP address assignment. with the following goals and features,

To overcome with the IPv4 address exhaustion situation problem

To Slow down the increasing demand of routing tables on Internet routers

Before the CIDR, the public IP addresses were assigned based on the class ranges:

  • Class A – Classful subnet mask is 8 or /8. The number of possible IP addresses is 16,777,216.

  • Class B – the Classful subnet mask is 16 or /16. The number of addresses is 65,536.

  • Class C – the Classful subnet mask is 24 or /24. Available address is 256.

The number of usable IP addresses can calculated with the following equation.

Calculated using 2 to the power of host bits – 2

In the previous example, the we found 14 usable IP addresses from the 190.5.4.16 to 190.5.4.32 IP range because there are 4 host bits and 2 to the power of 4 minus 2 is 14. As we know the first and the last address are the network address and the broadcast address respectively. All IP Address inside the range could be assigned to Internet hosts