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.
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?
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!
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.
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!
Makes sense, thanks.
And I’m guessing that if route summarization is used, then IP directed broadcasts will also slip through the net.
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!