Routing - A Directed Broadcast is only detected by the last router

A directed broadcast is a packet with a destination address that is the network broadcast address of a particular subnet. This is a special type of broadcast that is used to reach all hosts within a particular subnet.

When a device sends a packet to a network broadcast address of a subnet other than its own, that packet must be routed to get to its destination.

Now when a host sends a packet to a destination that’s a broadcast address of a particular network, none of the devices in the path of that packet know that it is a directed broadcast, because no subnet mask information is included in the packet. The only device (router) that will be able to identify that destination IP address as a broadcast address is the router that is directly connected to the related subnet. Only that router knows the subnet mask associated with the address space to which the address belongs.

Now having said that, take a look at this diagram, where R1 sends a packet to 192.168.23.255. Note that there is no way R1 can know if this is a broadcast address because it doesn’t know the subnet mask associated with it:

routing-directed-broadcast.png

However, when the packet reaches R2, R2 knows that this is a directed broadcast because the destination address belongs to the subnet connected to its own Fa0/1 interface, and using the subnet mask configured there, it identifies the address as such.

Now imagine you have the following topology:

R1 — R2 — R3 — R4 -------(192.168.44.0/25)--------- R5

Where the network between R4 and R5 is 192.168.44.0/25 as shown. The broadcast address of this network is 192.168.44.127. Now imagine that R1 sends a packet to 192.168.44.127. Note the following:

  1. R1 does not know that this is a broadcast address since it has no subnet mask information.
  2. R2 and R3 don’t know it is a broadcast address for the same reason, thus it is forwarded normally.
  3. Once it gets to R4, only then is it identified as a broadcast address because it belongs to a directly connected subnet.

If R4 is not configured to forward directed broadcasts, it will be dropped.

To enable directed broadcasts, the directed broadcast forwarding feature must be configured on the last router in the path, that is the router to which the destination network of the directed broadcast is directly connected.

Links:

https://forum.networklessons.com/t/ip-directed-broadcast-on-cisco-ios/1327/13?u=lagapidis

https://networklessons.com/uncategorized/ip-directed-broadcast-cisco-ios