So guys, next we will going to discuss how to compute the maximum number of machines that can be present in a given subnet
right!!
So in order to compute this value
So this is actually very simple
for a given mask value 24
Whatever result you get is the maximum number of machines that can be placed in that particular subnet
Now you must be thinking that why we have certain limitations
What is actually limiting us from connecting as many machines as we want to a given subnet.
so we will going to discuss that shortly that what is actually
Limiting us from adding more and more machines to the same subnet
So precisely saying that 254 is
Not the maximum number of machines that can be connected to a subnet
But actually it is the maximum number of interfaces that can be connected to our subnet
A device can have multiple interfaces and all of those interfaces can be connected to the same subnet
Right
So it is precisely the maximum number of interfaces that could be connected to the same subnet
So we just have to apply this formula to get the maximum number of machines that could be connected to the subnet
Now there is one thing that you should note here the concept of control bits
right
so if the mask value given is 24, it means that the first
24 bits are ones and the last 8 bits are zeros
These last eight bits are also called control bits
Now what is the use of these control bits that we will going to discuss now
Now let us see that in a given subnet how will you generate an assignable IP address for subnet devices
that is if you have a subnet and if you connect more and more machines
to the given subnet
Then what are the possible IP addresses that you can assign
to these devices which you are connecting to the subnet that is what is the possible value of IP 1 IP2
IP3
and so on
So in order to find those values, these control bits are used
How just follow the these two steps
Take control bits only so note the word only that is just take the control bits
so here only means that you have to take only the control bits out of the mask value and
Perform the logical or operation with the network ID
The result that you will get is actually the assignable IP address for that subnet
When I say assignable, it means you can assign that particular IP address to a device which you are connecting to a subnet
Right
So in step 2
Just repeat the step 1 for different permutation of control bits
So let us take an example
It says that
repeat step 1 for different permutation of control bits
So let us say that I take the control bit as 0 0 0 0 0
0 0 and just say I place here 1 so it is one of the permutation of control bits
Now apply the or operation of this control bit with the network ID
This is the network ID
So the result that you will get is
11.1.1.1 so you can assign this IP address
to some device
Which is you have connected to the subnet so you can assign this IP address to one of the devices
Similarly, you can generate more permutation of the control bits
Let's say that the next permutation is this
Now again, you perform the or operation with the network ID, The result that you will be obtained is
11.1.1.5
So this is again another IP address that you can assign to some other machine which you have connected to the subnet
Right, so you can see that how control bits is helping us to generate more and more IP addresses
Which could be assigned to a machine connected to the subnet
Therefore these IP addresses which are being generated using different permutations of control bits are called
assignable IP address
Right now if you take control bits as all zeros
then the IP address that you obtain is actually the
network ID and
If you take the control bits as all ones
Then you get the broadcast address
So you can see that two special permutation of control bits
That is the permutation in which control bits are all ones and the permutation in which all the control bits are
zeroes
Yields the network ID and broadcast address
Now the network ID and broadcast address are the property of a subnet
They cannot be assigned as an IP address to any device connected to a subnet
So that is the reason that out of the total permutation of control bits
two special permutations
Cannot be assigned. Two
Special permutations are actually special in the sense
that
OR-ing those permutations with the network ID gives two special IP addresses
Which is network ID and broadcast address
so this is the reason that we subtract 2 from the total number of permutations of
control bits
So we have subtracted 2 because one address is the network ID itself and
The other address is the broadcast address which we have already calculated
we cannot assign the network address and broadcast address to any machine in the subnet and
That is the reason that in the previous slide, We subtracted 2 from the total number of
permutations of control bits
So thus in our example
We can assign IP addresses to the machine which belong to our subnet as follows, so these are the total
IP addresses that we can generate using control bits and
It is these IP addresses which can be assigned to the devices
Connected to the subnet
so these IP addresses are called assignable IP addresses, so
I hope you understand the purpose of control Bits. Control bits are used to generate the assignable IP addresses.