How can you identify the IP class of a given IP Address?

Class A networks, start from to

Class B network addresses start from to

Class C network addresses start from to

Hope that helps

So, You check the range in which the network address you are checking fits, and then you will know what class it is.

If I may add some additional information to help clarify the thread...

What actually determines an IP's class in a classful network is actually the IP addresses's leading bits.

All Class A addresses will have first leading bit as zero (0). So, actually Class A's range is: -

What I mean by the leading bit is, if you convert the decimal value to binary for the first octect, you have 8 places. A Class A address must have a 0 in the first bit. In binary the range is:

00000000 - 01111111 which in Base 10 --> 0 - 127. We know that is the loopback address, but it is still classified in the Class A range.

A Class B address, the first and second leading bit must be a '10' in binary. So for example, the range is: 10000000 - 10111111 which equals in Base 10 --> 128 - 191.

A Class C address, the first, second, and third bit must be '110' in binary. So for example, the range is: 11000000 - 11011111 which equals in Base 10 --> 192 - 223.

So, in summary, here are the Classes of A-C:

Class A
Class B
Class C

If you are interested in Class D and E, just continue with the pattern of leading bits.

Class D --> '1110'
Class E --> '1111'

Well done Jorge.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.