cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1489
Views
8
Helpful
2
Replies

Classful Vs Classless

auosdavid2000
Level 1
Level 1

Hi,

I am very confused about classfull and classless IP addressing, can any one explained to me.

If I have

192.168.1.1/26 or 172.16.2.1/18 is these are classless IP address or classful IP address with non defualt mask.

BR,

Auos

2 Replies 2

rahulbhrt
Level 1
Level 1

HI,

Classful Address is the address with the default mask. Ex: 192.168.10.0/24 & 172.16.0.0/16

Anything else is classless Address or Subnetted / Supernetted address.

bmcginn
Level 3
Level 3

Hi Auos,

A classful network is denoted by the binary makeup of the first octet. Modern day routers can use variable length subnets and classless interdomain (VLSM & CIDR) routing through subnet masks.. but before all of those refinements, routers understood the subnet purely by the first octect of the IP address. Books tell you what the boundaries are in decimal (ie class A 1-127, class B 128-191, class C 192-223 etc). Those boundaries are easy to see when you look at them in binary.

That first octet is made up of eight 0's or 1's as you know. The devices needed someway to differentiate one subnet from another so it looks for a certain pattern in the first 4 most significant bits (left most bits) of the first octet. The pattern start is denoted by a 0. So, for a classful boundary, the pattern 0 is looked for in the 4 most significant bits. To denote a class A address, simply by its first octet, the most significant bit must be a 0. A class B address puts a 1 in front of the 0 and a class C address puts two 1's in front of the 0. There is a class D address space and also the multicast space. Class A '0', class B '10', class C '110'.

So, to hopefully explain that better, for a class A address, a 0 must be the most significant bit in the first octet. For example ['0'1100110, which equates to 102 is a class A address because it starts with a 0. Class B address start with a 10 and class C address start with a 110. For example 11011001 is a class C address because it starts with a 110. If you convert 11011001 to a decimal you get 217 which falls into the decimal class C range. A 10000111 octet is 135 which is class B because it started with a 1 and a 0.

Now that the old routers could understand the subnet purely by looking at the first octet, what is the actual subnet mask associated with each Class? Class A addresses have an 8 bit mask, class B addresses have a 16 bit mask and class C addresses have a 24 bit mask.

So when an old router saw the first octet it would immediately know what subnet mask to put to the address. This is classful routing. Routing protocols only sent the route and not any subnet information as the address itself told the router what the subnet is. RIP v1 and IGRP were classful routing protocols.

When it became apparent that this approach was fairly inflexible, and that a lot of addresses where going to waste, I think VLSM and CIDR were introduced, and these allowed the network admin to denote what the subnet masks were. So no longer were the first octets used to denote the subnet mask. Routing protocols have to send the subnet mask with the updates so that the routers know what the network boundaries are; as the classful boundaries can be disregarded.

You will see in cisco routers a command 'ip classless'. This tells the router to ignore classful boundaries and determine the masks through the VLSM information sent with the routing updates. Examples of a couple classless routing protocols are: EIGRP & OSPF.

I hope that helps! And if you like this post, can you please rate it?

Thanks,

Brad

PS. the 192.168.1.1/26 address is classless, the 172.16.2.1/18 address is also classless.

192.168.1.1/24 would be classful and 172.16.2.1/16 would be classful.

Review Cisco Networking products for a $25 gift card