Subnetting

Before we start working with Subnetting ,we need to review IP Address and IP Address classes, so that we have a clear foundation for learning Subnetting -

An IP address is devided in to two parts - network portion and host portion.

Network portion is always written first in sequence.

While reading an IP address how much portion should be treated as network portion and how much portion should be treated as host portion is decided by an another address known as Subnet mask.

An IP address is always used with Subnet mask. Without subnet mask an IP address is an ambiguous address and vice versa.

Both IP address and Subnet mask consists 32 bits. These bits are divided in four octets. Octets are separated by periods and written in a sequence.

A Subnet mask can be written in two ways; in full form and in abbreviated form. In full form a decimal value of each octet is written along with IP address. In abbreviated form only the number of network bits are written along with IP address. Following table lists some examples of both types.

There are five IP classes A, B, C, D and E.

*IP addresses that begin with 0 or 127 are reserved for various functions.

Subnetting cannot be done in class D and E.

In class A, B and C first 8, 16 and 24 bits are reserved for network address respectively. In all three classes last 2 bits are reserved for host addresses.

If we exclude reserved network bits and host bits from total IP bits, we will get Subnetting eligible host bits.Subnetting can be done only in Subnetting eligible host bits.

Reserved Host Addresses

For every subnet, the first and the last IP addresses are reserved:

First IP Address = Network ID

Last IP Address = Broadcast Address. The broadcast address is used for a specific type of network traffic that is destined for every device attached to a network.

Example:

IP Address = 192.168.1.1
Subnet Mask = 255.255.255.0
Network ID = 192.168.1.0
Broadcast Address = 192.168.1.255
Usable IP's = 192.168.1.1 - 192.168.1.254

Now You have Basic Idea of IP Address and IP Address Classes, now we will start subnetting ....

What is Subnetting?

Each IP class is equipped with its own default subnet mask which bounds that IP class to have prefixed number of Networks and prefixed number of Hosts per network. Classful IP addressing does not provide any flexibility of having less number of Hosts per Network or more Networks per IP Class

.

CIDR or Classless Inter Domain Routing provides the flexibility of borrowing bits of Host part of the IP address and using them as Network in Network, called Subnetting. By using subnetting, one single Class IP address can be used to have smaller sub-networks which provides better network management capabilities.

Class A Subnetting

In Class A, only the first octet is used as Network identifier and rest of three octets are used to be assigned to Hosts (i.e. 16777214 Hosts per Network). To make more subnet in Class A, bits from Host part are borrowed and the subnet mask is changed accordingly.

For example, if one MSB (Most Significant Bit) is borrowed from host bits of second octet and added to Network address, it creates two Subnets (21=2) with (223) 8388606 Hosts per Subnet.

formula-

To Caluculate Number of Subnet - 2N, where N= The number of borrowed bits from host portion i.e. MSB.

To Caluculate Number of Host per Subnets - 2H-2, where H= Host bits.

The Subnet mask is changed accordingly to reflect subnetting. Given below is a list of all possible combination of Class A subnets −

In case of subnetting too, the very first and last IP address of every subnet is used for Subnet Number and Subnet Broadcast IP address respectively. Because these two IP addresses cannot be assigned to hosts, sub-netting cannot be implemented by using more than 30 bits as Network Bits, which provides less than two hosts per subnet.

Class B Subnetting

By default, using Classful Networking, 14 bits are used as Network bits providing (214) 16384 Networks and (216-2) 65534 Hosts. Class B IP Addresses can be subnetted the same way as Class A addresses, by borrowing bits from Host bits. Below is given all possible combination of Class B subnetting −

Class C Subnetting

Class C IP addresses are normally assigned to a very small size network because it can only have 254 hosts in a network. Given below is a list of all possible combination of subnetted Class B IP address −

IPv4 - Variable Length Subnet Masks (VLSM) : Subnetting with Examples

Internet Service Providers may face a situation where they need to allocate IP subnets of different sizes as per the requirement of customer. One customer may ask Class C subnet of IP addresses and another may ask for 10 IPs. For an ISP, it is not feasible to divide the IP addresses into fixed size subnets, rather he may want to subnet the subnets in such a way which results in minimum wastage of IP addresses.

For example- An administrator have 192.168.1.0/24 network. The suffix /24 (pronounced as "slash 24") tells the number of bits used for network address.

In this example, the administrator has four different departments with different number of hosts.

1) Sales department has 100 computers,

2)Purchase department has 50 computers,

3)Accounts has 25 computers and

4) Management has 5 computers.

The subnet(192.168.1.0/24) is having a fixed subnetmask.

Using the this fixed subnet mask the administrator cannot fulfill all the requirements of the network to give different pool ip to differnet departments

The following procedure shows how VLSM can be used in order to allocate department-wise IP addresses as mentioned in the example.

Step - 1-Sort the requirements of IPs in descending order (Highest to Lowest)

Make a list of Subnets possible. Sales=100
Purchase=50
Accounts=25
Management=5

Step - 2-Make a list of Subnets possible

Step - 3-Allocate the highest range of IPs to the highest requirement In this case the highest requirement is 100 which can be satisfied with /25 subnet , so we will assign this to Sales Department. As for this we need to borrow 1 host bit, so as per the our formula to calculate network and host bit , we have the following data-

To Caluculate Number of Subnet - 2N, where N= The number of borrowed bits from host portion i.e. MSB.

Number of Subnet ( if MSB =1 ) - 2N = 21= 2

Now We Know there will be 2 subnet , how to know which 2 networks are-

All we have to do is subtract the last nonzero octet of the subnet mask from 256.( What ever the output will be we will call it "Magic Number")

As in our case subnet mask is 255.255.255.128

So in this case our "Magic Number" will be 256-128 = "128"

We will use the "Magic Number" in the to list the subnets.

So original IP address is 192.168.1.0/24

First Network will be 192.168.1.0/25

To set second subnet just add "Magic Number" i.e 128 to the last block( in which block we are borrowing host bit ) of ip address.

so second subnet will be 192.168.1.(0+128)= 192.168.1.128/25

As if we further add 128 to 128 =256, so 256 is is not vaild , so it will have only 2 subnets (i.e 192.168.1.0/25 and 192.168.1.128/25)

Now next we need to calculate Number of Host per Subnet, formula to calculate it is as follows:

To Calculate Number of Host per Subnets - 2H-2, where H= Host bits.

In our case H=7, so Number of Host per Subnet will be 2H-2= 27-2=128-2=126. So each subnet ( 192.168.1.0/25 and 192.168.1.128/25) will have 126 hosts/per subnet as follow:

Subnet1 Subnet2
192.168.1.0/25 192.168.1.128/25 Subnet Address/Network Address
192.168.1.1-127/25 192.168.1.129-254-/25 Vaild Host Range
192.168.1.128/25 192.168.1.255/25 Broadcast Address

valid Hosts (Subnet 1): Total=126 (128-2)

192.168.1.1 ,192.168.1.2 ,192.168.1.3 ,192.168.1.4 ,192.168.1.5 ,192.168.1.6 ,192.168.1.7 ,192.168.1.8 ,192.168.1.9 ,192.168.1.10 ,192.168.1.11 ,192.168.1.12 ,192.168.1.13 ,192.168.1.14 ,192.168.1.15 ,192.168.1.16 ,192.168.1.17 ,192.168.1.18 ,192.168.1.19 ,192.168.1.20 ,192.168.1.21 ,192.168.1.22 ,192.168.1.23 ,192.168.1.24 ,192.168.1.25 ,192.168.1.26 ,192.168.1.27 ,192.168.1.28 ,192.168.1.29 ,192.168.1.30 ,192.168.1.31 ,192.168.1.32 ,192.168.1.33 ,192.168.1.34 ,192.168.1.35 ,192.168.1.36 ,192.168.1.37 ,192.168.1.38 ,192.168.1.39 ,192.168.1.40 ,192.168.1.41 ,192.168.1.42 ,192.168.1.43 ,192.168.1.44 ,192.168.1.45 ,192.168.1.46 ,192.168.1.47 ,192.168.1.48 ,192.168.1.49 ,192.168.1.50 ,192.168.1.51 ,192.168.1.52 ,192.168.1.53 ,192.168.1.54 ,192.168.1.55 ,192.168.1.56 ,192.168.1.57 ,192.168.1.58 ,192.168.1.59 ,192.168.1.60 ,192.168.1.61 ,192.168.1.62 ,192.168.1.63 ,192.168.1.64 ,192.168.1.65 ,192.168.1.66 ,192.168.1.67 ,192.168.1.68 ,192.168.1.69 ,192.168.1.70 ,192.168.1.71 ,192.168.1.72 ,192.168.1.73 ,192.168.1.74 ,192.168.1.75 ,192.168.1.76 ,192.168.1.77 ,192.168.1.78 ,192.168.1.79 ,192.168.1.80 ,192.168.1.81 ,192.168.1.82 ,192.168.1.83 ,192.168.1.84 ,192.168.1.85 ,192.168.1.86 ,192.168.1.87 ,192.168.1.88 ,192.168.1.89 ,192.168.1.90 ,192.168.1.91 ,192.168.1.92 ,192.168.1.93 ,192.168.1.94 ,192.168.1.95 ,192.168.1.96 ,192.168.1.97 ,192.168.1.98 ,192.168.1.99 ,192.168.1.100 ,192.168.1.101 ,192.168.1.102 ,192.168.1.103 ,192.168.1.104 ,192.168.1.105 ,192.168.1.106 ,192.168.1.107 ,192.168.1.108 ,192.168.1.109 ,192.168.1.110 ,192.168.1.111 ,192.168.1.112 ,192.168.1.113 ,192.168.1.114 ,192.168.1.115 ,192.168.1.116 ,192.168.1.117 ,192.168.1.118 ,192.168.1.119 ,192.168.1.120 ,192.168.1.121 ,192.168.1.122 ,192.168.1.123 ,192.168.1.124 ,192.168.1.125 ,192.168.1.126

Valid Host (Subnet 2) Total =126 (128-2)

192.168.1.129 ,192.168.1.130 ,192.168.1.131 ,192.168.1.132 ,192.168.1.133 ,192.168.1.134 ,192.168.1.135 ,192.168.1.136 ,192.168.1.137 ,192.168.1.138 ,192.168.1.139 ,192.168.1.140 ,192.168.1.141 ,192.168.1.142 ,192.168.1.143 ,192.168.1.144 ,192.168.1.145 ,192.168.1.146 ,192.168.1.147 ,192.168.1.148 ,192.168.1.149 ,192.168.1.150 ,192.168.1.151 ,192.168.1.152 ,192.168.1.153 ,192.168.1.154 ,192.168.1.155 ,192.168.1.156 ,192.168.1.157 ,192.168.1.158 ,192.168.1.159 ,192.168.1.160 ,192.168.1.161 ,192.168.1.162 ,192.168.1.163 ,192.168.1.164 ,192.168.1.165 ,192.168.1.166 ,192.168.1.167 ,192.168.1.168 ,192.168.1.169 ,192.168.1.170 ,192.168.1.171 ,192.168.1.172 ,192.168.1.173 ,192.168.1.174 ,192.168.1.175 ,192.168.1.176 ,192.168.1.177 ,192.168.1.178 ,192.168.1.179 ,192.168.1.180 ,192.168.1.181 ,192.168.1.182 ,192.168.1.183 ,192.168.1.184 ,192.168.1.185 ,192.168.1.186 ,192.168.1.187 ,192.168.1.188 ,192.168.1.189 ,192.168.1.190 ,192.168.1.191 ,192.168.1.192 ,192.168.1.193 ,192.168.1.194 ,192.168.1.195 ,192.168.1.196 ,192.168.1.197 ,192.168.1.198 ,192.168.1.199 ,192.168.1.200 ,192.168.1.201 ,192.168.1.202 ,192.168.1.203 ,192.168.1.204 ,192.168.1.205 ,192.168.1.206 ,192.168.1.207 ,192.168.1.208 ,192.168.1.209 ,192.168.1.210 ,192.168.1.211 ,192.168.1.212 ,192.168.1.213 ,192.168.1.214 ,192.168.1.215 ,192.168.1.216 ,192.168.1.217 ,192.168.1.218 ,192.168.1.219 ,192.168.1.220 ,192.168.1.221 ,192.168.1.222 ,192.168.1.223 ,192.168.1.224 ,192.168.1.225 ,192.168.1.226 ,192.168.1.227 ,192.168.1.228 ,192.168.1.229 ,192.168.1.230 ,192.168.1.231 ,192.168.1.232 ,192.168.1.233 ,192.168.1.234 ,192.168.1.235 ,192.168.1.236 ,192.168.1.237 ,192.168.1.238 ,192.168.1.239 ,192.168.1.240 ,192.168.1.241 ,192.168.1.242 ,192.168.1.243 ,192.168.1.244 ,192.168.1.245 ,192.168.1.246 ,192.168.1.247 ,192.168.1.248 ,192.168.1.249 ,192.168.1.250 ,192.168.1.251 ,192.168.1.252 ,192.168.1.253 ,192.168.1.254

Note-As we will use the Subnet 1 (i.e. 192.168.1.0/25)for the Sales Department which requires 100 host , so first subnet total vaild host is 126 so 126-100=26 ip address is wastage , this is the limitation of Subnetting that you can not use the full capacity , but this 26 ips can be used in future if sales department require more IPs in future , then you can give from this range.

So with subnetting we have 2 subnet , subnet 1 (192.168.1.0/25) we have used In sales , remaining subnet 2(i.e 192.168.1.128/25) we will use to fullfil the other department IP requirement.

Step - 4-Allocate the Next highest range of IPs to the Next Highest requirement

Now next highest range is 192.168.1.128/25 and our we require 50 ip for Purchase department,

Now again we need to repeat the same steps which we have done for Sale department(Difference is ealier we have a pool of 192.168.1.0/24 , now we have a pool of 192.168.1.128/25 )

Make a list of Subnets possible

As we need 50 ip so it can be full filled with /26 so we will assign 192.168.1.128 /26 (255.255.255.192) to the Purchase department.

This IP subnet with Network number 192.168.1.128 has 62 valid Host IP Addresses which can be easily assigned to all the PCs of the Purchase department.The subnet mask used has 11000000 in the last octet.

To Caluculate Number of Subnet - 2N, where N= The number of borrowed bits from host portion i.e. MSB.

Number of Subnet ( if MSB =1 ) - 2N = 21= 2

Now We Know there will be 2 subnet , how to know which 2 networks are-

All we have to do is subtract the last nonzero octet of the subnet mask from 256.( What ever the output will be we will call it "Magic Number")

As in our case subnet mask is 255.255.255.192

So in this case our "Magic Number" will be 256-192 = "64"

We will use the "Magic Number" in the to list the subnets.

So original IP address is 192.168.1.128/25

First Network will be 192.168.1.128/26

To set second subnet just add "Magic Number" i.e 64 to the last block( in which block we are borrowing host bit ) of ip address.

so second subnet will be 192.168.1.(128+64)= 192.168.1.192/26)

As if we further add 64 to 192 =256, so 256 is is not vaild , so it will have only 2 subnets (i.e 192.168.1.128/26 and 192.168.1.192/25)

Now next we need to calculate Number of Host per Subnet, formula to calculate it is as follows:

To Calculate Number of Host per Subnets - 2H-2, where H= Host bits.

In our case H=6, so Number of Host per Subnet will be 2H-2= 26-2=64-2=62. So each subnet ( 192.168.1.128/26 and 192.168.1.192/26) will have 62 hosts/per subnet as follow:

Subnet1 Subnet2
192.168.1.128/26 192.168.1.192/26 Subnet Address/Network Address
192.168.1.129-190/26 192.168.1.193-254-/26 Vaild Host Range
192.168.1.191/26 192.168.1.255/26 Broadcast Address

valid Hosts (Subnet 1): Total 62 (64-2)

,192.168.1.129 ,192.168.1.130 ,192.168.1.131 ,192.168.1.132 ,192.168.1.133 ,192.168.1.134 ,192.168.1.135 ,192.168.1.136 ,192.168.1.137 ,192.168.1.138 ,192.168.1.139 ,192.168.1.140 ,192.168.1.141 ,192.168.1.142 ,192.168.1.143 ,192.168.1.144 ,192.168.1.145 ,192.168.1.146 ,192.168.1.147 ,192.168.1.148 ,192.168.1.149 ,192.168.1.150 ,192.168.1.151 ,192.168.1.152 ,192.168.1.153 ,192.168.1.154 ,192.168.1.155 ,192.168.1.156 ,192.168.1.157 ,192.168.1.158 ,192.168.1.159 ,192.168.1.160 ,192.168.1.161 ,192.168.1.162 ,192.168.1.163 ,192.168.1.164 ,192.168.1.165 ,192.168.1.166 ,192.168.1.167 ,192.168.1.168 ,192.168.1.169 ,192.168.1.170 ,192.168.1.171 ,192.168.1.172 ,192.168.1.173 ,192.168.1.174 ,192.168.1.175 ,192.168.1.176 ,192.168.1.177 ,192.168.1.178 ,192.168.1.179 ,192.168.1.180 ,192.168.1.181 ,192.168.1.182 ,192.168.1.183 ,192.168.1.184 ,192.168.1.185 ,192.168.1.186 ,192.168.1.187 ,192.168.1.188 ,192.168.1.189 ,192.168.1.190

valid Hosts (Subnet 2) : Total 62 (64-2)

192.168.1.193 ,192.168.1.194 ,192.168.1.195 ,192.168.1.196 ,192.168.1.197 ,192.168.1.198 ,192.168.1.199 ,192.168.1.200 ,192.168.1.201 ,192.168.1.202 ,192.168.1.203 ,192.168.1.204 ,192.168.1.205 ,192.168.1.206 ,192.168.1.207 ,192.168.1.208 ,192.168.1.209 ,192.168.1.210 ,192.168.1.211 ,192.168.1.212 ,192.168.1.213 ,192.168.1.214 ,192.168.1.215 ,192.168.1.216 ,192.168.1.217 ,192.168.1.218 ,192.168.1.219 ,192.168.1.220 ,192.168.1.221 ,192.168.1.222 ,192.168.1.223 ,192.168.1.224 ,192.168.1.225 ,192.168.1.226 ,192.168.1.227 ,192.168.1.228 ,192.168.1.229 ,192.168.1.230 ,192.168.1.231 ,192.168.1.232 ,192.168.1.233 ,192.168.1.234 ,192.168.1.235 ,192.168.1.236 ,192.168.1.237 ,192.168.1.238 ,192.168.1.239 ,192.168.1.240 ,192.168.1.241 ,192.168.1.242 ,192.168.1.243 ,192.168.1.244 ,192.168.1.245 ,192.168.1.246 ,192.168.1.247 ,192.168.1.248 ,192.168.1.249 ,192.168.1.250 ,192.168.1.251 ,192.168.1.252 ,192.168.1.253

As we will use the Subnet 1(i.e 192.168.1.128/26)for the Purchase Department which requires 50 host , so first subnet total vaild host is 62 so 62-50=12 ip address are currently of no use , this is the limitation of Subnetting that you can not use the full capacity , but this 12 ips can be used in future if sales Purchase require more IPs in future , then you can give from this range.

So with subnetting we have 2 subnet , subnet 1 (192.168.1.128/26) we have used In Purchase , remaining subnet 2 (i.e 192.168.1.192/26) we will use to fullfil the other department IP requirement.

Step - 5-Allocate the Next highest range of IPs to the Next Highest requirement

Now next highest range is 192.168.1.192/26 and our we require 25 ip for Account department,

Now again we need to repeat the same steps which we have done for Sale/Purchage department now we have a pool of 192.168.1.192/26 )

Make a list of Subnets possible

As we need 25 ip so it can be full filled with /27 so we will assign 192.168.1.192 /27 (255.255.255.224) to the Account department.

This IP subnet with Network number 192.168.1.192/27 has 30 valid Host IP Addresses which can be easily assigned to all the PCs of the Account department.The subnet mask used has 11100000. in the last octet.

To Caluculate Number of Subnet - 2N, where N= The number of borrowed bits from host portion i.e. MSB.

Number of Subnet ( As MSB =1 ) - 2N = 21= 2

Now We Know there will be 2 subnet , how to know which 2 networks are-

All we have to do is subtract the last nonzero octet of the subnet mask from 256.( What ever the output will be we will call it "Magic Number")

As in our case subnet mask is 255.255.255.224

So in this case our "Magic Number" will be 256-224 = "32"

We will use the "Magic Number" in the to list the subnets.

So original IP address is 192.168.1.192/26

First Network will be 192.168.1.192/27

To set second subnet just add "Magic Number" i.e 32 to the last block( in which block we are borrowing host bit ) of ip address.

so second subnet will be 192.168.1.(192+32)= 192.168.1.224/26)

As if we further add 32 to 224 =256, so 256 is is not vaild , so it will have only 2 subnets (i.e 192.168.1.192/27 and 192.168.1.224/27)

Now next we need to calculate Number of Host per Subnet, formula to calculate it is as follows:

To Calculate Number of Host per Subnets - 2H-2, where H= Host bits.

In our case H=5, so Number of Host per Subnet will be 2H-2= 25-2=32-2=30. So each subnet ( 192.168.1.192/27 and 192.168.1.224/26) will have 30 hosts/per subnet as follow:

Subnet1 Subnet2
192.168.1.192/27 192.168.1.224/27 Subnet Address/Network Address
192.168.1.193-222/27 192.168.1.225-253-/27 Vaild Host Range
192.168.1.223/27 192.168.1.254/27 Broadcast Address

valid Hosts (Subnet 1): Total 30 (32-2)

192.168.1.193 ,192.168.1.194 ,192.168.1.195 ,192.168.1.196 ,192.168.1.197 ,192.168.1.198 ,192.168.1.199 ,192.168.1.200 ,192.168.1.201 ,192.168.1.202 ,192.168.1.203 ,192.168.1.204 ,192.168.1.205 ,192.168.1.206 ,192.168.1.207 ,192.168.1.208 ,192.168.1.209 ,192.168.1.210 ,192.168.1.211 ,192.168.1.212 ,192.168.1.213 ,192.168.1.214 ,192.168.1.215 ,192.168.1.216 ,192.168.1.217 ,192.168.1.218 ,192.168.1.219 ,192.168.1.220 ,192.168.1.221 ,192.168.1.222

valid Hosts (Subnet 2): Total 30 (32-2)

192.168.1.225 ,192.168.1.226 ,192.168.1.227 ,192.168.1.228 ,192.168.1.229 ,192.168.1.230 ,192.168.1.231 ,192.168.1.232 ,192.168.1.233 ,192.168.1.234 ,192.168.1.235 ,192.168.1.236 ,192.168.1.237 ,192.168.1.238 ,192.168.1.239 ,192.168.1.240 ,192.168.1.241 ,192.168.1.242 ,192.168.1.243 ,192.168.1.244 ,192.168.1.245 ,192.168.1.246 ,192.168.1.247 ,192.168.1.248 ,192.168.1.249 ,192.168.1.250 ,192.168.1.251 ,192.168.1.252 ,192.168.1.253

As we will use the Subnet 1(i.e 192.168.1.192/27)for the Account Department which requires 25 host , so first subnet total vaild host is 30 so 32-25=7 ip address are currently of no use , this is the limitation of Subnetting that you can not use the full capacity , but this 7 ips can be used in future if sales Account require more IPs in future , then you can give from this range.

So with subnetting we have 2 subnet , subnet 1 (192.168.1.192/27) we have used In Account , remaining subnet 2 (i.e 192.168.1.224/27) we will use to fullfil the other department IP requirement.

Step - 6-Allocate the Next highest range of IPs to the Next Highest requirement

Now next highest range is 192.168.1.224/27 and our we require 5 ip for Management department,

Now again we need to repeat the same steps which we have done for Sale/Purchage/Account department now we have a pool of 192.168.1.224/27 )

Make a list of Subnets possible

As we need only 5 ip so it can be full filled with /29 so we will assign 192.168.1.224 /29 (255.255.255.224) to the Management department.

This IP subnet with Network number 192.168.1.224/29 has 8 valid Host IP Addresses which can be easily assigned to all the PCs of the Account department.The subnet mask used has 11111000. in the last octet.

To Caluculate Number of Subnet - 2N, where N= The number of borrowed bits from host portion i.e. MSB.

Number of Subnet ( As MSB =2 ) - 2N = 22= 4

Now We Know there will be 4 subnet , how to know which 4 networks are-

All we have to do is subtract the last nonzero octet of the subnet mask from 256.( What ever the output will be we will call it "Magic Number")

As in our case subnet mask is 255.255.255.248

So in this case our "Magic Number" will be 256-248 = "8"

We will use the "Magic Number" in the to list the subnets.

So original IP address is 192.168.1.224/27

First Network will be 192.168.1.224/29

To set second subnet just add "Magic Number" i.e 8 to the last block( in which block we are borrowing host bit ) of ip address.

so second subnet will be 192.168.1.(224+8)= 192.168.1.232/29)

3rd subnet will be 192.168.1.(232+8)= 192.168.1.240/29)

4th subnet will be 192.168.1.(240+8)= 192.168.1.248/29)

As if we further add 8 to 248 =256, so 256 is is not vaild , so it will have 4 subnets (i.e 192.168.1.224/29 , 192.168.1.232/29 ,192.168.1.240/29 and 192.168.1.248 /29)

Now next we need to calculate Number of Host per Subnet, formula to calculate it is as follows:

To Calculate Number of Host per Subnets - 2H-2, where H= Host bits.

In our case H=3, so Number of Host per Subnet will be 2H-2= 23-2=8-2=6 So each subnet ( 192.168.1.224/29 , 192.168.1.232/29 ,192.168.1.240/29 and 192.168.1.248/29) will have 30 hosts/per subnet as follow:

Subnet1 Subnet2 Subnet3 Subnet4
Subnet Address/Network Address 192.168.1.224/29 192.168.1.232/29 192.168.1.240/29 192.168.1.248/29
Vaild Host Range 192.168.1.225-230/29 192.168.1.233-238-/29 192.168.1.241-246/29 192.168.1.249-254-/29
Broadcast Address 192.168.1.231/29 192.168.1.239/29 192.168.1.247/29 192.168.1.254/29

valid Hosts (Subnet 1): Total 6 (8-2)

192.168.1.225 ,192.168.1.226 ,192.168.1.227 ,192.168.1.228 ,192.168.1.229 ,192.168.1.230

valid Hosts (Subnet 2): Total 6 (8-2)

192.168.1.233 ,192.168.1.234 ,192.168.1.235 ,192.168.1.236 ,192.168.1.237 ,192.168.1.238

valid Hosts (Subnet 3): Total 6 (8-2)

192.168.1.241 ,192.168.1.242 ,192.168.1.243 ,192.168.1.244 ,192.168.1.245 ,192.168.1.246

valid Hosts (Subnet 4): Total 6 (8-2)

192.168.1.249 ,192.168.1.250 ,192.168.1.251 ,192.168.1.252 ,192.168.1.253 ,192.168.1.254

As we will use the Subnet 1(i.e 192.168.1.224/29)for the Management Department which requires 5 host , so first subnet total vaild host is 6 so 6-5=1 ip address are currently of no use , this is the limitation of Subnetting that you can not use the full capacity , but this 1 ips can be used in future if Management Account require more IPs in future , then you can give from this range.

So with subnetting we have 4 subnet , subnet 1 (192.168.1.224/29) we have used In Account , remaining subnet 3 (i.e 192.168.1.232/29,192.168.1.240/29 and 192.168.1.248/29 ) we can use in future.

Conclusion -

The benefit of Subnetting-- Initially an administrator have 192.168.1.0/24 network and his requirement was to distribute it with 4 deparemnt as without subnetting it is not possilbe to distribute it into 4 network as its subnet mask is fixed,so if he use this pool is Sales department ,then he need a different pools for other department and if he use entire pool in sale department then he is going to lose 154 IP address , as with /24 it is having a capacity to have 254 vaild host ,so 254-100=154 Waste ip . Futhermore we require 3 more pools for Purchase/Account/Manangement department.

With the use of subnetting we have divided a single pool into 4 differnet pool and now we can utilization it, as per the requirement ,so that IP address wastage will be minimum.

The following Figure ,you can understand ,how we have divided the Main Pool with the use of Subnetting -