Modern networks no longer use classful IP addressing and the subnet mask cannot be determined by the value of the first octet. The classless IPv4 routing protocols (RIPv2, EIGRP, OSPF, and IS-IS) all include the subnet mask information with the network address in routing updates. Classless routing protocols support VLSM and CIDR.
IPv6 routing protocols are classless. The distinction whether a routing protocol is classful or classless typically only applies to IPv4 routing protocols. All IPv6 routing protocols are considered classless because they include the prefix-length with the IPv6 address.
Figures 1 through 5 illustrate how classless routing solves the issues created with classful routing:
- Figure 1 - In this discontiguous network design, the classless protocol RIPv2 has been implemented on all three routers. When R1 forwards an update to R2, RIPv2 includes the subnet mask information with the update 172.16.1.0/24.
- Figure 2 - R2 receives, processes, and adds two entries in the routing table. The first line displays the classful network address 172.16.0.0 with the /24 subnet mask of the update. This is known as the parent route. The second entry displays the VLSM network address 172.16.1.0 with the exit and next-hop address. This is referred to as the child route. Parent routes never include an exit interface or next-hop IP address.
- Figure 3 - When R3 forwards an update to R2, RIPv2 includes the subnet mask information with the update 172.16.2.0/24.
- Figure 4 - R2 receives, processes, and adds another child route entry 172.16.2.0/24 under the parent route entry 172.16.0.0.
- Figure 5 - R2 is now aware of the subnetted networks.