VLSM and classful routing

VLSM and classful routing

VLSM and classful routing protocols

 Routing protocols include classful routing protocols that do not support VLSM and classless routing protocols that support VLSM.

Classful routing protocol: RIPv1, IGRP Classless
routing protocol: RIPv2, EIGRP, OSPF

 Classless routing protocols support the use of VLSM for sending subnet mask information in routing updates.

 However, classful routing protocols such as RIPv1 do not include subnet mask information in their routing updates, so they cannot route correctly unless you have contiguous subnets.

 Classful routing protocols can only route correctly with classful network addresses.

 Therefore, it is basic to allocate only classful addresses in which the network address part and the host address part are separated in 8-bit units to each network.

In other words, you end up allocating addresses that are not the right size for the network to which they apply.

For example, suppose you assign a Class C IP address to your WAN link as shown in the diagram below.

 Class C has 254 addresses available. You're wasting 252 IP addresses by using only 2 IP addresses on the WAN link.

 In situations like this where only classful network addresses are routable, a significant amount of IP addresses is wasted.

Routing table size issue

 In large networks, routers have to learn a huge number of networks. Therefore, the number of entries in the routing table becomes enormous. It is said that there are hundreds of thousands of networks on the Internet.

 As the size of the routing table increases, the CPU and memory of the router will be burdened and the overhead will increase. Searching through this huge number of entries for each received packet would be a very heavy task.

 Classful routing has limitations. By consolidating multiple networks into one, it is necessary to reduce the routing table size and reduce the burden on CPU and memory. This is called route aggregation.

CIDR enables routing in this route aggregation environment.

Problems with VLSM and classful routing

In a VLSM environment, for example, if you have discontinuous subnets, routing will not be performed correctly.

 In a classful environment, routing has many restrictions. For example, route information for a network different from the sending interface will be sent updates to neighboring routers as classful network addresses.

Using the diagram below, we will explain the situation assuming that RIPv1 is used as the routing protocol.

  • Router_A announces "" to Router_B.
  • Router_C announces "" to Router_B.

 In the figure above, for Router_B, "" and "" have the same distance, so the cost is the same. As a result, the routing table on Router_B will have a "" route to the right and a "" route to the left.

 For RIP, load balancing occurs when there are multiple equal-cost paths. In other words, at this point, it means that routing cannot be done correctly.

 IGRP has the same result. That's because the cost to "" will be the same if the bandwidth of the serial link is the same.

Thus, classful routing has its limits.

 Now you understand that under a VLSM environment, you should build your network using classless routing protocols.