Classful vs Classless Routing Protocols

Hello Sameer

For the explanation, I will use the subnets used in the lesson.

The problem with classful networks is that if there is a destination of 172.16.1.0/24 this will be installed in the routing table as 172.16.0.0/16 since 172.16.X.X is a class B network. This works fine as long as all destinations of 172.16.0.0/16 are to be routed via the same interface.

However, if you have a case such as this, discontiguous networks with classful routing presents a problem:
image
Assuming a classful routing protocol is being used, R3 will inform R2 that it has a destination to 172.16.2.0/24 and R2 will put the following into its routing table:

to reach 172.16.0.0/16, route via Fa0/1 with a next hop IP of 192.168.23.3

But R1 also sends a routing update to R2 stating that it has a route to 172.16.1.0/24 so R2 will put the following into its routing table:

to reach 172.16.0.0/16, route via Fa0/0 with a next hop IP of 192.168.12.1

During the next routing updates, R3 and R1 will alternately inform R2 that they have routes to these destinations, while all the time R2 is installing the classful network into the routing table, causing incorrect routing to occur.

So, this is why discontiguous networks can cause problems with classful routing.

In order to solve such issues, there are two solutions:

  1. The first involves adjusting your addressing scheme so that networks are not discontiguous, that is, all class A networks can be reached via a single interface, and similarly for class B and class C. This is not always possible and can be somewhat restrictive.
  2. The ideal solution, and the one that is considered best practice, is to use a classless routing protocol so that you can define specific subnets within classful networks and route in a classless manner.

The second choice should always be the selected solution in all modern IP networks.

I hope this has been helpful!

Laz

1 Like