Classful vs Classless Routing Protocols

Classful routing protocols do not send a subnet mask with route updates. Classless routing protocols do send the subnet mask or prefix length, allowing routers to make precise routing decisions and support VLSM and CIDR.

Classful RoutingClassless RoutingVLSMCIDRCCNA
Classful vs Classless Routing Protocols learning map
Learning map for Classful vs Classless Routing Protocols showing the article's core concepts, workflow, practice topics, and troubleshooting path.

Classful vs Classless Routing: The Quick Answer

Classful routing

The update identifies a network but omits its subnet mask. The receiver must infer the mask from class A, B or C rules and the receiving interface.

Classless routing

The update carries the subnet mask or prefix length. The receiver knows the exact route, such as 172.16.1.0/24.

One-line difference: classful routing advertises only network information; classless routing advertises the network plus its mask or prefix length.

What Are Routing Protocols?

Dynamic routing protocols let routers exchange reachability information, select a next hop, react to topology changes and install routes in the routing table. The terms classful and classless describe how much prefix information a protocol includes in its route advertisements—not whether it is distance vector or link state.

Classful updateNetwork only
Classless updateNetwork + prefix
Modern designClassless routing
Key benefitsVLSM + CIDR

Classful vs Classless Routing Protocols Comparison Table

FeatureClassful routing protocolsClassless routing protocols
Subnet mask in updateNoYes
VLSM supportNoYes
CIDR supportNoYes
Discontiguous networksAmbiguous and unreliableSupported because prefixes are explicit
Address efficiencyLow; tied to class boundaries and one maskHigh; different subnet sizes can coexist
SummarizationAutomatic at major-network boundariesManual or protocol-controlled prefix summarization
ExamplesRIPv1, IGRPRIPv2, OSPF, EIGRP, IS-IS, BGP
Current useLegacy study and historical networksModern enterprise and Internet routing

Real-World Example: Three Cisco Routers

Consider three routers connected through two class C transit networks. R1 owns 172.16.1.0/24, while R3 owns 172.16.2.0/24. Both subnets belong to the class B major network 172.16.0.0, whose historical default mask is 255.255.0.0.

NetworkHistorical classDefault classful maskActual prefix
172.16.1.0Class B255.255.0.0 (/16)255.255.255.0 (/24)
172.16.2.0Class B255.255.0.0 (/16)255.255.255.0 (/24)
192.168.12.0Class C255.255.255.0 (/24)255.255.255.0 (/24)
192.168.23.0Class C255.255.255.0 (/24)255.255.255.0 (/24)

What Happens with a Classful Routing Protocol?

RIPv1 and IGRP do not include subnet masks in their updates. When an update crosses from the 172.16.0.0 major network into a different major network, the classful boundary causes the route to be summarized as 172.16.0.0. R2 can therefore learn the same major network from both directions without knowing which /24 exists on each side.

Important nuance: a classful update is not always converted to its class A, B or C network. Within the same major network, a receiver may infer a subnet mask from the incoming interface. The serious problem appears when subnet information must cross a different major-network boundary, especially in a discontiguous design.

How Classless Routing Solves the Problem

A classless protocol attaches a mask or prefix length to every route advertisement. R1 can send 172.16.1.0/24, and R3 can send 172.16.2.0/24. R2 installs two distinct network prefixes and performs longest-prefix matching normally.

Which Routing Protocols Are Classful or Classless?

Routing protocolTypeSends prefix information?Practical note
RIP version 1 (RIPv1)ClassfulNoUses classful assumptions and does not support VLSM.
IGRPClassfulNoLegacy Cisco protocol; replaced by EIGRP.
RIP version 2 (RIPv2)ClasslessYesCarries a 32-bit subnet mask in each route entry.
OSPFClasslessYesLink-state protocol with native VLSM and CIDR support.
EIGRPClasslessYesCarries prefix information; disable legacy auto-summary where applicable.
IS-ISClasslessYesAdvertises IP prefix reachability in TLVs.
BGPClasslessYesAdvertises NLRI prefixes and enables Internet-scale CIDR.

Why VLSM and CIDR Require Classless Routing

Variable Length Subnet Mask (VLSM)

VLSM uses different masks inside one address block—for example, a /30 for a point-to-point link, a /27 for a small LAN and a /24 for a larger LAN. Without the advertised prefix length, another router cannot tell where each subnet starts or ends.

Classless Inter-Domain Routing (CIDR)

CIDR replaces fixed class A, B and C boundaries with arbitrary prefix lengths. It improves address allocation and enables route aggregation, such as summarizing several contiguous networks into one shorter prefix. Modern IP routing depends on CIDR.

Memory aid: if a routing update carries the slash notation—such as /24, /27 or /30—the protocol can distinguish variable-length networks.

Advantages and Disadvantages

Classful routing

Advantages: historically simple updates and low processing requirements.

Disadvantages: no VLSM or CIDR, wasted address space, automatic summarization and problems with discontiguous networks.

Classless routing

Advantages: efficient subnetting, accurate route advertisements, flexible summarization and support for modern network design.

Disadvantages: more prefix information must be carried and administrators must plan summarization deliberately.

Classless routing protocols are better for nearly every real network because the added prefix information removes ambiguity and makes IPv4 address space far more efficient.

Classful vs Classless Routing for CCNA

  1. Remember the defining field: the subnet mask or prefix length is absent in classful updates and present in classless updates.
  2. Memorize the protocol groups: RIPv1 and IGRP are classful; RIPv2, OSPF, EIGRP, IS-IS and BGP are classless.
  3. Connect classless routing to VLSM and CIDR: both require explicit prefix information.
  4. Recognize discontiguous networks: separated subnets of the same major network expose classful summarization problems.
  5. Do not confuse categories: distance vector vs link state describes the routing algorithm; classful vs classless describes prefix advertisement.

Classful vs Classless Routing Protocols Frequently Asked Questions

What is the difference between classful and classless routing?

Classful protocols omit the subnet mask from updates, while classless protocols include the mask or prefix length. This lets classless protocols support VLSM, CIDR and discontiguous networks.

Does RIPv1 support VLSM?

No. RIPv1 does not send subnet masks, so a router cannot reliably distinguish multiple prefix lengths within the same major network.

Why is RIPv2 classless?

RIPv2 includes a subnet mask in each route entry. A receiving router can therefore tell the difference between prefixes such as 172.16.1.0/24 and 172.16.2.0/24.

Which routing protocols support VLSM and CIDR?

RIPv2, OSPF, EIGRP, IS-IS and BGP are classless and support explicit prefixes. RIPv1 and IGRP do not.

Is OSPF classless?

Yes. OSPF advertises prefix information, supports VLSM and is not constrained by historical address classes.

Is EIGRP classless?

Yes. EIGRP carries subnet mask information. Older EIGRP implementations could also perform automatic summarization, but that behavior does not make the protocol itself classful.

Is BGP classless?

Yes. BGP advertises network prefixes through NLRI and is a foundation of Classless Inter-Domain Routing on the Internet.

Why are classful routing protocols obsolete?

They cannot describe variable-length prefixes, waste address space and can create routing ambiguity. Modern enterprise and Internet routing uses classless protocols.