Sunday, September 26, 2010

IP Directed Broadcast

I have this stupid blog, so I might as well put something on it.  And as you can tell from the other posts on this blog, I post on  The other day I broke down what an IP directed broadcast is.  You can read the full thread here, but here's the big post that had the most detail after the jump.

 To help out here I just created this diagram to help. Hopefully some pictures will help us out here. I like pictures :)

So, let's take what I said before as examples and expand on that.

Infinite wrote:
situation 1 -- this router receives a packet with a destination address of on interface f0/0. This is a directed broadcast because the broadcast came from a remote subnet. This packet is dropped by default. If ip directed-broadcast is enabled on f0/1 then the router will forward the packet.

Let's assume that this packet was sent from Host A. Host A's TCP/IP stack doesn't know this is a broadcast. The only thing that Host A knows is that it's an address not on its local subnet. When Host A sends this packet it'll look like:

Source MAC: Host A
Source IP:
Destination MAC: Router A F0/0
Destination IP:

Router A will receive the packet. Router A does not know is a broadcast (because it does not have an interface in that subnet) so it forwards it as a regular unicast.

Source MAC: Router A f0/1
Source IP:
Destination MAC: Router B F0/0
Destination IP:

When router B receives the packet it DOES know it's a broadcast because it has an interface in that subnet. If Router B has ip directed-broadcast configured on its F0/1 then it will forward the frame:

Source MAC: Router B F0/1
Source IP:
Destnaion IP:

Voila! Directed Broadcast!

If Router B does not have ip directed-broadcast configured on F0/1 then it drops the packet.

Infinite wrote:
situation 2 -- this router receives a packet with a destination address of on interface f0/1. This is a regular broadcast because the broadcast came from the same subnet it is destined for. This packet is processed by the router, but not forwarded under any circumstances.

Here let's assume that host D is sending the packet. In this case host D sends:

Source MAC: Host D
Source IP:
Destination IP:

Here's where we'll look at your switch question. A switch cannot ever learn what interface MAC FFFF:FFFF:FFFF is connected on so it will always forward this MAC out every port. That's it. Nothing else to say here. It doesn't convert anything, It doesn't change anything. It just forwards it out every interface.

Now, when this packet hits Router B F0/1 it looks at the destination MAC and sees it's a broadcast. It then looks at the destination IP and sees it's a broadcast for that local subnet. Here the router drops the packet. Period. This packet will never be forwarded.

Hopefully that helps!

Quickly, to address your helper-address question... That only works on certain UDP broadcasts. An technically it does not forward those broadcasts, it converts them to a unicast and sends them to a specific host. Helper-addresses ONLY matter in situation 2. Helper addresses have no effect in situation 1.


No comments:

Post a Comment