Classful Versus Classless Routing Protocols

Classful routing protocols do not carry subnet masks; classless routing protocols do. Older routing protocols, including RIP and IGRP, are classful. Newer protocols, including RIP-2, EIGRP, and OSPF, are classless. What are the implications of using classful versus classless routing protocols in your networks?

Let’s say that a router R received a RIP-1 update with the IP address 172.0.0.0. R would assume that the route being advertised was for the Class B network 172.0.0.0/16. In other words, since the subnet mask is lacking in the routing update, R assumes a natural mask of /8, /16, and /24 for Class A, B, and C addresses, respectively. The only time a classful routing protocol can associate a mask other than the natural mask with an update is if R has a directly connected network with an IP address belonging to the same class as the IP address received in the update. For example, when Ames receives an update of 172.16.1.0 from NewYork, Ames associates a mask of /24 with the update because Ames is able to deduce the mask from its own interface.

RIP-2 updates carry a subnet mask in each route entry. A routing protocol that carries subnet masks in its updates earns the label “classless routing protocol.” The term “classless” implies that routing decisions are not tied to the class of the IP address -- A, B, or C -- but may be based on any portion of the 32-bit IP address as specified by the mask. Router R could receive an update with the ...

Get IP Routing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.