Classless IP Addressing

Unanswered Question
May 3rd, 2009

Hi Guys,

Can someone please explain me the concept of classless IP Adressing...i m confused about this term.

I am good at subnetting etc but i am not able to understand what is the reason behind this addressing scheme.

Any in depth explanation with a example will be helpful.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Giuseppe Larosa Sun, 05/03/2009 - 23:39

Hello Mahmood,

classless ip addressing means that you don't use the old major network classifications in Class A,B,C based the value of the most significant octet.

a classful vision sees an ip address as made of three parts:

major network portion based on Class A,B,C classification

subnet portion: the difference between the major network prefix length (8,16,24) and the actual prefix length

host portion: leftmost bits used to differentiate among devices.

the classless addressing uses a two parts :

prefix lenght tells the subnet portion

host portion.

The reason for this is that modern routing protocols carry subnet masks in updates and so allows for variable length subnet masking.

So the idea is to stop to refer to Class A,B,C classification and to think directly of prefixes.

Hope to help


mahmoodmkl Mon, 05/04/2009 - 00:18

Hi Giuseppe,

thanks for the reply.

i didnt get you point i.e

subnet portion: the difference between the major network prefix length (8,16,24) and the actual prefix length


prefix lenght tells the subnet portion

u mean to say that the prefix length tells the network portion..?

What i understand from the above is that now we need to avoid doing the addressing on class basis.

To be frank i am still confused.



Giuseppe Larosa Mon, 05/04/2009 - 00:20

Hello Mahmood,

let's take an example

classful vision:

major network: Class B

subnet portion: third byte 60

host portion: last byte

classless vision:

prefix portion: 172.18.60/24

host portion: last byte

Hope to help


mahmoodmkl Mon, 05/04/2009 - 02:36


By the example above u mean to say that now there is no division of the address space in terms of classes..?

Now we need to consider everything in terms of prefix portion and host portion..?



Joseph W. Doherty Mon, 05/04/2009 - 03:02

The reasoning behind classful addressing was to save 4 bytes per IPv4 address.

IPv4 32-bit addresses contain two addresses, the network address and the host address. The network address is some number of bits of the first portion of the IPv4 address, the host address the remaining bits. The problem, though, is how do we "know" where the one address ends and the other begins?

On hosts, to distinguish between the two addreses within the IPv4 IP address, we use a network mask. For example, might have a mask value of This tells us the network address is and the host address is 25. Or a mask value of tells us the network address is and the host address is 1.25.

As the prior paragraph shows, a 32-bit network mask can be used with a 32-bit IPv4 address so we can determine the network address portion. Both are passed along in newer (classless) routing protocols. However, when IPv4 was defined, 32-bits, or 4 bytes were considered very valuable/expensive and methods were designed to avoid "wasting" bytes. (BTW, this is similar to the reasons for the Y2K issues, i.e. not using the first two digits in many year values.)

The solution for IPv4 was "classful" addresses. The address, itself, would also imply the network mask. This was accomplished by defining ranges of addresses into classes. Doing this, there was no need to also "waste" 4 bytes for a subnet mask.


This Discussion