This topic is a continuation of a post l wrote earlier on IPv4 address. I just want to extend this discussion by adding classful addressing. In classful addressing, the address space which we saw to be 2 ^ 32 in the earlier post is divided into five classes. These are classes A,B,C,D,E.

Pretty easy right, but there is more. how do you know which class is an address?

The answer to this is a little easy if you took or read some networking course. Some group of computer freaks came together and decide ranges for the first byte(first block in dotted decimal) in the 32 bits(4 bytes) long address that is contained in the address.

So they said and l’m quoting them, if the first byte is from 0 -127,  then it’s a class A address, 128-191 is class B address, 192-223 is class C, 224-239 is class D and 240 – 255 is class E. This is pretty easy to remember for an address in dotted decimal notation.

What about  if the address is in the binary form? There are two options, you can convert the first 8 bits on the left into decimal and find the spot using the range above or another option is to use the binary bits to determine the class. So if the  first bit(on the left) in the binary form is a zero, then it’s a class A, if it starts with a one and followed immediately with a zero, then it’s class B (10). if  it has two ones before a zero, then it’s class C(110), if it has 3 ones before a zero, then it’s class D(1110) and finally, if it has 4 ones continuously in the first position, then it’s class E(1111).

I think on this side of the coin, it’s easy to recognize the class of the address in binary than in dotted decimal notation.  It’s easy for me to remember 0=A,10=B,110=C,1110=D,1111=E, because l really don’t have to memorize it, l just have to remember the concept.  But l will not try to convert the address into binary if it’s given in decimal in other to use this approach so l better memorize the range in decimal too. You see, there is a gotcha everywhere lol. Whatever floats your boat, go for it lol.

So just for an excercise, assuming we are given the address 128.11.3.31 to find the class. You take the first byte, which is 128 and this falls in class B because class B starts from 128 – 191.

Here is another excercise, find the class of the address

10000001 00001011 00001011 11101111.

So you see, you u don’t want to waist your time trying to convert it into decimal to know the class, you just look at the first digit and keep moving to locate it’s class. Here, we got one in the first place so we move forward once and find zero. this matches 10 so it’s a class B address. if it were to start with a zero, it will be a class A.

So that’s something l just wana to share. Find errors, comment on it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *