[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Classless vs Classful

Posted on 2006-03-21
Medium Priority
Last Modified: 2012-06-27

What is the difference between classful and classless with regards IP addressing, routing, subnetting etc..

Can you give me practical examples of when you would use classful and classless.


Question by:stevemjp
  • 2
LVL 18

Accepted Solution

Sam Panwar earned 1000 total points
ID: 16245659

What is the difference between classful and classless with regards IP addressing, routing, subnetting etc..

Can you give me practical examples of when you would use classful and classless.

The difference between classful IP addressing and classless IP addressing is in selecting the number of bits used for the network ID portion of an IP address. In classful IP addressing, the network ID portion can take only the predefined number of bits 8, 16, or 24. In classless addressing, any number of bits can be assigned to the network ID.

In a classful routing protocol, the router uses one of two masks:  

According to Francois Labreque, Bruce Pinsky
1)  if the route in question is a member of the same major network number (that is, the same class A, B, or C network part) as a directly connected interface, the mask on that interface is assumed for the route.  The implication is that since everyone in the network assumes their local mask is the correct mask for all subnet routes, then all local masks must be configured the same for all subnets of the same major network number.

2)  if the route in question is a member of a foreign network (that is,none of the router's directly connected interfaces have a subnet of the same A, B, or C network part), the router assumes the default mask for whatever class address the route represents: for A, for B, for C. It is this constraint that requires all subnets of the same major network number to be contiguous when using a classful routing protocol.

In a classless routing protocol, the netmask is always propogated with the route being advertised.  So the consideration of what the netmask is on a router's local interfaces or what class address, A, B, or C; the route represents are no longer important:   the router always uses what it learned from the route update and requires no local information to determine the correct netmask for the route.

3)Short answer:  Classful protocols cannot carry a network mask as part of the routing advertisement.  This limits the routing protocol to only supporting a single subnetting scheme within the autonomous system.  Additionally, when advertising network addresses between different major network spaces,  the routing protocol will summarize the routing information to the natural class (A, B, C) of the network address.  It must do this since there is no method for one major class network to be updated with the network mask from another major class network.  The best the routing protocol can do is summarized based on the class of the network (derived from the initial bits of the address) and the natural network mask associated with the network class.

4)A classless protocol has the ability to carry network mask information as part of the routing update.  Since the network mask for each routing entry precisely describes the network being advertised and the address range it covers, a network address range can be subnetted using multiple network masks.
Additionally, it is possible to carry "subnet" information between network address spaces that formerly would have crossed major network boundaries. Essentially, removing the implied network mask based on network class allows the routing protocol to both summarize and subnet an address space based on the
network masks associated with each routing table entry.

5) The main difference is assumptions made about route summarizations.

If your networks are classful, the masks of, and will be implictly understood for summarizations based on the address (high order bits of the first octet)

When you are classless, you have to explicitly declare aggregations, since the classful assumptions fly out the window.

You also always have to include masks on IP route statements when running classless.

Example :

Classfull IPs are are thing of the past (almost).
Class A addresses: 1.x.x.x to 127.y.y.y and have a /8 net mask.  For example, all the IPs in the 24.x.x.x range are one class A network .
Class B addresses: 128.0.x.x to 191.255.y.y have a /16 net mask.
Class C addresses: 192.0.0.x to 223.255.255.y, /24 net mask.
Of course, they could be subnetted internally in your network.

It's in the routing table that difference appear.  with classfull
addresses, your routing table will contain only one route to whole
classfull networks for networks it's not participating in.  For example:

  |                                      |
  | e0 --------- s0      s0 --------- e0 |
  |---| router1 |----------| router2 |---|
  |    ---------            ---------    |
  |                                      |

Using "no ip classless" in your routers and isssuing a "show ip routes” on router 1 would yield something like:

Network is subnetted         via e0
Network is subnetted      via s0      via

(there is no subnetting for network

Whereas with "ip classless", your routing table would include only a route to and would also allow you to use on another interface of router1.
LVL 27

Expert Comment

ID: 16246485
Classful addressing:  http://www.faqs.org/rfc/rfc791.txt
Classless addressing:  http://www.faqs.org/rfcs/rfc1518.html

Author Comment

ID: 16248005
Thanks all,

thought I'd issue the points for effort alone!

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question