Every ip address belongs to a specific class.
The ip address classes are:

But how is an Ip address related to a class?
It’s very easy. For example let’s try to find the class of the Ip address 172.16.1.1
The only thing we have to do is to look at the first octet of the Ip address. As you can see, it is 172.If you look at the table above, you will see that 172 is a number between 128 and 191. Easily you can tell that 172.16.1.1 is a class B Ip address.
According to the example above, Ip address 172.16.1.1 has the default subnet mask of 255.255.0.0
O.K. so what?
When finding the class of an Ip address, automatically you find the default subnet mask for this Ip.
In one of the next articles, I’ll try to explain “The importance of Subnet Mask”.
I would like to note that in RFC 1817 (http://www.faqs.org/rfcs/rfc1817.html) We officially lose the classes that we are so used to and Cisco refused to drop them from their material. even thou one of there own wrote the rfc (Yakov Rekhter).
I stumbledupon this.
hi
uvv6i289hbargx93
good luck