IP Directed-Broadcast on Cisco IOS

This topic is to discuss the following lesson:

Great video! in which scenario would you ever use this feature?

Hi Tae Wo K,

Perhaps for some old legacy application that only uses broadcast traffic. It’s unlikely that you would need this nowadays.

Rene

Hi,

Just to double check, but the no ip directed-broadcast only applies to the subnet on the interface the command is used, and it does not stop directed broadcasts for subnets on down stream routers that are in the routing table - correct?

Thanks,

Sam

Hello Samir

By default, a router will not forward any directed-broadcast packets out of any of its interfaces. Take a look at this diagram once again:

Imagine there is another router R4 connected to R3, with a subnet of 192.168.34.0/24. If R1 sends a ping to 192.168.34.255, R2 will not let it pass but will respond itself. In other words, it would behave in exactly the same way as with a ping to 192.168.23.0/24.

Now remember that the no ip directed-broadcast command is the default state, and it is this command that disallows any directed broadcasts to be forwarded. So to answer your question, this command will block all directed broadcasts, regardless of whether or not the destination subnet is directly connected to the interface on which it is applied.

I hope this has been helpful!

Laz

Hi Lazaros,

Thanks for the response.

In that case, what if the subnet between R3-R4 were 10.0.0.0/24 and R2 contained only a default route. How would R2 know that 10.0.0.255 was an ip directed broadcast?

Basically, I’m trying to understand the criteria the router uses to determine when a destination IP is a directed broadcast if the network is not directly connected.

Thanks,

Sam

Hello Samir

This is a good point you bring up. When an IP packet is sent, the destination address in the header contains no subnet information. Therefore the receiving router cannot know if it is a directed broadcast. If you don’t know the subnet, you cannot know if it is a network, broadcast, or host address.

However, if the router has some information about the subnet mask of the particular network, then it can indeed determine if it is a directed broadcast. Where can it find this information? In the routing table.

The routing table will have a list of routes to destination networks (directly connected, statically assigned, dynamically learned) where these destination networks have a defined range. The range identifies the subnet mask, and thus the router can know if the destination IP is a directed broadcast or not. Only then will a directed broadcast be dropped.

If a packet is routed based on the default gateway, then there is no way to determine if it is a directed broadcast or not, so it is forwarded normally.

I hope this has been helpful!

Laz

Makes sense, thanks.

And I’m guessing that if route summarization is used, then IP directed broadcasts will also slip through the net.

Hello Samir

My guess would be yes, you are right, but a quick labbing of such a scenario will verify this behaviour for sure. If you do end up doing it let us know your results!

Glad this has been helpful!

Laz

1 Like

Hi, I’m new and I like your content. I have a couple of queries:

  1. What if I need to send a broadcast from a host on the 192.168.12.0/24 network to the 192.168.34.0/24 network and now there is an additional router on the path between these networks. Where do I configure the ip directed-broadcast command? Is this scenario possible?

  2. Does the Wake-on-LAN (WOL) service need this feature if I want to remotely power on computers? Could you help me with this question please:

[removed copyrighted image and replaced it with the following]

Topology:
[Application server]----[SW1]----[R1]----[R2]----[SW2]----[multiple workstations and DHCP server]

On which router must IP directed broadcasts be enabled to allow WoL to operate?

Thank you so much

Hello Ricardo!

The ip directed-broadcast command is issued on the outgoing interface of a router that connects to the subnet that you want the direct broadcasts to be forwarded to. If you have multiple routers between the source of the directed broadcast and the intended destination, then you would simply apply the command to all of the intervening routers, on the outgoing interfaces that reach the network in question. Just keep in mind that these directed broadcasts will be sent on all intervening subnets as well, which could cause network inefficiencies, so it should be done with caution.

WoL requires that the IP directed-broadcast feature be supported on the last router to the destination subnet. If we want to enable WoL for the workstations, then the answer is D. If we want WoL to be enabled on the application server, then A is the answer.

I hope this has been helpful!

Laz