as you begin the process of learning more about ip subnetting the process of understanding the subnet masks becomes very important and when we start talking about ipv4 subnetting you'll often hear about differences between class a class b and class c ip subnets this is referring to a subnetting architecture that technically we've not used since 1993. when ip was originally created the subnet masks were automatically determined based on what your ip address was but today you have much more control over the subnet masks because we use classlist subnetting but for the purposes of understanding today's form of subnetting we're going to look back at how this classful based subnetting process works and although today we have much more control over our subnet masks and we're not limited to simply a class a class b or class c you may still see these classes referenced in casual conversations and although it seems that we're going back in time to understand a way that we used to provide subnet masking these have a very important application in today's subnetting this is the default starting point for subnet masks and it's important that we understand where subnet mask begins and how much we're able to subnet from that point there are technically five different classes for ipsubnets you will commonly see class a class b and class c used because those are the classes that we are assigning to different workstations if you're working at all with ipv4 and multicast you'll be using class d addresses and subnet masking and class e is a reserved range and you will never use these ip addresses on your production network one way to determine the class of an ip address is to look at the first octet in the entire address if the ip address starts with a 1 through 127 then it's a class a address if the ip address starts with 128 through 191 it's class b and numbers 192 through 223 designate that as a class c address if you're doing ip multicast then you'll notice those ip addresses start with 224 through 239 and that reserve range is a range between 240 and 254. what's interesting about all of these different classes is that if you convert that very first number to binary and look at just the first four bits of that binary value you'll find that anything that starts with a zero is class a anything that starts with 1 0 is class b 1 1 0 is class c 1 1 1 0 is class d and all ones would be class e back when subnet masks were automatically defined based on what this ip address was it would configure the default subnet mask based on that ip address so if your ip address started with a number between 1 and 127 your subnet mask was 255.0.0.0 if that first octet of the ip address was between 128 and 191 your subnet mask was 255.255.0.0 and if the ip address started with 192 through 223 the subnet mask was 255.2 in this chart those are the three most important columns the class the leading bits and the default subnet masks if we are using those values associated with those classes you'll see the network bits the remaining bits the number of networks and the hosts per networks are calculated based on those default values let's go through a number of ip addresses and see if we can determine what the default class is for that address we'll start with this ip address of 17.22.90.7 we'll look at the first octet which is 17 and we know that any number between 1 and 127 is a class a address the next on our list is 220.10.77.40 looking at that 220 at the beginning and referring back to our previous chart we would call this a class c address the next ip address is 165.245.0.1 and again referring to our chart or looking at a 165 converting it to binary looking at the first four bits you should be able to determine that that is a class b address 128.90.10.2 begins with a 128 which means that it is also a class b address for the ip address of 191.77.24.250 we look at that first octet which is 191 and that 191 falls into the category of a class b address and lastly 192.1.12.5 that 192 is one more than but that is the difference between a class b and a class c address when you're working with ip subnetting there are four separate values that you need to be able to calculate we're going to go through these four here and then i'll demonstrate how you can perform some practical calculations to determine all four of these values the first value is the network address this is the first ip address that's in a subnet to calculate the network address we set all host bits in the address to zero or zero decimal and we calculate what the decimal value of that might be the second value you'll need to calculate is the first usable host address if you know the network address then you can calculate that easily because it's one number higher than the network address the next value we need to calculate is the network broadcast address the broadcast address is the last ip address that's in a subnet when we calculated the network address we set all host bits to zero to calculate the broadcast address we set all host bits to one and then we perform a conversion to decimal to determine what the network broadcast address is the last value we'll need to calculate is the last usable host address which is one number lower than the broadcast address so we take the broadcast address that we just calculated we subtract one and we have the last usable host address now that you understand the process let's perform some practical calculations we need to calculate the subnet address the first host address the broadcast address and the last usable host address let's start with an ip address of 10.74.222.11. this address is a class a address we know that because we looked at the first octet we compared this to the chart that we had earlier and this address certainly is a class a address if we take the default subnet mask for this address we know that this class a address is 255.0.0.0 because we know that the subnet mask is 255.0.0.0 we can add a separation in this particular address where all of the 255 values are on the left and all of the zero values are on the right and that puts this divider right after that first octet so so 10 is on one side of the divider and all of the other octets are on the other side of the divider if we write this out and separate things on the left side of the divider as the network portion of the address and everything on the right is the host portion of the ip address then you can see the network portion is 10 dot and then the host portion is 74.222.11. now we need to start performing some calculations to determine what the subnet address or network address happens to be so we're going to set all host bits to zero that means for this ip address the network address is 10.0.0.0 because we changed all of those host addresses to zeros we also know that the first usable ip address in this subnet is one address higher than the network address so we add 1 to this 0.0.0 which gives us 0.0.1 so your entire first host address is 10.0.0.1 to calculate the broadcast address we change all of the host numbers to all ones in decimal this is all 255s so your broadcast address for this subnet is 10.255.255.255. we also know the last usable ip address on this subnet is one value lower than the broadcast address which means that our last usable host address is 10.255.255.254. as long as you know the class and you know where to make that dividing line all of the other calculations should fall right into place as long as you follow those simple rules let's look at another ip address we'll look at 172.16.88.200. the first thing we should do is find out what class this address is associated with we need to look at that first octet which is 172 which places this ip address into the class b category knowing that this is a class b address we know that the default subnet mask is 255.255.0.0 that puts our network address on the first two octets and the host part of the address is the last two octets if we were to write this out in our chart the network portion of the address is 172.16 and the host part of the address is 88.200. the first thing we need to do is determine what the subnet or network address is we set all host bits to zero which means that the network address is 172.16.0.0 to determine the first usable ip address of the subnet we add one to the host side meaning that we have a first host address of 172.16.0.1 to calculate the broadcast address we set all of the host bits to 1 which in decimal is 255 meaning that our broadcast address is 172.16.255.255. and the last usable address is one address lower than the broadcast address meaning that the last usable host address is 172.16.255.254. here's one more we'll look at the ip address of 192.168.4.77 looking at that first octet we can see that the 192 means that this is a class c address that also means that the default subnet mask for class c is 255.255.255.0 we'll put this ip address separator right after that third octet and put it into our chart so the network portion of the ip address is 192.168.4 and the host portion of the ip address is 77. let's perform the same four calculations we'll determine what the network address is by setting all the host bits to zero in this case the host bits are only that last octet so your network address is 192.168.4.0 if we add 1 to that value to determine the first usable host address we come up with the ip address of 192.168.4.1 determining the broadcast address means that we set all of the host bits to 1 or 255 in decimal so your broadcast address is 192.168.4.255. and the last usable ip address of this subnet is one fewer than the broadcast address making that last usable host address 192.168.4.254 by using these rules you can easily calculate what all of these values are for ip addresses that happen to have subnet masks that correlate to a class a class b or class c subnet mask you may find that the ip addresses on your network use these delineations at each octet point which makes it a very easy calculation but these days we're able to subnet into any of these octets and in future videos we'll look at how to perform calculations if you're using classless subnetting you