Hello friends, welcome to Gate Smashers. The topic is Class C in IP addressing. It is a part of Classful addressing where we divide IP addresses into 5 classes, Class A, B, C, D and E. So in this video we are going to disucss about Class C. So in Class C first of all I will tell you that we are talking about IPv4. The IP address in IPv4 is of 32 bits and here I have divided 32 bits into 4 octets because we are following the dotted decimal representation, this I had discussed in the last video also. Here the 32 bits, if we talk about the first question, the first point, that is Range. Means if I have been given an IP address, then just by looking at that IP address, how can I find out that it belongs to Class C? So for that first I have to find out range and where do we find out range from? From the first octet. Means just by looking at the value of first octet, we can find out if it belongs to Class C or not. How? Here I have represented 8 bits, these are 8 places. In these 8 places, the first three positions are already fixed. Value of these three positions is 110. I mean to say that you cannot change these values because these values are prefix. These values are used as prefix, means any IP address if you are given, if it is given to you in binary values, because binary representation can be done, then by looking at the first three values you can find out that this IP address belongs to Class C. Now after this we say that we came to know that first three values are fixed. So how many values remain here? How many places remain? Remaining places are 5. So in these 5 places, what values can I put? 00000 Means what can be the minimum value? Five 0s. After that 00001, 00010, 11, these values... What can be the last value? What can be the maximum number? 11111. Means five 1s. Minimum value can be five 0s, maximum values can be five 1s. But don't forget the three values 110, which are fixed values. So 110 is fixed here, because when you convert it into decimal then you have to convert the whole octet. Here 3 values are already there, we will add 5 values and convert all 8 values into decimal. So when we convert this binary number into decimal, what value will it become? 192 Because upto 191 it was in Class B, what starts from 192? Class C. 193, 194, and so on... last value, 110 followed by five 1s. If you collectively convert this into decimal, this value will come out to be 223. So the answer to the first point or the first question is what? Range is from 192 to 223. Range of 192 to 223 here I have. Now how many IP addresses come in this range? If you see simply how many IP addresses are there? Near about... 32. Means from 192 to 223 how many IP addresses are there? 32 Now this is not a question, I am just telling you a point. I have range. Now what can be the second point here? Number of addresses Number of IP addresses in Class C. Means how many IP addresses can be in Class C? How do you find IP addresses? First three positions are fixed, means you cannot touch these three positions these are fixed, so how many remain here? 5. And how many here? 8, 8 and 8. Means 24. 24 and 5, 29 So total will be 2 raised to power 29, because what is the number of bits? 29. Leave these 3 because these are fixed, 29 bits, so what is the total number of addresses? 2 raised to power 29. Means 2 raised to power 29 number of IP addresses are possible in Class C. And if you see this, this is nearabout 12.5% of the total IP addresses. How many are the total IP addresses? 2 raised to power 32. Out of which how much is this proportion? 12.5% So 12.5% of the IP addresses are in Class C. Now we are going to discuss how many number of networks is possible? And in each network, how many hosts are possible? So first we find how many number of networks is possible in Class C? So to find out networks, we know that in Class C for network, 3 octets are reserved and last octet represents host. Means these 3 octets here represent what? Network. And this last octet represents what? Host. Like in Class B, 2 octets for network and 2 octets were for hosts. In Class A, 1 was for network, 3 were for host. Here it is 3 for network and 1 for host. So how will you find out number of networks? First find out number of bits for networks. 8 bits here, 8 bits here, 16 and 5 places here because these 3 are not to be touched, these are fixed values, because these are prefixed. So 8 and 8 is 16, and 5 that is 21. So how many number of networks is possible? 2 raised to power 21. Because number of bits used to represent is 21. If number of bits used to represent is 21 then total number of IP addresses or total number of networks are how many? 2 raised to power 21. Means my second point that how many networks are possible in Class C, it is 2 raised to power 21 which is approximately 20 lacs. means nearabout 20 lacs equivalent this value comes. So here 20 lac networks are possible in Class C. Now in each network, if I take any network, in that how many hosts are possible? If here you feel how is 2 raised to power 21 number of networks possible, then you can find out from here. See this, 192, 193, 194... upto 223. How many IP Addresses are here in first octet? 32. Means there are 32 values... I'll write here 32 For each value there are 8 bits here and 8 bits here means how many values are you representing 8 bits with? 256. And here also 8 bits, which you can represent with 256. I mean to say if you see this from a simple point of view, 192... for 192 here, only 192 if I fix as the value of the first octet then here you have 256256 possible values. If you take 193, then for 193 also 256256 for 194 also 256256. So how many are these values? These values are total 32. So for each of the 32 values 256256 values are possible and this value you check how much it is. You can write 32 as 2 raised to power 5, this as 2 raised to power 8, this also 2 raised to power 8, which is approximately equal to 2 raised to power 21. Not approximately, it is exactly equal to 2 raised to power 21. And that is the value we found. So this is why why 2 raised to power 21 number networks are possible in Class C. Now we will discuss in each network how many hosts are possible. In every network how many hosts are possible. To find out hosts in each network you come to host bit. How many host bits? 8. So how many number of hosts are possible. 256 Means for one network of Class C, 256 hosts are possible means if an organization takes an address of Class C, then in that it can create 256 number of hosts, but we can't give all 256 to hosts, means we can't give to users, the usable value is minus two that is 254. So the third point is 254. Number of hosts, possible hosts, number of hosts is 256, but number of possible or number of usable values, that is what? 254. What is the reason? That I had told in previous videos also that reason is, we don't give the first address and the last address to any user. Why we don't give? I'll tell you with simple example so you will have a clear idea. Let's say we take a network of Class C 194.2.3.4 I take a simple IP address 194.2.3.4 Now I have to first find out which class this IP address belongs to. So first you come to range. How much is the range? 192 to 223. Does this come between 192 to 223? Only first octet you have to find. Value of first octet, yes. So you can simply say this belongs to Class C. Now next, what is the Network ID of this IP Address? To find the Network ID of this IP Address we use subnet mask. And what is the subnet mask of Class C? 255.255.255.0 And what do we do? We perform AND operation between them. We perform AND operation between corresponding values. When you perform AND operation, you open 194 in binary, 255 is simply eight 1s, so if you AND any value with 1s then the same value will come again, I had told this before also, here I will tell you with a simple example, if you open 2 then what will you write? 0000 0010 And 255 is 1111 1111 so if you AND this, only this 1 will be 1, all others will be 0s. Means 2 is again 2, so you can simply check it. Now if you do AND of 3 and 255 then it will be 3. If you do AND of 4 and 0 then the answer will be 0 because if you perform AND with all values, here all values are 0, so all values will become 0. So what is this value? This is the Network ID. Means this IP Address belonged to which network? It belonged to this network. Means I have a network of any ABC organization, how is that network recognized? Means the whole world knows that network by which IP address? This IP address. What is it? 194.2.3.0 And in this IP address in this network how many hosts are possible? It is of Class C so how many hosts are possible? 256 are total, but we use 254 because first, this IP address is first, this we will not give to any host because it represents this network. And the last one, which is the last one? Don't touch network bits, just copy as it is, because if you change the network bit then the network will change, from some ABC organization to XYZ organization you will reach. So copy network bits as it is, but the last octet which represents host bits put all 1s in host bits, means I will put eight 1s here. Eight 1s are what? 255. So means, how many total IP addresses are there? 256. But out of these 256, the first one, this one with 0 is not to be given to any user because it represents this network and don't give the last one to any user because it is direct broadcast address. If someone from outside wants to send a message to everyone in your organization, he wants to broadcast, then he will put which destination address? This one. So that router knows that this packet is to be provided to all hosts. So that's why we neither use this IP address nor this IP address to give a host. Other than these how many remain? 254 which I can provide to any host. So this is all about Class C. Thank you.