Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityIntermediate

Classful vs classless routing, ip classless, ICMP redirects, directed broadcasts and IP unnumbered

In short: Classful protocols leave the subnet mask out of updates, so they break with VLSM and discontiguous networks. All current protocols are classless. The ip classless command lets a router use its default route for unknown subnets of a known major network. ICMP redirects, directed broadcasts and IP unnumbered are older features with security and design trade-offs.

Classful versus classless routing protocols

In the early internet, the first bits of an address defined its class and therefore its mask: class A /8, class B /16, class C /24 (see IPv4 addressing). Classful routing protocols such as RIP version 1 and IGRP relied on this. Their updates carried only the network address, not the mask, and the receiving router guessed the mask from the class or from its own interface in the same major network.

Classful and classless routing protocolsClassfulNo subnet mask in updatesAssumes class A, B or C masksSummarises at major network bordersRIPv1, IGRP (both obsolete)ClasslessMask sent with every routeSupports VLSM and CIDRSummarise where you chooseRIPv2, OSPF, EIGRP, IS-IS, BGP
Figure 1. Every routing protocol in use today is classless, but classful behaviour still appears through defaults such as auto-summary.

This breaks two common designs. VLSM (variable-length subnet masks), such as /30 links alongside /24 LANs in 10.0.0.0/8, cannot be described without masks. Discontiguous networks, where subnets of one major network sit on both sides of a different network, fail because each side summarises to the same classful network, for example both advertising 172.16.0.0/16, and the router in the middle cannot tell which side holds which subnet.

Classless protocols include the mask with every route, so any prefix length works. Watch for auto-summary, a classful habit that older EIGRP and RIPv2 software turned on by default. Disable it so subnets are advertised as they are:

router rip
 version 2
 no auto-summary
router eigrp 100
 no auto-summary

The ip classless command

Classful ideas also affected forwarding. Suppose a router knows 10.1.1.0/24 and 10.1.2.0/24, and has a default route. A packet arrives for 10.1.9.5. With no ip classless, the router reasons that it knows the major network 10.0.0.0 and should therefore know every subnet of it, so it drops the packet instead of using the default route. With ip classless, it simply uses the longest match, which here is the default route. ip classless has been the default for many years, so you only meet the old behaviour in exams and very old configurations.

ICMP redirects

If a router receives a packet and must send it back out of the same interface towards a next hop in the sender's own subnet, there was a better path. The router forwards the packet and sends the host an ICMP redirect telling it to use the other router directly. This helps poorly configured hosts, but redirects can also be forged to divert traffic, and they cost CPU. Many hardening guides disable them on user-facing interfaces, and they are usually disabled automatically where HSRP is used.

interface GigabitEthernet0/0
 no ip redirects
 no ip unreachables
 no ip proxy-arp

Proxy ARP, another feature often disabled here, is explained in ARP explained.

IP directed broadcasts and IP unnumbered

A directed broadcast is a packet sent to the broadcast address of a remote subnet, such as 192.168.20.255. If the last router converted it into a local broadcast, one packet from outside could reach every host in the subnet. Attackers abused this in "smurf" amplification attacks, so routers have dropped directed broadcasts by default since the late 1990s (no ip directed-broadcast). If you need it, for example to send Wake-on-LAN packets from a management server, enable it only on the target interface and restrict it with an ACL so only that server can use it.

IP unnumbered lets a point-to-point interface borrow the address of another interface, normally a loopback, instead of using its own subnet. It saves addresses on serial and tunnel links and is used with PPPoE and dial-up style virtual interfaces. The trade-offs are that you cannot ping or monitor the link by its own address, and it only suits point-to-point links.

interface Loopback0
 ip address 10.255.0.1 255.255.255.255
interface Serial0/1/0
 ip unnumbered Loopback0

Real-world example: the forgotten auto-summary

A retail chain added a new branch with LAN 172.16.50.0/24, connected over a 10.0.0.0/30 link to head office, which already had 172.16.10.0/24. The branch router ran old EIGRP software with auto-summary on, so it advertised 172.16.0.0/16 to head office, and head office did the same in return. Each router discarded the other's summary because it pointed to its own network, and the two LANs could not reach each other. Adding no auto-summary on both routers made them advertise the real /24 subnets and fixed the problem at once.

Practice

Why do classful routing protocols fail with VLSM?
They do not send subnet masks in updates, so routers cannot learn subnets with masks different from the assumed one.
With no ip classless, what happens to a packet for an unknown subnet of a major network the router knows?
It is dropped instead of following the default route.
Why are directed broadcasts disabled by default?
They were abused for amplification attacks such as smurf, where one packet reached every host in a subnet.

Key takeaways

  • Classful protocols leave out masks; all modern protocols are classless.
  • Disable auto-summary to avoid problems with discontiguous networks.
  • ip classless (the default) lets the default route catch unknown subnets.
  • Consider disabling ICMP redirects, unreachables and proxy ARP on user-facing interfaces.
  • Keep directed broadcasts off unless tightly controlled; IP unnumbered saves addresses on point-to-point links.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.