IP Directed-Broadcast on Cisco IOS

Hello Caspian

You are absolutely correct. I was incorrect in my post above, and I will fix it. I will also explain below why this behavior occurs, as you have demonstrated.

Looking at this diagram once again, let’s imagine we have a 192.168.34.0/24 network hanging off R3, and we issue the command no ip directed-broadcast on R2. When a packet is sent from R1 to 192.68.34.255, it will not be blocked at R2 by this command as you have confirmed. Why?

This is the key: R2 does not know whether this is a directed broadcast because it lacks subnet information. 192.168.34.255 is a directed broadcast ONLY IF the subnet of the destination network is /24 (or /25 or some other one that makes it the last address). But that subnet is unknown to R2.

Yes, you have some subnet info in the routing table, but the subnets there are not subnets of specific networks, they may be summary routes or aggregated routes. So, for R2, 192.168.34.255 is just another destination IP address. For example, the IP address/subnet mask combination 192.168.34.255/23 makes this address a host address rather than a directed broadcast address. So R2 simply does not know it is a directed broadcast.

By definition, the command can only actually affect the behavior of the router to which the intended directed broadcast is directly connected. Only such a router has the appropriate information (from the explicit configuration of the interface itself) to interpret it as a directed broadcast, and that is why only the final router in the path can actually apply this behavior.

So you’ve got it right, and thanks for sharing your findings, ensuring that the content on the site is correct! Appreciate it!

I hope this has been helpful!

Laz