When I first started my networking career I was completely baffled by classless and classful routing. What is this? What are the differences? Why so complicated? Well it’s actually not if you know the differences between the two. Let’s take a look at what each are, and their function.
- Classless Routing – If configured, the default route is used to forward a packet when no exact match subnet or address is listed within the routing table.
- Classful Routing – If configured, the default route is used to forward a packet when no subnet or address is listed within the routing table. When a subnet is listed in the routing table but the packet does not match any of the routes in the table the packet is discarded and not routed.
So what does this mean?
Lets say for instance we have a packet coming from 10.1.1.50/24 going to 10.1.2.20/24. The forwarding router does not have a route configured for the 10.1.2.0/24 network. The router will then use our configured default route for unknown networks. With classless routing the default route will be matched and the packet will be sent out the appropriate interface.
Now let’s discuss classful routing. The same host wants to reach 10.1.2.20/24. If we have classful routing enabled the packet will be sent to it’s gateway for routing. Upon arrival the router will look for a matching subnet. Let say we have a summary route of 10.1.0.0/16 with an exact match for subnet 10.1.1.0/24, but no match for 10.1.2.0/24. With classful routing the router will then drop the packet. Even though we have a default route configured the packet will be dropped because of the summary route of 10.1.0.0/16. Think of classful routing as a rodent trap. The rodents can enter the trap, but they cannot get back out. Once the router starts searching the subnets of the summarized route and no exact match or specific route exists in the routing table, it will not back out and use the default route. It will simply drop the packet.
I hope you now see the differences between these two technologies and this eases exactly how they are involved with routing decisions. Mainly each one has different ways to decide on whether or not to use a default route. Please post any questions/comments you have about these technologies and I’ll gladly answer them.