I still remember, quite some time back, I used to find the concept of classless vs. classful routing, quite dificult to understand. To enable/disable classless routing, we can use the command [no] ip classless.

So, ip classless – enables classless routing; no ip classless, enables classfull routing. Furthermore, classless routing is enabled by default and unless you are running an ancient IOS version, you will not see this command in the show running-config output. You will however see it, should you enable classfull routing by using the no form of the command.

But before diving in, let’s review what are the five IPv4 ADDRESS CLASSES:



So from left to right we have the following (note the notation used to show the range):

  • CLASS A: [0 – 126].x.y.z / Mask:
  • CLASS B: [128 – 191].x.y.z / Mask:
  • CLASS C: [192 – 223].x.y.z / Mask:
  • CLASS D: [224 – 239].x.y.z / Multicast range; it doesn’t use a network mask!
  • CLASS E: [240 – 255].x.y.z  – this is a reserved range as initially defined
Few Notes ...
  1. With all this fuss about IPv4 range being depleted, why are we not using CLASS E addresses to further extend the IV4 for general use? It is a good question; please see this post here which explains things better than I could 😉
  2. You may have noticed this: where is the 127.x.y.z address range gone? It hasn’t actually gone anywhere; it is just not shown above. 127.x.y.z range is the loopback range. It is also used by the local host (router/server/PC) for internal communication.
  3. When defining the IP address class, always consider the mask as well. For instance, /8 is a Class A address, unlike /16



On Cisco’s documentation, there are actually quite a few types of routes to be found in the routing table such as, parent routes, ultimate routes, glassful routes, etc. – different names based on different criteria. I have to say that based on my experiments, I do not necessarily agree strictly with some of the definitions Cisco provides.

From now on, I will also use the diagram below:

classless-01 Here is what I’ve observed:

  1. A route pointing to a network shorter, or equal, to the classfull equivalent, is added as a single entry (see routes to & /24)
  2. A route pointing to a network with a longer prefix than its classfull equivalent, will be added as a subnet. Furthermore, in this case, the following is also true:
    • an additional entry is automatically added as the “subnetted” network (parent route) should all child routes use the same mask (see routes to &
    • an additional entry is automatically added as “variably subnetted” network (parent route) should child routes use different masks (see routes to &



As mentioned initially, the router by default will make classless forwarding decisions – meaning, it will not care of whether the destination is classless or classful. The router will lookup the route in the routing table and match based on the longest prefix. Should there be no matching route, the default route will be used, if one exist. Otherwise, the packet will get dropped.

With classfull routing however, the router will *always* try to match routes as part of a supernet (parent route). When a successful match occurs, the router will further try to match the destination network within that supernet. Should this process not be successful, the packet will be dropped. The default route will only be used when a parent route is not identified; the packet is also dropped when no default route is set.

To illustrate this I’ve done the following:

  1. enabled packet & routing debugging (debug ip packet & debug ip routing)
  2. enabled classfull routing (no ip classless)
  3. disabled cef (no ip cef)

Let’s run few traces now …


Since the destination networks dont’ actually exist, thea above traces won’t be successful – this was only so I could generate relevant output in my debugs; you should really just pay attention to the 1st hops as well as to the debug output – did you see the “unroutable” keyword!?

Thank you,
View Rafael A Couto Cabral's profile on LinkedIn

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>