First of all, may I welcome you to my site. My name is Chris and I'm from the UK and work as a Systems Engineer for Cisco. This blog was initially created to post up my subnetting technique but has now got more stuff to do with attaining Cisco certifications. Either way I really hope that the content is sufficent for your needs and I look forward to hearing your feedback. If you find that the content really helps you please feel free to donate using the PayPal link on the right.

To view the index of all my articles please click here.

"ip classless" versus "no ip classless"

This often has me confused but the article below, rejigged slightly from the original article here seems to have cleared the fog from my mind and hopefully yours too.

Where the ip classless configuration command falls within the routing and forwarding processes is often confusing. In reality, IP classless only affects the operation of the forwarding processes in IOS; it doesn't affect the way the routing table is built. If IP classless isn't configured (using the no ip classless command), the router won't forward packets to supernets. As an example, let's place three routes in a routing table and route packets through the router.

Note: If the supernet or default route is learned via IS-IS or OSPF, the no ip classless configuration command is ignored. In this case, packet switching behavior works as though ip classless were configured.

router# show ip route
.... is variably subnetted, 2 subnets, 2 masks
D [90/4879540] via
D [90/25789217] via
S* [1/0] via

Remembering that the network includes the addresses through, and the network includes the addresses through, we can then try switching three packets through this routing table and see what the results are.

A packet destined to is forwarded to, since this is the longest prefix match.

A packet destined to is forwarded to, since this is the longest prefix match.

A packet destined to is forwarded to; since this network doesn't exist in the routing table, this packet is forwarded to the default route.

A packet destined to is dropped.

The surprising answer out of these four is the last packet, which is dropped. It's dropped because its destination,, is within a known major network,, but the router doesn't know about this particular subnet within that major network.

This is the essence of classful routing: If one part of a major network is known, but the subnet toward which the packet is destined within that major network is unknown, the packet is dropped.

The most confusing aspect of this rule is that the router only uses the default route if the destination major network doesn't exist in the routing table at all. However, if ip classless was configured the default route would have been used.

So there you have it. The fundamental difference between the configuration of ip classless and no ip classless is whether the default route would be used.

Posted byChris Bloomfield at 14:25  


Arista-Lusi-Alisha said... 19 June 2009 at 16:27  

thank you, very useful

Jatin said... 5 January 2010 at 09:42  

Awesome explanation..I'd never read something like this anywhere.

Thanks one again. Bang on Target mate.


Post a Comment